Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Platform API - Shipments pt 1 (#11393)
Damian Legawiecf247f56b04fe
diff --git a/api/app/controllers/spree/api/v2/platform/orders_controller.rb b/api/app/controllers/spree/api/v2/platform/orders_controller.rbindex 5604f79e9a..4f57ebb7a8 100644--- a/api/app/controllers/spree/api/v2/platform/orders_controller.rb+++ b/api/app/controllers/spree/api/v2/platform/orders_controller.rb@@ -23,43 +23,43 @@ module Spreerequest_env: request.headers.env)- render_order(result)+ render_result(result)enddef nextresult = next_service.call(order: resource)- render_order(result)+ render_result(result)enddef advanceresult = advance_service.call(order: resource)- render_order(result)+ render_result(result)enddef completeresult = complete_service.call(order: resource)- render_order(result)+ render_result(result)enddef emptyresult = empty_service.call(order: resource)- render_order(result)+ render_result(result)enddef cancelresult = cancel_service.call(order: resource, canceler: spree_current_user)- render_order(result)+ render_result(result)enddef approveresult = approve_service.call(order: resource, approver: spree_current_user)- render_order(result)+ render_result(result)enddef destroy@@ -89,7 +89,7 @@ module Spreeamount: params[:amount].try(:to_f))- render_order(result)+ render_result(result)endprivate@@ -108,14 +108,6 @@ module Spree:item_count, :tax_total, :completed_at)end- def render_order(result)- if result.success?- render_serialized_payload { serialize_resource(resource) }- else- render_error_payload(result.error)- end- end-def update_serviceSpree::Api::Dependencies.platform_order_update_service.constantizeenddiff --git a/api/app/serializers/spree/api/v2/platform/shipments_controller.rb b/api/app/serializers/spree/api/v2/platform/shipments_controller.rbnew file mode 100644index 0000000000..b8aaf46c7f--- /dev/null+++ b/api/app/serializers/spree/api/v2/platform/shipments_controller.rb@@ -0,0 +1,47 @@+module Spree+ module Api+ module V2+ module Platform+ class ShipmentsController < ResourceController+ SHIPMENT_STATES = %w[ready ship cancel resume pend]++ def update+ result = update_service.call(shipment: resource, shipment_attributes: resource_permitted_attributes)+ render_result(result)+ end++ SHIPMENT_STATES.each do |state|+ define_method state do+ result = change_state_service.call(shipment: resource, state: state)+ render_result(result)+ end+ end++ private++ def model_class+ Spree::Shipment+ end++ def resource+ @resource ||= scope.find_by(number: params[:id]) || scope.find(params[:id])+ end++ def spree_permitted_attributes+ Spree::Shipment.json_api_permitted_attributes + [+ :selected_shipping_rate_id+ ]+ end++ def update_service+ Spree::Api::Dependencies.platform_shipment_update_service.constantize+ end++ def change_state_service+ Spree::Api::Dependencies.platform_shipment_change_state_service.constantize+ end+ end+ end+ end+ end+enddiff --git a/api/config/routes.rb b/api/config/routes.rbindex 846a01cf36..8d7db100ad 100644--- a/api/config/routes.rb+++ b/api/config/routes.rb@@ -251,15 +251,10 @@ Spree::Core::Engine.add_routes do# Shipment APIresources :shipments do- collection do- post 'transfer_to_location'- post 'transfer_to_shipment'- endmember do- patch :ready- patch :ship- patch :add- patch :remove+ %w[ready ship cancel resume pend].each do |state|+ patch state.to_sym+ endendenddiff --git a/api/docs/v2/platform/index.yaml b/api/docs/v2/platform/index.yamlindex e0536cb513..7242246b96 100644--- a/api/docs/v2/platform/index.yaml+++ b/api/docs/v2/platform/index.yaml@@ -66,13 +66,13 @@ paths:city: Herndonzipcode: '35005'phone: 555-555-0199- state_name:+ state_name:alternative_phone: 555-555-0199company: Company- created_at: '2021-10-26T11:40:00.481Z'- updated_at: '2021-10-26T11:40:00.481Z'- deleted_at:- label:+ created_at: '2021-10-26T19:53:15.460Z'+ updated_at: '2021-10-26T19:53:15.460Z'+ deleted_at:+ label:relationships:country:data:@@ -83,7 +83,7 @@ paths:id: '1'type: stateuser:- data:+ data:- id: '2'type: addressattributes:@@ -94,13 +94,13 @@ paths:city: Herndonzipcode: '35005'phone: 555-555-0199- state_name:+ state_name:alternative_phone: 555-555-0199company: Company- created_at: '2021-10-26T11:40:00.490Z'- updated_at: '2021-10-26T11:40:00.490Z'- deleted_at:- label:+ created_at: '2021-10-26T19:53:15.472Z'+ updated_at: '2021-10-26T19:53:15.472Z'+ deleted_at:+ label:relationships:country:data:@@ -111,7 +111,7 @@ paths:id: '2'type: stateuser:- data:+ data:meta:count: 2total_count: 2@@ -165,13 +165,13 @@ paths:city: Herndonzipcode: '35005'phone: 555-555-0199- state_name:+ state_name:alternative_phone: 555-555-0199company: Company- created_at: '2021-10-26T11:40:00.786Z'- updated_at: '2021-10-26T11:40:00.786Z'- deleted_at:- label:+ created_at: '2021-10-26T19:53:15.836Z'+ updated_at: '2021-10-26T19:53:15.836Z'+ deleted_at:+ label:relationships:country:data:@@ -256,13 +256,13 @@ paths:city: Herndonzipcode: '35005'phone: 555-555-0199- state_name:+ state_name:alternative_phone: 555-555-0199company: Company- created_at: '2021-10-26T11:40:00.842Z'- updated_at: '2021-10-26T11:40:00.842Z'- deleted_at:- label:+ created_at: '2021-10-26T19:53:15.907Z'+ updated_at: '2021-10-26T19:53:15.907Z'+ deleted_at:+ label:relationships:country:data:@@ -273,7 +273,7 @@ paths:id: '6'type: stateuser:- data:+ data:'404':description: Record not foundcontent:@@ -330,13 +330,13 @@ paths:city: Herndonzipcode: '35005'phone: 555-555-0199- state_name:+ state_name:alternative_phone: 555-555-0199company: Company- created_at: '2021-10-26T11:40:00.954Z'- updated_at: '2021-10-26T11:40:00.969Z'- deleted_at:- label:+ created_at: '2021-10-26T19:53:16.040Z'+ updated_at: '2021-10-26T19:53:16.057Z'+ deleted_at:+ label:relationships:country:data:@@ -347,7 +347,7 @@ paths:id: '8'type: stateuser:- data:+ data:'422':description: invalid requestcontent:@@ -464,10 +464,10 @@ paths:adjustable_type: Spree::Orderamount: '100.0'label: Shipping- mandatory:+ mandatory:eligible: true- created_at: '2021-10-26T11:40:01.276Z'- updated_at: '2021-10-26T11:40:01.276Z'+ created_at: '2021-10-26T19:53:16.391Z'+ updated_at: '2021-10-26T19:53:16.391Z'state: openincluded: falsedisplay_amount: "$100.00"@@ -491,10 +491,10 @@ paths:adjustable_type: Spree::Orderamount: '100.0'label: Shipping- mandatory:+ mandatory:eligible: true- created_at: '2021-10-26T11:40:01.314Z'- updated_at: '2021-10-26T11:40:01.314Z'+ created_at: '2021-10-26T19:53:16.431Z'+ updated_at: '2021-10-26T19:53:16.431Z'state: openincluded: falsedisplay_amount: "$100.00"@@ -561,10 +561,10 @@ paths:adjustable_type: Spree::LineItemamount: '100.0'label: Shipping- mandatory:+ mandatory:eligible: true- created_at: '2021-10-26T11:40:01.696Z'- updated_at: '2021-10-26T11:40:01.696Z'+ created_at: '2021-10-26T19:53:16.858Z'+ updated_at: '2021-10-26T19:53:16.858Z'state: openincluded: falsedisplay_amount: "$100.00"@@ -578,7 +578,7 @@ paths:id: '1'type: line_itemsource:- data:+ data:'422':description: invalid requestcontent:@@ -640,10 +640,10 @@ paths:adjustable_type: Spree::LineItemamount: '1.0'label: Shipping- mandatory:+ mandatory:eligible: true- created_at: '2021-10-26T11:40:01.856Z'- updated_at: '2021-10-26T11:40:01.863Z'+ created_at: '2021-10-26T19:53:17.041Z'+ updated_at: '2021-10-26T19:53:17.051Z'state: openincluded: falsedisplay_amount: "$1.00"@@ -713,10 +713,10 @@ paths:adjustable_type: Spree::LineItemamount: '15.0'label: New label- mandatory:+ mandatory:eligible: true- created_at: '2021-10-26T11:40:02.175Z'- updated_at: '2021-10-26T11:40:02.197Z'+ created_at: '2021-10-26T19:53:17.394Z'+ updated_at: '2021-10-26T19:53:17.421Z'state: openincluded: falsedisplay_amount: "$15.00"@@ -844,8 +844,8 @@ paths:type: classificationattributes:position: 1- created_at: '2021-10-26T11:40:03.103Z'- updated_at: '2021-10-26T11:40:03.103Z'+ created_at: '2021-10-26T19:53:18.510Z'+ updated_at: '2021-10-26T19:53:18.510Z'relationships:product:data:@@ -859,8 +859,8 @@ paths:type: classificationattributes:position: 1- created_at: '2021-10-26T11:40:03.233Z'- updated_at: '2021-10-26T11:40:03.233Z'+ created_at: '2021-10-26T19:53:18.654Z'+ updated_at: '2021-10-26T19:53:18.654Z'relationships:product:data:@@ -917,8 +917,8 @@ paths:type: classificationattributes:position: 1- created_at: '2021-10-26T11:40:03.917Z'- updated_at: '2021-10-26T11:40:03.917Z'+ created_at: '2021-10-26T19:53:19.343Z'+ updated_at: '2021-10-26T19:53:19.343Z'relationships:product:data:@@ -981,8 +981,8 @@ paths:type: classificationattributes:position: 1- created_at: '2021-10-26T11:40:04.129Z'- updated_at: '2021-10-26T11:40:04.129Z'+ created_at: '2021-10-26T19:53:19.618Z'+ updated_at: '2021-10-26T19:53:19.618Z'relationships:product:data:@@ -1042,8 +1042,8 @@ paths:type: classificationattributes:position: 1- created_at: '2021-10-26T11:40:04.558Z'- updated_at: '2021-10-26T11:40:04.558Z'+ created_at: '2021-10-26T19:53:20.120Z'+ updated_at: '2021-10-26T19:53:20.120Z'relationships:product:data:@@ -1153,8 +1153,8 @@ paths:type: classificationattributes:position: 2- created_at: '2021-10-26T11:40:05.543Z'- updated_at: '2021-10-26T11:40:05.573Z'+ created_at: '2021-10-26T19:53:22.267Z'+ updated_at: '2021-10-26T19:53:22.357Z'relationships:product:data:@@ -1245,35 +1245,35 @@ paths:- id: '1'type: cms_pageattributes:- title: Sed aliquid architecto dolores natus totam.- meta_title:- content:- meta_description:+ title: Officiis mollitia dolor sunt consequuntur.+ meta_title:+ content:+ meta_description:visible: true- slug: sed-aliquid-architecto-dolores-natus-totam+ slug: officiis-mollitia-dolor-sunt-consequunturtype: Spree::Cms::Pages::StandardPagelocale: en- deleted_at:- created_at: '2021-10-26T11:40:06.116Z'- updated_at: '2021-10-26T11:40:06.116Z'+ deleted_at:+ created_at: '2021-10-26T19:53:23.008Z'+ updated_at: '2021-10-26T19:53:23.008Z'relationships:cms_sections:data: []- id: '2'type: cms_pageattributes:- title: Non autem vero doloribus itaque debitis consectetur- sapiente.- meta_title:- content:- meta_description:+ title: Id est iure illo molestias quibusdam consequatur quidem+ quia.+ meta_title:+ content:+ meta_description:visible: true- slug: non-autem-vero-doloribus-itaque-debitis-consectetur-sapiente+ slug: id-est-iure-illo-molestias-quibusdam-consequatur-quidem-quiatype: Spree::Cms::Pages::StandardPagelocale: en- deleted_at:- created_at: '2021-10-26T11:40:06.121Z'- updated_at: '2021-10-26T11:40:06.121Z'+ deleted_at:+ created_at: '2021-10-26T19:53:23.013Z'+ updated_at: '2021-10-26T19:53:23.013Z'relationships:cms_sections:data: []@@ -1323,17 +1323,17 @@ paths:id: '5'type: cms_pageattributes:- title: Eos eligendi unde quos iure dicta.- meta_title:- content:- meta_description:+ title: Aperiam officia at recusandae praesentium aliquid expedita.+ meta_title:+ content:+ meta_description:visible: true- slug: eos-eligendi-unde-quos-iure-dicta+ slug: aperiam-officia-at-recusandae-praesentium-aliquid-expeditatype: Spree::Cms::Pages::StandardPagelocale: en- deleted_at:- created_at: '2021-10-26T11:40:06.240Z'- updated_at: '2021-10-26T11:40:06.240Z'+ deleted_at:+ created_at: '2021-10-26T19:53:23.149Z'+ updated_at: '2021-10-26T19:53:23.149Z'relationships:cms_sections:data: []@@ -1389,17 +1389,17 @@ paths:id: '6'type: cms_pageattributes:- title: Ex sunt nihil delectus magni dolorem voluptates aspernatur.- meta_title:- content:- meta_description:+ title: Aliquid dolores molestiae commodi quaerat vitae odio.+ meta_title:+ content:+ meta_description:visible: true- slug: ex-sunt-nihil-delectus-magni-dolorem-voluptates-aspernatur+ slug: aliquid-dolores-molestiae-commodi-quaerat-vitae-odiotype: Spree::Cms::Pages::StandardPagelocale: en- deleted_at:- created_at: '2021-10-26T11:40:06.298Z'- updated_at: '2021-10-26T11:40:06.298Z'+ deleted_at:+ created_at: '2021-10-26T19:53:23.208Z'+ updated_at: '2021-10-26T19:53:23.208Z'relationships:cms_sections:data: []@@ -1453,16 +1453,16 @@ paths:type: cms_pageattributes:title: My Super Page- meta_title:- content:- meta_description:+ meta_title:+ content:+ meta_description:visible: true- slug: itaque-non-optio-porro-inventore+ slug: mollitia-ab-assumenda-officia-amet-fuga-rerumtype: Spree::Cms::Pages::StandardPagelocale: en- deleted_at:- created_at: '2021-10-26T11:40:06.391Z'- updated_at: '2021-10-26T11:40:06.407Z'+ deleted_at:+ created_at: '2021-10-26T19:53:23.309Z'+ updated_at: '2021-10-26T19:53:23.328Z'relationships:cms_sections:data: []@@ -1576,28 +1576,29 @@ paths:- id: '1'type: cms_sectionattributes:- name: Occaecati amet eligendi nisi ipsa tenetur doloremque.+ name: Exercitationem amet atque commodi eos maiores animi+ autem adipisci.content: {}settings:gutters: No Guttersfit: Screen- destination:+ destination:type: Spree::Cms::Sections::HeroImageposition: 1linked_resource_type: Spree::Taxon- created_at: '2021-10-26T11:40:06.681Z'- updated_at: '2021-10-26T11:40:06.681Z'+ created_at: '2021-10-26T19:53:23.634Z'+ updated_at: '2021-10-26T19:53:23.634Z'relationships:cms_page:data:id: '13'type: cms_pagelinked_resource:- data:+ data:- id: '2'type: cms_sectionattributes:- name: Laborum illo error vel voluptates.+ name: Adipisci eum nulla nobis quasi.content:link_type_one: Spree::Taxonlink_type_two: Spree::Taxon@@ -1605,55 +1606,54 @@ paths:settings:layout_style: Defaultfit: Container- destination:+ destination:type: Spree::Cms::Sections::ImageGalleryposition: 2- linked_resource_type:- created_at: '2021-10-26T11:40:06.686Z'- updated_at: '2021-10-26T11:40:06.686Z'+ linked_resource_type:+ created_at: '2021-10-26T19:53:23.639Z'+ updated_at: '2021-10-26T19:53:23.639Z'relationships:cms_page:data:id: '13'type: cms_pagelinked_resource:- data:+ data:- id: '3'type: cms_sectionattributes:- name: Ipsam libero vel amet quis.+ name: Molestias quos dicta rem animi officia sed.content: {}settings:gutters: No Guttersfit: Screen- destination:+ destination:type: Spree::Cms::Sections::FeaturedArticleposition: 3linked_resource_type: Spree::Taxon- created_at: '2021-10-26T11:40:06.700Z'- updated_at: '2021-10-26T11:40:06.700Z'+ created_at: '2021-10-26T19:53:23.655Z'+ updated_at: '2021-10-26T19:53:23.655Z'relationships:cms_page:data:id: '13'type: cms_pagelinked_resource:- data:+ data:- id: '4'type: cms_sectionattributes:- name: Mollitia accusantium odit corporis totam vitae explicabo- qui.+ name: Sed ipsam nam vero rerum illum eos rem.content: {}settings:gutters: No Guttersfit: Screen- destination:+ destination:type: Spree::Cms::Sections::HeroImageposition: 4linked_resource_type: Spree::Product- created_at: '2021-10-26T11:40:06.719Z'- updated_at: '2021-10-26T11:40:06.719Z'+ created_at: '2021-10-26T19:53:23.670Z'+ updated_at: '2021-10-26T19:53:23.670Z'relationships:cms_page:data:@@ -1666,18 +1666,17 @@ paths:- id: '5'type: cms_sectionattributes:- name: Vel magnam corporis libero iusto delectus doloribus- dignissimos quam.+ name: Quaerat pariatur ratione suscipit neque magni ducimus.content: {}settings:gutters: No Guttersfit: Screen- destination:+ destination:type: Spree::Cms::Sections::HeroImageposition: 5linked_resource_type: Spree::Product- created_at: '2021-10-26T11:40:06.731Z'- updated_at: '2021-10-26T11:40:06.731Z'+ created_at: '2021-10-26T19:53:23.684Z'+ updated_at: '2021-10-26T19:53:23.684Z'relationships:cms_page:data:@@ -1733,18 +1732,17 @@ paths:id: '14'type: cms_sectionattributes:- name: Repellendus cupiditate libero autem odit nobis facere- vero.+ name: Debitis odit corporis repudiandae officiis.content: {}settings:gutters: No Guttersfit: Screen- destination:+ destination:type: Spree::Cms::Sections::HeroImageposition: 4linked_resource_type: Spree::Product- created_at: '2021-10-26T11:40:07.008Z'- updated_at: '2021-10-26T11:40:07.008Z'+ created_at: '2021-10-26T19:53:23.985Z'+ updated_at: '2021-10-26T19:53:23.985Z'relationships:cms_page:data:@@ -1806,17 +1804,17 @@ paths:id: '21'type: cms_sectionattributes:- name: Vero error saepe nesciunt culpa id.+ name: Ab aut architecto quidem qui.content: {}settings:gutters: No Guttersfit: Screen- destination:+ destination:type: Spree::Cms::Sections::HeroImageposition: 4linked_resource_type: Spree::Product- created_at: '2021-10-26T11:40:07.271Z'- updated_at: '2021-10-26T11:40:07.271Z'+ created_at: '2021-10-26T19:53:24.295Z'+ updated_at: '2021-10-26T19:53:24.295Z'relationships:cms_page:data:@@ -1880,12 +1878,12 @@ paths:settings:gutters: No Guttersfit: Screen- destination:+ destination:type: Spree::Cms::Sections::HeroImageposition: 4linked_resource_type: Spree::Product- created_at: '2021-10-26T11:40:07.704Z'- updated_at: '2021-10-26T11:40:07.724Z'+ created_at: '2021-10-26T19:53:24.608Z'+ updated_at: '2021-10-26T19:53:24.626Z'relationships:cms_page:data:@@ -1987,17 +1985,17 @@ paths:id: '58'type: cms_sectionattributes:- name: Beatae facilis esse quidem consequatur illum.+ name: Doloribus totam nemo eligendi rerum.content: {}settings:gutters: No Guttersfit: Screen- destination:+ destination:type: Spree::Cms::Sections::HeroImageposition: 3linked_resource_type: Spree::Product- created_at: '2021-10-26T11:40:08.640Z'- updated_at: '2021-10-26T11:40:08.704Z'+ created_at: '2021-10-26T19:53:25.429Z'+ updated_at: '2021-10-26T19:53:25.490Z'relationships:cms_page:data:@@ -2055,9 +2053,9 @@ paths:name: United States of Americanumcode: 840states_required: true- updated_at: '2021-10-26T11:40:08.962Z'+ updated_at: '2021-10-26T19:53:25.831Z'zipcode_required: true- created_at: '2021-10-26T11:40:08.962Z'+ created_at: '2021-10-26T19:53:25.831Z'relationships:states:data: []@@ -2070,9 +2068,9 @@ paths:name: NAME_2numcode: 840states_required: false- updated_at: '2021-10-26T11:40:08.972Z'+ updated_at: '2021-10-26T19:53:25.843Z'zipcode_required: true- created_at: '2021-10-26T11:40:08.972Z'+ created_at: '2021-10-26T19:53:25.843Z'relationships:states:data: []@@ -2085,9 +2083,9 @@ paths:name: NAME_3numcode: 840states_required: false- updated_at: '2021-10-26T11:40:08.977Z'+ updated_at: '2021-10-26T19:53:25.848Z'zipcode_required: true- created_at: '2021-10-26T11:40:08.977Z'+ created_at: '2021-10-26T19:53:25.848Z'relationships:states:data: []@@ -2142,9 +2140,9 @@ paths:name: NAME_6numcode: 840states_required: false- updated_at: '2021-10-26T11:40:09.060Z'+ updated_at: '2021-10-26T19:53:25.914Z'zipcode_required: true- created_at: '2021-10-26T11:40:09.060Z'+ created_at: '2021-10-26T19:53:25.914Z'relationships:states:data: []@@ -2196,7 +2194,7 @@ paths:- id: '1'type: digital_linkattributes:- token: LychUL9sq3LXH7CsMuf6Y4vB+ token: K5EgLMHtwPfJsCh75zMWPwFHaccess_counter: 0relationships:digital:@@ -2210,7 +2208,7 @@ paths:- id: '2'type: digital_linkattributes:- token: i7zRWCeU9UkGSHT3uXabENGg+ token: G4QiWEpSefGB2TcuPEyKPLqpaccess_counter: 0relationships:digital:@@ -2260,7 +2258,7 @@ paths:id: '5'type: digital_linkattributes:- token: UvEEL78CmWj8ZDoKDQZCgBpV+ token: AV7N6jvzVBvTREMVo1wZXSNFaccess_counter: 0relationships:digital:@@ -2319,7 +2317,7 @@ paths:id: '6'type: digital_linkattributes:- token: xd3XzEyWEjgUBPo3uQh3gd6S+ token: GuLJGwfJYcQDqSmyxQUVtyMyaccess_counter: 0relationships:digital:@@ -2372,7 +2370,7 @@ paths:id: '8'type: digital_linkattributes:- token: ncESAz4PPrrvd7cH23YgiJVu+ token: EjW79x55GKWRRH9fpu73fgqiaccess_counter: 0relationships:digital:@@ -2475,7 +2473,7 @@ paths:id: '13'type: digital_linkattributes:- token: Z5GEqMKKPQDt8G2YhAQWVJDd+ token: RKvnZmRycA7ey1ZfqzaMFoEoaccess_counter: 0relationships:digital:@@ -2541,7 +2539,7 @@ paths:- id: '15'type: digitalattributes:- url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBJdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--a7f98cbbcb6319b1ce4a397908a3f464831422b0/thinking-cat.jpg"+ url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBJdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--91089785a8a54873a15e57bbe8798438abc1fa2a/thinking-cat.jpg"content_type: image/jpegfilename: thinking-cat.jpgbyte_size: 18090@@ -2553,7 +2551,7 @@ paths:- id: '16'type: digitalattributes:- url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBKQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--93034171085577097029a567b503614751d8cbca/thinking-cat.jpg"+ url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBKQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--2629ea3e0e1c6d5e936f0c387c54f78ec30f1a77/thinking-cat.jpg"content_type: image/jpegfilename: thinking-cat.jpgbyte_size: 18090@@ -2565,7 +2563,7 @@ paths:- id: '17'type: digitalattributes:- url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBKUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--63872143ddf02282c7a17b55392ccd09eb2e1a8d/thinking-cat.jpg"+ url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBKUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--82b3770bb7588a514f01d096dd79fbef2a48ca3a/thinking-cat.jpg"content_type: image/jpegfilename: thinking-cat.jpgbyte_size: 18090@@ -2620,7 +2618,7 @@ paths:id: '24'type: digitalattributes:- url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBMQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--7e57c3a59beb72ab3892a7f595a3ea2ec9ccc1e5/icon_256x256.jpg"+ url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBMQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--d3c28aa7a661f00e11d7eb64c5afc26a9bf4e5f9/icon_256x256.jpg"content_type: image/pngfilename: icon_256x256.jpgbyte_size: 818@@ -2681,7 +2679,7 @@ paths:id: '28'type: digitalattributes:- url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBNQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--26f493702b57bbf7ce336912c8a0ce90547cb59e/thinking-cat.jpg"+ url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBNQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--d002a3a14502e5f401df676155a0eb55da6653f6/thinking-cat.jpg"content_type: image/jpegfilename: thinking-cat.jpgbyte_size: 18090@@ -2739,7 +2737,7 @@ paths:id: '36'type: digitalattributes:- url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBPdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ed5430091bec01249fd2ec4e09e905c36f3bb538/icon_256x256.jpg"+ url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBPdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--c2966db772c42e89b8590f799c36512686c263f5/icon_256x256.jpg"content_type: image/pngfilename: icon_256x256.jpgbyte_size: 818@@ -2860,8 +2858,8 @@ paths:attributes:quantity: 1price: '10.0'- created_at: '2021-10-26T11:40:19.667Z'- updated_at: '2021-10-26T11:40:19.681Z'+ created_at: '2021-10-26T19:53:38.722Z'+ updated_at: '2021-10-26T19:53:38.733Z'currency: USDcost_price: '17.0'adjustment_total: '0.0'@@ -2907,8 +2905,8 @@ paths:attributes:quantity: 1price: '10.0'- created_at: '2021-10-26T11:40:19.746Z'- updated_at: '2021-10-26T11:40:19.755Z'+ created_at: '2021-10-26T19:53:38.777Z'+ updated_at: '2021-10-26T19:53:38.784Z'currency: USDcost_price: '17.0'adjustment_total: '0.0'@@ -2997,8 +2995,8 @@ paths:attributes:quantity: 1price: '10.0'- created_at: '2021-10-26T11:40:20.105Z'- updated_at: '2021-10-26T11:40:20.155Z'+ created_at: '2021-10-26T19:53:39.090Z'+ updated_at: '2021-10-26T19:53:39.127Z'currency: USDcost_price: '17.0'adjustment_total: '0.0'@@ -3096,8 +3094,8 @@ paths:attributes:quantity: 1price: '10.0'- created_at: '2021-10-26T11:40:20.381Z'- updated_at: '2021-10-26T11:40:20.394Z'+ created_at: '2021-10-26T19:53:39.325Z'+ updated_at: '2021-10-26T19:53:39.335Z'currency: USDcost_price: '17.0'adjustment_total: '0.0'@@ -3189,8 +3187,8 @@ paths:attributes:quantity: 4price: '10.0'- created_at: '2021-10-26T11:40:20.775Z'- updated_at: '2021-10-26T11:40:20.844Z'+ created_at: '2021-10-26T19:53:39.666Z'+ updated_at: '2021-10-26T19:53:39.721Z'currency: USDcost_price: '17.0'adjustment_total: '0.0'@@ -3238,10 +3236,10 @@ paths:examples:Example:value:- error: 'Quantity selected of "Product #133 - 7472" is not available.'+ error: 'Quantity selected of "Product #133 - 8740" is not available.'errors:quantity:- - 'selected of "Product #133 - 7472" is not available.'+ - 'selected of "Product #133 - 8740" is not available.''404':description: Record not foundcontent:@@ -3342,18 +3340,18 @@ paths:type: menu_itemattributes:name: Link no. 1 To Somewhere- subtitle:- destination:+ subtitle:+ destination:new_window: falseitem_type: Linklinked_resource_type: URL- code:+ code:lft: 2rgt: 3depth: 1- created_at: '2021-10-26T11:40:21.935Z'- updated_at: '2021-10-26T11:40:21.942Z'- link:+ created_at: '2021-10-26T19:53:40.725Z'+ updated_at: '2021-10-26T19:53:40.737Z'+ link:is_container: falseis_root: falseis_child: true@@ -3372,25 +3370,25 @@ paths:id: '1'type: menu_itemlinked_resource:- data:+ data:children:data: []- id: '3'type: menu_itemattributes:name: Link no. 2 To Somewhere- subtitle:- destination:+ subtitle:+ destination:new_window: falseitem_type: Linklinked_resource_type: URL- code:+ code:lft: 4rgt: 5depth: 1- created_at: '2021-10-26T11:40:21.988Z'- updated_at: '2021-10-26T11:40:21.994Z'- link:+ created_at: '2021-10-26T19:53:40.888Z'+ updated_at: '2021-10-26T19:53:40.897Z'+ link:is_container: falseis_root: falseis_child: true@@ -3409,25 +3407,25 @@ paths:id: '1'type: menu_itemlinked_resource:- data:+ data:children:data: []- id: '4'type: menu_itemattributes:name: Link no. 3 To Somewhere- subtitle:- destination:+ subtitle:+ destination:new_window: falseitem_type: Linklinked_resource_type: URL- code:+ code:lft: 6rgt: 7depth: 1- created_at: '2021-10-26T11:40:22.038Z'- updated_at: '2021-10-26T11:40:22.044Z'- link:+ created_at: '2021-10-26T19:53:41.006Z'+ updated_at: '2021-10-26T19:53:41.014Z'+ link:is_container: falseis_root: falseis_child: true@@ -3446,25 +3444,25 @@ paths:id: '1'type: menu_itemlinked_resource:- data:+ data:children:data: []- id: '5'type: menu_itemattributes:name: Link no. 4 To Somewhere- subtitle:- destination:+ subtitle:+ destination:new_window: falseitem_type: Linklinked_resource_type: URL- code:+ code:lft: 8rgt: 9depth: 1- created_at: '2021-10-26T11:40:22.089Z'- updated_at: '2021-10-26T11:40:22.095Z'- link:+ created_at: '2021-10-26T19:53:41.109Z'+ updated_at: '2021-10-26T19:53:41.116Z'+ link:is_container: falseis_root: falseis_child: true@@ -3483,25 +3481,25 @@ paths:id: '1'type: menu_itemlinked_resource:- data:+ data:children:data: []- id: '6'type: menu_itemattributes:name: Link no. 5 To Somewhere- subtitle:- destination:+ subtitle:+ destination:new_window: falseitem_type: Linklinked_resource_type: URL- code:+ code:lft: 10rgt: 11depth: 1- created_at: '2021-10-26T11:40:22.141Z'- updated_at: '2021-10-26T11:40:22.147Z'- link:+ created_at: '2021-10-26T19:53:41.213Z'+ updated_at: '2021-10-26T19:53:41.222Z'+ link:is_container: falseis_root: falseis_child: true@@ -3520,25 +3518,25 @@ paths:id: '1'type: menu_itemlinked_resource:- data:+ data:children:data: []- id: '7'type: menu_itemattributes:name: Link no. 6 To Somewhere- subtitle:- destination:+ subtitle:+ destination:new_window: falseitem_type: Linklinked_resource_type: URL- code:+ code:lft: 12rgt: 13depth: 1- created_at: '2021-10-26T11:40:22.193Z'- updated_at: '2021-10-26T11:40:22.199Z'- link:+ created_at: '2021-10-26T19:53:41.326Z'+ updated_at: '2021-10-26T19:53:41.334Z'+ link:is_container: falseis_root: falseis_child: true@@ -3557,25 +3555,25 @@ paths:id: '1'type: menu_itemlinked_resource:- data:+ data:children:data: []- id: '8'type: menu_itemattributes:name: Link no. 7 To Somewhere- subtitle:- destination:+ subtitle:+ destination:new_window: falseitem_type: Linklinked_resource_type: URL- code:+ code:lft: 14rgt: 15depth: 1- created_at: '2021-10-26T11:40:22.242Z'- updated_at: '2021-10-26T11:40:22.249Z'- link:+ created_at: '2021-10-26T19:53:41.429Z'+ updated_at: '2021-10-26T19:53:41.437Z'+ link:is_container: falseis_root: falseis_child: true@@ -3594,40 +3592,40 @@ paths:id: '1'type: menu_itemlinked_resource:- data:+ data:children:data: []- id: '1'type: menu_itemattributes:- name: Labore consectetur nam assumenda dolorum mollitia.- subtitle:- destination:+ name: Ipsam voluptas tenetur sapiente amet.+ subtitle:+ destination:new_window: falseitem_type: Containerlinked_resource_type: URL- code:+ code:lft: 1rgt: 16depth: 0- created_at: '2021-10-26T11:40:21.888Z'- updated_at: '2021-10-26T11:40:22.263Z'- link:+ created_at: '2021-10-26T19:53:40.621Z'+ updated_at: '2021-10-26T19:53:41.452Z'+ link:is_container: trueis_root: trueis_child: falseis_leaf: falserelationships:icon:- data:+ data:menu:data:id: '1'type: menuparent:- data:+ data:linked_resource:- data:+ data:children:data:- id: '2'@@ -3691,25 +3689,25 @@ paths:type: menu_itemattributes:name: Link no. 18 To Somewhere- subtitle:- destination:+ subtitle:+ destination:new_window: falseitem_type: Linklinked_resource_type: URL- code:+ code:lft: 8rgt: 9depth: 1- created_at: '2021-10-26T11:40:22.941Z'- updated_at: '2021-10-26T11:40:22.947Z'- link:+ created_at: '2021-10-26T19:53:42.795Z'+ updated_at: '2021-10-26T19:53:42.803Z'+ link:is_container: falseis_root: falseis_child: trueis_leaf: truerelationships:icon:- data:+ data:menu:data:id: '3'@@ -3719,7 +3717,7 @@ paths:id: '17'type: menu_itemlinked_resource:- data:+ data:children:data: []'422':@@ -3778,18 +3776,18 @@ paths:type: menu_itemattributes:name: Link no. 25 To Somewhere- subtitle:- destination:+ subtitle:+ destination:new_window: falseitem_type: Linklinked_resource_type: URL- code:+ code:lft: 8rgt: 9depth: 1- created_at: '2021-10-26T11:40:23.388Z'- updated_at: '2021-10-26T11:40:23.394Z'- link:+ created_at: '2021-10-26T19:53:43.631Z'+ updated_at: '2021-10-26T19:53:43.637Z'+ link:is_container: falseis_root: falseis_child: true@@ -3808,7 +3806,7 @@ paths:id: '26'type: menu_itemlinked_resource:- data:+ data:children:data: []'404':@@ -3861,18 +3859,18 @@ paths:type: menu_itemattributes:name: Menu Item One- subtitle:- destination:+ subtitle:+ destination:new_window: falseitem_type: Linklinked_resource_type: URL- code:+ code:lft: 8rgt: 9depth: 1- created_at: '2021-10-26T11:40:24.065Z'- updated_at: '2021-10-26T11:40:24.101Z'- link:+ created_at: '2021-10-26T19:53:44.957Z'+ updated_at: '2021-10-26T19:53:44.997Z'+ link:is_container: falseis_root: falseis_child: true@@ -3891,7 +3889,7 @@ paths:id: '40'type: menu_itemlinked_resource:- data:+ data:children:data: []'422':@@ -3987,18 +3985,18 @@ paths:type: menu_itemattributes:name: Link no. 62 To Somewhere- subtitle:- destination:+ subtitle:+ destination:new_window: falseitem_type: Linklinked_resource_type: URL- code:+ code:lft: 5rgt: 6depth: 2- created_at: '2021-10-26T11:40:25.740Z'- updated_at: '2021-10-26T11:40:25.779Z'- link:+ created_at: '2021-10-26T19:53:48.192Z'+ updated_at: '2021-10-26T19:53:48.235Z'+ link:is_container: falseis_root: falseis_child: true@@ -4017,7 +4015,7 @@ paths:id: '75'type: menu_itemlinked_resource:- data:+ data:children:data: []'404':@@ -4089,8 +4087,8 @@ paths:name: Main Menulocation: headerlocale: en- created_at: '2021-10-26T11:40:26.260Z'- updated_at: '2021-10-26T11:40:26.375Z'+ created_at: '2021-10-26T19:53:49.141Z'+ updated_at: '2021-10-26T19:53:49.358Z'relationships:menu_items:data:@@ -4106,8 +4104,8 @@ paths:name: Footer Menulocation: footerlocale: en- created_at: '2021-10-26T11:40:26.274Z'- updated_at: '2021-10-26T11:40:26.477Z'+ created_at: '2021-10-26T19:53:49.155Z'+ updated_at: '2021-10-26T19:53:49.567Z'relationships:menu_items:data:@@ -4166,8 +4164,8 @@ paths:name: Main Menulocation: headerlocale: en- created_at: '2021-10-26T11:40:26.809Z'- updated_at: '2021-10-26T11:40:26.819Z'+ created_at: '2021-10-26T19:53:50.272Z'+ updated_at: '2021-10-26T19:53:50.282Z'relationships:menu_items:data:@@ -4231,8 +4229,8 @@ paths:name: Main Menulocation: headerlocale: en- created_at: '2021-10-26T11:40:26.876Z'- updated_at: '2021-10-26T11:40:26.885Z'+ created_at: '2021-10-26T19:53:50.342Z'+ updated_at: '2021-10-26T19:53:50.351Z'relationships:menu_items:data:@@ -4290,8 +4288,8 @@ paths:name: Main Menulocation: headerlocale: en- created_at: '2021-10-26T11:40:26.984Z'- updated_at: '2021-10-26T11:40:26.994Z'+ created_at: '2021-10-26T19:53:50.446Z'+ updated_at: '2021-10-26T19:53:50.455Z'relationships:menu_items:data:@@ -4414,8 +4412,8 @@ paths:name: foo-size-68presentation: Sizeposition: 1- created_at: '2021-10-26T11:40:27.257Z'- updated_at: '2021-10-26T11:40:27.257Z'+ created_at: '2021-10-26T19:53:50.732Z'+ updated_at: '2021-10-26T19:53:50.732Z'filterable: truerelationships:option_values:@@ -4426,8 +4424,8 @@ paths:name: foo-size-69presentation: Sizeposition: 2- created_at: '2021-10-26T11:40:27.260Z'- updated_at: '2021-10-26T11:40:27.260Z'+ created_at: '2021-10-26T19:53:50.736Z'+ updated_at: '2021-10-26T19:53:50.736Z'filterable: truerelationships:option_values:@@ -4474,8 +4472,8 @@ paths:name: foo-size-72presentation: Sizeposition: 1- created_at: '2021-10-26T11:40:27.351Z'- updated_at: '2021-10-26T11:40:27.351Z'+ created_at: '2021-10-26T19:53:50.822Z'+ updated_at: '2021-10-26T19:53:50.822Z'filterable: truerelationships:option_values:@@ -4528,8 +4526,8 @@ paths:name: foo-size-73presentation: Sizeposition: 1- created_at: '2021-10-26T11:40:27.405Z'- updated_at: '2021-10-26T11:40:27.405Z'+ created_at: '2021-10-26T19:53:50.873Z'+ updated_at: '2021-10-26T19:53:50.873Z'filterable: truerelationships:option_values:@@ -4579,8 +4577,8 @@ paths:name: Size-Xpresentation: Sizeposition: 1- created_at: '2021-10-26T11:40:27.486Z'- updated_at: '2021-10-26T11:40:27.500Z'+ created_at: '2021-10-26T19:53:50.954Z'+ updated_at: '2021-10-26T19:53:50.967Z'filterable: truerelationships:option_values:@@ -4704,8 +4702,8 @@ paths:position: 1name: Size-68presentation: S- created_at: '2021-10-26T11:40:27.695Z'- updated_at: '2021-10-26T11:40:27.695Z'+ created_at: '2021-10-26T19:53:51.163Z'+ updated_at: '2021-10-26T19:53:51.163Z'relationships:option_type:data:@@ -4717,8 +4715,8 @@ paths:position: 1name: Size-69presentation: S- created_at: '2021-10-26T11:40:27.707Z'- updated_at: '2021-10-26T11:40:27.707Z'+ created_at: '2021-10-26T19:53:51.172Z'+ updated_at: '2021-10-26T19:53:51.172Z'relationships:option_type:data:@@ -4773,11 +4771,11 @@ paths:position: 1name: Size-72presentation: S- created_at: '2021-10-26T11:40:27.801Z'- updated_at: '2021-10-26T11:40:27.801Z'+ created_at: '2021-10-26T19:53:51.265Z'+ updated_at: '2021-10-26T19:53:51.265Z'relationships:option_type:- data:+ data:'422':description: invalid requestcontent:@@ -4833,8 +4831,8 @@ paths:position: 1name: Size-73presentation: S- created_at: '2021-10-26T11:40:27.856Z'- updated_at: '2021-10-26T11:40:27.856Z'+ created_at: '2021-10-26T19:53:51.317Z'+ updated_at: '2021-10-26T19:53:51.317Z'relationships:option_type:data:@@ -4892,8 +4890,8 @@ paths:position: 1name: Mpresentation: S- created_at: '2021-10-26T11:40:27.956Z'- updated_at: '2021-10-26T11:40:27.971Z'+ created_at: '2021-10-26T19:53:51.420Z'+ updated_at: '2021-10-26T19:53:51.436Z'relationships:option_type:data:@@ -5009,34 +5007,35 @@ paths:- id: '40'type: orderattributes:- number: R593647058+ number: R511335457item_total: '0.0'total: '0.0'state: cartadjustment_total: '0.0'- completed_at:+ completed_at:payment_total: '0.0'- shipment_state:- payment_state:- email: [email protected]- special_instructions:- created_at: '2021-10-26T11:40:28.198Z'- updated_at: '2021-10-26T11:40:28.198Z'+ shipment_state:+ payment_state:+ email: [email protected]+ special_instructions:+ created_at: '2021-10-26T19:53:51.695Z'+ updated_at: '2021-10-26T19:53:51.695Z'currency: USD- last_ip_address:+ last_ip_address:shipment_total: '0.0'additional_tax_total: '0.0'promo_total: '0.0'channel: spreeincluded_tax_total: '0.0'item_count: 0- approved_at:+ approved_at:confirmation_delivered: false- canceled_at:+ canceled_at:state_lock_version: 0taxable_adjustment_total: '0.0'non_taxable_adjustment_total: '0.0'- store_owner_notification_delivered:+ store_owner_notification_delivered:+ display_total: "$0.00"display_outstanding_balance: "$0.00"display_item_total: "$0.00"display_tax_total: "$0.00"@@ -5049,7 +5048,6 @@ paths:display_pre_tax_total: "$0.00"display_ship_total: "$0.00"display_shipment_total: "$0.00"- display_total: "$0.00"display_total_applicable_store_credit: "$0.00"display_total_applied_store_credit: "$0.00"display_order_total_after_store_credit: "$0.00"@@ -5061,17 +5059,17 @@ paths:id: '41'type: usercreated_by:- data:+ data:approver:- data:+ data:canceler:- data:+ data:bill_address:data:id: '52'type: addressship_address:- data:+ data:line_items:data: []payments:@@ -5093,34 +5091,35 @@ paths:- id: '41'type: orderattributes:- number: R537642435+ number: R370362836item_total: '0.0'total: '0.0'state: cartadjustment_total: '0.0'- completed_at:+ completed_at:payment_total: '0.0'- shipment_state:- payment_state:- email: [email protected]- special_instructions:- created_at: '2021-10-26T11:40:28.215Z'- updated_at: '2021-10-26T11:40:28.215Z'+ shipment_state:+ payment_state:+ email: [email protected]+ special_instructions:+ created_at: '2021-10-26T19:53:51.709Z'+ updated_at: '2021-10-26T19:53:51.709Z'currency: USD- last_ip_address:+ last_ip_address:shipment_total: '0.0'additional_tax_total: '0.0'promo_total: '0.0'channel: spreeincluded_tax_total: '0.0'item_count: 0- approved_at:+ approved_at:confirmation_delivered: false- canceled_at:+ canceled_at:state_lock_version: 0taxable_adjustment_total: '0.0'non_taxable_adjustment_total: '0.0'- store_owner_notification_delivered:+ store_owner_notification_delivered:+ display_total: "$0.00"display_outstanding_balance: "$0.00"display_item_total: "$0.00"display_tax_total: "$0.00"@@ -5133,7 +5132,6 @@ paths:display_pre_tax_total: "$0.00"display_ship_total: "$0.00"display_shipment_total: "$0.00"- display_total: "$0.00"display_total_applicable_store_credit: "$0.00"display_total_applied_store_credit: "$0.00"display_order_total_after_store_credit: "$0.00"@@ -5145,17 +5143,17 @@ paths:id: '42'type: usercreated_by:- data:+ data:approver:- data:+ data:canceler:- data:+ data:bill_address:data:id: '53'type: addressship_address:- data:+ data:line_items:data: []payments:@@ -5220,34 +5218,35 @@ paths:id: '44'type: orderattributes:- number: R461656793+ number: R813416646item_total: '0.0'total: '0.0'state: cartadjustment_total: '0.0'- completed_at:+ completed_at:payment_total: '0.0'- shipment_state:- payment_state:- email:- special_instructions:- created_at: '2021-10-26T11:40:28.612Z'- updated_at: '2021-10-26T11:40:28.632Z'+ shipment_state:+ payment_state:+ email:+ special_instructions:+ created_at: '2021-10-26T19:53:52.135Z'+ updated_at: '2021-10-26T19:53:52.154Z'currency: USD- last_ip_address:+ last_ip_address:shipment_total: '0.0'additional_tax_total: '0.0'promo_total: '0.0'channel: spreeincluded_tax_total: '0.0'item_count: 0- approved_at:+ approved_at:confirmation_delivered: false- canceled_at:+ canceled_at:state_lock_version: 0taxable_adjustment_total: '0.0'non_taxable_adjustment_total: '0.0'- store_owner_notification_delivered:+ store_owner_notification_delivered:+ display_total: "$0.00"display_outstanding_balance: "$0.00"display_item_total: "$0.00"display_tax_total: "$0.00"@@ -5260,7 +5259,6 @@ paths:display_pre_tax_total: "$20.00"display_ship_total: "$0.00"display_shipment_total: "$0.00"- display_total: "$0.00"display_total_applicable_store_credit: "$0.00"display_total_applied_store_credit: "$0.00"display_order_total_after_store_credit: "$0.00"@@ -5268,13 +5266,13 @@ paths:display_store_credit_remaining_after_capture: "$0.00"relationships:user:- data:+ data:created_by:- data:+ data:approver:- data:+ data:canceler:- data:+ data:bill_address:data:id: '56'@@ -5344,34 +5342,35 @@ paths:id: '45'type: orderattributes:- number: R527857572+ number: R189122828item_total: '10.0'total: '110.0'state: deliveryadjustment_total: '0.0'- completed_at:+ completed_at:payment_total: '0.0'- shipment_state:- payment_state:- email: [email protected]- special_instructions:- created_at: '2021-10-26T11:40:28.698Z'- updated_at: '2021-10-26T11:40:28.880Z'+ shipment_state:+ payment_state:+ email: [email protected]+ special_instructions:+ created_at: '2021-10-26T19:53:52.211Z'+ updated_at: '2021-10-26T19:53:52.394Z'currency: USD- last_ip_address:+ last_ip_address:shipment_total: '100.0'additional_tax_total: '0.0'promo_total: '0.0'channel: spreeincluded_tax_total: '0.0'item_count: 1- approved_at:+ approved_at:confirmation_delivered: false- canceled_at:+ canceled_at:state_lock_version: 0taxable_adjustment_total: '0.0'non_taxable_adjustment_total: '0.0'- store_owner_notification_delivered:+ store_owner_notification_delivered:+ display_total: "$110.00"display_outstanding_balance: "$110.00"display_item_total: "$10.00"display_tax_total: "$0.00"@@ -5384,7 +5383,6 @@ paths:display_pre_tax_total: "$10.00"display_ship_total: "$100.00"display_shipment_total: "$100.00"- display_total: "$110.00"display_total_applicable_store_credit: "$0.00"display_total_applied_store_credit: "$0.00"display_order_total_after_store_credit: "$110.00"@@ -5396,11 +5394,11 @@ paths:id: '45'type: usercreated_by:- data:+ data:approver:- data:+ data:canceler:- data:+ data:bill_address:data:id: '57'@@ -5480,34 +5478,35 @@ paths:id: '47'type: orderattributes:- number: R213991125+ number: R045818661item_total: '10.0'total: '110.0'state: deliveryadjustment_total: '0.0'- completed_at:+ completed_at:payment_total: '0.0'- shipment_state:- payment_state:+ shipment_state:+ payment_state:email: [email protected]- special_instructions:- created_at: '2021-10-26T11:40:29.181Z'- updated_at: '2021-10-26T11:40:29.344Z'+ special_instructions:+ created_at: '2021-10-26T19:53:52.652Z'+ updated_at: '2021-10-26T19:53:52.797Z'currency: USD- last_ip_address:+ last_ip_address:shipment_total: '100.0'additional_tax_total: '0.0'promo_total: '0.0'channel: spreeincluded_tax_total: '0.0'item_count: 1- approved_at:+ approved_at:confirmation_delivered: false- canceled_at:+ canceled_at:state_lock_version: 0taxable_adjustment_total: '0.0'non_taxable_adjustment_total: '0.0'- store_owner_notification_delivered:+ store_owner_notification_delivered:+ display_total: "$110.00"display_outstanding_balance: "$110.00"display_item_total: "$10.00"display_tax_total: "$0.00"@@ -5520,7 +5519,6 @@ paths:display_pre_tax_total: "$10.00"display_ship_total: "$100.00"display_shipment_total: "$100.00"- display_total: "$110.00"display_total_applicable_store_credit: "$0.00"display_total_applied_store_credit: "$0.00"display_order_total_after_store_credit: "$110.00"@@ -5532,11 +5530,11 @@ paths:id: '47'type: usercreated_by:- data:+ data:approver:- data:+ data:canceler:- data:+ data:bill_address:data:id: '61'@@ -5666,34 +5664,35 @@ paths:id: '52'type: orderattributes:- number: R830513500+ number: R188586634item_total: '10.0'total: '110.0'state: paymentadjustment_total: '0.0'- completed_at:+ completed_at:payment_total: '0.0'- shipment_state:- payment_state:- email: [email protected]- special_instructions:- created_at: '2021-10-26T11:40:30.295Z'- updated_at: '2021-10-26T11:40:30.515Z'+ shipment_state:+ payment_state:+ email: [email protected]+ special_instructions:+ created_at: '2021-10-26T19:53:53.627Z'+ updated_at: '2021-10-26T19:53:53.814Z'currency: USD- last_ip_address:+ last_ip_address:shipment_total: '100.0'additional_tax_total: '0.0'promo_total: '0.0'channel: spreeincluded_tax_total: '0.0'item_count: 1- approved_at:+ approved_at:confirmation_delivered: false- canceled_at:+ canceled_at:state_lock_version: 0taxable_adjustment_total: '0.0'non_taxable_adjustment_total: '0.0'- store_owner_notification_delivered:+ store_owner_notification_delivered:+ display_total: "$110.00"display_outstanding_balance: "$110.00"display_item_total: "$10.00"display_tax_total: "$0.00"@@ -5706,7 +5705,6 @@ paths:display_pre_tax_total: "$110.00"display_ship_total: "$100.00"display_shipment_total: "$100.00"- display_total: "$110.00"display_total_applicable_store_credit: "$0.00"display_total_applied_store_credit: "$0.00"display_order_total_after_store_credit: "$110.00"@@ -5718,11 +5716,11 @@ paths:id: '52'type: usercreated_by:- data:+ data:approver:- data:+ data:canceler:- data:+ data:bill_address:data:id: '71'@@ -5805,34 +5803,35 @@ paths:id: '54'type: orderattributes:- number: R782014536+ number: R652930084item_total: '10.0'total: '110.0'state: paymentadjustment_total: '0.0'- completed_at:+ completed_at:payment_total: '0.0'- shipment_state:- payment_state:- email: [email protected]- special_instructions:- created_at: '2021-10-26T11:40:30.801Z'- updated_at: '2021-10-26T11:40:31.004Z'+ shipment_state:+ payment_state:+ email: [email protected]+ special_instructions:+ created_at: '2021-10-26T19:53:54.102Z'+ updated_at: '2021-10-26T19:53:54.291Z'currency: USD- last_ip_address:+ last_ip_address:shipment_total: '100.0'additional_tax_total: '0.0'promo_total: '0.0'channel: spreeincluded_tax_total: '0.0'item_count: 1- approved_at:+ approved_at:confirmation_delivered: false- canceled_at:+ canceled_at:state_lock_version: 0taxable_adjustment_total: '0.0'non_taxable_adjustment_total: '0.0'- store_owner_notification_delivered:+ store_owner_notification_delivered:+ display_total: "$110.00"display_outstanding_balance: "$110.00"display_item_total: "$10.00"display_tax_total: "$0.00"@@ -5845,7 +5844,6 @@ paths:display_pre_tax_total: "$110.00"display_ship_total: "$100.00"display_shipment_total: "$100.00"- display_total: "$110.00"display_total_applicable_store_credit: "$0.00"display_total_applied_store_credit: "$0.00"display_order_total_after_store_credit: "$110.00"@@ -5857,11 +5855,11 @@ paths:id: '54'type: usercreated_by:- data:+ data:approver:- data:+ data:canceler:- data:+ data:bill_address:data:id: '75'@@ -5944,34 +5942,35 @@ paths:id: '56'type: orderattributes:- number: R990849827+ number: R187867436item_total: '10.0'total: '110.0'state: completeadjustment_total: '0.0'- completed_at: '2021-10-26T11:40:31.617Z'+ completed_at: '2021-10-26T19:53:54.846Z'payment_total: '0.0'shipment_state: pendingpayment_state: balance_due- email: [email protected]- special_instructions:- created_at: '2021-10-26T11:40:31.284Z'- updated_at: '2021-10-26T11:40:31.617Z'+ email: [email protected]+ special_instructions:+ created_at: '2021-10-26T19:53:54.534Z'+ updated_at: '2021-10-26T19:53:54.846Z'currency: USD- last_ip_address:+ last_ip_address:shipment_total: '100.0'additional_tax_total: '0.0'promo_total: '0.0'channel: spreeincluded_tax_total: '0.0'item_count: 1- approved_at:+ approved_at:confirmation_delivered: false- canceled_at:+ canceled_at:state_lock_version: 0taxable_adjustment_total: '0.0'non_taxable_adjustment_total: '0.0'- store_owner_notification_delivered:+ store_owner_notification_delivered:+ display_total: "$110.00"display_outstanding_balance: "$110.00"display_item_total: "$10.00"display_tax_total: "$0.00"@@ -5984,7 +5983,6 @@ paths:display_pre_tax_total: "$110.00"display_ship_total: "$100.00"display_shipment_total: "$100.00"- display_total: "$110.00"display_total_applicable_store_credit: "$0.00"display_total_applied_store_credit: "$0.00"display_order_total_after_store_credit: "$110.00"@@ -5996,11 +5994,11 @@ paths:id: '56'type: usercreated_by:- data:+ data:approver:- data:+ data:canceler:- data:+ data:bill_address:data:id: '79'@@ -6094,34 +6092,35 @@ paths:id: '59'type: orderattributes:- number: R745310920+ number: R728881316item_total: '0.0'total: '0.0'state: cartadjustment_total: '0.0'- completed_at:+ completed_at:payment_total: '0.0'- shipment_state:- payment_state:- email: [email protected]- special_instructions:- created_at: '2021-10-26T11:40:32.131Z'- updated_at: '2021-10-26T11:40:32.312Z'+ shipment_state:+ payment_state:+ email: [email protected]+ special_instructions:+ created_at: '2021-10-26T19:53:55.283Z'+ updated_at: '2021-10-26T19:53:55.473Z'currency: USD- last_ip_address:+ last_ip_address:shipment_total: '0.0'additional_tax_total: '0.0'promo_total: '0.0'channel: spreeincluded_tax_total: '0.0'item_count: 0- approved_at:+ approved_at:confirmation_delivered: false- canceled_at:+ canceled_at:state_lock_version: 0taxable_adjustment_total: '0.0'non_taxable_adjustment_total: '0.0'- store_owner_notification_delivered:+ store_owner_notification_delivered:+ display_total: "$0.00"display_outstanding_balance: "$0.00"display_item_total: "$0.00"display_tax_total: "$0.00"@@ -6134,7 +6133,6 @@ paths:display_pre_tax_total: "$0.00"display_ship_total: "$0.00"display_shipment_total: "$0.00"- display_total: "$0.00"display_total_applicable_store_credit: "$0.00"display_total_applied_store_credit: "$0.00"display_order_total_after_store_credit: "$0.00"@@ -6146,11 +6144,11 @@ paths:id: '59'type: usercreated_by:- data:+ data:approver:- data:+ data:canceler:- data:+ data:bill_address:data:id: '85'@@ -6228,34 +6226,35 @@ paths:id: '61'type: orderattributes:- number: R723516135+ number: R425958023item_total: '10.0'total: '110.0'state: deliveryadjustment_total: '0.0'- completed_at:+ completed_at:payment_total: '0.0'- shipment_state:- payment_state:- email: [email protected]- special_instructions:- created_at: '2021-10-26T11:40:32.601Z'- updated_at: '2021-10-26T11:40:32.744Z'+ shipment_state:+ payment_state:+ email: [email protected]+ special_instructions:+ created_at: '2021-10-26T19:53:55.817Z'+ updated_at: '2021-10-26T19:53:55.939Z'currency: USD- last_ip_address:+ last_ip_address:shipment_total: '100.0'additional_tax_total: '0.0'promo_total: '0.0'channel: spreeincluded_tax_total: '0.0'item_count: 1- approved_at:+ approved_at:confirmation_delivered: false- canceled_at:+ canceled_at:state_lock_version: 0taxable_adjustment_total: '0.0'non_taxable_adjustment_total: '0.0'- store_owner_notification_delivered:+ store_owner_notification_delivered:+ display_total: "$110.00"display_outstanding_balance: "$110.00"display_item_total: "$10.00"display_tax_total: "$0.00"@@ -6268,7 +6267,6 @@ paths:display_pre_tax_total: "$10.00"display_ship_total: "$100.00"display_shipment_total: "$100.00"- display_total: "$110.00"display_total_applicable_store_credit: "$0.00"display_total_applied_store_credit: "$0.00"display_order_total_after_store_credit: "$110.00"@@ -6280,11 +6278,11 @@ paths:id: '61'type: usercreated_by:- data:+ data:approver:- data:+ data:canceler:- data:+ data:bill_address:data:id: '89'@@ -6356,7 +6354,7 @@ paths:type: stringresponses:'200':- description: record cancelled+ description: record canceledcontent:application/vnd.api+json:examples:@@ -6366,34 +6364,35 @@ paths:id: '63'type: orderattributes:- number: R131520319+ number: R581967788item_total: '10.0'total: '10.0'state: canceledadjustment_total: '0.0'- completed_at: '2021-10-26T11:40:33.204Z'+ completed_at: '2021-10-26T19:53:56.339Z'payment_total: '0.0'shipment_state: canceledpayment_state: void- email: [email protected]- special_instructions:- created_at: '2021-10-26T11:40:33.021Z'- updated_at: '2021-10-26T11:40:33.307Z'+ email: [email protected]+ special_instructions:+ created_at: '2021-10-26T19:53:56.191Z'+ updated_at: '2021-10-26T19:53:56.431Z'currency: USD- last_ip_address:+ last_ip_address:shipment_total: '0.0'additional_tax_total: '0.0'promo_total: '0.0'channel: spreeincluded_tax_total: '0.0'item_count: 1- approved_at:+ approved_at:confirmation_delivered: false- canceled_at:+ canceled_at:state_lock_version: 0taxable_adjustment_total: '0.0'non_taxable_adjustment_total: '0.0'- store_owner_notification_delivered:+ store_owner_notification_delivered:+ display_total: "$10.00"display_outstanding_balance: "$0.00"display_item_total: "$10.00"display_tax_total: "$0.00"@@ -6406,7 +6405,6 @@ paths:display_pre_tax_total: "$10.00"display_ship_total: "$0.00"display_shipment_total: "$0.00"- display_total: "$10.00"display_total_applicable_store_credit: "$0.00"display_total_applied_store_credit: "$0.00"display_order_total_after_store_credit: "$10.00"@@ -6418,11 +6416,11 @@ paths:id: '63'type: usercreated_by:- data:+ data:approver:- data:+ data:canceler:- data:+ data:bill_address:data:id: '93'@@ -6460,7 +6458,7 @@ paths:order_promotions:data: []'422':- description: cannot be cancelled+ description: cannot be canceledcontent:application/vnd.api+json:examples:@@ -6520,34 +6518,35 @@ paths:id: '66'type: orderattributes:- number: R896646380+ number: R402237614item_total: '10.0'total: '110.0'state: deliveryadjustment_total: '0.0'- completed_at:+ completed_at:payment_total: '0.0'- shipment_state:- payment_state:- email: [email protected]- special_instructions:- created_at: '2021-10-26T11:40:33.799Z'- updated_at: '2021-10-26T11:40:34.013Z'+ shipment_state:+ payment_state:+ email: [email protected]+ special_instructions:+ created_at: '2021-10-26T19:53:56.847Z'+ updated_at: '2021-10-26T19:53:57.041Z'currency: USD- last_ip_address:+ last_ip_address:shipment_total: '100.0'additional_tax_total: '0.0'promo_total: '0.0'channel: spreeincluded_tax_total: '0.0'item_count: 1- approved_at:+ approved_at:confirmation_delivered: false- canceled_at:+ canceled_at:state_lock_version: 0taxable_adjustment_total: '0.0'non_taxable_adjustment_total: '0.0'- store_owner_notification_delivered:+ store_owner_notification_delivered:+ display_total: "$110.00"display_outstanding_balance: "$110.00"display_item_total: "$10.00"display_tax_total: "$0.00"@@ -6560,7 +6559,6 @@ paths:display_pre_tax_total: "$10.00"display_ship_total: "$100.00"display_shipment_total: "$100.00"- display_total: "$110.00"display_total_applicable_store_credit: "-$15.00"display_total_applied_store_credit: "-$15.00"display_order_total_after_store_credit: "$95.00"@@ -6572,11 +6570,11 @@ paths:id: '66'type: usercreated_by:- data:+ data:approver:- data:+ data:canceler:- data:+ data:bill_address:data:id: '99'@@ -6673,34 +6671,35 @@ paths:id: '69'type: orderattributes:- number: R722594104+ number: R052375062item_total: '10.0'total: '10.0'state: deliveryadjustment_total: "-100.0"- completed_at:+ completed_at:payment_total: '0.0'- shipment_state:- payment_state:- email: [email protected]- special_instructions:- created_at: '2021-10-26T11:40:34.577Z'- updated_at: '2021-10-26T11:40:34.822Z'+ shipment_state:+ payment_state:+ email: [email protected]+ special_instructions:+ created_at: '2021-10-26T19:53:57.518Z'+ updated_at: '2021-10-26T19:53:57.712Z'currency: USD- last_ip_address:+ last_ip_address:shipment_total: '100.0'additional_tax_total: '0.0'promo_total: "-100.0"channel: spreeincluded_tax_total: '0.0'item_count: 1- approved_at:+ approved_at:confirmation_delivered: false- canceled_at:+ canceled_at:state_lock_version: 0taxable_adjustment_total: '0.0'non_taxable_adjustment_total: '0.0'- store_owner_notification_delivered:+ store_owner_notification_delivered:+ display_total: "$10.00"display_outstanding_balance: "$10.00"display_item_total: "$10.00"display_tax_total: "$0.00"@@ -6713,7 +6712,6 @@ paths:display_pre_tax_total: "$10.00"display_ship_total: "$100.00"display_shipment_total: "$100.00"- display_total: "$10.00"display_total_applicable_store_credit: "$0.00"display_total_applied_store_credit: "$0.00"display_order_total_after_store_credit: "$10.00"@@ -6725,11 +6723,11 @@ paths:id: '70'type: usercreated_by:- data:+ data:approver:- data:+ data:canceler:- data:+ data:bill_address:data:id: '105'@@ -6848,12 +6846,12 @@ paths:source_type: Spree::CreditCardstate: invalidresponse_code: '12345'- avs_response:- created_at: '2021-10-26T11:40:35.378Z'- updated_at: '2021-10-26T11:40:35.414Z'- number: P7K27YKF- cvv_response_code:- cvv_response_message:+ avs_response:+ created_at: '2021-10-26T19:53:58.194Z'+ updated_at: '2021-10-26T19:53:58.223Z'+ number: P2C7I66V+ cvv_response_code:+ cvv_response_message:display_amount: "$45.75"relationships:order:@@ -6885,12 +6883,12 @@ paths:source_type: Spree::CreditCardstate: checkoutresponse_code: '12345'- avs_response:- created_at: '2021-10-26T11:40:35.408Z'- updated_at: '2021-10-26T11:40:35.408Z'- number: PC6YUNDM- cvv_response_code:- cvv_response_message:+ avs_response:+ created_at: '2021-10-26T19:53:58.218Z'+ updated_at: '2021-10-26T19:53:58.218Z'+ number: PO5VXHY6+ cvv_response_code:+ cvv_response_message:display_amount: "$45.75"relationships:order:@@ -6969,12 +6967,12 @@ paths:source_type: Spree::CreditCardstate: checkoutresponse_code: '12345'- avs_response:- created_at: '2021-10-26T11:40:35.671Z'- updated_at: '2021-10-26T11:40:35.671Z'- number: P00GYJA0- cvv_response_code:- cvv_response_message:+ avs_response:+ created_at: '2021-10-26T19:53:58.424Z'+ updated_at: '2021-10-26T19:53:58.424Z'+ number: P1QTYCF4+ cvv_response_code:+ cvv_response_message:display_amount: "$45.75"relationships:order:@@ -7098,8 +7096,8 @@ paths:type: promotion_categoryattributes:name: Promotion Category- created_at: '2021-10-26T11:40:36.019Z'- updated_at: '2021-10-26T11:40:36.019Z'+ created_at: '2021-10-26T19:53:58.816Z'+ updated_at: '2021-10-26T19:53:58.816Z'code: POP123relationships:promotions:@@ -7108,8 +7106,8 @@ paths:type: promotion_categoryattributes:name: Promotion Category- created_at: '2021-10-26T11:40:36.021Z'- updated_at: '2021-10-26T11:40:36.021Z'+ created_at: '2021-10-26T19:53:58.818Z'+ updated_at: '2021-10-26T19:53:58.818Z'code: POP123relationships:promotions:@@ -7161,8 +7159,8 @@ paths:type: promotion_categoryattributes:name: Promotion Category- created_at: '2021-10-26T11:40:36.099Z'- updated_at: '2021-10-26T11:40:36.099Z'+ created_at: '2021-10-26T19:53:58.887Z'+ updated_at: '2021-10-26T19:53:58.887Z'code: 2021-BFMrelationships:promotions:@@ -7218,8 +7216,8 @@ paths:type: promotion_categoryattributes:name: Promotion Category- created_at: '2021-10-26T11:40:36.147Z'- updated_at: '2021-10-26T11:40:36.147Z'+ created_at: '2021-10-26T19:53:58.940Z'+ updated_at: '2021-10-26T19:53:58.940Z'code: MJOrelationships:promotions:@@ -7274,8 +7272,8 @@ paths:type: promotion_categoryattributes:name: 2021 Promotions- created_at: '2021-10-26T11:40:36.226Z'- updated_at: '2021-10-26T11:40:36.237Z'+ created_at: '2021-10-26T19:53:59.016Z'+ updated_at: '2021-10-26T19:53:59.025Z'code: 2021-Promosrelationships:promotions:@@ -7345,15 +7343,15 @@ paths:Example:value:error: The access token is invalid- "/api/v2/platform/shipping_categories":+ "/api/v2/platform/shipments":get:- summary: Return a list of Shipping Categories+ summary: Return a list of Shipmentstags:- - Shipping Categories+ - Shipmentssecurity:- bearer_auth: []- description: Returns a list of Shipping Categories- operationId: shipping-categories-list+ description: Returns a list of Shipments+ operationId: shipments-listparameters:- name: pagein: query@@ -7369,13 +7367,13 @@ paths:in: querydescription: 'Select which associated resources you would like to fetch, see:<a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'- example: cms_sections+ example: line_items,variants,productschema:type: string- - name: filter[name_i_cont]+ - name: filter[state_eq]in: querydescription: ''- example: default+ example: completeschema:type: stringresponses:@@ -7387,28 +7385,110 @@ paths:Example:value:data:- - id: '103'- type: shipping_category- attributes:- name: 'ShippingCategory #103'- created_at: '2021-10-26T11:40:36.429Z'- updated_at: '2021-10-26T11:40:36.429Z'- - id: '104'- type: shipping_category+ - id: '28'+ type: shipment+ attributes:+ tracking: U10000+ number: H96359053526+ cost: '100.0'+ shipped_at:+ state: pending+ created_at: '2021-10-26T19:53:59.198Z'+ updated_at: '2021-10-26T19:53:59.202Z'+ adjustment_total: '0.0'+ additional_tax_total: '0.0'+ promo_total: '0.0'+ included_tax_total: '0.0'+ pre_tax_amount: '0.0'+ taxable_adjustment_total: '0.0'+ non_taxable_adjustment_total: '0.0'+ display_final_price: "$100.00"+ display_amount: "$100.00"+ display_cost: "$100.00"+ display_discounted_cost: "$100.00"+ display_item_cost: "$0.00"+ relationships:+ order:+ data:+ id: '78'+ type: order+ address:+ data:+ stock_location:+ data:+ id: '130'+ type: stock_location+ adjustments:+ data: []+ inventory_units:+ data: []+ shipping_rates:+ data:+ - id: '30'+ type: shipping_rate+ state_changes:+ data: []+ selected_shipping_rate:+ data:+ id: '30'+ type: shipping_rate+ - id: '29'+ type: shipmentattributes:- name: 'ShippingCategory #104'- created_at: '2021-10-26T11:40:36.432Z'- updated_at: '2021-10-26T11:40:36.432Z'+ tracking: U10000+ number: H59091853064+ cost: '100.0'+ shipped_at:+ state: pending+ created_at: '2021-10-26T19:53:59.245Z'+ updated_at: '2021-10-26T19:53:59.250Z'+ adjustment_total: '0.0'+ additional_tax_total: '0.0'+ promo_total: '0.0'+ included_tax_total: '0.0'+ pre_tax_amount: '0.0'+ taxable_adjustment_total: '0.0'+ non_taxable_adjustment_total: '0.0'+ display_final_price: "$100.00"+ display_amount: "$100.00"+ display_cost: "$100.00"+ display_discounted_cost: "$100.00"+ display_item_cost: "$0.00"+ relationships:+ order:+ data:+ id: '79'+ type: order+ address:+ data:+ stock_location:+ data:+ id: '131'+ type: stock_location+ adjustments:+ data: []+ inventory_units:+ data: []+ shipping_rates:+ data:+ - id: '31'+ type: shipping_rate+ state_changes:+ data: []+ selected_shipping_rate:+ data:+ id: '31'+ type: shipping_ratemeta:count: 2total_count: 2total_pages: 1links:- self: http://www.example.com/api/v2/platform/shipping_categories?page=1&per_page=&include=&filter[name_i_cont]=- next: http://www.example.com/api/v2/platform/shipping_categories?filter%5Bname_i_cont%5D=&include=&page=1&per_page=- prev: http://www.example.com/api/v2/platform/shipping_categories?filter%5Bname_i_cont%5D=&include=&page=1&per_page=- last: http://www.example.com/api/v2/platform/shipping_categories?filter%5Bname_i_cont%5D=&include=&page=1&per_page=- first: http://www.example.com/api/v2/platform/shipping_categories?filter%5Bname_i_cont%5D=&include=&page=1&per_page=+ self: http://www.example.com/api/v2/platform/shipments?page=1&per_page=&include=&filter[state_eq]=+ next: http://www.example.com/api/v2/platform/shipments?filter%5Bstate_eq%5D=&include=&page=1&per_page=+ prev: http://www.example.com/api/v2/platform/shipments?filter%5Bstate_eq%5D=&include=&page=1&per_page=+ last: http://www.example.com/api/v2/platform/shipments?filter%5Bstate_eq%5D=&include=&page=1&per_page=+ first: http://www.example.com/api/v2/platform/shipments?filter%5Bstate_eq%5D=&include=&page=1&per_page='401':description: Authentication Failedcontent:@@ -7417,90 +7497,119 @@ paths:Example:value:error: The access token is invalid- post:- summary: Create a Shipping Category+ "/api/v2/platform/shipments/{id}":+ get:+ summary: Return a Shipmenttags:- - Shipping Categories+ - Shipmentssecurity:- bearer_auth: []- description: Creates a Shipping Category- operationId: create-shipping-category+ description: Returns a Shipment+ operationId: show-shipmentparameters:+ - name: id+ in: path+ required: true+ schema:+ type: string- name: includein: querydescription: 'Select which associated resources you would like to fetch, see:<a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'- example: cms_sections+ example: line_items,variants,productschema:type: stringresponses:- '201':- description: record created+ '200':+ description: Record foundcontent:application/vnd.api+json:examples:Example:value:data:- id: '107'- type: shipping_category- attributes:- name: 'ShippingCategory #107'- created_at: '2021-10-26T11:40:36.511Z'- updated_at: '2021-10-26T11:40:36.511Z'- '422':- description: invalid request+ id: '33'+ type: shipment+ attributes:+ tracking: U10000+ number: H25991999888+ cost: '100.0'+ shipped_at:+ state: pending+ created_at: '2021-10-26T19:53:59.712Z'+ updated_at: '2021-10-26T19:53:59.763Z'+ adjustment_total: '0.0'+ additional_tax_total: '0.0'+ promo_total: '0.0'+ included_tax_total: '0.0'+ pre_tax_amount: '0.0'+ taxable_adjustment_total: '0.0'+ non_taxable_adjustment_total: '0.0'+ display_final_price: "$100.00"+ display_amount: "$100.00"+ display_cost: "$100.00"+ display_discounted_cost: "$100.00"+ display_item_cost: "$10.00"+ relationships:+ order:+ data:+ id: '82'+ type: order+ address:+ data:+ stock_location:+ data:+ id: '136'+ type: stock_location+ adjustments:+ data: []+ inventory_units:+ data:+ - id: '29'+ type: inventory_unit+ shipping_rates:+ data:+ - id: '37'+ type: shipping_rate+ state_changes:+ data: []+ selected_shipping_rate:+ data:+ id: '37'+ type: shipping_rate+ '404':+ description: Record not foundcontent:application/vnd.api+json:examples:Example:value:- error: Name can't be blank- errors:- name:- - can't be blank- requestBody:- content:- application/json:- schema:- "$ref": "#/components/schemas/shipping_category_params"- "/api/v2/platform/shipping_categories/{id}":- get:- summary: Return a Shipping Category+ error: The resource you were looking for could not be found.+ '401':+ description: Authentication Failed+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: The access token is invalid+ delete:+ summary: Delete a Shipmenttags:- - Shipping Categories+ - Shipmentssecurity:- bearer_auth: []- description: Returns a Shipping Category- operationId: show-shipping-category+ description: Deletes a Shipment+ operationId: delete-shipmentparameters:- name: idin: pathrequired: trueschema:type: string- - name: include- in: query- description: 'Select which associated resources you would like to fetch, see:- <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'- example: cms_sections- schema:- type: stringresponses:- '200':- description: Record found- content:- application/vnd.api+json:- examples:- Example:- value:- data:- id: '108'- type: shipping_category- attributes:- name: 'ShippingCategory #108'- created_at: '2021-10-26T11:40:36.562Z'- updated_at: '2021-10-26T11:40:36.562Z'+ '204':+ description: Record deleted'404':description: Record not foundcontent:@@ -7517,10 +7626,672 @@ paths:Example:value:error: The access token is invalid+ "/api/v2/platform/shipments/{id}/ready":patch:- summary: Update a Shipping Category+ summary: Mark Shipment as ready to be shippedtags:- - Shipping Categories+ - Shipments+ security:+ - bearer_auth: []+ description: Marks Shipment as ready to be shipped+ operationId: ready-shipment+ parameters:+ - name: id+ in: path+ required: true+ schema:+ type: string+ - name: include+ in: query+ description: 'Select which associated resources you would like to fetch, see:+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'+ example: line_items,variants,product+ schema:+ type: string+ responses:+ '200':+ description: record updated+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ data:+ id: '41'+ type: shipment+ attributes:+ tracking: U10000+ number: H42591532645+ cost: '100.0'+ shipped_at:+ state: ready+ created_at: '2021-10-26T19:54:01.472Z'+ updated_at: '2021-10-26T19:54:01.521Z'+ adjustment_total: '0.0'+ additional_tax_total: '0.0'+ promo_total: '0.0'+ included_tax_total: '0.0'+ pre_tax_amount: '0.0'+ taxable_adjustment_total: '0.0'+ non_taxable_adjustment_total: '0.0'+ display_final_price: "$100.00"+ display_amount: "$100.00"+ display_cost: "$100.00"+ display_discounted_cost: "$100.00"+ display_item_cost: "$10.00"+ relationships:+ order:+ data:+ id: '86'+ type: order+ address:+ data:+ stock_location:+ data:+ id: '148'+ type: stock_location+ adjustments:+ data: []+ inventory_units:+ data:+ - id: '37'+ type: inventory_unit+ shipping_rates:+ data:+ - id: '53'+ type: shipping_rate+ state_changes:+ data:+ - id: '17'+ type: state_change+ selected_shipping_rate:+ data:+ id: '53'+ type: shipping_rate+ '404':+ description: Record not found+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: The resource you were looking for could not be found.+ '401':+ description: Authentication Failed+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: The access token is invalid+ "/api/v2/platform/shipments/{id}/ship":+ patch:+ summary: Mark Shipment as shipped+ tags:+ - Shipments+ security:+ - bearer_auth: []+ description: Marks Shipment as shipped+ operationId: ship-shipment+ parameters:+ - name: id+ in: path+ required: true+ schema:+ type: string+ - name: include+ in: query+ description: 'Select which associated resources you would like to fetch, see:+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'+ example: line_items,variants,product+ schema:+ type: string+ responses:+ '200':+ description: record updated+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ data:+ id: '45'+ type: shipment+ attributes:+ tracking: U10000+ number: H33937692150+ cost: '100.0'+ shipped_at: '2021-10-26T19:54:02.306Z'+ state: shipped+ created_at: '2021-10-26T19:54:02.222Z'+ updated_at: '2021-10-26T19:54:02.306Z'+ adjustment_total: '0.0'+ additional_tax_total: '0.0'+ promo_total: '0.0'+ included_tax_total: '0.0'+ pre_tax_amount: '0.0'+ taxable_adjustment_total: '0.0'+ non_taxable_adjustment_total: '0.0'+ display_final_price: "$100.00"+ display_amount: "$100.00"+ display_cost: "$100.00"+ display_discounted_cost: "$100.00"+ display_item_cost: "$10.00"+ relationships:+ order:+ data:+ id: '88'+ type: order+ address:+ data:+ stock_location:+ data:+ id: '154'+ type: stock_location+ adjustments:+ data: []+ inventory_units:+ data:+ - id: '41'+ type: inventory_unit+ shipping_rates:+ data:+ - id: '61'+ type: shipping_rate+ state_changes:+ data:+ - id: '19'+ type: state_change+ selected_shipping_rate:+ data:+ id: '61'+ type: shipping_rate+ '404':+ description: Record not found+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: The resource you were looking for could not be found.+ '401':+ description: Authentication Failed+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: The access token is invalid+ "/api/v2/platform/shipments/{id}/cancel":+ patch:+ summary: Cancels the Shipment+ tags:+ - Shipments+ security:+ - bearer_auth: []+ description: Cancels the Shipment+ operationId: cancel-shipment+ parameters:+ - name: id+ in: path+ required: true+ schema:+ type: string+ - name: include+ in: query+ description: 'Select which associated resources you would like to fetch, see:+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'+ example: line_items,variants,product+ schema:+ type: string+ responses:+ '200':+ description: record updated+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ data:+ id: '49'+ type: shipment+ attributes:+ tracking: U10000+ number: H09098425126+ cost: '100.0'+ shipped_at:+ state: canceled+ created_at: '2021-10-26T19:54:03.056Z'+ updated_at: '2021-10-26T19:54:03.107Z'+ adjustment_total: '0.0'+ additional_tax_total: '0.0'+ promo_total: '0.0'+ included_tax_total: '0.0'+ pre_tax_amount: '0.0'+ taxable_adjustment_total: '0.0'+ non_taxable_adjustment_total: '0.0'+ display_final_price: "$100.00"+ display_amount: "$100.00"+ display_cost: "$100.00"+ display_discounted_cost: "$100.00"+ display_item_cost: "$10.00"+ relationships:+ order:+ data:+ id: '90'+ type: order+ address:+ data:+ stock_location:+ data:+ id: '160'+ type: stock_location+ adjustments:+ data: []+ inventory_units:+ data:+ - id: '45'+ type: inventory_unit+ shipping_rates:+ data:+ - id: '69'+ type: shipping_rate+ state_changes:+ data:+ - id: '20'+ type: state_change+ selected_shipping_rate:+ data:+ id: '69'+ type: shipping_rate+ '404':+ description: Record not found+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: The resource you were looking for could not be found.+ '401':+ description: Authentication Failed+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: The access token is invalid+ "/api/v2/platform/shipments/{id}/resume":+ patch:+ summary: Resumes the Shipment+ tags:+ - Shipments+ security:+ - bearer_auth: []+ description: Resumes previously canceled Shipment+ operationId: resume-shipment+ parameters:+ - name: id+ in: path+ required: true+ schema:+ type: string+ - name: include+ in: query+ description: 'Select which associated resources you would like to fetch, see:+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'+ example: line_items,variants,product+ schema:+ type: string+ responses:+ '200':+ description: record updated+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ data:+ id: '53'+ type: shipment+ attributes:+ tracking: U10000+ number: H05607520051+ cost: '100.0'+ shipped_at:+ state: ready+ created_at: '2021-10-26T19:54:03.789Z'+ updated_at: '2021-10-26T19:54:03.837Z'+ adjustment_total: '0.0'+ additional_tax_total: '0.0'+ promo_total: '0.0'+ included_tax_total: '0.0'+ pre_tax_amount: '0.0'+ taxable_adjustment_total: '0.0'+ non_taxable_adjustment_total: '0.0'+ display_final_price: "$100.00"+ display_amount: "$100.00"+ display_cost: "$100.00"+ display_discounted_cost: "$100.00"+ display_item_cost: "$10.00"+ relationships:+ order:+ data:+ id: '92'+ type: order+ address:+ data:+ stock_location:+ data:+ id: '166'+ type: stock_location+ adjustments:+ data: []+ inventory_units:+ data:+ - id: '49'+ type: inventory_unit+ shipping_rates:+ data:+ - id: '77'+ type: shipping_rate+ state_changes:+ data:+ - id: '21'+ type: state_change+ selected_shipping_rate:+ data:+ id: '77'+ type: shipping_rate+ '404':+ description: Record not found+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: The resource you were looking for could not be found.+ '401':+ description: Authentication Failed+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: The access token is invalid+ "/api/v2/platform/shipments/{id}/pend":+ patch:+ summary: Moves Shipment back to pending state+ tags:+ - Shipments+ security:+ - bearer_auth: []+ description: Moves Shipment back to pending state+ operationId: pend-shipment+ parameters:+ - name: id+ in: path+ required: true+ schema:+ type: string+ - name: include+ in: query+ description: 'Select which associated resources you would like to fetch, see:+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'+ example: line_items,variants,product+ schema:+ type: string+ responses:+ '200':+ description: record updated+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ data:+ id: '57'+ type: shipment+ attributes:+ tracking: U10000+ number: H38199854804+ cost: '100.0'+ shipped_at:+ state: pending+ created_at: '2021-10-26T19:54:04.920Z'+ updated_at: '2021-10-26T19:54:04.970Z'+ adjustment_total: '0.0'+ additional_tax_total: '0.0'+ promo_total: '0.0'+ included_tax_total: '0.0'+ pre_tax_amount: '0.0'+ taxable_adjustment_total: '0.0'+ non_taxable_adjustment_total: '0.0'+ display_final_price: "$100.00"+ display_amount: "$100.00"+ display_cost: "$100.00"+ display_discounted_cost: "$100.00"+ display_item_cost: "$10.00"+ relationships:+ order:+ data:+ id: '94'+ type: order+ address:+ data:+ stock_location:+ data:+ id: '172'+ type: stock_location+ adjustments:+ data: []+ inventory_units:+ data:+ - id: '53'+ type: inventory_unit+ shipping_rates:+ data:+ - id: '85'+ type: shipping_rate+ state_changes:+ data:+ - id: '22'+ type: state_change+ selected_shipping_rate:+ data:+ id: '85'+ type: shipping_rate+ '404':+ description: Record not found+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: The resource you were looking for could not be found.+ '401':+ description: Authentication Failed+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: The access token is invalid+ "/api/v2/platform/shipping_categories":+ get:+ summary: Return a list of Shipping Categories+ tags:+ - Shipping Categories+ security:+ - bearer_auth: []+ description: Returns a list of Shipping Categories+ operationId: shipping-categories-list+ parameters:+ - name: page+ in: query+ example: 1+ schema:+ type: integer+ - name: per_page+ in: query+ example: 50+ schema:+ type: integer+ - name: include+ in: query+ description: 'Select which associated resources you would like to fetch, see:+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'+ example: cms_sections+ schema:+ type: string+ - name: filter[name_i_cont]+ in: query+ description: ''+ example: default+ schema:+ type: string+ responses:+ '200':+ description: Records returned+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ data:+ - id: '119'+ type: shipping_category+ attributes:+ name: 'ShippingCategory #119'+ created_at: '2021-10-26T19:54:05.416Z'+ updated_at: '2021-10-26T19:54:05.416Z'+ - id: '120'+ type: shipping_category+ attributes:+ name: 'ShippingCategory #120'+ created_at: '2021-10-26T19:54:05.418Z'+ updated_at: '2021-10-26T19:54:05.418Z'+ meta:+ count: 2+ total_count: 2+ total_pages: 1+ links:+ self: http://www.example.com/api/v2/platform/shipping_categories?page=1&per_page=&include=&filter[name_i_cont]=+ next: http://www.example.com/api/v2/platform/shipping_categories?filter%5Bname_i_cont%5D=&include=&page=1&per_page=+ prev: http://www.example.com/api/v2/platform/shipping_categories?filter%5Bname_i_cont%5D=&include=&page=1&per_page=+ last: http://www.example.com/api/v2/platform/shipping_categories?filter%5Bname_i_cont%5D=&include=&page=1&per_page=+ first: http://www.example.com/api/v2/platform/shipping_categories?filter%5Bname_i_cont%5D=&include=&page=1&per_page=+ '401':+ description: Authentication Failed+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: The access token is invalid+ post:+ summary: Create a Shipping Category+ tags:+ - Shipping Categories+ security:+ - bearer_auth: []+ description: Creates a Shipping Category+ operationId: create-shipping-category+ parameters:+ - name: include+ in: query+ description: 'Select which associated resources you would like to fetch, see:+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'+ example: cms_sections+ schema:+ type: string+ responses:+ '201':+ description: record created+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ data:+ id: '123'+ type: shipping_category+ attributes:+ name: 'ShippingCategory #123'+ created_at: '2021-10-26T19:54:05.497Z'+ updated_at: '2021-10-26T19:54:05.497Z'+ '422':+ description: invalid request+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: Name can't be blank+ errors:+ name:+ - can't be blank+ requestBody:+ content:+ application/json:+ schema:+ "$ref": "#/components/schemas/shipping_category_params"+ "/api/v2/platform/shipping_categories/{id}":+ get:+ summary: Return a Shipping Category+ tags:+ - Shipping Categories+ security:+ - bearer_auth: []+ description: Returns a Shipping Category+ operationId: show-shipping-category+ parameters:+ - name: id+ in: path+ required: true+ schema:+ type: string+ - name: include+ in: query+ description: 'Select which associated resources you would like to fetch, see:+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'+ example: cms_sections+ schema:+ type: string+ responses:+ '200':+ description: Record found+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ data:+ id: '124'+ type: shipping_category+ attributes:+ name: 'ShippingCategory #124'+ created_at: '2021-10-26T19:54:05.549Z'+ updated_at: '2021-10-26T19:54:05.549Z'+ '404':+ description: Record not found+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: The resource you were looking for could not be found.+ '401':+ description: Authentication Failed+ content:+ application/vnd.api+json:+ examples:+ Example:+ value:+ error: The access token is invalid+ patch:+ summary: Update a Shipping Category+ tags:+ - Shipping Categoriessecurity:- bearer_auth: []description: Updates a Shipping Category@@ -7547,12 +8318,12 @@ paths:Example:value:data:- id: '110'+ id: '126'type: shipping_categoryattributes:name: Default- created_at: '2021-10-26T11:40:36.646Z'- updated_at: '2021-10-26T11:40:36.660Z'+ created_at: '2021-10-26T19:54:05.635Z'+ updated_at: '2021-10-26T19:54:05.646Z''422':description: invalid requestcontent:@@ -7666,41 +8437,6 @@ paths:Example:value:data:- - id: '32'- type: taxon- attributes:- position: 0- name: taxon_16- permalink: taxonomy-16/taxon-16- lft: 2- rgt: 3- description:- created_at: '2021-10-26T11:40:36.908Z'- updated_at: '2021-10-26T11:40:36.914Z'- meta_title:- meta_description:- meta_keywords:- depth: 1- pretty_name: taxonomy_16 -> taxon_16- seo_title: taxon_16- is_root: false- is_child: true- is_leaf: true- relationships:- parent:- data:- id: '31'- type: taxon- taxonomy:- data:- id: '16'- type: taxonomy- children:- data: []- image:- data:- id: '92'- type: taxon_image- id: '33'type: taxonattributes:@@ -7709,12 +8445,12 @@ paths:permalink: taxonomy-16/taxon-17lft: 4rgt: 5- description:- created_at: '2021-10-26T11:40:36.961Z'- updated_at: '2021-10-26T11:40:36.966Z'- meta_title:- meta_description:- meta_keywords:+ description:+ created_at: '2021-10-26T19:54:06.051Z'+ updated_at: '2021-10-26T19:54:06.059Z'+ meta_title:+ meta_description:+ meta_keywords:depth: 1pretty_name: taxonomy_16 -> taxon_17seo_title: taxon_17@@ -7744,12 +8480,12 @@ paths:permalink: taxonomy-16lft: 1rgt: 6- description:- created_at: '2021-10-26T11:40:36.859Z'- updated_at: '2021-10-26T11:40:36.980Z'- meta_title:- meta_description:- meta_keywords:+ description:+ created_at: '2021-10-26T19:54:05.832Z'+ updated_at: '2021-10-26T19:54:06.081Z'+ meta_title:+ meta_description:+ meta_keywords:depth: 0pretty_name: taxonomy_16seo_title: taxonomy_16@@ -7758,7 +8494,7 @@ paths:is_leaf: falserelationships:parent:- data:+ data:taxonomy:data:id: '16'@@ -7770,7 +8506,42 @@ paths:- id: '33'type: taxonimage:- data:+ data:+ - id: '32'+ type: taxon+ attributes:+ position: 0+ name: taxon_16+ permalink: taxonomy-16/taxon-16+ lft: 2+ rgt: 3+ description:+ created_at: '2021-10-26T19:54:05.941Z'+ updated_at: '2021-10-26T19:54:05.947Z'+ meta_title:+ meta_description:+ meta_keywords:+ depth: 1+ pretty_name: taxonomy_16 -> taxon_16+ seo_title: taxon_16+ is_root: false+ is_child: true+ is_leaf: true+ relationships:+ parent:+ data:+ id: '31'+ type: taxon+ taxonomy:+ data:+ id: '16'+ type: taxonomy+ children:+ data: []+ image:+ data:+ id: '92'+ type: taxon_imagemeta:count: 3total_count: 3@@ -7822,12 +8593,12 @@ paths:permalink: taxonomy-18/taxon-20lft: 2rgt: 3- description:- created_at: '2021-10-26T11:40:37.230Z'- updated_at: '2021-10-26T11:40:37.237Z'- meta_title:- meta_description:- meta_keywords:+ description:+ created_at: '2021-10-26T19:54:06.599Z'+ updated_at: '2021-10-26T19:54:06.609Z'+ meta_title:+ meta_description:+ meta_keywords:depth: 1pretty_name: taxonomy_18 -> taxon_20seo_title: taxon_20@@ -7846,7 +8617,7 @@ paths:children:data: []image:- data:+ data:'422':description: invalid requestcontent:@@ -7904,12 +8675,12 @@ paths:permalink: taxonomy-19/taxon-21lft: 2rgt: 3- description:- created_at: '2021-10-26T11:40:37.359Z'- updated_at: '2021-10-26T11:40:37.364Z'- meta_title:- meta_description:- meta_keywords:+ description:+ created_at: '2021-10-26T19:54:06.803Z'+ updated_at: '2021-10-26T19:54:06.811Z'+ meta_title:+ meta_description:+ meta_keywords:depth: 1pretty_name: taxonomy_19 -> taxon_21seo_title: taxon_21@@ -7987,12 +8758,12 @@ paths:permalink: taxonomy-21/taxon-23lft: 2rgt: 3- description:- created_at: '2021-10-26T11:40:37.599Z'- updated_at: '2021-10-26T11:40:37.636Z'- meta_title:- meta_description:- meta_keywords:+ description:+ created_at: '2021-10-26T19:54:07.204Z'+ updated_at: '2021-10-26T19:54:07.249Z'+ meta_title:+ meta_description:+ meta_keywords:depth: 1pretty_name: taxonomy_21 -> T-Shirtsseo_title: T-Shirts@@ -8127,48 +8898,48 @@ paths:Example:value:data:- - id: '79'+ - id: '97'type: userattributes:- email: [email protected]- created_at: '2021-10-26T11:40:38.163Z'- updated_at: '2021-10-26T11:40:38.163Z'+ email: [email protected]+ created_at: '2021-10-26T19:54:08.130Z'+ updated_at: '2021-10-26T19:54:08.130Z'average_order_value: []lifetime_value: []store_credits: []relationships:bill_address:- data:+ data:ship_address:- data:- - id: '80'+ data:+ - id: '98'type: userattributes:- email: [email protected]- created_at: '2021-10-26T11:40:38.174Z'- updated_at: '2021-10-26T11:40:38.174Z'+ email: [email protected]+ created_at: '2021-10-26T19:54:08.142Z'+ updated_at: '2021-10-26T19:54:08.142Z'average_order_value: []lifetime_value: []store_credits: []relationships:bill_address:- data:+ data:ship_address:- data:- - id: '81'+ data:+ - id: '99'type: userattributes:- email: [email protected]- created_at: '2021-10-26T11:40:38.177Z'- updated_at: '2021-10-26T11:40:38.177Z'+ email: [email protected]+ created_at: '2021-10-26T19:54:08.146Z'+ updated_at: '2021-10-26T19:54:08.146Z'average_order_value: []lifetime_value: []store_credits: []relationships:bill_address:- data:+ data:ship_address:- data:+ data:meta:count: 3total_count: 3@@ -8212,20 +8983,20 @@ paths:Example:value:data:- id: '86'+ id: '104'type: userattributes:- email: [email protected]- created_at: '2021-10-26T11:40:38.282Z'- updated_at: '2021-10-26T11:40:38.282Z'+ email: [email protected]+ created_at: '2021-10-26T19:54:08.278Z'+ updated_at: '2021-10-26T19:54:08.278Z'average_order_value: []lifetime_value: []store_credits: []relationships:bill_address:- data:+ data:ship_address:- data:+ data:'422':description: invalid requestcontent:@@ -8273,20 +9044,20 @@ paths:Example:value:data:- id: '89'+ id: '107'type: userattributes:- email: [email protected]- created_at: '2021-10-26T11:40:38.364Z'- updated_at: '2021-10-26T11:40:38.364Z'+ email: [email protected]+ created_at: '2021-10-26T19:54:08.367Z'+ updated_at: '2021-10-26T19:54:08.367Z'average_order_value: []lifetime_value: []store_credits: []relationships:bill_address:- data:+ data:ship_address:- data:+ data:'404':description: Record not foundcontent:@@ -8333,20 +9104,20 @@ paths:Example:value:data:- id: '94'+ id: '112'type: userattributes:email: [email protected]- created_at: '2021-10-26T11:40:38.481Z'- updated_at: '2021-10-26T11:40:38.494Z'+ created_at: '2021-10-26T19:54:08.499Z'+ updated_at: '2021-10-26T19:54:08.515Z'average_order_value: []lifetime_value: []store_credits: []relationships:bill_address:- data:+ data:ship_address:- data:+ data:'422':description: invalid requestcontent:@@ -8460,25 +9231,25 @@ paths:Example:value:data:- - id: '237'+ - id: '251'type: variantattributes:- sku: SKU-237+ sku: SKU-251weight: '0.0'- height:- depth:- deleted_at:+ height:+ depth:+ deleted_at:is_master: truecost_price: '17.0'position: 1cost_currency: USDtrack_inventory: true- updated_at: '2021-10-26T11:40:38.810Z'- discontinue_on:- created_at: '2021-10-26T11:40:38.801Z'- display_compare_at_price:+ updated_at: '2021-10-26T19:54:09.026Z'+ discontinue_on:+ created_at: '2021-10-26T19:54:09.015Z'display_price: "$19.99"- name: 'Product #170 - 8044'+ display_compare_at_price:+ name: 'Product #184 - 9258'options_text: ''total_on_hand: 0purchasable: true@@ -8487,14 +9258,14 @@ paths:available: truecurrency: USDprice: '19.99'- compare_at_price:+ compare_at_price:relationships:product:data:- id: '170'+ id: '184'type: producttax_category:- data:+ data:digitals:data: []images:@@ -8503,31 +9274,31 @@ paths:data: []stock_items:data:- - id: '264'+ - id: '306'type: stock_itemstock_locations:data:- - id: '130'+ - id: '176'type: stock_location- - id: '238'+ - id: '252'type: variantattributes:- sku: SKU-238- weight: '179.32'- height: '145.53'- depth: '86.31'- deleted_at:+ sku: SKU-252+ weight: '197.25'+ height: '142.68'+ depth: '132.22'+ deleted_at:is_master: falsecost_price: '17.0'position: 2cost_currency: USDtrack_inventory: true- updated_at: '2021-10-26T11:40:38.856Z'- discontinue_on:- created_at: '2021-10-26T11:40:38.847Z'- display_compare_at_price:+ updated_at: '2021-10-26T19:54:09.075Z'+ discontinue_on:+ created_at: '2021-10-26T19:54:09.062Z'display_price: "$19.99"- name: 'Product #170 - 8044'+ display_compare_at_price:+ name: 'Product #184 - 9258'options_text: 'Size: S'total_on_hand: 0purchasable: true@@ -8536,14 +9307,14 @@ paths:available: truecurrency: USDprice: '19.99'- compare_at_price:+ compare_at_price:relationships:product:data:- id: '170'+ id: '184'type: producttax_category:- data:+ data:digitals:data: []images:@@ -8554,31 +9325,31 @@ paths:type: option_valuestock_items:data:- - id: '265'+ - id: '307'type: stock_itemstock_locations:data:- - id: '130'+ - id: '176'type: stock_location- - id: '239'+ - id: '253'type: variantattributes:- sku: SKU-239- weight: '20.8'- height: '30.39'- depth: '18.59'- deleted_at:+ sku: SKU-253+ weight: '90.77'+ height: '187.25'+ depth: '104.58'+ deleted_at:is_master: falsecost_price: '17.0'position: 3cost_currency: USDtrack_inventory: true- updated_at: '2021-10-26T11:40:38.890Z'- discontinue_on:- created_at: '2021-10-26T11:40:38.880Z'- display_compare_at_price:+ updated_at: '2021-10-26T19:54:09.107Z'+ discontinue_on:+ created_at: '2021-10-26T19:54:09.096Z'display_price: "$19.99"- name: 'Product #170 - 8044'+ display_compare_at_price:+ name: 'Product #184 - 9258'options_text: 'Size: S'total_on_hand: 0purchasable: true@@ -8587,14 +9358,14 @@ paths:available: truecurrency: USDprice: '19.99'- compare_at_price:+ compare_at_price:relationships:product:data:- id: '170'+ id: '184'type: producttax_category:- data:+ data:digitals:data: []images:@@ -8605,11 +9376,11 @@ paths:type: option_valuestock_items:data:- - id: '266'+ - id: '308'type: stock_itemstock_locations:data:- - id: '130'+ - id: '176'type: stock_locationmeta:count: 3@@ -8660,25 +9431,25 @@ paths:Example:value:data:- id: '244'+ id: '258'type: variantattributes:- sku: SKU-244- weight: '129.62'- height: '21.9'- depth: '196.93'- deleted_at:+ sku: SKU-258+ weight: '28.82'+ height: '21.23'+ depth: '8.95'+ deleted_at:is_master: falsecost_price: '17.0'position: 2cost_currency: USDtrack_inventory: true- updated_at: '2021-10-26T11:40:39.264Z'- discontinue_on:- created_at: '2021-10-26T11:40:39.252Z'- display_compare_at_price:+ updated_at: '2021-10-26T19:54:09.457Z'+ discontinue_on:+ created_at: '2021-10-26T19:54:09.442Z'display_price: "$19.99"- name: 'Product #172 - 510'+ display_compare_at_price:+ name: 'Product #186 - 8601'options_text: 'Size: S'total_on_hand: 0purchasable: true@@ -8687,14 +9458,14 @@ paths:available: truecurrency: USDprice: '19.99'- compare_at_price:+ compare_at_price:relationships:product:data:- id: '172'+ id: '186'type: producttax_category:- data:+ data:digitals:data: []images:@@ -8705,11 +9476,11 @@ paths:type: option_valuestock_items:data:- - id: '271'+ - id: '313'type: stock_itemstock_locations:data:- - id: '132'+ - id: '178'type: stock_location'404':description: Record not found@@ -8796,8 +9567,8 @@ paths:active: truesubscriptions:- "*"- created_at: '2021-10-26T11:40:39.814Z'- updated_at: '2021-10-26T11:40:39.814Z'+ created_at: '2021-10-26T19:54:09.989Z'+ updated_at: '2021-10-26T19:54:09.989Z'- id: '2'type: subscriberattributes:@@ -8805,8 +9576,8 @@ paths:active: truesubscriptions:- "*"- created_at: '2021-10-26T11:40:39.816Z'- updated_at: '2021-10-26T11:40:39.816Z'+ created_at: '2021-10-26T19:54:09.992Z'+ updated_at: '2021-10-26T19:54:09.992Z'meta:count: 2total_count: 2@@ -8850,8 +9621,8 @@ paths:active: truesubscriptions:- "*"- created_at: '2021-10-26T11:40:39.892Z'- updated_at: '2021-10-26T11:40:39.892Z'+ created_at: '2021-10-26T19:54:10.064Z'+ updated_at: '2021-10-26T19:54:10.064Z''422':description: invalid requestcontent:@@ -8902,8 +9673,8 @@ paths:active: truesubscriptions:- "*"- created_at: '2021-10-26T11:40:39.941Z'- updated_at: '2021-10-26T11:40:39.941Z'+ created_at: '2021-10-26T19:54:10.118Z'+ updated_at: '2021-10-26T19:54:10.118Z''404':description: Record not foundcontent:@@ -8950,8 +9721,8 @@ paths:active: truesubscriptions:- "*"- created_at: '2021-10-26T11:40:40.028Z'- updated_at: '2021-10-26T11:40:40.028Z'+ created_at: '2021-10-26T19:54:10.196Z'+ updated_at: '2021-10-26T19:54:10.196Z''422':description: invalid requestcontent:@@ -9060,8 +9831,8 @@ paths:type: wished_itemattributes:quantity: 1- created_at: '2021-10-26T11:40:40.430Z'- updated_at: '2021-10-26T11:40:40.430Z'+ created_at: '2021-10-26T19:54:10.616Z'+ updated_at: '2021-10-26T19:54:10.616Z'display_price: "$19.99"display_total: "$19.99"price: '19.99'@@ -9069,14 +9840,14 @@ paths:relationships:variant:data:- id: '254'+ id: '268'type: variant- id: '2'type: wished_itemattributes:quantity: 1- created_at: '2021-10-26T11:40:40.513Z'- updated_at: '2021-10-26T11:40:40.513Z'+ created_at: '2021-10-26T19:54:10.698Z'+ updated_at: '2021-10-26T19:54:10.698Z'display_price: "$19.99"display_total: "$19.99"price: '19.99'@@ -9084,14 +9855,14 @@ paths:relationships:variant:data:- id: '256'+ id: '270'type: variant- id: '3'type: wished_itemattributes:quantity: 1- created_at: '2021-10-26T11:40:40.596Z'- updated_at: '2021-10-26T11:40:40.596Z'+ created_at: '2021-10-26T19:54:10.775Z'+ updated_at: '2021-10-26T19:54:10.775Z'display_price: "$19.99"display_total: "$19.99"price: '19.99'@@ -9099,14 +9870,14 @@ paths:relationships:variant:data:- id: '258'+ id: '272'type: variant- id: '4'type: wished_itemattributes:quantity: 1- created_at: '2021-10-26T11:40:40.680Z'- updated_at: '2021-10-26T11:40:40.680Z'+ created_at: '2021-10-26T19:54:10.844Z'+ updated_at: '2021-10-26T19:54:10.844Z'display_price: "$19.99"display_total: "$19.99"price: '19.99'@@ -9114,7 +9885,7 @@ paths:relationships:variant:data:- id: '260'+ id: '274'type: variantmeta:count: 4@@ -9163,8 +9934,8 @@ paths:type: wished_itemattributes:quantity: 1- created_at: '2021-10-26T11:40:41.482Z'- updated_at: '2021-10-26T11:40:41.482Z'+ created_at: '2021-10-26T19:54:11.530Z'+ updated_at: '2021-10-26T19:54:11.530Z'display_price: "$19.99"display_total: "$19.99"price: '19.99'@@ -9172,7 +9943,7 @@ paths:relationships:variant:data:- id: '272'+ id: '286'type: variant'422':description: invalid request@@ -9230,8 +10001,8 @@ paths:type: wished_itemattributes:quantity: 1- created_at: '2021-10-26T11:40:41.851Z'- updated_at: '2021-10-26T11:40:41.851Z'+ created_at: '2021-10-26T19:54:11.853Z'+ updated_at: '2021-10-26T19:54:11.853Z'display_price: "$19.99"display_total: "$19.99"price: '19.99'@@ -9239,7 +10010,7 @@ paths:relationships:variant:data:- id: '278'+ id: '292'type: variant'404':description: Record not found@@ -9291,8 +10062,8 @@ paths:type: wished_itemattributes:quantity: 3- created_at: '2021-10-26T11:40:42.468Z'- updated_at: '2021-10-26T11:40:42.482Z'+ created_at: '2021-10-26T19:54:12.345Z'+ updated_at: '2021-10-26T19:54:12.356Z'display_price: "$19.99"display_total: "$59.97"price: '19.99'@@ -9300,7 +10071,7 @@ paths:relationships:variant:data:- id: '288'+ id: '302'type: variant'422':description: invalid request@@ -9415,9 +10186,9 @@ paths:name: Black Fridayis_private: trueis_default: false- created_at: '2021-10-26T11:40:43.709Z'- updated_at: '2021-10-26T11:40:43.709Z'- token: txAyvFQmdf5tqtBc7EXuyHGB+ created_at: '2021-10-26T19:54:13.392Z'+ updated_at: '2021-10-26T19:54:13.392Z'+ token: i5kxfuE6tEswuagL1hhWXGi4variant_included: falserelationships:wished_items:@@ -9432,9 +10203,9 @@ paths:name: Birthdayis_private: trueis_default: false- created_at: '2021-10-26T11:40:43.712Z'- updated_at: '2021-10-26T11:40:43.712Z'- token: wdDa984j8EDhd32bNhrpZAAa+ created_at: '2021-10-26T19:54:13.394Z'+ updated_at: '2021-10-26T19:54:13.394Z'+ token: 7M95SfoRX3Tj7CDDwa7Qr32qvariant_included: falserelationships:wished_items:@@ -9492,9 +10263,9 @@ paths:name: Wishlist_26is_private: trueis_default: false- created_at: '2021-10-26T11:40:44.551Z'- updated_at: '2021-10-26T11:40:44.551Z'- token: nRQzrnqLFVuQsmcYY4FSH9wj+ created_at: '2021-10-26T19:54:14.084Z'+ updated_at: '2021-10-26T19:54:14.084Z'+ token: k2HyjDiJnJYWrW56g9Ci4Capvariant_included: falserelationships:wished_items:@@ -9554,9 +10325,9 @@ paths:name: My Wishlistis_private: trueis_default: false- created_at: '2021-10-26T11:40:44.616Z'- updated_at: '2021-10-26T11:40:44.616Z'- token: a4ye7RJtz1jupvaTmNqMvi9T+ created_at: '2021-10-26T19:54:14.136Z'+ updated_at: '2021-10-26T19:54:14.136Z'+ token: uuypoUv7LFFc7rd1YtRFggCFvariant_included: falserelationships:wished_items:@@ -9613,9 +10384,9 @@ paths:name: My Super Wishlistis_private: trueis_default: false- created_at: '2021-10-26T11:40:44.721Z'- updated_at: '2021-10-26T11:40:44.735Z'- token: Pa6ig9qrycZFFXHwfrVjfMJ8+ created_at: '2021-10-26T19:54:14.222Z'+ updated_at: '2021-10-26T19:54:14.233Z'+ token: aM5hCvdnDEXBisuFxVCfobYnvariant_included: falserelationships:wished_items:@@ -9707,10 +10478,11 @@ tags:- name: Orders- name: Payments- name: Promotion Categories+- name: Shipments- name: Shipping Categories- name: Taxons- name: Users-- name: Webhooks Subscribers+- name: Webhook Subscribers- name: Wishlists- name: Wished Items- name: Variants@@ -9777,7 +10549,7 @@ components:properties:order_id:type: string- lebal:+ label:type: stringexample: Shipping costsadjustable_id:@@ -9870,7 +10642,7 @@ components:- name- presentationx-internal: true- webhooks_subscriber_params:+ webhook_subscriber_params:type: objectproperties:active:@@ -9917,7 +10689,7 @@ components:completed_at:type: stringformat: date_time- example: 2021-10-26 11:39:57 UTC+ example: 2021-10-26 19:53:14 UTCbill_address_id:type: stringexample: '1'@@ -9985,7 +10757,7 @@ components:approved_at:type: stringformat: date_time- example: 2021-10-26 11:39:57 UTC+ example: 2021-10-26 19:53:14 UTCconfirmation_delivered:type: booleanexample: truediff --git a/api/lib/spree/api/api_dependencies.rb b/api/lib/spree/api/api_dependencies.rbindex 2abaabce9f..4252a6a723 100644--- a/api/lib/spree/api/api_dependencies.rb+++ b/api/lib/spree/api/api_dependencies.rb@@ -27,7 +27,8 @@ module Spree:platform_order_complete_service, :platform_order_empty_service, :platform_order_destroy_service,:platform_order_next_service, :platform_order_advance_service,:platform_line_item_create_service, :platform_line_item_update_service, :platform_line_item_destroy_service,- :platform_order_approve_service, :platform_order_cancel_service+ :platform_order_approve_service, :platform_order_cancel_service,+ :platform_shipment_change_state_service, :platform_shipment_update_service].freezeattr_accessor *INJECTION_POINTS@@ -140,6 +141,10 @@ module Spree@platform_line_item_create_service = Spree::Dependencies.line_item_create_service@platform_line_item_update_service = Spree::Dependencies.line_item_update_service@platform_line_item_destroy_service = Spree::Dependencies.line_item_destroy_service++ # shipment services+ @platform_shipment_update_service = Spree::Dependencies.shipment_update_service+ @platform_shipment_change_state_service = Spree::Dependencies.shipment_change_state_serviceendendenddiff --git a/api/spec/integration/api/v2/platform/shipments_spec.rb b/api/spec/integration/api/v2/platform/shipments_spec.rbnew file mode 100644index 0000000000..be86463d1f--- /dev/null+++ b/api/spec/integration/api/v2/platform/shipments_spec.rb@@ -0,0 +1,136 @@+require 'swagger_helper'++describe 'Shipments API', swagger: true do+ include_context 'Platform API v2'++ resource_name = 'Shipment'+ resource_path = 'shipments'+ options = {+ include_example: 'line_items,variants,product',+ filter_examples: [{ name: 'filter[state_eq]', example: 'complete' }]+ }++ let(:order) { create(:order_ready_to_ship) }+ let(:id) { create(:shipment, order: order).id }+ let(:records_list) { create_list(:shipment, 2) }+ let(:store) { Spree::Store.default }+ let(:valid_create_param_value) do+ {++ }+ end+ let(:valid_update_param_value) do+ {+ }+ end+ let(:invalid_param_value) do+ {+ }+ end++ path "/api/v2/platform/#{resource_path}" do+ include_examples 'GET records list', resource_name, options+ end++ path "/api/v2/platform/#{resource_path}/{id}" do+ include_examples 'GET record', resource_name, options+ # include_examples 'PATCH update record', resource_name, options+ include_examples 'DELETE record', resource_name+ end++ path "/api/v2/platform/#{resource_path}/{id}/ready" do+ patch "Mark Shipment as ready to be shipped" do+ tags resource_name.pluralize+ security [ bearer_auth: [] ]+ description "Marks Shipment as ready to be shipped"+ operationId "ready-shipment"+ consumes 'application/json'+ parameter name: :id, in: :path, type: :string+ json_api_include_parameter(options[:include_example])++ response '200', 'record updated' do+ run_test!+ end+ it_behaves_like 'record not found'+ it_behaves_like 'authentication failed'+ end+ end++ path "/api/v2/platform/#{resource_path}/{id}/ship" do+ let(:id) { create(:shipment, order: order, state: :ready).id }++ patch "Mark Shipment as shipped" do+ tags resource_name.pluralize+ security [ bearer_auth: [] ]+ description "Marks Shipment as shipped"+ operationId "ship-shipment"+ consumes 'application/json'+ parameter name: :id, in: :path, type: :string+ json_api_include_parameter(options[:include_example])++ response '200', 'record updated' do+ run_test!+ end+ it_behaves_like 'record not found'+ it_behaves_like 'authentication failed'+ end+ end++ path "/api/v2/platform/#{resource_path}/{id}/cancel" do+ patch "Cancels the Shipment" do+ tags resource_name.pluralize+ security [ bearer_auth: [] ]+ description "Cancels the Shipment"+ operationId "cancel-shipment"+ consumes 'application/json'+ parameter name: :id, in: :path, type: :string+ json_api_include_parameter(options[:include_example])++ response '200', 'record updated' do+ run_test!+ end+ it_behaves_like 'record not found'+ it_behaves_like 'authentication failed'+ end+ end++ path "/api/v2/platform/#{resource_path}/{id}/resume" do+ let(:id) { create(:shipment, order: order, state: :canceled).id }++ patch "Resumes the Shipment" do+ tags resource_name.pluralize+ security [ bearer_auth: [] ]+ description "Resumes previously canceled Shipment"+ operationId "resume-shipment"+ consumes 'application/json'+ parameter name: :id, in: :path, type: :string+ json_api_include_parameter(options[:include_example])++ response '200', 'record updated' do+ run_test!+ end+ it_behaves_like 'record not found'+ it_behaves_like 'authentication failed'+ end+ end++ path "/api/v2/platform/#{resource_path}/{id}/pend" do+ let(:id) { create(:shipment, order: order, state: :ready).id }++ patch "Moves Shipment back to pending state" do+ tags resource_name.pluralize+ security [ bearer_auth: [] ]+ description "Moves Shipment back to pending state"+ operationId "pend-shipment"+ consumes 'application/json'+ parameter name: :id, in: :path, type: :string+ json_api_include_parameter(options[:include_example])++ response '200', 'record updated' do+ run_test!+ end+ it_behaves_like 'record not found'+ it_behaves_like 'authentication failed'+ end+ end+enddiff --git a/api/spec/swagger_helper.rb b/api/spec/swagger_helper.rbindex 02e904f2e6..6a8df0062e 100644--- a/api/spec/swagger_helper.rb+++ b/api/spec/swagger_helper.rb@@ -56,10 +56,11 @@ RSpec.configure do |config|{ name: 'Orders' },{ name: 'Payments' },{ name: 'Promotion Categories' },+ { name: 'Shipments' },{ name: 'Shipping Categories' },{ name: 'Taxons' },{ name: 'Users' },- { name: 'Webhooks Subscribers' },+ { name: 'Webhook Subscribers' },{ name: 'Wishlists' },{ name: 'Wished Items' },{ name: 'Variants' }@@ -148,7 +149,7 @@ RSpec.configure do |config|required: %w[name presentation],'x-internal': true},- webhooks_subscriber_params: {+ webhook_subscriber_params: {type: :object,properties: {active: { type: :boolean, example: true, default: false },diff --git a/core/app/models/spree/shipment.rb b/core/app/models/spree/shipment.rbindex 97cd0312f6..a99bbde8a2 100644--- a/core/app/models/spree/shipment.rb+++ b/core/app/models/spree/shipment.rb@@ -302,34 +302,8 @@ module Spreeendend- # Update Shipment and make sure Order states follow the shipment changesdef update_attributes_and_order(params = {})- if update params- if params.key? :selected_shipping_rate_id- # Changing the selected Shipping Rate won't update the cost (for now)- # so we persist the Shipment#cost before calculating order shipment- # total and updating payment state (given a change in shipment cost- # might change the Order#payment_state)- update_amounts-- order.updater.update_shipment_total- order.updater.update_payment_state-- # Update shipment state only after order total is updated because it- # (via Order#paid?) affects the shipment state (YAY)- update_columns(- state: determine_state(order),- updated_at: Time.current- )-- # And then it's time to update shipment states and finally persist- # order changes- order.updater.update_shipment_state- order.updater.persist_totals- end-- true- end+ Shipments::Update.call(shipment: self, shipment_attributes: params).success?end# Updates various aspects of the Shipment while bypassing any callbacks. Note that this method takes an explicit reference to thediff --git a/core/app/services/spree/shipments/change_state.rb b/core/app/services/spree/shipments/change_state.rbnew file mode 100644index 0000000000..dd8b9c3137--- /dev/null+++ b/core/app/services/spree/shipments/change_state.rb@@ -0,0 +1,14 @@+module Spree+ module Shipments+ class ChangeState+ prepend Spree::ServiceModule::Base++ def call(shipment:, state:)+ shipment.send("#{state}!")+ success(shipment.reload)+ rescue ActiveRecord::Rollback, ActiveRecord::RecordInvalid, StateMachines::InvalidTransition+ failure(shipment)+ end+ end+ end+enddiff --git a/core/app/services/spree/shipments/update.rb b/core/app/services/spree/shipments/update.rbnew file mode 100644index 0000000000..b7787afc56--- /dev/null+++ b/core/app/services/spree/shipments/update.rb@@ -0,0 +1,40 @@+# Update Shipment and make sure Order states follow the shipment changes+module Spree+ module Shipments+ class Update+ prepend Spree::ServiceModule::Base++ def call(shipment:, shipment_attributes: {})+ ActiveRecord::Base.transaction do+ return failure(shipment) unless shipment.update(shipment_attributes)++ if shipment_attributes.key?(:selected_shipping_rate_id)+ order = shipment.order++ # Changing the selected Shipping Rate won't update the cost (for now)+ # so we persist the Shipment#cost before calculating order shipment+ # total and updating payment state (given a change in shipment cost+ # might change the Order#payment_state)+ shipment.update_amounts++ order.updater.update_shipment_total+ order.updater.update_payment_state++ # Update shipment state only after order total is updated because it+ # (via Order#paid?) affects the shipment state (YAY)+ shipment.update_columns(+ state: shipment.determine_state(order),+ updated_at: Time.current+ )++ # And then it's time to update shipment states and finally persist+ # order changes+ order.updater.update_shipment_state+ order.updater.persist_totals+ end+ end+ success(shipment)+ end+ end+ end+enddiff --git a/core/lib/spree/core/app_dependencies.rb b/core/lib/spree/core/app_dependencies.rbindex 3a3b0beb43..5c21d4a96d 100644--- a/core/lib/spree/core/app_dependencies.rb+++ b/core/lib/spree/core/app_dependencies.rb@@ -15,7 +15,7 @@ module Spree:address_finder, :collection_sorter, :error_handler, :current_store_finder, :cart_empty_service, :cart_destroy_service,:classification_reposition_service, :credit_cards_destroy_service, :cart_associate_service, :cart_change_currency_service,:line_item_create_service, :line_item_update_service, :line_item_destroy_service,- :order_approve_service, :order_cancel_service+ :order_approve_service, :order_cancel_service, :shipment_change_state_service, :shipment_update_service].freezeattr_accessor *INJECTION_POINTS@@ -61,6 +61,10 @@ module Spree@order_approve_service = 'Spree::Orders::Approve'@order_cancel_service = 'Spree::Orders::Cancel'+ # shipment+ @shipment_change_state_service = 'Spree::Shipments::ChangeState'+ @shipment_update_service = 'Spree::Shipments::Update'+# sorter@collection_sorter = 'Spree::BaseSorter'@order_sorter = 'Spree::BaseSorter'