Skip to content

Commit 797878a

Browse files
authored
docs: fix total descriptions across docs (medusajs#14366)
1 parent 365468d commit 797878a

33 files changed

+1063
-815
lines changed

www/apps/api-reference/specs/admin/components/schemas/BaseCart.yaml

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -89,59 +89,77 @@ properties:
8989
original_item_total:
9090
type: number
9191
title: original_item_total
92-
description: The cart's original item total.
92+
description: >-
93+
The sum of all line items' original totals before discounts, including
94+
taxes.
9395
original_item_subtotal:
9496
type: number
9597
title: original_item_subtotal
96-
description: The cart's original item subtotal.
98+
description: >-
99+
The sum of all line items' original subtotals before discounts, excluding
100+
taxes.
97101
original_item_tax_total:
98102
type: number
99103
title: original_item_tax_total
100-
description: The cart's original item tax total.
104+
description: The sum of all line items' original tax totals before discounts.
101105
item_total:
102106
type: number
103107
title: item_total
104-
description: The cart's item total.
108+
description: The sum of all line items' totals after discounts, including taxes.
105109
item_subtotal:
106110
type: number
107111
title: item_subtotal
108-
description: The cart's item subtotal.
112+
description: The sum of all line items' subtotals before discounts, excluding taxes.
109113
item_tax_total:
110114
type: number
111115
title: item_tax_total
112-
description: The cart's item tax total.
116+
description: The sum of all line items' tax totals after discounts.
113117
original_total:
114118
type: number
115119
title: original_total
116-
description: The cart's original total.
120+
description: >-
121+
The cart's total before discounts, including taxes. Calculated as the sum
122+
of `original_item_total` and `original_shipping_total`.
117123
original_subtotal:
118124
type: number
119125
title: original_subtotal
120-
description: The cart's original subtotal.
126+
description: >-
127+
The cart's subtotal before discounts, excluding taxes. Calculated as the
128+
sum of `original_item_subtotal` and `original_shipping_subtotal`.
121129
original_tax_total:
122130
type: number
123131
title: original_tax_total
124-
description: The cart's original tax total.
132+
description: >-
133+
The cart's tax total before discounts. Calculated as the sum of
134+
`original_item_tax_total` and `original_shipping_tax_total`.
125135
total:
126136
type: number
127137
title: total
128-
description: The cart's total.
138+
description: The cart's final total after discounts and credit lines, including taxes.
129139
subtotal:
130140
type: number
131141
title: subtotal
132-
description: The cart's subtotal.
142+
description: >-
143+
The cart's subtotal before discounts, excluding taxes. Calculated as the
144+
sum of `item_subtotal` and `shipping_subtotal`.
133145
tax_total:
134146
type: number
135147
title: tax_total
136-
description: The cart's tax total.
148+
description: >-
149+
The cart's tax total after discounts. Calculated as the sum of
150+
`item_tax_total` and `shipping_tax_total`.
137151
discount_total:
138152
type: number
139153
title: discount_total
140-
description: The cart's discount total.
154+
description: >-
155+
The total amount of discounts applied to the cart, including the tax
156+
portion of discounts.
141157
discount_tax_total:
142158
type: number
143159
title: discount_tax_total
144-
description: The cart's discount tax total.
160+
description: >-
161+
The total amount of discounts applied to the cart's tax. Represents the
162+
tax portion of discounts.
145163
gift_card_total:
146164
type: number
147165
title: gift_card_total
@@ -153,24 +171,30 @@ properties:
153171
shipping_total:
154172
type: number
155173
title: shipping_total
156-
description: The cart's shipping total.
174+
description: The sum of all shipping methods' totals after discounts, including taxes.
157175
shipping_subtotal:
158176
type: number
159177
title: shipping_subtotal
160-
description: The cart's shipping subtotal.
178+
description: >-
179+
The sum of all shipping methods' subtotals before discounts, excluding
180+
taxes.
161181
shipping_tax_total:
162182
type: number
163183
title: shipping_tax_total
164-
description: The cart's shipping tax total.
184+
description: The sum of all shipping methods' tax totals after discounts.
165185
original_shipping_total:
166186
type: number
167187
title: original_shipping_total
168-
description: The cart's original shipping total.
188+
description: >-
189+
The sum of all shipping methods' original totals before discounts,
190+
including taxes.
169191
original_shipping_subtotal:
170192
type: number
171193
title: original_shipping_subtotal
172-
description: The cart's original shipping subtotal.
194+
description: >-
195+
The sum of all shipping methods' original subtotals before discounts,
196+
excluding taxes.
173197
original_shipping_tax_total:
174198
type: number
175199
title: original_shipping_tax_total
176-
description: The cart's original shipping tax total.
200+
description: The sum of all shipping methods' original tax totals before discounts.

www/apps/api-reference/specs/admin/components/schemas/BaseCartLineItem.yaml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,44 +143,48 @@ properties:
143143
original_total:
144144
type: number
145145
title: original_total
146-
description: The item's original total.
146+
description: The line item's original total before discounts, including taxes.
147147
original_subtotal:
148148
type: number
149149
title: original_subtotal
150-
description: The item's original subtotal.
150+
description: The line item's original subtotal before discounts, excluding taxes.
151151
original_tax_total:
152152
type: number
153153
title: original_tax_total
154-
description: The item's original tax total.
154+
description: The line item's original tax total before discounts.
155155
item_total:
156156
type: number
157157
title: item_total
158-
description: The item's item total.
158+
description: The line item's total after discounts, including taxes.
159159
item_subtotal:
160160
type: number
161161
title: item_subtotal
162-
description: The item's item subtotal.
162+
description: The line item's subtotal before discounts, excluding taxes.
163163
item_tax_total:
164164
type: number
165165
title: item_tax_total
166-
description: The item's item tax total.
166+
description: The line item's tax total after discounts.
167167
total:
168168
type: number
169169
title: total
170-
description: The item's total.
170+
description: The line item's total after discounts, including taxes.
171171
subtotal:
172172
type: number
173173
title: subtotal
174-
description: The item's subtotal.
174+
description: The line item's subtotal before discounts, excluding taxes.
175175
tax_total:
176176
type: number
177177
title: tax_total
178-
description: The item's tax total.
178+
description: The line item's tax total after discounts.
179179
discount_total:
180180
type: number
181181
title: discount_total
182-
description: The item's discount total.
182+
description: >-
183+
The total amount of discounts applied to the line item, including the tax
184+
portion of discounts.
183185
discount_tax_total:
184186
type: number
185187
title: discount_tax_total
186-
description: The item's discount tax total.
188+
description: >-
189+
The total amount of discounts applied to the line item's tax. Represents
190+
the tax portion of discounts.

www/apps/api-reference/specs/admin/components/schemas/BaseCartShippingMethod.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,36 +75,36 @@ properties:
7575
original_total:
7676
type: number
7777
title: original_total
78-
description: The shipping method's total including taxes, excluding promotions.
78+
description: The shipping method's original total before discounts, including taxes.
7979
original_subtotal:
8080
type: number
8181
title: original_subtotal
82-
description: The shipping method's total excluding taxes, including promotions.
82+
description: The shipping method's original subtotal before discounts, excluding taxes.
8383
original_tax_total:
8484
type: number
8585
title: original_tax_total
86-
description: >-
87-
The total taxes applied on the shipping method's amount including
88-
promotions.
86+
description: The shipping method's original tax total before discounts.
8987
total:
9088
type: number
9189
title: total
92-
description: The shipping method's total amount including taxes and promotions.
90+
description: The shipping method's total after discounts, including taxes.
9391
subtotal:
9492
type: number
9593
title: subtotal
96-
description: The shipping method's total amount excluding taxes, including promotions.
94+
description: The shipping method's subtotal before discounts, excluding taxes.
9795
tax_total:
9896
type: number
9997
title: tax_total
100-
description: >-
101-
The total taxes applied on the shipping method's amount including
102-
promotions.
98+
description: The shipping method's tax total after discounts.
10399
discount_total:
104100
type: number
105101
title: discount_total
106-
description: The total amount discounted.
102+
description: >-
103+
The total amount of discounts applied to the shipping method, including
104+
the tax portion of discounts.
107105
discount_tax_total:
108106
type: number
109107
title: discount_tax_total
110-
description: The taxes applied on the discounted amount.
108+
description: >-
109+
The total amount of discounts applied to the shipping method's tax.
110+
Represents the tax portion of discounts.

www/apps/api-reference/specs/admin/components/schemas/BaseOrder.yaml

Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -152,59 +152,77 @@ properties:
152152
original_item_total:
153153
type: number
154154
title: original_item_total
155-
description: The total of the order's items including taxes, excluding promotions.
155+
description: >-
156+
The sum of all line items' original totals before discounts, including
157+
taxes.
156158
original_item_subtotal:
157159
type: number
158160
title: original_item_subtotal
159-
description: The total of the order's items excluding taxes, including promotions.
161+
description: >-
162+
The sum of all line items' original subtotals before discounts, excluding
163+
taxes.
160164
original_item_tax_total:
161165
type: number
162166
title: original_item_tax_total
163-
description: The tax total of the order's items excluding promotions.
167+
description: The sum of all line items' original tax totals before discounts.
164168
item_total:
165169
type: number
166170
title: item_total
167-
description: The total of the order's items including taxes and promotions.
171+
description: The sum of all line items' totals after discounts, including taxes.
168172
item_subtotal:
169173
type: number
170174
title: item_subtotal
171-
description: The total of the order's items excluding taxes, including promotions.
175+
description: The sum of all line items' subtotals before discounts, excluding taxes.
172176
item_tax_total:
173177
type: number
174178
title: item_tax_total
175-
description: The tax total of the order's items including promotions.
179+
description: The sum of all line items' tax totals after discounts.
176180
original_total:
177181
type: number
178182
title: original_total
179-
description: The order's total excluding promotions, including taxes.
183+
description: >-
184+
The order's total before discounts, including taxes. Calculated as the sum
185+
of `original_item_total` and `original_shipping_total`.
180186
original_subtotal:
181187
type: number
182188
title: original_subtotal
183-
description: The order's total excluding taxes, including promotions.
189+
description: >-
190+
The order's subtotal before discounts, excluding taxes. Calculated as the
191+
sum of `original_item_subtotal` and `original_shipping_subtotal`.
184192
original_tax_total:
185193
type: number
186194
title: original_tax_total
187-
description: The order's tax total, excluding promotions.
195+
description: >-
196+
The order's tax total before discounts. Calculated as the sum of
197+
`original_item_tax_total` and `original_shipping_tax_total`.
188198
total:
189199
type: number
190200
title: total
191-
description: The order's total including taxes and promotions.
201+
description: The order's final total after discounts and credit lines, including taxes.
192202
subtotal:
193203
type: number
194204
title: subtotal
195-
description: The order's total excluding taxes, including promotions.
205+
description: >-
206+
The order's subtotal before discounts, excluding taxes. Calculated as the
207+
sum of `item_subtotal` and `shipping_subtotal`.
196208
tax_total:
197209
type: number
198210
title: tax_total
199-
description: The order's tax total including promotions.
211+
description: >-
212+
The order's tax total after discounts. Calculated as the sum of
213+
`item_tax_total` and `shipping_tax_total`.
200214
discount_total:
201215
type: number
202216
title: discount_total
203-
description: The order's discount or promotions total.
217+
description: >-
218+
The total amount of discounts applied to the order, including the tax
219+
portion of discounts.
204220
discount_tax_total:
205221
type: number
206222
title: discount_tax_total
207-
description: The tax total of order's discount or promotion.
223+
description: >-
224+
The total amount of discounts applied to the order's tax. Represents the
225+
tax portion of discounts.
208226
gift_card_total:
209227
type: number
210228
title: gift_card_total
@@ -216,43 +234,55 @@ properties:
216234
shipping_total:
217235
type: number
218236
title: shipping_total
219-
description: The order's shipping total including taxes and promotions.
237+
description: The sum of all shipping methods' totals after discounts, including taxes.
220238
shipping_subtotal:
221239
type: number
222240
title: shipping_subtotal
223-
description: The order's shipping total excluding taxes, including promotions.
241+
description: >-
242+
The sum of all shipping methods' subtotals before discounts, excluding
243+
taxes.
224244
shipping_tax_total:
225245
type: number
226246
title: shipping_tax_total
227-
description: The tax total of the order's shipping.
247+
description: The sum of all shipping methods' tax totals after discounts.
228248
original_shipping_total:
229249
type: number
230250
title: original_shipping_total
231-
description: The order's shipping total including taxes, excluding promotions.
251+
description: >-
252+
The sum of all shipping methods' original totals before discounts,
253+
including taxes.
232254
original_shipping_subtotal:
233255
type: number
234256
title: original_shipping_subtotal
235-
description: The order's shipping total excluding taxes, including promotions.
257+
description: >-
258+
The sum of all shipping methods' original subtotals before discounts,
259+
excluding taxes.
236260
original_shipping_tax_total:
237261
type: number
238262
title: original_shipping_tax_total
239-
description: The tax total of the order's shipping excluding promotions.
263+
description: The sum of all shipping methods' original tax totals before discounts.
240264
status:
241265
type: string
242266
title: status
243267
description: The order's status.
244268
credit_line_total:
245269
type: number
246270
title: credit_line_total
247-
description: The order's credit line total.
271+
description: >-
272+
The total amount of credit lines applied to the order, including taxes.
273+
Subtracted from the final total.
248274
item_discount_total:
249275
type: number
250276
title: item_discount_total
251-
description: The total discount amount applied on the order's items.
277+
description: >-
278+
The sum of all discounts applied to line items, including the tax portion
279+
of discounts.
252280
shipping_discount_total:
253281
type: number
254282
title: shipping_discount_total
255-
description: The total discount amount applied on the order's shipping.
283+
description: >-
284+
The sum of all discounts applied to shipping methods, including the tax
285+
portion of discounts.
256286
custom_display_id:
257287
type: string
258288
title: custom_display_id

0 commit comments

Comments
 (0)