Skip to content

armgit / spree

Public Imported from GitHub
0

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.

Added missing totals for DeliveryRate and Fullfillment (#13916)

Damian Legawiecd0beef3310e0
diff --git a/docs/api-reference/store.yaml b/docs/api-reference/store.yaml
index 4d0a99b79b..a5761f3531 100644
--- a/docs/api-reference/store.yaml
+++ b/docs/api-reference/store.yaml
@@ -590,13 +590,13 @@ paths:
content:
application/json:
example:
- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjBmZWUzZGU1LTQ2NjMtNDhkYS05YjljLWEwNDMyNzhkNmViOSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc1NjQ1ODkxfQ.ECWom--FFBtI-gI7S_h0nfkyOEsRdQJ6GebmNbhlg4s
- refresh_token: 9q3QbTUDgwwxv11f9JrhtwGV
+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6ImNjYWU3OThjLTIxNTYtNGM5Mi04YzA5LWIxMDViMDZmYTNlNSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc2MTYxODIyfQ.K9UvQDyZ1Z2-NgFQ--azTRbyk8Syd4gJGR8y8Kv06NE
+ refresh_token: jfUcHe3M3sksXfCJhrbgSTKV
user:
id: cus_UkLWZg9DAJ
- first_name: Harry
- last_name: Greenholt
+ first_name: Jodie
+ last_name: Welch
phone:
accepts_email_marketing: false
available_store_credit_total: '0'
@@ -671,13 +671,13 @@ paths:
content:
application/json:
example:
- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjJmMTExN2U1LTY1YTQtNGZhMy04ZmJjLWVlY2E5ODM0NWM0MyIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc1NjQ1ODkyfQ.5022SB2pG7NOz7yQi0Bs80KBEDRzmB1t9fM_HMS4I8c
- refresh_token: 5mvs59ePq49Lx5onjiSM7Dud
+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjY0MWQ5Y2NmLTNhM2EtNDk2OS1hNWUyLWUwNWViZjdmYWIxNyIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc2MTYxODIzfQ.6CIayRaSgbOgiwJyuweu92lgkwboaEufAQDHjrWCR5Y
+ refresh_token: NPstvWaaAHLokJkeKyfY4TzG
user:
id: cus_UkLWZg9DAJ
- first_name: Irene
- last_name: Willms
+ first_name: Shiloh
+ last_name: Robel
phone:
accepts_email_marketing: false
available_store_credit_total: '0'
@@ -843,9 +843,9 @@ paths:
data:
- id: cart_gbHJdmfrXB
market_id:
- number: R596620236
- token: PGFmFM4qsZgsSRirmpcM1GMwdPwqEh8Nwc1
+ number: R232078179
+ token: zG15ZP7pVhYDcfbgTYU4hiq8aXojPfSy4c3
customer_note:
currency: USD
locale: en
@@ -887,8 +887,8 @@ paths:
variant_id: variant_gbHJdmfrXB
quantity: 1
currency: USD
- name: Product 25188
- slug: product-25188
+ name: Product 27264
+ slug: product-27264
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -913,11 +913,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_gbHJdmfrXB
- number: H26187165140
+ number: H29082671412
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
+ total: '100.0'
+ display_total: "$100.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -932,7 +942,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_32
- name: Gil Zemlak
+ name: Kandace Kulas
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -945,7 +955,15 @@ paths:
name: UPS Ground
selected: true
cost: '100.0'
+ total: '100.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$100.00"
+ display_total: "$100.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_gbHJdmfrXB
name: UPS Ground
@@ -994,9 +1012,9 @@ paths:
market:
- id: cart_UkLWZg9DAJ
market_id:
- number: R561616820
- token: hhLTYkZ8y8MjpYnPDMBuhb9m9GT6Bxv7aJf
+ number: R676619505
+ token: JoRTMBpiuETzPG5ZjdvhR2oh3on6SLe5Esg
customer_note:
currency: USD
locale: en
@@ -1038,8 +1056,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 13083
- slug: product-13083
+ name: Product 12178
+ slug: product-12178
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -1064,11 +1082,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H87312383176
+ number: H94768987826
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
+ total: '100.0'
+ display_total: "$100.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -1083,7 +1111,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_32
- name: Gil Zemlak
+ name: Kandace Kulas
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -1096,7 +1124,15 @@ paths:
name: UPS Ground
selected: true
cost: '100.0'
+ total: '100.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$100.00"
+ display_total: "$100.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_UkLWZg9DAJ
name: UPS Ground
@@ -1218,8 +1254,8 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R708931985
- token: 9SVHWZNBByB1yz3SAmwNtHTf7LVGUQjFSAv
+ number: R943663093
+ token: FievmZcr9NHVLz13M8ohRrcBjevgVjbRbVC
email:
customer_note:
currency: USD
@@ -1374,9 +1410,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R034461921
- token: 6k5KMEv2v8WQFZ8FxLyxSWdi68dX9jhiE7A
+ number: R938172735
+ token: mq3o1sSWFULnd4nAKvThhRNgaEnAyNZBf5D
customer_note:
currency: USD
locale: en
@@ -1403,7 +1439,7 @@ paths:
display_delivery_total: "$0.00"
warnings:
- code: line_item_removed
- message: Product 6491 was removed because it was sold out
+ message: Product 62602 was removed because it was sold out
line_item_id: li_UkLWZg9DAJ
variant_id: variant_UkLWZg9DAJ
store_credit_total: '0.0'
@@ -1545,9 +1581,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R142893616
- token: WiGCZ3S7fmL8DdrA2QtzAvbt5JUxvgaxeLF
+ number: R252724618
+ token: E4K899xK1ZBq7ruLV2dwq4gxKXekKhFiVKb
customer_note: Leave at door
currency: USD
locale: en
@@ -1591,8 +1627,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 76976
- slug: product-76976
+ name: Product 7619
+ slug: product-7619
options_text: ''
price: '19.99'
display_price: "$19.99"
@@ -1617,11 +1653,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_gbHJdmfrXB
- number: H54886803313
+ number: H64092938149
tracking:
tracking_url:
cost: '10.0'
display_cost: "$10.00"
+ total: '10.0'
+ display_total: "$10.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -1636,7 +1682,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_46
- name: Eilene Kling
+ name: Paige Romaguera
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -1649,7 +1695,15 @@ paths:
name: UPS Ground
selected: true
cost: '10.0'
+ total: '10.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$10.00"
+ display_total: "$10.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_UkLWZg9DAJ
name: UPS Ground
@@ -1865,9 +1919,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R826345620
- token: Rh1ve6yZQZ4Q2hvtSYQwovBcPnSZ2nmTsfk
+ number: R028378406
+ token: r69yQYQREesLPoT1Ga4hYFDV4DyiRMwx9mc
customer_note:
currency: USD
locale: en
@@ -1909,8 +1963,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 98824
- slug: product-98824
+ name: Product 95368
+ slug: product-95368
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -1935,11 +1989,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H93835612610
+ number: H19674421649
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
+ total: '100.0'
+ display_total: "$100.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -1954,7 +2018,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_54
- name: Shantae Gutkowski
+ name: Kaitlin Gorczany
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -1967,7 +2031,15 @@ paths:
name: UPS Ground
selected: true
cost: '100.0'
+ total: '100.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$100.00"
+ display_total: "$100.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_UkLWZg9DAJ
name: UPS Ground
@@ -2080,8 +2152,8 @@ paths:
example:
id: or_UkLWZg9DAJ
market_id:
- number: R589411551
+ number: R019572861
customer_note:
currency: USD
locale: en
@@ -2108,7 +2180,7 @@ paths:
display_delivery_total: "$10.00"
fulfillment_status: backorder
payment_status: paid
- completed_at: '2026-04-08T09:58:19.030Z'
+ completed_at: '2026-04-14T09:17:10.133Z'
store_credit_total: '0.0'
display_store_credit_total: "$0.00"
covered_by_store_credit: false
@@ -2118,8 +2190,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 113208
- slug: product-113208
+ name: Product 116185
+ slug: product-116185
options_text: ''
price: '19.99'
display_price: "$19.99"
@@ -2144,11 +2216,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_gbHJdmfrXB
- number: H41312839821
+ number: H54059075466
tracking:
tracking_url:
cost: '10.0'
display_cost: "$10.00"
+ total: '10.0'
+ display_total: "$10.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -2163,7 +2245,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_60
- name: Basilia Bechtelar
+ name: Nanci Ruecker
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -2176,7 +2258,15 @@ paths:
name: UPS Ground
selected: true
cost: '10.0'
+ total: '10.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$10.00"
+ display_total: "$10.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_UkLWZg9DAJ
name: UPS Ground
@@ -2185,7 +2275,7 @@ paths:
- id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
response_code: '12345'
- number: PGE585F6
+ number: PCJJXDN4
amount: '29.99'
display_amount: "$29.99"
status: completed
@@ -3040,13 +3130,13 @@ paths:
content:
application/json:
example:
- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6Ijc1NzFmZjJiLWYxMTktNGY0Yi1iNmQ1LWU3ZTg0ZWExNjgxYiIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc1NjQ1OTA1fQ.ryKBh-143o4wolj2fISVWwIg5J44wx89tg2EdY53w7U
- refresh_token: DmgXjxQuaj9UgHaCzYCEa6ac
+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6Ijg2YjI5NGYxLTU4OTItNGY2YS1hOWEzLTY0ZjUwM2I0ODMxMyIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc2MTYxODM2fQ.k2zGOAOvYuPsD5raanWMRO6in3ogqqdMWbPMfSJgQc4
+ refresh_token: qjyCdgmLNW4p3XnUDXGgfVyT
user:
id: cus_UkLWZg9DAJ
- first_name: Amina
- last_name: Fritsch
+ first_name: Chelsea
+ last_name: Bayer
phone:
accepts_email_marketing: false
available_store_credit_total: '0'
@@ -3218,8 +3308,8 @@ paths:
data:
- id: or_UkLWZg9DAJ
market_id:
- number: R379644627
+ number: R003163523
customer_note:
currency: USD
locale: en
@@ -3246,7 +3336,7 @@ paths:
display_delivery_total: "$100.00"
fulfillment_status:
payment_status:
- completed_at: '2026-04-08T09:58:26.170Z'
+ completed_at: '2026-04-14T09:17:17.539Z'
store_credit_total: '0.0'
display_store_credit_total: "$0.00"
covered_by_store_credit: false
@@ -3256,8 +3346,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 203904
- slug: product-203904
+ name: Product 205526
+ slug: product-205526
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -3282,11 +3372,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H43775979798
+ number: H84142443892
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
+ total: '100.0'
+ display_total: "$100.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -3301,7 +3401,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_87
- name: Rebbeca Predovic
+ name: Annita Deckow
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -3314,7 +3414,15 @@ paths:
name: UPS Ground
selected: true
cost: '10.0'
+ total: '10.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$10.00"
+ display_total: "$10.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_UkLWZg9DAJ
name: UPS Ground
@@ -3455,8 +3563,8 @@ paths:
example:
id: or_UkLWZg9DAJ
market_id:
- number: R235719220
+ number: R701124602
customer_note:
currency: USD
locale: en
@@ -3483,7 +3591,7 @@ paths:
display_delivery_total: "$100.00"
fulfillment_status:
payment_status:
- completed_at: '2026-04-08T09:58:26.874Z'
+ completed_at: '2026-04-14T09:17:18.250Z'
store_credit_total: '0.0'
display_store_credit_total: "$0.00"
covered_by_store_credit: false
@@ -3493,8 +3601,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 229897
- slug: product-229897
+ name: Product 222299
+ slug: product-222299
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -3519,11 +3627,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H01702942176
+ number: H01807094479
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
+ total: '100.0'
+ display_total: "$100.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -3538,7 +3656,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_93
- name: Lorita Vandervort
+ name: Sonya Smitham
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -3551,7 +3669,15 @@ paths:
name: UPS Ground
selected: true
cost: '10.0'
+ total: '10.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$10.00"
+ display_total: "$10.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_UkLWZg9DAJ
name: UPS Ground
@@ -3650,8 +3776,8 @@ paths:
content:
application/json:
example:
- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjY3OGI3MmIxLTQ5ZDQtNDY4Ny1iN2Y0LTEyNTAyYmRhYjk4ZiIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc1NjQ1OTA4fQ.omgQwrZl7NLo52OlCBdK7X5MqzIF14JdOWSjJlO6PI8
- refresh_token: uttVDQE8s3SNFJdNirZGkpar
+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6ImM1NGU5MzRhLWEyYTYtNDNiYi05MzA4LWNlYWY1ODE1YTMxZiIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc2MTYxODM5fQ.2_yHXmEz6hPyIQ4SBR74_XKxhkvtwDEuNQEu5dlOEOE
+ refresh_token: YsK6yzNeTHiYRJXeWGioxm64
user:
id: cus_UkLWZg9DAJ
@@ -3764,9 +3890,9 @@ paths:
application/json:
example:
id: cus_UkLWZg9DAJ
- first_name: June
- last_name: Pacocha
+ first_name: Heath
+ last_name: Roberts
phone: 555-555-0199
accepts_email_marketing: false
available_store_credit_total: '0'
@@ -3902,7 +4028,7 @@ paths:
application/json:
example:
id: cus_UkLWZg9DAJ
first_name: Updated
last_name: Name
phone: 555-555-0199
@@ -4141,9 +4267,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R002486783
- token: NvYY79gubR89Bg5zLuRtfH1t7DakiRbRzT1
+ number: R081079159
+ token: bccBaE7xBqXGz9538mnxTfsvesKQpsfSc1z
customer_note:
currency: USD
locale: en
@@ -4192,8 +4318,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 309396
- slug: product-309396
+ name: Product 301628
+ slug: product-301628
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -4218,11 +4344,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H18429747470
+ number: H99376630233
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
+ total: '100.0'
+ display_total: "$100.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -4237,7 +4373,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_119
- name: Jannette O'Reilly
+ name: Jenee Stroman
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -4250,7 +4386,15 @@ paths:
name: UPS Ground
selected: true
cost: '100.0'
+ total: '100.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$100.00"
+ display_total: "$100.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_UkLWZg9DAJ
name: UPS Ground
@@ -4383,9 +4527,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R165598824
- token: FhjAQLZX5WaqaH8nXZrYGny7ZENnhTgHMHh
+ number: R083155091
+ token: gQqNxRcp1rMrwRE7sPnXsWSqDzXzqRMfaJ3
customer_note:
currency: USD
locale: en
@@ -4427,8 +4571,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 328866
- slug: product-328866
+ name: Product 328702
+ slug: product-328702
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -4453,11 +4597,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H33264939971
+ number: H74829810268
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
+ total: '100.0'
+ display_total: "$100.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -4472,7 +4626,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_127
- name: Van Halvorson
+ name: Carrol Lindgren
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -4485,7 +4639,15 @@ paths:
name: UPS Ground
selected: true
cost: '100.0'
+ total: '100.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$100.00"
+ display_total: "$100.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_UkLWZg9DAJ
name: UPS Ground
@@ -4607,9 +4769,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R390160320
- token: fBrGyJ29ER2pueELtERzfFZqgbExRFdoaro
+ number: R848172025
+ token: CCiBRx13RfPPoNcrsBw9ScuBBCJNx1QXDRv
customer_note:
currency: USD
locale: en
@@ -4653,8 +4815,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 348718
- slug: product-348718
+ name: Product 34283
+ slug: product-34283
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -4679,11 +4841,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H90203342203
+ number: H99037479862
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
+ total: '100.0'
+ display_total: "$100.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -4698,7 +4870,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_135
- name: Alishia Ernser
+ name: Newton Ferry
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -4711,7 +4883,15 @@ paths:
name: UPS Ground
selected: true
cost: '100.0'
+ total: '100.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$100.00"
+ display_total: "$100.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_UkLWZg9DAJ
name: UPS Ground
@@ -4847,9 +5027,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R470861463
- token: ymYuDMpSw4ohoGpP5XwfaFuv1iwRL56wUhp
+ number: R534636874
+ token: 4nAvGyaWaG5svaQmWXzEYbw2Cqr5PLHbGrX
customer_note:
currency: USD
locale: en
@@ -4888,8 +5068,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 366792
- slug: product-366792
+ name: Product 36180
+ slug: product-36180
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -4914,11 +5094,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H63710628591
+ number: H46529036013
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
+ total: '100.0'
+ display_total: "$100.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -4933,7 +5123,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_143
- name: Yee Lindgren
+ name: Grazyna Bednar
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -4946,7 +5136,15 @@ paths:
name: UPS Ground
selected: true
cost: '100.0'
+ total: '100.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$100.00"
+ display_total: "$100.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_UkLWZg9DAJ
name: UPS Ground
@@ -4954,8 +5152,8 @@ paths:
payments:
- id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
- response_code: 1-SC-20260408095837040123
- number: PCUGDSTS
+ response_code: 1-SC-20260414091727979773
+ number: PKI8ZMEE
amount: '50.0'
display_amount: "$50.00"
status: checkout
@@ -5132,9 +5330,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R344678273
- token: phfQjCVHWgLYiDYqiWFeFMSGKV16hCj6UBH
+ number: R219045203
+ token: rrFzEu6kvs9YuBXJpZR7oBq3KXXHEaBacoY
customer_note:
currency: USD
locale: en
@@ -5176,8 +5374,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 403487
- slug: product-403487
+ name: Product 406611
+ slug: product-406611
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -5202,11 +5400,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H49620448730
+ number: H26467945449
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
+ total: '100.0'
+ display_total: "$100.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -5221,7 +5429,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_159
- name: Lakeshia Renner
+ name: Hermine Mertz
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -5234,7 +5442,15 @@ paths:
name: UPS Ground
selected: true
cost: '100.0'
+ total: '100.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$100.00"
+ display_total: "$100.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_UkLWZg9DAJ
name: UPS Ground
@@ -5242,8 +5458,8 @@ paths:
payments:
- id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
- response_code: 1-SC-20260408095839833871
- number: P7J10VUG
+ response_code: 1-SC-20260414091730492369
+ number: P20ASZJU
amount: '50.0'
display_amount: "$50.00"
status: invalid
@@ -5366,7 +5582,7 @@ paths:
example:
data:
- id: gc_UkLWZg9DAJ
- code: E6C27BB29CA1F6AA
+ code: F164794534BBCB57
status: active
currency: USD
amount: '10.0'
@@ -5462,7 +5678,7 @@ paths:
application/json:
example:
id: gc_UkLWZg9DAJ
- code: 75F9CC01CD88429A
+ code: 60BC446DEE5E15E9
status: active
currency: USD
amount: '10.0'
@@ -5553,9 +5769,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R631168633
- token: CznYtspQkFTGGmn13STBw8EUXM6pMaM9jNE
+ number: R687543473
+ token: 3b8VvuGTnXJzPfb77oxZv1M7r535AjPRkBu
customer_note:
currency: USD
locale: en
@@ -5603,8 +5819,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 436595
- slug: product-436595
+ name: Product 438369
+ slug: product-438369
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -5631,8 +5847,8 @@ paths:
variant_id: variant_gbHJdmfrXB
quantity: 1
currency: USD
- name: Product 448347
- slug: product-448347
+ name: Product 441414
+ slug: product-441414
options_text: ''
price: '19.99'
display_price: "$19.99"
@@ -5775,9 +5991,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R648864808
- token: bSqmKYk78JgU7f954vdqWSPpuQUe3eEq7XU
+ number: R771412472
+ token: h7K1rG2JFmAQqoBHJ48gHSANyRC2gPenQj3
customer_note:
currency: USD
locale: en
@@ -5822,8 +6038,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 47114
- slug: product-47114
+ name: Product 47215
+ slug: product-47215
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -5946,9 +6162,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R997228084
- token: t4eecwfDgnEMDcsTEJXC3JEYW8fcrJT5awo
+ number: R491965603
+ token: PWpMqwAT7tSwZjLCus2TaUEQ1NhDtaWX8Wq
customer_note:
currency: USD
locale: en
@@ -6549,7 +6765,7 @@ paths:
example:
id: or_UkLWZg9DAJ
market_id:
- number: R364830212
+ number: R652984046
customer_note:
currency: USD
@@ -6577,7 +6793,7 @@ paths:
display_delivery_total: "$100.00"
fulfillment_status:
payment_status:
- completed_at: '2026-04-08T09:58:47.800Z'
+ completed_at: '2026-04-14T09:17:38.381Z'
store_credit_total: '0.0'
display_store_credit_total: "$0.00"
covered_by_store_credit: false
@@ -6587,8 +6803,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 511442
- slug: product-511442
+ name: Product 513431
+ slug: product-513431
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -6613,11 +6829,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H57425540041
+ number: H55045226861
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
+ total: '100.0'
+ display_total: "$100.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -6632,7 +6858,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_196
- name: Johnie Koch
+ name: Dessie Rau
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -6645,7 +6871,15 @@ paths:
name: UPS Ground
selected: true
cost: '10.0'
+ total: '10.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$10.00"
+ display_total: "$10.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_UkLWZg9DAJ
name: UPS Ground
@@ -6769,9 +7003,9 @@ paths:
id: ps_gbHJdmfrXB
status: pending
currency: USD
- external_id: bogus_4a74d30da9d9cb7ed55812c3
+ external_id: bogus_7646d7977296a750908aeb2b
external_data:
- client_secret: bogus_secret_2f3f4946be7774d9
+ client_secret: bogus_secret_34c9e32090fc0919
customer_external_id:
expires_at:
amount: '110.0'
@@ -6868,7 +7102,7 @@ paths:
id: ps_UkLWZg9DAJ
status: pending
currency: USD
- external_id: bogus_95b98d1d87b48682ef66d0a2
+ external_id: bogus_a9f87fd5747a1a113465fbfe
external_data:
client_secret: secret_123
customer_external_id:
@@ -6929,7 +7163,7 @@ paths:
id: ps_UkLWZg9DAJ
status: pending
currency: USD
- external_id: bogus_c6516b7e430fe0f784f77356
+ external_id: bogus_0a88d0a1804df8a9597e7706
external_data:
client_secret: secret_123
customer_external_id:
@@ -7030,7 +7264,7 @@ paths:
id: ps_UkLWZg9DAJ
status: completed
currency: USD
- external_id: bogus_5dbd6407a5acafead07c44ff
+ external_id: bogus_5c1f2729cc6141351419a0ae
external_data:
client_secret: secret_123
customer_external_id:
@@ -7114,8 +7348,8 @@ paths:
example:
id: pss_gbHJdmfrXB
status: pending
- external_id: bogus_seti_7bbc7cf11866d6c2a07c0116
- external_client_secret: bogus_seti_secret_6f5c9d835b0eaa42
+ external_id: bogus_seti_12499847aa63bb365aa96b1f
+ external_client_secret: bogus_seti_secret_2187772c688095e0
external_data: {}
payment_method_id: pm_UkLWZg9DAJ
payment_source_id:
@@ -7213,8 +7447,8 @@ paths:
example:
id: pss_UkLWZg9DAJ
status: pending
- external_id: seti_test_0f9774b3ec7125ec23992f5e
- external_client_secret: seti_secret_29d984592f04ca7208bcf0a7
+ external_id: seti_test_36bc96c3ae7f7ee42898e09b
+ external_client_secret: seti_secret_b06993b3d5ebe39aa50cb8e0
external_data:
client_secret: secret_123
payment_method_id: pm_UkLWZg9DAJ
@@ -7289,8 +7523,8 @@ paths:
example:
id: pss_UkLWZg9DAJ
status: completed
- external_id: seti_test_7f9aa4ec11f1e3e49c2eaaf2
- external_client_secret: seti_secret_ce0165ef4fc9b6db3f00b343
+ external_id: seti_test_108edeef19b71f5183ee50bd
+ external_client_secret: seti_secret_a9d0807f1b231b12dca14135
external_data:
client_secret: secret_123
payment_method_id: pm_UkLWZg9DAJ
@@ -7383,7 +7617,7 @@ paths:
id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
response_code:
- number: PFYUZUN8
+ number: P2D5OQFR
amount: '110.0'
display_amount: "$110.00"
status: checkout
@@ -7478,7 +7712,7 @@ paths:
body_html: ''
- id: pol_OIJLhNcSbf
name: Privacy Policy
- slug: privacy-policy-f503c800-f408-4a28-b54d-64e0e7a7dae4
+ slug: privacy-policy-e900c731-47af-4aef-b495-58ca93b269c0
body: We respect your privacy.
body_html: |
<div class="trix-content">
@@ -7722,12 +7956,12 @@ paths:
example:
data:
- id: prod_UkLWZg9DAJ
- name: Product 614694
- slug: product-614694
+ name: Product 618621
+ slug: product-618621
meta_description:
meta_keywords:
variant_count: 1
- available_on: '2025-04-08T09:58:58.425Z'
+ available_on: '2025-04-14T09:17:48.624Z'
purchasable: true
in_stock: false
backorderable: true
@@ -7749,24 +7983,24 @@ paths:
price_list_id:
original_price:
- id: prod_gbHJdmfrXB
- name: Product 627326
- slug: product-627326
+ name: Product 621163
+ slug: product-621163
meta_description:
meta_keywords:
variant_count: 0
- available_on: '2025-04-08T09:58:58.503Z'
+ available_on: '2025-04-14T09:17:48.696Z'
purchasable: true
in_stock: false
backorderable: true
available: true
- description: Illo enim cumque aspernatur consequatur quibusdam dolore.
- Ea voluptates sequi sapiente architecto voluptatem recusandae
- modi. Cupiditate ipsum repellendus aperiam dignissimos modi itaque
- dolores quaerat.
- description_html: Illo enim cumque aspernatur consequatur quibusdam
- dolore. Ea voluptates sequi sapiente architecto voluptatem recusandae
- modi. Cupiditate ipsum repellendus aperiam dignissimos modi itaque
- dolores quaerat.
+ description: Nihil nisi harum nostrum inventore pariatur exercitationem
+ animi numquam. Aspernatur atque id provident recusandae nobis
+ dolorum. Praesentium harum quasi fugiat modi esse tempore rem
+ omnis.
+ description_html: Nihil nisi harum nostrum inventore pariatur exercitationem
+ animi numquam. Aspernatur atque id provident recusandae nobis
+ dolorum. Praesentium harum quasi fugiat modi esse tempore rem
+ omnis.
default_variant_id: variant_EfhxLZ9ck8
thumbnail_url:
tags: []
@@ -7868,12 +8102,12 @@ paths:
application/json:
example:
id: prod_UkLWZg9DAJ
- name: Product 893243
- slug: product-893243
+ name: Product 896469
+ slug: product-896469
meta_description:
meta_keywords:
variant_count: 1
- available_on: '2025-04-08T09:59:00.276Z'
+ available_on: '2025-04-14T09:17:50.257Z'
purchasable: true
in_stock: false
backorderable: true
@@ -7900,7 +8134,7 @@ paths:
amount_in_cents: 999
currency: USD
display_amount: "$9.99"
- recorded_at: '2026-03-24T09:59:00Z'
+ recorded_at: '2026-03-30T09:17:50Z'
schema:
"$ref": "#/components/schemas/Product"
'404':
@@ -8275,9 +8509,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R922531465
- token: s3TTWxDeU2DGqs8at3yauaous1WGQnJy44t
+ number: R867928889
+ token: hbBeuh8TR96gYoT5qvyJL1gMxP1n6QKWKte
customer_note:
currency: USD
locale: en
@@ -8316,8 +8550,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 1095418
- slug: product-1095418
+ name: Product 1096667
+ slug: product-1096667
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -8342,11 +8576,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H78502718671
+ number: H50340603568
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
+ total: '100.0'
+ display_total: "$100.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -8361,7 +8605,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_270
- name: Korey Koch
+ name: Kimi Keebler
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -8374,7 +8618,15 @@ paths:
name: UPS Ground
selected: true
cost: '100.0'
+ total: '100.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$100.00"
+ display_total: "$100.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_UkLWZg9DAJ
name: UPS Ground
@@ -8382,8 +8634,8 @@ paths:
payments:
- id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
- response_code: 1-SC-20260408095905909691
- number: PJSXJCT6
+ response_code: 1-SC-20260414091755508264
+ number: PU2F8H3T
amount: '10.0'
display_amount: "$10.00"
status: checkout
@@ -8524,9 +8776,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R401879956
- token: guU7jm6nVdqMTst12ivuw8iDVJRgyoU46R4
+ number: R367608340
+ token: F2PVDNgqjZfuZ12mrWwEyxEopJYjVKh56hv
customer_note:
currency: USD
locale: en
@@ -8568,8 +8820,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 1111130
- slug: product-1111130
+ name: Product 1114779
+ slug: product-1114779
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -8594,11 +8846,21 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H34738055863
+ number: H75926459512
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
+ total: '100.0'
+ display_total: "$100.00"
+ discount_total: '0.0'
+ display_discount_total: "$0.00"
+ additional_tax_total: '0.0'
+ display_additional_tax_total: "$0.00"
+ included_tax_total: '0.0'
+ display_included_tax_total: "$0.00"
+ tax_total: '0.0'
+ display_tax_total: "$0.00"
status: pending
fulfillment_type: shipping
fulfilled_at:
@@ -8613,7 +8875,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_278
- name: Danelle Pouros
+ name: Lawerence Fritsch
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -8626,7 +8888,15 @@ paths:
name: UPS Ground
selected: true
cost: '100.0'
+ total: '100.0'
+ additional_tax_total: '0.0'
+ included_tax_total: '0.0'
+ tax_total: '0.0'
display_cost: "$100.00"
+ display_total: "$100.00"
+ display_additional_tax_total: "$0.00"
+ display_included_tax_total: "$0.00"
+ display_tax_total: "$0.00"
delivery_method:
id: dm_UkLWZg9DAJ
name: UPS Ground
@@ -8735,7 +9005,7 @@ paths:
data:
- id: wl_UkLWZg9DAJ
name: My Wishlist
- token: SramvG5K4zTAkvHUCaf2CmSK
+ token: 3z9Ht2V3YetVi5yEUfrhukAA
is_default: false
is_private: true
meta:
@@ -8811,7 +9081,7 @@ paths:
example:
id: wl_gbHJdmfrXB
name: Birthday Ideas
- token: JhhpRLM7ard57UCuJ9BwTzEX
+ token: cVNoCgEmKvvAXmRskBtVnHeW
is_default: false
is_private: true
schema:
@@ -8907,7 +9177,7 @@ paths:
example:
id: wl_UkLWZg9DAJ
name: My Wishlist
- token: 4HtxKcxZmzy8RifwDXRuM5Hz
+ token: TJtUtkZ4FdnWqRSN2SKhBsZ8
is_default: false
is_private: true
schema:
@@ -8969,7 +9239,7 @@ paths:
example:
id: wl_UkLWZg9DAJ
name: Updated Name
- token: xUWwHcXmcPuFZG7xrqBMR5dm
+ token: N9xNqw4gESzcvUn52WBT9yax
is_default: false
is_private: true
schema:
@@ -9899,8 +10169,24 @@ components:
type: boolean
cost:
type: string
+ total:
+ type: string
+ additional_tax_total:
+ type: string
+ included_tax_total:
+ type: string
+ tax_total:
+ type: string
display_cost:
type: string
+ display_total:
+ type: string
+ display_additional_tax_total:
+ type: string
+ display_included_tax_total:
+ type: string
+ display_tax_total:
+ type: string
delivery_method:
"$ref": "#/components/schemas/DeliveryMethod"
required:
@@ -9909,7 +10195,15 @@ components:
- name
- selected
- cost
+ - total
+ - additional_tax_total
+ - included_tax_total
+ - tax_total
- display_cost
+ - display_total
+ - display_additional_tax_total
+ - display_included_tax_total
+ - display_tax_total
- delivery_method
x-typelizer: true
DigitalLink:
@@ -10004,6 +10298,26 @@ components:
type: string
display_cost:
type: string
+ total:
+ type: string
+ display_total:
+ type: string
+ discount_total:
+ type: string
+ display_discount_total:
+ type: string
+ additional_tax_total:
+ type: string
+ display_additional_tax_total:
+ type: string
+ included_tax_total:
+ type: string
+ display_included_tax_total:
+ type: string
+ tax_total:
+ type: string
+ display_tax_total:
+ type: string
status:
type: string
fulfillment_type:
@@ -10030,6 +10344,16 @@ components:
- tracking_url
- cost
- display_cost
+ - total
+ - display_total
+ - discount_total
+ - display_discount_total
+ - additional_tax_total
+ - display_additional_tax_total
+ - included_tax_total
+ - display_included_tax_total
+ - tax_total
+ - display_tax_total
- status
- fulfillment_type
- fulfilled_at
diff --git a/packages/admin-sdk/src/types/generated/DeliveryRate.ts b/packages/admin-sdk/src/types/generated/DeliveryRate.ts
index e717a21609..c0fee45d4a 100644
--- a/packages/admin-sdk/src/types/generated/DeliveryRate.ts
+++ b/packages/admin-sdk/src/types/generated/DeliveryRate.ts
@@ -1,4 +1,4 @@
-// Typelizer digest e07c27712a6898218144f3ad2c5de612
+// Typelizer digest 7da45a1d9c723f759088396b345a3845
//
// DO NOT MODIFY: This file was automatically generated by Typelizer.
import type {DeliveryMethod} from '@/types'
@@ -9,7 +9,15 @@ interface DeliveryRate {
name: string;
selected: boolean;
cost: string;
+ total: string;
+ additional_tax_total: string;
+ included_tax_total: string;
+ tax_total: string;
display_cost: string;
+ display_total: string;
+ display_additional_tax_total: string;
+ display_included_tax_total: string;
+ display_tax_total: string;
delivery_method?: DeliveryMethod;
created_at: string;
updated_at: string;
diff --git a/packages/admin-sdk/src/types/generated/Fulfillment.ts b/packages/admin-sdk/src/types/generated/Fulfillment.ts
index 8e44e5c60f..7147e218b1 100644
--- a/packages/admin-sdk/src/types/generated/Fulfillment.ts
+++ b/packages/admin-sdk/src/types/generated/Fulfillment.ts
@@ -1,4 +1,4 @@
-// Typelizer digest 58ec8707cf1abd5ae1fe20125dad1cf8
+// Typelizer digest ac09b2c7e252da1a0f95026db19377ab
//
// DO NOT MODIFY: This file was automatically generated by Typelizer.
import type {DeliveryMethod, StockLocation, DeliveryRate, Order, Adjustment} from '@/types'
@@ -10,6 +10,16 @@ interface Fulfillment {
tracking_url: string | null;
cost: string;
display_cost: string;
+ total: string;
+ display_total: string;
+ discount_total: string;
+ display_discount_total: string;
+ additional_tax_total: string;
+ display_additional_tax_total: string;
+ included_tax_total: string;
+ display_included_tax_total: string;
+ tax_total: string;
+ display_tax_total: string;
status: string;
fulfillment_type: string;
fulfilled_at: string | null;
@@ -18,9 +28,6 @@ interface Fulfillment {
stock_location?: StockLocation;
delivery_rates?: Array<DeliveryRate>;
adjustment_total: string;
- additional_tax_total: string;
- included_tax_total: string;
- promo_total: string;
pre_tax_amount: string;
created_at: string;
updated_at: string;
diff --git a/packages/sdk/.changeset/expose-request-fn.md b/packages/sdk/.changeset/expose-request-fn.md
deleted file mode 100644
index 9dee200069..0000000000
--- a/packages/sdk/.changeset/expose-request-fn.md
+++ /dev/null
@@ -1,10 +0,0 @@
----
-"@spree/sdk": patch
----
-
-Expose `request` method on the client for calling custom API endpoints. Paths are relative to `/api/v3/store` and use the same auth headers, retry logic, and locale/currency defaults as built-in resources.
-
-```ts
-const client = createClient({ baseUrl: '...', publishableKey: '...' })
-const brands = await client.request<PaginatedResponse<Brand>>('GET', '/brands')
-```
diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md
index 964ab7a461..57e63c03da 100644
--- a/packages/sdk/CHANGELOG.md
+++ b/packages/sdk/CHANGELOG.md
@@ -1,5 +1,15 @@
# @spree/sdk
+## 1.0.1
+
+### Patch Changes
+
+- Add `total`, `display_total`, `tax_total`, `display_tax_total`, `additional_tax_total`, `display_additional_tax_total`, `included_tax_total`, and `display_included_tax_total` to `DeliveryRate` type. These fields expose post-discount pricing and tax breakdowns on each shipping rate, fixing incorrect display when free shipping promotions are applied.
+
+- Add `total`, `display_total`, `discount_total`, `display_discount_total`, `additional_tax_total`, `display_additional_tax_total`, `included_tax_total`, `display_included_tax_total`, `tax_total`, and `display_tax_total` to `Fulfillment` type. Fulfillments now include the same cost/total/tax breakdown pattern used by `LineItem` and `Cart`/`Order`.
+
+- Expose `request` method on the client for calling custom API endpoints. Paths are relative to `/api/v3/store` and use the same auth headers, retry logic, and locale/currency defaults as built-in resources.
+
## 1.0.0
### Major Release
diff --git a/packages/sdk/package.json b/packages/sdk/package.json
index cfd918c9e3..4ab8ecc3e7 100644
--- a/packages/sdk/package.json
+++ b/packages/sdk/package.json
@@ -1,6 +1,6 @@
{
"name": "@spree/sdk",
- "version": "1.0.0",
+ "version": "1.0.1",
"description": "Official TypeScript SDK for Spree Commerce Store API",
"type": "module",
"main": "./dist/index.cjs",
diff --git a/packages/sdk/src/types/generated/DeliveryRate.ts b/packages/sdk/src/types/generated/DeliveryRate.ts
index 1e9ba2aa47..c575d048ac 100644
--- a/packages/sdk/src/types/generated/DeliveryRate.ts
+++ b/packages/sdk/src/types/generated/DeliveryRate.ts
@@ -1,4 +1,4 @@
-// Typelizer digest 172f6a161a7d3bcbbc89ce880f8b21d4
+// Typelizer digest 4e65c089aaa5d72c216b0cd3c7c64537
//
// DO NOT MODIFY: This file was automatically generated by Typelizer.
import type {DeliveryMethod} from '@/types'
@@ -9,7 +9,15 @@ interface DeliveryRate {
name: string;
selected: boolean;
cost: string;
+ total: string;
+ additional_tax_total: string;
+ included_tax_total: string;
+ tax_total: string;
display_cost: string;
+ display_total: string;
+ display_additional_tax_total: string;
+ display_included_tax_total: string;
+ display_tax_total: string;
delivery_method: DeliveryMethod;
}
diff --git a/packages/sdk/src/types/generated/Fulfillment.ts b/packages/sdk/src/types/generated/Fulfillment.ts
index a7ead977dd..85f1788b3e 100644
--- a/packages/sdk/src/types/generated/Fulfillment.ts
+++ b/packages/sdk/src/types/generated/Fulfillment.ts
@@ -1,4 +1,4 @@
-// Typelizer digest a671c989604293ff2fd221f02ef80f44
+// Typelizer digest 2071a1394fbfeebc7cf206c3e3fd74a8
//
// DO NOT MODIFY: This file was automatically generated by Typelizer.
import type {DeliveryMethod, StockLocation, DeliveryRate} from '@/types'
@@ -10,6 +10,16 @@ interface Fulfillment {
tracking_url: string | null;
cost: string;
display_cost: string;
+ total: string;
+ display_total: string;
+ discount_total: string;
+ display_discount_total: string;
+ additional_tax_total: string;
+ display_additional_tax_total: string;
+ included_tax_total: string;
+ display_included_tax_total: string;
+ tax_total: string;
+ display_tax_total: string;
status: string;
fulfillment_type: string;
fulfilled_at: string | null;
diff --git a/packages/sdk/src/zod/generated/DeliveryRate.ts b/packages/sdk/src/zod/generated/DeliveryRate.ts
index 1ff2e211b0..7cf109754b 100644
--- a/packages/sdk/src/zod/generated/DeliveryRate.ts
+++ b/packages/sdk/src/zod/generated/DeliveryRate.ts
@@ -8,7 +8,15 @@ export const DeliveryRateSchema = z.object({
name: z.string(),
selected: z.boolean(),
cost: z.string(),
+ total: z.string(),
+ additional_tax_total: z.string(),
+ included_tax_total: z.string(),
+ tax_total: z.string(),
display_cost: z.string(),
+ display_total: z.string(),
+ display_additional_tax_total: z.string(),
+ display_included_tax_total: z.string(),
+ display_tax_total: z.string(),
delivery_method: DeliveryMethodSchema,
});
diff --git a/packages/sdk/src/zod/generated/Fulfillment.ts b/packages/sdk/src/zod/generated/Fulfillment.ts
index 3e1ec97500..504352c8a7 100644
--- a/packages/sdk/src/zod/generated/Fulfillment.ts
+++ b/packages/sdk/src/zod/generated/Fulfillment.ts
@@ -11,6 +11,16 @@ export const FulfillmentSchema = z.object({
tracking_url: z.string().nullable(),
cost: z.string(),
display_cost: z.string(),
+ total: z.string(),
+ display_total: z.string(),
+ discount_total: z.string(),
+ display_discount_total: z.string(),
+ additional_tax_total: z.string(),
+ display_additional_tax_total: z.string(),
+ included_tax_total: z.string(),
+ display_included_tax_total: z.string(),
+ tax_total: z.string(),
+ display_tax_total: z.string(),
status: z.string(),
fulfillment_type: z.string(),
fulfilled_at: z.string().nullable(),
diff --git a/spree/api/app/serializers/spree/api/v3/admin/fulfillment_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/fulfillment_serializer.rb
index 2373f59536..c7488351ef 100644
--- a/spree/api/app/serializers/spree/api/v3/admin/fulfillment_serializer.rb
+++ b/spree/api/app/serializers/spree/api/v3/admin/fulfillment_serializer.rb
@@ -6,12 +6,10 @@ module Spree
typelize metadata: 'Record<string, unknown> | null',
order_id: [:string, nullable: true],
stock_location_id: [:string, nullable: true],
- adjustment_total: :string, additional_tax_total: :string,
- included_tax_total: :string, promo_total: :string,
+ adjustment_total: :string,
pre_tax_amount: :string
- attributes :adjustment_total, :additional_tax_total,
- :included_tax_total, :promo_total, :pre_tax_amount,
+ attributes :adjustment_total, :pre_tax_amount,
created_at: :iso8601, updated_at: :iso8601
attribute :metadata do |shipment|
diff --git a/spree/api/app/serializers/spree/api/v3/delivery_rate_serializer.rb b/spree/api/app/serializers/spree/api/v3/delivery_rate_serializer.rb
index 110b3ae2e4..4cb72b17e8 100644
--- a/spree/api/app/serializers/spree/api/v3/delivery_rate_serializer.rb
+++ b/spree/api/app/serializers/spree/api/v3/delivery_rate_serializer.rb
@@ -3,18 +3,41 @@ module Spree
module V3
class DeliveryRateSerializer < BaseSerializer
typelize name: :string, selected: :boolean, delivery_method_id: :string,
- cost: :string, display_cost: :string
+ cost: :string, display_cost: :string,
+ total: :string, display_total: :string,
+ additional_tax_total: :string, display_additional_tax_total: :string,
+ included_tax_total: :string, display_included_tax_total: :string,
+ tax_total: :string, display_tax_total: :string
attribute :delivery_method_id do |shipping_rate|
shipping_rate.shipping_method&.prefixed_id
end
- attributes :name, :selected, :cost
+ attributes :name, :selected,
+ :cost, :total,
+ :additional_tax_total, :included_tax_total,
+ :tax_total
attribute :display_cost do |shipping_rate|
shipping_rate.display_cost.to_s
end
+ attribute :display_total do |shipping_rate|
+ shipping_rate.display_total.to_s
+ end
+
+ attribute :display_additional_tax_total do |shipping_rate|
+ shipping_rate.display_additional_tax_total.to_s
+ end
+
+ attribute :display_included_tax_total do |shipping_rate|
+ shipping_rate.display_included_tax_total.to_s
+ end
+
+ attribute :display_tax_total do |shipping_rate|
+ shipping_rate.display_tax_total.to_s
+ end
+
one :shipping_method, key: :delivery_method, resource: Spree.api.delivery_method_serializer
end
end
diff --git a/spree/api/app/serializers/spree/api/v3/fulfillment_serializer.rb b/spree/api/app/serializers/spree/api/v3/fulfillment_serializer.rb
index c4853a230d..94be676048 100644
--- a/spree/api/app/serializers/spree/api/v3/fulfillment_serializer.rb
+++ b/spree/api/app/serializers/spree/api/v3/fulfillment_serializer.rb
@@ -6,10 +6,20 @@ module Spree
tracking: [:string, nullable: true],
tracking_url: [:string, nullable: true], fulfilled_at: [:string, nullable: true],
cost: :string, display_cost: :string,
+ total: :string, display_total: :string,
+ discount_total: :string, display_discount_total: :string,
+ additional_tax_total: :string, display_additional_tax_total: :string,
+ included_tax_total: :string, display_included_tax_total: :string,
+ tax_total: :string, display_tax_total: :string,
items: 'Array<{ item_id: string; variant_id: string; quantity: number }>'
attributes :number, :tracking, :tracking_url,
- :cost, :display_cost
+ :cost, :display_cost,
+ :total, :display_total,
+ :discount_total, :display_discount_total,
+ :additional_tax_total, :display_additional_tax_total,
+ :included_tax_total, :display_included_tax_total,
+ :tax_total, :display_tax_total
attribute :status do |shipment|
shipment.state
diff --git a/spree/api/spec/serializers/spree/api/v3/delivery_rate_serializer_spec.rb b/spree/api/spec/serializers/spree/api/v3/delivery_rate_serializer_spec.rb
new file mode 100644
index 0000000000..4141f1c0ea
--- /dev/null
+++ b/spree/api/spec/serializers/spree/api/v3/delivery_rate_serializer_spec.rb
@@ -0,0 +1,92 @@
+require 'spec_helper'
+
+RSpec.describe Spree::Api::V3::DeliveryRateSerializer do
+ let(:store) { @default_store }
+ let(:base_params) { { store: store, currency: store.default_currency } }
+
+ let(:shipment) { create(:shipment) }
+ let(:shipping_rate) { shipment.shipping_rates.first }
+
+ subject { described_class.new(shipping_rate, params: base_params).to_h }
+
+ describe 'serialized attributes' do
+ it 'includes all expected attributes' do
+ expect(subject.keys).to match_array(%w[
+ id delivery_method_id name selected
+ cost display_cost total display_total
+ additional_tax_total display_additional_tax_total
+ included_tax_total display_included_tax_total
+ tax_total display_tax_total
+ delivery_method
+ ])
+ end
+
+ it 'returns cost and total' do
+ expect(subject['cost']).to eq(shipping_rate.cost)
+ expect(subject['total']).to eq(shipping_rate.total)
+ end
+
+ it 'returns display_cost and display_total' do
+ expect(subject['display_cost']).to be_present
+ expect(subject['display_total']).to be_present
+ end
+
+ it 'returns tax totals as zero when no tax rate' do
+ expect(subject['tax_total']).to eq(0)
+ expect(subject['additional_tax_total']).to eq(0)
+ expect(subject['included_tax_total']).to eq(0)
+ end
+
+ it 'returns prefixed delivery_method_id' do
+ expect(subject['delivery_method_id']).to eq(shipping_rate.shipping_method.prefixed_id)
+ end
+ end
+
+ context 'with additional tax' do
+ let(:tax_rate) { create(:tax_rate, amount: 0.1, included_in_price: false) }
+
+ before { shipping_rate.update!(tax_rate: tax_rate) }
+
+ it 'returns the tax in additional_tax_total' do
+ expect(subject['tax_total']).to be > 0
+ expect(subject['additional_tax_total']).to be > 0
+ expect(subject['included_tax_total']).to eq(0)
+ end
+ end
+
+ context 'with included tax' do
+ let!(:default_zone) { create(:zone, default_tax: true) }
+ let(:tax_rate) { create(:tax_rate, amount: 0.1, included_in_price: true, zone: default_zone) }
+
+ before { shipping_rate.update!(tax_rate: tax_rate) }
+
+ it 'returns the tax in included_tax_total' do
+ expect(subject['tax_total']).to be > 0
+ expect(subject['additional_tax_total']).to eq(0)
+ expect(subject['included_tax_total']).to be > 0
+ end
+ end
+
+ context 'with free shipping promotion' do
+ let(:free_shipping_promotion) { create(:free_shipping_promotion, code: 'freeship', kind: :coupon_code) }
+ let(:order) { shipment.order }
+
+ before do
+ order.coupon_code = free_shipping_promotion.code
+ Spree::PromotionHandler::Coupon.new(order).apply
+ shipping_rate.reload
+ end
+
+ it 'returns total as 0' do
+ expect(subject['total']).to eq(0)
+ end
+
+ it 'returns display_total as $0.00' do
+ expect(subject['display_total']).to eq('$0.00')
+ end
+
+ it 'preserves original cost' do
+ expect(subject['cost']).to be > 0
+ end
+ end
+end
diff --git a/spree/api/spec/serializers/spree/api/v3/fulfillment_serializer_spec.rb b/spree/api/spec/serializers/spree/api/v3/fulfillment_serializer_spec.rb
new file mode 100644
index 0000000000..58b94ff942
--- /dev/null
+++ b/spree/api/spec/serializers/spree/api/v3/fulfillment_serializer_spec.rb
@@ -0,0 +1,61 @@
+require 'spec_helper'
+
+RSpec.describe Spree::Api::V3::FulfillmentSerializer do
+ let(:store) { @default_store }
+ let(:base_params) { { store: store, currency: store.default_currency } }
+
+ let(:shipment) { create(:shipment) }
+
+ subject { described_class.new(shipment, params: base_params).to_h }
+
+ describe 'serialized attributes' do
+ it 'includes cost and total fields' do
+ expect(subject).to include(
+ 'cost' => shipment.cost,
+ 'total' => shipment.total
+ )
+ expect(subject['display_cost']).to be_present
+ expect(subject['display_total']).to be_present
+ end
+
+ it 'includes discount_total' do
+ expect(subject).to have_key('discount_total')
+ expect(subject).to have_key('display_discount_total')
+ end
+
+ it 'includes tax fields' do
+ expect(subject).to have_key('additional_tax_total')
+ expect(subject).to have_key('display_additional_tax_total')
+ expect(subject).to have_key('included_tax_total')
+ expect(subject).to have_key('display_included_tax_total')
+ expect(subject).to have_key('tax_total')
+ expect(subject).to have_key('display_tax_total')
+ end
+
+ it 'includes standard fulfillment attributes' do
+ expect(subject).to include(
+ 'id' => shipment.prefixed_id,
+ 'number' => shipment.number,
+ 'status' => shipment.state,
+ 'fulfillment_type' => 'shipping'
+ )
+ end
+ end
+
+ context 'with free shipping promotion' do
+ let(:free_shipping_promotion) { create(:free_shipping_promotion, code: 'freeship', kind: :coupon_code) }
+ let(:order) { shipment.order }
+
+ before do
+ order.coupon_code = free_shipping_promotion.code
+ Spree::PromotionHandler::Coupon.new(order).apply
+ order.updater.update
+ shipment.reload
+ end
+
+ it 'returns discount_total reflecting the promotion' do
+ expect(subject['cost']).to be > 0
+ expect(subject['discount_total']).to be < 0
+ end
+ end
+end
diff --git a/spree/core/app/models/spree/shipment.rb b/spree/core/app/models/spree/shipment.rb
index ccb7de0618..2d1556154f 100644
--- a/spree/core/app/models/spree/shipment.rb
+++ b/spree/core/app/models/spree/shipment.rb
@@ -112,8 +112,10 @@ module Spree
self.whitelisted_ransackable_attributes = ['number']
extend DisplayMoney
- money_methods :cost, :discounted_cost, :final_price, :item_cost, :additional_tax_total, :included_tax_total, :tax_total
+ money_methods :cost, :discounted_cost, :final_price, :item_cost, :additional_tax_total, :included_tax_total, :tax_total, :promo_total
alias display_amount display_cost
+ alias_attribute :discount_total, :promo_total
+ alias display_discount_total display_promo_total
normalizes :tracking, with: ->(value) { value&.to_s&.squish&.presence }
@@ -197,6 +199,8 @@ module Spree
def final_price
cost + adjustment_total
end
+ alias total final_price
+ alias display_total display_final_price
def final_price_with_items
item_cost + final_price
diff --git a/spree/core/app/models/spree/shipping_rate.rb b/spree/core/app/models/spree/shipping_rate.rb
index faee7528cd..e56d226034 100644
--- a/spree/core/app/models/spree/shipping_rate.rb
+++ b/spree/core/app/models/spree/shipping_rate.rb
@@ -7,7 +7,7 @@ module Spree
belongs_to :shipping_method, -> { with_deleted }, class_name: 'Spree::ShippingMethod', inverse_of: :shipping_rates
extend Spree::DisplayMoney
- money_methods :base_price, :final_price, :tax_amount
+ money_methods :base_price, :final_price, :tax_amount, :additional_tax_total, :included_tax_total, :tax_total
delegate :order, :currency, :with_free_shipping_promotion?, to: :shipment
delegate :name, to: :shipping_method
@@ -29,14 +29,37 @@ module Spree
alias display_cost display_price
alias_attribute :base_price, :cost
+ # Returns true if the shipping rate is free
+ #
+ # @return [Boolean]
def free?
final_price.zero?
end
+ # Returns the tax amount for the shipping rate
+ #
+ # @return [BigDecimal]
def tax_amount
@tax_amount ||= tax_rate&.calculator&.compute_shipping_rate(self) || BigDecimal(0)
end
+ # Returns the additional tax total for the shipping rate
+ #
+ # @return [BigDecimal]
+ def additional_tax_total
+ tax_rate&.included_in_price? ? BigDecimal(0) : tax_amount
+ end
+
+ # Returns the included tax total for the shipping rate
+ #
+ # @return [BigDecimal]
+ def included_tax_total
+ tax_rate&.included_in_price? ? tax_amount : BigDecimal(0)
+ end
+
+ alias tax_total tax_amount
+ alias display_tax_total display_tax_amount
+
# returns base price - any available discounts for this Shipment
# useful when you want to present a list of available shipping rates
def final_price
@@ -46,6 +69,8 @@ module Spree
cost + discount_amount
end
end
+ alias total final_price
+ alias display_total display_final_price
# Returns the delivery range for the shipping method
#
diff --git a/spree/core/spec/models/spree/shipping_rate_spec.rb b/spree/core/spec/models/spree/shipping_rate_spec.rb
index 6fdce5c34b..070563ddbf 100644
--- a/spree/core/spec/models/spree/shipping_rate_spec.rb
+++ b/spree/core/spec/models/spree/shipping_rate_spec.rb
@@ -152,6 +152,62 @@ describe Spree::ShippingRate, type: :model do
end
end
+ describe '#additional_tax_total' do
+ context 'without tax rate' do
+ it 'returns 0' do
+ expect(shipping_rate.additional_tax_total).to eq(0)
+ end
+ end
+
+ context 'with tax included in price' do
+ let(:tax_rate) { create(:tax_rate, amount: 0.1, included_in_price: true) }
+
+ before { shipping_rate.tax_rate = tax_rate }
+
+ it 'returns 0' do
+ expect(shipping_rate.additional_tax_total).to eq(0)
+ end
+ end
+
+ context 'with tax additional to price' do
+ let(:tax_rate) { create(:tax_rate, amount: 0.1, included_in_price: false) }
+
+ before { shipping_rate.tax_rate = tax_rate }
+
+ it 'returns the tax amount' do
+ expect(shipping_rate.additional_tax_total).to eq(shipping_rate.tax_amount)
+ end
+ end
+ end
+
+ describe '#included_tax_total' do
+ context 'without tax rate' do
+ it 'returns 0' do
+ expect(shipping_rate.included_tax_total).to eq(0)
+ end
+ end
+
+ context 'with tax included in price' do
+ let(:tax_rate) { create(:tax_rate, amount: 0.1, included_in_price: true) }
+
+ before { shipping_rate.tax_rate = tax_rate }
+
+ it 'returns the tax amount' do
+ expect(shipping_rate.included_tax_total).to eq(shipping_rate.tax_amount)
+ end
+ end
+
+ context 'with tax additional to price' do
+ let(:tax_rate) { create(:tax_rate, amount: 0.1, included_in_price: false) }
+
+ before { shipping_rate.tax_rate = tax_rate }
+
+ it 'returns 0' do
+ expect(shipping_rate.included_tax_total).to eq(0)
+ end
+ end
+ end
+
context '#final_price' do
let(:free_shipping_promotion) { create(:free_shipping_promotion, code: 'freeship', kind: :coupon_code) }
let(:order) { shipment.order }