@epcc-sdk/sdks-cart-checkout-order 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.mjs.map +1 -1
- package/dist/client/types.gen.cjs.map +1 -1
- package/dist/client/zod.gen.cjs +3236 -1161
- package/dist/client/zod.gen.cjs.map +1 -1
- package/dist/client/zod.gen.mjs +2657 -626
- package/dist/client/zod.gen.mjs.map +1 -1
- package/dist/index.d.cts +7698 -11
- package/dist/index.d.ts +7698 -11
- package/dist/zod.d.cts +24157 -2
- package/dist/zod.d.ts +24157 -2
- package/package.json +3 -3
- package/dist/client/client/client.gen.d.cts +0 -10
- package/dist/client/client/client.gen.d.ts +0 -10
- package/dist/client/client/index.d.cts +0 -9
- package/dist/client/client/index.d.ts +0 -9
- package/dist/client/client/types.gen.d.cts +0 -6
- package/dist/client/client/types.gen.d.ts +0 -6
- package/dist/client/client/utils.gen.d.cts +0 -6
- package/dist/client/client/utils.gen.d.ts +0 -6
- package/dist/client/client.gen.d.cts +0 -20
- package/dist/client/client.gen.d.ts +0 -20
- package/dist/client/core/auth.gen.d.cts +0 -27
- package/dist/client/core/auth.gen.d.ts +0 -27
- package/dist/client/core/bodySerializer.gen.d.cts +0 -27
- package/dist/client/core/bodySerializer.gen.d.ts +0 -27
- package/dist/client/core/params.gen.d.cts +0 -44
- package/dist/client/core/params.gen.d.ts +0 -44
- package/dist/client/core/pathSerializer.gen.d.cts +0 -34
- package/dist/client/core/pathSerializer.gen.d.ts +0 -34
- package/dist/client/core/queryKeySerializer.gen.d.cts +0 -20
- package/dist/client/core/queryKeySerializer.gen.d.ts +0 -20
- package/dist/client/core/serverSentEvents.gen.d.cts +0 -77
- package/dist/client/core/serverSentEvents.gen.d.ts +0 -77
- package/dist/client/core/types.gen.d.cts +0 -86
- package/dist/client/core/types.gen.d.ts +0 -86
- package/dist/client/core/utils.gen.d.cts +0 -23
- package/dist/client/core/utils.gen.d.ts +0 -23
- package/dist/client/index.d.cts +0 -8
- package/dist/client/index.d.ts +0 -8
- package/dist/client/sdk.gen.d.cts +0 -1449
- package/dist/client/sdk.gen.d.ts +0 -1449
- package/dist/client/types.gen.d.cts +0 -4960
- package/dist/client/types.gen.d.ts +0 -4960
- package/dist/client/zod.gen.d.cts +0 -130743
- package/dist/client/zod.gen.d.ts +0 -130743
- package/dist/runtime.d.cts +0 -12
- package/dist/runtime.d.ts +0 -12
- package/dist/types.gen-DXwTHYA3.d.ts +0 -157
- package/dist/types.gen-mB6gWg8u.d.cts +0 -157
|
@@ -1,4960 +0,0 @@
|
|
|
1
|
-
type ClientOptions = {
|
|
2
|
-
baseUrl: "https://useast.api.elasticpath.com" | "https://euwest.api.elasticpath.com" | (string & {});
|
|
3
|
-
};
|
|
4
|
-
/**
|
|
5
|
-
* CartContact
|
|
6
|
-
*/
|
|
7
|
-
type CartContact = {
|
|
8
|
-
/**
|
|
9
|
-
* The email address attached to a cart.
|
|
10
|
-
*/
|
|
11
|
-
email?: string;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* DiscountSettings
|
|
15
|
-
*/
|
|
16
|
-
type DiscountSettings = {
|
|
17
|
-
/**
|
|
18
|
-
* This parameter enables custom discounts for a cart. When set to true and `use_rule_promotions` is not enabled, Elastic Path promotions will not be applied to the new carts. Default is set from cart discount settings for the store. See [Cart Settings](/docs/api/carts/put-v-2-settings-cart).
|
|
19
|
-
*/
|
|
20
|
-
custom_discounts_enabled?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* When set to true, this parameter allows the cart to use rule promotions. You can enable this setting together with `custom_discounts_enabled`, for example, while transitioning between promotion systems. However, an individual cart can only contain one type of discount at a time.
|
|
23
|
-
*/
|
|
24
|
-
use_rule_promotions?: boolean;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* InventorySettings
|
|
28
|
-
*/
|
|
29
|
-
type InventorySettings = {
|
|
30
|
-
/**
|
|
31
|
-
* This parameter enables deferring inventory checks on the cart. This allows items to be added to or updating in the cart without checking stock levels. Inventory checks are still performed as normal on checkout
|
|
32
|
-
*/
|
|
33
|
-
defer_inventory_check?: boolean;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* ItemSettings
|
|
37
|
-
*/
|
|
38
|
-
type ItemSettings = {
|
|
39
|
-
/**
|
|
40
|
-
* When set to true, cart items with the same SKU but different locations are kept as separate line items instead of being merged. When false (default), items with the same SKU are merged and the location is updated to the most recent value.
|
|
41
|
-
*/
|
|
42
|
-
separate_items_by_location?: boolean;
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* CustomAttributes
|
|
46
|
-
*
|
|
47
|
-
* Specifies custom attributes for cart or order objects. Each attribute includes a top-level key, as well as corresponding type and value entries. Attribute values must correspond to the assigned types.
|
|
48
|
-
*
|
|
49
|
-
* Example:
|
|
50
|
-
* ```
|
|
51
|
-
* "custom_attributes": {
|
|
52
|
-
* "is_member": {
|
|
53
|
-
* "type": "boolean",
|
|
54
|
-
* "value": true
|
|
55
|
-
* },
|
|
56
|
-
* "membership_level": {
|
|
57
|
-
* "type": "string",
|
|
58
|
-
* "value": "premium"
|
|
59
|
-
* }
|
|
60
|
-
* }
|
|
61
|
-
* ```
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
type CustomAttributes = {
|
|
65
|
-
[key: string]: {
|
|
66
|
-
/**
|
|
67
|
-
* The type of the custom attribute value.
|
|
68
|
-
*/
|
|
69
|
-
type: "string" | "integer" | "boolean" | "float";
|
|
70
|
-
/**
|
|
71
|
-
* The value of the custom attribute.
|
|
72
|
-
*/
|
|
73
|
-
value: string | boolean | number;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* FormattedPriceData
|
|
78
|
-
*/
|
|
79
|
-
type FormattedPriceData = {
|
|
80
|
-
/**
|
|
81
|
-
* The raw total.
|
|
82
|
-
*/
|
|
83
|
-
amount?: number;
|
|
84
|
-
/**
|
|
85
|
-
* The currency set for this amount.
|
|
86
|
-
*/
|
|
87
|
-
currency?: string;
|
|
88
|
-
/**
|
|
89
|
-
* The formatted total based on the amount and currency.
|
|
90
|
-
*/
|
|
91
|
-
formatted?: string;
|
|
92
|
-
};
|
|
93
|
-
type CartTimestamps = {
|
|
94
|
-
/**
|
|
95
|
-
* The date this was created.
|
|
96
|
-
*/
|
|
97
|
-
created_at?: string;
|
|
98
|
-
/**
|
|
99
|
-
* The date this was last updated.
|
|
100
|
-
*/
|
|
101
|
-
updated_at?: string;
|
|
102
|
-
/**
|
|
103
|
-
* The date this expires.
|
|
104
|
-
*/
|
|
105
|
-
expires_at?: string;
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* RelationshipItem
|
|
109
|
-
*
|
|
110
|
-
* Relationship data entry
|
|
111
|
-
*/
|
|
112
|
-
type RelationshipItem = {
|
|
113
|
-
/**
|
|
114
|
-
* The type of related resource.
|
|
115
|
-
*/
|
|
116
|
-
type: string;
|
|
117
|
-
/**
|
|
118
|
-
* The ID of the related resource.
|
|
119
|
-
*/
|
|
120
|
-
id: string;
|
|
121
|
-
};
|
|
122
|
-
/**
|
|
123
|
-
* RelationshipArray
|
|
124
|
-
*
|
|
125
|
-
* Array of relationships
|
|
126
|
-
*/
|
|
127
|
-
type RelationshipArray = {
|
|
128
|
-
/**
|
|
129
|
-
* Individual relationships
|
|
130
|
-
*/
|
|
131
|
-
data?: Array<RelationshipItem>;
|
|
132
|
-
};
|
|
133
|
-
/**
|
|
134
|
-
* BaseCartResponse
|
|
135
|
-
*/
|
|
136
|
-
type BaseCartResponse = {
|
|
137
|
-
/**
|
|
138
|
-
* The unique identifier for the cart. Use SDK or create it yourself.
|
|
139
|
-
*/
|
|
140
|
-
id?: string;
|
|
141
|
-
/**
|
|
142
|
-
* The name of this cart.
|
|
143
|
-
*/
|
|
144
|
-
name?: string;
|
|
145
|
-
/**
|
|
146
|
-
* A description of the cart.
|
|
147
|
-
*/
|
|
148
|
-
description?: string;
|
|
149
|
-
contact?: CartContact;
|
|
150
|
-
discount_settings?: DiscountSettings;
|
|
151
|
-
inventory_settings?: InventorySettings;
|
|
152
|
-
item_settings?: ItemSettings;
|
|
153
|
-
/**
|
|
154
|
-
* Stripe-assigned unique identifier for the linked Payment Intent
|
|
155
|
-
*/
|
|
156
|
-
payment_intent_id?: string;
|
|
157
|
-
custom_attributes?: CustomAttributes;
|
|
158
|
-
/**
|
|
159
|
-
* The snapshot date for the cart.
|
|
160
|
-
*/
|
|
161
|
-
snapshot_date?: string;
|
|
162
|
-
links?: {
|
|
163
|
-
/**
|
|
164
|
-
* A link to that specific resource.
|
|
165
|
-
*/
|
|
166
|
-
self?: string;
|
|
167
|
-
};
|
|
168
|
-
meta?: {
|
|
169
|
-
display_price?: {
|
|
170
|
-
with_tax?: FormattedPriceData;
|
|
171
|
-
without_tax?: FormattedPriceData;
|
|
172
|
-
tax?: FormattedPriceData;
|
|
173
|
-
discount?: FormattedPriceData;
|
|
174
|
-
without_discount?: FormattedPriceData;
|
|
175
|
-
shipping?: FormattedPriceData;
|
|
176
|
-
shipping_discount?: FormattedPriceData;
|
|
177
|
-
};
|
|
178
|
-
timestamps?: CartTimestamps;
|
|
179
|
-
/**
|
|
180
|
-
* Array of promotion suggestions
|
|
181
|
-
*/
|
|
182
|
-
promotion_suggestions?: Array<{
|
|
183
|
-
/**
|
|
184
|
-
* Bundle configuration with promotion targets
|
|
185
|
-
*/
|
|
186
|
-
bundle?: Array<{
|
|
187
|
-
/**
|
|
188
|
-
* Whether to automatically add free gift
|
|
189
|
-
*/
|
|
190
|
-
auto_add_free_gift?: boolean;
|
|
191
|
-
/**
|
|
192
|
-
* Cart item ID for the target
|
|
193
|
-
*/
|
|
194
|
-
cart_item_id?: string;
|
|
195
|
-
/**
|
|
196
|
-
* Quantity for the promotion
|
|
197
|
-
*/
|
|
198
|
-
quantity?: number;
|
|
199
|
-
/**
|
|
200
|
-
* Array of target SKUs
|
|
201
|
-
*/
|
|
202
|
-
targets?: Array<string>;
|
|
203
|
-
[key: string]: unknown;
|
|
204
|
-
}>;
|
|
205
|
-
code?: string;
|
|
206
|
-
info?: string;
|
|
207
|
-
message?: string;
|
|
208
|
-
promotion_id?: string;
|
|
209
|
-
}>;
|
|
210
|
-
};
|
|
211
|
-
relationships?: {
|
|
212
|
-
customers?: RelationshipArray | {
|
|
213
|
-
[key: string]: unknown;
|
|
214
|
-
};
|
|
215
|
-
items?: RelationshipArray | {
|
|
216
|
-
data: null | Array<{
|
|
217
|
-
id?: string;
|
|
218
|
-
type?: string;
|
|
219
|
-
}>;
|
|
220
|
-
};
|
|
221
|
-
accounts?: RelationshipArray | {
|
|
222
|
-
[key: string]: unknown;
|
|
223
|
-
};
|
|
224
|
-
custom_discounts?: RelationshipArray;
|
|
225
|
-
promotions?: RelationshipArray;
|
|
226
|
-
};
|
|
227
|
-
};
|
|
228
|
-
/**
|
|
229
|
-
* CartResponse
|
|
230
|
-
*/
|
|
231
|
-
type CartResponse = BaseCartResponse & {
|
|
232
|
-
/**
|
|
233
|
-
* The type of object being returned.
|
|
234
|
-
*/
|
|
235
|
-
type?: "cart";
|
|
236
|
-
};
|
|
237
|
-
type ResponsePageLinks = {
|
|
238
|
-
/**
|
|
239
|
-
* Always the current page.
|
|
240
|
-
*/
|
|
241
|
-
current?: string;
|
|
242
|
-
/**
|
|
243
|
-
* Always the first page.
|
|
244
|
-
*/
|
|
245
|
-
first?: string;
|
|
246
|
-
/**
|
|
247
|
-
* If there is only one page, it is `null`.
|
|
248
|
-
*/
|
|
249
|
-
last?: string;
|
|
250
|
-
/**
|
|
251
|
-
* If there is only one page, it is `null`.
|
|
252
|
-
*/
|
|
253
|
-
next?: string;
|
|
254
|
-
/**
|
|
255
|
-
* if the user is on the first page, it is `null`.
|
|
256
|
-
*/
|
|
257
|
-
prev?: string;
|
|
258
|
-
};
|
|
259
|
-
type ResponsePaginationPage = {
|
|
260
|
-
/**
|
|
261
|
-
* The current page.
|
|
262
|
-
*/
|
|
263
|
-
current?: number;
|
|
264
|
-
/**
|
|
265
|
-
* The maximum number of records per page for this response. You can set this value up to 100.
|
|
266
|
-
*/
|
|
267
|
-
limit?: number;
|
|
268
|
-
/**
|
|
269
|
-
* The current offset by number of records, not pages. Offset is zero-based.
|
|
270
|
-
*/
|
|
271
|
-
offset?: number;
|
|
272
|
-
/**
|
|
273
|
-
* The total page count.
|
|
274
|
-
*/
|
|
275
|
-
total?: number;
|
|
276
|
-
};
|
|
277
|
-
type ResponsePaginationResults = {
|
|
278
|
-
/**
|
|
279
|
-
* The total page count.
|
|
280
|
-
*/
|
|
281
|
-
total?: number;
|
|
282
|
-
};
|
|
283
|
-
type ResponseMetaCarts = {
|
|
284
|
-
page?: ResponsePaginationPage;
|
|
285
|
-
results?: ResponsePaginationResults;
|
|
286
|
-
};
|
|
287
|
-
type CartCollectionResponse = {
|
|
288
|
-
data: Array<CartResponse>;
|
|
289
|
-
links?: ResponsePageLinks;
|
|
290
|
-
meta?: ResponseMetaCarts;
|
|
291
|
-
};
|
|
292
|
-
type ResponseErrorItem = {
|
|
293
|
-
/**
|
|
294
|
-
* A brief summary of the error.
|
|
295
|
-
*/
|
|
296
|
-
title: string;
|
|
297
|
-
/**
|
|
298
|
-
* The HTTP response code of the error.
|
|
299
|
-
*/
|
|
300
|
-
status: string | number;
|
|
301
|
-
/**
|
|
302
|
-
* Optional additional detail about the error.
|
|
303
|
-
*/
|
|
304
|
-
detail?: string;
|
|
305
|
-
/**
|
|
306
|
-
* The field or location that caused the validation error. For JSON schema validation errors, this contains the JSON path to the invalid field (e.g., 'data.name', 'request', 'data.items[0].quantity').
|
|
307
|
-
*/
|
|
308
|
-
source?: string;
|
|
309
|
-
/**
|
|
310
|
-
* Additional metadata associated with the error. May include arbitrary keys.
|
|
311
|
-
*/
|
|
312
|
-
meta?: {
|
|
313
|
-
/**
|
|
314
|
-
* The resource id associated with the error
|
|
315
|
-
*/
|
|
316
|
-
id?: string;
|
|
317
|
-
ids?: Array<string>;
|
|
318
|
-
item_ids?: Array<string>;
|
|
319
|
-
/**
|
|
320
|
-
* The shipping group id associated with the error
|
|
321
|
-
*/
|
|
322
|
-
shipping_group_id?: string;
|
|
323
|
-
shipping_group_ids?: Array<string>;
|
|
324
|
-
/**
|
|
325
|
-
* The cart id associated with the error
|
|
326
|
-
*/
|
|
327
|
-
cart_id?: string;
|
|
328
|
-
/**
|
|
329
|
-
* The code associated with the error.
|
|
330
|
-
*/
|
|
331
|
-
code?: string;
|
|
332
|
-
/**
|
|
333
|
-
* The order id associated with the error.
|
|
334
|
-
*/
|
|
335
|
-
order_id?: string;
|
|
336
|
-
/**
|
|
337
|
-
* The SKU associated with the error.
|
|
338
|
-
*/
|
|
339
|
-
sku?: string;
|
|
340
|
-
/**
|
|
341
|
-
* The email address associated with the error.
|
|
342
|
-
*/
|
|
343
|
-
email?: string;
|
|
344
|
-
/**
|
|
345
|
-
* The component product ID associated with the error.
|
|
346
|
-
*/
|
|
347
|
-
component_product_id?: string;
|
|
348
|
-
/**
|
|
349
|
-
* Custom error metadata key used for additional error context (e.g., in payment rejections).
|
|
350
|
-
*/
|
|
351
|
-
"error-meta-key"?: string;
|
|
352
|
-
/**
|
|
353
|
-
* The value associated with the error.
|
|
354
|
-
*/
|
|
355
|
-
value?: string | number | boolean | {
|
|
356
|
-
[key: string]: unknown;
|
|
357
|
-
} | Array<unknown>;
|
|
358
|
-
};
|
|
359
|
-
};
|
|
360
|
-
type ResponseErrorResponse = {
|
|
361
|
-
errors: Array<ResponseErrorItem>;
|
|
362
|
-
};
|
|
363
|
-
/**
|
|
364
|
-
* CartsRequest
|
|
365
|
-
*/
|
|
366
|
-
type CartsRequest = {
|
|
367
|
-
data?: {
|
|
368
|
-
/**
|
|
369
|
-
* The cart description.
|
|
370
|
-
*/
|
|
371
|
-
description?: string;
|
|
372
|
-
discount_settings?: DiscountSettings;
|
|
373
|
-
inventory_settings?: InventorySettings;
|
|
374
|
-
item_settings?: ItemSettings;
|
|
375
|
-
/**
|
|
376
|
-
* The cart name provided by the shopper. A cart name must contain 1 to 255 characters. You cannot use whitespace characters, but special characters are permitted. For more information, see the [Safe Characters](/guides/Getting-Started/safe-characters) section.
|
|
377
|
-
*/
|
|
378
|
-
name?: string;
|
|
379
|
-
contact?: CartContact;
|
|
380
|
-
/**
|
|
381
|
-
* This optional parameter sets a reference date for the cart. If this parameter is set, it allows the cart to act as one that might occur on that specified date. For example, such future carts might acquire future-enabled discounts, allowing users to test and validate future interactions with carts. The snapshot_date must be in the format 2026-02-21T15:07:25Z. By default, this parameter is left empty.
|
|
382
|
-
*/
|
|
383
|
-
snapshot_date?: string;
|
|
384
|
-
/**
|
|
385
|
-
* Specifies custom attributes for cart objects. Each attribute includes a top-level key, as well as corresponding type and value entries. Attribute values must correspond to the assigned types.
|
|
386
|
-
*
|
|
387
|
-
* Attribute types include:
|
|
388
|
-
* - string
|
|
389
|
-
* - boolean
|
|
390
|
-
* - integer
|
|
391
|
-
* - float
|
|
392
|
-
*
|
|
393
|
-
* Multiple custom attributes may be submitted together. A cart can have a maximum of 20 custom attributes.
|
|
394
|
-
*
|
|
395
|
-
* Example:
|
|
396
|
-
* ```
|
|
397
|
-
* "custom_attributes": {
|
|
398
|
-
* "is_member": {
|
|
399
|
-
* "type": "boolean",
|
|
400
|
-
* "value": true
|
|
401
|
-
* },
|
|
402
|
-
* "membership_level": {
|
|
403
|
-
* "type": "string",
|
|
404
|
-
* "value": "premium"
|
|
405
|
-
* }
|
|
406
|
-
* }
|
|
407
|
-
* ```
|
|
408
|
-
*
|
|
409
|
-
* Updating an existing cart with new custom attributes clears previously-saved attributes. In order to maintain existing custom attributes on a cart, please include them in the update request along with any new attributes.
|
|
410
|
-
*
|
|
411
|
-
*/
|
|
412
|
-
custom_attributes?: CustomAttributes;
|
|
413
|
-
/**
|
|
414
|
-
* To remove the Stripe payment intent from a cart, pass the empty value in the `payment_intent_id` field. You must use an empty value for this field. You cannot use this endpoint to directly update the cart to use an existing Payment Intent.
|
|
415
|
-
*/
|
|
416
|
-
payment_intent_id?: string;
|
|
417
|
-
};
|
|
418
|
-
};
|
|
419
|
-
/**
|
|
420
|
-
* CustomDiscountResponse
|
|
421
|
-
*/
|
|
422
|
-
type CustomDiscountResponse = {
|
|
423
|
-
/**
|
|
424
|
-
* Specifies the type of the resource. Always `custom_discount`.
|
|
425
|
-
*/
|
|
426
|
-
type?: "custom_discount";
|
|
427
|
-
/**
|
|
428
|
-
* Specifies the UUID of the custom discount.
|
|
429
|
-
*/
|
|
430
|
-
id?: string;
|
|
431
|
-
/**
|
|
432
|
-
* Specifies an external id for the custom discount.
|
|
433
|
-
*/
|
|
434
|
-
external_id?: string;
|
|
435
|
-
/**
|
|
436
|
-
* Specifies from where the custom discount is applied.
|
|
437
|
-
*
|
|
438
|
-
*/
|
|
439
|
-
discount_engine?: string;
|
|
440
|
-
/**
|
|
441
|
-
* The amount of the custom discount.
|
|
442
|
-
*/
|
|
443
|
-
amount?: FormattedPriceData;
|
|
444
|
-
/**
|
|
445
|
-
* Specifies a description for the custom discount.
|
|
446
|
-
*/
|
|
447
|
-
description?: string;
|
|
448
|
-
/**
|
|
449
|
-
* Specifies the discount code used for the custom discount.
|
|
450
|
-
*/
|
|
451
|
-
discount_code?: string;
|
|
452
|
-
/**
|
|
453
|
-
* Relationships to other resources like cart items
|
|
454
|
-
*/
|
|
455
|
-
relationships?: {
|
|
456
|
-
item?: {
|
|
457
|
-
data?: {
|
|
458
|
-
/**
|
|
459
|
-
* The cart item ID this discount is related to
|
|
460
|
-
*/
|
|
461
|
-
id?: string;
|
|
462
|
-
type?: "cart_item" | "custom_item";
|
|
463
|
-
};
|
|
464
|
-
};
|
|
465
|
-
};
|
|
466
|
-
};
|
|
467
|
-
/**
|
|
468
|
-
* CondensedPromotionResponse
|
|
469
|
-
*/
|
|
470
|
-
type CondensedPromotionResponse = {
|
|
471
|
-
/**
|
|
472
|
-
* Specifies the type of the resource. Always `promotion`.
|
|
473
|
-
*/
|
|
474
|
-
type?: "promotion";
|
|
475
|
-
/**
|
|
476
|
-
* Specifies the UUID of the promotion.
|
|
477
|
-
*/
|
|
478
|
-
readonly id?: string;
|
|
479
|
-
/**
|
|
480
|
-
* The name of the promotion.
|
|
481
|
-
*/
|
|
482
|
-
name?: string;
|
|
483
|
-
/**
|
|
484
|
-
* The description of the promotion.
|
|
485
|
-
*/
|
|
486
|
-
description?: string;
|
|
487
|
-
/**
|
|
488
|
-
* Whether the promotion is applied automatically.
|
|
489
|
-
*/
|
|
490
|
-
automatic?: boolean;
|
|
491
|
-
/**
|
|
492
|
-
* The type of promotion (for v1 promotions).
|
|
493
|
-
*/
|
|
494
|
-
promotion_type?: string;
|
|
495
|
-
/**
|
|
496
|
-
* The source of the promotion (for rule promotions).
|
|
497
|
-
*/
|
|
498
|
-
promotion_source?: string;
|
|
499
|
-
/**
|
|
500
|
-
* The start date and time of the promotion.
|
|
501
|
-
*/
|
|
502
|
-
start?: string;
|
|
503
|
-
/**
|
|
504
|
-
* The end date and time of the promotion.
|
|
505
|
-
*/
|
|
506
|
-
end?: string;
|
|
507
|
-
};
|
|
508
|
-
type CartEntityResponse = {
|
|
509
|
-
data?: CartResponse;
|
|
510
|
-
/**
|
|
511
|
-
* Related objects that are included in the response.
|
|
512
|
-
*/
|
|
513
|
-
included?: {
|
|
514
|
-
custom_discounts?: Array<CustomDiscountResponse>;
|
|
515
|
-
promotions?: Array<CondensedPromotionResponse>;
|
|
516
|
-
};
|
|
517
|
-
/**
|
|
518
|
-
* Additional metadata for the cart response.
|
|
519
|
-
*/
|
|
520
|
-
meta?: {
|
|
521
|
-
/**
|
|
522
|
-
* Payment intent details with nested structure including status and other Stripe payment intent fields
|
|
523
|
-
*/
|
|
524
|
-
payment_intent?: {
|
|
525
|
-
[key: string]: unknown;
|
|
526
|
-
};
|
|
527
|
-
};
|
|
528
|
-
/**
|
|
529
|
-
* Array of error objects, if any errors occurred.
|
|
530
|
-
*/
|
|
531
|
-
errors?: Array<ResponseErrorItem>;
|
|
532
|
-
};
|
|
533
|
-
/**
|
|
534
|
-
* Order Price Data
|
|
535
|
-
*/
|
|
536
|
-
type ItemPriceData = {
|
|
537
|
-
/**
|
|
538
|
-
* The amount for this item as an integer.
|
|
539
|
-
*/
|
|
540
|
-
readonly amount?: number;
|
|
541
|
-
/**
|
|
542
|
-
* The currency this item was added to the cart as.
|
|
543
|
-
*/
|
|
544
|
-
readonly currency?: string;
|
|
545
|
-
/**
|
|
546
|
-
* Whether or not this price is tax inclusive.
|
|
547
|
-
*/
|
|
548
|
-
readonly includes_tax?: boolean;
|
|
549
|
-
};
|
|
550
|
-
type Money = {
|
|
551
|
-
/**
|
|
552
|
-
* Amount in minor currency units (e.g., cents).
|
|
553
|
-
*/
|
|
554
|
-
amount: number;
|
|
555
|
-
/**
|
|
556
|
-
* ISO 4217 currency code (e.g., "USD").
|
|
557
|
-
*/
|
|
558
|
-
currency: string;
|
|
559
|
-
/**
|
|
560
|
-
* Whether the amount includes tax.
|
|
561
|
-
*/
|
|
562
|
-
includes_tax: boolean;
|
|
563
|
-
};
|
|
564
|
-
type Discount = {
|
|
565
|
-
amount: Money;
|
|
566
|
-
/**
|
|
567
|
-
* The discount code used, if applicable.
|
|
568
|
-
*/
|
|
569
|
-
code?: string;
|
|
570
|
-
/**
|
|
571
|
-
* Unique identifier for the discount.
|
|
572
|
-
*/
|
|
573
|
-
id: string;
|
|
574
|
-
/**
|
|
575
|
-
* The source or origin of the promotion, if applicable.
|
|
576
|
-
*/
|
|
577
|
-
promotion_source?: string;
|
|
578
|
-
/**
|
|
579
|
-
* Indicates whether the discount applies to the entire cart.
|
|
580
|
-
*/
|
|
581
|
-
is_cart_discount?: boolean;
|
|
582
|
-
/**
|
|
583
|
-
* Order in which the discount was applied.
|
|
584
|
-
*/
|
|
585
|
-
ordinal?: number;
|
|
586
|
-
/**
|
|
587
|
-
* Identifies the specific action within a multi-action rule promotion that produced this discount.
|
|
588
|
-
*/
|
|
589
|
-
promotion_action_id?: string;
|
|
590
|
-
};
|
|
591
|
-
/**
|
|
592
|
-
* CartItemFormattedPriceData
|
|
593
|
-
*/
|
|
594
|
-
type CartItemFormattedPriceData = {
|
|
595
|
-
/**
|
|
596
|
-
* The amount per each single unit.
|
|
597
|
-
*/
|
|
598
|
-
unit?: FormattedPriceData;
|
|
599
|
-
/**
|
|
600
|
-
* The total amount of the item (i.e., unit * quantity).
|
|
601
|
-
*/
|
|
602
|
-
value?: FormattedPriceData;
|
|
603
|
-
};
|
|
604
|
-
type Timestamps = {
|
|
605
|
-
/**
|
|
606
|
-
* The date this was created.
|
|
607
|
-
*/
|
|
608
|
-
created_at?: string;
|
|
609
|
-
/**
|
|
610
|
-
* The date this was last updated.
|
|
611
|
-
*/
|
|
612
|
-
updated_at?: string;
|
|
613
|
-
};
|
|
614
|
-
/**
|
|
615
|
-
* Cart Item Response
|
|
616
|
-
*/
|
|
617
|
-
type CartItemResponse = {
|
|
618
|
-
/**
|
|
619
|
-
* The unique identifier for the cart item.
|
|
620
|
-
*/
|
|
621
|
-
readonly id?: string;
|
|
622
|
-
/**
|
|
623
|
-
* The type of cart item.
|
|
624
|
-
*/
|
|
625
|
-
readonly type?: "cart_item" | "custom_item" | "subscription_item" | "promotion_item";
|
|
626
|
-
/**
|
|
627
|
-
* The unique ID of the product (for cart_item type).
|
|
628
|
-
*/
|
|
629
|
-
readonly product_id?: string;
|
|
630
|
-
/**
|
|
631
|
-
* The unique ID of the promotion (for promotion_item type).
|
|
632
|
-
*/
|
|
633
|
-
readonly promotion_id?: string;
|
|
634
|
-
/**
|
|
635
|
-
* The unique ID of the subscription offering for subscription items.
|
|
636
|
-
*/
|
|
637
|
-
readonly subscription_offering_id?: string;
|
|
638
|
-
/**
|
|
639
|
-
* The name of this item
|
|
640
|
-
*/
|
|
641
|
-
readonly name?: string;
|
|
642
|
-
/**
|
|
643
|
-
* A description of the cart item.
|
|
644
|
-
*/
|
|
645
|
-
readonly description?: string;
|
|
646
|
-
/**
|
|
647
|
-
* The SKU of the cart item.
|
|
648
|
-
*/
|
|
649
|
-
readonly sku?: string;
|
|
650
|
-
/**
|
|
651
|
-
* The slug of the cart item.
|
|
652
|
-
*/
|
|
653
|
-
readonly slug?: string;
|
|
654
|
-
/**
|
|
655
|
-
* The unique identifier of the catalog associated with the product is shown if catalog_source=pim is set.
|
|
656
|
-
*/
|
|
657
|
-
readonly catalog_id?: string;
|
|
658
|
-
/**
|
|
659
|
-
* The catalog source. Always `pim` or `legacy`.
|
|
660
|
-
*/
|
|
661
|
-
readonly catalog_source?: string;
|
|
662
|
-
/**
|
|
663
|
-
* Configuration for bundle products.
|
|
664
|
-
*/
|
|
665
|
-
readonly bundle_configuration?: {
|
|
666
|
-
selected_options?: {
|
|
667
|
-
[key: string]: {
|
|
668
|
-
[key: string]: number;
|
|
669
|
-
};
|
|
670
|
-
};
|
|
671
|
-
/**
|
|
672
|
-
* Array of component products for bundle configuration
|
|
673
|
-
*/
|
|
674
|
-
component_products?: Array<{
|
|
675
|
-
/**
|
|
676
|
-
* Product ID
|
|
677
|
-
*/
|
|
678
|
-
id?: string;
|
|
679
|
-
/**
|
|
680
|
-
* Product type
|
|
681
|
-
*/
|
|
682
|
-
type?: string;
|
|
683
|
-
/**
|
|
684
|
-
* Product attributes as a generic object
|
|
685
|
-
*/
|
|
686
|
-
attributes?: {
|
|
687
|
-
[key: string]: unknown;
|
|
688
|
-
};
|
|
689
|
-
/**
|
|
690
|
-
* Product meta information as a generic object
|
|
691
|
-
*/
|
|
692
|
-
meta?: {
|
|
693
|
-
[key: string]: unknown;
|
|
694
|
-
};
|
|
695
|
-
/**
|
|
696
|
-
* Product price
|
|
697
|
-
*/
|
|
698
|
-
price?: {
|
|
699
|
-
[key: string]: unknown;
|
|
700
|
-
};
|
|
701
|
-
/**
|
|
702
|
-
* Product relationships as a generic object
|
|
703
|
-
*/
|
|
704
|
-
relationships?: {
|
|
705
|
-
[key: string]: unknown;
|
|
706
|
-
};
|
|
707
|
-
}>;
|
|
708
|
-
};
|
|
709
|
-
/**
|
|
710
|
-
* Components of the cart item for bundle products.
|
|
711
|
-
*/
|
|
712
|
-
readonly components?: {
|
|
713
|
-
[key: string]: {
|
|
714
|
-
name?: string;
|
|
715
|
-
options?: Array<{
|
|
716
|
-
id?: string;
|
|
717
|
-
quantity?: number;
|
|
718
|
-
type?: string;
|
|
719
|
-
}>;
|
|
720
|
-
};
|
|
721
|
-
};
|
|
722
|
-
readonly image?: {
|
|
723
|
-
/**
|
|
724
|
-
* The MIME type for the uploaded file.
|
|
725
|
-
*/
|
|
726
|
-
readonly mime_type?: string;
|
|
727
|
-
/**
|
|
728
|
-
* The name of the image file that was uploaded.
|
|
729
|
-
*/
|
|
730
|
-
readonly file_name?: string;
|
|
731
|
-
/**
|
|
732
|
-
* The link to the image.
|
|
733
|
-
*/
|
|
734
|
-
readonly href?: string;
|
|
735
|
-
};
|
|
736
|
-
/**
|
|
737
|
-
* The quantity of the cart item.
|
|
738
|
-
*/
|
|
739
|
-
readonly quantity?: number;
|
|
740
|
-
/**
|
|
741
|
-
* The quantity automatically added (for gift items).
|
|
742
|
-
*/
|
|
743
|
-
readonly auto_add_quantity?: number;
|
|
744
|
-
/**
|
|
745
|
-
* Whether or not the quantity of the item will be checked against inventory.
|
|
746
|
-
*/
|
|
747
|
-
readonly manage_stock?: boolean;
|
|
748
|
-
/**
|
|
749
|
-
* The unit price of the item.
|
|
750
|
-
*/
|
|
751
|
-
readonly unit_price?: ItemPriceData;
|
|
752
|
-
/**
|
|
753
|
-
* The total price of the item (i.e., unit * quantity).
|
|
754
|
-
*/
|
|
755
|
-
readonly value?: ItemPriceData;
|
|
756
|
-
/**
|
|
757
|
-
* Array of discounts applied to the cart item.
|
|
758
|
-
*/
|
|
759
|
-
readonly discounts?: Array<Discount>;
|
|
760
|
-
/**
|
|
761
|
-
* Custom inputs for personalized products.
|
|
762
|
-
*/
|
|
763
|
-
readonly custom_inputs?: {
|
|
764
|
-
[key: string]: unknown;
|
|
765
|
-
};
|
|
766
|
-
/**
|
|
767
|
-
* Configuration for subscription items.
|
|
768
|
-
*/
|
|
769
|
-
readonly subscription_configuration?: {
|
|
770
|
-
/**
|
|
771
|
-
* The subscription plan ID.
|
|
772
|
-
*/
|
|
773
|
-
plan?: string;
|
|
774
|
-
/**
|
|
775
|
-
* The subscription pricing option ID.
|
|
776
|
-
*/
|
|
777
|
-
pricing_option?: string;
|
|
778
|
-
};
|
|
779
|
-
readonly links?: {
|
|
780
|
-
/**
|
|
781
|
-
* A URL related to the resource.
|
|
782
|
-
*/
|
|
783
|
-
product?: string;
|
|
784
|
-
/**
|
|
785
|
-
* A URL related to the subscription offering resource.
|
|
786
|
-
*/
|
|
787
|
-
subscription_offering?: string;
|
|
788
|
-
};
|
|
789
|
-
readonly meta?: {
|
|
790
|
-
display_price?: {
|
|
791
|
-
/**
|
|
792
|
-
* The amount of this item after discounts and taxes are applied.
|
|
793
|
-
*/
|
|
794
|
-
with_tax?: CartItemFormattedPriceData;
|
|
795
|
-
/**
|
|
796
|
-
* The amount of this item after discounts are applied and before taxes.
|
|
797
|
-
*/
|
|
798
|
-
without_tax?: CartItemFormattedPriceData;
|
|
799
|
-
/**
|
|
800
|
-
* The amount of taxes applied to this item.
|
|
801
|
-
*/
|
|
802
|
-
tax?: CartItemFormattedPriceData;
|
|
803
|
-
/**
|
|
804
|
-
* The amount of the discount applied to this item.
|
|
805
|
-
*/
|
|
806
|
-
discount?: CartItemFormattedPriceData;
|
|
807
|
-
without_discount?: CartItemFormattedPriceData;
|
|
808
|
-
/**
|
|
809
|
-
* The product's original catalog price before any catalog-level sales, tiered pricing adjustments, or cart/item level promotions are applied. This value is sourced from the product's `meta.original_display_price` field in the catalog response. See [Get a Product](/docs/api/pxm/catalog/get-by-context-product).
|
|
810
|
-
*/
|
|
811
|
-
original_price?: CartItemFormattedPriceData;
|
|
812
|
-
/**
|
|
813
|
-
* Detailed discount information.
|
|
814
|
-
*/
|
|
815
|
-
discounts?: {
|
|
816
|
-
[key: string]: {
|
|
817
|
-
/**
|
|
818
|
-
* The discount amount.
|
|
819
|
-
*/
|
|
820
|
-
amount: number;
|
|
821
|
-
/**
|
|
822
|
-
* The currency code.
|
|
823
|
-
*/
|
|
824
|
-
currency: string;
|
|
825
|
-
/**
|
|
826
|
-
* The formatted discount amount.
|
|
827
|
-
*/
|
|
828
|
-
formatted: string;
|
|
829
|
-
/**
|
|
830
|
-
* The discount constituents.
|
|
831
|
-
*/
|
|
832
|
-
constituents?: {
|
|
833
|
-
[key: string]: FormattedPriceData;
|
|
834
|
-
};
|
|
835
|
-
};
|
|
836
|
-
};
|
|
837
|
-
};
|
|
838
|
-
timestamps?: Timestamps;
|
|
839
|
-
};
|
|
840
|
-
/**
|
|
841
|
-
* Relationships to other resources.
|
|
842
|
-
*/
|
|
843
|
-
readonly relationships?: {
|
|
844
|
-
/**
|
|
845
|
-
* Related tax items.
|
|
846
|
-
*/
|
|
847
|
-
taxes?: {
|
|
848
|
-
data?: null | Array<RelationshipItem>;
|
|
849
|
-
};
|
|
850
|
-
/**
|
|
851
|
-
* Related custom discounts.
|
|
852
|
-
*/
|
|
853
|
-
custom_discounts?: {
|
|
854
|
-
data?: null | Array<RelationshipItem>;
|
|
855
|
-
};
|
|
856
|
-
/**
|
|
857
|
-
* Related promotions.
|
|
858
|
-
*/
|
|
859
|
-
promotions?: {
|
|
860
|
-
data?: null | Array<RelationshipItem>;
|
|
861
|
-
};
|
|
862
|
-
};
|
|
863
|
-
/**
|
|
864
|
-
* The shipping group ID for this item.
|
|
865
|
-
*/
|
|
866
|
-
readonly shipping_group_id?: string;
|
|
867
|
-
/**
|
|
868
|
-
* The source of the promotion (for promotion items).
|
|
869
|
-
*/
|
|
870
|
-
readonly promotion_source?: "rule-promotion";
|
|
871
|
-
/**
|
|
872
|
-
* The action ID within the rule promotion that produced this promotion item.
|
|
873
|
-
*/
|
|
874
|
-
readonly promotion_action_id?: string;
|
|
875
|
-
/**
|
|
876
|
-
* The stock location for this item.
|
|
877
|
-
*/
|
|
878
|
-
readonly location?: string;
|
|
879
|
-
/**
|
|
880
|
-
* Custom attributes attached to the cart item.
|
|
881
|
-
*/
|
|
882
|
-
readonly custom_attributes?: CustomAttributes;
|
|
883
|
-
};
|
|
884
|
-
/**
|
|
885
|
-
* TaxItemResponse
|
|
886
|
-
*/
|
|
887
|
-
type TaxItemResponse = {
|
|
888
|
-
/**
|
|
889
|
-
* Specifies the type of the resource. Always `tax_item`.
|
|
890
|
-
*/
|
|
891
|
-
type?: "tax_item";
|
|
892
|
-
/**
|
|
893
|
-
* Specifies the UUID of the tax item.
|
|
894
|
-
*/
|
|
895
|
-
readonly id?: string;
|
|
896
|
-
/**
|
|
897
|
-
* The jurisdiction for the tax item.
|
|
898
|
-
*/
|
|
899
|
-
jurisdiction?: string;
|
|
900
|
-
/**
|
|
901
|
-
* The tax code for the tax item.
|
|
902
|
-
*/
|
|
903
|
-
code?: string;
|
|
904
|
-
/**
|
|
905
|
-
* The name of the tax item.
|
|
906
|
-
*/
|
|
907
|
-
name?: string;
|
|
908
|
-
/**
|
|
909
|
-
* The tax rate as a decimal (e.g., 0.085 for 8.5%).
|
|
910
|
-
*/
|
|
911
|
-
rate?: number;
|
|
912
|
-
/**
|
|
913
|
-
* The tax amount in the smallest currency unit.
|
|
914
|
-
*/
|
|
915
|
-
amount?: number;
|
|
916
|
-
};
|
|
917
|
-
type CartItemCollectionResponse = {
|
|
918
|
-
data: Array<CartItemResponse>;
|
|
919
|
-
/**
|
|
920
|
-
* Related objects that are included in the response.
|
|
921
|
-
*/
|
|
922
|
-
included?: {
|
|
923
|
-
custom_discounts?: Array<CustomDiscountResponse>;
|
|
924
|
-
promotions?: Array<{
|
|
925
|
-
automatic?: boolean;
|
|
926
|
-
description?: string;
|
|
927
|
-
end?: string;
|
|
928
|
-
id?: string;
|
|
929
|
-
name?: string;
|
|
930
|
-
promotion_type?: string;
|
|
931
|
-
/**
|
|
932
|
-
* The source of the promotion
|
|
933
|
-
*/
|
|
934
|
-
promotion_source?: string;
|
|
935
|
-
start?: string;
|
|
936
|
-
type?: "promotion";
|
|
937
|
-
}>;
|
|
938
|
-
/**
|
|
939
|
-
* Array of tax items included in the response.
|
|
940
|
-
*/
|
|
941
|
-
tax_items?: Array<TaxItemResponse>;
|
|
942
|
-
};
|
|
943
|
-
/**
|
|
944
|
-
* Additional meta information about the cart items collection.
|
|
945
|
-
*/
|
|
946
|
-
meta?: {
|
|
947
|
-
display_price?: {
|
|
948
|
-
with_tax?: FormattedPriceData;
|
|
949
|
-
without_tax?: FormattedPriceData;
|
|
950
|
-
tax?: FormattedPriceData;
|
|
951
|
-
discount?: FormattedPriceData;
|
|
952
|
-
without_discount?: FormattedPriceData;
|
|
953
|
-
shipping?: FormattedPriceData;
|
|
954
|
-
shipping_discount?: FormattedPriceData;
|
|
955
|
-
authorized?: FormattedPriceData;
|
|
956
|
-
balance_owing?: FormattedPriceData;
|
|
957
|
-
paid?: FormattedPriceData;
|
|
958
|
-
};
|
|
959
|
-
timestamps?: CartTimestamps;
|
|
960
|
-
/**
|
|
961
|
-
* Optional array of informational messages that provide feedback about operations performed on the cart items, such as promotions added or discounts applied. This field is only present when there are relevant messages to display.
|
|
962
|
-
*
|
|
963
|
-
*/
|
|
964
|
-
messages?: Array<{
|
|
965
|
-
/**
|
|
966
|
-
* Identifies the cart item that triggered this message
|
|
967
|
-
*/
|
|
968
|
-
source?: {
|
|
969
|
-
/**
|
|
970
|
-
* The type of the source item
|
|
971
|
-
*/
|
|
972
|
-
type: string;
|
|
973
|
-
/**
|
|
974
|
-
* The unique identifier of the source item
|
|
975
|
-
*/
|
|
976
|
-
id: string;
|
|
977
|
-
/**
|
|
978
|
-
* The promotion code (present when source type is promotion)
|
|
979
|
-
*/
|
|
980
|
-
code?: string;
|
|
981
|
-
};
|
|
982
|
-
/**
|
|
983
|
-
* A short descriptive title for the message
|
|
984
|
-
*/
|
|
985
|
-
title: string;
|
|
986
|
-
/**
|
|
987
|
-
* A detailed description of the message
|
|
988
|
-
*/
|
|
989
|
-
description: string;
|
|
990
|
-
}>;
|
|
991
|
-
/**
|
|
992
|
-
* Array of promotion suggestions
|
|
993
|
-
*/
|
|
994
|
-
promotion_suggestions?: Array<{
|
|
995
|
-
/**
|
|
996
|
-
* Bundle configuration with promotion targets
|
|
997
|
-
*/
|
|
998
|
-
bundle?: Array<{
|
|
999
|
-
/**
|
|
1000
|
-
* Whether to automatically add free gift
|
|
1001
|
-
*/
|
|
1002
|
-
auto_add_free_gift?: boolean;
|
|
1003
|
-
/**
|
|
1004
|
-
* Cart item ID for the target
|
|
1005
|
-
*/
|
|
1006
|
-
cart_item_id?: string;
|
|
1007
|
-
/**
|
|
1008
|
-
* Quantity for the promotion
|
|
1009
|
-
*/
|
|
1010
|
-
quantity?: number;
|
|
1011
|
-
/**
|
|
1012
|
-
* Array of target SKUs
|
|
1013
|
-
*/
|
|
1014
|
-
targets?: Array<string>;
|
|
1015
|
-
[key: string]: unknown;
|
|
1016
|
-
}>;
|
|
1017
|
-
code?: string;
|
|
1018
|
-
info?: string;
|
|
1019
|
-
message?: string;
|
|
1020
|
-
promotion_id?: string;
|
|
1021
|
-
/**
|
|
1022
|
-
* Whether this promotion should be automatically added
|
|
1023
|
-
*/
|
|
1024
|
-
auto_add?: boolean;
|
|
1025
|
-
/**
|
|
1026
|
-
* Array of promotion targets (alternative structure)
|
|
1027
|
-
*/
|
|
1028
|
-
targets?: Array<{
|
|
1029
|
-
/**
|
|
1030
|
-
* The cart item ID for this target
|
|
1031
|
-
*/
|
|
1032
|
-
cart_item_id?: string;
|
|
1033
|
-
/**
|
|
1034
|
-
* The quantity for this target
|
|
1035
|
-
*/
|
|
1036
|
-
quantity?: number;
|
|
1037
|
-
/**
|
|
1038
|
-
* Array of SKU codes for this target
|
|
1039
|
-
*/
|
|
1040
|
-
skus?: Array<string>;
|
|
1041
|
-
}>;
|
|
1042
|
-
}>;
|
|
1043
|
-
};
|
|
1044
|
-
/**
|
|
1045
|
-
* Array of error objects, if any errors occurred.
|
|
1046
|
-
*/
|
|
1047
|
-
errors?: Array<ResponseErrorItem>;
|
|
1048
|
-
};
|
|
1049
|
-
/**
|
|
1050
|
-
* Bulk Update Carts Items (Common Properties)
|
|
1051
|
-
*/
|
|
1052
|
-
type BulkUpdateCartsItemsCommon = {
|
|
1053
|
-
/**
|
|
1054
|
-
* Specifies the ID of the cart item that you want to update in cart.
|
|
1055
|
-
*/
|
|
1056
|
-
id?: string;
|
|
1057
|
-
/**
|
|
1058
|
-
* Specifies the amount of items to update in the cart.
|
|
1059
|
-
*/
|
|
1060
|
-
quantity?: number;
|
|
1061
|
-
/**
|
|
1062
|
-
* The type of cart item being updated.
|
|
1063
|
-
*/
|
|
1064
|
-
type?: "cart_item" | "custom_item";
|
|
1065
|
-
/**
|
|
1066
|
-
* Specifies the custom text to be added to a product. See [custom inputs](https://elasticpath.dev/docs/pxm/products/ep-pxm-products-api/update-a-product#using-custom-inputs-attribute).
|
|
1067
|
-
*/
|
|
1068
|
-
custom_inputs?: {
|
|
1069
|
-
[key: string]: unknown;
|
|
1070
|
-
};
|
|
1071
|
-
/**
|
|
1072
|
-
* Specifies custom attributes to be added to the cart item.
|
|
1073
|
-
*/
|
|
1074
|
-
custom_attributes?: CustomAttributes;
|
|
1075
|
-
/**
|
|
1076
|
-
* Specifies the shipping group ID for the cart item.
|
|
1077
|
-
*/
|
|
1078
|
-
shipping_group_id?: string;
|
|
1079
|
-
};
|
|
1080
|
-
/**
|
|
1081
|
-
* Update Cart Item Quantity
|
|
1082
|
-
*/
|
|
1083
|
-
type BulkUpdateCartsItemsWithQuantity = BulkUpdateCartsItemsCommon & {
|
|
1084
|
-
quantity: unknown;
|
|
1085
|
-
id: unknown;
|
|
1086
|
-
};
|
|
1087
|
-
/**
|
|
1088
|
-
* Update Cart Item Shipping Group
|
|
1089
|
-
*/
|
|
1090
|
-
type BulkUpdateCartsItemsWithShippingGroup = BulkUpdateCartsItemsCommon & {
|
|
1091
|
-
shipping_group_id: unknown;
|
|
1092
|
-
id: unknown;
|
|
1093
|
-
};
|
|
1094
|
-
/**
|
|
1095
|
-
* Update Cart Item Custom Inputs
|
|
1096
|
-
*/
|
|
1097
|
-
type BulkUpdateCartsItemsWithCustomInputs = BulkUpdateCartsItemsCommon & {
|
|
1098
|
-
custom_inputs: unknown;
|
|
1099
|
-
id: unknown;
|
|
1100
|
-
};
|
|
1101
|
-
/**
|
|
1102
|
-
* Update All Or Nothing Options Object
|
|
1103
|
-
*/
|
|
1104
|
-
type UpdateAllOrNothingOptionsObject = {
|
|
1105
|
-
/**
|
|
1106
|
-
* When set to`true`, if an error occurs for any item, no items are updated in the cart. When set to `false`, valid items are updated in the cart and the items with errors are reported in the response. Default is `true`.
|
|
1107
|
-
*/
|
|
1108
|
-
update_all_or_nothing?: boolean;
|
|
1109
|
-
};
|
|
1110
|
-
/**
|
|
1111
|
-
* Bulk Update Carts Items
|
|
1112
|
-
*/
|
|
1113
|
-
type BulkUpdateCartsItems = {
|
|
1114
|
-
data?: Array<BulkUpdateCartsItemsWithQuantity | BulkUpdateCartsItemsWithShippingGroup | BulkUpdateCartsItemsWithCustomInputs>;
|
|
1115
|
-
options?: UpdateAllOrNothingOptionsObject;
|
|
1116
|
-
};
|
|
1117
|
-
/**
|
|
1118
|
-
* Base Item Object Data
|
|
1119
|
-
*/
|
|
1120
|
-
type BaseItemObjectData = {
|
|
1121
|
-
/**
|
|
1122
|
-
* The number of items to add.
|
|
1123
|
-
*/
|
|
1124
|
-
quantity: number;
|
|
1125
|
-
/**
|
|
1126
|
-
* Specifies the ID of the product you want to add. (use this OR sku)
|
|
1127
|
-
*/
|
|
1128
|
-
id?: string;
|
|
1129
|
-
/**
|
|
1130
|
-
* Specifies the item SKU that you want to add. (use this OR id)
|
|
1131
|
-
*/
|
|
1132
|
-
sku?: string;
|
|
1133
|
-
/**
|
|
1134
|
-
* Optional name for the product item. If not provided, the product name from catalog will be used.
|
|
1135
|
-
*/
|
|
1136
|
-
name?: string;
|
|
1137
|
-
/**
|
|
1138
|
-
* The custom text to be added to a product.
|
|
1139
|
-
*/
|
|
1140
|
-
custom_inputs?: {
|
|
1141
|
-
[key: string]: unknown;
|
|
1142
|
-
};
|
|
1143
|
-
/**
|
|
1144
|
-
* Object used to describe the bundle options selected.
|
|
1145
|
-
*/
|
|
1146
|
-
bundle_configuration?: {
|
|
1147
|
-
/**
|
|
1148
|
-
* Specifies selected options.
|
|
1149
|
-
*/
|
|
1150
|
-
selected_options?: {
|
|
1151
|
-
[key: string]: unknown;
|
|
1152
|
-
};
|
|
1153
|
-
/**
|
|
1154
|
-
* Array of component products for the selected options.
|
|
1155
|
-
*/
|
|
1156
|
-
component_products?: Array<unknown>;
|
|
1157
|
-
};
|
|
1158
|
-
/**
|
|
1159
|
-
* Identifier for a Shipping Group
|
|
1160
|
-
*/
|
|
1161
|
-
shipping_group_id?: string;
|
|
1162
|
-
/**
|
|
1163
|
-
* The slug of a stock location.
|
|
1164
|
-
*/
|
|
1165
|
-
location?: string;
|
|
1166
|
-
custom_attributes?: CustomAttributes;
|
|
1167
|
-
};
|
|
1168
|
-
/**
|
|
1169
|
-
* Cart Item Object Data
|
|
1170
|
-
*/
|
|
1171
|
-
type CartItemObjectData = {
|
|
1172
|
-
/**
|
|
1173
|
-
* The type of object being returned. Must be `cart_item` for cart items.
|
|
1174
|
-
*/
|
|
1175
|
-
type: "cart_item";
|
|
1176
|
-
} & BaseItemObjectData;
|
|
1177
|
-
/**
|
|
1178
|
-
* Cart Item Object Request
|
|
1179
|
-
*/
|
|
1180
|
-
type CartItemObjectRequest = {
|
|
1181
|
-
data?: CartItemObjectData;
|
|
1182
|
-
};
|
|
1183
|
-
/**
|
|
1184
|
-
* Subscription Item Object Data
|
|
1185
|
-
*/
|
|
1186
|
-
type SubscriptionItemObjectData = {
|
|
1187
|
-
/**
|
|
1188
|
-
* The type of object being returned.
|
|
1189
|
-
*/
|
|
1190
|
-
type: "subscription_item";
|
|
1191
|
-
/**
|
|
1192
|
-
* The number of items added to the cart.
|
|
1193
|
-
*/
|
|
1194
|
-
quantity: number;
|
|
1195
|
-
/**
|
|
1196
|
-
* Specifies the ID of the subscription offering you want to add to cart.
|
|
1197
|
-
*/
|
|
1198
|
-
id: string;
|
|
1199
|
-
/**
|
|
1200
|
-
* Specifies how the subscription offering should be configured.
|
|
1201
|
-
*/
|
|
1202
|
-
subscription_configuration: {
|
|
1203
|
-
/**
|
|
1204
|
-
* The ID of the pricing option within the offering to use for the subscription.
|
|
1205
|
-
*/
|
|
1206
|
-
pricing_option: string;
|
|
1207
|
-
/**
|
|
1208
|
-
* The ID of the plan within the offering to use for the subscription.
|
|
1209
|
-
*
|
|
1210
|
-
* @deprecated
|
|
1211
|
-
*/
|
|
1212
|
-
plan: string;
|
|
1213
|
-
};
|
|
1214
|
-
};
|
|
1215
|
-
/**
|
|
1216
|
-
* Subscription Item Object
|
|
1217
|
-
*/
|
|
1218
|
-
type SubscriptionItemObject = {
|
|
1219
|
-
data?: SubscriptionItemObjectData & CartItemResponse;
|
|
1220
|
-
};
|
|
1221
|
-
/**
|
|
1222
|
-
* Cart Merge Object
|
|
1223
|
-
*/
|
|
1224
|
-
type CartMergeObject = {
|
|
1225
|
-
/**
|
|
1226
|
-
* The type of object being returned. Must be `cart_items`.
|
|
1227
|
-
*/
|
|
1228
|
-
type: "cart_items";
|
|
1229
|
-
/**
|
|
1230
|
-
* The original cart to be merged from.
|
|
1231
|
-
*/
|
|
1232
|
-
cart_id: string;
|
|
1233
|
-
};
|
|
1234
|
-
/**
|
|
1235
|
-
* Add All Or Nothing Options Object
|
|
1236
|
-
*/
|
|
1237
|
-
type AddAllOrNothingOptionsObject = {
|
|
1238
|
-
/**
|
|
1239
|
-
* When `true`, if an error occurs for any item, no items are added to the cart. When `false`, valid items are added to the cart and the items with errors are reported in the response. Default is `false`.
|
|
1240
|
-
*/
|
|
1241
|
-
add_all_or_nothing?: boolean;
|
|
1242
|
-
};
|
|
1243
|
-
/**
|
|
1244
|
-
* Cart Merge Object Request
|
|
1245
|
-
*/
|
|
1246
|
-
type CartMergeObjectRequest = {
|
|
1247
|
-
data?: CartMergeObject;
|
|
1248
|
-
options?: AddAllOrNothingOptionsObject;
|
|
1249
|
-
};
|
|
1250
|
-
/**
|
|
1251
|
-
* Custom Item Object Data
|
|
1252
|
-
*/
|
|
1253
|
-
type CustomItemObjectData = {
|
|
1254
|
-
/**
|
|
1255
|
-
* The type of object being returned. Must be `custom_item`.
|
|
1256
|
-
*/
|
|
1257
|
-
type: "custom_item";
|
|
1258
|
-
/**
|
|
1259
|
-
* The number of custom items to add to cart.
|
|
1260
|
-
*/
|
|
1261
|
-
quantity: number;
|
|
1262
|
-
price: {
|
|
1263
|
-
/**
|
|
1264
|
-
* The unit price of the custom item.
|
|
1265
|
-
*/
|
|
1266
|
-
amount: number;
|
|
1267
|
-
/**
|
|
1268
|
-
* Set to`true` if relevant taxes have been included in the price, `false` if not. Defaults to `true`.
|
|
1269
|
-
*/
|
|
1270
|
-
includes_tax?: boolean;
|
|
1271
|
-
};
|
|
1272
|
-
/**
|
|
1273
|
-
* A description of the custom item.
|
|
1274
|
-
*/
|
|
1275
|
-
description?: string;
|
|
1276
|
-
/**
|
|
1277
|
-
* The `SKU` code to use for the custom item. See [best practices](https://elasticpath.dev/docs/commerce-cloud/carts/cart-items/add-custom-item-to-cart#best-practices) to use the `SKU` code.
|
|
1278
|
-
*/
|
|
1279
|
-
sku?: string;
|
|
1280
|
-
/**
|
|
1281
|
-
* The name of the custom item.
|
|
1282
|
-
*/
|
|
1283
|
-
name: string;
|
|
1284
|
-
/**
|
|
1285
|
-
* The custom text to be added to a product.
|
|
1286
|
-
*/
|
|
1287
|
-
custom_inputs?: {
|
|
1288
|
-
[key: string]: unknown;
|
|
1289
|
-
};
|
|
1290
|
-
/**
|
|
1291
|
-
* Identifier for a created Cart Shipping Group
|
|
1292
|
-
*/
|
|
1293
|
-
shipping_group_id?: string;
|
|
1294
|
-
custom_attributes?: CustomAttributes;
|
|
1295
|
-
};
|
|
1296
|
-
/**
|
|
1297
|
-
* Custom Item Object
|
|
1298
|
-
*/
|
|
1299
|
-
type CustomItemObject = {
|
|
1300
|
-
data?: CustomItemObjectData;
|
|
1301
|
-
};
|
|
1302
|
-
/**
|
|
1303
|
-
* Re Order Object
|
|
1304
|
-
*/
|
|
1305
|
-
type ReOrderObject = {
|
|
1306
|
-
/**
|
|
1307
|
-
* The type of resource being returned. Use `order_items`.
|
|
1308
|
-
*/
|
|
1309
|
-
type: "order_items";
|
|
1310
|
-
/**
|
|
1311
|
-
* The unique identifier of the order.
|
|
1312
|
-
*/
|
|
1313
|
-
order_id: string;
|
|
1314
|
-
};
|
|
1315
|
-
/**
|
|
1316
|
-
* Re-Order Object Request
|
|
1317
|
-
*/
|
|
1318
|
-
type ReOrderObjectRequest = {
|
|
1319
|
-
data?: ReOrderObject;
|
|
1320
|
-
options?: AddAllOrNothingOptionsObject;
|
|
1321
|
-
};
|
|
1322
|
-
/**
|
|
1323
|
-
* Promotion Item Object Data
|
|
1324
|
-
*/
|
|
1325
|
-
type PromotionItemObjectData = {
|
|
1326
|
-
/**
|
|
1327
|
-
* Specifies the type of resource, which is `promotion_item`.
|
|
1328
|
-
*/
|
|
1329
|
-
type: "promotion_item";
|
|
1330
|
-
/**
|
|
1331
|
-
* Specifies the promotion code. For more information about codes[].user[], see the [Create Promotion codes](/docs/api/promotions/create-promotion-codes) section.
|
|
1332
|
-
*/
|
|
1333
|
-
code: string;
|
|
1334
|
-
};
|
|
1335
|
-
/**
|
|
1336
|
-
* Promotion Item Object
|
|
1337
|
-
*/
|
|
1338
|
-
type PromotionItemObject = {
|
|
1339
|
-
data?: PromotionItemObjectData;
|
|
1340
|
-
};
|
|
1341
|
-
/**
|
|
1342
|
-
* Bulk Add Items Request
|
|
1343
|
-
*/
|
|
1344
|
-
type BulkAddItemsRequest = {
|
|
1345
|
-
data?: Array<CartItemObjectData | CartMergeObject | CustomItemObjectData | ReOrderObject | PromotionItemObjectData>;
|
|
1346
|
-
options?: AddAllOrNothingOptionsObject;
|
|
1347
|
-
};
|
|
1348
|
-
/**
|
|
1349
|
-
* Update Carts Items
|
|
1350
|
-
*/
|
|
1351
|
-
type UpdateCartsItems = {
|
|
1352
|
-
data?: {
|
|
1353
|
-
/**
|
|
1354
|
-
* The type of the cart item.
|
|
1355
|
-
*/
|
|
1356
|
-
type?: "cart_item";
|
|
1357
|
-
/**
|
|
1358
|
-
* The unique identifier of the cart item.
|
|
1359
|
-
*/
|
|
1360
|
-
id?: string;
|
|
1361
|
-
/**
|
|
1362
|
-
* The amount of products to add to cart.
|
|
1363
|
-
*/
|
|
1364
|
-
quantity?: number;
|
|
1365
|
-
/**
|
|
1366
|
-
* The custom text to be added to a product.
|
|
1367
|
-
*/
|
|
1368
|
-
custom_inputs?: {
|
|
1369
|
-
[key: string]: unknown;
|
|
1370
|
-
};
|
|
1371
|
-
/**
|
|
1372
|
-
* Custom attributes to be added to the cart item.
|
|
1373
|
-
*/
|
|
1374
|
-
custom_attributes?: CustomAttributes;
|
|
1375
|
-
/**
|
|
1376
|
-
* The unique identifier of the shipping group to be added to the cart.
|
|
1377
|
-
*/
|
|
1378
|
-
shipping_group_id?: string;
|
|
1379
|
-
};
|
|
1380
|
-
};
|
|
1381
|
-
/**
|
|
1382
|
-
* Carts Relationships Accounts Data
|
|
1383
|
-
*/
|
|
1384
|
-
type CartsRelationshipsAccountsData = {
|
|
1385
|
-
data?: Array<{
|
|
1386
|
-
/**
|
|
1387
|
-
* The ID of the account.
|
|
1388
|
-
*/
|
|
1389
|
-
id?: string;
|
|
1390
|
-
/**
|
|
1391
|
-
* The type of related object. Ensure that it is account.
|
|
1392
|
-
*/
|
|
1393
|
-
type?: string;
|
|
1394
|
-
}>;
|
|
1395
|
-
};
|
|
1396
|
-
/**
|
|
1397
|
-
* Carts Relationships Customers Data
|
|
1398
|
-
*/
|
|
1399
|
-
type CartsRelationshipsCustomersData = {
|
|
1400
|
-
data?: Array<{
|
|
1401
|
-
/**
|
|
1402
|
-
* The ID of the customer.
|
|
1403
|
-
*/
|
|
1404
|
-
id?: string;
|
|
1405
|
-
/**
|
|
1406
|
-
* The type of related object. Ensure that it is customer.
|
|
1407
|
-
*/
|
|
1408
|
-
type?: string;
|
|
1409
|
-
}>;
|
|
1410
|
-
};
|
|
1411
|
-
type CartsItemsTaxesCommon = {
|
|
1412
|
-
/**
|
|
1413
|
-
* A unique tax code in this jurisdiction.
|
|
1414
|
-
*/
|
|
1415
|
-
code?: string;
|
|
1416
|
-
/**
|
|
1417
|
-
* The relevant tax jurisdiction.
|
|
1418
|
-
*/
|
|
1419
|
-
jurisdiction?: string;
|
|
1420
|
-
/**
|
|
1421
|
-
* The name of the tax item.
|
|
1422
|
-
*/
|
|
1423
|
-
name?: string;
|
|
1424
|
-
/**
|
|
1425
|
-
* The tax rate as a decimal (12.5% -> 0.125). You must specify either `rate` or `amount`, but not both.
|
|
1426
|
-
*
|
|
1427
|
-
*/
|
|
1428
|
-
rate?: number;
|
|
1429
|
-
/**
|
|
1430
|
-
* The tax as an absolute amount in the smallest currency unit (e.g., $10 -> 1000). You must specify either `rate` or `amount`, but not both.
|
|
1431
|
-
*
|
|
1432
|
-
*/
|
|
1433
|
-
amount?: number;
|
|
1434
|
-
/**
|
|
1435
|
-
* The type of object being returned. Use `tax_item`.
|
|
1436
|
-
*/
|
|
1437
|
-
type: "tax_item";
|
|
1438
|
-
/**
|
|
1439
|
-
* The unique identifier for this tax item.
|
|
1440
|
-
*/
|
|
1441
|
-
readonly id?: string;
|
|
1442
|
-
};
|
|
1443
|
-
/**
|
|
1444
|
-
* Tax Object (With Rate)
|
|
1445
|
-
*/
|
|
1446
|
-
type CartsItemsTaxesWithRate = CartsItemsTaxesCommon & {
|
|
1447
|
-
/**
|
|
1448
|
-
* The tax rate as a decimal (12.5% -> 0.125). Required when using rate-based taxation.
|
|
1449
|
-
*
|
|
1450
|
-
*/
|
|
1451
|
-
rate: number;
|
|
1452
|
-
/**
|
|
1453
|
-
* The tax as an absolute amount. Not allowed when rate is specified.
|
|
1454
|
-
*
|
|
1455
|
-
*/
|
|
1456
|
-
amount?: number;
|
|
1457
|
-
};
|
|
1458
|
-
/**
|
|
1459
|
-
* Tax Object (With Amount)
|
|
1460
|
-
*/
|
|
1461
|
-
type CartsItemsTaxesWithAmount = CartsItemsTaxesCommon & {
|
|
1462
|
-
/**
|
|
1463
|
-
* The tax as an absolute amount in the smallest currency unit (e.g., $10 -> 1000). Required when using amount-based taxation.
|
|
1464
|
-
*
|
|
1465
|
-
*/
|
|
1466
|
-
amount: number;
|
|
1467
|
-
/**
|
|
1468
|
-
* The tax rate as a decimal. Not allowed when amount is specified.
|
|
1469
|
-
*
|
|
1470
|
-
*/
|
|
1471
|
-
rate?: number;
|
|
1472
|
-
};
|
|
1473
|
-
/**
|
|
1474
|
-
* Carts Items Taxes Object
|
|
1475
|
-
*
|
|
1476
|
-
* A tax item that can be applied to cart items or bundle components. You must specify either a rate (percentage) or an amount (fixed value), but not both.
|
|
1477
|
-
*
|
|
1478
|
-
*/
|
|
1479
|
-
type CartsItemsTaxesObject = CartsItemsTaxesWithRate | CartsItemsTaxesWithAmount;
|
|
1480
|
-
type CartItemTaxesEntityResponse = {
|
|
1481
|
-
data: CartsItemsTaxesObject;
|
|
1482
|
-
};
|
|
1483
|
-
/**
|
|
1484
|
-
* CartItemRelationship
|
|
1485
|
-
*/
|
|
1486
|
-
type CartItemRelationship = {
|
|
1487
|
-
relationships?: {
|
|
1488
|
-
item: {
|
|
1489
|
-
data: {
|
|
1490
|
-
/**
|
|
1491
|
-
* Specifies the type of item. For example, `custom_item` or `cart_item`.
|
|
1492
|
-
*/
|
|
1493
|
-
type: string;
|
|
1494
|
-
/**
|
|
1495
|
-
* Specifies the unique identifier of the `cart_item` or `custom_item` in the cart.
|
|
1496
|
-
*/
|
|
1497
|
-
id: string;
|
|
1498
|
-
};
|
|
1499
|
-
};
|
|
1500
|
-
};
|
|
1501
|
-
};
|
|
1502
|
-
/**
|
|
1503
|
-
* CartsBulkTaxes
|
|
1504
|
-
*/
|
|
1505
|
-
type CartsBulkTaxes = {
|
|
1506
|
-
data?: Array<CartsItemsTaxesObject & CartItemRelationship & {
|
|
1507
|
-
/**
|
|
1508
|
-
* Targets the tax item at a component product of the bundle the cart item holds, instead of at the cart item itself.
|
|
1509
|
-
*/
|
|
1510
|
-
meta?: {
|
|
1511
|
-
/**
|
|
1512
|
-
* The product ID of the bundle component the tax item applies to.
|
|
1513
|
-
*/
|
|
1514
|
-
component_product_id?: string;
|
|
1515
|
-
};
|
|
1516
|
-
}>;
|
|
1517
|
-
errors?: Array<ResponseErrorItem>;
|
|
1518
|
-
options?: AddAllOrNothingOptionsObject;
|
|
1519
|
-
};
|
|
1520
|
-
/**
|
|
1521
|
-
* CartsCustomDiscountsObject
|
|
1522
|
-
*/
|
|
1523
|
-
type CartsCustomDiscountsObject = {
|
|
1524
|
-
amount: number | {
|
|
1525
|
-
amount?: number;
|
|
1526
|
-
currency?: string;
|
|
1527
|
-
formatted?: string;
|
|
1528
|
-
};
|
|
1529
|
-
/**
|
|
1530
|
-
* Specifies a description for the custom discount.
|
|
1531
|
-
*/
|
|
1532
|
-
description: string;
|
|
1533
|
-
/**
|
|
1534
|
-
* Specifies the discount code used for the custom discount.
|
|
1535
|
-
*/
|
|
1536
|
-
discount_code: string;
|
|
1537
|
-
/**
|
|
1538
|
-
* Specifies from where the custom discount is applied. For example, Talon.one.
|
|
1539
|
-
*/
|
|
1540
|
-
discount_engine: string;
|
|
1541
|
-
/**
|
|
1542
|
-
* Specifies an external id for the custom discount.
|
|
1543
|
-
*/
|
|
1544
|
-
external_id: string;
|
|
1545
|
-
/**
|
|
1546
|
-
* Specifies the type of the resource. Always `custom_discount`.
|
|
1547
|
-
*/
|
|
1548
|
-
type: "custom_discount";
|
|
1549
|
-
/**
|
|
1550
|
-
* Specifies the UUID of the custom discount.
|
|
1551
|
-
*/
|
|
1552
|
-
id?: string;
|
|
1553
|
-
/**
|
|
1554
|
-
* Relationships to other resources like cart items
|
|
1555
|
-
*/
|
|
1556
|
-
relationships?: {
|
|
1557
|
-
item?: {
|
|
1558
|
-
data?: {
|
|
1559
|
-
/**
|
|
1560
|
-
* The item ID this discount is related to
|
|
1561
|
-
*/
|
|
1562
|
-
id?: string;
|
|
1563
|
-
type?: "cart_item" | "custom_item";
|
|
1564
|
-
};
|
|
1565
|
-
};
|
|
1566
|
-
};
|
|
1567
|
-
};
|
|
1568
|
-
/**
|
|
1569
|
-
* CustomDiscountRelationshipsCartItemRequest
|
|
1570
|
-
*/
|
|
1571
|
-
type CustomDiscountRelationshipsCartItemRequest = {
|
|
1572
|
-
relationships?: {
|
|
1573
|
-
item?: {
|
|
1574
|
-
data?: {
|
|
1575
|
-
/**
|
|
1576
|
-
* Specifies the type of item. For example, `custom_item` or `cart_item`.
|
|
1577
|
-
*/
|
|
1578
|
-
type: string;
|
|
1579
|
-
/**
|
|
1580
|
-
* Specifies the unique identifier of the `cart_item` or `custom_item` in the cart.
|
|
1581
|
-
*/
|
|
1582
|
-
id: string;
|
|
1583
|
-
};
|
|
1584
|
-
};
|
|
1585
|
-
};
|
|
1586
|
-
};
|
|
1587
|
-
/**
|
|
1588
|
-
* CartItemBulkCustomDiscountObject
|
|
1589
|
-
*/
|
|
1590
|
-
type CartItemBulkCustomDiscountObject = CartsCustomDiscountsObject & CustomDiscountRelationshipsCartItemRequest;
|
|
1591
|
-
/**
|
|
1592
|
-
* CartsBulkCustomDiscounts
|
|
1593
|
-
*/
|
|
1594
|
-
type CartsBulkCustomDiscounts = {
|
|
1595
|
-
data?: Array<CartsCustomDiscountsObject & CartItemBulkCustomDiscountObject>;
|
|
1596
|
-
options?: AddAllOrNothingOptionsObject;
|
|
1597
|
-
};
|
|
1598
|
-
/**
|
|
1599
|
-
* CartsBulkCustomDiscountsResponse
|
|
1600
|
-
*/
|
|
1601
|
-
type CartsBulkCustomDiscountsResponse = {
|
|
1602
|
-
data?: CartsCustomDiscountsObject;
|
|
1603
|
-
/**
|
|
1604
|
-
* Array of validation or processing errors
|
|
1605
|
-
*/
|
|
1606
|
-
errors?: Array<ResponseErrorItem>;
|
|
1607
|
-
};
|
|
1608
|
-
/**
|
|
1609
|
-
* CartsBulkCustomDiscountsCollectionResponse
|
|
1610
|
-
*/
|
|
1611
|
-
type CartsBulkCustomDiscountsCollectionResponse = {
|
|
1612
|
-
data?: Array<CartsCustomDiscountsObject>;
|
|
1613
|
-
/**
|
|
1614
|
-
* Array of validation or processing errors
|
|
1615
|
-
*/
|
|
1616
|
-
errors?: Array<ResponseErrorItem>;
|
|
1617
|
-
};
|
|
1618
|
-
/**
|
|
1619
|
-
* CartsCustomDiscountsResponse
|
|
1620
|
-
*/
|
|
1621
|
-
type CartsCustomDiscountsResponseObject = {
|
|
1622
|
-
amount?: {
|
|
1623
|
-
/**
|
|
1624
|
-
* Specifies an amount to be applied for the custom discount. It must be less than zero.
|
|
1625
|
-
*/
|
|
1626
|
-
amount?: number;
|
|
1627
|
-
/**
|
|
1628
|
-
* The currency set for the custom discount.
|
|
1629
|
-
*/
|
|
1630
|
-
currency?: string;
|
|
1631
|
-
/**
|
|
1632
|
-
* The formatted value for the custom discount.
|
|
1633
|
-
*/
|
|
1634
|
-
formatted?: string;
|
|
1635
|
-
};
|
|
1636
|
-
/**
|
|
1637
|
-
* Specifies a description for the custom discount.
|
|
1638
|
-
*/
|
|
1639
|
-
description?: string;
|
|
1640
|
-
/**
|
|
1641
|
-
* Specifies the discount code used for the custom discount.
|
|
1642
|
-
*/
|
|
1643
|
-
discount_code?: string;
|
|
1644
|
-
/**
|
|
1645
|
-
* Specifies from where the custom discount is applied. For example, Talon.one.
|
|
1646
|
-
*/
|
|
1647
|
-
discount_engine?: string;
|
|
1648
|
-
/**
|
|
1649
|
-
* Specifies an external id for the custom discount.
|
|
1650
|
-
*/
|
|
1651
|
-
external_id?: string;
|
|
1652
|
-
/**
|
|
1653
|
-
* Specifies the type of the resource. Always `custom_discount`.
|
|
1654
|
-
*/
|
|
1655
|
-
type?: "custom_discount";
|
|
1656
|
-
/**
|
|
1657
|
-
* Specifies the UUID of the custom discount.
|
|
1658
|
-
*/
|
|
1659
|
-
readonly id?: string;
|
|
1660
|
-
/**
|
|
1661
|
-
* Relationships to other resources like cart items
|
|
1662
|
-
*/
|
|
1663
|
-
relationships?: {
|
|
1664
|
-
item?: {
|
|
1665
|
-
data?: {
|
|
1666
|
-
/**
|
|
1667
|
-
* The item ID this discount is related to
|
|
1668
|
-
*/
|
|
1669
|
-
id?: string;
|
|
1670
|
-
type?: "cart_item" | "custom_item";
|
|
1671
|
-
};
|
|
1672
|
-
};
|
|
1673
|
-
};
|
|
1674
|
-
};
|
|
1675
|
-
type CartsCustomDiscountsEntityRequest = {
|
|
1676
|
-
data?: CartsCustomDiscountsUpdateObject;
|
|
1677
|
-
};
|
|
1678
|
-
type CartsCustomDiscountsEntityResponse = {
|
|
1679
|
-
data?: CartsCustomDiscountsObject;
|
|
1680
|
-
};
|
|
1681
|
-
type CartsCustomDiscountsCollectionResponse = {
|
|
1682
|
-
data?: Array<CartsCustomDiscountsObject>;
|
|
1683
|
-
};
|
|
1684
|
-
type AddressCommon = {
|
|
1685
|
-
/**
|
|
1686
|
-
* First name of the recipient.
|
|
1687
|
-
*/
|
|
1688
|
-
first_name: string;
|
|
1689
|
-
/**
|
|
1690
|
-
* Last name of the recipient.
|
|
1691
|
-
*/
|
|
1692
|
-
last_name: string;
|
|
1693
|
-
/**
|
|
1694
|
-
* Company of the recipient.
|
|
1695
|
-
*/
|
|
1696
|
-
company_name?: string;
|
|
1697
|
-
/**
|
|
1698
|
-
* First line of the address.
|
|
1699
|
-
*/
|
|
1700
|
-
line_1: string;
|
|
1701
|
-
/**
|
|
1702
|
-
* Second line of the address.
|
|
1703
|
-
*/
|
|
1704
|
-
line_2?: string;
|
|
1705
|
-
/**
|
|
1706
|
-
* Third line of the address.
|
|
1707
|
-
*/
|
|
1708
|
-
line_3?: string;
|
|
1709
|
-
/**
|
|
1710
|
-
* City of the address.
|
|
1711
|
-
*/
|
|
1712
|
-
city?: string;
|
|
1713
|
-
/**
|
|
1714
|
-
* Post code of the address.
|
|
1715
|
-
*/
|
|
1716
|
-
postcode: string;
|
|
1717
|
-
/**
|
|
1718
|
-
* County of the address.
|
|
1719
|
-
*/
|
|
1720
|
-
county?: string;
|
|
1721
|
-
/**
|
|
1722
|
-
* Country of the address.
|
|
1723
|
-
*/
|
|
1724
|
-
country: string;
|
|
1725
|
-
/**
|
|
1726
|
-
* State, province, or region of the address.
|
|
1727
|
-
*/
|
|
1728
|
-
region?: string;
|
|
1729
|
-
};
|
|
1730
|
-
/**
|
|
1731
|
-
* Address with Region
|
|
1732
|
-
*/
|
|
1733
|
-
type AddressWithRegion = AddressCommon & {
|
|
1734
|
-
/**
|
|
1735
|
-
* State, province, or region of the address.
|
|
1736
|
-
*/
|
|
1737
|
-
region: string;
|
|
1738
|
-
};
|
|
1739
|
-
/**
|
|
1740
|
-
* Address with County
|
|
1741
|
-
*/
|
|
1742
|
-
type AddressWithCounty = AddressCommon & {
|
|
1743
|
-
/**
|
|
1744
|
-
* County of the address.
|
|
1745
|
-
*/
|
|
1746
|
-
county: string;
|
|
1747
|
-
};
|
|
1748
|
-
/**
|
|
1749
|
-
* ShippingAddress
|
|
1750
|
-
*
|
|
1751
|
-
* Shipping address information. You must specify at least one of region (state/province) or county.
|
|
1752
|
-
*
|
|
1753
|
-
*/
|
|
1754
|
-
type ShippingAddress = (AddressWithRegion | AddressWithCounty) & {
|
|
1755
|
-
/**
|
|
1756
|
-
* Phone number of the shipping recipient.
|
|
1757
|
-
*/
|
|
1758
|
-
phone_number?: string;
|
|
1759
|
-
/**
|
|
1760
|
-
* Delivery instructions.
|
|
1761
|
-
*/
|
|
1762
|
-
instructions?: string;
|
|
1763
|
-
};
|
|
1764
|
-
type DeliveryEstimate = {
|
|
1765
|
-
start?: string;
|
|
1766
|
-
end?: string;
|
|
1767
|
-
};
|
|
1768
|
-
/**
|
|
1769
|
-
* SingleRelationship
|
|
1770
|
-
*
|
|
1771
|
-
* Single relationship
|
|
1772
|
-
*/
|
|
1773
|
-
type SingleRelationship = {
|
|
1774
|
-
data?: RelationshipItem;
|
|
1775
|
-
};
|
|
1776
|
-
type Discounts = Array<Discount>;
|
|
1777
|
-
type ShippingPriceResponse = {
|
|
1778
|
-
total: FormattedPriceData;
|
|
1779
|
-
base: FormattedPriceData;
|
|
1780
|
-
tax?: FormattedPriceData;
|
|
1781
|
-
fees?: FormattedPriceData;
|
|
1782
|
-
discount?: FormattedPriceData;
|
|
1783
|
-
};
|
|
1784
|
-
/**
|
|
1785
|
-
* NonNegativeFormattedPriceData
|
|
1786
|
-
*/
|
|
1787
|
-
type NonNegativeFormattedPriceData = {
|
|
1788
|
-
/**
|
|
1789
|
-
* The raw total. Must be non-negative.
|
|
1790
|
-
*/
|
|
1791
|
-
amount?: number;
|
|
1792
|
-
/**
|
|
1793
|
-
* The currency set for this amount.
|
|
1794
|
-
*/
|
|
1795
|
-
currency?: string;
|
|
1796
|
-
/**
|
|
1797
|
-
* The formatted total based on the amount and currency.
|
|
1798
|
-
*/
|
|
1799
|
-
formatted?: string;
|
|
1800
|
-
};
|
|
1801
|
-
/**
|
|
1802
|
-
* DiscountFormattedPriceData
|
|
1803
|
-
*/
|
|
1804
|
-
type DiscountFormattedPriceData = {
|
|
1805
|
-
/**
|
|
1806
|
-
* The discount amount. Must be non-positive (zero or negative).
|
|
1807
|
-
*/
|
|
1808
|
-
amount?: number;
|
|
1809
|
-
/**
|
|
1810
|
-
* The currency set for this amount.
|
|
1811
|
-
*/
|
|
1812
|
-
currency?: string;
|
|
1813
|
-
/**
|
|
1814
|
-
* The formatted total based on the amount and currency.
|
|
1815
|
-
*/
|
|
1816
|
-
formatted?: string;
|
|
1817
|
-
};
|
|
1818
|
-
/**
|
|
1819
|
-
* Order pricing information.
|
|
1820
|
-
*/
|
|
1821
|
-
type OrderPriceWrapperMeta = {
|
|
1822
|
-
with_tax: NonNegativeFormattedPriceData;
|
|
1823
|
-
without_tax: NonNegativeFormattedPriceData;
|
|
1824
|
-
tax: NonNegativeFormattedPriceData;
|
|
1825
|
-
discount: DiscountFormattedPriceData;
|
|
1826
|
-
balance_owing: NonNegativeFormattedPriceData;
|
|
1827
|
-
paid: NonNegativeFormattedPriceData;
|
|
1828
|
-
authorized: NonNegativeFormattedPriceData;
|
|
1829
|
-
without_discount: NonNegativeFormattedPriceData;
|
|
1830
|
-
shipping: NonNegativeFormattedPriceData;
|
|
1831
|
-
shipping_discount: DiscountFormattedPriceData;
|
|
1832
|
-
};
|
|
1833
|
-
type ShippingGroupMeta = {
|
|
1834
|
-
shipping_display_price?: ShippingPriceResponse;
|
|
1835
|
-
total_display_price?: OrderPriceWrapperMeta;
|
|
1836
|
-
};
|
|
1837
|
-
/**
|
|
1838
|
-
* Shipping Group Response
|
|
1839
|
-
*/
|
|
1840
|
-
type ShippingGroupResponse = {
|
|
1841
|
-
type?: "shipping_group";
|
|
1842
|
-
id?: string;
|
|
1843
|
-
relation?: string;
|
|
1844
|
-
cart_id?: string;
|
|
1845
|
-
order_id?: string;
|
|
1846
|
-
shipping_type?: string;
|
|
1847
|
-
tracking_reference?: string;
|
|
1848
|
-
/**
|
|
1849
|
-
* An optional external ID reference for a shipping group. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
|
|
1850
|
-
*/
|
|
1851
|
-
external_ref?: string;
|
|
1852
|
-
address?: ShippingAddress;
|
|
1853
|
-
delivery_estimate?: DeliveryEstimate;
|
|
1854
|
-
created_at?: string;
|
|
1855
|
-
updated_at?: string;
|
|
1856
|
-
relationships?: {
|
|
1857
|
-
cart?: SingleRelationship;
|
|
1858
|
-
order?: SingleRelationship;
|
|
1859
|
-
/**
|
|
1860
|
-
* The order items shipped by this shipping group. Present on order shipping groups that are associated with at least one order item, when the shipping group is retrieved or updated individually.
|
|
1861
|
-
*/
|
|
1862
|
-
items?: RelationshipArray;
|
|
1863
|
-
};
|
|
1864
|
-
discounts?: Discounts;
|
|
1865
|
-
meta?: ShippingGroupMeta;
|
|
1866
|
-
};
|
|
1867
|
-
type ShippingPriceRequest = {
|
|
1868
|
-
total?: number;
|
|
1869
|
-
base?: number;
|
|
1870
|
-
tax?: number;
|
|
1871
|
-
fees?: number;
|
|
1872
|
-
discount?: number;
|
|
1873
|
-
};
|
|
1874
|
-
type CreateShippingGroupRequest = {
|
|
1875
|
-
data?: {
|
|
1876
|
-
type?: "shipping_group";
|
|
1877
|
-
shipping_type?: string;
|
|
1878
|
-
tracking_reference?: string;
|
|
1879
|
-
/**
|
|
1880
|
-
* An optional external ID reference for a shipping group. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters.
|
|
1881
|
-
*/
|
|
1882
|
-
external_ref?: string;
|
|
1883
|
-
shipping_price?: ShippingPriceRequest;
|
|
1884
|
-
address?: ShippingAddress;
|
|
1885
|
-
includes_tax?: boolean;
|
|
1886
|
-
delivery_estimate?: DeliveryEstimate;
|
|
1887
|
-
};
|
|
1888
|
-
};
|
|
1889
|
-
/**
|
|
1890
|
-
* OrderPriceData
|
|
1891
|
-
*/
|
|
1892
|
-
type OrderPriceData = {
|
|
1893
|
-
/**
|
|
1894
|
-
* The amount for this item.
|
|
1895
|
-
*/
|
|
1896
|
-
amount?: number;
|
|
1897
|
-
/**
|
|
1898
|
-
* The currency this item.
|
|
1899
|
-
*/
|
|
1900
|
-
currency?: string;
|
|
1901
|
-
/**
|
|
1902
|
-
* Whether this price is tax inclusive.
|
|
1903
|
-
*/
|
|
1904
|
-
includes_tax?: boolean;
|
|
1905
|
-
};
|
|
1906
|
-
/**
|
|
1907
|
-
* DiscountData
|
|
1908
|
-
*/
|
|
1909
|
-
type DiscountData = {
|
|
1910
|
-
amount?: OrderPriceData;
|
|
1911
|
-
code?: string;
|
|
1912
|
-
readonly id?: string;
|
|
1913
|
-
/**
|
|
1914
|
-
* The source or origin of the promotion, if applicable.
|
|
1915
|
-
*/
|
|
1916
|
-
promotion_source?: string;
|
|
1917
|
-
/**
|
|
1918
|
-
* Indicates whether the discount applies to the entire cart.
|
|
1919
|
-
*/
|
|
1920
|
-
is_cart_discount?: boolean;
|
|
1921
|
-
/**
|
|
1922
|
-
* Order in which the discount was applied.
|
|
1923
|
-
*/
|
|
1924
|
-
ordinal?: number;
|
|
1925
|
-
/**
|
|
1926
|
-
* Identifies the specific action within a multi-action rule promotion that produced this discount.
|
|
1927
|
-
*/
|
|
1928
|
-
promotion_action_id?: string;
|
|
1929
|
-
};
|
|
1930
|
-
/**
|
|
1931
|
-
* OrderItemFormattedUnitPriceData
|
|
1932
|
-
*/
|
|
1933
|
-
type OrderItemFormattedUnitPriceData = {
|
|
1934
|
-
unit?: FormattedPriceData;
|
|
1935
|
-
value?: FormattedPriceData;
|
|
1936
|
-
};
|
|
1937
|
-
/**
|
|
1938
|
-
* OrderItemResponse
|
|
1939
|
-
*/
|
|
1940
|
-
type OrderItemResponse = {
|
|
1941
|
-
/**
|
|
1942
|
-
* The type represents the object being returned.
|
|
1943
|
-
*/
|
|
1944
|
-
type?: string;
|
|
1945
|
-
/**
|
|
1946
|
-
* The unique identifier for this order item.
|
|
1947
|
-
*/
|
|
1948
|
-
readonly id?: string;
|
|
1949
|
-
/**
|
|
1950
|
-
* The quantity of this item were ordered.
|
|
1951
|
-
*/
|
|
1952
|
-
quantity?: number;
|
|
1953
|
-
/**
|
|
1954
|
-
* The unique identifier for this order item.
|
|
1955
|
-
*/
|
|
1956
|
-
readonly product_id?: string;
|
|
1957
|
-
/**
|
|
1958
|
-
* The unique identifier for the subscription offering for this order item.
|
|
1959
|
-
*/
|
|
1960
|
-
readonly subscription_offering_id?: string;
|
|
1961
|
-
/**
|
|
1962
|
-
* The name of this order item.
|
|
1963
|
-
*/
|
|
1964
|
-
name?: string;
|
|
1965
|
-
/**
|
|
1966
|
-
* The SKU code for the order item.
|
|
1967
|
-
*/
|
|
1968
|
-
sku?: string;
|
|
1969
|
-
/**
|
|
1970
|
-
* The stock location for this order item.
|
|
1971
|
-
*/
|
|
1972
|
-
readonly location?: string;
|
|
1973
|
-
unit_price?: OrderPriceData;
|
|
1974
|
-
value?: OrderPriceData;
|
|
1975
|
-
discounts?: Array<DiscountData>;
|
|
1976
|
-
links?: {
|
|
1977
|
-
[key: string]: unknown;
|
|
1978
|
-
};
|
|
1979
|
-
meta?: {
|
|
1980
|
-
display_price?: {
|
|
1981
|
-
with_tax?: OrderItemFormattedUnitPriceData;
|
|
1982
|
-
without_tax?: OrderItemFormattedUnitPriceData;
|
|
1983
|
-
tax?: OrderItemFormattedUnitPriceData;
|
|
1984
|
-
discount?: OrderItemFormattedUnitPriceData;
|
|
1985
|
-
without_discount?: OrderItemFormattedUnitPriceData;
|
|
1986
|
-
discounts?: {
|
|
1987
|
-
[key: string]: {
|
|
1988
|
-
amount?: number;
|
|
1989
|
-
currency?: string;
|
|
1990
|
-
formatted?: string;
|
|
1991
|
-
/**
|
|
1992
|
-
* Detailed breakdown of discount constituents by ID
|
|
1993
|
-
*/
|
|
1994
|
-
constituents?: {
|
|
1995
|
-
[key: string]: {
|
|
1996
|
-
/**
|
|
1997
|
-
* The discount amount
|
|
1998
|
-
*/
|
|
1999
|
-
amount?: number;
|
|
2000
|
-
/**
|
|
2001
|
-
* The currency code
|
|
2002
|
-
*/
|
|
2003
|
-
currency?: string;
|
|
2004
|
-
/**
|
|
2005
|
-
* The formatted discount amount
|
|
2006
|
-
*/
|
|
2007
|
-
formatted?: string;
|
|
2008
|
-
};
|
|
2009
|
-
};
|
|
2010
|
-
};
|
|
2011
|
-
};
|
|
2012
|
-
/**
|
|
2013
|
-
* The product's original catalog price before any catalog-level sales, tiered pricing adjustments, or cart/item level promotions are applied. This value is sourced from the product's `meta.original_display_price` field in the catalog response. See [Get a Product](/docs/api/pxm/catalog/get-by-context-product).
|
|
2014
|
-
*/
|
|
2015
|
-
original_price?: OrderItemFormattedUnitPriceData;
|
|
2016
|
-
};
|
|
2017
|
-
timestamps?: Timestamps;
|
|
2018
|
-
};
|
|
2019
|
-
relationships?: {
|
|
2020
|
-
cart_item?: {
|
|
2021
|
-
data?: {
|
|
2022
|
-
/**
|
|
2023
|
-
* The type represents the object being returned.
|
|
2024
|
-
*/
|
|
2025
|
-
type?: string;
|
|
2026
|
-
/**
|
|
2027
|
-
* The unique identifier for this item.
|
|
2028
|
-
*/
|
|
2029
|
-
readonly id?: string;
|
|
2030
|
-
};
|
|
2031
|
-
};
|
|
2032
|
-
/**
|
|
2033
|
-
* Related tax items.
|
|
2034
|
-
*/
|
|
2035
|
-
taxes?: {
|
|
2036
|
-
data?: null | Array<RelationshipItem>;
|
|
2037
|
-
};
|
|
2038
|
-
/**
|
|
2039
|
-
* Related promotions.
|
|
2040
|
-
*/
|
|
2041
|
-
promotions?: {
|
|
2042
|
-
data?: null | Array<RelationshipItem>;
|
|
2043
|
-
};
|
|
2044
|
-
};
|
|
2045
|
-
/**
|
|
2046
|
-
* The unique identifier of the catalog associated with the product is shown if `catalog_source=pim` is set.
|
|
2047
|
-
*/
|
|
2048
|
-
catalog_id?: string;
|
|
2049
|
-
/**
|
|
2050
|
-
* The catalog source. Always `pim` or `legacy`.
|
|
2051
|
-
*/
|
|
2052
|
-
catalog_source?: string;
|
|
2053
|
-
/**
|
|
2054
|
-
* Configuration for bundle products.
|
|
2055
|
-
*/
|
|
2056
|
-
bundle_configuration?: {
|
|
2057
|
-
selected_options?: {
|
|
2058
|
-
[key: string]: {
|
|
2059
|
-
[key: string]: number;
|
|
2060
|
-
};
|
|
2061
|
-
};
|
|
2062
|
-
/**
|
|
2063
|
-
* Array of component products for bundle configuration
|
|
2064
|
-
*/
|
|
2065
|
-
component_products?: Array<{
|
|
2066
|
-
/**
|
|
2067
|
-
* Component product ID
|
|
2068
|
-
*/
|
|
2069
|
-
id?: string;
|
|
2070
|
-
/**
|
|
2071
|
-
* Component product type
|
|
2072
|
-
*/
|
|
2073
|
-
type?: string;
|
|
2074
|
-
/**
|
|
2075
|
-
* Product attributes as a generic object
|
|
2076
|
-
*/
|
|
2077
|
-
attributes?: {
|
|
2078
|
-
[key: string]: unknown;
|
|
2079
|
-
};
|
|
2080
|
-
/**
|
|
2081
|
-
* Product metadata as a generic object
|
|
2082
|
-
*/
|
|
2083
|
-
meta?: {
|
|
2084
|
-
[key: string]: unknown;
|
|
2085
|
-
};
|
|
2086
|
-
/**
|
|
2087
|
-
* Product price information as a generic object
|
|
2088
|
-
*/
|
|
2089
|
-
price?: {
|
|
2090
|
-
[key: string]: unknown;
|
|
2091
|
-
};
|
|
2092
|
-
/**
|
|
2093
|
-
* Product relationships as a generic object
|
|
2094
|
-
*/
|
|
2095
|
-
relationships?: {
|
|
2096
|
-
[key: string]: unknown;
|
|
2097
|
-
};
|
|
2098
|
-
}>;
|
|
2099
|
-
};
|
|
2100
|
-
/**
|
|
2101
|
-
* Components of the bundle product.
|
|
2102
|
-
*/
|
|
2103
|
-
components?: {
|
|
2104
|
-
[key: string]: {
|
|
2105
|
-
name?: string;
|
|
2106
|
-
options?: Array<{
|
|
2107
|
-
id?: string;
|
|
2108
|
-
quantity?: number;
|
|
2109
|
-
type?: string;
|
|
2110
|
-
}>;
|
|
2111
|
-
};
|
|
2112
|
-
};
|
|
2113
|
-
/**
|
|
2114
|
-
* Custom inputs for the order item as a generic object
|
|
2115
|
-
*/
|
|
2116
|
-
custom_inputs?: {
|
|
2117
|
-
[key: string]: unknown;
|
|
2118
|
-
};
|
|
2119
|
-
/**
|
|
2120
|
-
* Custom attributes attached to the order item.
|
|
2121
|
-
*/
|
|
2122
|
-
readonly custom_attributes?: CustomAttributes;
|
|
2123
|
-
/**
|
|
2124
|
-
* The shipping group ID for the order item
|
|
2125
|
-
*/
|
|
2126
|
-
shipping_group_id?: string;
|
|
2127
|
-
/**
|
|
2128
|
-
* The promotion source for the order item
|
|
2129
|
-
*/
|
|
2130
|
-
promotion_source?: string;
|
|
2131
|
-
/**
|
|
2132
|
-
* The action ID within the rule promotion that produced this promotion item.
|
|
2133
|
-
*/
|
|
2134
|
-
readonly promotion_action_id?: string;
|
|
2135
|
-
/**
|
|
2136
|
-
* Subscription configuration for the order item
|
|
2137
|
-
*/
|
|
2138
|
-
subscription_configuration?: {
|
|
2139
|
-
/**
|
|
2140
|
-
* Subscription plan details
|
|
2141
|
-
*/
|
|
2142
|
-
plan?: string;
|
|
2143
|
-
/**
|
|
2144
|
-
* Pricing option for the subscription
|
|
2145
|
-
*/
|
|
2146
|
-
pricing_option?: string;
|
|
2147
|
-
};
|
|
2148
|
-
};
|
|
2149
|
-
type ShippingGroupEntityResponse = {
|
|
2150
|
-
data?: ShippingGroupResponse;
|
|
2151
|
-
/**
|
|
2152
|
-
* Related objects that are included in the response when using the include query parameter.
|
|
2153
|
-
*/
|
|
2154
|
-
included?: {
|
|
2155
|
-
/**
|
|
2156
|
-
* Array of order items associated with this shipping group.
|
|
2157
|
-
*/
|
|
2158
|
-
items?: Array<OrderItemResponse>;
|
|
2159
|
-
};
|
|
2160
|
-
/**
|
|
2161
|
-
* Array of validation or processing errors
|
|
2162
|
-
*/
|
|
2163
|
-
errors?: Array<ResponseErrorItem>;
|
|
2164
|
-
};
|
|
2165
|
-
type UpdateCartShippingGroupRequest = {
|
|
2166
|
-
data?: {
|
|
2167
|
-
type?: "shipping_group";
|
|
2168
|
-
shipping_type?: string;
|
|
2169
|
-
tracking_reference?: string;
|
|
2170
|
-
/**
|
|
2171
|
-
* An optional external ID reference for a shipping group. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters.
|
|
2172
|
-
*/
|
|
2173
|
-
external_ref?: string;
|
|
2174
|
-
shipping_price?: ShippingPriceRequest;
|
|
2175
|
-
address?: ShippingAddress;
|
|
2176
|
-
includes_tax?: boolean;
|
|
2177
|
-
delivery_estimate?: DeliveryEstimate;
|
|
2178
|
-
};
|
|
2179
|
-
};
|
|
2180
|
-
/**
|
|
2181
|
-
* Data.BasePayments
|
|
2182
|
-
*/
|
|
2183
|
-
type DataBasePayments = {
|
|
2184
|
-
gateway: "adyen" | "authorize_net" | "braintree" | "card_connect" | "cyber_source" | "elastic_path_payments_stripe" | "manual" | "paypal_express_checkout" | "stripe" | "stripe_payment_intents";
|
|
2185
|
-
/**
|
|
2186
|
-
* Specifies the transaction method, such as `purchase` or `authorize`.
|
|
2187
|
-
*/
|
|
2188
|
-
method: "authorize" | "purchase" | "purchase_setup" | "authorize_setup";
|
|
2189
|
-
/**
|
|
2190
|
-
* The amount to be paid for the transaction.
|
|
2191
|
-
*/
|
|
2192
|
-
amount?: number;
|
|
2193
|
-
};
|
|
2194
|
-
/**
|
|
2195
|
-
* Elastic Path Payments Powered By Stripe
|
|
2196
|
-
*/
|
|
2197
|
-
type ElasticPathPaymentsPoweredByStripePayment = {
|
|
2198
|
-
data?: DataBasePayments & {
|
|
2199
|
-
/**
|
|
2200
|
-
* Specifies the gateway. You must use `elastic_path_payments_stripe`.
|
|
2201
|
-
*/
|
|
2202
|
-
gateway?: "elastic_path_payments_stripe";
|
|
2203
|
-
options?: {
|
|
2204
|
-
/**
|
|
2205
|
-
* Provides the email address to which you want to send the Stripe receipts for the transactions within the store. This feature is available only in the live mode.
|
|
2206
|
-
*/
|
|
2207
|
-
receipt_email?: string;
|
|
2208
|
-
/**
|
|
2209
|
-
* Parent object determining whether to use Stripe's `automatic_payment_methods` setting.
|
|
2210
|
-
*/
|
|
2211
|
-
automatic_payment_methods?: {
|
|
2212
|
-
/**
|
|
2213
|
-
* When set to true, it displays all enabled payment methods from the Stripe dashboard. When set to false, the Stripe default, which is card, is used.
|
|
2214
|
-
*/
|
|
2215
|
-
enabled?: boolean;
|
|
2216
|
-
};
|
|
2217
|
-
};
|
|
2218
|
-
/**
|
|
2219
|
-
* Specifies the Stripe payment method types configured for the store. See [Stripe Documentation](https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_types).
|
|
2220
|
-
*/
|
|
2221
|
-
payment_method_types?: Array<string>;
|
|
2222
|
-
/**
|
|
2223
|
-
* Specifies the Stripe token or source.
|
|
2224
|
-
*/
|
|
2225
|
-
payment?: string;
|
|
2226
|
-
};
|
|
2227
|
-
};
|
|
2228
|
-
/**
|
|
2229
|
-
* Cart Payment Update
|
|
2230
|
-
*/
|
|
2231
|
-
type CartPaymentUpdate = {
|
|
2232
|
-
data: {
|
|
2233
|
-
gateway: string;
|
|
2234
|
-
method: string;
|
|
2235
|
-
payment_method_types: Array<string>;
|
|
2236
|
-
amount: number;
|
|
2237
|
-
options?: {
|
|
2238
|
-
[key: string]: unknown;
|
|
2239
|
-
};
|
|
2240
|
-
};
|
|
2241
|
-
};
|
|
2242
|
-
/**
|
|
2243
|
-
* BillingAddress
|
|
2244
|
-
*
|
|
2245
|
-
* Billing address information. You must specify at least one of region (state/province) or county.
|
|
2246
|
-
*
|
|
2247
|
-
*/
|
|
2248
|
-
type BillingAddress = AddressWithRegion | AddressWithCounty;
|
|
2249
|
-
/**
|
|
2250
|
-
* Customer Checkout
|
|
2251
|
-
*/
|
|
2252
|
-
type CustomerCheckout = {
|
|
2253
|
-
data?: {
|
|
2254
|
-
/**
|
|
2255
|
-
* A user-managed, optional field used as an alternative to the existing `order_id`. If provided, the order-number will be sent to Authorize.net instead of the `order_id`, and will appear as the invoice number in Authorize.net transactions.
|
|
2256
|
-
*/
|
|
2257
|
-
order_number?: string;
|
|
2258
|
-
/**
|
|
2259
|
-
* An optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
|
|
2260
|
-
*/
|
|
2261
|
-
external_ref?: string;
|
|
2262
|
-
customer?: {
|
|
2263
|
-
/**
|
|
2264
|
-
* The ID of the customer.
|
|
2265
|
-
*/
|
|
2266
|
-
id?: string;
|
|
2267
|
-
/**
|
|
2268
|
-
* The email of the customer.
|
|
2269
|
-
*/
|
|
2270
|
-
email?: string;
|
|
2271
|
-
/**
|
|
2272
|
-
* The name of the customer.
|
|
2273
|
-
*/
|
|
2274
|
-
name?: string;
|
|
2275
|
-
};
|
|
2276
|
-
billing_address?: BillingAddress;
|
|
2277
|
-
shipping_address?: ShippingAddress;
|
|
2278
|
-
};
|
|
2279
|
-
};
|
|
2280
|
-
/**
|
|
2281
|
-
* Account Checkout
|
|
2282
|
-
*/
|
|
2283
|
-
type AccountCheckout = {
|
|
2284
|
-
data?: {
|
|
2285
|
-
/**
|
|
2286
|
-
* A user-managed, optional field used as an alternative to the existing `order_id`. If provided, the order-number will be sent to Authorize.net instead of the `order_id`, and will appear as the invoice number in Authorize.net transactions.
|
|
2287
|
-
*/
|
|
2288
|
-
order_number?: string;
|
|
2289
|
-
/**
|
|
2290
|
-
* An optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
|
|
2291
|
-
*/
|
|
2292
|
-
external_ref?: string;
|
|
2293
|
-
account?: {
|
|
2294
|
-
/**
|
|
2295
|
-
* The account ID.
|
|
2296
|
-
*/
|
|
2297
|
-
id?: string;
|
|
2298
|
-
/**
|
|
2299
|
-
* The account member ID.
|
|
2300
|
-
*/
|
|
2301
|
-
member_id?: string;
|
|
2302
|
-
};
|
|
2303
|
-
contact?: {
|
|
2304
|
-
/**
|
|
2305
|
-
* The name of the account member.
|
|
2306
|
-
*/
|
|
2307
|
-
name?: string;
|
|
2308
|
-
/**
|
|
2309
|
-
* The email address of the account member.
|
|
2310
|
-
*/
|
|
2311
|
-
email?: string;
|
|
2312
|
-
};
|
|
2313
|
-
billing_address?: BillingAddress;
|
|
2314
|
-
shipping_address?: ShippingAddress;
|
|
2315
|
-
};
|
|
2316
|
-
};
|
|
2317
|
-
type OrderTimestamps = {
|
|
2318
|
-
/**
|
|
2319
|
-
* The date this order was created.
|
|
2320
|
-
*/
|
|
2321
|
-
created_at?: string;
|
|
2322
|
-
/**
|
|
2323
|
-
* The date this order was last updated.
|
|
2324
|
-
*/
|
|
2325
|
-
updated_at?: string;
|
|
2326
|
-
/**
|
|
2327
|
-
* The date this order was fully paid. Only present for orders with payment status 'paid'.
|
|
2328
|
-
*/
|
|
2329
|
-
fully_paid_at?: string;
|
|
2330
|
-
};
|
|
2331
|
-
/**
|
|
2332
|
-
* OrderMeta
|
|
2333
|
-
*/
|
|
2334
|
-
type OrderMeta = {
|
|
2335
|
-
timestamps?: OrderTimestamps;
|
|
2336
|
-
/**
|
|
2337
|
-
* Order pricing information including amounts, tax, discounts, and payment details.
|
|
2338
|
-
*/
|
|
2339
|
-
display_price?: {
|
|
2340
|
-
with_tax?: NonNegativeFormattedPriceData;
|
|
2341
|
-
without_tax?: NonNegativeFormattedPriceData;
|
|
2342
|
-
tax?: NonNegativeFormattedPriceData;
|
|
2343
|
-
discount?: DiscountFormattedPriceData;
|
|
2344
|
-
balance_owing?: NonNegativeFormattedPriceData;
|
|
2345
|
-
paid?: NonNegativeFormattedPriceData;
|
|
2346
|
-
authorized?: NonNegativeFormattedPriceData;
|
|
2347
|
-
without_discount?: NonNegativeFormattedPriceData;
|
|
2348
|
-
shipping?: NonNegativeFormattedPriceData;
|
|
2349
|
-
shipping_discount?: DiscountFormattedPriceData;
|
|
2350
|
-
};
|
|
2351
|
-
/**
|
|
2352
|
-
* Specifies if the order was created manually.
|
|
2353
|
-
*/
|
|
2354
|
-
is_manual?: boolean;
|
|
2355
|
-
};
|
|
2356
|
-
/**
|
|
2357
|
-
* Contact
|
|
2358
|
-
*/
|
|
2359
|
-
type Contact = {
|
|
2360
|
-
/**
|
|
2361
|
-
* The email address of the contact.
|
|
2362
|
-
*/
|
|
2363
|
-
email?: string;
|
|
2364
|
-
/**
|
|
2365
|
-
* The name of the contact.
|
|
2366
|
-
*/
|
|
2367
|
-
name?: string;
|
|
2368
|
-
};
|
|
2369
|
-
/**
|
|
2370
|
-
* Customer
|
|
2371
|
-
*/
|
|
2372
|
-
type Customer = {
|
|
2373
|
-
/**
|
|
2374
|
-
* The name of the customer.
|
|
2375
|
-
*/
|
|
2376
|
-
name?: string;
|
|
2377
|
-
/**
|
|
2378
|
-
* The email address of the customer.
|
|
2379
|
-
*/
|
|
2380
|
-
email?: string;
|
|
2381
|
-
/**
|
|
2382
|
-
* The unique identifier of the customer.
|
|
2383
|
-
*/
|
|
2384
|
-
id?: string;
|
|
2385
|
-
};
|
|
2386
|
-
/**
|
|
2387
|
-
* OrderResponse
|
|
2388
|
-
*/
|
|
2389
|
-
type OrderResponse = {
|
|
2390
|
-
/**
|
|
2391
|
-
* Specifies the type of object being returned. You must use `order`.
|
|
2392
|
-
*/
|
|
2393
|
-
type?: "order";
|
|
2394
|
-
/**
|
|
2395
|
-
* Specifies a user-managed, optional field used as an alternative to the existing `order_id`. If provided, the order-number will be sent to Authorize.net instead of the `order_id`, and will appear as the invoice number in Authorize.net transactions.
|
|
2396
|
-
*/
|
|
2397
|
-
order_number?: string;
|
|
2398
|
-
/**
|
|
2399
|
-
* An optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
|
|
2400
|
-
*/
|
|
2401
|
-
external_ref?: string;
|
|
2402
|
-
/**
|
|
2403
|
-
* Specifies the unique identifier of the order.
|
|
2404
|
-
*/
|
|
2405
|
-
readonly id?: string;
|
|
2406
|
-
/**
|
|
2407
|
-
* Specifies the status of the order, such as `incomplete`, `complete`, `processing`, or `cancelled`.
|
|
2408
|
-
*/
|
|
2409
|
-
status?: "complete" | "incomplete" | "cancelled" | "processing";
|
|
2410
|
-
/**
|
|
2411
|
-
* Specifies the status of the payment, such as `unpaid`, `authorized`, `paid`, or `refunded`.
|
|
2412
|
-
*/
|
|
2413
|
-
payment?: "authorized" | "paid" | "unpaid" | "refunded" | "partially_paid" | "partially_authorized";
|
|
2414
|
-
/**
|
|
2415
|
-
* Specifies the status of the shipment, such as `fulfilled` or `unfulfilled`.
|
|
2416
|
-
*/
|
|
2417
|
-
shipping?: "unfulfilled" | "fulfilled";
|
|
2418
|
-
/**
|
|
2419
|
-
* Specifies if the order is anonymized.
|
|
2420
|
-
*/
|
|
2421
|
-
anonymized?: boolean;
|
|
2422
|
-
/**
|
|
2423
|
-
* Stripe Payment Intent ID. Please see Stripe's Payment Intent [documentation](https://docs.stripe.com/api/payment_intents) for more information on Payment Intents.
|
|
2424
|
-
*/
|
|
2425
|
-
payment_intent_id?: string;
|
|
2426
|
-
custom_attributes?: CustomAttributes;
|
|
2427
|
-
links?: {
|
|
2428
|
-
[key: string]: unknown;
|
|
2429
|
-
};
|
|
2430
|
-
meta?: OrderMeta;
|
|
2431
|
-
billing_address?: BillingAddress;
|
|
2432
|
-
contact?: Contact;
|
|
2433
|
-
customer?: Customer;
|
|
2434
|
-
shipping_address?: ShippingAddress;
|
|
2435
|
-
relationships?: {
|
|
2436
|
-
items?: RelationshipArray;
|
|
2437
|
-
custom_discounts?: RelationshipArray;
|
|
2438
|
-
promotions?: RelationshipArray;
|
|
2439
|
-
customer?: SingleRelationship;
|
|
2440
|
-
account?: SingleRelationship;
|
|
2441
|
-
account_member?: SingleRelationship;
|
|
2442
|
-
store?: SingleRelationship;
|
|
2443
|
-
};
|
|
2444
|
-
};
|
|
2445
|
-
/**
|
|
2446
|
-
* OrderEntityResponse
|
|
2447
|
-
*/
|
|
2448
|
-
type OrderEntityResponse = {
|
|
2449
|
-
data?: OrderResponse;
|
|
2450
|
-
/**
|
|
2451
|
-
* Optional included data such as order items, tax items, custom discounts, and promotions.
|
|
2452
|
-
*
|
|
2453
|
-
*/
|
|
2454
|
-
included?: {
|
|
2455
|
-
/**
|
|
2456
|
-
* Array of order items included in the response.
|
|
2457
|
-
*/
|
|
2458
|
-
items?: Array<OrderItemResponse>;
|
|
2459
|
-
/**
|
|
2460
|
-
* Array of tax items included in the response.
|
|
2461
|
-
*/
|
|
2462
|
-
tax_items?: Array<TaxItemResponse>;
|
|
2463
|
-
/**
|
|
2464
|
-
* Array of custom discounts included in the response.
|
|
2465
|
-
*/
|
|
2466
|
-
custom_discounts?: Array<CustomDiscountResponse>;
|
|
2467
|
-
/**
|
|
2468
|
-
* Array of promotions included in the response.
|
|
2469
|
-
*/
|
|
2470
|
-
promotions?: Array<CondensedPromotionResponse>;
|
|
2471
|
-
};
|
|
2472
|
-
/**
|
|
2473
|
-
* Array of error objects, if any errors occurred.
|
|
2474
|
-
*/
|
|
2475
|
-
errors?: Array<ResponseErrorItem>;
|
|
2476
|
-
};
|
|
2477
|
-
type ResponseMetaOrders = {
|
|
2478
|
-
page?: ResponsePaginationPage;
|
|
2479
|
-
results?: ResponsePaginationResults;
|
|
2480
|
-
};
|
|
2481
|
-
type OrderCollectionResponse = {
|
|
2482
|
-
data?: Array<OrderResponse>;
|
|
2483
|
-
links?: ResponsePageLinks;
|
|
2484
|
-
meta?: ResponseMetaOrders;
|
|
2485
|
-
};
|
|
2486
|
-
/**
|
|
2487
|
-
* OrdersAddressData
|
|
2488
|
-
*/
|
|
2489
|
-
type OrdersAddressData = {
|
|
2490
|
-
/**
|
|
2491
|
-
* The type of the resource. You must use "order".
|
|
2492
|
-
*/
|
|
2493
|
-
type: string;
|
|
2494
|
-
/**
|
|
2495
|
-
* Specifies a user-managed, optional field used as an alternative to the existing order_id. If provided, the order-number will be sent to Authorize.net instead of the order_id, and will appear as the invoice number in Authorize.net transactions.
|
|
2496
|
-
*/
|
|
2497
|
-
order_number?: string;
|
|
2498
|
-
/**
|
|
2499
|
-
* Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
|
|
2500
|
-
*/
|
|
2501
|
-
external_ref?: string;
|
|
2502
|
-
shipping_address: {
|
|
2503
|
-
/**
|
|
2504
|
-
* Specifies the first name of the address holder.
|
|
2505
|
-
*/
|
|
2506
|
-
first_name?: string;
|
|
2507
|
-
/**
|
|
2508
|
-
* Specifies the last name of the address holder.
|
|
2509
|
-
*/
|
|
2510
|
-
last_name?: string;
|
|
2511
|
-
/**
|
|
2512
|
-
* Specifies the phone number of the address holder.
|
|
2513
|
-
*/
|
|
2514
|
-
phone_number?: string;
|
|
2515
|
-
/**
|
|
2516
|
-
* Specifies the company name.
|
|
2517
|
-
*/
|
|
2518
|
-
company_name?: string;
|
|
2519
|
-
/**
|
|
2520
|
-
* Specifies the first line of the address.
|
|
2521
|
-
*/
|
|
2522
|
-
line_1?: string;
|
|
2523
|
-
/**
|
|
2524
|
-
* Specifies the second line of the address.
|
|
2525
|
-
*/
|
|
2526
|
-
line_2?: string;
|
|
2527
|
-
/**
|
|
2528
|
-
* Specifies the third line of the address.
|
|
2529
|
-
*/
|
|
2530
|
-
line_3?: string;
|
|
2531
|
-
/**
|
|
2532
|
-
* Specifies the name of the city in the shipping address.
|
|
2533
|
-
*/
|
|
2534
|
-
city?: string;
|
|
2535
|
-
/**
|
|
2536
|
-
* Specifies the county of the shipping address.
|
|
2537
|
-
*/
|
|
2538
|
-
county?: string;
|
|
2539
|
-
/**
|
|
2540
|
-
* Specifies the state, province, or region of the shipping address.
|
|
2541
|
-
*/
|
|
2542
|
-
region?: string;
|
|
2543
|
-
/**
|
|
2544
|
-
* Specifies the postcode or ZIP code of the address.
|
|
2545
|
-
*/
|
|
2546
|
-
postcode?: string;
|
|
2547
|
-
/**
|
|
2548
|
-
* Specifies the country in the shipping address.
|
|
2549
|
-
*/
|
|
2550
|
-
country?: string;
|
|
2551
|
-
/**
|
|
2552
|
-
* Specifies any instructions provided with the shipping address.
|
|
2553
|
-
*/
|
|
2554
|
-
instructions?: string;
|
|
2555
|
-
};
|
|
2556
|
-
};
|
|
2557
|
-
/**
|
|
2558
|
-
* OrdersCancelData
|
|
2559
|
-
*/
|
|
2560
|
-
type OrdersCancelData = {
|
|
2561
|
-
/**
|
|
2562
|
-
* The status of the order. You can only update the status to `cancelled`.
|
|
2563
|
-
*/
|
|
2564
|
-
status: string;
|
|
2565
|
-
/**
|
|
2566
|
-
* The type of the resource. You must use order.
|
|
2567
|
-
*/
|
|
2568
|
-
type: string;
|
|
2569
|
-
/**
|
|
2570
|
-
* Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
|
|
2571
|
-
*/
|
|
2572
|
-
external_ref?: string;
|
|
2573
|
-
};
|
|
2574
|
-
/**
|
|
2575
|
-
* OrdersFulfilledData
|
|
2576
|
-
*/
|
|
2577
|
-
type OrdersFulfilledData = {
|
|
2578
|
-
/**
|
|
2579
|
-
* The shipping status of the order. You can only update the shipping status to `fulfilled`.
|
|
2580
|
-
*/
|
|
2581
|
-
shipping: string;
|
|
2582
|
-
/**
|
|
2583
|
-
* The type of the resource. You must use order.
|
|
2584
|
-
*/
|
|
2585
|
-
type: string;
|
|
2586
|
-
/**
|
|
2587
|
-
* Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
|
|
2588
|
-
*/
|
|
2589
|
-
external_ref?: string;
|
|
2590
|
-
};
|
|
2591
|
-
/**
|
|
2592
|
-
* OrdersUpdateRequest
|
|
2593
|
-
*/
|
|
2594
|
-
type OrdersUpdateRequest = {
|
|
2595
|
-
data?: OrdersAddressData | OrdersCancelData | OrdersFulfilledData;
|
|
2596
|
-
};
|
|
2597
|
-
type OrderItemCollectionResponse = {
|
|
2598
|
-
data?: Array<OrderItemResponse>;
|
|
2599
|
-
/**
|
|
2600
|
-
* Optional included data such as tax items, custom discounts, and promotions.
|
|
2601
|
-
*
|
|
2602
|
-
*/
|
|
2603
|
-
included?: {
|
|
2604
|
-
/**
|
|
2605
|
-
* Array of tax items included in the response.
|
|
2606
|
-
*/
|
|
2607
|
-
tax_items?: Array<TaxItemResponse>;
|
|
2608
|
-
/**
|
|
2609
|
-
* Array of custom discounts included in the response.
|
|
2610
|
-
*/
|
|
2611
|
-
custom_discounts?: Array<CustomDiscountResponse>;
|
|
2612
|
-
/**
|
|
2613
|
-
* Array of promotions included in the response.
|
|
2614
|
-
*/
|
|
2615
|
-
promotions?: Array<CondensedPromotionResponse>;
|
|
2616
|
-
};
|
|
2617
|
-
};
|
|
2618
|
-
/**
|
|
2619
|
-
* OrdersAnonymizeData
|
|
2620
|
-
*/
|
|
2621
|
-
type OrdersAnonymizeData = {
|
|
2622
|
-
/**
|
|
2623
|
-
* The unique identifiers of the orders to be anonymized. You can anonymize multiple orders at the same time.
|
|
2624
|
-
*/
|
|
2625
|
-
order_ids?: Array<string>;
|
|
2626
|
-
};
|
|
2627
|
-
/**
|
|
2628
|
-
* OrdersAnonymizeRequest
|
|
2629
|
-
*/
|
|
2630
|
-
type OrdersAnonymizeRequest = {
|
|
2631
|
-
data?: OrdersAnonymizeData;
|
|
2632
|
-
};
|
|
2633
|
-
type OrdersListResponse = {
|
|
2634
|
-
data: Array<OrderResponse>;
|
|
2635
|
-
};
|
|
2636
|
-
/**
|
|
2637
|
-
* FailureDetails
|
|
2638
|
-
*
|
|
2639
|
-
* Non-PII payment failure information from the payment gateway. Only present on failed transactions where the gateway provided structured failure details.
|
|
2640
|
-
*/
|
|
2641
|
-
type FailureDetails = {
|
|
2642
|
-
/**
|
|
2643
|
-
* Machine-readable failure or error code from the payment gateway.
|
|
2644
|
-
*/
|
|
2645
|
-
code?: string;
|
|
2646
|
-
/**
|
|
2647
|
-
* Human-readable failure reason or error message from the payment gateway.
|
|
2648
|
-
*/
|
|
2649
|
-
reason?: string;
|
|
2650
|
-
};
|
|
2651
|
-
/**
|
|
2652
|
-
* TransactionResponse
|
|
2653
|
-
*/
|
|
2654
|
-
type TransactionResponse = {
|
|
2655
|
-
/**
|
|
2656
|
-
* The ID of the transaction.
|
|
2657
|
-
*/
|
|
2658
|
-
readonly id?: string;
|
|
2659
|
-
/**
|
|
2660
|
-
* The payment gateway reference.
|
|
2661
|
-
*/
|
|
2662
|
-
reference?: string;
|
|
2663
|
-
/**
|
|
2664
|
-
* A custom name associated with the payment method.
|
|
2665
|
-
*/
|
|
2666
|
-
name?: string;
|
|
2667
|
-
/**
|
|
2668
|
-
* A reference associated with the payment method. This might include loyalty points or gift card identifiers. We recommend you not to include personal information in this field.
|
|
2669
|
-
*/
|
|
2670
|
-
custom_reference?: string;
|
|
2671
|
-
/**
|
|
2672
|
-
* The name of the payment gateway used.
|
|
2673
|
-
*/
|
|
2674
|
-
gateway?: "adyen" | "authorize_net" | "braintree" | "card_connect" | "cyber_source" | "elastic_path_payments_stripe" | "manual" | "paypal_express_checkout" | "stripe" | "stripe_payment_intents" | "stripe_platform_account";
|
|
2675
|
-
/**
|
|
2676
|
-
* The amount for this transaction.
|
|
2677
|
-
*/
|
|
2678
|
-
amount?: number;
|
|
2679
|
-
/**
|
|
2680
|
-
* The refunded amount.
|
|
2681
|
-
*/
|
|
2682
|
-
refunded_amount?: number;
|
|
2683
|
-
/**
|
|
2684
|
-
* The transaction currency.
|
|
2685
|
-
*/
|
|
2686
|
-
currency?: string;
|
|
2687
|
-
/**
|
|
2688
|
-
* The type of transaction, such as `purchase`, `capture`, `authorize` or `refund`.
|
|
2689
|
-
*/
|
|
2690
|
-
transaction_type?: "purchase" | "authorize" | "capture" | "refund";
|
|
2691
|
-
/**
|
|
2692
|
-
* The type of object being returned.
|
|
2693
|
-
*/
|
|
2694
|
-
type?: string;
|
|
2695
|
-
/**
|
|
2696
|
-
* The status provided by the gateway for this transaction, such as `complete` or `failed`.
|
|
2697
|
-
*/
|
|
2698
|
-
status?: string;
|
|
2699
|
-
/**
|
|
2700
|
-
* Payment gateway specific details.
|
|
2701
|
-
*/
|
|
2702
|
-
payment_details?: {
|
|
2703
|
-
/**
|
|
2704
|
-
* Detailed status from the payment gateway.
|
|
2705
|
-
*/
|
|
2706
|
-
detailed_status?: string;
|
|
2707
|
-
};
|
|
2708
|
-
/**
|
|
2709
|
-
* Non-PII payment failure details from the gateway. Only present on failed transactions where the gateway provided structured failure information.
|
|
2710
|
-
*/
|
|
2711
|
-
failure_details?: FailureDetails;
|
|
2712
|
-
/**
|
|
2713
|
-
* Payment intent details.
|
|
2714
|
-
*/
|
|
2715
|
-
payment_intent?: {
|
|
2716
|
-
[key: string]: unknown;
|
|
2717
|
-
};
|
|
2718
|
-
/**
|
|
2719
|
-
* The mechanism used for capturing the transaction.
|
|
2720
|
-
*/
|
|
2721
|
-
capture_mechanism?: "automatic" | "manual";
|
|
2722
|
-
/**
|
|
2723
|
-
* The mechanism used for refunding the transaction.
|
|
2724
|
-
*/
|
|
2725
|
-
refund_mechanism?: "automatic" | "manual";
|
|
2726
|
-
/**
|
|
2727
|
-
* Client-specific parameters for payment processing.
|
|
2728
|
-
*/
|
|
2729
|
-
client_parameters?: {
|
|
2730
|
-
/**
|
|
2731
|
-
* URL to redirect the client after payment.
|
|
2732
|
-
*/
|
|
2733
|
-
redirect_url?: string;
|
|
2734
|
-
/**
|
|
2735
|
-
* Client secret for payment processing.
|
|
2736
|
-
*/
|
|
2737
|
-
secret?: string;
|
|
2738
|
-
/**
|
|
2739
|
-
* Client token for payment processing.
|
|
2740
|
-
*/
|
|
2741
|
-
token?: string;
|
|
2742
|
-
};
|
|
2743
|
-
/**
|
|
2744
|
-
* Array of next actions for the transaction.
|
|
2745
|
-
*/
|
|
2746
|
-
next_actions?: Array<string>;
|
|
2747
|
-
relationships?: {
|
|
2748
|
-
order?: {
|
|
2749
|
-
data?: {
|
|
2750
|
-
/**
|
|
2751
|
-
* Represents the type of the object being returned. It is always `order`.
|
|
2752
|
-
*/
|
|
2753
|
-
type?: string;
|
|
2754
|
-
/**
|
|
2755
|
-
* The ID of the order.
|
|
2756
|
-
*/
|
|
2757
|
-
id?: string;
|
|
2758
|
-
};
|
|
2759
|
-
};
|
|
2760
|
-
};
|
|
2761
|
-
meta?: {
|
|
2762
|
-
display_price?: FormattedPriceData;
|
|
2763
|
-
display_refunded_amount?: {
|
|
2764
|
-
total?: FormattedPriceData;
|
|
2765
|
-
};
|
|
2766
|
-
timestamps?: Timestamps;
|
|
2767
|
-
};
|
|
2768
|
-
};
|
|
2769
|
-
type TransactionEntityResponse = {
|
|
2770
|
-
data: TransactionResponse;
|
|
2771
|
-
};
|
|
2772
|
-
/**
|
|
2773
|
-
* Data.AdyenPayment
|
|
2774
|
-
*/
|
|
2775
|
-
type DataAdyenPayment = DataBasePayments & {
|
|
2776
|
-
/**
|
|
2777
|
-
* Specifies the gateway. You must use `adyen`.
|
|
2778
|
-
*/
|
|
2779
|
-
gateway: "adyen";
|
|
2780
|
-
options?: {
|
|
2781
|
-
/**
|
|
2782
|
-
* The shopper reference token associated with the saved payment method.
|
|
2783
|
-
*/
|
|
2784
|
-
shopper_reference?: string;
|
|
2785
|
-
/**
|
|
2786
|
-
* Enter CardOnFile for a one-time purchase.
|
|
2787
|
-
*/
|
|
2788
|
-
recurring_processing_model?: string;
|
|
2789
|
-
};
|
|
2790
|
-
/**
|
|
2791
|
-
* The Adyen recurringDetailReference payment method identifier.
|
|
2792
|
-
*/
|
|
2793
|
-
payment: string;
|
|
2794
|
-
};
|
|
2795
|
-
/**
|
|
2796
|
-
* Data.AuthorizeNetPayment
|
|
2797
|
-
*/
|
|
2798
|
-
type DataAuthorizeNetPayment = DataBasePayments & {
|
|
2799
|
-
/**
|
|
2800
|
-
* Specifies the gateway. You must use `authorize_net`.
|
|
2801
|
-
*/
|
|
2802
|
-
gateway: "authorize_net";
|
|
2803
|
-
options?: {
|
|
2804
|
-
/**
|
|
2805
|
-
* The Authorize.net customer payment profile ID.
|
|
2806
|
-
*/
|
|
2807
|
-
customer_payment_profile_id?: string;
|
|
2808
|
-
};
|
|
2809
|
-
/**
|
|
2810
|
-
* The Authorize.net customer profile ID.
|
|
2811
|
-
*/
|
|
2812
|
-
payment: string;
|
|
2813
|
-
};
|
|
2814
|
-
/**
|
|
2815
|
-
* Data.BraintreePayment
|
|
2816
|
-
*/
|
|
2817
|
-
type DataBraintreePayment = DataBasePayments & {
|
|
2818
|
-
/**
|
|
2819
|
-
* Specifies the gateway. You must use `braintree`.
|
|
2820
|
-
*/
|
|
2821
|
-
gateway: "braintree";
|
|
2822
|
-
/**
|
|
2823
|
-
* The Braintree Customer ID that you want to bill.
|
|
2824
|
-
*/
|
|
2825
|
-
payment: string;
|
|
2826
|
-
};
|
|
2827
|
-
/**
|
|
2828
|
-
* Data.CardConnectPayment
|
|
2829
|
-
*/
|
|
2830
|
-
type DataCardConnectPayment = DataBasePayments & {
|
|
2831
|
-
/**
|
|
2832
|
-
* Specifies the gateway. You must use `card_connect`.
|
|
2833
|
-
*/
|
|
2834
|
-
gateway: "card_connect";
|
|
2835
|
-
/**
|
|
2836
|
-
* Enter account_id, profile_id from CardPointe API. For example, 1|16178397535388255208.
|
|
2837
|
-
*/
|
|
2838
|
-
payment: string;
|
|
2839
|
-
};
|
|
2840
|
-
/**
|
|
2841
|
-
* Data.CyberSourcePayment
|
|
2842
|
-
*/
|
|
2843
|
-
type DataCyberSourcePayment = DataBasePayments & {
|
|
2844
|
-
/**
|
|
2845
|
-
* Specifies the gateway. You must use `cyber_source`.
|
|
2846
|
-
*/
|
|
2847
|
-
gateway: "cyber_source";
|
|
2848
|
-
/**
|
|
2849
|
-
* The CyberSource token.
|
|
2850
|
-
*/
|
|
2851
|
-
payment: string;
|
|
2852
|
-
};
|
|
2853
|
-
/**
|
|
2854
|
-
* Data.ManualPayment
|
|
2855
|
-
*/
|
|
2856
|
-
type DataManualPayment = DataBasePayments & {
|
|
2857
|
-
/**
|
|
2858
|
-
* Specifies the type of payment gateway. You must use `manual`.
|
|
2859
|
-
*/
|
|
2860
|
-
gateway: "manual";
|
|
2861
|
-
paymentmethod_meta?: {
|
|
2862
|
-
/**
|
|
2863
|
-
* A reference associated with the payment method. This might include loyalty points or gift card identifiers. We recommend not to include personal information in this field.
|
|
2864
|
-
*/
|
|
2865
|
-
custom_reference?: string;
|
|
2866
|
-
/**
|
|
2867
|
-
* A custom name associated with the payment method.
|
|
2868
|
-
*/
|
|
2869
|
-
name?: string;
|
|
2870
|
-
};
|
|
2871
|
-
};
|
|
2872
|
-
/**
|
|
2873
|
-
* Data.PayPalExpressCheckoutPayment
|
|
2874
|
-
*/
|
|
2875
|
-
type DataPayPalExpressCheckoutPayment = DataBasePayments & {
|
|
2876
|
-
/**
|
|
2877
|
-
* Specifies the type of payment gateway. You must use `paypal_express_checkout`.
|
|
2878
|
-
*/
|
|
2879
|
-
gateway: "paypal_express_checkout";
|
|
2880
|
-
options?: {
|
|
2881
|
-
/**
|
|
2882
|
-
* The description for the payment.
|
|
2883
|
-
*/
|
|
2884
|
-
description?: string;
|
|
2885
|
-
/**
|
|
2886
|
-
* The descriptor appended to PayPal generated descriptor that is visible on the card statement of the payer.
|
|
2887
|
-
*/
|
|
2888
|
-
soft_descriptor?: string;
|
|
2889
|
-
application_context?: {
|
|
2890
|
-
/**
|
|
2891
|
-
* The label that overrides the business name in the PayPal account on the PayPal site.
|
|
2892
|
-
*/
|
|
2893
|
-
brand_name?: string;
|
|
2894
|
-
/**
|
|
2895
|
-
* The locale pages that appear based on language and country code. PayPal supports a five-character code. For example, ja-JP.
|
|
2896
|
-
*/
|
|
2897
|
-
locale?: string;
|
|
2898
|
-
/**
|
|
2899
|
-
* The type of landing page to show on the PayPal site for customer checkout. Use values LOGIN, BILLING, or NO_PREFERENCE.
|
|
2900
|
-
*/
|
|
2901
|
-
landing_page?: string;
|
|
2902
|
-
/**
|
|
2903
|
-
* The shipping preference. Use SET_PROVIDED_ADDRESS value. This parameter does allow the user to change their address on PayPal site.
|
|
2904
|
-
*/
|
|
2905
|
-
shipping_preference?: string;
|
|
2906
|
-
/**
|
|
2907
|
-
* If you set `useraction=commit` in the query string, the flow redirects the buyer to the PayPal payment page and displays a Pay Now button. When the shopper clicks **Pay Now**, call `DoExpressCheckoutPayment` to complete the payment without additional interaction from the shopper. Choose this flow when you know the final payment amount when you initiate the checkout flow.
|
|
2908
|
-
*/
|
|
2909
|
-
user_action?: string;
|
|
2910
|
-
/**
|
|
2911
|
-
* The callback URL for PayPal to redirect the user in the case of approved payment.
|
|
2912
|
-
*/
|
|
2913
|
-
return_url?: string;
|
|
2914
|
-
/**
|
|
2915
|
-
* The callback URL for PayPal to redirect user in the case a cancelled payment.
|
|
2916
|
-
*/
|
|
2917
|
-
cancel_url?: string;
|
|
2918
|
-
};
|
|
2919
|
-
};
|
|
2920
|
-
};
|
|
2921
|
-
/**
|
|
2922
|
-
* Data.StripePayment
|
|
2923
|
-
*/
|
|
2924
|
-
type DataStripePayment = DataBasePayments & {
|
|
2925
|
-
/**
|
|
2926
|
-
* Specifies the type of payment gateway. You must use `stripe`.
|
|
2927
|
-
*/
|
|
2928
|
-
gateway: "stripe";
|
|
2929
|
-
options?: {
|
|
2930
|
-
/**
|
|
2931
|
-
* The option to provide an email for Stripe receipts. Specify live mode to access this feature.
|
|
2932
|
-
*/
|
|
2933
|
-
receipt_email?: string;
|
|
2934
|
-
};
|
|
2935
|
-
/**
|
|
2936
|
-
* The Stripe token or source.
|
|
2937
|
-
*/
|
|
2938
|
-
payment?: string;
|
|
2939
|
-
};
|
|
2940
|
-
/**
|
|
2941
|
-
* Data.StripePaymentIntentsPayment
|
|
2942
|
-
*/
|
|
2943
|
-
type DataStripePaymentIntentsPayment = DataBasePayments & {
|
|
2944
|
-
/**
|
|
2945
|
-
* Specifies the type of payment gateway. You must use `stripe_payment_intents`.
|
|
2946
|
-
*/
|
|
2947
|
-
gateway: "stripe_payment_intents";
|
|
2948
|
-
options?: {
|
|
2949
|
-
/**
|
|
2950
|
-
* Provides the email address to which you want to send the Stripe receipts for the transactions within the store. This feature is available only in the live mode.
|
|
2951
|
-
*/
|
|
2952
|
-
receipt_email?: string;
|
|
2953
|
-
};
|
|
2954
|
-
/**
|
|
2955
|
-
* Specifies the Stripe token or source.
|
|
2956
|
-
*/
|
|
2957
|
-
payment?: string;
|
|
2958
|
-
};
|
|
2959
|
-
type DataPaymentObject = DataAdyenPayment | DataAuthorizeNetPayment | DataBraintreePayment | DataCardConnectPayment | DataCyberSourcePayment | ElasticPathPaymentsPoweredByStripePayment | DataManualPayment | DataPayPalExpressCheckoutPayment | DataStripePayment | DataStripePaymentIntentsPayment;
|
|
2960
|
-
/**
|
|
2961
|
-
* PaymentsRequest
|
|
2962
|
-
*/
|
|
2963
|
-
type PaymentsRequest = {
|
|
2964
|
-
data?: DataPaymentObject;
|
|
2965
|
-
};
|
|
2966
|
-
/**
|
|
2967
|
-
* OrdersTransactionsConfirmRequest
|
|
2968
|
-
*/
|
|
2969
|
-
type OrdersTransactionsConfirmRequest = {
|
|
2970
|
-
data?: {
|
|
2971
|
-
[key: string]: unknown;
|
|
2972
|
-
};
|
|
2973
|
-
};
|
|
2974
|
-
/**
|
|
2975
|
-
* OrdersTransactionsCaptureRequest
|
|
2976
|
-
*/
|
|
2977
|
-
type OrdersTransactionsCaptureRequest = {
|
|
2978
|
-
data?: {
|
|
2979
|
-
options?: {
|
|
2980
|
-
soft_descriptor?: string;
|
|
2981
|
-
note_to_payer?: string;
|
|
2982
|
-
};
|
|
2983
|
-
};
|
|
2984
|
-
};
|
|
2985
|
-
/**
|
|
2986
|
-
* OrdersTransactionsRefundRequest
|
|
2987
|
-
*/
|
|
2988
|
-
type OrdersTransactionsRefundRequest = {
|
|
2989
|
-
data?: {
|
|
2990
|
-
/**
|
|
2991
|
-
* The amount value to be refunded. If this field is not provided, it will be considered as manual refund (Mark as Refunded) and the refund process must be manually handled via payment provider. If the amount value is same as payment value, then it will be treated as a full refund and sent to the payment provider to process refund automatically.
|
|
2992
|
-
*/
|
|
2993
|
-
amount?: number;
|
|
2994
|
-
options?: {
|
|
2995
|
-
/**
|
|
2996
|
-
* Provides comments about the refund. It is used by PayPal Express.
|
|
2997
|
-
*/
|
|
2998
|
-
note?: string;
|
|
2999
|
-
};
|
|
3000
|
-
};
|
|
3001
|
-
};
|
|
3002
|
-
type TransactionListResponse = {
|
|
3003
|
-
data: Array<TransactionResponse>;
|
|
3004
|
-
};
|
|
3005
|
-
type ResponseData = {
|
|
3006
|
-
data?: unknown;
|
|
3007
|
-
};
|
|
3008
|
-
/**
|
|
3009
|
-
* OrdersTransactionsCancelRequest
|
|
3010
|
-
*/
|
|
3011
|
-
type OrdersTransactionsCancelRequest = {
|
|
3012
|
-
data?: {
|
|
3013
|
-
options?: {
|
|
3014
|
-
[key: string]: unknown;
|
|
3015
|
-
};
|
|
3016
|
-
/**
|
|
3017
|
-
* Specifies the reason for canceling the transaction. The reason may include `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`.
|
|
3018
|
-
*/
|
|
3019
|
-
reason?: string;
|
|
3020
|
-
};
|
|
3021
|
-
};
|
|
3022
|
-
type UpdateOrderShippingGroupRequest = {
|
|
3023
|
-
data?: {
|
|
3024
|
-
type?: "shipping_group";
|
|
3025
|
-
shipping_type?: string;
|
|
3026
|
-
tracking_reference?: string;
|
|
3027
|
-
/**
|
|
3028
|
-
* An optional external ID reference for a shipping group. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters.
|
|
3029
|
-
*/
|
|
3030
|
-
external_ref?: string;
|
|
3031
|
-
address?: ShippingAddress;
|
|
3032
|
-
delivery_estimate?: DeliveryEstimate;
|
|
3033
|
-
};
|
|
3034
|
-
};
|
|
3035
|
-
type SettingsCart = {
|
|
3036
|
-
data?: {
|
|
3037
|
-
/**
|
|
3038
|
-
* Describes the type of request payload you're sending. Set this value to `settings`.
|
|
3039
|
-
*/
|
|
3040
|
-
type: string;
|
|
3041
|
-
/**
|
|
3042
|
-
* The unique identifier for the cart settings.
|
|
3043
|
-
*/
|
|
3044
|
-
readonly id?: string;
|
|
3045
|
-
/**
|
|
3046
|
-
* Indicates the number of days before a cart expires.
|
|
3047
|
-
*/
|
|
3048
|
-
cart_expiry_days?: number;
|
|
3049
|
-
discounts?: {
|
|
3050
|
-
/**
|
|
3051
|
-
* When `true`, custom discounts are enabled. Default is false. This setting only affects the new empty carts while the existing active carts will not be affected.
|
|
3052
|
-
*/
|
|
3053
|
-
custom_discounts_enabled?: boolean;
|
|
3054
|
-
/**
|
|
3055
|
-
* When set to `true`, this parameter allows the cart to use rule promotions.
|
|
3056
|
-
*/
|
|
3057
|
-
use_rule_promotions?: boolean;
|
|
3058
|
-
};
|
|
3059
|
-
inventories?: {
|
|
3060
|
-
/**
|
|
3061
|
-
* When `true`, inventory checks are not performed when adding products to a cart but still occur on checkout as normal. Default is false. This setting only affects the new empty carts while the existing active carts will not be affected.
|
|
3062
|
-
*/
|
|
3063
|
-
defer_inventory_check?: boolean;
|
|
3064
|
-
};
|
|
3065
|
-
items?: {
|
|
3066
|
-
/**
|
|
3067
|
-
* When `true`, cart items with the same SKU but different locations are kept as separate line items instead of being merged. When `false` (default), items with the same SKU are merged and the location is updated to the most recent value.
|
|
3068
|
-
*/
|
|
3069
|
-
separate_items_by_location?: boolean;
|
|
3070
|
-
};
|
|
3071
|
-
/**
|
|
3072
|
-
* When `true`, admins (users with admin scope) can retrieve all carts in the store via `GET /v2/carts`, regardless of customer or account associations. When `false`, admins can only see carts that are registered (associated with customers or accounts).
|
|
3073
|
-
*
|
|
3074
|
-
* For new stores, this defaults to `true`. For existing stores created before this feature was introduced, this defaults to `false` to maintain backward compatibility.
|
|
3075
|
-
*
|
|
3076
|
-
*/
|
|
3077
|
-
show_all_carts?: boolean;
|
|
3078
|
-
};
|
|
3079
|
-
};
|
|
3080
|
-
/**
|
|
3081
|
-
* Carts Response
|
|
3082
|
-
*/
|
|
3083
|
-
type CartsResponse = {
|
|
3084
|
-
data?: Array<CartItemObject | CustomItemObject | SubscriptionItemObject | PromotionItemObject>;
|
|
3085
|
-
meta?: {
|
|
3086
|
-
display_price?: {
|
|
3087
|
-
with_tax?: FormattedPriceData;
|
|
3088
|
-
without_tax?: FormattedPriceData;
|
|
3089
|
-
tax?: FormattedPriceData;
|
|
3090
|
-
discount?: FormattedPriceData;
|
|
3091
|
-
without_discount?: FormattedPriceData;
|
|
3092
|
-
discounts?: {
|
|
3093
|
-
[key: string]: {
|
|
3094
|
-
amount?: number;
|
|
3095
|
-
currency?: string;
|
|
3096
|
-
formatted?: string;
|
|
3097
|
-
};
|
|
3098
|
-
};
|
|
3099
|
-
};
|
|
3100
|
-
timestamps?: CartTimestamps;
|
|
3101
|
-
};
|
|
3102
|
-
};
|
|
3103
|
-
/**
|
|
3104
|
-
* Cart Items Response
|
|
3105
|
-
*/
|
|
3106
|
-
type CartItemsResponse = {
|
|
3107
|
-
data?: Array<CartItemObject | CustomItemObject | SubscriptionItemObject | PromotionItemObject>;
|
|
3108
|
-
};
|
|
3109
|
-
/**
|
|
3110
|
-
* Cart Item Object
|
|
3111
|
-
*/
|
|
3112
|
-
type CartItemObject = CartItemObjectData & CartItemResponse;
|
|
3113
|
-
/**
|
|
3114
|
-
* Data.StripeConnectPayment
|
|
3115
|
-
*/
|
|
3116
|
-
type DataStripeConnectPayment = DataBasePayments & {
|
|
3117
|
-
/**
|
|
3118
|
-
* Specifies the type of payment gateway. You must use `stripe_connect`.
|
|
3119
|
-
*/
|
|
3120
|
-
gateway: "stripe_connect";
|
|
3121
|
-
options?: {
|
|
3122
|
-
/**
|
|
3123
|
-
* Provides the email address to which you want to send the Stripe receipts for the transactions within the store. This feature is available only in the live mode.
|
|
3124
|
-
*/
|
|
3125
|
-
receipt_email?: string;
|
|
3126
|
-
};
|
|
3127
|
-
/**
|
|
3128
|
-
* Specifies the Stripe token or source.
|
|
3129
|
-
*/
|
|
3130
|
-
payment?: string;
|
|
3131
|
-
};
|
|
3132
|
-
/**
|
|
3133
|
-
* CartsCustomDiscountsUpdateObject
|
|
3134
|
-
*/
|
|
3135
|
-
type CartsCustomDiscountsUpdateObject = {
|
|
3136
|
-
/**
|
|
3137
|
-
* Specifies an amount to be applied for the custom discount, in the currency's smallest unit. It must be less than zero.
|
|
3138
|
-
*/
|
|
3139
|
-
amount?: number;
|
|
3140
|
-
/**
|
|
3141
|
-
* Specifies a description for the custom discount.
|
|
3142
|
-
*/
|
|
3143
|
-
description?: string;
|
|
3144
|
-
/**
|
|
3145
|
-
* Specifies the discount code used for the custom discount.
|
|
3146
|
-
*/
|
|
3147
|
-
discount_code?: string;
|
|
3148
|
-
/**
|
|
3149
|
-
* Specifies from where the custom discount is applied. For example, Talon.one.
|
|
3150
|
-
*/
|
|
3151
|
-
discount_engine?: string;
|
|
3152
|
-
/**
|
|
3153
|
-
* Specifies an external id for the custom discount.
|
|
3154
|
-
*/
|
|
3155
|
-
external_id?: string;
|
|
3156
|
-
/**
|
|
3157
|
-
* Specifies the type of the resource. Always `custom_discount`.
|
|
3158
|
-
*/
|
|
3159
|
-
type: "custom_discount";
|
|
3160
|
-
};
|
|
3161
|
-
/**
|
|
3162
|
-
* CartsCustomDiscountsCreateRequest
|
|
3163
|
-
*/
|
|
3164
|
-
type CartsCustomDiscountsCreateRequest = {
|
|
3165
|
-
data: CartsCustomDiscountsObject;
|
|
3166
|
-
};
|
|
3167
|
-
type GetCartsData = {
|
|
3168
|
-
body?: never;
|
|
3169
|
-
headers?: {
|
|
3170
|
-
/**
|
|
3171
|
-
* An Account Management Authentication token to access a specific account's carts.
|
|
3172
|
-
*/
|
|
3173
|
-
"EP-Account-Management-Authentication-Token"?: string;
|
|
3174
|
-
/**
|
|
3175
|
-
* A customer token to access a specific customer's carts.
|
|
3176
|
-
*/
|
|
3177
|
-
"X-Moltin-Customer-Token"?: string;
|
|
3178
|
-
};
|
|
3179
|
-
path?: never;
|
|
3180
|
-
query?: {
|
|
3181
|
-
/**
|
|
3182
|
-
* A comma-separated list of resources to include. See [Characteristics of Include Parameter](/guides/Getting-Started/includes#characteristics-of-include-parameter).
|
|
3183
|
-
*/
|
|
3184
|
-
include?: Array<"custom_discounts">;
|
|
3185
|
-
/**
|
|
3186
|
-
* The maximum number of records per page.
|
|
3187
|
-
*/
|
|
3188
|
-
"page[limit]"?: number;
|
|
3189
|
-
/**
|
|
3190
|
-
* The number of records to offset the results by.
|
|
3191
|
-
*/
|
|
3192
|
-
"page[offset]"?: number;
|
|
3193
|
-
/**
|
|
3194
|
-
* Filter expression for searching carts. For more information about filtering, see [Filtering](/guides/Getting-Started/filtering).
|
|
3195
|
-
*
|
|
3196
|
-
* :::note
|
|
3197
|
-
* Filtering is only supported when using **client credentials** (admin) authentication. When using a **customer token** (`X-Moltin-Customer-Token`) or **account token** (`EP-Account-Management-Authentication-Token`), the `filter` parameter is ignored and all carts associated with the customer or account are returned.
|
|
3198
|
-
* :::
|
|
3199
|
-
*
|
|
3200
|
-
* **Supported Fields:**
|
|
3201
|
-
* - `account_ids`: Filter carts by associated account ID (UUID format)
|
|
3202
|
-
* - `name`: Filter carts by cart name (case-insensitive)
|
|
3203
|
-
*
|
|
3204
|
-
* **Supported Operators:**
|
|
3205
|
-
* - `contains(field,value)`: Contains value in array field
|
|
3206
|
-
* - `ilike(field,value)`: Case-insensitive string matching
|
|
3207
|
-
*
|
|
3208
|
-
* **Examples:**
|
|
3209
|
-
* - `contains(account_ids,"c24e5698-3b54-491b-9225-559c7a9cf2b2")` - Find carts associated with a specific account
|
|
3210
|
-
* - `ilike(name,"Shopping Cart")` - Find carts with name matching "Shopping Cart" (case-insensitive)
|
|
3211
|
-
* - `ilike(name,"*cart*")` - Find carts with names containing "cart" (wildcard search)
|
|
3212
|
-
*
|
|
3213
|
-
* **Combining Filters:**
|
|
3214
|
-
* You can combine multiple filters using the `:`, and `|` operator for and and or respectively:
|
|
3215
|
-
* - `contains(account_ids,"abc123"):ilike(name,"Holiday Cart")` - Find carts matching both conditions
|
|
3216
|
-
* - `contains(account_ids,"abc123")|ilike(name,"Holiday Cart")` - Find carts matching either condition.
|
|
3217
|
-
*
|
|
3218
|
-
*/
|
|
3219
|
-
filter?: string;
|
|
3220
|
-
};
|
|
3221
|
-
url: "/v2/carts";
|
|
3222
|
-
};
|
|
3223
|
-
type GetCartsErrors = {
|
|
3224
|
-
/**
|
|
3225
|
-
* Bad Request
|
|
3226
|
-
*/
|
|
3227
|
-
400: ResponseErrorResponse;
|
|
3228
|
-
/**
|
|
3229
|
-
* Unauthorized call
|
|
3230
|
-
*/
|
|
3231
|
-
403: ResponseErrorResponse;
|
|
3232
|
-
};
|
|
3233
|
-
type GetCartsError = GetCartsErrors[keyof GetCartsErrors];
|
|
3234
|
-
type GetCartsResponses = {
|
|
3235
|
-
200: CartCollectionResponse;
|
|
3236
|
-
};
|
|
3237
|
-
type GetCartsResponse = GetCartsResponses[keyof GetCartsResponses];
|
|
3238
|
-
type CreateACartData = {
|
|
3239
|
-
body?: CartsRequest;
|
|
3240
|
-
headers?: {
|
|
3241
|
-
/**
|
|
3242
|
-
* An Account Management Authentication token for the account to be associated with the cart.
|
|
3243
|
-
*/
|
|
3244
|
-
"EP-Account-Management-Authentication-Token"?: string;
|
|
3245
|
-
/**
|
|
3246
|
-
* A customer token for the customer to be associated with the cart.
|
|
3247
|
-
*/
|
|
3248
|
-
"X-Moltin-Customer-Token"?: string;
|
|
3249
|
-
};
|
|
3250
|
-
path?: never;
|
|
3251
|
-
query?: never;
|
|
3252
|
-
url: "/v2/carts";
|
|
3253
|
-
};
|
|
3254
|
-
type CreateACartErrors = {
|
|
3255
|
-
/**
|
|
3256
|
-
* Bad Request
|
|
3257
|
-
*/
|
|
3258
|
-
400: ResponseErrorResponse;
|
|
3259
|
-
/**
|
|
3260
|
-
* Unauthorized call
|
|
3261
|
-
*/
|
|
3262
|
-
403: ResponseErrorResponse;
|
|
3263
|
-
};
|
|
3264
|
-
type CreateACartError = CreateACartErrors[keyof CreateACartErrors];
|
|
3265
|
-
type CreateACartResponses = {
|
|
3266
|
-
201: CartEntityResponse;
|
|
3267
|
-
};
|
|
3268
|
-
type CreateACartResponse = CreateACartResponses[keyof CreateACartResponses];
|
|
3269
|
-
type DeleteACartData = {
|
|
3270
|
-
body?: never;
|
|
3271
|
-
path: {
|
|
3272
|
-
/**
|
|
3273
|
-
* The unique identifier of the cart that you want to delete.
|
|
3274
|
-
*/
|
|
3275
|
-
cartID: string;
|
|
3276
|
-
};
|
|
3277
|
-
query?: never;
|
|
3278
|
-
url: "/v2/carts/{cartID}";
|
|
3279
|
-
};
|
|
3280
|
-
type DeleteACartErrors = {
|
|
3281
|
-
/**
|
|
3282
|
-
* Bad Request
|
|
3283
|
-
*/
|
|
3284
|
-
400: ResponseErrorResponse;
|
|
3285
|
-
};
|
|
3286
|
-
type DeleteACartError = DeleteACartErrors[keyof DeleteACartErrors];
|
|
3287
|
-
type DeleteACartResponses = {
|
|
3288
|
-
/**
|
|
3289
|
-
* No Content
|
|
3290
|
-
*/
|
|
3291
|
-
204: void;
|
|
3292
|
-
};
|
|
3293
|
-
type DeleteACartResponse = DeleteACartResponses[keyof DeleteACartResponses];
|
|
3294
|
-
type GetACartData = {
|
|
3295
|
-
body?: never;
|
|
3296
|
-
path: {
|
|
3297
|
-
/**
|
|
3298
|
-
* The unique identifier for this cart that you created.
|
|
3299
|
-
*/
|
|
3300
|
-
cartID: string;
|
|
3301
|
-
};
|
|
3302
|
-
query?: {
|
|
3303
|
-
/**
|
|
3304
|
-
* A comma-separated list of resources to include. See [Characteristics of Include Parameter](/guides/Getting-Started/includes#characteristics-of-include-parameter).
|
|
3305
|
-
*/
|
|
3306
|
-
include?: Array<"custom_discounts" | "promotions">;
|
|
3307
|
-
};
|
|
3308
|
-
url: "/v2/carts/{cartID}";
|
|
3309
|
-
};
|
|
3310
|
-
type GetACartErrors = {
|
|
3311
|
-
/**
|
|
3312
|
-
* Bad Request
|
|
3313
|
-
*/
|
|
3314
|
-
400: ResponseErrorResponse;
|
|
3315
|
-
};
|
|
3316
|
-
type GetACartError = GetACartErrors[keyof GetACartErrors];
|
|
3317
|
-
type GetACartResponses = {
|
|
3318
|
-
/**
|
|
3319
|
-
* OK
|
|
3320
|
-
*/
|
|
3321
|
-
200: CartEntityResponse;
|
|
3322
|
-
};
|
|
3323
|
-
type GetACartResponse = GetACartResponses[keyof GetACartResponses];
|
|
3324
|
-
type UpdateACartData = {
|
|
3325
|
-
body?: CartsRequest;
|
|
3326
|
-
path: {
|
|
3327
|
-
/**
|
|
3328
|
-
* The unique identifier of a cart created by you.
|
|
3329
|
-
*/
|
|
3330
|
-
cartID: string;
|
|
3331
|
-
};
|
|
3332
|
-
query?: never;
|
|
3333
|
-
url: "/v2/carts/{cartID}";
|
|
3334
|
-
};
|
|
3335
|
-
type UpdateACartErrors = {
|
|
3336
|
-
/**
|
|
3337
|
-
* Unauthorized call
|
|
3338
|
-
*/
|
|
3339
|
-
403: ResponseErrorResponse;
|
|
3340
|
-
/**
|
|
3341
|
-
* Unprocessable Content
|
|
3342
|
-
*/
|
|
3343
|
-
422: ResponseErrorItem;
|
|
3344
|
-
};
|
|
3345
|
-
type UpdateACartError = UpdateACartErrors[keyof UpdateACartErrors];
|
|
3346
|
-
type UpdateACartResponses = {
|
|
3347
|
-
200: CartEntityResponse;
|
|
3348
|
-
};
|
|
3349
|
-
type UpdateACartResponse = UpdateACartResponses[keyof UpdateACartResponses];
|
|
3350
|
-
type DeleteAllCartItemsData = {
|
|
3351
|
-
body?: never;
|
|
3352
|
-
path: {
|
|
3353
|
-
/**
|
|
3354
|
-
* The unique identifier of the cart created by you.
|
|
3355
|
-
*/
|
|
3356
|
-
cartID: string;
|
|
3357
|
-
};
|
|
3358
|
-
query?: never;
|
|
3359
|
-
url: "/v2/carts/{cartID}/items";
|
|
3360
|
-
};
|
|
3361
|
-
type DeleteAllCartItemsErrors = {
|
|
3362
|
-
/**
|
|
3363
|
-
* Unprocessable Entity
|
|
3364
|
-
*/
|
|
3365
|
-
422: ResponseErrorResponse;
|
|
3366
|
-
};
|
|
3367
|
-
type DeleteAllCartItemsError = DeleteAllCartItemsErrors[keyof DeleteAllCartItemsErrors];
|
|
3368
|
-
type DeleteAllCartItemsResponses = {
|
|
3369
|
-
/**
|
|
3370
|
-
* No Content
|
|
3371
|
-
*/
|
|
3372
|
-
204: void;
|
|
3373
|
-
};
|
|
3374
|
-
type DeleteAllCartItemsResponse = DeleteAllCartItemsResponses[keyof DeleteAllCartItemsResponses];
|
|
3375
|
-
type GetCartItemsData = {
|
|
3376
|
-
body?: never;
|
|
3377
|
-
path: {
|
|
3378
|
-
/**
|
|
3379
|
-
* The unique identifier of the cart that you created.
|
|
3380
|
-
*/
|
|
3381
|
-
cartID: string;
|
|
3382
|
-
};
|
|
3383
|
-
query?: {
|
|
3384
|
-
/**
|
|
3385
|
-
* A comma-separated list of related resources to include in the response.
|
|
3386
|
-
*/
|
|
3387
|
-
include?: Array<"tax_items" | "custom_discounts" | "promotions">;
|
|
3388
|
-
};
|
|
3389
|
-
url: "/v2/carts/{cartID}/items";
|
|
3390
|
-
};
|
|
3391
|
-
type GetCartItemsResponses = {
|
|
3392
|
-
200: CartItemsResponse;
|
|
3393
|
-
};
|
|
3394
|
-
type GetCartItemsResponse = GetCartItemsResponses[keyof GetCartItemsResponses];
|
|
3395
|
-
type ManageCartsData = {
|
|
3396
|
-
body?: CartItemObjectRequest | SubscriptionItemObject | CartMergeObjectRequest | CustomItemObject | ReOrderObjectRequest | PromotionItemObject | BulkAddItemsRequest;
|
|
3397
|
-
path: {
|
|
3398
|
-
/**
|
|
3399
|
-
* The unique identifier of the cart that you created.
|
|
3400
|
-
*/
|
|
3401
|
-
cartID: string;
|
|
3402
|
-
};
|
|
3403
|
-
query?: never;
|
|
3404
|
-
url: "/v2/carts/{cartID}/items";
|
|
3405
|
-
};
|
|
3406
|
-
type ManageCartsErrors = {
|
|
3407
|
-
/**
|
|
3408
|
-
* Bad Request
|
|
3409
|
-
*/
|
|
3410
|
-
400: ResponseErrorResponse;
|
|
3411
|
-
/**
|
|
3412
|
-
* Unauthorized call
|
|
3413
|
-
*/
|
|
3414
|
-
403: ResponseErrorResponse;
|
|
3415
|
-
/**
|
|
3416
|
-
* Not Found - occurs when a referenced product or promotion cannot be found. For bulk operations with add_all_or_nothing=true, the entire operation fails if any item is invalid.
|
|
3417
|
-
*/
|
|
3418
|
-
404: ResponseErrorResponse;
|
|
3419
|
-
/**
|
|
3420
|
-
* Unprocessable Entity
|
|
3421
|
-
*/
|
|
3422
|
-
422: ResponseErrorResponse;
|
|
3423
|
-
/**
|
|
3424
|
-
* Internal Server Error
|
|
3425
|
-
*/
|
|
3426
|
-
500: ResponseErrorResponse;
|
|
3427
|
-
};
|
|
3428
|
-
type ManageCartsError = ManageCartsErrors[keyof ManageCartsErrors];
|
|
3429
|
-
type ManageCartsResponses = {
|
|
3430
|
-
/**
|
|
3431
|
-
* Successfully added item(s) to cart. When promotions are added, the response includes informational messages in the `meta.messages` field describing the promotion and discount effects.
|
|
3432
|
-
*/
|
|
3433
|
-
201: CartsResponse;
|
|
3434
|
-
};
|
|
3435
|
-
type ManageCartsResponse = ManageCartsResponses[keyof ManageCartsResponses];
|
|
3436
|
-
type BulkUpdateItemsInCartData = {
|
|
3437
|
-
body?: BulkUpdateCartsItems;
|
|
3438
|
-
path: {
|
|
3439
|
-
/**
|
|
3440
|
-
* The unique identifier of the cart that you created.
|
|
3441
|
-
*/
|
|
3442
|
-
cartID: string;
|
|
3443
|
-
};
|
|
3444
|
-
query?: never;
|
|
3445
|
-
url: "/v2/carts/{cartID}/items";
|
|
3446
|
-
};
|
|
3447
|
-
type BulkUpdateItemsInCartErrors = {
|
|
3448
|
-
/**
|
|
3449
|
-
* Insufficient Stock
|
|
3450
|
-
*/
|
|
3451
|
-
400: ResponseErrorResponse;
|
|
3452
|
-
/**
|
|
3453
|
-
* Unauthorized call
|
|
3454
|
-
*/
|
|
3455
|
-
403: ResponseErrorResponse;
|
|
3456
|
-
/**
|
|
3457
|
-
* Not Found
|
|
3458
|
-
*/
|
|
3459
|
-
404: ResponseErrorResponse;
|
|
3460
|
-
/**
|
|
3461
|
-
* Unprocessable Entity
|
|
3462
|
-
*/
|
|
3463
|
-
422: ResponseErrorResponse;
|
|
3464
|
-
};
|
|
3465
|
-
type BulkUpdateItemsInCartError = BulkUpdateItemsInCartErrors[keyof BulkUpdateItemsInCartErrors];
|
|
3466
|
-
type BulkUpdateItemsInCartResponses = {
|
|
3467
|
-
/**
|
|
3468
|
-
* Successfully updated cart items
|
|
3469
|
-
*/
|
|
3470
|
-
200: CartItemCollectionResponse;
|
|
3471
|
-
};
|
|
3472
|
-
type BulkUpdateItemsInCartResponse = BulkUpdateItemsInCartResponses[keyof BulkUpdateItemsInCartResponses];
|
|
3473
|
-
type DeleteACartItemData = {
|
|
3474
|
-
body?: never;
|
|
3475
|
-
path: {
|
|
3476
|
-
/**
|
|
3477
|
-
* The unique identifier of the cart created by you.
|
|
3478
|
-
*/
|
|
3479
|
-
cartID: string;
|
|
3480
|
-
/**
|
|
3481
|
-
* The unique identifier of the cart that you want to delete.
|
|
3482
|
-
*/
|
|
3483
|
-
cartitemID: string;
|
|
3484
|
-
};
|
|
3485
|
-
query?: never;
|
|
3486
|
-
url: "/v2/carts/{cartID}/items/{cartitemID}";
|
|
3487
|
-
};
|
|
3488
|
-
type DeleteACartItemResponses = {
|
|
3489
|
-
200: CartsResponse;
|
|
3490
|
-
};
|
|
3491
|
-
type DeleteACartItemResponse = DeleteACartItemResponses[keyof DeleteACartItemResponses];
|
|
3492
|
-
type UpdateACartItemData = {
|
|
3493
|
-
body?: UpdateCartsItems;
|
|
3494
|
-
path: {
|
|
3495
|
-
/**
|
|
3496
|
-
* A unique identifier of the cart that you created.
|
|
3497
|
-
*/
|
|
3498
|
-
cartID: string;
|
|
3499
|
-
/**
|
|
3500
|
-
* A unique identifier of the cart item.
|
|
3501
|
-
*/
|
|
3502
|
-
cartitemID: string;
|
|
3503
|
-
};
|
|
3504
|
-
query?: never;
|
|
3505
|
-
url: "/v2/carts/{cartID}/items/{cartitemID}";
|
|
3506
|
-
};
|
|
3507
|
-
type UpdateACartItemErrors = {
|
|
3508
|
-
/**
|
|
3509
|
-
* Bad Request
|
|
3510
|
-
*/
|
|
3511
|
-
400: ResponseErrorResponse;
|
|
3512
|
-
/**
|
|
3513
|
-
* Unauthorized call
|
|
3514
|
-
*/
|
|
3515
|
-
403: ResponseErrorResponse;
|
|
3516
|
-
/**
|
|
3517
|
-
* Not Found
|
|
3518
|
-
*/
|
|
3519
|
-
404: ResponseErrorResponse;
|
|
3520
|
-
};
|
|
3521
|
-
type UpdateACartItemError = UpdateACartItemErrors[keyof UpdateACartItemErrors];
|
|
3522
|
-
type UpdateACartItemResponses = {
|
|
3523
|
-
200: CartsResponse;
|
|
3524
|
-
};
|
|
3525
|
-
type UpdateACartItemResponse = UpdateACartItemResponses[keyof UpdateACartItemResponses];
|
|
3526
|
-
type DeleteAccountCartAssociationData = {
|
|
3527
|
-
body?: CartsRelationshipsAccountsData;
|
|
3528
|
-
headers?: {
|
|
3529
|
-
/**
|
|
3530
|
-
* An Account Management Authentication token to access a specific account's carts.
|
|
3531
|
-
*/
|
|
3532
|
-
"EP-Account-Management-Authentication-Token"?: string;
|
|
3533
|
-
};
|
|
3534
|
-
path: {
|
|
3535
|
-
/**
|
|
3536
|
-
* The ID for the cart created by the account.
|
|
3537
|
-
*/
|
|
3538
|
-
cartID: string;
|
|
3539
|
-
};
|
|
3540
|
-
query?: never;
|
|
3541
|
-
url: "/v2/carts/{cartID}/relationships/accounts";
|
|
3542
|
-
};
|
|
3543
|
-
type DeleteAccountCartAssociationErrors = {
|
|
3544
|
-
/**
|
|
3545
|
-
* Bad Request
|
|
3546
|
-
*/
|
|
3547
|
-
400: ResponseErrorResponse;
|
|
3548
|
-
/**
|
|
3549
|
-
* Forbidden
|
|
3550
|
-
*/
|
|
3551
|
-
403: ResponseErrorResponse;
|
|
3552
|
-
};
|
|
3553
|
-
type DeleteAccountCartAssociationError = DeleteAccountCartAssociationErrors[keyof DeleteAccountCartAssociationErrors];
|
|
3554
|
-
type DeleteAccountCartAssociationResponses = {
|
|
3555
|
-
/**
|
|
3556
|
-
* No Content
|
|
3557
|
-
*/
|
|
3558
|
-
204: void;
|
|
3559
|
-
};
|
|
3560
|
-
type DeleteAccountCartAssociationResponse = DeleteAccountCartAssociationResponses[keyof DeleteAccountCartAssociationResponses];
|
|
3561
|
-
type CreateAccountCartAssociationData = {
|
|
3562
|
-
body?: CartsRelationshipsAccountsData;
|
|
3563
|
-
headers?: {
|
|
3564
|
-
/**
|
|
3565
|
-
* An Account Management Authentication token to access a specific account's carts.
|
|
3566
|
-
*/
|
|
3567
|
-
"EP-Account-Management-Authentication-Token"?: string;
|
|
3568
|
-
};
|
|
3569
|
-
path: {
|
|
3570
|
-
/**
|
|
3571
|
-
* The ID for the cart created by the account. Ensure that you follow the guidelines for [Safe Characters](/guides/Getting-Started/safe-characters).
|
|
3572
|
-
*/
|
|
3573
|
-
cartID: string;
|
|
3574
|
-
};
|
|
3575
|
-
query?: never;
|
|
3576
|
-
url: "/v2/carts/{cartID}/relationships/accounts";
|
|
3577
|
-
};
|
|
3578
|
-
type CreateAccountCartAssociationErrors = {
|
|
3579
|
-
/**
|
|
3580
|
-
* Bad Request
|
|
3581
|
-
*/
|
|
3582
|
-
400: ResponseErrorResponse;
|
|
3583
|
-
/**
|
|
3584
|
-
* Forbidden
|
|
3585
|
-
*/
|
|
3586
|
-
403: ResponseErrorResponse;
|
|
3587
|
-
/**
|
|
3588
|
-
* Unprocessable Entity
|
|
3589
|
-
*/
|
|
3590
|
-
422: ResponseErrorResponse;
|
|
3591
|
-
};
|
|
3592
|
-
type CreateAccountCartAssociationError = CreateAccountCartAssociationErrors[keyof CreateAccountCartAssociationErrors];
|
|
3593
|
-
type CreateAccountCartAssociationResponses = {
|
|
3594
|
-
/**
|
|
3595
|
-
* OK
|
|
3596
|
-
*/
|
|
3597
|
-
200: CartsRelationshipsAccountsData;
|
|
3598
|
-
/**
|
|
3599
|
-
* No Content is sent back in case the account has already been associated to the cart.
|
|
3600
|
-
*/
|
|
3601
|
-
204: void;
|
|
3602
|
-
};
|
|
3603
|
-
type CreateAccountCartAssociationResponse = CreateAccountCartAssociationResponses[keyof CreateAccountCartAssociationResponses];
|
|
3604
|
-
type DeleteCustomerCartAssociationData = {
|
|
3605
|
-
body?: CartsRelationshipsCustomersData;
|
|
3606
|
-
headers?: {
|
|
3607
|
-
/**
|
|
3608
|
-
* A customer token to access a specific customer's carts.
|
|
3609
|
-
*/
|
|
3610
|
-
"X-Moltin-Customer-Token"?: string;
|
|
3611
|
-
};
|
|
3612
|
-
path: {
|
|
3613
|
-
/**
|
|
3614
|
-
* The ID for the cart created by the customer.
|
|
3615
|
-
*/
|
|
3616
|
-
cartID: string;
|
|
3617
|
-
};
|
|
3618
|
-
query?: never;
|
|
3619
|
-
url: "/v2/carts/{cartID}/relationships/customers";
|
|
3620
|
-
};
|
|
3621
|
-
type DeleteCustomerCartAssociationErrors = {
|
|
3622
|
-
/**
|
|
3623
|
-
* Bad Request
|
|
3624
|
-
*/
|
|
3625
|
-
400: ResponseErrorResponse;
|
|
3626
|
-
/**
|
|
3627
|
-
* Forbidden
|
|
3628
|
-
*/
|
|
3629
|
-
403: ResponseErrorResponse;
|
|
3630
|
-
};
|
|
3631
|
-
type DeleteCustomerCartAssociationError = DeleteCustomerCartAssociationErrors[keyof DeleteCustomerCartAssociationErrors];
|
|
3632
|
-
type DeleteCustomerCartAssociationResponses = {
|
|
3633
|
-
/**
|
|
3634
|
-
* No Content
|
|
3635
|
-
*/
|
|
3636
|
-
204: void;
|
|
3637
|
-
};
|
|
3638
|
-
type DeleteCustomerCartAssociationResponse = DeleteCustomerCartAssociationResponses[keyof DeleteCustomerCartAssociationResponses];
|
|
3639
|
-
type CreateCustomerCartAssociationData = {
|
|
3640
|
-
body?: CartsRelationshipsCustomersData;
|
|
3641
|
-
headers?: {
|
|
3642
|
-
/**
|
|
3643
|
-
* A customer token to access a specific customer's carts.
|
|
3644
|
-
*/
|
|
3645
|
-
"X-Moltin-Customer-Token"?: string;
|
|
3646
|
-
};
|
|
3647
|
-
path: {
|
|
3648
|
-
/**
|
|
3649
|
-
* The ID for the cart created by the customer. Ensure that you follow the guidelines for [Safe Characters](/guides/Getting-Started/safe-characters).
|
|
3650
|
-
*/
|
|
3651
|
-
cartID: string;
|
|
3652
|
-
};
|
|
3653
|
-
query?: never;
|
|
3654
|
-
url: "/v2/carts/{cartID}/relationships/customers";
|
|
3655
|
-
};
|
|
3656
|
-
type CreateCustomerCartAssociationErrors = {
|
|
3657
|
-
/**
|
|
3658
|
-
* Bad Request
|
|
3659
|
-
*/
|
|
3660
|
-
400: ResponseErrorResponse;
|
|
3661
|
-
/**
|
|
3662
|
-
* Forbidden
|
|
3663
|
-
*/
|
|
3664
|
-
403: ResponseErrorResponse;
|
|
3665
|
-
/**
|
|
3666
|
-
* Unauthorized
|
|
3667
|
-
*/
|
|
3668
|
-
422: ResponseErrorResponse;
|
|
3669
|
-
};
|
|
3670
|
-
type CreateCustomerCartAssociationError = CreateCustomerCartAssociationErrors[keyof CreateCustomerCartAssociationErrors];
|
|
3671
|
-
type CreateCustomerCartAssociationResponses = {
|
|
3672
|
-
/**
|
|
3673
|
-
* OK
|
|
3674
|
-
*/
|
|
3675
|
-
200: CartsRelationshipsCustomersData;
|
|
3676
|
-
/**
|
|
3677
|
-
* No Content
|
|
3678
|
-
*/
|
|
3679
|
-
204: void;
|
|
3680
|
-
};
|
|
3681
|
-
type CreateCustomerCartAssociationResponse = CreateCustomerCartAssociationResponses[keyof CreateCustomerCartAssociationResponses];
|
|
3682
|
-
type DeleteAPromotionViaPromotionCodeData = {
|
|
3683
|
-
body?: never;
|
|
3684
|
-
path: {
|
|
3685
|
-
/**
|
|
3686
|
-
* Specifies the unique identifier of a cart created by you.
|
|
3687
|
-
*/
|
|
3688
|
-
cartID: string;
|
|
3689
|
-
/**
|
|
3690
|
-
* Specifies the promotion code to be deleted.
|
|
3691
|
-
*/
|
|
3692
|
-
promoCode: string;
|
|
3693
|
-
};
|
|
3694
|
-
query?: never;
|
|
3695
|
-
url: "/v2/carts/{cartID}/discounts/{promoCode}";
|
|
3696
|
-
};
|
|
3697
|
-
type DeleteAPromotionViaPromotionCodeResponses = {
|
|
3698
|
-
/**
|
|
3699
|
-
* No Content
|
|
3700
|
-
*/
|
|
3701
|
-
204: void;
|
|
3702
|
-
};
|
|
3703
|
-
type DeleteAPromotionViaPromotionCodeResponse = DeleteAPromotionViaPromotionCodeResponses[keyof DeleteAPromotionViaPromotionCodeResponses];
|
|
3704
|
-
type AddTaxItemToCartData = {
|
|
3705
|
-
body: CartItemTaxesEntityResponse;
|
|
3706
|
-
path: {
|
|
3707
|
-
/**
|
|
3708
|
-
* The unique identifier of the cart.
|
|
3709
|
-
*/
|
|
3710
|
-
cartID: string;
|
|
3711
|
-
/**
|
|
3712
|
-
* The unique identifier of the cart item.
|
|
3713
|
-
*/
|
|
3714
|
-
cartitemID: string;
|
|
3715
|
-
};
|
|
3716
|
-
query?: never;
|
|
3717
|
-
url: "/v2/carts/{cartID}/items/{cartitemID}/taxes";
|
|
3718
|
-
};
|
|
3719
|
-
type AddTaxItemToCartErrors = {
|
|
3720
|
-
/**
|
|
3721
|
-
* Unauthorized
|
|
3722
|
-
*/
|
|
3723
|
-
422: ResponseErrorResponse;
|
|
3724
|
-
};
|
|
3725
|
-
type AddTaxItemToCartError = AddTaxItemToCartErrors[keyof AddTaxItemToCartErrors];
|
|
3726
|
-
type AddTaxItemToCartResponses = {
|
|
3727
|
-
200: CartItemTaxesEntityResponse;
|
|
3728
|
-
/**
|
|
3729
|
-
* Created
|
|
3730
|
-
*/
|
|
3731
|
-
201: CartItemTaxesEntityResponse;
|
|
3732
|
-
};
|
|
3733
|
-
type AddTaxItemToCartResponse = AddTaxItemToCartResponses[keyof AddTaxItemToCartResponses];
|
|
3734
|
-
type AddTaxItemToCartItemComponentData = {
|
|
3735
|
-
body: CartItemTaxesEntityResponse;
|
|
3736
|
-
path: {
|
|
3737
|
-
/**
|
|
3738
|
-
* The unique identifier of the cart.
|
|
3739
|
-
*/
|
|
3740
|
-
cartID: string;
|
|
3741
|
-
/**
|
|
3742
|
-
* The unique identifier of the cart item.
|
|
3743
|
-
*/
|
|
3744
|
-
cartitemID: string;
|
|
3745
|
-
/**
|
|
3746
|
-
* The unique identifier of the component product within the bundle.
|
|
3747
|
-
*/
|
|
3748
|
-
productID: string;
|
|
3749
|
-
};
|
|
3750
|
-
query?: never;
|
|
3751
|
-
url: "/v2/carts/{cartID}/items/{cartitemID}/components/{productID}/taxes";
|
|
3752
|
-
};
|
|
3753
|
-
type AddTaxItemToCartItemComponentErrors = {
|
|
3754
|
-
/**
|
|
3755
|
-
* Bad Request
|
|
3756
|
-
*/
|
|
3757
|
-
400: ResponseErrorResponse;
|
|
3758
|
-
/**
|
|
3759
|
-
* Not Found
|
|
3760
|
-
*/
|
|
3761
|
-
404: ResponseErrorResponse;
|
|
3762
|
-
/**
|
|
3763
|
-
* Unprocessable Entity
|
|
3764
|
-
*/
|
|
3765
|
-
422: ResponseErrorResponse;
|
|
3766
|
-
/**
|
|
3767
|
-
* Internal Server Error
|
|
3768
|
-
*/
|
|
3769
|
-
500: ResponseErrorResponse;
|
|
3770
|
-
};
|
|
3771
|
-
type AddTaxItemToCartItemComponentError = AddTaxItemToCartItemComponentErrors[keyof AddTaxItemToCartItemComponentErrors];
|
|
3772
|
-
type AddTaxItemToCartItemComponentResponses = {
|
|
3773
|
-
/**
|
|
3774
|
-
* Created
|
|
3775
|
-
*/
|
|
3776
|
-
201: CartItemTaxesEntityResponse;
|
|
3777
|
-
};
|
|
3778
|
-
type AddTaxItemToCartItemComponentResponse = AddTaxItemToCartItemComponentResponses[keyof AddTaxItemToCartItemComponentResponses];
|
|
3779
|
-
type DeleteTaxItemFromCartItemComponentData = {
|
|
3780
|
-
body?: never;
|
|
3781
|
-
path: {
|
|
3782
|
-
/**
|
|
3783
|
-
* The unique identifier of the cart.
|
|
3784
|
-
*/
|
|
3785
|
-
cartID: string;
|
|
3786
|
-
/**
|
|
3787
|
-
* The unique identifier of the cart item.
|
|
3788
|
-
*/
|
|
3789
|
-
cartitemID: string;
|
|
3790
|
-
/**
|
|
3791
|
-
* The unique identifier of the component product within the bundle.
|
|
3792
|
-
*/
|
|
3793
|
-
productID: string;
|
|
3794
|
-
/**
|
|
3795
|
-
* The unique identifier of the tax item on the component product.
|
|
3796
|
-
*/
|
|
3797
|
-
taxitemID: string;
|
|
3798
|
-
};
|
|
3799
|
-
query?: never;
|
|
3800
|
-
url: "/v2/carts/{cartID}/items/{cartitemID}/components/{productID}/taxes/{taxitemID}";
|
|
3801
|
-
};
|
|
3802
|
-
type DeleteTaxItemFromCartItemComponentErrors = {
|
|
3803
|
-
/**
|
|
3804
|
-
* Not Found
|
|
3805
|
-
*/
|
|
3806
|
-
404: ResponseErrorResponse;
|
|
3807
|
-
/**
|
|
3808
|
-
* Internal Server Error
|
|
3809
|
-
*/
|
|
3810
|
-
500: ResponseErrorResponse;
|
|
3811
|
-
};
|
|
3812
|
-
type DeleteTaxItemFromCartItemComponentError = DeleteTaxItemFromCartItemComponentErrors[keyof DeleteTaxItemFromCartItemComponentErrors];
|
|
3813
|
-
type DeleteTaxItemFromCartItemComponentResponses = {
|
|
3814
|
-
/**
|
|
3815
|
-
* No Content
|
|
3816
|
-
*/
|
|
3817
|
-
204: void;
|
|
3818
|
-
};
|
|
3819
|
-
type DeleteTaxItemFromCartItemComponentResponse = DeleteTaxItemFromCartItemComponentResponses[keyof DeleteTaxItemFromCartItemComponentResponses];
|
|
3820
|
-
type UpdateTaxItemFromCartItemComponentData = {
|
|
3821
|
-
body?: CartItemTaxesEntityResponse;
|
|
3822
|
-
path: {
|
|
3823
|
-
/**
|
|
3824
|
-
* The unique identifier of the cart.
|
|
3825
|
-
*/
|
|
3826
|
-
cartID: string;
|
|
3827
|
-
/**
|
|
3828
|
-
* The unique identifier of the cart item.
|
|
3829
|
-
*/
|
|
3830
|
-
cartitemID: string;
|
|
3831
|
-
/**
|
|
3832
|
-
* The unique identifier of the component product within the bundle.
|
|
3833
|
-
*/
|
|
3834
|
-
productID: string;
|
|
3835
|
-
/**
|
|
3836
|
-
* The unique identifier of the tax item on the component product.
|
|
3837
|
-
*/
|
|
3838
|
-
taxitemID: string;
|
|
3839
|
-
};
|
|
3840
|
-
query?: never;
|
|
3841
|
-
url: "/v2/carts/{cartID}/items/{cartitemID}/components/{productID}/taxes/{taxitemID}";
|
|
3842
|
-
};
|
|
3843
|
-
type UpdateTaxItemFromCartItemComponentResponses = {
|
|
3844
|
-
200: CartItemTaxesEntityResponse;
|
|
3845
|
-
};
|
|
3846
|
-
type UpdateTaxItemFromCartItemComponentResponse = UpdateTaxItemFromCartItemComponentResponses[keyof UpdateTaxItemFromCartItemComponentResponses];
|
|
3847
|
-
type BulkDeleteTaxItemsFromCartData = {
|
|
3848
|
-
body?: never;
|
|
3849
|
-
path: {
|
|
3850
|
-
/**
|
|
3851
|
-
* The unique identifier of the cart.
|
|
3852
|
-
*/
|
|
3853
|
-
cartID: string;
|
|
3854
|
-
};
|
|
3855
|
-
query?: never;
|
|
3856
|
-
url: "/v2/carts/{cartID}/taxes";
|
|
3857
|
-
};
|
|
3858
|
-
type BulkDeleteTaxItemsFromCartErrors = {
|
|
3859
|
-
/**
|
|
3860
|
-
* Not Found - No tax items exist in the cart
|
|
3861
|
-
*/
|
|
3862
|
-
404: ResponseErrorResponse;
|
|
3863
|
-
};
|
|
3864
|
-
type BulkDeleteTaxItemsFromCartError = BulkDeleteTaxItemsFromCartErrors[keyof BulkDeleteTaxItemsFromCartErrors];
|
|
3865
|
-
type BulkDeleteTaxItemsFromCartResponses = {
|
|
3866
|
-
/**
|
|
3867
|
-
* No Content
|
|
3868
|
-
*/
|
|
3869
|
-
204: void;
|
|
3870
|
-
};
|
|
3871
|
-
type BulkDeleteTaxItemsFromCartResponse = BulkDeleteTaxItemsFromCartResponses[keyof BulkDeleteTaxItemsFromCartResponses];
|
|
3872
|
-
type BulkAddTaxItemsToCartData = {
|
|
3873
|
-
body?: CartsBulkTaxes;
|
|
3874
|
-
path: {
|
|
3875
|
-
/**
|
|
3876
|
-
* The unique identifier of the cart.
|
|
3877
|
-
*/
|
|
3878
|
-
cartID: string;
|
|
3879
|
-
};
|
|
3880
|
-
query?: never;
|
|
3881
|
-
url: "/v2/carts/{cartID}/taxes";
|
|
3882
|
-
};
|
|
3883
|
-
type BulkAddTaxItemsToCartErrors = {
|
|
3884
|
-
/**
|
|
3885
|
-
* Unprocessable Entity
|
|
3886
|
-
*/
|
|
3887
|
-
422: ResponseErrorResponse;
|
|
3888
|
-
};
|
|
3889
|
-
type BulkAddTaxItemsToCartError = BulkAddTaxItemsToCartErrors[keyof BulkAddTaxItemsToCartErrors];
|
|
3890
|
-
type BulkAddTaxItemsToCartResponses = {
|
|
3891
|
-
200: CartsBulkTaxes;
|
|
3892
|
-
/**
|
|
3893
|
-
* Created
|
|
3894
|
-
*/
|
|
3895
|
-
201: CartsBulkTaxes;
|
|
3896
|
-
};
|
|
3897
|
-
type BulkAddTaxItemsToCartResponse = BulkAddTaxItemsToCartResponses[keyof BulkAddTaxItemsToCartResponses];
|
|
3898
|
-
type DeleteATaxItemData = {
|
|
3899
|
-
body?: never;
|
|
3900
|
-
path: {
|
|
3901
|
-
/**
|
|
3902
|
-
* The unique identifier of the cart.
|
|
3903
|
-
*/
|
|
3904
|
-
cartID: string;
|
|
3905
|
-
/**
|
|
3906
|
-
* The unique identifier of the cart item.
|
|
3907
|
-
*/
|
|
3908
|
-
cartitemID: string;
|
|
3909
|
-
/**
|
|
3910
|
-
* The unique identifier of the tax item.
|
|
3911
|
-
*/
|
|
3912
|
-
taxitemID: string;
|
|
3913
|
-
};
|
|
3914
|
-
query?: never;
|
|
3915
|
-
url: "/v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}";
|
|
3916
|
-
};
|
|
3917
|
-
type DeleteATaxItemResponses = {
|
|
3918
|
-
/**
|
|
3919
|
-
* No Content
|
|
3920
|
-
*/
|
|
3921
|
-
204: void;
|
|
3922
|
-
};
|
|
3923
|
-
type DeleteATaxItemResponse = DeleteATaxItemResponses[keyof DeleteATaxItemResponses];
|
|
3924
|
-
type UpdateATaxItemData = {
|
|
3925
|
-
body?: CartItemTaxesEntityResponse;
|
|
3926
|
-
path: {
|
|
3927
|
-
/**
|
|
3928
|
-
* The unique identifier of the cart.
|
|
3929
|
-
*/
|
|
3930
|
-
cartID: string;
|
|
3931
|
-
/**
|
|
3932
|
-
* The unique identifier of the cart item.
|
|
3933
|
-
*/
|
|
3934
|
-
cartitemID: string;
|
|
3935
|
-
/**
|
|
3936
|
-
* The unique identifier of the tax item.
|
|
3937
|
-
*/
|
|
3938
|
-
taxitemID: string;
|
|
3939
|
-
};
|
|
3940
|
-
query?: never;
|
|
3941
|
-
url: "/v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}";
|
|
3942
|
-
};
|
|
3943
|
-
type UpdateATaxItemResponses = {
|
|
3944
|
-
200: CartItemTaxesEntityResponse;
|
|
3945
|
-
};
|
|
3946
|
-
type UpdateATaxItemResponse = UpdateATaxItemResponses[keyof UpdateATaxItemResponses];
|
|
3947
|
-
type BulkDeleteCustomDiscountsFromCartData = {
|
|
3948
|
-
body?: never;
|
|
3949
|
-
path: {
|
|
3950
|
-
/**
|
|
3951
|
-
* Specifies the unique ID for the cart.
|
|
3952
|
-
*/
|
|
3953
|
-
cartID: string;
|
|
3954
|
-
};
|
|
3955
|
-
query?: never;
|
|
3956
|
-
url: "/v2/carts/{cartID}/custom-discounts";
|
|
3957
|
-
};
|
|
3958
|
-
type BulkDeleteCustomDiscountsFromCartResponses = {
|
|
3959
|
-
/**
|
|
3960
|
-
* No Content
|
|
3961
|
-
*/
|
|
3962
|
-
204: void;
|
|
3963
|
-
};
|
|
3964
|
-
type BulkDeleteCustomDiscountsFromCartResponse = BulkDeleteCustomDiscountsFromCartResponses[keyof BulkDeleteCustomDiscountsFromCartResponses];
|
|
3965
|
-
type BulkAddCustomDiscountsToCartData = {
|
|
3966
|
-
body?: CartsBulkCustomDiscounts;
|
|
3967
|
-
path: {
|
|
3968
|
-
/**
|
|
3969
|
-
* Specifies the system generated ID for the cart that the shopper created.
|
|
3970
|
-
*/
|
|
3971
|
-
cartID: string;
|
|
3972
|
-
};
|
|
3973
|
-
query?: never;
|
|
3974
|
-
url: "/v2/carts/{cartID}/custom-discounts";
|
|
3975
|
-
};
|
|
3976
|
-
type BulkAddCustomDiscountsToCartErrors = {
|
|
3977
|
-
/**
|
|
3978
|
-
* Could not apply custom discount
|
|
3979
|
-
*/
|
|
3980
|
-
400: ResponseErrorResponse;
|
|
3981
|
-
/**
|
|
3982
|
-
* Could not apply custom discount
|
|
3983
|
-
*/
|
|
3984
|
-
422: ResponseErrorResponse;
|
|
3985
|
-
};
|
|
3986
|
-
type BulkAddCustomDiscountsToCartError = BulkAddCustomDiscountsToCartErrors[keyof BulkAddCustomDiscountsToCartErrors];
|
|
3987
|
-
type BulkAddCustomDiscountsToCartResponses = {
|
|
3988
|
-
201: CartsBulkCustomDiscountsResponse | CartsBulkCustomDiscountsCollectionResponse;
|
|
3989
|
-
};
|
|
3990
|
-
type BulkAddCustomDiscountsToCartResponse = BulkAddCustomDiscountsToCartResponses[keyof BulkAddCustomDiscountsToCartResponses];
|
|
3991
|
-
type DeleteCustomDiscountFromCartData = {
|
|
3992
|
-
body?: never;
|
|
3993
|
-
path: {
|
|
3994
|
-
/**
|
|
3995
|
-
* Specifies the unique ID for the cart.
|
|
3996
|
-
*/
|
|
3997
|
-
cartID: string;
|
|
3998
|
-
/**
|
|
3999
|
-
* Specifies the ID for the custom discount to be deleted.
|
|
4000
|
-
*/
|
|
4001
|
-
customdiscountID: string;
|
|
4002
|
-
};
|
|
4003
|
-
query?: never;
|
|
4004
|
-
url: "/v2/carts/{cartID}/custom-discounts/{customdiscountID}";
|
|
4005
|
-
};
|
|
4006
|
-
type DeleteCustomDiscountFromCartResponses = {
|
|
4007
|
-
/**
|
|
4008
|
-
* No Content
|
|
4009
|
-
*/
|
|
4010
|
-
204: void;
|
|
4011
|
-
};
|
|
4012
|
-
type DeleteCustomDiscountFromCartResponse = DeleteCustomDiscountFromCartResponses[keyof DeleteCustomDiscountFromCartResponses];
|
|
4013
|
-
type UpdateCustomDiscountForCartData = {
|
|
4014
|
-
body?: CartsCustomDiscountsEntityRequest;
|
|
4015
|
-
path: {
|
|
4016
|
-
/**
|
|
4017
|
-
* Specifies the unique ID for the cart.
|
|
4018
|
-
*/
|
|
4019
|
-
cartID: string;
|
|
4020
|
-
/**
|
|
4021
|
-
* Specifies the ID for the custom discount to be updated.
|
|
4022
|
-
*/
|
|
4023
|
-
customdiscountID: string;
|
|
4024
|
-
};
|
|
4025
|
-
query?: never;
|
|
4026
|
-
url: "/v2/carts/{cartID}/custom-discounts/{customdiscountID}";
|
|
4027
|
-
};
|
|
4028
|
-
type UpdateCustomDiscountForCartResponses = {
|
|
4029
|
-
200: CartsCustomDiscountsEntityResponse;
|
|
4030
|
-
};
|
|
4031
|
-
type UpdateCustomDiscountForCartResponse = UpdateCustomDiscountForCartResponses[keyof UpdateCustomDiscountForCartResponses];
|
|
4032
|
-
type AddCustomDiscountToCartItemData = {
|
|
4033
|
-
body?: CartsCustomDiscountsCreateRequest;
|
|
4034
|
-
path: {
|
|
4035
|
-
/**
|
|
4036
|
-
* Specifies the ID for the cart.
|
|
4037
|
-
*/
|
|
4038
|
-
cartID: string;
|
|
4039
|
-
/**
|
|
4040
|
-
* Specifies the unique identifier for the cart item.
|
|
4041
|
-
*/
|
|
4042
|
-
cartitemID: string;
|
|
4043
|
-
};
|
|
4044
|
-
query?: never;
|
|
4045
|
-
url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts";
|
|
4046
|
-
};
|
|
4047
|
-
type AddCustomDiscountToCartItemErrors = {
|
|
4048
|
-
/**
|
|
4049
|
-
* Bad Request
|
|
4050
|
-
*/
|
|
4051
|
-
400: ResponseErrorResponse;
|
|
4052
|
-
/**
|
|
4053
|
-
* Bad Request
|
|
4054
|
-
*/
|
|
4055
|
-
422: ResponseErrorResponse;
|
|
4056
|
-
};
|
|
4057
|
-
type AddCustomDiscountToCartItemError = AddCustomDiscountToCartItemErrors[keyof AddCustomDiscountToCartItemErrors];
|
|
4058
|
-
type AddCustomDiscountToCartItemResponses = {
|
|
4059
|
-
/**
|
|
4060
|
-
* Successful request
|
|
4061
|
-
*/
|
|
4062
|
-
201: CartsCustomDiscountsCollectionResponse | CartsCustomDiscountsEntityResponse;
|
|
4063
|
-
};
|
|
4064
|
-
type AddCustomDiscountToCartItemResponse = AddCustomDiscountToCartItemResponses[keyof AddCustomDiscountToCartItemResponses];
|
|
4065
|
-
type DeleteCustomDiscountFromCartItemData = {
|
|
4066
|
-
body?: never;
|
|
4067
|
-
path: {
|
|
4068
|
-
/**
|
|
4069
|
-
* Specifies the ID for the cart.
|
|
4070
|
-
*/
|
|
4071
|
-
cartID: string;
|
|
4072
|
-
/**
|
|
4073
|
-
* Specifies the ID for the cart item.
|
|
4074
|
-
*/
|
|
4075
|
-
cartitemID: string;
|
|
4076
|
-
/**
|
|
4077
|
-
* Specifies the ID for the custom discount to be deleted.
|
|
4078
|
-
*/
|
|
4079
|
-
customdiscountID: string;
|
|
4080
|
-
};
|
|
4081
|
-
query?: never;
|
|
4082
|
-
url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}";
|
|
4083
|
-
};
|
|
4084
|
-
type DeleteCustomDiscountFromCartItemResponses = {
|
|
4085
|
-
/**
|
|
4086
|
-
* No Content
|
|
4087
|
-
*/
|
|
4088
|
-
204: void;
|
|
4089
|
-
};
|
|
4090
|
-
type DeleteCustomDiscountFromCartItemResponse = DeleteCustomDiscountFromCartItemResponses[keyof DeleteCustomDiscountFromCartItemResponses];
|
|
4091
|
-
type UpdateCustomDiscountForCartItemData = {
|
|
4092
|
-
body?: CartsCustomDiscountsEntityRequest;
|
|
4093
|
-
path: {
|
|
4094
|
-
/**
|
|
4095
|
-
* Specifies the ID for the cart.
|
|
4096
|
-
*/
|
|
4097
|
-
cartID: string;
|
|
4098
|
-
/**
|
|
4099
|
-
* Specifies the ID for the cart item.
|
|
4100
|
-
*/
|
|
4101
|
-
cartitemID: string;
|
|
4102
|
-
/**
|
|
4103
|
-
* Specifies the ID for the custom discount to be updated.
|
|
4104
|
-
*/
|
|
4105
|
-
customdiscountID: string;
|
|
4106
|
-
};
|
|
4107
|
-
query?: never;
|
|
4108
|
-
url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}";
|
|
4109
|
-
};
|
|
4110
|
-
type UpdateCustomDiscountForCartItemResponses = {
|
|
4111
|
-
200: CartsCustomDiscountsEntityResponse;
|
|
4112
|
-
};
|
|
4113
|
-
type UpdateCustomDiscountForCartItemResponse = UpdateCustomDiscountForCartItemResponses[keyof UpdateCustomDiscountForCartItemResponses];
|
|
4114
|
-
type GetShippingGroupsData = {
|
|
4115
|
-
body?: never;
|
|
4116
|
-
path: {
|
|
4117
|
-
/**
|
|
4118
|
-
* The ID of the cart
|
|
4119
|
-
*/
|
|
4120
|
-
cartID: string;
|
|
4121
|
-
};
|
|
4122
|
-
query?: never;
|
|
4123
|
-
url: "/v2/carts/{cartID}/shipping-groups";
|
|
4124
|
-
};
|
|
4125
|
-
type GetShippingGroupsErrors = {
|
|
4126
|
-
/**
|
|
4127
|
-
* Cart not found
|
|
4128
|
-
*/
|
|
4129
|
-
404: ResponseErrorResponse;
|
|
4130
|
-
};
|
|
4131
|
-
type GetShippingGroupsError = GetShippingGroupsErrors[keyof GetShippingGroupsErrors];
|
|
4132
|
-
type GetShippingGroupsResponses = {
|
|
4133
|
-
/**
|
|
4134
|
-
* A list of shipping groups
|
|
4135
|
-
*/
|
|
4136
|
-
200: {
|
|
4137
|
-
data?: Array<ShippingGroupResponse>;
|
|
4138
|
-
};
|
|
4139
|
-
};
|
|
4140
|
-
type GetShippingGroupsResponse = GetShippingGroupsResponses[keyof GetShippingGroupsResponses];
|
|
4141
|
-
type CreateShippingGroupData = {
|
|
4142
|
-
body: CreateShippingGroupRequest;
|
|
4143
|
-
path: {
|
|
4144
|
-
/**
|
|
4145
|
-
* The ID of the cart
|
|
4146
|
-
*/
|
|
4147
|
-
cartID: string;
|
|
4148
|
-
};
|
|
4149
|
-
query?: never;
|
|
4150
|
-
url: "/v2/carts/{cartID}/shipping-groups";
|
|
4151
|
-
};
|
|
4152
|
-
type CreateShippingGroupErrors = {
|
|
4153
|
-
/**
|
|
4154
|
-
* Invalid request
|
|
4155
|
-
*/
|
|
4156
|
-
400: ResponseErrorResponse;
|
|
4157
|
-
/**
|
|
4158
|
-
* Cart not found
|
|
4159
|
-
*/
|
|
4160
|
-
404: ResponseErrorResponse;
|
|
4161
|
-
};
|
|
4162
|
-
type CreateShippingGroupError = CreateShippingGroupErrors[keyof CreateShippingGroupErrors];
|
|
4163
|
-
type CreateShippingGroupResponses = {
|
|
4164
|
-
/**
|
|
4165
|
-
* Shipping group created successfully
|
|
4166
|
-
*/
|
|
4167
|
-
201: ShippingGroupEntityResponse;
|
|
4168
|
-
};
|
|
4169
|
-
type CreateShippingGroupResponse = CreateShippingGroupResponses[keyof CreateShippingGroupResponses];
|
|
4170
|
-
type DeleteCartShippingGroupData = {
|
|
4171
|
-
body?: never;
|
|
4172
|
-
path: {
|
|
4173
|
-
/**
|
|
4174
|
-
* The ID of the cart
|
|
4175
|
-
*/
|
|
4176
|
-
cartId: string;
|
|
4177
|
-
/**
|
|
4178
|
-
* The ID of the shipping group to delete
|
|
4179
|
-
*/
|
|
4180
|
-
shippingGroupId: string;
|
|
4181
|
-
};
|
|
4182
|
-
query?: never;
|
|
4183
|
-
url: "/v2/carts/{cartId}/shipping-groups/{shippingGroupId}";
|
|
4184
|
-
};
|
|
4185
|
-
type DeleteCartShippingGroupErrors = {
|
|
4186
|
-
/**
|
|
4187
|
-
* Cannot delete shipping group that is attached to cart items
|
|
4188
|
-
*/
|
|
4189
|
-
400: ResponseErrorResponse;
|
|
4190
|
-
/**
|
|
4191
|
-
* Cart or shipping group not found
|
|
4192
|
-
*/
|
|
4193
|
-
404: ResponseErrorResponse;
|
|
4194
|
-
};
|
|
4195
|
-
type DeleteCartShippingGroupError = DeleteCartShippingGroupErrors[keyof DeleteCartShippingGroupErrors];
|
|
4196
|
-
type DeleteCartShippingGroupResponses = {
|
|
4197
|
-
/**
|
|
4198
|
-
* Successfully deleted the shipping group
|
|
4199
|
-
*/
|
|
4200
|
-
204: void;
|
|
4201
|
-
};
|
|
4202
|
-
type DeleteCartShippingGroupResponse = DeleteCartShippingGroupResponses[keyof DeleteCartShippingGroupResponses];
|
|
4203
|
-
type GetShippingGroupByIdData = {
|
|
4204
|
-
body?: never;
|
|
4205
|
-
path: {
|
|
4206
|
-
/**
|
|
4207
|
-
* The ID of the cart
|
|
4208
|
-
*/
|
|
4209
|
-
cartId: string;
|
|
4210
|
-
/**
|
|
4211
|
-
* The ID of the shipping group
|
|
4212
|
-
*/
|
|
4213
|
-
shippingGroupId: string;
|
|
4214
|
-
};
|
|
4215
|
-
query?: never;
|
|
4216
|
-
url: "/v2/carts/{cartId}/shipping-groups/{shippingGroupId}";
|
|
4217
|
-
};
|
|
4218
|
-
type GetShippingGroupByIdErrors = {
|
|
4219
|
-
/**
|
|
4220
|
-
* Shipping group or cart not found
|
|
4221
|
-
*/
|
|
4222
|
-
404: ResponseErrorResponse;
|
|
4223
|
-
};
|
|
4224
|
-
type GetShippingGroupByIdError = GetShippingGroupByIdErrors[keyof GetShippingGroupByIdErrors];
|
|
4225
|
-
type GetShippingGroupByIdResponses = {
|
|
4226
|
-
/**
|
|
4227
|
-
* Shipping group details
|
|
4228
|
-
*/
|
|
4229
|
-
200: {
|
|
4230
|
-
data?: ShippingGroupResponse;
|
|
4231
|
-
};
|
|
4232
|
-
};
|
|
4233
|
-
type GetShippingGroupByIdResponse = GetShippingGroupByIdResponses[keyof GetShippingGroupByIdResponses];
|
|
4234
|
-
type UpdateShippingGroupData = {
|
|
4235
|
-
body: UpdateCartShippingGroupRequest;
|
|
4236
|
-
path: {
|
|
4237
|
-
/**
|
|
4238
|
-
* The ID of the cart
|
|
4239
|
-
*/
|
|
4240
|
-
cartId: string;
|
|
4241
|
-
/**
|
|
4242
|
-
* The ID of the shipping group
|
|
4243
|
-
*/
|
|
4244
|
-
shippingGroupId: string;
|
|
4245
|
-
};
|
|
4246
|
-
query?: never;
|
|
4247
|
-
url: "/v2/carts/{cartId}/shipping-groups/{shippingGroupId}";
|
|
4248
|
-
};
|
|
4249
|
-
type UpdateShippingGroupErrors = {
|
|
4250
|
-
/**
|
|
4251
|
-
* Invalid request
|
|
4252
|
-
*/
|
|
4253
|
-
400: ResponseErrorResponse;
|
|
4254
|
-
/**
|
|
4255
|
-
* Shipping group or cart not found
|
|
4256
|
-
*/
|
|
4257
|
-
404: ResponseErrorResponse;
|
|
4258
|
-
};
|
|
4259
|
-
type UpdateShippingGroupError = UpdateShippingGroupErrors[keyof UpdateShippingGroupErrors];
|
|
4260
|
-
type UpdateShippingGroupResponses = {
|
|
4261
|
-
/**
|
|
4262
|
-
* Shipping group updated successfully
|
|
4263
|
-
*/
|
|
4264
|
-
200: ShippingGroupEntityResponse;
|
|
4265
|
-
};
|
|
4266
|
-
type UpdateShippingGroupResponse = UpdateShippingGroupResponses[keyof UpdateShippingGroupResponses];
|
|
4267
|
-
type CreateCartPaymentIntentData = {
|
|
4268
|
-
body?: ElasticPathPaymentsPoweredByStripePayment;
|
|
4269
|
-
path: {
|
|
4270
|
-
/**
|
|
4271
|
-
* The universally unique identifier of the cart for which you want to create a payment intent.
|
|
4272
|
-
*/
|
|
4273
|
-
cartID: string;
|
|
4274
|
-
};
|
|
4275
|
-
query?: never;
|
|
4276
|
-
url: "/v2/carts/{cartID}/payments";
|
|
4277
|
-
};
|
|
4278
|
-
type CreateCartPaymentIntentResponses = {
|
|
4279
|
-
/**
|
|
4280
|
-
* Payment Intent created successfully.
|
|
4281
|
-
*/
|
|
4282
|
-
201: CartEntityResponse;
|
|
4283
|
-
};
|
|
4284
|
-
type CreateCartPaymentIntentResponse = CreateCartPaymentIntentResponses[keyof CreateCartPaymentIntentResponses];
|
|
4285
|
-
type UpdateCartPaymentIntentData = {
|
|
4286
|
-
body: CartPaymentUpdate;
|
|
4287
|
-
path: {
|
|
4288
|
-
/**
|
|
4289
|
-
* The unique identifier of the cart.
|
|
4290
|
-
*/
|
|
4291
|
-
cartID: string;
|
|
4292
|
-
/**
|
|
4293
|
-
* The unique identifier of the payment intent.
|
|
4294
|
-
*/
|
|
4295
|
-
paymentIntentID: string;
|
|
4296
|
-
};
|
|
4297
|
-
query?: never;
|
|
4298
|
-
url: "/v2/carts/{cartID}/payments/{paymentIntentID}";
|
|
4299
|
-
};
|
|
4300
|
-
type UpdateCartPaymentIntentResponses = {
|
|
4301
|
-
/**
|
|
4302
|
-
* Payment updated successfully
|
|
4303
|
-
*/
|
|
4304
|
-
200: CartEntityResponse;
|
|
4305
|
-
};
|
|
4306
|
-
type UpdateCartPaymentIntentResponse = UpdateCartPaymentIntentResponses[keyof UpdateCartPaymentIntentResponses];
|
|
4307
|
-
type CheckoutApiData = {
|
|
4308
|
-
body?: CustomerCheckout | AccountCheckout;
|
|
4309
|
-
headers?: {
|
|
4310
|
-
/**
|
|
4311
|
-
* An account management authentication token that identifies the authenticated account member.
|
|
4312
|
-
*/
|
|
4313
|
-
"EP-Account-Management-Authentication-Token"?: string;
|
|
4314
|
-
};
|
|
4315
|
-
path: {
|
|
4316
|
-
/**
|
|
4317
|
-
* The ID of the cart that you want to checkout.
|
|
4318
|
-
*/
|
|
4319
|
-
cartID: string;
|
|
4320
|
-
};
|
|
4321
|
-
query?: never;
|
|
4322
|
-
url: "/v2/carts/{cartID}/checkout";
|
|
4323
|
-
};
|
|
4324
|
-
type CheckoutApiErrors = {
|
|
4325
|
-
/**
|
|
4326
|
-
* Bad Request
|
|
4327
|
-
*/
|
|
4328
|
-
400: ResponseErrorResponse;
|
|
4329
|
-
/**
|
|
4330
|
-
* Internal Server Error
|
|
4331
|
-
*/
|
|
4332
|
-
500: ResponseErrorResponse;
|
|
4333
|
-
};
|
|
4334
|
-
type CheckoutApiError = CheckoutApiErrors[keyof CheckoutApiErrors];
|
|
4335
|
-
type CheckoutApiResponses = {
|
|
4336
|
-
/**
|
|
4337
|
-
* OK
|
|
4338
|
-
*/
|
|
4339
|
-
201: OrderEntityResponse;
|
|
4340
|
-
};
|
|
4341
|
-
type CheckoutApiResponse = CheckoutApiResponses[keyof CheckoutApiResponses];
|
|
4342
|
-
type GetCustomerOrdersData = {
|
|
4343
|
-
body?: never;
|
|
4344
|
-
headers?: {
|
|
4345
|
-
/**
|
|
4346
|
-
* A customer token to access a specific customer's orders.
|
|
4347
|
-
*/
|
|
4348
|
-
"x-moltin-customer-token"?: string;
|
|
4349
|
-
};
|
|
4350
|
-
path?: never;
|
|
4351
|
-
query?: {
|
|
4352
|
-
/**
|
|
4353
|
-
* Comma-delimited string of entities to include (items, tax_items, custom_discounts, promotions).
|
|
4354
|
-
*/
|
|
4355
|
-
include?: string;
|
|
4356
|
-
/**
|
|
4357
|
-
* The maximum number of records per page.
|
|
4358
|
-
*/
|
|
4359
|
-
"page[limit]"?: number;
|
|
4360
|
-
/**
|
|
4361
|
-
* The number of records to offset the results by.
|
|
4362
|
-
*/
|
|
4363
|
-
"page[offset]"?: number;
|
|
4364
|
-
/**
|
|
4365
|
-
* Filter expression for searching orders. See filtering documentation for available operators and attributes.
|
|
4366
|
-
*/
|
|
4367
|
-
filter?: string;
|
|
4368
|
-
};
|
|
4369
|
-
url: "/v2/orders";
|
|
4370
|
-
};
|
|
4371
|
-
type GetCustomerOrdersResponses = {
|
|
4372
|
-
200: OrderCollectionResponse;
|
|
4373
|
-
};
|
|
4374
|
-
type GetCustomerOrdersResponse = GetCustomerOrdersResponses[keyof GetCustomerOrdersResponses];
|
|
4375
|
-
type GetAnOrderData = {
|
|
4376
|
-
body?: never;
|
|
4377
|
-
path: {
|
|
4378
|
-
/**
|
|
4379
|
-
* The ID of the order.
|
|
4380
|
-
*/
|
|
4381
|
-
orderID: string;
|
|
4382
|
-
};
|
|
4383
|
-
query?: {
|
|
4384
|
-
/**
|
|
4385
|
-
* Comma-delimited string of entities to include (items, tax_items, custom_discounts, promotions).
|
|
4386
|
-
*/
|
|
4387
|
-
include?: string;
|
|
4388
|
-
};
|
|
4389
|
-
url: "/v2/orders/{orderID}";
|
|
4390
|
-
};
|
|
4391
|
-
type GetAnOrderErrors = {
|
|
4392
|
-
/**
|
|
4393
|
-
* Not Found
|
|
4394
|
-
*/
|
|
4395
|
-
404: ResponseErrorResponse;
|
|
4396
|
-
};
|
|
4397
|
-
type GetAnOrderError = GetAnOrderErrors[keyof GetAnOrderErrors];
|
|
4398
|
-
type GetAnOrderResponses = {
|
|
4399
|
-
/**
|
|
4400
|
-
* OK
|
|
4401
|
-
*/
|
|
4402
|
-
200: OrderEntityResponse;
|
|
4403
|
-
};
|
|
4404
|
-
type GetAnOrderResponse = GetAnOrderResponses[keyof GetAnOrderResponses];
|
|
4405
|
-
type UpdateAnOrderData = {
|
|
4406
|
-
body?: OrdersUpdateRequest;
|
|
4407
|
-
path: {
|
|
4408
|
-
/**
|
|
4409
|
-
* The unique identifier of the order.
|
|
4410
|
-
*/
|
|
4411
|
-
orderID: string;
|
|
4412
|
-
};
|
|
4413
|
-
query?: never;
|
|
4414
|
-
url: "/v2/orders/{orderID}";
|
|
4415
|
-
};
|
|
4416
|
-
type UpdateAnOrderErrors = {
|
|
4417
|
-
/**
|
|
4418
|
-
* Bad Request
|
|
4419
|
-
*/
|
|
4420
|
-
400: ResponseErrorResponse;
|
|
4421
|
-
/**
|
|
4422
|
-
* Unprocessable Entity
|
|
4423
|
-
*/
|
|
4424
|
-
422: ResponseErrorResponse;
|
|
4425
|
-
};
|
|
4426
|
-
type UpdateAnOrderError = UpdateAnOrderErrors[keyof UpdateAnOrderErrors];
|
|
4427
|
-
type UpdateAnOrderResponses = {
|
|
4428
|
-
/**
|
|
4429
|
-
* OK
|
|
4430
|
-
*/
|
|
4431
|
-
200: OrderEntityResponse;
|
|
4432
|
-
};
|
|
4433
|
-
type UpdateAnOrderResponse = UpdateAnOrderResponses[keyof UpdateAnOrderResponses];
|
|
4434
|
-
type GetOrderItemsData = {
|
|
4435
|
-
body?: never;
|
|
4436
|
-
path: {
|
|
4437
|
-
/**
|
|
4438
|
-
* The ID of the order.
|
|
4439
|
-
*/
|
|
4440
|
-
orderID: string;
|
|
4441
|
-
};
|
|
4442
|
-
query?: {
|
|
4443
|
-
/**
|
|
4444
|
-
* Comma-delimited string of entities to include (tax_items, custom_discounts, promotions).
|
|
4445
|
-
*/
|
|
4446
|
-
include?: string;
|
|
4447
|
-
};
|
|
4448
|
-
url: "/v2/orders/{orderID}/items";
|
|
4449
|
-
};
|
|
4450
|
-
type GetOrderItemsResponses = {
|
|
4451
|
-
200: OrderItemCollectionResponse;
|
|
4452
|
-
};
|
|
4453
|
-
type GetOrderItemsResponse = GetOrderItemsResponses[keyof GetOrderItemsResponses];
|
|
4454
|
-
type AnonymizeOrdersData = {
|
|
4455
|
-
body?: OrdersAnonymizeRequest & unknown;
|
|
4456
|
-
path?: never;
|
|
4457
|
-
query?: never;
|
|
4458
|
-
url: "/v2/orders/anonymize";
|
|
4459
|
-
};
|
|
4460
|
-
type AnonymizeOrdersErrors = {
|
|
4461
|
-
/**
|
|
4462
|
-
* Unprocessable Entity
|
|
4463
|
-
*/
|
|
4464
|
-
422: ResponseErrorResponse;
|
|
4465
|
-
};
|
|
4466
|
-
type AnonymizeOrdersError = AnonymizeOrdersErrors[keyof AnonymizeOrdersErrors];
|
|
4467
|
-
type AnonymizeOrdersResponses = {
|
|
4468
|
-
/**
|
|
4469
|
-
* OK
|
|
4470
|
-
*/
|
|
4471
|
-
200: OrdersListResponse;
|
|
4472
|
-
};
|
|
4473
|
-
type AnonymizeOrdersResponse = AnonymizeOrdersResponses[keyof AnonymizeOrdersResponses];
|
|
4474
|
-
type ConfirmOrderData = {
|
|
4475
|
-
body?: never;
|
|
4476
|
-
path: {
|
|
4477
|
-
/**
|
|
4478
|
-
* The unique identifier of the order to confirm.
|
|
4479
|
-
*/
|
|
4480
|
-
orderID: string;
|
|
4481
|
-
};
|
|
4482
|
-
query?: never;
|
|
4483
|
-
url: "/v2/orders/{orderID}/confirm";
|
|
4484
|
-
};
|
|
4485
|
-
type ConfirmOrderErrors = {
|
|
4486
|
-
/**
|
|
4487
|
-
* Bad Request
|
|
4488
|
-
*/
|
|
4489
|
-
400: ResponseErrorResponse;
|
|
4490
|
-
/**
|
|
4491
|
-
* Not Found
|
|
4492
|
-
*/
|
|
4493
|
-
404: ResponseErrorResponse;
|
|
4494
|
-
/**
|
|
4495
|
-
* Unprocessable Entity
|
|
4496
|
-
*/
|
|
4497
|
-
422: ResponseErrorResponse;
|
|
4498
|
-
};
|
|
4499
|
-
type ConfirmOrderError = ConfirmOrderErrors[keyof ConfirmOrderErrors];
|
|
4500
|
-
type ConfirmOrderResponses = {
|
|
4501
|
-
/**
|
|
4502
|
-
* Order confirmed successfully
|
|
4503
|
-
*/
|
|
4504
|
-
200: TransactionEntityResponse;
|
|
4505
|
-
};
|
|
4506
|
-
type ConfirmOrderResponse = ConfirmOrderResponses[keyof ConfirmOrderResponses];
|
|
4507
|
-
type PaymentSetupData = {
|
|
4508
|
-
body?: PaymentsRequest;
|
|
4509
|
-
path: {
|
|
4510
|
-
/**
|
|
4511
|
-
* The Universally Unique Identifier (UUID) of the order you want to pay for.
|
|
4512
|
-
*/
|
|
4513
|
-
orderID: string;
|
|
4514
|
-
};
|
|
4515
|
-
query?: never;
|
|
4516
|
-
url: "/v2/orders/{orderID}/payments";
|
|
4517
|
-
};
|
|
4518
|
-
type PaymentSetupErrors = {
|
|
4519
|
-
/**
|
|
4520
|
-
* Bad Request
|
|
4521
|
-
*/
|
|
4522
|
-
400: ResponseErrorResponse;
|
|
4523
|
-
/**
|
|
4524
|
-
* Conflict
|
|
4525
|
-
*/
|
|
4526
|
-
409: ResponseErrorResponse;
|
|
4527
|
-
/**
|
|
4528
|
-
* Unprocessable Entity
|
|
4529
|
-
*/
|
|
4530
|
-
422: ResponseErrorResponse;
|
|
4531
|
-
};
|
|
4532
|
-
type PaymentSetupError = PaymentSetupErrors[keyof PaymentSetupErrors];
|
|
4533
|
-
type PaymentSetupResponses = {
|
|
4534
|
-
/**
|
|
4535
|
-
* OK
|
|
4536
|
-
*/
|
|
4537
|
-
200: TransactionEntityResponse;
|
|
4538
|
-
};
|
|
4539
|
-
type PaymentSetupResponse = PaymentSetupResponses[keyof PaymentSetupResponses];
|
|
4540
|
-
type ConfirmPaymentData = {
|
|
4541
|
-
body?: OrdersTransactionsConfirmRequest;
|
|
4542
|
-
path: {
|
|
4543
|
-
/**
|
|
4544
|
-
* The unique identifier of the order.
|
|
4545
|
-
*/
|
|
4546
|
-
orderID: string;
|
|
4547
|
-
/**
|
|
4548
|
-
* The unique identifier of the transaction.
|
|
4549
|
-
*/
|
|
4550
|
-
transactionID: string;
|
|
4551
|
-
};
|
|
4552
|
-
query?: never;
|
|
4553
|
-
url: "/v2/orders/{orderID}/transactions/{transactionID}/confirm";
|
|
4554
|
-
};
|
|
4555
|
-
type ConfirmPaymentErrors = {
|
|
4556
|
-
/**
|
|
4557
|
-
* Bad Request
|
|
4558
|
-
*/
|
|
4559
|
-
400: ResponseErrorResponse;
|
|
4560
|
-
};
|
|
4561
|
-
type ConfirmPaymentError = ConfirmPaymentErrors[keyof ConfirmPaymentErrors];
|
|
4562
|
-
type ConfirmPaymentResponses = {
|
|
4563
|
-
200: TransactionEntityResponse;
|
|
4564
|
-
};
|
|
4565
|
-
type ConfirmPaymentResponse = ConfirmPaymentResponses[keyof ConfirmPaymentResponses];
|
|
4566
|
-
type CaptureATransactionData = {
|
|
4567
|
-
body?: OrdersTransactionsCaptureRequest;
|
|
4568
|
-
path: {
|
|
4569
|
-
/**
|
|
4570
|
-
* The UUID of the order.
|
|
4571
|
-
*/
|
|
4572
|
-
orderID: string;
|
|
4573
|
-
/**
|
|
4574
|
-
* The UUID of the transaction to capture.
|
|
4575
|
-
*/
|
|
4576
|
-
transactionID: string;
|
|
4577
|
-
};
|
|
4578
|
-
query?: never;
|
|
4579
|
-
url: "/v2/orders/{orderID}/transactions/{transactionID}/capture";
|
|
4580
|
-
};
|
|
4581
|
-
type CaptureATransactionErrors = {
|
|
4582
|
-
/**
|
|
4583
|
-
* Bad Request
|
|
4584
|
-
*/
|
|
4585
|
-
400: ResponseErrorResponse;
|
|
4586
|
-
};
|
|
4587
|
-
type CaptureATransactionError = CaptureATransactionErrors[keyof CaptureATransactionErrors];
|
|
4588
|
-
type CaptureATransactionResponses = {
|
|
4589
|
-
200: TransactionEntityResponse;
|
|
4590
|
-
};
|
|
4591
|
-
type CaptureATransactionResponse = CaptureATransactionResponses[keyof CaptureATransactionResponses];
|
|
4592
|
-
type RefundATransactionData = {
|
|
4593
|
-
body?: OrdersTransactionsRefundRequest;
|
|
4594
|
-
path: {
|
|
4595
|
-
/**
|
|
4596
|
-
* The UUID of the order.
|
|
4597
|
-
*/
|
|
4598
|
-
orderID: string;
|
|
4599
|
-
/**
|
|
4600
|
-
* The UUID of the transaction you want to refund.
|
|
4601
|
-
*/
|
|
4602
|
-
transactionID: string;
|
|
4603
|
-
};
|
|
4604
|
-
query?: never;
|
|
4605
|
-
url: "/v2/orders/{orderID}/transactions/{transactionID}/refund";
|
|
4606
|
-
};
|
|
4607
|
-
type RefundATransactionErrors = {
|
|
4608
|
-
/**
|
|
4609
|
-
* Bad Request
|
|
4610
|
-
*/
|
|
4611
|
-
400: ResponseErrorResponse;
|
|
4612
|
-
/**
|
|
4613
|
-
* Unprocessable Entity
|
|
4614
|
-
*/
|
|
4615
|
-
422: ResponseErrorResponse;
|
|
4616
|
-
};
|
|
4617
|
-
type RefundATransactionError = RefundATransactionErrors[keyof RefundATransactionErrors];
|
|
4618
|
-
type RefundATransactionResponses = {
|
|
4619
|
-
200: TransactionEntityResponse;
|
|
4620
|
-
};
|
|
4621
|
-
type RefundATransactionResponse = RefundATransactionResponses[keyof RefundATransactionResponses];
|
|
4622
|
-
type GetOrderTransactionsData = {
|
|
4623
|
-
body?: never;
|
|
4624
|
-
path: {
|
|
4625
|
-
/**
|
|
4626
|
-
* The unique identifier of the order.
|
|
4627
|
-
*/
|
|
4628
|
-
orderID: string;
|
|
4629
|
-
};
|
|
4630
|
-
query?: never;
|
|
4631
|
-
url: "/v2/orders/{orderID}/transactions";
|
|
4632
|
-
};
|
|
4633
|
-
type GetOrderTransactionsErrors = {
|
|
4634
|
-
/**
|
|
4635
|
-
* Bad Request
|
|
4636
|
-
*/
|
|
4637
|
-
400: ResponseErrorResponse;
|
|
4638
|
-
};
|
|
4639
|
-
type GetOrderTransactionsError = GetOrderTransactionsErrors[keyof GetOrderTransactionsErrors];
|
|
4640
|
-
type GetOrderTransactionsResponses = {
|
|
4641
|
-
200: TransactionListResponse;
|
|
4642
|
-
};
|
|
4643
|
-
type GetOrderTransactionsResponse = GetOrderTransactionsResponses[keyof GetOrderTransactionsResponses];
|
|
4644
|
-
type GetATransactionData = {
|
|
4645
|
-
body?: never;
|
|
4646
|
-
path: {
|
|
4647
|
-
/**
|
|
4648
|
-
* The unique identifier of the order that you require transactions for.
|
|
4649
|
-
*/
|
|
4650
|
-
orderID: string;
|
|
4651
|
-
/**
|
|
4652
|
-
* The unique identifier of the transaction.
|
|
4653
|
-
*/
|
|
4654
|
-
transactionID: string;
|
|
4655
|
-
};
|
|
4656
|
-
query?: never;
|
|
4657
|
-
url: "/v2/orders/{orderID}/transactions/{transactionID}";
|
|
4658
|
-
};
|
|
4659
|
-
type GetATransactionResponses = {
|
|
4660
|
-
200: ResponseData & {
|
|
4661
|
-
data?: TransactionResponse;
|
|
4662
|
-
};
|
|
4663
|
-
};
|
|
4664
|
-
type GetATransactionResponse = GetATransactionResponses[keyof GetATransactionResponses];
|
|
4665
|
-
type CancelATransactionData = {
|
|
4666
|
-
body?: OrdersTransactionsCancelRequest;
|
|
4667
|
-
path: {
|
|
4668
|
-
/**
|
|
4669
|
-
* The unique identifier of the order.
|
|
4670
|
-
*/
|
|
4671
|
-
orderID: string;
|
|
4672
|
-
/**
|
|
4673
|
-
* The unique identifier of the transaction to be canceled or voided.
|
|
4674
|
-
*/
|
|
4675
|
-
transactionID: string;
|
|
4676
|
-
};
|
|
4677
|
-
query?: never;
|
|
4678
|
-
url: "/v2/orders/{orderID}/transactions/{transactionID}/cancel";
|
|
4679
|
-
};
|
|
4680
|
-
type CancelATransactionErrors = {
|
|
4681
|
-
/**
|
|
4682
|
-
* Bad Request
|
|
4683
|
-
*/
|
|
4684
|
-
400: ResponseErrorResponse;
|
|
4685
|
-
};
|
|
4686
|
-
type CancelATransactionError = CancelATransactionErrors[keyof CancelATransactionErrors];
|
|
4687
|
-
type CancelATransactionResponses = {
|
|
4688
|
-
200: TransactionEntityResponse;
|
|
4689
|
-
};
|
|
4690
|
-
type CancelATransactionResponse = CancelATransactionResponses[keyof CancelATransactionResponses];
|
|
4691
|
-
type GetOrderShippingGroupsData = {
|
|
4692
|
-
body?: never;
|
|
4693
|
-
path: {
|
|
4694
|
-
/**
|
|
4695
|
-
* The ID of the order
|
|
4696
|
-
*/
|
|
4697
|
-
orderID: string;
|
|
4698
|
-
};
|
|
4699
|
-
query?: never;
|
|
4700
|
-
url: "/v2/orders/{orderID}/shipping-groups";
|
|
4701
|
-
};
|
|
4702
|
-
type GetOrderShippingGroupsErrors = {
|
|
4703
|
-
/**
|
|
4704
|
-
* Order not found
|
|
4705
|
-
*/
|
|
4706
|
-
404: ResponseErrorResponse;
|
|
4707
|
-
};
|
|
4708
|
-
type GetOrderShippingGroupsError = GetOrderShippingGroupsErrors[keyof GetOrderShippingGroupsErrors];
|
|
4709
|
-
type GetOrderShippingGroupsResponses = {
|
|
4710
|
-
/**
|
|
4711
|
-
* A list of shipping groups
|
|
4712
|
-
*/
|
|
4713
|
-
200: {
|
|
4714
|
-
data?: Array<ShippingGroupResponse>;
|
|
4715
|
-
};
|
|
4716
|
-
};
|
|
4717
|
-
type GetOrderShippingGroupsResponse = GetOrderShippingGroupsResponses[keyof GetOrderShippingGroupsResponses];
|
|
4718
|
-
type CreateOrderShippingGroupData = {
|
|
4719
|
-
/**
|
|
4720
|
-
* Shipping group details
|
|
4721
|
-
*/
|
|
4722
|
-
body?: {
|
|
4723
|
-
data?: {
|
|
4724
|
-
type: "shipping_group";
|
|
4725
|
-
/**
|
|
4726
|
-
* The shipping type for this group
|
|
4727
|
-
*/
|
|
4728
|
-
shipping_type?: string;
|
|
4729
|
-
/**
|
|
4730
|
-
* Tracking reference for the shipment
|
|
4731
|
-
*/
|
|
4732
|
-
tracking_reference?: string;
|
|
4733
|
-
address?: {
|
|
4734
|
-
first_name?: string;
|
|
4735
|
-
last_name?: string;
|
|
4736
|
-
phone_number?: string;
|
|
4737
|
-
company_name?: string;
|
|
4738
|
-
line_1?: string;
|
|
4739
|
-
line_2?: string;
|
|
4740
|
-
city?: string;
|
|
4741
|
-
postcode?: string;
|
|
4742
|
-
county?: string;
|
|
4743
|
-
country?: string;
|
|
4744
|
-
region?: string;
|
|
4745
|
-
instructions?: string;
|
|
4746
|
-
};
|
|
4747
|
-
delivery_estimate?: {
|
|
4748
|
-
start?: string;
|
|
4749
|
-
end?: string;
|
|
4750
|
-
};
|
|
4751
|
-
};
|
|
4752
|
-
};
|
|
4753
|
-
path: {
|
|
4754
|
-
/**
|
|
4755
|
-
* The ID of the order
|
|
4756
|
-
*/
|
|
4757
|
-
orderID: string;
|
|
4758
|
-
};
|
|
4759
|
-
query?: never;
|
|
4760
|
-
url: "/v2/orders/{orderID}/shipping-groups";
|
|
4761
|
-
};
|
|
4762
|
-
type CreateOrderShippingGroupErrors = {
|
|
4763
|
-
/**
|
|
4764
|
-
* Bad Request
|
|
4765
|
-
*/
|
|
4766
|
-
400: ResponseErrorResponse;
|
|
4767
|
-
/**
|
|
4768
|
-
* Order not found
|
|
4769
|
-
*/
|
|
4770
|
-
404: ResponseErrorResponse;
|
|
4771
|
-
/**
|
|
4772
|
-
* Unprocessable Entity
|
|
4773
|
-
*/
|
|
4774
|
-
422: ResponseErrorResponse;
|
|
4775
|
-
};
|
|
4776
|
-
type CreateOrderShippingGroupError = CreateOrderShippingGroupErrors[keyof CreateOrderShippingGroupErrors];
|
|
4777
|
-
type CreateOrderShippingGroupResponses = {
|
|
4778
|
-
/**
|
|
4779
|
-
* Shipping group created
|
|
4780
|
-
*/
|
|
4781
|
-
201: {
|
|
4782
|
-
data?: ShippingGroupResponse;
|
|
4783
|
-
};
|
|
4784
|
-
};
|
|
4785
|
-
type CreateOrderShippingGroupResponse = CreateOrderShippingGroupResponses[keyof CreateOrderShippingGroupResponses];
|
|
4786
|
-
type GetShippingGroupsByIdData = {
|
|
4787
|
-
body?: never;
|
|
4788
|
-
path: {
|
|
4789
|
-
/**
|
|
4790
|
-
* The ID of the order
|
|
4791
|
-
*/
|
|
4792
|
-
orderID: string;
|
|
4793
|
-
/**
|
|
4794
|
-
* The ID of the shipping group
|
|
4795
|
-
*/
|
|
4796
|
-
shippingGroupID: string;
|
|
4797
|
-
};
|
|
4798
|
-
query?: {
|
|
4799
|
-
/**
|
|
4800
|
-
* A comma-separated list of related resources to include in the response.
|
|
4801
|
-
*/
|
|
4802
|
-
include?: "items";
|
|
4803
|
-
};
|
|
4804
|
-
url: "/v2/orders/{orderID}/shipping-groups/{shippingGroupID}";
|
|
4805
|
-
};
|
|
4806
|
-
type GetShippingGroupsByIdErrors = {
|
|
4807
|
-
/**
|
|
4808
|
-
* Shipping group or order not found
|
|
4809
|
-
*/
|
|
4810
|
-
404: ResponseErrorResponse;
|
|
4811
|
-
};
|
|
4812
|
-
type GetShippingGroupsByIdError = GetShippingGroupsByIdErrors[keyof GetShippingGroupsByIdErrors];
|
|
4813
|
-
type GetShippingGroupsByIdResponses = {
|
|
4814
|
-
/**
|
|
4815
|
-
* Shipping group details
|
|
4816
|
-
*/
|
|
4817
|
-
200: ShippingGroupEntityResponse;
|
|
4818
|
-
};
|
|
4819
|
-
type GetShippingGroupsByIdResponse = GetShippingGroupsByIdResponses[keyof GetShippingGroupsByIdResponses];
|
|
4820
|
-
type PutShippingGroupByIdData = {
|
|
4821
|
-
body: UpdateOrderShippingGroupRequest;
|
|
4822
|
-
path: {
|
|
4823
|
-
/**
|
|
4824
|
-
* The ID of the order
|
|
4825
|
-
*/
|
|
4826
|
-
orderID: string;
|
|
4827
|
-
/**
|
|
4828
|
-
* The ID of the shipping group
|
|
4829
|
-
*/
|
|
4830
|
-
shippingGroupID: string;
|
|
4831
|
-
};
|
|
4832
|
-
query?: never;
|
|
4833
|
-
url: "/v2/orders/{orderID}/shipping-groups/{shippingGroupID}";
|
|
4834
|
-
};
|
|
4835
|
-
type PutShippingGroupByIdErrors = {
|
|
4836
|
-
/**
|
|
4837
|
-
* Invalid request
|
|
4838
|
-
*/
|
|
4839
|
-
400: ResponseErrorResponse;
|
|
4840
|
-
/**
|
|
4841
|
-
* Shipping group or order not found
|
|
4842
|
-
*/
|
|
4843
|
-
404: ResponseErrorResponse;
|
|
4844
|
-
};
|
|
4845
|
-
type PutShippingGroupByIdError = PutShippingGroupByIdErrors[keyof PutShippingGroupByIdErrors];
|
|
4846
|
-
type PutShippingGroupByIdResponses = {
|
|
4847
|
-
/**
|
|
4848
|
-
* Shipping group updated successfully
|
|
4849
|
-
*/
|
|
4850
|
-
200: ShippingGroupEntityResponse;
|
|
4851
|
-
};
|
|
4852
|
-
type PutShippingGroupByIdResponse = PutShippingGroupByIdResponses[keyof PutShippingGroupByIdResponses];
|
|
4853
|
-
type GetV2SettingsCartData = {
|
|
4854
|
-
body?: never;
|
|
4855
|
-
path?: never;
|
|
4856
|
-
query?: never;
|
|
4857
|
-
url: "/v2/settings/cart";
|
|
4858
|
-
};
|
|
4859
|
-
type GetV2SettingsCartErrors = {
|
|
4860
|
-
/**
|
|
4861
|
-
* Unauthorized
|
|
4862
|
-
*/
|
|
4863
|
-
401: ResponseErrorResponse;
|
|
4864
|
-
};
|
|
4865
|
-
type GetV2SettingsCartError = GetV2SettingsCartErrors[keyof GetV2SettingsCartErrors];
|
|
4866
|
-
type GetV2SettingsCartResponses = {
|
|
4867
|
-
/**
|
|
4868
|
-
* OK
|
|
4869
|
-
*/
|
|
4870
|
-
200: SettingsCart;
|
|
4871
|
-
};
|
|
4872
|
-
type GetV2SettingsCartResponse = GetV2SettingsCartResponses[keyof GetV2SettingsCartResponses];
|
|
4873
|
-
type PutV2SettingsCartData = {
|
|
4874
|
-
body?: SettingsCart;
|
|
4875
|
-
path?: never;
|
|
4876
|
-
query?: never;
|
|
4877
|
-
url: "/v2/settings/cart";
|
|
4878
|
-
};
|
|
4879
|
-
type PutV2SettingsCartErrors = {
|
|
4880
|
-
/**
|
|
4881
|
-
* Bad Request
|
|
4882
|
-
*/
|
|
4883
|
-
400: ResponseErrorResponse;
|
|
4884
|
-
/**
|
|
4885
|
-
* Unauthorized
|
|
4886
|
-
*/
|
|
4887
|
-
401: ResponseErrorResponse;
|
|
4888
|
-
/**
|
|
4889
|
-
* Forbidden
|
|
4890
|
-
*/
|
|
4891
|
-
403: ResponseErrorResponse;
|
|
4892
|
-
};
|
|
4893
|
-
type PutV2SettingsCartError = PutV2SettingsCartErrors[keyof PutV2SettingsCartErrors];
|
|
4894
|
-
type PutV2SettingsCartResponses = {
|
|
4895
|
-
/**
|
|
4896
|
-
* OK
|
|
4897
|
-
*/
|
|
4898
|
-
200: SettingsCart;
|
|
4899
|
-
};
|
|
4900
|
-
type PutV2SettingsCartResponse = PutV2SettingsCartResponses[keyof PutV2SettingsCartResponses];
|
|
4901
|
-
type GetV2SettingsCartStoreIdData = {
|
|
4902
|
-
body?: never;
|
|
4903
|
-
path: {
|
|
4904
|
-
/**
|
|
4905
|
-
* The store ID.
|
|
4906
|
-
*/
|
|
4907
|
-
storeID: string;
|
|
4908
|
-
};
|
|
4909
|
-
query?: never;
|
|
4910
|
-
url: "/v2/settings/cart/{storeID}";
|
|
4911
|
-
};
|
|
4912
|
-
type GetV2SettingsCartStoreIdErrors = {
|
|
4913
|
-
/**
|
|
4914
|
-
* Unauthorized
|
|
4915
|
-
*/
|
|
4916
|
-
401: ResponseErrorResponse;
|
|
4917
|
-
};
|
|
4918
|
-
type GetV2SettingsCartStoreIdError = GetV2SettingsCartStoreIdErrors[keyof GetV2SettingsCartStoreIdErrors];
|
|
4919
|
-
type GetV2SettingsCartStoreIdResponses = {
|
|
4920
|
-
/**
|
|
4921
|
-
* OK
|
|
4922
|
-
*/
|
|
4923
|
-
200: SettingsCart;
|
|
4924
|
-
};
|
|
4925
|
-
type GetV2SettingsCartStoreIdResponse = GetV2SettingsCartStoreIdResponses[keyof GetV2SettingsCartStoreIdResponses];
|
|
4926
|
-
type PutV2SettingsCartStoreIdData = {
|
|
4927
|
-
body?: SettingsCart;
|
|
4928
|
-
path: {
|
|
4929
|
-
/**
|
|
4930
|
-
* The store ID.
|
|
4931
|
-
*/
|
|
4932
|
-
storeID: string;
|
|
4933
|
-
};
|
|
4934
|
-
query?: never;
|
|
4935
|
-
url: "/v2/settings/cart/{storeID}";
|
|
4936
|
-
};
|
|
4937
|
-
type PutV2SettingsCartStoreIdErrors = {
|
|
4938
|
-
/**
|
|
4939
|
-
* Bad Request
|
|
4940
|
-
*/
|
|
4941
|
-
400: ResponseErrorResponse;
|
|
4942
|
-
/**
|
|
4943
|
-
* Unauthorized
|
|
4944
|
-
*/
|
|
4945
|
-
401: ResponseErrorResponse;
|
|
4946
|
-
/**
|
|
4947
|
-
* Forbidden
|
|
4948
|
-
*/
|
|
4949
|
-
403: ResponseErrorResponse;
|
|
4950
|
-
};
|
|
4951
|
-
type PutV2SettingsCartStoreIdError = PutV2SettingsCartStoreIdErrors[keyof PutV2SettingsCartStoreIdErrors];
|
|
4952
|
-
type PutV2SettingsCartStoreIdResponses = {
|
|
4953
|
-
/**
|
|
4954
|
-
* OK
|
|
4955
|
-
*/
|
|
4956
|
-
200: SettingsCart;
|
|
4957
|
-
};
|
|
4958
|
-
type PutV2SettingsCartStoreIdResponse = PutV2SettingsCartStoreIdResponses[keyof PutV2SettingsCartStoreIdResponses];
|
|
4959
|
-
|
|
4960
|
-
export type { AccountCheckout, AddAllOrNothingOptionsObject, AddCustomDiscountToCartItemData, AddCustomDiscountToCartItemError, AddCustomDiscountToCartItemErrors, AddCustomDiscountToCartItemResponse, AddCustomDiscountToCartItemResponses, AddTaxItemToCartData, AddTaxItemToCartError, AddTaxItemToCartErrors, AddTaxItemToCartItemComponentData, AddTaxItemToCartItemComponentError, AddTaxItemToCartItemComponentErrors, AddTaxItemToCartItemComponentResponse, AddTaxItemToCartItemComponentResponses, AddTaxItemToCartResponse, AddTaxItemToCartResponses, AddressCommon, AddressWithCounty, AddressWithRegion, AnonymizeOrdersData, AnonymizeOrdersError, AnonymizeOrdersErrors, AnonymizeOrdersResponse, AnonymizeOrdersResponses, BaseCartResponse, BaseItemObjectData, BillingAddress, BulkAddCustomDiscountsToCartData, BulkAddCustomDiscountsToCartError, BulkAddCustomDiscountsToCartErrors, BulkAddCustomDiscountsToCartResponse, BulkAddCustomDiscountsToCartResponses, BulkAddItemsRequest, BulkAddTaxItemsToCartData, BulkAddTaxItemsToCartError, BulkAddTaxItemsToCartErrors, BulkAddTaxItemsToCartResponse, BulkAddTaxItemsToCartResponses, BulkDeleteCustomDiscountsFromCartData, BulkDeleteCustomDiscountsFromCartResponse, BulkDeleteCustomDiscountsFromCartResponses, BulkDeleteTaxItemsFromCartData, BulkDeleteTaxItemsFromCartError, BulkDeleteTaxItemsFromCartErrors, BulkDeleteTaxItemsFromCartResponse, BulkDeleteTaxItemsFromCartResponses, BulkUpdateCartsItems, BulkUpdateCartsItemsCommon, BulkUpdateCartsItemsWithCustomInputs, BulkUpdateCartsItemsWithQuantity, BulkUpdateCartsItemsWithShippingGroup, BulkUpdateItemsInCartData, BulkUpdateItemsInCartError, BulkUpdateItemsInCartErrors, BulkUpdateItemsInCartResponse, BulkUpdateItemsInCartResponses, CancelATransactionData, CancelATransactionError, CancelATransactionErrors, CancelATransactionResponse, CancelATransactionResponses, CaptureATransactionData, CaptureATransactionError, CaptureATransactionErrors, CaptureATransactionResponse, CaptureATransactionResponses, CartCollectionResponse, CartContact, CartEntityResponse, CartItemBulkCustomDiscountObject, CartItemCollectionResponse, CartItemFormattedPriceData, CartItemObject, CartItemObjectData, CartItemObjectRequest, CartItemRelationship, CartItemResponse, CartItemTaxesEntityResponse, CartItemsResponse, CartMergeObject, CartMergeObjectRequest, CartPaymentUpdate, CartResponse, CartTimestamps, CartsBulkCustomDiscounts, CartsBulkCustomDiscountsCollectionResponse, CartsBulkCustomDiscountsResponse, CartsBulkTaxes, CartsCustomDiscountsCollectionResponse, CartsCustomDiscountsCreateRequest, CartsCustomDiscountsEntityRequest, CartsCustomDiscountsEntityResponse, CartsCustomDiscountsObject, CartsCustomDiscountsResponseObject, CartsCustomDiscountsUpdateObject, CartsItemsTaxesCommon, CartsItemsTaxesObject, CartsItemsTaxesWithAmount, CartsItemsTaxesWithRate, CartsRelationshipsAccountsData, CartsRelationshipsCustomersData, CartsRequest, CartsResponse, CheckoutApiData, CheckoutApiError, CheckoutApiErrors, CheckoutApiResponse, CheckoutApiResponses, ClientOptions, CondensedPromotionResponse, ConfirmOrderData, ConfirmOrderError, ConfirmOrderErrors, ConfirmOrderResponse, ConfirmOrderResponses, ConfirmPaymentData, ConfirmPaymentError, ConfirmPaymentErrors, ConfirmPaymentResponse, ConfirmPaymentResponses, Contact, CreateACartData, CreateACartError, CreateACartErrors, CreateACartResponse, CreateACartResponses, CreateAccountCartAssociationData, CreateAccountCartAssociationError, CreateAccountCartAssociationErrors, CreateAccountCartAssociationResponse, CreateAccountCartAssociationResponses, CreateCartPaymentIntentData, CreateCartPaymentIntentResponse, CreateCartPaymentIntentResponses, CreateCustomerCartAssociationData, CreateCustomerCartAssociationError, CreateCustomerCartAssociationErrors, CreateCustomerCartAssociationResponse, CreateCustomerCartAssociationResponses, CreateOrderShippingGroupData, CreateOrderShippingGroupError, CreateOrderShippingGroupErrors, CreateOrderShippingGroupResponse, CreateOrderShippingGroupResponses, CreateShippingGroupData, CreateShippingGroupError, CreateShippingGroupErrors, CreateShippingGroupRequest, CreateShippingGroupResponse, CreateShippingGroupResponses, CustomAttributes, CustomDiscountRelationshipsCartItemRequest, CustomDiscountResponse, CustomItemObject, CustomItemObjectData, Customer, CustomerCheckout, DataAdyenPayment, DataAuthorizeNetPayment, DataBasePayments, DataBraintreePayment, DataCardConnectPayment, DataCyberSourcePayment, DataManualPayment, DataPayPalExpressCheckoutPayment, DataPaymentObject, DataStripeConnectPayment, DataStripePayment, DataStripePaymentIntentsPayment, DeleteACartData, DeleteACartError, DeleteACartErrors, DeleteACartItemData, DeleteACartItemResponse, DeleteACartItemResponses, DeleteACartResponse, DeleteACartResponses, DeleteAPromotionViaPromotionCodeData, DeleteAPromotionViaPromotionCodeResponse, DeleteAPromotionViaPromotionCodeResponses, DeleteATaxItemData, DeleteATaxItemResponse, DeleteATaxItemResponses, DeleteAccountCartAssociationData, DeleteAccountCartAssociationError, DeleteAccountCartAssociationErrors, DeleteAccountCartAssociationResponse, DeleteAccountCartAssociationResponses, DeleteAllCartItemsData, DeleteAllCartItemsError, DeleteAllCartItemsErrors, DeleteAllCartItemsResponse, DeleteAllCartItemsResponses, DeleteCartShippingGroupData, DeleteCartShippingGroupError, DeleteCartShippingGroupErrors, DeleteCartShippingGroupResponse, DeleteCartShippingGroupResponses, DeleteCustomDiscountFromCartData, DeleteCustomDiscountFromCartItemData, DeleteCustomDiscountFromCartItemResponse, DeleteCustomDiscountFromCartItemResponses, DeleteCustomDiscountFromCartResponse, DeleteCustomDiscountFromCartResponses, DeleteCustomerCartAssociationData, DeleteCustomerCartAssociationError, DeleteCustomerCartAssociationErrors, DeleteCustomerCartAssociationResponse, DeleteCustomerCartAssociationResponses, DeleteTaxItemFromCartItemComponentData, DeleteTaxItemFromCartItemComponentError, DeleteTaxItemFromCartItemComponentErrors, DeleteTaxItemFromCartItemComponentResponse, DeleteTaxItemFromCartItemComponentResponses, DeliveryEstimate, Discount, DiscountData, DiscountFormattedPriceData, DiscountSettings, Discounts, ElasticPathPaymentsPoweredByStripePayment, FailureDetails, FormattedPriceData, GetACartData, GetACartError, GetACartErrors, GetACartResponse, GetACartResponses, GetATransactionData, GetATransactionResponse, GetATransactionResponses, GetAnOrderData, GetAnOrderError, GetAnOrderErrors, GetAnOrderResponse, GetAnOrderResponses, GetCartItemsData, GetCartItemsResponse, GetCartItemsResponses, GetCartsData, GetCartsError, GetCartsErrors, GetCartsResponse, GetCartsResponses, GetCustomerOrdersData, GetCustomerOrdersResponse, GetCustomerOrdersResponses, GetOrderItemsData, GetOrderItemsResponse, GetOrderItemsResponses, GetOrderShippingGroupsData, GetOrderShippingGroupsError, GetOrderShippingGroupsErrors, GetOrderShippingGroupsResponse, GetOrderShippingGroupsResponses, GetOrderTransactionsData, GetOrderTransactionsError, GetOrderTransactionsErrors, GetOrderTransactionsResponse, GetOrderTransactionsResponses, GetShippingGroupByIdData, GetShippingGroupByIdError, GetShippingGroupByIdErrors, GetShippingGroupByIdResponse, GetShippingGroupByIdResponses, GetShippingGroupsByIdData, GetShippingGroupsByIdError, GetShippingGroupsByIdErrors, GetShippingGroupsByIdResponse, GetShippingGroupsByIdResponses, GetShippingGroupsData, GetShippingGroupsError, GetShippingGroupsErrors, GetShippingGroupsResponse, GetShippingGroupsResponses, GetV2SettingsCartData, GetV2SettingsCartError, GetV2SettingsCartErrors, GetV2SettingsCartResponse, GetV2SettingsCartResponses, GetV2SettingsCartStoreIdData, GetV2SettingsCartStoreIdError, GetV2SettingsCartStoreIdErrors, GetV2SettingsCartStoreIdResponse, GetV2SettingsCartStoreIdResponses, InventorySettings, ItemPriceData, ItemSettings, ManageCartsData, ManageCartsError, ManageCartsErrors, ManageCartsResponse, ManageCartsResponses, Money, NonNegativeFormattedPriceData, OrderCollectionResponse, OrderEntityResponse, OrderItemCollectionResponse, OrderItemFormattedUnitPriceData, OrderItemResponse, OrderMeta, OrderPriceData, OrderPriceWrapperMeta, OrderResponse, OrderTimestamps, OrdersAddressData, OrdersAnonymizeData, OrdersAnonymizeRequest, OrdersCancelData, OrdersFulfilledData, OrdersListResponse, OrdersTransactionsCancelRequest, OrdersTransactionsCaptureRequest, OrdersTransactionsConfirmRequest, OrdersTransactionsRefundRequest, OrdersUpdateRequest, PaymentSetupData, PaymentSetupError, PaymentSetupErrors, PaymentSetupResponse, PaymentSetupResponses, PaymentsRequest, PromotionItemObject, PromotionItemObjectData, PutShippingGroupByIdData, PutShippingGroupByIdError, PutShippingGroupByIdErrors, PutShippingGroupByIdResponse, PutShippingGroupByIdResponses, PutV2SettingsCartData, PutV2SettingsCartError, PutV2SettingsCartErrors, PutV2SettingsCartResponse, PutV2SettingsCartResponses, PutV2SettingsCartStoreIdData, PutV2SettingsCartStoreIdError, PutV2SettingsCartStoreIdErrors, PutV2SettingsCartStoreIdResponse, PutV2SettingsCartStoreIdResponses, ReOrderObject, ReOrderObjectRequest, RefundATransactionData, RefundATransactionError, RefundATransactionErrors, RefundATransactionResponse, RefundATransactionResponses, RelationshipArray, RelationshipItem, ResponseData, ResponseErrorItem, ResponseErrorResponse, ResponseMetaCarts, ResponseMetaOrders, ResponsePageLinks, ResponsePaginationPage, ResponsePaginationResults, SettingsCart, ShippingAddress, ShippingGroupEntityResponse, ShippingGroupMeta, ShippingGroupResponse, ShippingPriceRequest, ShippingPriceResponse, SingleRelationship, SubscriptionItemObject, SubscriptionItemObjectData, TaxItemResponse, Timestamps, TransactionEntityResponse, TransactionListResponse, TransactionResponse, UpdateACartData, UpdateACartError, UpdateACartErrors, UpdateACartItemData, UpdateACartItemError, UpdateACartItemErrors, UpdateACartItemResponse, UpdateACartItemResponses, UpdateACartResponse, UpdateACartResponses, UpdateATaxItemData, UpdateATaxItemResponse, UpdateATaxItemResponses, UpdateAllOrNothingOptionsObject, UpdateAnOrderData, UpdateAnOrderError, UpdateAnOrderErrors, UpdateAnOrderResponse, UpdateAnOrderResponses, UpdateCartPaymentIntentData, UpdateCartPaymentIntentResponse, UpdateCartPaymentIntentResponses, UpdateCartShippingGroupRequest, UpdateCartsItems, UpdateCustomDiscountForCartData, UpdateCustomDiscountForCartItemData, UpdateCustomDiscountForCartItemResponse, UpdateCustomDiscountForCartItemResponses, UpdateCustomDiscountForCartResponse, UpdateCustomDiscountForCartResponses, UpdateOrderShippingGroupRequest, UpdateShippingGroupData, UpdateShippingGroupError, UpdateShippingGroupErrors, UpdateShippingGroupResponse, UpdateShippingGroupResponses, UpdateTaxItemFromCartItemComponentData, UpdateTaxItemFromCartItemComponentResponse, UpdateTaxItemFromCartItemComponentResponses };
|