1 /**
2 * @schema BaseCart
3 * type: object
4 * description: The item's cart.
5 * x-schemaName: BaseCart
6 * required:
7 * - id
8 * - currency_code
9 * - original_item_total
10 * - original_item_subtotal
11 * - original_item_tax_total
12 * - item_total
13 * - item_subtotal
14 * - item_tax_total
15 * - original_total
16 * - original_subtotal
17 * - original_tax_total
18 * - total
19 * - subtotal
20 * - tax_total
21 * - discount_total
22 * - discount_tax_total
23 * - gift_card_total
24 * - gift_card_tax_total
25 * - shipping_total
26 * - shipping_subtotal
27 * - shipping_tax_total
28 * - original_shipping_total
29 * - original_shipping_subtotal
30 * - original_shipping_tax_total
31 * properties:
32 * id:
33 * type: string
34 * title: id
35 * description: The cart's ID.
36 * region:
37 * $ref: "#/components/schemas/BaseRegion"
38 * region_id:
39 * type: string
40 * title: region_id
41 * description: The cart's region id.
42 * customer_id:
43 * type: string
44 * title: customer_id
45 * description: The cart's customer id.
46 * sales_channel_id:
47 * type: string
48 * title: sales_channel_id
49 * description: The cart's sales channel id.
50 * email:
51 * type: string
52 * title: email
53 * description: The cart's email.
54 * format: email
55 * currency_code:
56 * type: string
57 * title: currency_code
58 * description: The cart's currency code.
59 * shipping_address:
60 * $ref: "#/components/schemas/BaseCartAddress"
61 * billing_address:
62 * $ref: "#/components/schemas/BaseCartAddress"
63 * items:
64 * type: array
65 * description: The cart's items.
66 * items:
67 * $ref: "#/components/schemas/BaseCartLineItem"
68 * shipping_methods:
69 * type: array
70 * description: The cart's shipping methods.
71 * items:
72 * $ref: "#/components/schemas/BaseCartShippingMethod"
73 * payment_collection:
74 * $ref: "#/components/schemas/BasePaymentCollection"
75 * metadata:
76 * type: object
77 * description: The cart's metadata.
78 * externalDocs:
79 * url: https://docs.medusajs.com/api/store#manage-metadata
80 * description: Learn how to manage metadata
81 * created_at:
82 * type: string
83 * format: date-time
84 * title: created_at
85 * description: The cart's created at.
86 * updated_at:
87 * type: string
88 * format: date-time
89 * title: updated_at
90 * description: The cart's updated at.
91 * original_item_total:
92 * type: number
93 * title: original_item_total
94 * description: The sum of all line items' original totals before discounts, including taxes.
95 * original_item_subtotal:
96 * type: number
97 * title: original_item_subtotal
98 * description: The sum of all line items' original subtotals before discounts, excluding taxes.
99 * original_item_tax_total:
100 * type: number
101 * title: original_item_tax_total
102 * description: The sum of all line items' original tax totals before discounts.
103 * item_total:
104 * type: number
105 * title: item_total
106 * description: The sum of all line items' totals after discounts, including taxes.
107 * item_subtotal:
108 * type: number
109 * title: item_subtotal
110 * description: The sum of all line items' subtotals before discounts, excluding taxes.
111 * item_tax_total:
112 * type: number
113 * title: item_tax_total
114 * description: The sum of all line items' tax totals after discounts.
115 * original_total:
116 * type: number
117 * title: original_total
118 * description: The cart's total before discounts, including taxes. Calculated as the sum of `original_item_total` and `original_shipping_total`.
119 * original_subtotal:
120 * type: number
121 * title: original_subtotal
122 * description: The cart's subtotal before discounts, excluding taxes. Calculated as the sum of `original_item_subtotal` and `original_shipping_subtotal`.
123 * original_tax_total:
124 * type: number
125 * title: original_tax_total
126 * description: The cart's tax total before discounts. Calculated as the sum of `original_item_tax_total` and `original_shipping_tax_total`.
127 * total:
128 * type: number
129 * title: total
130 * description: The cart's final total after discounts and credit lines, including taxes.
131 * subtotal:
132 * type: number
133 * title: subtotal
134 * description: The cart's subtotal before discounts, excluding taxes. Calculated as the sum of `item_subtotal` and `shipping_subtotal`.
135 * tax_total:
136 * type: number
137 * title: tax_total
138 * description: The cart's tax total after discounts. Calculated as the sum of `item_tax_total` and `shipping_tax_total`.
139 * discount_total:
140 * type: number
141 * title: discount_total
142 * description: The total amount of discounts applied to the cart, including the tax portion of discounts.
143 * discount_tax_total:
144 * type: number
145 * title: discount_tax_total
146 * description: The total amount of discounts applied to the cart's tax. Represents the tax portion of discounts.
147 * gift_card_total:
148 * type: number
149 * title: gift_card_total
150 * description: The cart's gift card total.
151 * gift_card_tax_total:
152 * type: number
153 * title: gift_card_tax_total
154 * description: The cart's gift card tax total.
155 * shipping_total:
156 * type: number
157 * title: shipping_total
158 * description: The sum of all shipping methods' totals after discounts, including taxes.
159 * shipping_subtotal:
160 * type: number
161 * title: shipping_subtotal
162 * description: The sum of all shipping methods' subtotals before discounts, excluding taxes.
163 * shipping_tax_total:
164 * type: number
165 * title: shipping_tax_total
166 * description: The sum of all shipping methods' tax totals after discounts.
167 * original_shipping_total:
168 * type: number
169 * title: original_shipping_total
170 * description: The sum of all shipping methods' original totals before discounts, including taxes.
171 * original_shipping_subtotal:
172 * type: number
173 * title: original_shipping_subtotal
174 * description: The sum of all shipping methods' original subtotals before discounts, excluding taxes.
175 * original_shipping_tax_total:
176 * type: number
177 * title: original_shipping_tax_total
178 * description: The sum of all shipping methods' original tax totals before discounts.
179 * completed_at:
180 * type: string
181 * title: completed_at
182 * description: The date the cart was completed.
183 * format: date-time
184 *
185 */
186