diff --git a/api/app/controllers/spree/api/v2/platform/variants_controller.rb b/api/app/controllers/spree/api/v2/platform/variants_controller.rb
new file mode 100644
index 00000000000..0f739115638
--- /dev/null
+++ b/api/app/controllers/spree/api/v2/platform/variants_controller.rb
@@ -0,0 +1,19 @@
+module Spree
+ module Api
+ module V2
+ module Platform
+ class VariantsController < ResourceController
+ private
+
+ def model_class
+ Spree::Variant
+ end
+
+ def spree_permitted_attributes
+ Spree::Order.json_api_permitted_attributes + [:option_value_ids, :price, :currency]
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/api/docs/v2/platform/index.yaml b/api/docs/v2/platform/index.yaml
index bb175cf33ab..ad0ae68e316 100644
--- a/api/docs/v2/platform/index.yaml
+++ b/api/docs/v2/platform/index.yaml
@@ -69,8 +69,8 @@ paths:
state_name:
alternative_phone: 555-555-0199
company: Company
- created_at: '2021-10-13T17:20:37.275Z'
- updated_at: '2021-10-13T17:20:37.275Z'
+ created_at: '2021-10-20T13:33:10.849Z'
+ updated_at: '2021-10-20T13:33:10.849Z'
deleted_at:
label:
relationships:
@@ -97,8 +97,8 @@ paths:
state_name:
alternative_phone: 555-555-0199
company: Company
- created_at: '2021-10-13T17:20:37.279Z'
- updated_at: '2021-10-13T17:20:37.279Z'
+ created_at: '2021-10-20T13:33:10.854Z'
+ updated_at: '2021-10-20T13:33:10.854Z'
deleted_at:
label:
relationships:
@@ -168,8 +168,8 @@ paths:
state_name:
alternative_phone: 555-555-0199
company: Company
- created_at: '2021-10-13T17:20:37.436Z'
- updated_at: '2021-10-13T17:20:37.436Z'
+ created_at: '2021-10-20T13:33:11.068Z'
+ updated_at: '2021-10-20T13:33:11.068Z'
deleted_at:
label:
relationships:
@@ -259,8 +259,8 @@ paths:
state_name:
alternative_phone: 555-555-0199
company: Company
- created_at: '2021-10-13T17:20:37.480Z'
- updated_at: '2021-10-13T17:20:37.480Z'
+ created_at: '2021-10-20T13:33:11.112Z'
+ updated_at: '2021-10-20T13:33:11.112Z'
deleted_at:
label:
relationships:
@@ -333,8 +333,8 @@ paths:
state_name:
alternative_phone: 555-555-0199
company: Company
- created_at: '2021-10-13T17:20:37.533Z'
- updated_at: '2021-10-13T17:20:37.541Z'
+ created_at: '2021-10-20T13:33:11.176Z'
+ updated_at: '2021-10-20T13:33:11.187Z'
deleted_at:
label:
relationships:
@@ -466,8 +466,8 @@ paths:
label: Shipping
mandatory:
eligible: true
- created_at: '2021-10-13T17:20:37.776Z'
- updated_at: '2021-10-13T17:20:37.776Z'
+ created_at: '2021-10-20T13:33:11.454Z'
+ updated_at: '2021-10-20T13:33:11.454Z'
state: open
included: false
display_amount: "$100.00"
@@ -493,8 +493,8 @@ paths:
label: Shipping
mandatory:
eligible: true
- created_at: '2021-10-13T17:20:37.802Z'
- updated_at: '2021-10-13T17:20:37.802Z'
+ created_at: '2021-10-20T13:33:11.481Z'
+ updated_at: '2021-10-20T13:33:11.481Z'
state: open
included: false
display_amount: "$100.00"
@@ -563,8 +563,8 @@ paths:
label: Shipping
mandatory:
eligible: true
- created_at: '2021-10-13T17:20:38.112Z'
- updated_at: '2021-10-13T17:20:38.112Z'
+ created_at: '2021-10-20T13:33:11.812Z'
+ updated_at: '2021-10-20T13:33:11.812Z'
state: open
included: false
display_amount: "$100.00"
@@ -642,8 +642,8 @@ paths:
label: Shipping
mandatory:
eligible: true
- created_at: '2021-10-13T17:20:38.217Z'
- updated_at: '2021-10-13T17:20:38.221Z'
+ created_at: '2021-10-20T13:33:11.966Z'
+ updated_at: '2021-10-20T13:33:11.973Z'
state: open
included: false
display_amount: "$1.00"
@@ -715,8 +715,8 @@ paths:
label: New label
mandatory:
eligible: true
- created_at: '2021-10-13T17:20:38.399Z'
- updated_at: '2021-10-13T17:20:38.413Z'
+ created_at: '2021-10-20T13:33:12.208Z'
+ updated_at: '2021-10-20T13:33:12.224Z'
state: open
included: false
display_amount: "$15.00"
@@ -844,8 +844,8 @@ paths:
type: classification
attributes:
position: 1
- created_at: '2021-10-13T17:20:38.995Z'
- updated_at: '2021-10-13T17:20:38.995Z'
+ created_at: '2021-10-20T13:33:12.919Z'
+ updated_at: '2021-10-20T13:33:12.919Z'
relationships:
product:
data:
@@ -859,8 +859,8 @@ paths:
type: classification
attributes:
position: 1
- created_at: '2021-10-13T17:20:39.106Z'
- updated_at: '2021-10-13T17:20:39.106Z'
+ created_at: '2021-10-20T13:33:13.008Z'
+ updated_at: '2021-10-20T13:33:13.008Z'
relationships:
product:
data:
@@ -917,8 +917,8 @@ paths:
type: classification
attributes:
position: 1
- created_at: '2021-10-13T17:20:39.478Z'
- updated_at: '2021-10-13T17:20:39.478Z'
+ created_at: '2021-10-20T13:33:13.682Z'
+ updated_at: '2021-10-20T13:33:13.682Z'
relationships:
product:
data:
@@ -981,8 +981,8 @@ paths:
type: classification
attributes:
position: 1
- created_at: '2021-10-13T17:20:39.631Z'
- updated_at: '2021-10-13T17:20:39.631Z'
+ created_at: '2021-10-20T13:33:13.902Z'
+ updated_at: '2021-10-20T13:33:13.902Z'
relationships:
product:
data:
@@ -1042,8 +1042,8 @@ paths:
type: classification
attributes:
position: 1
- created_at: '2021-10-13T17:20:39.912Z'
- updated_at: '2021-10-13T17:20:39.912Z'
+ created_at: '2021-10-20T13:33:14.379Z'
+ updated_at: '2021-10-20T13:33:14.379Z'
relationships:
product:
data:
@@ -1153,8 +1153,8 @@ paths:
type: classification
attributes:
position: 2
- created_at: '2021-10-13T17:20:40.641Z'
- updated_at: '2021-10-13T17:20:40.669Z'
+ created_at: '2021-10-20T13:33:15.464Z'
+ updated_at: '2021-10-20T13:33:15.491Z'
relationships:
product:
data:
@@ -1245,36 +1245,35 @@ paths:
- id: '1'
type: cms_page
attributes:
- title: Explicabo consequuntur earum eaque mollitia molestiae
- iste.
+ title: Nesciunt tempora debitis sunt odio atque doloremque
+ quae.
meta_title:
content:
meta_description:
visible: true
- slug: explicabo-consequuntur-earum-eaque-mollitia-molestiae-iste
+ slug: nesciunt-tempora-debitis-sunt-odio-atque-doloremque-quae
type: Spree::Cms::Pages::StandardPage
locale: en
deleted_at:
- created_at: '2021-10-13T17:20:40.988Z'
- updated_at: '2021-10-13T17:20:40.988Z'
+ created_at: '2021-10-20T13:33:15.984Z'
+ updated_at: '2021-10-20T13:33:15.984Z'
relationships:
cms_sections:
data: []
- id: '2'
type: cms_page
attributes:
- title: Cumque recusandae ut laudantium nemo voluptatem maxime
- asperiores vel.
+ title: Laboriosam enim alias consequatur est sequi quis laudantium.
meta_title:
content:
meta_description:
visible: true
- slug: cumque-recusandae-ut-laudantium-nemo-voluptatem-maxime-asperiores-vel
+ slug: laboriosam-enim-alias-consequatur-est-sequi-quis-laudantium
type: Spree::Cms::Pages::StandardPage
locale: en
deleted_at:
- created_at: '2021-10-13T17:20:40.993Z'
- updated_at: '2021-10-13T17:20:40.993Z'
+ created_at: '2021-10-20T13:33:15.989Z'
+ updated_at: '2021-10-20T13:33:15.989Z'
relationships:
cms_sections:
data: []
@@ -1324,17 +1323,17 @@ paths:
id: '5'
type: cms_page
attributes:
- title: Est minima expedita excepturi esse facere.
+ title: Fugiat sapiente culpa autem earum quidem.
meta_title:
content:
meta_description:
visible: true
- slug: est-minima-expedita-excepturi-esse-facere
+ slug: fugiat-sapiente-culpa-autem-earum-quidem
type: Spree::Cms::Pages::StandardPage
locale: en
deleted_at:
- created_at: '2021-10-13T17:20:41.065Z'
- updated_at: '2021-10-13T17:20:41.065Z'
+ created_at: '2021-10-20T13:33:16.088Z'
+ updated_at: '2021-10-20T13:33:16.088Z'
relationships:
cms_sections:
data: []
@@ -1390,17 +1389,17 @@ paths:
id: '6'
type: cms_page
attributes:
- title: Repudiandae ducimus laborum officia id ad unde.
+ title: Iste eum consequatur nemo voluptatem sed voluptas.
meta_title:
content:
meta_description:
visible: true
- slug: repudiandae-ducimus-laborum-officia-id-ad-unde
+ slug: iste-eum-consequatur-nemo-voluptatem-sed-voluptas
type: Spree::Cms::Pages::StandardPage
locale: en
deleted_at:
- created_at: '2021-10-13T17:20:41.102Z'
- updated_at: '2021-10-13T17:20:41.102Z'
+ created_at: '2021-10-20T13:33:16.147Z'
+ updated_at: '2021-10-20T13:33:16.147Z'
relationships:
cms_sections:
data: []
@@ -1458,12 +1457,12 @@ paths:
content:
meta_description:
visible: true
- slug: illum-in-assumenda-quas-fugiat-esse-ab-voluptatem-a
+ slug: provident-rem-voluptatum-earum-natus
type: Spree::Cms::Pages::StandardPage
locale: en
deleted_at:
- created_at: '2021-10-13T17:20:41.159Z'
- updated_at: '2021-10-13T17:20:41.173Z'
+ created_at: '2021-10-20T13:33:16.245Z'
+ updated_at: '2021-10-20T13:33:16.259Z'
relationships:
cms_sections:
data: []
@@ -1577,7 +1576,7 @@ paths:
- id: '1'
type: cms_section
attributes:
- name: Placeat magni qui maiores mollitia modi eligendi.
+ name: Possimus dolore esse accusamus ratione similique.
content: {}
settings:
gutters: No Gutters
@@ -1586,8 +1585,8 @@ paths:
type: Spree::Cms::Sections::HeroImage
position: 1
linked_resource_type: Spree::Taxon
- created_at: '2021-10-13T17:20:41.338Z'
- updated_at: '2021-10-13T17:20:41.338Z'
+ created_at: '2021-10-20T13:33:16.516Z'
+ updated_at: '2021-10-20T13:33:16.516Z'
relationships:
cms_page:
data:
@@ -1598,8 +1597,7 @@ paths:
- id: '2'
type: cms_section
attributes:
- name: Occaecati eligendi perspiciatis eum deleniti amet reiciendis
- mollitia.
+ name: Eligendi quasi ullam vero incidunt.
content:
link_type_one: Spree::Taxon
link_type_two: Spree::Taxon
@@ -1611,8 +1609,8 @@ paths:
type: Spree::Cms::Sections::ImageGallery
position: 2
linked_resource_type:
- created_at: '2021-10-13T17:20:41.341Z'
- updated_at: '2021-10-13T17:20:41.341Z'
+ created_at: '2021-10-20T13:33:16.522Z'
+ updated_at: '2021-10-20T13:33:16.522Z'
relationships:
cms_page:
data:
@@ -1623,7 +1621,7 @@ paths:
- id: '3'
type: cms_section
attributes:
- name: Velit libero voluptas sequi ad.
+ name: Recusandae esse ipsam dolor delectus.
content: {}
settings:
gutters: No Gutters
@@ -1632,8 +1630,8 @@ paths:
type: Spree::Cms::Sections::FeaturedArticle
position: 3
linked_resource_type: Spree::Taxon
- created_at: '2021-10-13T17:20:41.350Z'
- updated_at: '2021-10-13T17:20:41.350Z'
+ created_at: '2021-10-20T13:33:16.539Z'
+ updated_at: '2021-10-20T13:33:16.539Z'
relationships:
cms_page:
data:
@@ -1644,7 +1642,7 @@ paths:
- id: '4'
type: cms_section
attributes:
- name: Suscipit nihil enim mollitia consectetur.
+ name: Quo corrupti esse pariatur minus voluptatum praesentium.
content: {}
settings:
gutters: No Gutters
@@ -1653,8 +1651,8 @@ paths:
type: Spree::Cms::Sections::HeroImage
position: 4
linked_resource_type: Spree::Product
- created_at: '2021-10-13T17:20:41.363Z'
- updated_at: '2021-10-13T17:20:41.363Z'
+ created_at: '2021-10-20T13:33:16.553Z'
+ updated_at: '2021-10-20T13:33:16.553Z'
relationships:
cms_page:
data:
@@ -1667,8 +1665,8 @@ paths:
- id: '5'
type: cms_section
attributes:
- name: Sint ducimus eum facere expedita dolores deleniti est
- possimus.
+ name: Officiis nostrum tenetur sapiente magnam odit aliquid
+ sit.
content: {}
settings:
gutters: No Gutters
@@ -1677,8 +1675,8 @@ paths:
type: Spree::Cms::Sections::HeroImage
position: 5
linked_resource_type: Spree::Product
- created_at: '2021-10-13T17:20:41.371Z'
- updated_at: '2021-10-13T17:20:41.371Z'
+ created_at: '2021-10-20T13:33:16.567Z'
+ updated_at: '2021-10-20T13:33:16.567Z'
relationships:
cms_page:
data:
@@ -1734,8 +1732,7 @@ paths:
id: '14'
type: cms_section
attributes:
- name: Harum eum inventore doloremque explicabo dolorum repellendus
- labore.
+ name: Excepturi facilis eos similique cumque commodi.
content: {}
settings:
gutters: No Gutters
@@ -1744,8 +1741,8 @@ paths:
type: Spree::Cms::Sections::HeroImage
position: 4
linked_resource_type: Spree::Product
- created_at: '2021-10-13T17:20:41.523Z'
- updated_at: '2021-10-13T17:20:41.523Z'
+ created_at: '2021-10-20T13:33:16.773Z'
+ updated_at: '2021-10-20T13:33:16.773Z'
relationships:
cms_page:
data:
@@ -1807,7 +1804,8 @@ paths:
id: '21'
type: cms_section
attributes:
- name: Ad accusamus esse in modi optio iure nostrum.
+ name: Vero inventore doloremque ullam incidunt consequatur
+ aliquam.
content: {}
settings:
gutters: No Gutters
@@ -1816,8 +1814,8 @@ paths:
type: Spree::Cms::Sections::HeroImage
position: 4
linked_resource_type: Spree::Product
- created_at: '2021-10-13T17:20:41.723Z'
- updated_at: '2021-10-13T17:20:41.723Z'
+ created_at: '2021-10-20T13:33:16.946Z'
+ updated_at: '2021-10-20T13:33:16.946Z'
relationships:
cms_page:
data:
@@ -1885,8 +1883,8 @@ paths:
type: Spree::Cms::Sections::HeroImage
position: 4
linked_resource_type: Spree::Product
- created_at: '2021-10-13T17:20:41.930Z'
- updated_at: '2021-10-13T17:20:41.942Z'
+ created_at: '2021-10-20T13:33:17.245Z'
+ updated_at: '2021-10-20T13:33:17.262Z'
relationships:
cms_page:
data:
@@ -1988,8 +1986,7 @@ paths:
id: '58'
type: cms_section
attributes:
- name: Eligendi quibusdam asperiores facilis debitis perferendis
- aut veniam.
+ name: Accusamus illum placeat a rerum perferendis debitis.
content: {}
settings:
gutters: No Gutters
@@ -1998,8 +1995,8 @@ paths:
type: Spree::Cms::Sections::HeroImage
position: 3
linked_resource_type: Spree::Product
- created_at: '2021-10-13T17:20:42.515Z'
- updated_at: '2021-10-13T17:20:42.527Z'
+ created_at: '2021-10-20T13:33:18.022Z'
+ updated_at: '2021-10-20T13:33:18.037Z'
relationships:
cms_page:
data:
@@ -2053,13 +2050,13 @@ paths:
attributes:
iso_name: UNITED STATES
iso: US
- iso3: IS79
+ iso3: USA
name: United States of America
numcode: 840
states_required: true
- updated_at: '2021-10-13T17:20:42.684Z'
+ updated_at: '2021-10-20T13:33:18.298Z'
zipcode_required: true
- created_at: '2021-10-13T17:20:42.684Z'
+ created_at: '2021-10-20T13:33:18.298Z'
relationships:
states:
data: []
@@ -2068,13 +2065,13 @@ paths:
attributes:
iso_name: ISO_NAME_2
iso: I2
- iso3: IS80
+ iso3: IS2
name: NAME_2
numcode: 840
states_required: false
- updated_at: '2021-10-13T17:20:42.690Z'
+ updated_at: '2021-10-20T13:33:18.306Z'
zipcode_required: true
- created_at: '2021-10-13T17:20:42.690Z'
+ created_at: '2021-10-20T13:33:18.306Z'
relationships:
states:
data: []
@@ -2083,13 +2080,13 @@ paths:
attributes:
iso_name: ISO_NAME_3
iso: I3
- iso3: IS81
+ iso3: IS3
name: NAME_3
numcode: 840
states_required: false
- updated_at: '2021-10-13T17:20:42.693Z'
+ updated_at: '2021-10-20T13:33:18.308Z'
zipcode_required: true
- created_at: '2021-10-13T17:20:42.693Z'
+ created_at: '2021-10-20T13:33:18.308Z'
relationships:
states:
data: []
@@ -2140,13 +2137,13 @@ paths:
attributes:
iso_name: ISO_NAME_6
iso: I6
- iso3: IS86
+ iso3: IS6
name: NAME_6
numcode: 840
states_required: false
- updated_at: '2021-10-13T17:20:42.739Z'
+ updated_at: '2021-10-20T13:33:18.372Z'
zipcode_required: true
- created_at: '2021-10-13T17:20:42.739Z'
+ created_at: '2021-10-20T13:33:18.372Z'
relationships:
states:
data: []
@@ -2198,7 +2195,7 @@ paths:
- id: '1'
type: digital_link
attributes:
- token: jTA4f23bAxKq2VucZVPJ5cLQ
+ token: oFF9NYvBCSJohNuropUqbWAE
access_counter: 0
relationships:
digital:
@@ -2212,7 +2209,7 @@ paths:
- id: '2'
type: digital_link
attributes:
- token: tKercwNbitGiEvs2tXEnaaXZ
+ token: HEfdTWti4BS9kkwYKMVFKPEs
access_counter: 0
relationships:
digital:
@@ -2262,7 +2259,7 @@ paths:
id: '5'
type: digital_link
attributes:
- token: bCMXNXaGaewbGV5TtujLMxcT
+ token: x8gyPgBsrw6aBuAqrJhNq21G
access_counter: 0
relationships:
digital:
@@ -2321,7 +2318,7 @@ paths:
id: '6'
type: digital_link
attributes:
- token: sHA6UnDjGH34gFxpx2R4v5GA
+ token: SvvLYt6FJ91xjBTGK6XrdozR
access_counter: 0
relationships:
digital:
@@ -2374,7 +2371,7 @@ paths:
id: '8'
type: digital_link
attributes:
- token: RbzbGRD7PY7m5ud6gV6WNZss
+ token: WoJW9DrPxcy8iDobDvZHJJbu
access_counter: 0
relationships:
digital:
@@ -2477,7 +2474,7 @@ paths:
id: '13'
type: digital_link
attributes:
- token: iGCuuaH5HXkv14rR1ZmoxCBY
+ token: dE8smCgXNtWGptHmFTRKhdoA
access_counter: 0
relationships:
digital:
@@ -2543,7 +2540,7 @@ paths:
- id: '15'
type: digital
attributes:
- url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBJdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--927a49277b240016a5103d40e713c6456d0d53ec/thinking-cat.jpg"
+ url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBJdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--6055d985cf9a216372cdc016d234f96f761beb4c/thinking-cat.jpg"
content_type: image/jpeg
filename: thinking-cat.jpg
byte_size: 18090
@@ -2555,7 +2552,7 @@ paths:
- id: '16'
type: digital
attributes:
- url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBKQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--4d97d12ab027b7bc8fc342f95656ad9edd69a3b1/thinking-cat.jpg"
+ url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBKQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--384a52614e3e9edb05e7bbb491ffa65f11cd0891/thinking-cat.jpg"
content_type: image/jpeg
filename: thinking-cat.jpg
byte_size: 18090
@@ -2567,7 +2564,7 @@ paths:
- id: '17'
type: digital
attributes:
- url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBKUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--cdff6a1a507edade4568c6480233bacf467c93f2/thinking-cat.jpg"
+ url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBKUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--6eeeab26e3f847baf09e78bcbfdf3c262fecbf5e/thinking-cat.jpg"
content_type: image/jpeg
filename: thinking-cat.jpg
byte_size: 18090
@@ -2622,7 +2619,7 @@ paths:
id: '24'
type: digital
attributes:
- url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBMQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--bc0831200cac88ed09c7f0cd2210f346c14ac3fb/icon_256x256.jpg"
+ url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBMQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--8cd730120666bc9ae413846c5f5a28ee6b4b373e/icon_256x256.jpg"
content_type: image/png
filename: icon_256x256.jpg
byte_size: 818
@@ -2683,7 +2680,7 @@ paths:
id: '28'
type: digital
attributes:
- url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBNQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--b4e6b492bc326309c993b31737157737be621509/thinking-cat.jpg"
+ url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBNQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--32eb753a9dc8c3ffd92696c42fc1f6225076ea28/thinking-cat.jpg"
content_type: image/jpeg
filename: thinking-cat.jpg
byte_size: 18090
@@ -2741,7 +2738,7 @@ paths:
id: '36'
type: digital
attributes:
- url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBPdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--891473e7db1050cd599e9595b20c5ad9c5d2c7cf/icon_256x256.jpg"
+ url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBPdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--27751c056d47883b4930e1bb703cc6fa4504dc11/icon_256x256.jpg"
content_type: image/png
filename: icon_256x256.jpg
byte_size: 818
@@ -2839,7 +2836,7 @@ paths:
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
- example: order,tax_category,variant.product
+ example: order,tax_category,variant.product,digital_links
schema:
type: string
- name: filter[order_id_eq]
@@ -2862,8 +2859,8 @@ paths:
attributes:
quantity: 1
price: '10.0'
- created_at: '2021-10-13T17:20:49.921Z'
- updated_at: '2021-10-13T17:20:49.930Z'
+ created_at: '2021-10-20T13:33:31.105Z'
+ updated_at: '2021-10-20T13:33:31.119Z'
currency: USD
cost_price: '17.0'
adjustment_total: '0.0'
@@ -2881,9 +2878,9 @@ paths:
display_final_amount: "$10.00"
display_adjustment_total: "$0.00"
display_additional_tax_total: "$0.00"
- display_included_tax_total: "$0.00"
- display_pre_tax_amount: "$10.00"
display_promo_total: "$0.00"
+ display_pre_tax_amount: "$10.00"
+ display_included_tax_total: "$0.00"
display_amount: "$10.00"
relationships:
order:
@@ -2909,8 +2906,8 @@ paths:
attributes:
quantity: 1
price: '10.0'
- created_at: '2021-10-13T17:20:49.970Z'
- updated_at: '2021-10-13T17:20:49.977Z'
+ created_at: '2021-10-20T13:33:31.175Z'
+ updated_at: '2021-10-20T13:33:31.183Z'
currency: USD
cost_price: '17.0'
adjustment_total: '0.0'
@@ -2928,9 +2925,9 @@ paths:
display_final_amount: "$10.00"
display_adjustment_total: "$0.00"
display_additional_tax_total: "$0.00"
- display_included_tax_total: "$0.00"
- display_pre_tax_amount: "$10.00"
display_promo_total: "$0.00"
+ display_pre_tax_amount: "$10.00"
+ display_included_tax_total: "$0.00"
display_amount: "$10.00"
relationships:
order:
@@ -2982,7 +2979,7 @@ paths:
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
- example: order,tax_category,variant.product
+ example: order,tax_category,variant.product,digital_links
schema:
type: string
responses:
@@ -2999,8 +2996,8 @@ paths:
attributes:
quantity: 1
price: '10.0'
- created_at: '2021-10-13T17:20:50.200Z'
- updated_at: '2021-10-13T17:20:50.236Z'
+ created_at: '2021-10-20T13:33:31.479Z'
+ updated_at: '2021-10-20T13:33:31.603Z'
currency: USD
cost_price: '17.0'
adjustment_total: '0.0'
@@ -3018,9 +3015,9 @@ paths:
display_final_amount: "$10.00"
display_adjustment_total: "$0.00"
display_additional_tax_total: "$0.00"
- display_included_tax_total: "$0.00"
- display_pre_tax_amount: "$10.00"
display_promo_total: "$0.00"
+ display_pre_tax_amount: "$10.00"
+ display_included_tax_total: "$0.00"
display_amount: "$10.00"
relationships:
order:
@@ -3081,7 +3078,7 @@ paths:
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
- example: order,tax_category,variant.product
+ example: order,tax_category,variant.product,digital_links
schema:
type: string
responses:
@@ -3098,8 +3095,8 @@ paths:
attributes:
quantity: 1
price: '10.0'
- created_at: '2021-10-13T17:20:50.371Z'
- updated_at: '2021-10-13T17:20:50.379Z'
+ created_at: '2021-10-20T13:33:31.782Z'
+ updated_at: '2021-10-20T13:33:31.791Z'
currency: USD
cost_price: '17.0'
adjustment_total: '0.0'
@@ -3117,9 +3114,9 @@ paths:
display_final_amount: "$10.00"
display_adjustment_total: "$0.00"
display_additional_tax_total: "$0.00"
- display_included_tax_total: "$0.00"
- display_pre_tax_amount: "$10.00"
display_promo_total: "$0.00"
+ display_pre_tax_amount: "$10.00"
+ display_included_tax_total: "$0.00"
display_amount: "$10.00"
relationships:
order:
@@ -3174,7 +3171,7 @@ paths:
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
- example: order,tax_category,variant.product
+ example: order,tax_category,variant.product,digital_links
schema:
type: string
responses:
@@ -3191,8 +3188,8 @@ paths:
attributes:
quantity: 4
price: '10.0'
- created_at: '2021-10-13T17:20:50.610Z'
- updated_at: '2021-10-13T17:20:50.650Z'
+ created_at: '2021-10-20T13:33:32.121Z'
+ updated_at: '2021-10-20T13:33:32.175Z'
currency: USD
cost_price: '17.0'
adjustment_total: '0.0'
@@ -3210,9 +3207,9 @@ paths:
display_final_amount: "$40.00"
display_adjustment_total: "$0.00"
display_additional_tax_total: "$0.00"
- display_included_tax_total: "$0.00"
- display_pre_tax_amount: "$40.00"
display_promo_total: "$0.00"
+ display_pre_tax_amount: "$40.00"
+ display_included_tax_total: "$0.00"
display_amount: "$40.00"
relationships:
order:
@@ -3240,10 +3237,10 @@ paths:
examples:
Example:
value:
- error: 'Quantity selected of "Product #133 - 9982" is not available.'
+ error: 'Quantity selected of "Product #133 - 9557" is not available.'
errors:
quantity:
- - 'selected of "Product #133 - 9982" is not available.'
+ - 'selected of "Product #133 - 9557" is not available.'
'404':
description: Record not found
content:
@@ -3353,8 +3350,8 @@ paths:
lft: 2
rgt: 3
depth: 1
- created_at: '2021-10-13T17:20:51.251Z'
- updated_at: '2021-10-13T17:20:51.255Z'
+ created_at: '2021-10-20T13:33:32.962Z'
+ updated_at: '2021-10-20T13:33:32.968Z'
link:
is_container: false
is_root: false
@@ -3390,8 +3387,8 @@ paths:
lft: 4
rgt: 5
depth: 1
- created_at: '2021-10-13T17:20:51.302Z'
- updated_at: '2021-10-13T17:20:51.306Z'
+ created_at: '2021-10-20T13:33:33.064Z'
+ updated_at: '2021-10-20T13:33:33.073Z'
link:
is_container: false
is_root: false
@@ -3427,8 +3424,8 @@ paths:
lft: 6
rgt: 7
depth: 1
- created_at: '2021-10-13T17:20:51.362Z'
- updated_at: '2021-10-13T17:20:51.366Z'
+ created_at: '2021-10-20T13:33:33.161Z'
+ updated_at: '2021-10-20T13:33:33.168Z'
link:
is_container: false
is_root: false
@@ -3464,8 +3461,8 @@ paths:
lft: 8
rgt: 9
depth: 1
- created_at: '2021-10-13T17:20:51.413Z'
- updated_at: '2021-10-13T17:20:51.418Z'
+ created_at: '2021-10-20T13:33:33.254Z'
+ updated_at: '2021-10-20T13:33:33.261Z'
link:
is_container: false
is_root: false
@@ -3501,8 +3498,8 @@ paths:
lft: 10
rgt: 11
depth: 1
- created_at: '2021-10-13T17:20:51.463Z'
- updated_at: '2021-10-13T17:20:51.467Z'
+ created_at: '2021-10-20T13:33:33.339Z'
+ updated_at: '2021-10-20T13:33:33.346Z'
link:
is_container: false
is_root: false
@@ -3538,8 +3535,8 @@ paths:
lft: 12
rgt: 13
depth: 1
- created_at: '2021-10-13T17:20:51.515Z'
- updated_at: '2021-10-13T17:20:51.519Z'
+ created_at: '2021-10-20T13:33:33.427Z'
+ updated_at: '2021-10-20T13:33:33.434Z'
link:
is_container: false
is_root: false
@@ -3575,8 +3572,8 @@ paths:
lft: 14
rgt: 15
depth: 1
- created_at: '2021-10-13T17:20:51.569Z'
- updated_at: '2021-10-13T17:20:51.573Z'
+ created_at: '2021-10-20T13:33:33.510Z'
+ updated_at: '2021-10-20T13:33:33.517Z'
link:
is_container: false
is_root: false
@@ -3602,7 +3599,8 @@ paths:
- id: '1'
type: menu_item
attributes:
- name: Laboriosam nam quasi minima harum modi.
+ name: Laudantium necessitatibus fugit cum similique illum
+ at nam.
subtitle:
destination:
new_window: false
@@ -3612,8 +3610,8 @@ paths:
lft: 1
rgt: 16
depth: 0
- created_at: '2021-10-13T17:20:51.198Z'
- updated_at: '2021-10-13T17:20:51.584Z'
+ created_at: '2021-10-20T13:33:32.883Z'
+ updated_at: '2021-10-20T13:33:33.531Z'
link:
is_container: true
is_root: true
@@ -3702,8 +3700,8 @@ paths:
lft: 8
rgt: 9
depth: 1
- created_at: '2021-10-13T17:20:52.276Z'
- updated_at: '2021-10-13T17:20:52.280Z'
+ created_at: '2021-10-20T13:33:34.613Z'
+ updated_at: '2021-10-20T13:33:34.619Z'
link:
is_container: false
is_root: false
@@ -3789,8 +3787,8 @@ paths:
lft: 8
rgt: 9
depth: 1
- created_at: '2021-10-13T17:20:52.684Z'
- updated_at: '2021-10-13T17:20:52.689Z'
+ created_at: '2021-10-20T13:33:35.327Z'
+ updated_at: '2021-10-20T13:33:35.334Z'
link:
is_container: false
is_root: false
@@ -3872,8 +3870,8 @@ paths:
lft: 8
rgt: 9
depth: 1
- created_at: '2021-10-13T17:20:53.338Z'
- updated_at: '2021-10-13T17:20:53.363Z'
+ created_at: '2021-10-20T13:33:36.556Z'
+ updated_at: '2021-10-20T13:33:36.596Z'
link:
is_container: false
is_root: false
@@ -3998,8 +3996,8 @@ paths:
lft: 5
rgt: 6
depth: 2
- created_at: '2021-10-13T17:20:54.904Z'
- updated_at: '2021-10-13T17:20:54.927Z'
+ created_at: '2021-10-20T13:33:39.256Z'
+ updated_at: '2021-10-20T13:33:39.291Z'
link:
is_container: false
is_root: false
@@ -4091,25 +4089,25 @@ paths:
name: Main Menu
location: header
locale: en
- created_at: '2021-10-13T17:20:55.386Z'
- updated_at: '2021-10-13T17:20:55.570Z'
+ created_at: '2021-10-20T13:33:40.089Z'
+ updated_at: '2021-10-20T13:33:40.350Z'
relationships:
menu_items:
data:
- - id: '89'
- type: menu_item
- id: '87'
type: menu_item
- id: '90'
type: menu_item
+ - id: '89'
+ type: menu_item
- id: '19'
type: menu
attributes:
name: Footer Menu
location: footer
locale: en
- created_at: '2021-10-13T17:20:55.416Z'
- updated_at: '2021-10-13T17:20:55.670Z'
+ created_at: '2021-10-20T13:33:40.101Z'
+ updated_at: '2021-10-20T13:33:40.537Z'
relationships:
menu_items:
data:
@@ -4168,8 +4166,8 @@ paths:
name: Main Menu
location: header
locale: en
- created_at: '2021-10-13T17:20:55.943Z'
- updated_at: '2021-10-13T17:20:55.951Z'
+ created_at: '2021-10-20T13:33:40.999Z'
+ updated_at: '2021-10-20T13:33:41.007Z'
relationships:
menu_items:
data:
@@ -4233,8 +4231,8 @@ paths:
name: Main Menu
location: header
locale: en
- created_at: '2021-10-13T17:20:55.995Z'
- updated_at: '2021-10-13T17:20:56.002Z'
+ created_at: '2021-10-20T13:33:41.055Z'
+ updated_at: '2021-10-20T13:33:41.065Z'
relationships:
menu_items:
data:
@@ -4292,8 +4290,8 @@ paths:
name: Main Menu
location: header
locale: en
- created_at: '2021-10-13T17:20:56.067Z'
- updated_at: '2021-10-13T17:20:56.074Z'
+ created_at: '2021-10-20T13:33:41.164Z'
+ updated_at: '2021-10-20T13:33:41.175Z'
relationships:
menu_items:
data:
@@ -4416,8 +4414,8 @@ paths:
name: foo-size-68
presentation: Size
position: 1
- created_at: '2021-10-13T17:20:56.249Z'
- updated_at: '2021-10-13T17:20:56.249Z'
+ created_at: '2021-10-20T13:33:41.395Z'
+ updated_at: '2021-10-20T13:33:41.395Z'
filterable: true
relationships:
option_values:
@@ -4428,8 +4426,8 @@ paths:
name: foo-size-69
presentation: Size
position: 2
- created_at: '2021-10-13T17:20:56.251Z'
- updated_at: '2021-10-13T17:20:56.251Z'
+ created_at: '2021-10-20T13:33:41.397Z'
+ updated_at: '2021-10-20T13:33:41.397Z'
filterable: true
relationships:
option_values:
@@ -4476,8 +4474,8 @@ paths:
name: foo-size-72
presentation: Size
position: 1
- created_at: '2021-10-13T17:20:56.297Z'
- updated_at: '2021-10-13T17:20:56.297Z'
+ created_at: '2021-10-20T13:33:41.468Z'
+ updated_at: '2021-10-20T13:33:41.468Z'
filterable: true
relationships:
option_values:
@@ -4530,8 +4528,8 @@ paths:
name: foo-size-73
presentation: Size
position: 1
- created_at: '2021-10-13T17:20:56.326Z'
- updated_at: '2021-10-13T17:20:56.326Z'
+ created_at: '2021-10-20T13:33:41.507Z'
+ updated_at: '2021-10-20T13:33:41.507Z'
filterable: true
relationships:
option_values:
@@ -4581,8 +4579,8 @@ paths:
name: Size-X
presentation: Size
position: 1
- created_at: '2021-10-13T17:20:56.379Z'
- updated_at: '2021-10-13T17:20:56.386Z'
+ created_at: '2021-10-20T13:33:41.570Z'
+ updated_at: '2021-10-20T13:33:41.580Z'
filterable: true
relationships:
option_values:
@@ -4706,8 +4704,8 @@ paths:
position: 1
name: Size-68
presentation: S
- created_at: '2021-10-13T17:20:56.508Z'
- updated_at: '2021-10-13T17:20:56.508Z'
+ created_at: '2021-10-20T13:33:41.732Z'
+ updated_at: '2021-10-20T13:33:41.732Z'
relationships:
option_type:
data:
@@ -4719,8 +4717,8 @@ paths:
position: 1
name: Size-69
presentation: S
- created_at: '2021-10-13T17:20:56.515Z'
- updated_at: '2021-10-13T17:20:56.515Z'
+ created_at: '2021-10-20T13:33:41.738Z'
+ updated_at: '2021-10-20T13:33:41.738Z'
relationships:
option_type:
data:
@@ -4775,8 +4773,8 @@ paths:
position: 1
name: Size-72
presentation: S
- created_at: '2021-10-13T17:20:56.575Z'
- updated_at: '2021-10-13T17:20:56.575Z'
+ created_at: '2021-10-20T13:33:41.811Z'
+ updated_at: '2021-10-20T13:33:41.811Z'
relationships:
option_type:
data:
@@ -4835,8 +4833,8 @@ paths:
position: 1
name: Size-73
presentation: S
- created_at: '2021-10-13T17:20:56.609Z'
- updated_at: '2021-10-13T17:20:56.609Z'
+ created_at: '2021-10-20T13:33:41.878Z'
+ updated_at: '2021-10-20T13:33:41.878Z'
relationships:
option_type:
data:
@@ -4894,8 +4892,8 @@ paths:
position: 1
name: M
presentation: S
- created_at: '2021-10-13T17:20:56.667Z'
- updated_at: '2021-10-13T17:20:56.676Z'
+ created_at: '2021-10-20T13:33:41.952Z'
+ updated_at: '2021-10-20T13:33:41.963Z'
relationships:
option_type:
data:
@@ -5011,7 +5009,7 @@ paths:
- id: '40'
type: order
attributes:
- number: R391675230
+ number: R699468900
item_total: '0.0'
total: '0.0'
state: cart
@@ -5020,10 +5018,10 @@ paths:
payment_total: '0.0'
shipment_state:
payment_state:
- email: melonie@welch.ca
+ email: stephen.corkery@lakin.com
special_instructions:
- created_at: '2021-10-13T17:20:56.825Z'
- updated_at: '2021-10-13T17:20:56.825Z'
+ created_at: '2021-10-20T13:33:42.140Z'
+ updated_at: '2021-10-20T13:33:42.140Z'
currency: USD
last_ip_address:
shipment_total: '0.0'
@@ -5095,7 +5093,7 @@ paths:
- id: '41'
type: order
attributes:
- number: R955263413
+ number: R180748832
item_total: '0.0'
total: '0.0'
state: cart
@@ -5104,10 +5102,10 @@ paths:
payment_total: '0.0'
shipment_state:
payment_state:
- email: kermit_schumm@gusikowski.co.uk
+ email: frederic@raynormann.co.uk
special_instructions:
- created_at: '2021-10-13T17:20:56.833Z'
- updated_at: '2021-10-13T17:20:56.833Z'
+ created_at: '2021-10-20T13:33:42.151Z'
+ updated_at: '2021-10-20T13:33:42.151Z'
currency: USD
last_ip_address:
shipment_total: '0.0'
@@ -5222,7 +5220,7 @@ paths:
id: '44'
type: order
attributes:
- number: R947873886
+ number: R819705544
item_total: '0.0'
total: '0.0'
state: cart
@@ -5233,8 +5231,8 @@ paths:
payment_state:
email:
special_instructions:
- created_at: '2021-10-13T17:20:57.116Z'
- updated_at: '2021-10-13T17:20:57.133Z'
+ created_at: '2021-10-20T13:33:42.469Z'
+ updated_at: '2021-10-20T13:33:42.487Z'
currency: USD
last_ip_address:
shipment_total: '0.0'
@@ -5346,7 +5344,7 @@ paths:
id: '45'
type: order
attributes:
- number: R609701395
+ number: R512586754
item_total: '10.0'
total: '110.0'
state: delivery
@@ -5355,10 +5353,10 @@ paths:
payment_total: '0.0'
shipment_state:
payment_state:
- email: ingrid@gorczany.com
+ email: valencia@koelpin.us
special_instructions:
- created_at: '2021-10-13T17:20:57.174Z'
- updated_at: '2021-10-13T17:20:57.396Z'
+ created_at: '2021-10-20T13:33:42.547Z'
+ updated_at: '2021-10-20T13:33:42.706Z'
currency: USD
last_ip_address:
shipment_total: '100.0'
@@ -5482,7 +5480,7 @@ paths:
id: '47'
type: order
attributes:
- number: R009936277
+ number: R163007838
item_total: '10.0'
total: '110.0'
state: delivery
@@ -5493,8 +5491,8 @@ paths:
payment_state:
email: new@example.com
special_instructions:
- created_at: '2021-10-13T17:20:57.569Z'
- updated_at: '2021-10-13T17:20:57.649Z'
+ created_at: '2021-10-20T13:33:42.929Z'
+ updated_at: '2021-10-20T13:33:43.053Z'
currency: USD
last_ip_address:
shipment_total: '100.0'
@@ -5668,7 +5666,7 @@ paths:
id: '52'
type: order
attributes:
- number: R539481670
+ number: R268630481
item_total: '10.0'
total: '110.0'
state: payment
@@ -5677,10 +5675,10 @@ paths:
payment_total: '0.0'
shipment_state:
payment_state:
- email: leonor@bergeluettgen.com
+ email: eleonor@quitzon.name
special_instructions:
- created_at: '2021-10-13T17:20:58.186Z'
- updated_at: '2021-10-13T17:20:58.343Z'
+ created_at: '2021-10-20T13:33:43.869Z'
+ updated_at: '2021-10-20T13:33:44.052Z'
currency: USD
last_ip_address:
shipment_total: '100.0'
@@ -5807,7 +5805,7 @@ paths:
id: '54'
type: order
attributes:
- number: R567218180
+ number: R398577232
item_total: '10.0'
total: '110.0'
state: payment
@@ -5816,10 +5814,10 @@ paths:
payment_total: '0.0'
shipment_state:
payment_state:
- email: ileen.sanford@wunsch.name
+ email: keiko_spencer@durgankeeling.com
special_instructions:
- created_at: '2021-10-13T17:20:58.509Z'
- updated_at: '2021-10-13T17:20:58.616Z'
+ created_at: '2021-10-20T13:33:44.285Z'
+ updated_at: '2021-10-20T13:33:44.454Z'
currency: USD
last_ip_address:
shipment_total: '100.0'
@@ -5946,19 +5944,19 @@ paths:
id: '56'
type: order
attributes:
- number: R437277477
+ number: R304425300
item_total: '10.0'
total: '110.0'
state: complete
adjustment_total: '0.0'
- completed_at: '2021-10-13T17:20:58.974Z'
+ completed_at: '2021-10-20T13:33:45.222Z'
payment_total: '0.0'
shipment_state: pending
payment_state: balance_due
- email: daryl_veum@zieme.info
+ email: jacquelin_bayer@bauch.ca
special_instructions:
- created_at: '2021-10-13T17:20:58.768Z'
- updated_at: '2021-10-13T17:20:58.974Z'
+ created_at: '2021-10-20T13:33:44.682Z'
+ updated_at: '2021-10-20T13:33:45.222Z'
currency: USD
last_ip_address:
shipment_total: '100.0'
@@ -6096,7 +6094,7 @@ paths:
id: '59'
type: order
attributes:
- number: R153460644
+ number: R499447624
item_total: '0.0'
total: '0.0'
state: cart
@@ -6105,10 +6103,10 @@ paths:
payment_total: '0.0'
shipment_state:
payment_state:
- email: elnora@hickledach.co.uk
+ email: stefany@casper.ca
special_instructions:
- created_at: '2021-10-13T17:20:59.245Z'
- updated_at: '2021-10-13T17:20:59.353Z'
+ created_at: '2021-10-20T13:33:45.608Z'
+ updated_at: '2021-10-20T13:33:45.741Z'
currency: USD
last_ip_address:
shipment_total: '0.0'
@@ -6230,7 +6228,7 @@ paths:
id: '61'
type: order
attributes:
- number: R424079368
+ number: R272280314
item_total: '10.0'
total: '110.0'
state: delivery
@@ -6239,10 +6237,10 @@ paths:
payment_total: '0.0'
shipment_state:
payment_state:
- email: marissa@treutel.biz
+ email: johnathan.hintz@jenkinssawayn.info
special_instructions:
- created_at: '2021-10-13T17:20:59.512Z'
- updated_at: '2021-10-13T17:20:59.586Z'
+ created_at: '2021-10-20T13:33:46.059Z'
+ updated_at: '2021-10-20T13:33:46.163Z'
currency: USD
last_ip_address:
shipment_total: '100.0'
@@ -6368,19 +6366,19 @@ paths:
id: '63'
type: order
attributes:
- number: R649833237
+ number: R479685123
item_total: '10.0'
total: '10.0'
state: canceled
adjustment_total: '0.0'
- completed_at: '2021-10-13T17:20:59.847Z'
+ completed_at: '2021-10-20T13:33:46.504Z'
payment_total: '0.0'
shipment_state: canceled
payment_state: void
- email: sofia@brakus.us
+ email: marlene@ortizlarkin.co.uk
special_instructions:
- created_at: '2021-10-13T17:20:59.739Z'
- updated_at: '2021-10-13T17:20:59.917Z'
+ created_at: '2021-10-20T13:33:46.376Z'
+ updated_at: '2021-10-20T13:33:46.584Z'
currency: USD
last_ip_address:
shipment_total: '0.0'
@@ -6522,7 +6520,7 @@ paths:
id: '66'
type: order
attributes:
- number: R291519276
+ number: R442561215
item_total: '10.0'
total: '110.0'
state: delivery
@@ -6531,10 +6529,10 @@ paths:
payment_total: '0.0'
shipment_state:
payment_state:
- email: renita@adamsrobel.name
+ email: hildegard@hessel.ca
special_instructions:
- created_at: '2021-10-13T17:21:00.177Z'
- updated_at: '2021-10-13T17:21:00.307Z'
+ created_at: '2021-10-20T13:33:46.949Z'
+ updated_at: '2021-10-20T13:33:47.114Z'
currency: USD
last_ip_address:
shipment_total: '100.0'
@@ -6675,7 +6673,7 @@ paths:
id: '69'
type: order
attributes:
- number: R103037011
+ number: R292417133
item_total: '10.0'
total: '10.0'
state: delivery
@@ -6684,10 +6682,10 @@ paths:
payment_total: '0.0'
shipment_state:
payment_state:
- email: verla@wiza.co.uk
+ email: marceline.durgan@jast.us
special_instructions:
- created_at: '2021-10-13T17:21:00.613Z'
- updated_at: '2021-10-13T17:21:00.752Z'
+ created_at: '2021-10-20T13:33:47.521Z'
+ updated_at: '2021-10-20T13:33:47.793Z'
currency: USD
last_ip_address:
shipment_total: '100.0'
@@ -6841,14 +6839,14 @@ paths:
type: shipping_category
attributes:
name: 'ShippingCategory #103'
- created_at: '2021-10-13T17:21:01.028Z'
- updated_at: '2021-10-13T17:21:01.028Z'
+ created_at: '2021-10-20T13:33:48.154Z'
+ updated_at: '2021-10-20T13:33:48.154Z'
- id: '104'
type: shipping_category
attributes:
name: 'ShippingCategory #104'
- created_at: '2021-10-13T17:21:01.029Z'
- updated_at: '2021-10-13T17:21:01.029Z'
+ created_at: '2021-10-20T13:33:48.156Z'
+ updated_at: '2021-10-20T13:33:48.156Z'
meta:
count: 2
total_count: 2
@@ -6896,8 +6894,8 @@ paths:
type: shipping_category
attributes:
name: 'ShippingCategory #107'
- created_at: '2021-10-13T17:21:01.073Z'
- updated_at: '2021-10-13T17:21:01.073Z'
+ created_at: '2021-10-20T13:33:48.213Z'
+ updated_at: '2021-10-20T13:33:48.213Z'
'422':
description: invalid request
content:
@@ -6949,8 +6947,8 @@ paths:
type: shipping_category
attributes:
name: 'ShippingCategory #108'
- created_at: '2021-10-13T17:21:01.101Z'
- updated_at: '2021-10-13T17:21:01.101Z'
+ created_at: '2021-10-20T13:33:48.250Z'
+ updated_at: '2021-10-20T13:33:48.250Z'
'404':
description: Record not found
content:
@@ -7001,8 +6999,8 @@ paths:
type: shipping_category
attributes:
name: Default
- created_at: '2021-10-13T17:21:01.149Z'
- updated_at: '2021-10-13T17:21:01.155Z'
+ created_at: '2021-10-20T13:33:48.317Z'
+ updated_at: '2021-10-20T13:33:48.325Z'
'422':
description: invalid request
content:
@@ -7125,8 +7123,8 @@ paths:
lft: 2
rgt: 3
description:
- created_at: '2021-10-13T17:21:01.315Z'
- updated_at: '2021-10-13T17:21:01.318Z'
+ created_at: '2021-10-20T13:33:48.547Z'
+ updated_at: '2021-10-20T13:33:48.552Z'
meta_title:
meta_description:
meta_keywords:
@@ -7160,8 +7158,8 @@ paths:
lft: 4
rgt: 5
description:
- created_at: '2021-10-13T17:21:01.364Z'
- updated_at: '2021-10-13T17:21:01.368Z'
+ created_at: '2021-10-20T13:33:48.632Z'
+ updated_at: '2021-10-20T13:33:48.637Z'
meta_title:
meta_description:
meta_keywords:
@@ -7195,8 +7193,8 @@ paths:
lft: 1
rgt: 6
description:
- created_at: '2021-10-13T17:21:01.261Z'
- updated_at: '2021-10-13T17:21:01.376Z'
+ created_at: '2021-10-20T13:33:48.466Z'
+ updated_at: '2021-10-20T13:33:48.649Z'
meta_title:
meta_description:
meta_keywords:
@@ -7273,8 +7271,8 @@ paths:
lft: 2
rgt: 3
description:
- created_at: '2021-10-13T17:21:01.577Z'
- updated_at: '2021-10-13T17:21:01.581Z'
+ created_at: '2021-10-20T13:33:48.970Z'
+ updated_at: '2021-10-20T13:33:48.976Z'
meta_title:
meta_description:
meta_keywords:
@@ -7355,8 +7353,8 @@ paths:
lft: 2
rgt: 3
description:
- created_at: '2021-10-13T17:21:01.671Z'
- updated_at: '2021-10-13T17:21:01.674Z'
+ created_at: '2021-10-20T13:33:49.139Z'
+ updated_at: '2021-10-20T13:33:49.152Z'
meta_title:
meta_description:
meta_keywords:
@@ -7438,8 +7436,8 @@ paths:
lft: 2
rgt: 3
description:
- created_at: '2021-10-13T17:21:01.858Z'
- updated_at: '2021-10-13T17:21:01.879Z'
+ created_at: '2021-10-20T13:33:49.543Z'
+ updated_at: '2021-10-20T13:33:49.579Z'
meta_title:
meta_description:
meta_keywords:
@@ -7580,9 +7578,9 @@ paths:
- id: '73'
type: user
attributes:
- email: carol@lubowitz.biz
- created_at: '2021-10-13T17:21:02.289Z'
- updated_at: '2021-10-13T17:21:02.289Z'
+ email: yolando@wolf.co.uk
+ created_at: '2021-10-20T13:33:50.213Z'
+ updated_at: '2021-10-20T13:33:50.213Z'
average_order_value: []
lifetime_value: []
store_credits: []
@@ -7594,9 +7592,9 @@ paths:
- id: '74'
type: user
attributes:
- email: tobi_sawayn@cole.name
- created_at: '2021-10-13T17:21:02.295Z'
- updated_at: '2021-10-13T17:21:02.295Z'
+ email: marcelle@oberbrunner.us
+ created_at: '2021-10-20T13:33:50.220Z'
+ updated_at: '2021-10-20T13:33:50.220Z'
average_order_value: []
lifetime_value: []
store_credits: []
@@ -7608,9 +7606,9 @@ paths:
- id: '75'
type: user
attributes:
- email: bea_kunze@bogan.info
- created_at: '2021-10-13T17:21:02.296Z'
- updated_at: '2021-10-13T17:21:02.296Z'
+ email: werner_kovacek@littel.us
+ created_at: '2021-10-20T13:33:50.222Z'
+ updated_at: '2021-10-20T13:33:50.222Z'
average_order_value: []
lifetime_value: []
store_credits: []
@@ -7665,9 +7663,9 @@ paths:
id: '80'
type: user
attributes:
- email: jimmie@dare.biz
- created_at: '2021-10-13T17:21:02.358Z'
- updated_at: '2021-10-13T17:21:02.358Z'
+ email: rosalie@schuster.biz
+ created_at: '2021-10-20T13:33:50.327Z'
+ updated_at: '2021-10-20T13:33:50.327Z'
average_order_value: []
lifetime_value: []
store_credits: []
@@ -7726,9 +7724,9 @@ paths:
id: '83'
type: user
attributes:
- email: jackie.wisoky@mckenzie.us
- created_at: '2021-10-13T17:21:02.402Z'
- updated_at: '2021-10-13T17:21:02.402Z'
+ email: margrett@oharaledner.ca
+ created_at: '2021-10-20T13:33:50.387Z'
+ updated_at: '2021-10-20T13:33:50.387Z'
average_order_value: []
lifetime_value: []
store_credits: []
@@ -7787,8 +7785,8 @@ paths:
type: user
attributes:
email: john@example.com
- created_at: '2021-10-13T17:21:02.472Z'
- updated_at: '2021-10-13T17:21:02.481Z'
+ created_at: '2021-10-20T13:33:50.474Z'
+ updated_at: '2021-10-20T13:33:50.487Z'
average_order_value: []
lifetime_value: []
store_credits: []
@@ -7862,6 +7860,354 @@ paths:
Example:
value:
error: The access token is invalid
+ "/api/v2/platform/variants":
+ get:
+ summary: Return a list of Variants
+ tags:
+ - Variants
+ security:
+ - bearer_auth: []
+ description: Returns a list of Variants
+ operationId: variants-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:
+ https://jsonapi.org/format/#fetching-includes'
+ example: product,tax_category,images,digitals
+ schema:
+ type: string
+ - name: filter[product_id_eq]
+ in: query
+ description: ''
+ example: '1'
+ schema:
+ type: string
+ - name: filter[sku_i_cont]
+ in: query
+ description: ''
+ example: SKU123
+ schema:
+ type: string
+ responses:
+ '200':
+ description: Records returned
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ data:
+ - id: '237'
+ type: variant
+ attributes:
+ sku: SKU-237
+ weight: '0.0'
+ height:
+ depth:
+ deleted_at:
+ is_master: true
+ cost_price: '17.0'
+ position: 1
+ cost_currency: USD
+ track_inventory: true
+ updated_at: '2021-10-20T13:33:50.727Z'
+ discontinue_on:
+ created_at: '2021-10-20T13:33:50.720Z'
+ display_compare_at_price:
+ display_price: "$19.99"
+ name: 'Product #170 - 5909'
+ options_text: ''
+ total_on_hand: 0
+ purchasable: true
+ in_stock: false
+ backorderable: true
+ available: true
+ currency: USD
+ price: '19.99'
+ compare_at_price:
+ relationships:
+ product:
+ data:
+ id: '170'
+ type: product
+ tax_category:
+ data:
+ digitals:
+ data: []
+ images:
+ data: []
+ option_values:
+ data: []
+ stock_items:
+ data:
+ - id: '264'
+ type: stock_item
+ stock_locations:
+ data:
+ - id: '130'
+ type: stock_location
+ - id: '238'
+ type: variant
+ attributes:
+ sku: SKU-238
+ weight: '105.97'
+ height: '141.23'
+ depth: '121.7'
+ deleted_at:
+ is_master: false
+ cost_price: '17.0'
+ position: 2
+ cost_currency: USD
+ track_inventory: true
+ updated_at: '2021-10-20T13:33:50.760Z'
+ discontinue_on:
+ created_at: '2021-10-20T13:33:50.752Z'
+ display_compare_at_price:
+ display_price: "$19.99"
+ name: 'Product #170 - 5909'
+ options_text: 'Size: S'
+ total_on_hand: 0
+ purchasable: true
+ in_stock: false
+ backorderable: true
+ available: true
+ currency: USD
+ price: '19.99'
+ compare_at_price:
+ relationships:
+ product:
+ data:
+ id: '170'
+ type: product
+ tax_category:
+ data:
+ digitals:
+ data: []
+ images:
+ data: []
+ option_values:
+ data:
+ - id: '80'
+ type: option_value
+ stock_items:
+ data:
+ - id: '265'
+ type: stock_item
+ stock_locations:
+ data:
+ - id: '130'
+ type: stock_location
+ - id: '239'
+ type: variant
+ attributes:
+ sku: SKU-239
+ weight: '36.19'
+ height: '56.45'
+ depth: '119.88'
+ deleted_at:
+ is_master: false
+ cost_price: '17.0'
+ position: 3
+ cost_currency: USD
+ track_inventory: true
+ updated_at: '2021-10-20T13:33:50.784Z'
+ discontinue_on:
+ created_at: '2021-10-20T13:33:50.775Z'
+ display_compare_at_price:
+ display_price: "$19.99"
+ name: 'Product #170 - 5909'
+ options_text: 'Size: S'
+ total_on_hand: 0
+ purchasable: true
+ in_stock: false
+ backorderable: true
+ available: true
+ currency: USD
+ price: '19.99'
+ compare_at_price:
+ relationships:
+ product:
+ data:
+ id: '170'
+ type: product
+ tax_category:
+ data:
+ digitals:
+ data: []
+ images:
+ data: []
+ option_values:
+ data:
+ - id: '81'
+ type: option_value
+ stock_items:
+ data:
+ - id: '266'
+ type: stock_item
+ stock_locations:
+ data:
+ - id: '130'
+ type: stock_location
+ meta:
+ count: 3
+ total_count: 3
+ total_pages: 1
+ links:
+ self: http://www.example.com/api/v2/platform/variants?page=1&per_page=&include=&filter[product_id_eq]=&filter[sku_i_cont]=
+ next: http://www.example.com/api/v2/platform/variants?filter%5Bproduct_id_eq%5D=&filter%5Bsku_i_cont%5D=&include=&page=1&per_page=
+ prev: http://www.example.com/api/v2/platform/variants?filter%5Bproduct_id_eq%5D=&filter%5Bsku_i_cont%5D=&include=&page=1&per_page=
+ last: http://www.example.com/api/v2/platform/variants?filter%5Bproduct_id_eq%5D=&filter%5Bsku_i_cont%5D=&include=&page=1&per_page=
+ first: http://www.example.com/api/v2/platform/variants?filter%5Bproduct_id_eq%5D=&filter%5Bsku_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
+ "/api/v2/platform/variants/{id}":
+ get:
+ summary: Return a Variant
+ tags:
+ - Variants
+ security:
+ - bearer_auth: []
+ description: Returns a Variant
+ operationId: show-variant
+ 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:
+ https://jsonapi.org/format/#fetching-includes'
+ example: product,tax_category,images,digitals
+ schema:
+ type: string
+ responses:
+ '200':
+ description: Record found
+ content:
+ application/vnd.api+json:
+ examples:
+ Example:
+ value:
+ data:
+ id: '244'
+ type: variant
+ attributes:
+ sku: SKU-244
+ weight: '156.9'
+ height: '148.9'
+ depth: '87.76'
+ deleted_at:
+ is_master: false
+ cost_price: '17.0'
+ position: 2
+ cost_currency: USD
+ track_inventory: true
+ updated_at: '2021-10-20T13:33:51.096Z'
+ discontinue_on:
+ created_at: '2021-10-20T13:33:51.088Z'
+ display_compare_at_price:
+ display_price: "$19.99"
+ name: 'Product #172 - 6559'
+ options_text: 'Size: S'
+ total_on_hand: 0
+ purchasable: true
+ in_stock: false
+ backorderable: true
+ available: true
+ currency: USD
+ price: '19.99'
+ compare_at_price:
+ relationships:
+ product:
+ data:
+ id: '172'
+ type: product
+ tax_category:
+ data:
+ digitals:
+ data: []
+ images:
+ data: []
+ option_values:
+ data:
+ - id: '84'
+ type: option_value
+ stock_items:
+ data:
+ - id: '271'
+ type: stock_item
+ stock_locations:
+ data:
+ - id: '132'
+ type: stock_location
+ '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
+ delete:
+ summary: Delete a Variant
+ tags:
+ - Variants
+ security:
+ - bearer_auth: []
+ description: Deletes a Variant
+ operationId: delete-variant
+ parameters:
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: string
+ responses:
+ '204':
+ description: Record deleted
+ '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/wished_items":
get:
summary: Return a list of Wished Items
@@ -7902,8 +8248,8 @@ paths:
type: wished_item
attributes:
quantity: 1
- created_at: '2021-10-13T17:21:02.757Z'
- updated_at: '2021-10-13T17:21:02.757Z'
+ created_at: '2021-10-20T13:33:51.950Z'
+ updated_at: '2021-10-20T13:33:51.950Z'
display_price: "$19.99"
display_total: "$19.99"
price: '19.99'
@@ -7911,14 +8257,14 @@ paths:
relationships:
variant:
data:
- id: '240'
+ id: '254'
type: variant
- id: '2'
type: wished_item
attributes:
quantity: 1
- created_at: '2021-10-13T17:21:02.797Z'
- updated_at: '2021-10-13T17:21:02.797Z'
+ created_at: '2021-10-20T13:33:52.026Z'
+ updated_at: '2021-10-20T13:33:52.026Z'
display_price: "$19.99"
display_total: "$19.99"
price: '19.99'
@@ -7926,14 +8272,14 @@ paths:
relationships:
variant:
data:
- id: '242'
+ id: '256'
type: variant
- id: '3'
type: wished_item
attributes:
quantity: 1
- created_at: '2021-10-13T17:21:02.839Z'
- updated_at: '2021-10-13T17:21:02.839Z'
+ created_at: '2021-10-20T13:33:52.110Z'
+ updated_at: '2021-10-20T13:33:52.110Z'
display_price: "$19.99"
display_total: "$19.99"
price: '19.99'
@@ -7941,14 +8287,14 @@ paths:
relationships:
variant:
data:
- id: '244'
+ id: '258'
type: variant
- id: '4'
type: wished_item
attributes:
quantity: 1
- created_at: '2021-10-13T17:21:02.880Z'
- updated_at: '2021-10-13T17:21:02.880Z'
+ created_at: '2021-10-20T13:33:52.191Z'
+ updated_at: '2021-10-20T13:33:52.191Z'
display_price: "$19.99"
display_total: "$19.99"
price: '19.99'
@@ -7956,7 +8302,7 @@ paths:
relationships:
variant:
data:
- id: '246'
+ id: '260'
type: variant
meta:
count: 4
@@ -8005,8 +8351,8 @@ paths:
type: wished_item
attributes:
quantity: 1
- created_at: '2021-10-13T17:21:03.252Z'
- updated_at: '2021-10-13T17:21:03.252Z'
+ created_at: '2021-10-20T13:33:52.720Z'
+ updated_at: '2021-10-20T13:33:52.720Z'
display_price: "$19.99"
display_total: "$19.99"
price: '19.99'
@@ -8014,7 +8360,7 @@ paths:
relationships:
variant:
data:
- id: '258'
+ id: '272'
type: variant
'422':
description: invalid request
@@ -8072,8 +8418,8 @@ paths:
type: wished_item
attributes:
quantity: 1
- created_at: '2021-10-13T17:21:03.448Z'
- updated_at: '2021-10-13T17:21:03.448Z'
+ created_at: '2021-10-20T13:33:53.030Z'
+ updated_at: '2021-10-20T13:33:53.030Z'
display_price: "$19.99"
display_total: "$19.99"
price: '19.99'
@@ -8081,7 +8427,7 @@ paths:
relationships:
variant:
data:
- id: '264'
+ id: '278'
type: variant
'404':
description: Record not found
@@ -8133,8 +8479,8 @@ paths:
type: wished_item
attributes:
quantity: 3
- created_at: '2021-10-13T17:21:03.748Z'
- updated_at: '2021-10-13T17:21:03.756Z'
+ created_at: '2021-10-20T13:33:53.463Z'
+ updated_at: '2021-10-20T13:33:53.473Z'
display_price: "$19.99"
display_total: "$59.97"
price: '19.99'
@@ -8142,7 +8488,7 @@ paths:
relationships:
variant:
data:
- id: '274'
+ id: '288'
type: variant
'422':
description: invalid request
@@ -8257,9 +8603,9 @@ paths:
name: Black Friday
is_private: true
is_default: false
- created_at: '2021-10-13T17:21:04.464Z'
- updated_at: '2021-10-13T17:21:04.464Z'
- token: xLVuuiPrips42QJTGqdSw6cV
+ created_at: '2021-10-20T13:33:54.408Z'
+ updated_at: '2021-10-20T13:33:54.408Z'
+ token: QdxVdowg2b9SymdQEGy34Evg
variant_included: false
relationships:
wished_items:
@@ -8274,9 +8620,9 @@ paths:
name: Birthday
is_private: true
is_default: false
- created_at: '2021-10-13T17:21:04.465Z'
- updated_at: '2021-10-13T17:21:04.465Z'
- token: 2AEo7PzktfoWBMJNZ82twpuD
+ created_at: '2021-10-20T13:33:54.411Z'
+ updated_at: '2021-10-20T13:33:54.411Z'
+ token: 9erHugRXC55T5SzX5jq5wMkA
variant_included: false
relationships:
wished_items:
@@ -8334,9 +8680,9 @@ paths:
name: Wishlist_26
is_private: true
is_default: false
- created_at: '2021-10-13T17:21:04.891Z'
- updated_at: '2021-10-13T17:21:04.891Z'
- token: Fbev1pVhLgqamsHuWFL4rHuD
+ created_at: '2021-10-20T13:33:55.127Z'
+ updated_at: '2021-10-20T13:33:55.127Z'
+ token: 5ozT3g7idkZHwR3NddgiWMt2
variant_included: false
relationships:
wished_items:
@@ -8396,9 +8742,9 @@ paths:
name: My Wishlist
is_private: true
is_default: false
- created_at: '2021-10-13T17:21:04.925Z'
- updated_at: '2021-10-13T17:21:04.925Z'
- token: nhrbATdmsquKQXS3C9jVrRuo
+ created_at: '2021-10-20T13:33:55.181Z'
+ updated_at: '2021-10-20T13:33:55.181Z'
+ token: jmSBpZAMx3Y3D3vWz85gwyLZ
variant_included: false
relationships:
wished_items:
@@ -8455,9 +8801,9 @@ paths:
name: My Super Wishlist
is_private: true
is_default: false
- created_at: '2021-10-13T17:21:04.982Z'
- updated_at: '2021-10-13T17:21:04.990Z'
- token: h2n8S1bj722EUGgQyWcQhs2Q
+ created_at: '2021-10-20T13:33:55.267Z'
+ updated_at: '2021-10-20T13:33:55.279Z'
+ token: P6hDWBpCDQa4psrEn3W1fsTT
variant_included: false
relationships:
wished_items:
@@ -8552,6 +8898,7 @@ tags:
- name: Users
- name: Wishlists
- name: Wished Items
+- name: Variants
components:
securitySchemes:
bearer_auth:
@@ -8737,7 +9084,7 @@ components:
completed_at:
type: string
format: date_time
- example: 2021-10-13 17:20:36 UTC
+ example: 2021-10-20 13:33:09 UTC
bill_address_id:
type: string
example: '1'
@@ -8805,7 +9152,7 @@ components:
approved_at:
type: string
format: date_time
- example: 2021-10-13 17:20:36 UTC
+ example: 2021-10-20 13:33:09 UTC
confirmation_delivered:
type: boolean
example: true
diff --git a/api/spec/integration/api/v2/platform/variants_spec.rb b/api/spec/integration/api/v2/platform/variants_spec.rb
new file mode 100644
index 00000000000..551774db368
--- /dev/null
+++ b/api/spec/integration/api/v2/platform/variants_spec.rb
@@ -0,0 +1,44 @@
+require 'swagger_helper'
+
+describe 'Variants API', swagger: true do
+ include_context 'Platform API v2'
+
+ resource_name = 'Variant'
+ options = {
+ include_example: 'product,tax_category,images,digitals',
+ filter_examples: [{ name: 'filter[product_id_eq]', example: '1' },
+ { name: 'filter[sku_i_cont]', example: 'SKU123' }]
+ }
+
+ let(:id) { create(:variant, product: product).id }
+ let(:product) { create(:product, stores: [store], option_types: [option_type]) }
+ let(:option_type) { create(:option_type) }
+ let(:option_value) { create(:option_value, option_type: option_type) }
+ let(:records_list) { create_list(:variant, 2, product: product) }
+ let(:valid_create_param_value) { build(:variant, product: product).attributes.merge(option_value_ids: [option_value.id]) }
+ let(:valid_update_param_value) do
+ {
+ sku: 'SKU987'
+ }
+ end
+ let(:invalid_param_value) do
+ {
+ sku: '',
+ }
+ end
+
+ # include_examples 'CRUD examples', resource_name, options
+
+ resource_path = resource_name.parameterize(separator: '_').pluralize
+
+ path "/api/v2/platform/#{resource_path}" do
+ include_examples 'GET records list', resource_name, options
+ # include_examples 'POST create record', 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, options
+ end
+end
diff --git a/api/spec/swagger_helper.rb b/api/spec/swagger_helper.rb
index 965b0ed9690..96739545ee1 100644
--- a/api/spec/swagger_helper.rb
+++ b/api/spec/swagger_helper.rb
@@ -58,7 +58,8 @@
{ name: 'Taxons' },
{ name: 'Users' },
{ name: 'Wishlists' },
- { name: 'Wished Items' }
+ { name: 'Wished Items' },
+ { name: 'Variants' }
],
components: {
securitySchemes: {
diff --git a/core/app/models/spree/variant.rb b/core/app/models/spree/variant.rb
index 7ae937fe9fd..6c9877b0af4 100644
--- a/core/app/models/spree/variant.rb
+++ b/core/app/models/spree/variant.rb
@@ -110,8 +110,8 @@ class Variant < Spree::Base
end
end
- self.whitelisted_ransackable_associations = %w[option_values product prices default_price]
- self.whitelisted_ransackable_attributes = %w[weight sku]
+ self.whitelisted_ransackable_associations = %w[option_values product tax_category prices default_price]
+ self.whitelisted_ransackable_attributes = %w[weight depth width height sku discontinue_on is_master cost_price cost_currency track_inventory deleted_at]
self.whitelisted_ransackable_scopes = %i(product_name_or_sku_cont search_by_product_name_or_sku)
def self.product_name_or_sku_cont(query)