@epcc-sdk/sdks-cart-checkout-order 0.0.1
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/LICENSE +21 -0
- package/README.md +296 -0
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.js +3 -0
- package/dist/client/sdk.gen.d.ts +1175 -0
- package/dist/client/sdk.gen.js +1474 -0
- package/dist/client/types.gen.d.ts +2602 -0
- package/dist/client/types.gen.js +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/package.json +38 -0
|
@@ -0,0 +1,2602 @@
|
|
|
1
|
+
export type CartsRequest = {
|
|
2
|
+
/**
|
|
3
|
+
* The cart description.
|
|
4
|
+
*/
|
|
5
|
+
description?: string;
|
|
6
|
+
discount_settings?: DiscountSettings;
|
|
7
|
+
/**
|
|
8
|
+
* 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.
|
|
9
|
+
*/
|
|
10
|
+
name?: string;
|
|
11
|
+
contact?: CartContact;
|
|
12
|
+
/**
|
|
13
|
+
* 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.
|
|
14
|
+
*/
|
|
15
|
+
snapshot_date?: string;
|
|
16
|
+
custom_attributes?: CustomAttributes;
|
|
17
|
+
/**
|
|
18
|
+
* 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.
|
|
19
|
+
*/
|
|
20
|
+
payment_intent_id?: string;
|
|
21
|
+
};
|
|
22
|
+
export type CartContact = {
|
|
23
|
+
/**
|
|
24
|
+
* The email address attached to a cart.
|
|
25
|
+
*/
|
|
26
|
+
email?: string;
|
|
27
|
+
};
|
|
28
|
+
export type DiscountSettings = {
|
|
29
|
+
/**
|
|
30
|
+
* This parameter enables custom discounts for a cart. When set to true, 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/settings/put-v-2-settings-cart).
|
|
31
|
+
*/
|
|
32
|
+
custom_discounts_enabled?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* When set to true, this parameter allows the cart to use rule promotions.
|
|
35
|
+
*/
|
|
36
|
+
use_rule_promotions?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type CustomAttributes = {
|
|
39
|
+
/**
|
|
40
|
+
* Specifies the custom attributes for the cart object. The attribute can be any string, numerical, and underscore. A cart can have maximum of 20 custom attributes.
|
|
41
|
+
*/
|
|
42
|
+
custom_attributes?: {
|
|
43
|
+
/**
|
|
44
|
+
* Specifies the attribute `type` and `value`.
|
|
45
|
+
*/
|
|
46
|
+
attribute?: {
|
|
47
|
+
/**
|
|
48
|
+
* Specifies the type of the attribute such as string, integer, boolean, and float.
|
|
49
|
+
*/
|
|
50
|
+
type?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Specifies the value of the attribute.
|
|
53
|
+
*/
|
|
54
|
+
value?: string | number | boolean;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export type CartResponse = {
|
|
59
|
+
/**
|
|
60
|
+
* The unique identifier for the cart. Use SDK or create it yourself.
|
|
61
|
+
*/
|
|
62
|
+
id?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The type of object being returned.
|
|
65
|
+
*/
|
|
66
|
+
type?: string;
|
|
67
|
+
/**
|
|
68
|
+
* The name of this cart.
|
|
69
|
+
*/
|
|
70
|
+
name?: string;
|
|
71
|
+
/**
|
|
72
|
+
* A description of the cart.
|
|
73
|
+
*/
|
|
74
|
+
description?: string;
|
|
75
|
+
contact?: CartContact;
|
|
76
|
+
discount_settings?: DiscountSettings;
|
|
77
|
+
/**
|
|
78
|
+
* Stripe-assigned unique identifier for the linked Payment Intent
|
|
79
|
+
*/
|
|
80
|
+
payment_intent_id?: string;
|
|
81
|
+
links?: {
|
|
82
|
+
/**
|
|
83
|
+
* A link to that specific resource.
|
|
84
|
+
*/
|
|
85
|
+
self?: string;
|
|
86
|
+
};
|
|
87
|
+
meta?: {
|
|
88
|
+
display_price?: {
|
|
89
|
+
with_tax?: FormattedPriceData;
|
|
90
|
+
without_tax?: FormattedPriceData;
|
|
91
|
+
tax?: FormattedPriceData;
|
|
92
|
+
discount?: FormattedPriceData;
|
|
93
|
+
without_discount?: FormattedPriceData;
|
|
94
|
+
shipping?: FormattedPriceData;
|
|
95
|
+
};
|
|
96
|
+
timestamps?: Timestamps;
|
|
97
|
+
};
|
|
98
|
+
relationships?: {
|
|
99
|
+
customers?: {
|
|
100
|
+
data?: {
|
|
101
|
+
/**
|
|
102
|
+
* The type of related object.
|
|
103
|
+
*/
|
|
104
|
+
type?: string;
|
|
105
|
+
/**
|
|
106
|
+
* The ID of the customer.
|
|
107
|
+
*/
|
|
108
|
+
readonly id?: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
items?: {
|
|
112
|
+
data?: {
|
|
113
|
+
/**
|
|
114
|
+
* The type of related object.
|
|
115
|
+
*/
|
|
116
|
+
type?: string;
|
|
117
|
+
/**
|
|
118
|
+
* The unique identifier for the cart item
|
|
119
|
+
*/
|
|
120
|
+
readonly id?: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
export type CartItemsObjectRequest = CartItemObject | SubscriptionItemObject | CartMergeObjectRequest | CustomItemObject | ReOrderObjectRequest | PromotionItemObject;
|
|
126
|
+
export type CartItemsObjectResponse = CartItemResponseObject | SubscriptionItemResponseObject | CustomItemResponseObject | PromotionItemResponseObject;
|
|
127
|
+
export type CartItemResponseObject = CartItemObjectData & CartItemResponse;
|
|
128
|
+
export type SubscriptionItemResponseObject = SubscriptionItemObjectData & CartItemResponse;
|
|
129
|
+
export type CustomItemResponseObject = CustomItemObjectData & {
|
|
130
|
+
/**
|
|
131
|
+
* Specifies the ID of the custom cart item
|
|
132
|
+
*/
|
|
133
|
+
id: string;
|
|
134
|
+
description?: unknown;
|
|
135
|
+
};
|
|
136
|
+
export type PromotionItemResponseObject = PromotionItemObjectData & {
|
|
137
|
+
/**
|
|
138
|
+
* Specifies the ID of the promotion cart item
|
|
139
|
+
*/
|
|
140
|
+
id: string;
|
|
141
|
+
/**
|
|
142
|
+
* The name of the promotion item.
|
|
143
|
+
*/
|
|
144
|
+
name?: string;
|
|
145
|
+
};
|
|
146
|
+
export type CartItemObject = {
|
|
147
|
+
data?: CartItemObjectData & CartItemResponse;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* The type of object being returned.
|
|
151
|
+
*/
|
|
152
|
+
export type Type = "cart_item";
|
|
153
|
+
export type CartItemObjectData = {
|
|
154
|
+
/**
|
|
155
|
+
* The type of object being returned.
|
|
156
|
+
*/
|
|
157
|
+
type: "cart_item";
|
|
158
|
+
/**
|
|
159
|
+
* The number of items added to the cart.
|
|
160
|
+
*/
|
|
161
|
+
quantity: number;
|
|
162
|
+
/**
|
|
163
|
+
* Specifies the ID of the product you want to add to cart. (use this OR sku)
|
|
164
|
+
*/
|
|
165
|
+
id?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Specifies the item SKU that you want to add to cart. (use this OR id)
|
|
168
|
+
*/
|
|
169
|
+
sku?: string;
|
|
170
|
+
/**
|
|
171
|
+
* The custom text to be added to a product.
|
|
172
|
+
*/
|
|
173
|
+
custom_inputs?: {
|
|
174
|
+
[key: string]: unknown;
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Object used to describe the bundle options selected.
|
|
178
|
+
*/
|
|
179
|
+
bundle_configuration?: {
|
|
180
|
+
/**
|
|
181
|
+
* Specifies selected options.
|
|
182
|
+
*/
|
|
183
|
+
selected_options?: {
|
|
184
|
+
[key: string]: unknown;
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Array of component products for the selected options.
|
|
188
|
+
*/
|
|
189
|
+
component_products?: Array<unknown>;
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* Identifier for a created Cart Shipping Group
|
|
193
|
+
*/
|
|
194
|
+
shipping_group_id?: string;
|
|
195
|
+
/**
|
|
196
|
+
* The slug of a stock location.
|
|
197
|
+
*/
|
|
198
|
+
location?: string;
|
|
199
|
+
};
|
|
200
|
+
export type SubscriptionItemObject = {
|
|
201
|
+
data?: SubscriptionItemObjectData & CartItemResponse;
|
|
202
|
+
};
|
|
203
|
+
export type SubscriptionItemObjectData = {
|
|
204
|
+
/**
|
|
205
|
+
* The type of object being returned.
|
|
206
|
+
*/
|
|
207
|
+
type: "subscription_item";
|
|
208
|
+
/**
|
|
209
|
+
* The number of items added to the cart.
|
|
210
|
+
*/
|
|
211
|
+
quantity: number;
|
|
212
|
+
/**
|
|
213
|
+
* Specifies the ID of the subscription offering you want to add to cart.
|
|
214
|
+
*/
|
|
215
|
+
id: string;
|
|
216
|
+
/**
|
|
217
|
+
* Specifies how the subscription offering should be configured.
|
|
218
|
+
*/
|
|
219
|
+
subscription_configuration: {
|
|
220
|
+
/**
|
|
221
|
+
* The ID of the plan within the offering to use for the subscription.
|
|
222
|
+
*/
|
|
223
|
+
plan: string;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
export type CartMergeObjectRequest = {
|
|
227
|
+
data?: Array<CartMergeObject>;
|
|
228
|
+
options?: AddAllOrNothingOptionsObject;
|
|
229
|
+
};
|
|
230
|
+
export type CartMergeObject = {
|
|
231
|
+
/**
|
|
232
|
+
* The type of object being returned. Must be `cart_items`.
|
|
233
|
+
*/
|
|
234
|
+
type: "cart_items";
|
|
235
|
+
/**
|
|
236
|
+
* The original cart to be merged from.
|
|
237
|
+
*/
|
|
238
|
+
cart_id: string;
|
|
239
|
+
};
|
|
240
|
+
export type CustomItemObject = {
|
|
241
|
+
data?: CustomItemObjectData;
|
|
242
|
+
};
|
|
243
|
+
export type CustomItemObjectData = {
|
|
244
|
+
/**
|
|
245
|
+
* The type of object being returned. Must be `custom_item`.
|
|
246
|
+
*/
|
|
247
|
+
type: "custom_item";
|
|
248
|
+
/**
|
|
249
|
+
* The number of custom items to add to cart.
|
|
250
|
+
*/
|
|
251
|
+
quantity: number;
|
|
252
|
+
price: {
|
|
253
|
+
/**
|
|
254
|
+
* The unit price of the custom item.
|
|
255
|
+
*/
|
|
256
|
+
amount: number;
|
|
257
|
+
/**
|
|
258
|
+
* Set to`true` if relevant taxes have been included in the price, `false` if not. Defaults to `true`.
|
|
259
|
+
*/
|
|
260
|
+
includes_tax?: boolean;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* A description of the custom item.
|
|
264
|
+
*/
|
|
265
|
+
description?: string;
|
|
266
|
+
/**
|
|
267
|
+
* 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.
|
|
268
|
+
*/
|
|
269
|
+
sku?: string;
|
|
270
|
+
/**
|
|
271
|
+
* The name of the custom item.
|
|
272
|
+
*/
|
|
273
|
+
name: string;
|
|
274
|
+
/**
|
|
275
|
+
* The custom text to be added to a product.
|
|
276
|
+
*/
|
|
277
|
+
custom_inputs?: {
|
|
278
|
+
[key: string]: unknown;
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* Identifier for a created Cart Shipping Group
|
|
282
|
+
*/
|
|
283
|
+
shipping_group_id?: string;
|
|
284
|
+
};
|
|
285
|
+
export type ReOrderObjectRequest = {
|
|
286
|
+
data?: ReOrderObject;
|
|
287
|
+
options?: AddAllOrNothingOptionsObject;
|
|
288
|
+
};
|
|
289
|
+
export type ReOrderObject = {
|
|
290
|
+
/**
|
|
291
|
+
* The type of resource being returned. Use `order_items`.
|
|
292
|
+
*/
|
|
293
|
+
type: "order_items";
|
|
294
|
+
/**
|
|
295
|
+
* The unique identifier of the order.
|
|
296
|
+
*/
|
|
297
|
+
order_id: string;
|
|
298
|
+
};
|
|
299
|
+
export type BulkAddItemsRequest = {
|
|
300
|
+
data?: CartItemsObjectRequest | CartMergeObjectRequest | CustomItemObject | ReOrderObjectRequest | PromotionItemObject;
|
|
301
|
+
};
|
|
302
|
+
export type PromotionItemObject = {
|
|
303
|
+
data?: PromotionItemObjectData;
|
|
304
|
+
};
|
|
305
|
+
export type PromotionItemObjectData = {
|
|
306
|
+
/**
|
|
307
|
+
* Specifies the type of resource, which is `promotion_item`.
|
|
308
|
+
*/
|
|
309
|
+
type: "promotion_item";
|
|
310
|
+
/**
|
|
311
|
+
* Specifies the promotion code. For more information about codes[].user[], see the [Create Promotion codes](/docs/api/promotions/create-promotion-codes) section.
|
|
312
|
+
*/
|
|
313
|
+
code: string;
|
|
314
|
+
};
|
|
315
|
+
export type BulkUpdateCartsItems = {
|
|
316
|
+
data?: Array<{
|
|
317
|
+
/**
|
|
318
|
+
* Specifies the ID of the cart item that you want to update in cart.
|
|
319
|
+
*/
|
|
320
|
+
id?: string;
|
|
321
|
+
/**
|
|
322
|
+
* Specifies the amount of items to update in the cart.
|
|
323
|
+
*/
|
|
324
|
+
quantity?: number;
|
|
325
|
+
/**
|
|
326
|
+
* 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).
|
|
327
|
+
*/
|
|
328
|
+
custom_inputs?: {
|
|
329
|
+
[key: string]: unknown;
|
|
330
|
+
};
|
|
331
|
+
}>;
|
|
332
|
+
options?: UpdateAllOrNothingOptionsObject;
|
|
333
|
+
};
|
|
334
|
+
export type UpdateCartsItems = {
|
|
335
|
+
data?: {
|
|
336
|
+
/**
|
|
337
|
+
* The unique identifier of the cart item.
|
|
338
|
+
*/
|
|
339
|
+
id?: string;
|
|
340
|
+
/**
|
|
341
|
+
* The amount of products to add to cart.
|
|
342
|
+
*/
|
|
343
|
+
quantity?: number;
|
|
344
|
+
/**
|
|
345
|
+
* The custom text to be added to a product.
|
|
346
|
+
*/
|
|
347
|
+
custom_inputs?: {
|
|
348
|
+
[key: string]: unknown;
|
|
349
|
+
};
|
|
350
|
+
/**
|
|
351
|
+
* The unique identifier of the shipping group to be added to the cart.
|
|
352
|
+
*/
|
|
353
|
+
shipping_group_id?: string;
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
export type AddAllOrNothingOptionsObject = {
|
|
357
|
+
/**
|
|
358
|
+
* 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`.
|
|
359
|
+
*/
|
|
360
|
+
add_all_or_nothing?: boolean;
|
|
361
|
+
};
|
|
362
|
+
export type UpdateAllOrNothingOptionsObject = {
|
|
363
|
+
/**
|
|
364
|
+
* 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`.
|
|
365
|
+
*/
|
|
366
|
+
update_all_or_nothing?: boolean;
|
|
367
|
+
};
|
|
368
|
+
export type CartItemResponse = {
|
|
369
|
+
/**
|
|
370
|
+
* The unique ID of the product.
|
|
371
|
+
*/
|
|
372
|
+
readonly product_id?: string;
|
|
373
|
+
/**
|
|
374
|
+
* The unique ID of the subscription offering for subscription items.
|
|
375
|
+
*/
|
|
376
|
+
readonly subscription_offering_id?: string;
|
|
377
|
+
/**
|
|
378
|
+
* The name of this item
|
|
379
|
+
*/
|
|
380
|
+
readonly name?: string;
|
|
381
|
+
/**
|
|
382
|
+
* A description of the cart item.
|
|
383
|
+
*/
|
|
384
|
+
readonly description?: string;
|
|
385
|
+
/**
|
|
386
|
+
* The unique identifier of the catalog associated with the product is shown if catalog_source=pim is set.
|
|
387
|
+
*/
|
|
388
|
+
readonly catalog_id?: string;
|
|
389
|
+
/**
|
|
390
|
+
* The catalog source. Always `pim` or `legacy`.
|
|
391
|
+
*/
|
|
392
|
+
readonly catalog_source?: string;
|
|
393
|
+
readonly image?: {
|
|
394
|
+
/**
|
|
395
|
+
* The MIME type for the uploaded file.
|
|
396
|
+
*/
|
|
397
|
+
readonly mime_type?: string;
|
|
398
|
+
/**
|
|
399
|
+
* The name of the image file that was uploaded.
|
|
400
|
+
*/
|
|
401
|
+
readonly file_name?: string;
|
|
402
|
+
/**
|
|
403
|
+
* The link to the image.
|
|
404
|
+
*/
|
|
405
|
+
readonly href?: string;
|
|
406
|
+
};
|
|
407
|
+
readonly manage_stock?: boolean;
|
|
408
|
+
unit_price?: ItemPriceData;
|
|
409
|
+
value?: ItemPriceData;
|
|
410
|
+
readonly links?: {
|
|
411
|
+
/**
|
|
412
|
+
* A URL related to the resource.
|
|
413
|
+
*/
|
|
414
|
+
product?: string;
|
|
415
|
+
};
|
|
416
|
+
readonly meta?: {
|
|
417
|
+
display_price?: {
|
|
418
|
+
with_tax?: FormattedPriceData;
|
|
419
|
+
without_tax?: FormattedPriceData;
|
|
420
|
+
tax?: FormattedPriceData;
|
|
421
|
+
discount?: FormattedPriceData;
|
|
422
|
+
without_discount?: FormattedPriceData;
|
|
423
|
+
};
|
|
424
|
+
timestamps?: Timestamps;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
export type CartsResponse = {
|
|
428
|
+
data?: Array<CartItemObject>;
|
|
429
|
+
meta?: {
|
|
430
|
+
display_price?: {
|
|
431
|
+
with_tax?: FormattedPriceData;
|
|
432
|
+
without_tax?: FormattedPriceData;
|
|
433
|
+
tax?: FormattedPriceData;
|
|
434
|
+
discount?: FormattedPriceData;
|
|
435
|
+
without_discount?: FormattedPriceData;
|
|
436
|
+
discounts?: {
|
|
437
|
+
[key: string]: {
|
|
438
|
+
amount?: number;
|
|
439
|
+
currency?: string;
|
|
440
|
+
formatted?: string;
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
timestamps?: CartTimestamps;
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
export type ItemPriceData = {
|
|
448
|
+
/**
|
|
449
|
+
* The amount for this item as an integer.
|
|
450
|
+
*/
|
|
451
|
+
readonly amount?: number;
|
|
452
|
+
/**
|
|
453
|
+
* The currency this item was added to the cart as.
|
|
454
|
+
*/
|
|
455
|
+
readonly currency?: string;
|
|
456
|
+
/**
|
|
457
|
+
* Whether or not this price is tax inclusive.
|
|
458
|
+
*/
|
|
459
|
+
readonly includes_tax?: boolean;
|
|
460
|
+
};
|
|
461
|
+
export type CartsRelationshipsAccountsData = {
|
|
462
|
+
data?: Array<{
|
|
463
|
+
/**
|
|
464
|
+
* The ID of the account.
|
|
465
|
+
*/
|
|
466
|
+
id?: string;
|
|
467
|
+
/**
|
|
468
|
+
* The type of related object. Ensure that it is account.
|
|
469
|
+
*/
|
|
470
|
+
type?: string;
|
|
471
|
+
}>;
|
|
472
|
+
};
|
|
473
|
+
export type CartsRelationshipsCustomersData = {
|
|
474
|
+
data?: Array<{
|
|
475
|
+
/**
|
|
476
|
+
* The ID of the customer.
|
|
477
|
+
*/
|
|
478
|
+
id?: string;
|
|
479
|
+
/**
|
|
480
|
+
* The type of related object. Ensure that it is customer.
|
|
481
|
+
*/
|
|
482
|
+
type?: string;
|
|
483
|
+
}>;
|
|
484
|
+
};
|
|
485
|
+
export type CartsItemsTaxesObject = {
|
|
486
|
+
/**
|
|
487
|
+
* A unique tax code in this jurisdiction.
|
|
488
|
+
*/
|
|
489
|
+
code?: string;
|
|
490
|
+
/**
|
|
491
|
+
* The relevant tax jurisdiction.
|
|
492
|
+
*/
|
|
493
|
+
jurisdiction?: string;
|
|
494
|
+
/**
|
|
495
|
+
* The name of the tax item.
|
|
496
|
+
*/
|
|
497
|
+
name?: string;
|
|
498
|
+
/**
|
|
499
|
+
* The tax rate represented as a decimal (12.5% -> 0.125).
|
|
500
|
+
*/
|
|
501
|
+
rate: number;
|
|
502
|
+
/**
|
|
503
|
+
* The type of object being returned. Use `tax_item`.
|
|
504
|
+
*/
|
|
505
|
+
type: string;
|
|
506
|
+
/**
|
|
507
|
+
* The unique identifier for this tax item.
|
|
508
|
+
*/
|
|
509
|
+
readonly id?: string;
|
|
510
|
+
};
|
|
511
|
+
export type CartsBulkCustomDiscounts = {
|
|
512
|
+
data?: Array<CartsCustomDiscountsObject & CartItemBulkCustomDiscountObject>;
|
|
513
|
+
options?: AddAllOrNothingOptionsObject;
|
|
514
|
+
};
|
|
515
|
+
export type CartsBulkCustomDiscountsResponse = {
|
|
516
|
+
data?: Array<CartsCustomDiscountsResponse & ArtItemBulkCustomDiscountResponse>;
|
|
517
|
+
options?: AddAllOrNothingOptionsObject;
|
|
518
|
+
};
|
|
519
|
+
export type CartItemBulkCustomDiscountObject = CartsCustomDiscountsObject & CustomDiscountRelationshipsCartItemRequest;
|
|
520
|
+
export type ArtItemBulkCustomDiscountResponse = CartsCustomDiscountsResponse & CustomDiscountRelationshipsCartItemRequest;
|
|
521
|
+
export type CartsCustomDiscountsObject = {
|
|
522
|
+
/**
|
|
523
|
+
* Specifies an amount to be applied for the custom discount. It must be less than zero.
|
|
524
|
+
*/
|
|
525
|
+
amount: number;
|
|
526
|
+
/**
|
|
527
|
+
* Specifies a description for the custom discount.
|
|
528
|
+
*/
|
|
529
|
+
description: string;
|
|
530
|
+
/**
|
|
531
|
+
* Specifies the discount code used for the custom discount.
|
|
532
|
+
*/
|
|
533
|
+
discount_code: string;
|
|
534
|
+
/**
|
|
535
|
+
* Specifies from where the custom discount is applied. For example, Talon.one.
|
|
536
|
+
*/
|
|
537
|
+
discount_engine: string;
|
|
538
|
+
/**
|
|
539
|
+
* Specifies an external id for the custom discount.
|
|
540
|
+
*/
|
|
541
|
+
external_id: string;
|
|
542
|
+
/**
|
|
543
|
+
* Specifies the type of the resource. Always `custom_discount`.
|
|
544
|
+
*/
|
|
545
|
+
type: string;
|
|
546
|
+
};
|
|
547
|
+
export type CartsCustomDiscountsResponse = {
|
|
548
|
+
amount?: {
|
|
549
|
+
/**
|
|
550
|
+
* Specifies an amount to be applied for the custom discount. It must be less than zero.
|
|
551
|
+
*/
|
|
552
|
+
amount?: number;
|
|
553
|
+
/**
|
|
554
|
+
* The currency set for the custom discount.
|
|
555
|
+
*/
|
|
556
|
+
currency?: string;
|
|
557
|
+
/**
|
|
558
|
+
* The formatted value for the custom discount.
|
|
559
|
+
*/
|
|
560
|
+
formatted?: string;
|
|
561
|
+
};
|
|
562
|
+
/**
|
|
563
|
+
* Specifies a description for the custom discount.
|
|
564
|
+
*/
|
|
565
|
+
description?: string;
|
|
566
|
+
/**
|
|
567
|
+
* Specifies the discount code used for the custom discount.
|
|
568
|
+
*/
|
|
569
|
+
discount_code?: string;
|
|
570
|
+
/**
|
|
571
|
+
* Specifies from where the custom discount is applied. For example, Talon.one.
|
|
572
|
+
*/
|
|
573
|
+
discount_engine?: string;
|
|
574
|
+
/**
|
|
575
|
+
* Specifies an external id for the custom discount.
|
|
576
|
+
*/
|
|
577
|
+
external_id?: string;
|
|
578
|
+
/**
|
|
579
|
+
* Specifies the type of the resource. Always `custom_discount`.
|
|
580
|
+
*/
|
|
581
|
+
type?: string;
|
|
582
|
+
/**
|
|
583
|
+
* Specifies the UUID of the custom discount.
|
|
584
|
+
*/
|
|
585
|
+
readonly id?: string;
|
|
586
|
+
};
|
|
587
|
+
export type CustomDiscountRelationshipsCartItemRequest = {
|
|
588
|
+
relationships?: {
|
|
589
|
+
item?: {
|
|
590
|
+
data?: {
|
|
591
|
+
/**
|
|
592
|
+
* Specifies the type of item. For example, `custom_item` or `cart_item`.
|
|
593
|
+
*/
|
|
594
|
+
type?: string;
|
|
595
|
+
/**
|
|
596
|
+
* Specifies the unique identifier of the `cart_item` or `custom_item` in the cart.
|
|
597
|
+
*/
|
|
598
|
+
id?: string;
|
|
599
|
+
};
|
|
600
|
+
};
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
export type CartItemRelationship = {
|
|
604
|
+
relationships?: {
|
|
605
|
+
order?: {
|
|
606
|
+
data?: {
|
|
607
|
+
/**
|
|
608
|
+
* This specifies the type of item.
|
|
609
|
+
*/
|
|
610
|
+
type?: string;
|
|
611
|
+
/**
|
|
612
|
+
* This specifies the ID of the cart_item or custom_item in the cart.
|
|
613
|
+
*/
|
|
614
|
+
id?: string;
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
export type CartsBulkTaxes = {
|
|
620
|
+
data?: Array<CartsItemsTaxesObject & CartItemRelationship>;
|
|
621
|
+
options?: AddAllOrNothingOptionsObject;
|
|
622
|
+
};
|
|
623
|
+
export type OrdersAnonymizeRequest = {
|
|
624
|
+
data?: OrdersAnonymizeData;
|
|
625
|
+
};
|
|
626
|
+
export type OrdersAnonymizeData = {
|
|
627
|
+
/**
|
|
628
|
+
* The unique identifiers of the orders to be anonymized. You can anonymize multiple orders at the same time.
|
|
629
|
+
*/
|
|
630
|
+
order_ids?: Array<string>;
|
|
631
|
+
};
|
|
632
|
+
export type OrdersUpdateRequest = {
|
|
633
|
+
data?: OrdersAddressData | OrdersCancelData | OrdersFulfilledData;
|
|
634
|
+
};
|
|
635
|
+
export type OrdersAddressData = {
|
|
636
|
+
/**
|
|
637
|
+
* 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.
|
|
638
|
+
*/
|
|
639
|
+
order_number?: string;
|
|
640
|
+
/**
|
|
641
|
+
* 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.
|
|
642
|
+
*/
|
|
643
|
+
external_ref?: string;
|
|
644
|
+
shipping_address: {
|
|
645
|
+
/**
|
|
646
|
+
* Specifies the first name of the address holder.
|
|
647
|
+
*/
|
|
648
|
+
first_name?: string;
|
|
649
|
+
/**
|
|
650
|
+
* Specifies the last name of the address holder.
|
|
651
|
+
*/
|
|
652
|
+
last_name?: string;
|
|
653
|
+
/**
|
|
654
|
+
* Specifies the phone number of the address holder.
|
|
655
|
+
*/
|
|
656
|
+
phone_number?: string;
|
|
657
|
+
/**
|
|
658
|
+
* Specifies the company name.
|
|
659
|
+
*/
|
|
660
|
+
company_name?: string;
|
|
661
|
+
/**
|
|
662
|
+
* Specifies the first line of the address.
|
|
663
|
+
*/
|
|
664
|
+
line_1?: string;
|
|
665
|
+
/**
|
|
666
|
+
* Specifies the second line of the address.
|
|
667
|
+
*/
|
|
668
|
+
line_2?: string;
|
|
669
|
+
/**
|
|
670
|
+
* Specifies the name of the city in the shipping address.
|
|
671
|
+
*/
|
|
672
|
+
city?: string;
|
|
673
|
+
/**
|
|
674
|
+
* Specifies the county of the shipping address.
|
|
675
|
+
*/
|
|
676
|
+
county?: string;
|
|
677
|
+
/**
|
|
678
|
+
* Specifies the state, province, or region of the shipping address.
|
|
679
|
+
*/
|
|
680
|
+
region?: string;
|
|
681
|
+
/**
|
|
682
|
+
* Specifies the postcode or ZIP code of the address.
|
|
683
|
+
*/
|
|
684
|
+
postcode?: string;
|
|
685
|
+
/**
|
|
686
|
+
* Specifies the country in the shipping address.
|
|
687
|
+
*/
|
|
688
|
+
country?: string;
|
|
689
|
+
/**
|
|
690
|
+
* Specifies any instructions provided with the shipping address.
|
|
691
|
+
*/
|
|
692
|
+
instructions?: string;
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
export type OrdersCancelData = {
|
|
696
|
+
/**
|
|
697
|
+
* The status of the order. You can only update the status to `cancelled`.
|
|
698
|
+
*/
|
|
699
|
+
status: string;
|
|
700
|
+
/**
|
|
701
|
+
* The type of the resource. You must use order.
|
|
702
|
+
*/
|
|
703
|
+
type: string;
|
|
704
|
+
/**
|
|
705
|
+
* 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.
|
|
706
|
+
*/
|
|
707
|
+
external_ref?: string;
|
|
708
|
+
};
|
|
709
|
+
export type OrdersFulfilledData = {
|
|
710
|
+
/**
|
|
711
|
+
* The shipping status of the order. You can only update the shipping status to `fulfilled`.
|
|
712
|
+
*/
|
|
713
|
+
shipping: string;
|
|
714
|
+
/**
|
|
715
|
+
* The type of the resource. You must use order.
|
|
716
|
+
*/
|
|
717
|
+
type: string;
|
|
718
|
+
/**
|
|
719
|
+
* 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.
|
|
720
|
+
*/
|
|
721
|
+
external_ref?: string;
|
|
722
|
+
};
|
|
723
|
+
export type PaymentsRequest = {
|
|
724
|
+
data?: DataPaymentObject;
|
|
725
|
+
};
|
|
726
|
+
export type Gateway = "adyen" | "authorize_net" | "braintree" | "card_connect" | "cyber_source" | "elastic_path_payments_stripe" | "manual" | "paypal_express_checkout" | "stripe" | "stripe_connect" | "stripe_payment_intents";
|
|
727
|
+
/**
|
|
728
|
+
* Specifies the transaction method, such as `purchase` or `authorize`.
|
|
729
|
+
*/
|
|
730
|
+
export type Method = "authorize" | "purchase" | "purchase_setup" | "authorize_setup";
|
|
731
|
+
export type DataBasePayments = {
|
|
732
|
+
gateway: "adyen" | "authorize_net" | "braintree" | "card_connect" | "cyber_source" | "elastic_path_payments_stripe" | "manual" | "paypal_express_checkout" | "stripe" | "stripe_connect" | "stripe_payment_intents";
|
|
733
|
+
/**
|
|
734
|
+
* Specifies the transaction method, such as `purchase` or `authorize`.
|
|
735
|
+
*/
|
|
736
|
+
method: "authorize" | "purchase" | "purchase_setup" | "authorize_setup";
|
|
737
|
+
/**
|
|
738
|
+
* The amount to be paid for the transaction.
|
|
739
|
+
*/
|
|
740
|
+
amount?: number;
|
|
741
|
+
};
|
|
742
|
+
export type DataAdyenPayment = DataBasePayments & {
|
|
743
|
+
/**
|
|
744
|
+
* Specifies the gateway. You must use `adyen`.
|
|
745
|
+
*/
|
|
746
|
+
gateway: "adyen";
|
|
747
|
+
options?: {
|
|
748
|
+
/**
|
|
749
|
+
* The shopper reference token associated with the saved payment method.
|
|
750
|
+
*/
|
|
751
|
+
shopper_reference?: string;
|
|
752
|
+
/**
|
|
753
|
+
* Enter CardOnFile for a one-time purchase.
|
|
754
|
+
*/
|
|
755
|
+
recurring_processing_model?: string;
|
|
756
|
+
};
|
|
757
|
+
/**
|
|
758
|
+
* The Adyen recurringDetailReference payment method identifier.
|
|
759
|
+
*/
|
|
760
|
+
payment: string;
|
|
761
|
+
};
|
|
762
|
+
export type DataAuthorizeNetPayment = DataBasePayments & {
|
|
763
|
+
/**
|
|
764
|
+
* Specifies the gateway. You must use `authorize_net`.
|
|
765
|
+
*/
|
|
766
|
+
gateway: "authorize_net";
|
|
767
|
+
options?: {
|
|
768
|
+
/**
|
|
769
|
+
* The Authorize.net customer payment profile ID.
|
|
770
|
+
*/
|
|
771
|
+
customer_payment_profile_id?: string;
|
|
772
|
+
};
|
|
773
|
+
/**
|
|
774
|
+
* The Authorize.net customer profile ID.
|
|
775
|
+
*/
|
|
776
|
+
payment: string;
|
|
777
|
+
};
|
|
778
|
+
export type DataBraintreePayment = DataBasePayments & {
|
|
779
|
+
/**
|
|
780
|
+
* Specifies the gateway. You must use `braintree`.
|
|
781
|
+
*/
|
|
782
|
+
gateway: "braintree";
|
|
783
|
+
/**
|
|
784
|
+
* The Braintree Customer ID that you want to bill.
|
|
785
|
+
*/
|
|
786
|
+
payment: string;
|
|
787
|
+
};
|
|
788
|
+
export type DataCardConnectPayment = DataBasePayments & {
|
|
789
|
+
/**
|
|
790
|
+
* Specifies the gateway. You must use `card_connect`.
|
|
791
|
+
*/
|
|
792
|
+
gateway: "card_connect";
|
|
793
|
+
/**
|
|
794
|
+
* Enter account_id, profile_id from CardPointe API. For example, 1|16178397535388255208.
|
|
795
|
+
*/
|
|
796
|
+
payment: string;
|
|
797
|
+
};
|
|
798
|
+
export type DataCyberSourcePayment = DataBasePayments & {
|
|
799
|
+
/**
|
|
800
|
+
* Specifies the gateway. You must use `cyber_source`.
|
|
801
|
+
*/
|
|
802
|
+
gateway: "cyber_source";
|
|
803
|
+
/**
|
|
804
|
+
* The CyberSource token.
|
|
805
|
+
*/
|
|
806
|
+
payment: string;
|
|
807
|
+
};
|
|
808
|
+
export type ElasticPathPaymentsPoweredByStripePayment = DataBasePayments & {
|
|
809
|
+
/**
|
|
810
|
+
* Specifies the gateway. You must use `elastic_path_payments_stripe`.
|
|
811
|
+
*/
|
|
812
|
+
gateway: "elastic_path_payments_stripe";
|
|
813
|
+
options?: {
|
|
814
|
+
/**
|
|
815
|
+
* 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.
|
|
816
|
+
*/
|
|
817
|
+
receipt_email?: string;
|
|
818
|
+
/**
|
|
819
|
+
* Parent object determining whether to use Stripe's `automatic_payment_methods` setting.
|
|
820
|
+
*/
|
|
821
|
+
automatic_payment_methods?: {
|
|
822
|
+
/**
|
|
823
|
+
* 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.
|
|
824
|
+
*/
|
|
825
|
+
enabled?: boolean;
|
|
826
|
+
};
|
|
827
|
+
};
|
|
828
|
+
/**
|
|
829
|
+
* 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).
|
|
830
|
+
*/
|
|
831
|
+
payment_method_types?: Array<string>;
|
|
832
|
+
/**
|
|
833
|
+
* Specifies the Stripe token or source.
|
|
834
|
+
*/
|
|
835
|
+
payment?: string;
|
|
836
|
+
};
|
|
837
|
+
export type DataManualPayment = DataBasePayments & {
|
|
838
|
+
/**
|
|
839
|
+
* Specifies the type of payment gateway. You must use `manual`.
|
|
840
|
+
*/
|
|
841
|
+
gateway: "manual";
|
|
842
|
+
paymentmethod_meta?: {
|
|
843
|
+
/**
|
|
844
|
+
* 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.
|
|
845
|
+
*/
|
|
846
|
+
custom_reference?: string;
|
|
847
|
+
/**
|
|
848
|
+
* A custom name associated with the payment method.
|
|
849
|
+
*/
|
|
850
|
+
name?: string;
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
export type DataPayPalExpressCheckoutPayment = DataBasePayments & {
|
|
854
|
+
/**
|
|
855
|
+
* Specifies the type of payment gateway. You must use `paypal_express_checkout`.
|
|
856
|
+
*/
|
|
857
|
+
gateway: "paypal_express_checkout";
|
|
858
|
+
options?: {
|
|
859
|
+
/**
|
|
860
|
+
* The description for the payment.
|
|
861
|
+
*/
|
|
862
|
+
description?: string;
|
|
863
|
+
/**
|
|
864
|
+
* The descriptor appended to PayPal generated descriptor that is visible on the card statement of the payer.
|
|
865
|
+
*/
|
|
866
|
+
soft_descriptor?: string;
|
|
867
|
+
application_context?: {
|
|
868
|
+
/**
|
|
869
|
+
* The label that overrides the business name in the PayPal account on the PayPal site.
|
|
870
|
+
*/
|
|
871
|
+
brand_name?: string;
|
|
872
|
+
/**
|
|
873
|
+
* The locale pages that appear based on language and country code. PayPal supports a five-character code. For example, ja-JP.
|
|
874
|
+
*/
|
|
875
|
+
locale?: string;
|
|
876
|
+
/**
|
|
877
|
+
* The type of landing page to show on the PayPal site for customer checkout. Use values LOGIN, BILLING, or NO_PREFERENCE.
|
|
878
|
+
*/
|
|
879
|
+
landing_page?: string;
|
|
880
|
+
/**
|
|
881
|
+
* The shipping preference. Use SET_PROVIDED_ADDRESS value. This parameter does allow the user to change their address on PayPal site.
|
|
882
|
+
*/
|
|
883
|
+
shipping_preference?: string;
|
|
884
|
+
/**
|
|
885
|
+
* 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.
|
|
886
|
+
*/
|
|
887
|
+
user_action?: string;
|
|
888
|
+
/**
|
|
889
|
+
* The callback URL for PayPal to redirect the user in the case of approved payment.
|
|
890
|
+
*/
|
|
891
|
+
return_url?: string;
|
|
892
|
+
/**
|
|
893
|
+
* The callback URL for PayPal to redirect user in the case a cancelled payment.
|
|
894
|
+
*/
|
|
895
|
+
cancel_url?: string;
|
|
896
|
+
};
|
|
897
|
+
};
|
|
898
|
+
};
|
|
899
|
+
export type DataStripePayment = DataBasePayments & {
|
|
900
|
+
/**
|
|
901
|
+
* Specifies the type of payment gateway. You must use `stripe`.
|
|
902
|
+
*/
|
|
903
|
+
gateway: "stripe";
|
|
904
|
+
options?: {
|
|
905
|
+
/**
|
|
906
|
+
* The option to provide an email for Stripe receipts. Specify live mode to access this feature.
|
|
907
|
+
*/
|
|
908
|
+
receipt_email?: string;
|
|
909
|
+
};
|
|
910
|
+
/**
|
|
911
|
+
* The Stripe token or source.
|
|
912
|
+
*/
|
|
913
|
+
payment?: string;
|
|
914
|
+
};
|
|
915
|
+
export type DataStripeConnectPayment = DataBasePayments & {
|
|
916
|
+
/**
|
|
917
|
+
* Specifies the type of payment gateway. You must use `stripe_connect`.
|
|
918
|
+
*/
|
|
919
|
+
gateway: "stripe_connect";
|
|
920
|
+
options?: {
|
|
921
|
+
/**
|
|
922
|
+
* 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.
|
|
923
|
+
*/
|
|
924
|
+
receipt_email?: string;
|
|
925
|
+
};
|
|
926
|
+
/**
|
|
927
|
+
* Specifies the Stripe token or source.
|
|
928
|
+
*/
|
|
929
|
+
payment?: string;
|
|
930
|
+
};
|
|
931
|
+
export type DataStripePaymentIntentsPayment = DataBasePayments & {
|
|
932
|
+
/**
|
|
933
|
+
* Specifies the type of payment gateway. You must use `stripe_payment_intents`.
|
|
934
|
+
*/
|
|
935
|
+
gateway: "stripe_payment_intents";
|
|
936
|
+
options?: {
|
|
937
|
+
/**
|
|
938
|
+
* 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.
|
|
939
|
+
*/
|
|
940
|
+
receipt_email?: string;
|
|
941
|
+
};
|
|
942
|
+
/**
|
|
943
|
+
* Specifies the Stripe token or source.
|
|
944
|
+
*/
|
|
945
|
+
payment?: string;
|
|
946
|
+
};
|
|
947
|
+
export type DataPaymentObject = DataAdyenPayment | DataAuthorizeNetPayment | DataBraintreePayment | DataCardConnectPayment | DataCyberSourcePayment | ElasticPathPaymentsPoweredByStripePayment | DataManualPayment | DataPayPalExpressCheckoutPayment | DataStripePayment | DataStripeConnectPayment | DataStripePaymentIntentsPayment;
|
|
948
|
+
export type TransactionResponse = {
|
|
949
|
+
/**
|
|
950
|
+
* The ID of the transaction.
|
|
951
|
+
*/
|
|
952
|
+
readonly id?: string;
|
|
953
|
+
/**
|
|
954
|
+
* The payment gateway reference.
|
|
955
|
+
*/
|
|
956
|
+
reference?: string;
|
|
957
|
+
/**
|
|
958
|
+
* A custom name associated with the payment method.
|
|
959
|
+
*/
|
|
960
|
+
name?: string;
|
|
961
|
+
/**
|
|
962
|
+
* 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.
|
|
963
|
+
*/
|
|
964
|
+
custom_reference?: string;
|
|
965
|
+
/**
|
|
966
|
+
* The name of the payment gateway used.
|
|
967
|
+
*/
|
|
968
|
+
gateway?: "adyen" | "authorize_net" | "braintree" | "card_connect" | "cyber_source" | "elastic_path_payments_stripe" | "manual" | "paypal_express_checkout" | "stripe" | "stripe_connect" | "stripe_payment_intents";
|
|
969
|
+
/**
|
|
970
|
+
* The amount for this transaction.
|
|
971
|
+
*/
|
|
972
|
+
amount?: number;
|
|
973
|
+
/**
|
|
974
|
+
* The refunded amount.
|
|
975
|
+
*/
|
|
976
|
+
refunded_amount?: number;
|
|
977
|
+
/**
|
|
978
|
+
* The transaction currency.
|
|
979
|
+
*/
|
|
980
|
+
currency?: string;
|
|
981
|
+
/**
|
|
982
|
+
* The type of transaction, such as `purchase`, `capture`, `authorize` or `refund`.
|
|
983
|
+
*/
|
|
984
|
+
"transaction-type"?: string;
|
|
985
|
+
/**
|
|
986
|
+
* The status provided by the gateway for this transaction, such as `complete` or `failed`.
|
|
987
|
+
*/
|
|
988
|
+
status?: string;
|
|
989
|
+
relationships?: {
|
|
990
|
+
order?: {
|
|
991
|
+
data?: {
|
|
992
|
+
/**
|
|
993
|
+
* Represents the type of the object being returned. It is always `order`.
|
|
994
|
+
*/
|
|
995
|
+
type?: string;
|
|
996
|
+
/**
|
|
997
|
+
* The ID of the order.
|
|
998
|
+
*/
|
|
999
|
+
id?: string;
|
|
1000
|
+
};
|
|
1001
|
+
};
|
|
1002
|
+
};
|
|
1003
|
+
meta?: {
|
|
1004
|
+
display_price?: FormattedPriceData;
|
|
1005
|
+
display_refunded_amount?: FormattedPriceData;
|
|
1006
|
+
timestamps?: Timestamps;
|
|
1007
|
+
};
|
|
1008
|
+
};
|
|
1009
|
+
export type OrdersTransactionsConfirmRequest = {
|
|
1010
|
+
data?: {
|
|
1011
|
+
[key: string]: unknown;
|
|
1012
|
+
};
|
|
1013
|
+
};
|
|
1014
|
+
export type OrdersTransactionsCaptureRequest = {
|
|
1015
|
+
data?: {
|
|
1016
|
+
options?: {
|
|
1017
|
+
soft_descriptor?: string;
|
|
1018
|
+
note_to_payer?: string;
|
|
1019
|
+
};
|
|
1020
|
+
};
|
|
1021
|
+
};
|
|
1022
|
+
export type OrdersTransactionsRefundRequest = {
|
|
1023
|
+
data?: {
|
|
1024
|
+
/**
|
|
1025
|
+
* 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.
|
|
1026
|
+
*/
|
|
1027
|
+
amount?: number;
|
|
1028
|
+
options?: {
|
|
1029
|
+
/**
|
|
1030
|
+
* Provides comments about the refund. It is used by PayPal Express.
|
|
1031
|
+
*/
|
|
1032
|
+
note?: string;
|
|
1033
|
+
};
|
|
1034
|
+
};
|
|
1035
|
+
};
|
|
1036
|
+
export type OrdersTransactionsCancelRequest = {
|
|
1037
|
+
data?: {
|
|
1038
|
+
options?: {
|
|
1039
|
+
[key: string]: unknown;
|
|
1040
|
+
};
|
|
1041
|
+
/**
|
|
1042
|
+
* Specifies the reason for canceling the transaction. The reason may include `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`.
|
|
1043
|
+
*/
|
|
1044
|
+
reason?: string;
|
|
1045
|
+
};
|
|
1046
|
+
};
|
|
1047
|
+
export type OrderPriceData = {
|
|
1048
|
+
/**
|
|
1049
|
+
* The amount for this item.
|
|
1050
|
+
*/
|
|
1051
|
+
amount?: number;
|
|
1052
|
+
/**
|
|
1053
|
+
* The currency this item.
|
|
1054
|
+
*/
|
|
1055
|
+
currency?: string;
|
|
1056
|
+
/**
|
|
1057
|
+
* Whether or not this price is tax inclusive.
|
|
1058
|
+
*/
|
|
1059
|
+
includes_tax?: boolean;
|
|
1060
|
+
};
|
|
1061
|
+
export type FormattedPriceData = {
|
|
1062
|
+
/**
|
|
1063
|
+
* The raw total of this cart.
|
|
1064
|
+
*/
|
|
1065
|
+
amount?: number;
|
|
1066
|
+
/**
|
|
1067
|
+
* The currency set for this cart.
|
|
1068
|
+
*/
|
|
1069
|
+
currency?: string;
|
|
1070
|
+
/**
|
|
1071
|
+
* The tax inclusive formatted total based on the currency.
|
|
1072
|
+
*/
|
|
1073
|
+
formatted?: string;
|
|
1074
|
+
};
|
|
1075
|
+
export type OrderItemFormattedUnitPriceData = {
|
|
1076
|
+
unit?: FormattedPriceData;
|
|
1077
|
+
value?: FormattedPriceData;
|
|
1078
|
+
};
|
|
1079
|
+
export type DiscountData = {
|
|
1080
|
+
amount?: OrderPriceData;
|
|
1081
|
+
code?: string;
|
|
1082
|
+
readonly id?: string;
|
|
1083
|
+
};
|
|
1084
|
+
export type OrderItemResponse = {
|
|
1085
|
+
/**
|
|
1086
|
+
* The type represents the object being returned.
|
|
1087
|
+
*/
|
|
1088
|
+
type?: string;
|
|
1089
|
+
/**
|
|
1090
|
+
* The unique identifier for this order item.
|
|
1091
|
+
*/
|
|
1092
|
+
readonly id?: string;
|
|
1093
|
+
/**
|
|
1094
|
+
* The quantity of this item were ordered.
|
|
1095
|
+
*/
|
|
1096
|
+
quantity?: number;
|
|
1097
|
+
/**
|
|
1098
|
+
* The unique identifier for this order item.
|
|
1099
|
+
*/
|
|
1100
|
+
readonly product_id?: string;
|
|
1101
|
+
/**
|
|
1102
|
+
* The unique identifier for the subscription offering for this order item.
|
|
1103
|
+
*/
|
|
1104
|
+
readonly subscription_offering_id?: string;
|
|
1105
|
+
/**
|
|
1106
|
+
* The name of this order item.
|
|
1107
|
+
*/
|
|
1108
|
+
name?: string;
|
|
1109
|
+
/**
|
|
1110
|
+
* The SKU code for the order item.
|
|
1111
|
+
*/
|
|
1112
|
+
sku?: string;
|
|
1113
|
+
unit_price?: OrderPriceData;
|
|
1114
|
+
value?: OrderPriceData;
|
|
1115
|
+
discounts?: Array<DiscountData>;
|
|
1116
|
+
links?: {
|
|
1117
|
+
[key: string]: unknown;
|
|
1118
|
+
};
|
|
1119
|
+
meta?: {
|
|
1120
|
+
display_price?: {
|
|
1121
|
+
with_tax?: OrderItemFormattedUnitPriceData;
|
|
1122
|
+
without_tax?: OrderItemFormattedUnitPriceData;
|
|
1123
|
+
tax?: OrderItemFormattedUnitPriceData;
|
|
1124
|
+
discount?: OrderItemFormattedUnitPriceData;
|
|
1125
|
+
without_discount?: OrderItemFormattedUnitPriceData;
|
|
1126
|
+
discounts?: {
|
|
1127
|
+
[key: string]: {
|
|
1128
|
+
amount?: number;
|
|
1129
|
+
currency?: string;
|
|
1130
|
+
formatted?: string;
|
|
1131
|
+
};
|
|
1132
|
+
};
|
|
1133
|
+
};
|
|
1134
|
+
timestamps?: Timestamps;
|
|
1135
|
+
};
|
|
1136
|
+
relationships?: {
|
|
1137
|
+
cart_item?: {
|
|
1138
|
+
data?: {
|
|
1139
|
+
/**
|
|
1140
|
+
* The type represents the object being returned.
|
|
1141
|
+
*/
|
|
1142
|
+
type?: string;
|
|
1143
|
+
/**
|
|
1144
|
+
* The unique identifier for this item.
|
|
1145
|
+
*/
|
|
1146
|
+
readonly id?: string;
|
|
1147
|
+
};
|
|
1148
|
+
};
|
|
1149
|
+
};
|
|
1150
|
+
/**
|
|
1151
|
+
* The unique identifier of the catalog associated with the product is shown if `catalog_source=pim` is set.
|
|
1152
|
+
*/
|
|
1153
|
+
catalog_id?: string;
|
|
1154
|
+
/**
|
|
1155
|
+
* The catalog source. Always `pim` or `legacy`.
|
|
1156
|
+
*/
|
|
1157
|
+
catalog_source?: string;
|
|
1158
|
+
};
|
|
1159
|
+
export type OrderResponse = {
|
|
1160
|
+
/**
|
|
1161
|
+
* Specifies the type of object being returned. You must use `order`.
|
|
1162
|
+
*/
|
|
1163
|
+
type?: string;
|
|
1164
|
+
/**
|
|
1165
|
+
* 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.
|
|
1166
|
+
*/
|
|
1167
|
+
order_number?: string;
|
|
1168
|
+
/**
|
|
1169
|
+
* 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.
|
|
1170
|
+
*/
|
|
1171
|
+
external_ref?: string;
|
|
1172
|
+
/**
|
|
1173
|
+
* Specifies the unique identifier of the order.
|
|
1174
|
+
*/
|
|
1175
|
+
readonly id?: string;
|
|
1176
|
+
/**
|
|
1177
|
+
* Specifies the status of the order, such as `incomplete`, `complete`, `processing`, or `cancelled`.
|
|
1178
|
+
*/
|
|
1179
|
+
status?: string;
|
|
1180
|
+
/**
|
|
1181
|
+
* Specifies the status of the payment, such as `unpaid`, `authorized`, `paid`, or `refunded`.
|
|
1182
|
+
*/
|
|
1183
|
+
payment?: string;
|
|
1184
|
+
/**
|
|
1185
|
+
* Specifies the status of the shipment, such as `fulfilled` or `unfulfilled`.
|
|
1186
|
+
*/
|
|
1187
|
+
shipping?: string;
|
|
1188
|
+
/**
|
|
1189
|
+
* Specifies if the order is anonymized.
|
|
1190
|
+
*/
|
|
1191
|
+
anonymized?: boolean;
|
|
1192
|
+
meta?: OrderMeta;
|
|
1193
|
+
billing_address?: BillingAddress;
|
|
1194
|
+
contact?: Contact;
|
|
1195
|
+
shipping_address?: ShippingAddress;
|
|
1196
|
+
};
|
|
1197
|
+
export type OrderMeta = {
|
|
1198
|
+
timestamps?: Timestamps;
|
|
1199
|
+
display_price?: {
|
|
1200
|
+
with_tax?: FormattedPriceData;
|
|
1201
|
+
without_tax?: FormattedPriceData;
|
|
1202
|
+
tax?: FormattedPriceData;
|
|
1203
|
+
discount?: FormattedPriceData;
|
|
1204
|
+
paid?: FormattedPriceData;
|
|
1205
|
+
authorized?: FormattedPriceData;
|
|
1206
|
+
without_discount?: FormattedPriceData;
|
|
1207
|
+
};
|
|
1208
|
+
};
|
|
1209
|
+
export type CustomerCheckout = {
|
|
1210
|
+
data?: {
|
|
1211
|
+
/**
|
|
1212
|
+
* 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.
|
|
1213
|
+
*/
|
|
1214
|
+
order_number?: string;
|
|
1215
|
+
/**
|
|
1216
|
+
* 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.
|
|
1217
|
+
*/
|
|
1218
|
+
external_ref?: string;
|
|
1219
|
+
customer?: {
|
|
1220
|
+
/**
|
|
1221
|
+
* The ID of the customer.
|
|
1222
|
+
*/
|
|
1223
|
+
id?: string;
|
|
1224
|
+
};
|
|
1225
|
+
billing_address?: BillingAddress;
|
|
1226
|
+
shipping_address?: ShippingAddress;
|
|
1227
|
+
};
|
|
1228
|
+
};
|
|
1229
|
+
export type AccountCheckout = {
|
|
1230
|
+
data?: {
|
|
1231
|
+
/**
|
|
1232
|
+
* 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.
|
|
1233
|
+
*/
|
|
1234
|
+
order_number?: string;
|
|
1235
|
+
/**
|
|
1236
|
+
* 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.
|
|
1237
|
+
*/
|
|
1238
|
+
external_ref?: string;
|
|
1239
|
+
account?: {
|
|
1240
|
+
/**
|
|
1241
|
+
* The account ID.
|
|
1242
|
+
*/
|
|
1243
|
+
id?: string;
|
|
1244
|
+
/**
|
|
1245
|
+
* The account member ID.
|
|
1246
|
+
*/
|
|
1247
|
+
member_id?: string;
|
|
1248
|
+
};
|
|
1249
|
+
contact?: {
|
|
1250
|
+
/**
|
|
1251
|
+
* The name of the account member.
|
|
1252
|
+
*/
|
|
1253
|
+
name?: string;
|
|
1254
|
+
/**
|
|
1255
|
+
* The email address of the account member.
|
|
1256
|
+
*/
|
|
1257
|
+
email?: string;
|
|
1258
|
+
};
|
|
1259
|
+
billing_address?: BillingAddress;
|
|
1260
|
+
shipping_address?: ShippingAddress;
|
|
1261
|
+
};
|
|
1262
|
+
};
|
|
1263
|
+
export type BillingAddress = {
|
|
1264
|
+
/**
|
|
1265
|
+
* First name of the billing recipient.
|
|
1266
|
+
*/
|
|
1267
|
+
first_name: string;
|
|
1268
|
+
/**
|
|
1269
|
+
* Last name of the billing recipient.
|
|
1270
|
+
*/
|
|
1271
|
+
last_name: string;
|
|
1272
|
+
/**
|
|
1273
|
+
* Company name of the billing recipient.
|
|
1274
|
+
*/
|
|
1275
|
+
company_name: string;
|
|
1276
|
+
/**
|
|
1277
|
+
* First line of the billing address.
|
|
1278
|
+
*/
|
|
1279
|
+
line_1: string;
|
|
1280
|
+
/**
|
|
1281
|
+
* Second line of the billing address.
|
|
1282
|
+
*/
|
|
1283
|
+
line_2: string;
|
|
1284
|
+
/**
|
|
1285
|
+
* City of the billing address.
|
|
1286
|
+
*/
|
|
1287
|
+
city: string;
|
|
1288
|
+
/**
|
|
1289
|
+
* Postcode of the billing address.
|
|
1290
|
+
*/
|
|
1291
|
+
postcode: string;
|
|
1292
|
+
/**
|
|
1293
|
+
* County of the billing address.
|
|
1294
|
+
*/
|
|
1295
|
+
county: string;
|
|
1296
|
+
/**
|
|
1297
|
+
* Country of the billing address.
|
|
1298
|
+
*/
|
|
1299
|
+
country: string;
|
|
1300
|
+
/**
|
|
1301
|
+
* State, province, or region of the billing address.
|
|
1302
|
+
*/
|
|
1303
|
+
region: string;
|
|
1304
|
+
};
|
|
1305
|
+
export type Contact = {
|
|
1306
|
+
/**
|
|
1307
|
+
* The email address of the contact.
|
|
1308
|
+
*/
|
|
1309
|
+
email?: string;
|
|
1310
|
+
/**
|
|
1311
|
+
* The name of the contact.
|
|
1312
|
+
*/
|
|
1313
|
+
name?: string;
|
|
1314
|
+
};
|
|
1315
|
+
export type ShippingAddress = {
|
|
1316
|
+
/**
|
|
1317
|
+
* First name of the shipping recipient.
|
|
1318
|
+
*/
|
|
1319
|
+
first_name: string;
|
|
1320
|
+
/**
|
|
1321
|
+
* Last name of the shipping recipient.
|
|
1322
|
+
*/
|
|
1323
|
+
last_name: string;
|
|
1324
|
+
/**
|
|
1325
|
+
* Phone number of the shipping recipient.
|
|
1326
|
+
*/
|
|
1327
|
+
phone_number: string;
|
|
1328
|
+
/**
|
|
1329
|
+
* Company of the shipping recipient.
|
|
1330
|
+
*/
|
|
1331
|
+
company_name: string;
|
|
1332
|
+
/**
|
|
1333
|
+
* First line of the shipping address.
|
|
1334
|
+
*/
|
|
1335
|
+
line_1: string;
|
|
1336
|
+
/**
|
|
1337
|
+
* Second line of the shipping address.
|
|
1338
|
+
*/
|
|
1339
|
+
line_2: string;
|
|
1340
|
+
/**
|
|
1341
|
+
* City of the shipping address.
|
|
1342
|
+
*/
|
|
1343
|
+
city: string;
|
|
1344
|
+
/**
|
|
1345
|
+
* Post code of the shipping address.
|
|
1346
|
+
*/
|
|
1347
|
+
postcode: string;
|
|
1348
|
+
/**
|
|
1349
|
+
* County of the shipping address.
|
|
1350
|
+
*/
|
|
1351
|
+
county: string;
|
|
1352
|
+
/**
|
|
1353
|
+
* Country of the shipping address.
|
|
1354
|
+
*/
|
|
1355
|
+
country: string;
|
|
1356
|
+
/**
|
|
1357
|
+
* State, province, or region of the shipping address.
|
|
1358
|
+
*/
|
|
1359
|
+
region: string;
|
|
1360
|
+
/**
|
|
1361
|
+
* Delivery instructions.
|
|
1362
|
+
*/
|
|
1363
|
+
instructions: string;
|
|
1364
|
+
};
|
|
1365
|
+
export type ResponseMetaCarts = {
|
|
1366
|
+
page?: ResponsePaginationPage;
|
|
1367
|
+
results?: ResponsePaginationResults;
|
|
1368
|
+
};
|
|
1369
|
+
export type ResponseMetaOrders = {
|
|
1370
|
+
page?: ResponsePaginationPage;
|
|
1371
|
+
results?: ResponsePaginationResults;
|
|
1372
|
+
};
|
|
1373
|
+
export type ResponsePaginationPage = {
|
|
1374
|
+
/**
|
|
1375
|
+
* The current page.
|
|
1376
|
+
*/
|
|
1377
|
+
current?: number;
|
|
1378
|
+
/**
|
|
1379
|
+
* The maximum number of records per page for this response. You can set this value up to 100.
|
|
1380
|
+
*/
|
|
1381
|
+
limit?: number;
|
|
1382
|
+
/**
|
|
1383
|
+
* The current offset by number of records, not pages. Offset is zero-based.
|
|
1384
|
+
*/
|
|
1385
|
+
offset?: number;
|
|
1386
|
+
/**
|
|
1387
|
+
* The total page count.
|
|
1388
|
+
*/
|
|
1389
|
+
total?: number;
|
|
1390
|
+
};
|
|
1391
|
+
export type ResponsePaginationResults = {
|
|
1392
|
+
/**
|
|
1393
|
+
* The total page count.
|
|
1394
|
+
*/
|
|
1395
|
+
total?: number;
|
|
1396
|
+
};
|
|
1397
|
+
export type ResponsePageLinks = {
|
|
1398
|
+
/**
|
|
1399
|
+
* Always the current page.
|
|
1400
|
+
*/
|
|
1401
|
+
current?: string;
|
|
1402
|
+
/**
|
|
1403
|
+
* Always the first page.
|
|
1404
|
+
*/
|
|
1405
|
+
first?: string;
|
|
1406
|
+
/**
|
|
1407
|
+
* If there is only one page, it is `null`.
|
|
1408
|
+
*/
|
|
1409
|
+
last?: string;
|
|
1410
|
+
/**
|
|
1411
|
+
* If there is only one page, it is `null`.
|
|
1412
|
+
*/
|
|
1413
|
+
next?: string;
|
|
1414
|
+
/**
|
|
1415
|
+
* if the user is on the first page, it is `null`.
|
|
1416
|
+
*/
|
|
1417
|
+
prev?: string;
|
|
1418
|
+
};
|
|
1419
|
+
export type ResponseData = {
|
|
1420
|
+
data?: unknown;
|
|
1421
|
+
};
|
|
1422
|
+
export type ResponseError = Array<unknown>;
|
|
1423
|
+
export type Timestamps = {
|
|
1424
|
+
/**
|
|
1425
|
+
* The date this was created.
|
|
1426
|
+
*/
|
|
1427
|
+
created_at?: string;
|
|
1428
|
+
/**
|
|
1429
|
+
* The date this was last updated.
|
|
1430
|
+
*/
|
|
1431
|
+
updated_at?: unknown;
|
|
1432
|
+
};
|
|
1433
|
+
export type CartTimestamps = {
|
|
1434
|
+
created_at?: string;
|
|
1435
|
+
updated_at?: unknown;
|
|
1436
|
+
expires_at?: unknown;
|
|
1437
|
+
};
|
|
1438
|
+
export type GetCartsData = {
|
|
1439
|
+
body?: never;
|
|
1440
|
+
headers?: {
|
|
1441
|
+
/**
|
|
1442
|
+
* An Account Management Authentication token to access a specific account's carts.
|
|
1443
|
+
*/
|
|
1444
|
+
"EP-Account-Management-Authentication-Token"?: string;
|
|
1445
|
+
/**
|
|
1446
|
+
* A customer token to access a specific customer's carts.
|
|
1447
|
+
*/
|
|
1448
|
+
"x-moltin-customer-token"?: string;
|
|
1449
|
+
};
|
|
1450
|
+
path?: never;
|
|
1451
|
+
query?: never;
|
|
1452
|
+
url: "/v2/carts";
|
|
1453
|
+
};
|
|
1454
|
+
export type GetCartsErrors = {
|
|
1455
|
+
/**
|
|
1456
|
+
* Unauthorized
|
|
1457
|
+
*/
|
|
1458
|
+
401: ResponseError;
|
|
1459
|
+
};
|
|
1460
|
+
export type GetCartsError = GetCartsErrors[keyof GetCartsErrors];
|
|
1461
|
+
export type GetCartsResponses = {
|
|
1462
|
+
200: ResponseData & {
|
|
1463
|
+
data?: Array<CartResponse>;
|
|
1464
|
+
links?: ResponsePageLinks;
|
|
1465
|
+
meta?: ResponseMetaCarts;
|
|
1466
|
+
};
|
|
1467
|
+
};
|
|
1468
|
+
export type GetCartsResponse = GetCartsResponses[keyof GetCartsResponses];
|
|
1469
|
+
export type CreateACartData = {
|
|
1470
|
+
body?: {
|
|
1471
|
+
data?: CartsRequest;
|
|
1472
|
+
};
|
|
1473
|
+
headers?: {
|
|
1474
|
+
/**
|
|
1475
|
+
* A customer token to be associated with the cart.
|
|
1476
|
+
*/
|
|
1477
|
+
"x-moltin-customer-token"?: string;
|
|
1478
|
+
};
|
|
1479
|
+
path?: never;
|
|
1480
|
+
query?: never;
|
|
1481
|
+
url: "/v2/carts";
|
|
1482
|
+
};
|
|
1483
|
+
export type CreateACartErrors = {
|
|
1484
|
+
/**
|
|
1485
|
+
* Unauthorized
|
|
1486
|
+
*/
|
|
1487
|
+
401: ResponseError;
|
|
1488
|
+
};
|
|
1489
|
+
export type CreateACartError = CreateACartErrors[keyof CreateACartErrors];
|
|
1490
|
+
export type CreateACartResponses = {
|
|
1491
|
+
200: ResponseData & {
|
|
1492
|
+
data?: CartResponse;
|
|
1493
|
+
};
|
|
1494
|
+
};
|
|
1495
|
+
export type CreateACartResponse = CreateACartResponses[keyof CreateACartResponses];
|
|
1496
|
+
export type DeleteACartData = {
|
|
1497
|
+
body?: never;
|
|
1498
|
+
path: {
|
|
1499
|
+
/**
|
|
1500
|
+
* The unique identifier of the cart that you want to delete.
|
|
1501
|
+
*/
|
|
1502
|
+
cartID: string;
|
|
1503
|
+
};
|
|
1504
|
+
query?: never;
|
|
1505
|
+
url: "/v2/carts/{cartID}";
|
|
1506
|
+
};
|
|
1507
|
+
export type DeleteACartErrors = {
|
|
1508
|
+
/**
|
|
1509
|
+
* Unauthorized
|
|
1510
|
+
*/
|
|
1511
|
+
401: ResponseError;
|
|
1512
|
+
};
|
|
1513
|
+
export type DeleteACartError = DeleteACartErrors[keyof DeleteACartErrors];
|
|
1514
|
+
export type DeleteACartResponses = {
|
|
1515
|
+
/**
|
|
1516
|
+
* No Content
|
|
1517
|
+
*/
|
|
1518
|
+
204: void;
|
|
1519
|
+
};
|
|
1520
|
+
export type DeleteACartResponse = DeleteACartResponses[keyof DeleteACartResponses];
|
|
1521
|
+
export type GetACartData = {
|
|
1522
|
+
body?: never;
|
|
1523
|
+
path: {
|
|
1524
|
+
/**
|
|
1525
|
+
* The unique identifier for this cart that you created.
|
|
1526
|
+
*/
|
|
1527
|
+
cartID: string;
|
|
1528
|
+
};
|
|
1529
|
+
query?: never;
|
|
1530
|
+
url: "/v2/carts/{cartID}";
|
|
1531
|
+
};
|
|
1532
|
+
export type GetACartErrors = {
|
|
1533
|
+
/**
|
|
1534
|
+
* Unauthorized
|
|
1535
|
+
*/
|
|
1536
|
+
401: ResponseError;
|
|
1537
|
+
};
|
|
1538
|
+
export type GetACartError = GetACartErrors[keyof GetACartErrors];
|
|
1539
|
+
export type GetACartResponses = {
|
|
1540
|
+
/**
|
|
1541
|
+
* OK
|
|
1542
|
+
*/
|
|
1543
|
+
200: ResponseData & {
|
|
1544
|
+
data?: CartResponse;
|
|
1545
|
+
};
|
|
1546
|
+
};
|
|
1547
|
+
export type GetACartResponse = GetACartResponses[keyof GetACartResponses];
|
|
1548
|
+
export type UpdateACartData = {
|
|
1549
|
+
body?: CartsRequest;
|
|
1550
|
+
path: {
|
|
1551
|
+
/**
|
|
1552
|
+
* The unique identifier of a cart created by you.
|
|
1553
|
+
*/
|
|
1554
|
+
cartID: string;
|
|
1555
|
+
};
|
|
1556
|
+
query?: never;
|
|
1557
|
+
url: "/v2/carts/{cartID}";
|
|
1558
|
+
};
|
|
1559
|
+
export type UpdateACartErrors = {
|
|
1560
|
+
/**
|
|
1561
|
+
* Unauthorized
|
|
1562
|
+
*/
|
|
1563
|
+
401: ResponseError;
|
|
1564
|
+
};
|
|
1565
|
+
export type UpdateACartError = UpdateACartErrors[keyof UpdateACartErrors];
|
|
1566
|
+
export type UpdateACartResponses = {
|
|
1567
|
+
200: ResponseData & {
|
|
1568
|
+
data?: CartResponse;
|
|
1569
|
+
};
|
|
1570
|
+
};
|
|
1571
|
+
export type UpdateACartResponse = UpdateACartResponses[keyof UpdateACartResponses];
|
|
1572
|
+
export type DeleteAllCartItemsData = {
|
|
1573
|
+
body?: never;
|
|
1574
|
+
path: {
|
|
1575
|
+
/**
|
|
1576
|
+
* The unique identifier of the cart created by you.
|
|
1577
|
+
*/
|
|
1578
|
+
cartID: string;
|
|
1579
|
+
};
|
|
1580
|
+
query?: never;
|
|
1581
|
+
url: "/v2/carts/{cartID}/items";
|
|
1582
|
+
};
|
|
1583
|
+
export type DeleteAllCartItemsErrors = {
|
|
1584
|
+
/**
|
|
1585
|
+
* Unauthorized
|
|
1586
|
+
*/
|
|
1587
|
+
401: ResponseError;
|
|
1588
|
+
};
|
|
1589
|
+
export type DeleteAllCartItemsError = DeleteAllCartItemsErrors[keyof DeleteAllCartItemsErrors];
|
|
1590
|
+
export type DeleteAllCartItemsResponses = {
|
|
1591
|
+
/**
|
|
1592
|
+
* No Content
|
|
1593
|
+
*/
|
|
1594
|
+
204: void;
|
|
1595
|
+
};
|
|
1596
|
+
export type DeleteAllCartItemsResponse = DeleteAllCartItemsResponses[keyof DeleteAllCartItemsResponses];
|
|
1597
|
+
export type GetCartItemsData = {
|
|
1598
|
+
body?: never;
|
|
1599
|
+
path: {
|
|
1600
|
+
/**
|
|
1601
|
+
* The unique identifier of the cart that you created.
|
|
1602
|
+
*/
|
|
1603
|
+
cartID: string;
|
|
1604
|
+
};
|
|
1605
|
+
query?: never;
|
|
1606
|
+
url: "/v2/carts/{cartID}/items";
|
|
1607
|
+
};
|
|
1608
|
+
export type GetCartItemsErrors = {
|
|
1609
|
+
/**
|
|
1610
|
+
* Unauthorized
|
|
1611
|
+
*/
|
|
1612
|
+
401: ResponseError;
|
|
1613
|
+
};
|
|
1614
|
+
export type GetCartItemsError = GetCartItemsErrors[keyof GetCartItemsErrors];
|
|
1615
|
+
export type GetCartItemsResponses = {
|
|
1616
|
+
200: CartsResponse;
|
|
1617
|
+
};
|
|
1618
|
+
export type GetCartItemsResponse = GetCartItemsResponses[keyof GetCartItemsResponses];
|
|
1619
|
+
export type ManageCartsData = {
|
|
1620
|
+
body?: CartItemsObjectRequest | CartMergeObjectRequest | CustomItemObject | ReOrderObjectRequest | PromotionItemObject | BulkAddItemsRequest;
|
|
1621
|
+
path: {
|
|
1622
|
+
/**
|
|
1623
|
+
* The unique identifier of the cart that you created.
|
|
1624
|
+
*/
|
|
1625
|
+
cartID: string;
|
|
1626
|
+
};
|
|
1627
|
+
query?: never;
|
|
1628
|
+
url: "/v2/carts/{cartID}/items";
|
|
1629
|
+
};
|
|
1630
|
+
export type ManageCartsErrors = {
|
|
1631
|
+
/**
|
|
1632
|
+
* Unauthorized
|
|
1633
|
+
*/
|
|
1634
|
+
401: ResponseError;
|
|
1635
|
+
};
|
|
1636
|
+
export type ManageCartsError = ManageCartsErrors[keyof ManageCartsErrors];
|
|
1637
|
+
export type ManageCartsResponses = {
|
|
1638
|
+
200: CartsResponse;
|
|
1639
|
+
};
|
|
1640
|
+
export type ManageCartsResponse = ManageCartsResponses[keyof ManageCartsResponses];
|
|
1641
|
+
export type BulkUpdateItemsInCartData = {
|
|
1642
|
+
body?: BulkUpdateCartsItems;
|
|
1643
|
+
path: {
|
|
1644
|
+
/**
|
|
1645
|
+
* The unique identifier of the cart that you created.
|
|
1646
|
+
*/
|
|
1647
|
+
cartID: string;
|
|
1648
|
+
};
|
|
1649
|
+
query?: never;
|
|
1650
|
+
url: "/v2/carts/{cartID}/items";
|
|
1651
|
+
};
|
|
1652
|
+
export type BulkUpdateItemsInCartErrors = {
|
|
1653
|
+
/**
|
|
1654
|
+
* Unauthorized
|
|
1655
|
+
*/
|
|
1656
|
+
401: ResponseError;
|
|
1657
|
+
};
|
|
1658
|
+
export type BulkUpdateItemsInCartError = BulkUpdateItemsInCartErrors[keyof BulkUpdateItemsInCartErrors];
|
|
1659
|
+
export type BulkUpdateItemsInCartResponses = {
|
|
1660
|
+
200: unknown;
|
|
1661
|
+
};
|
|
1662
|
+
export type DeleteACartItemData = {
|
|
1663
|
+
body?: never;
|
|
1664
|
+
path: {
|
|
1665
|
+
/**
|
|
1666
|
+
* The unique identifier of the cart created by you.
|
|
1667
|
+
*/
|
|
1668
|
+
cartID: string;
|
|
1669
|
+
/**
|
|
1670
|
+
* The unique identifier of the cart that you want to delete.
|
|
1671
|
+
*/
|
|
1672
|
+
cartitemID: string;
|
|
1673
|
+
};
|
|
1674
|
+
query?: never;
|
|
1675
|
+
url: "/v2/carts/{cartID}/items/{cartitemID}";
|
|
1676
|
+
};
|
|
1677
|
+
export type DeleteACartItemErrors = {
|
|
1678
|
+
/**
|
|
1679
|
+
* Unauthorized
|
|
1680
|
+
*/
|
|
1681
|
+
401: ResponseError;
|
|
1682
|
+
};
|
|
1683
|
+
export type DeleteACartItemError = DeleteACartItemErrors[keyof DeleteACartItemErrors];
|
|
1684
|
+
export type DeleteACartItemResponses = {
|
|
1685
|
+
/**
|
|
1686
|
+
* No Content
|
|
1687
|
+
*/
|
|
1688
|
+
204: void;
|
|
1689
|
+
};
|
|
1690
|
+
export type DeleteACartItemResponse = DeleteACartItemResponses[keyof DeleteACartItemResponses];
|
|
1691
|
+
export type UpdateACartItemData = {
|
|
1692
|
+
body?: UpdateCartsItems;
|
|
1693
|
+
path: {
|
|
1694
|
+
/**
|
|
1695
|
+
* A unique identifier of the cart that you created.
|
|
1696
|
+
*/
|
|
1697
|
+
cartID: string;
|
|
1698
|
+
/**
|
|
1699
|
+
* A unique identifier of the cart item.
|
|
1700
|
+
*/
|
|
1701
|
+
cartitemID: string;
|
|
1702
|
+
};
|
|
1703
|
+
query?: never;
|
|
1704
|
+
url: "/v2/carts/{cartID}/items/{cartitemID}";
|
|
1705
|
+
};
|
|
1706
|
+
export type UpdateACartItemErrors = {
|
|
1707
|
+
/**
|
|
1708
|
+
* Unauthorized
|
|
1709
|
+
*/
|
|
1710
|
+
401: ResponseError;
|
|
1711
|
+
};
|
|
1712
|
+
export type UpdateACartItemError = UpdateACartItemErrors[keyof UpdateACartItemErrors];
|
|
1713
|
+
export type UpdateACartItemResponses = {
|
|
1714
|
+
200: CartsResponse;
|
|
1715
|
+
};
|
|
1716
|
+
export type UpdateACartItemResponse = UpdateACartItemResponses[keyof UpdateACartItemResponses];
|
|
1717
|
+
export type DeleteAccountCartAssociationData = {
|
|
1718
|
+
body?: CartsRelationshipsAccountsData;
|
|
1719
|
+
headers?: {
|
|
1720
|
+
/**
|
|
1721
|
+
* An Account Management Authentication token to access a specific account's carts.
|
|
1722
|
+
*/
|
|
1723
|
+
"EP-Account-Management-Authentication-Token"?: string;
|
|
1724
|
+
};
|
|
1725
|
+
path: {
|
|
1726
|
+
/**
|
|
1727
|
+
* The ID for the cart created by the account.
|
|
1728
|
+
*/
|
|
1729
|
+
cartID: string;
|
|
1730
|
+
};
|
|
1731
|
+
query?: never;
|
|
1732
|
+
url: "/v2/carts/{cartID}/relationships/accounts";
|
|
1733
|
+
};
|
|
1734
|
+
export type DeleteAccountCartAssociationErrors = {
|
|
1735
|
+
/**
|
|
1736
|
+
* Unauthorized
|
|
1737
|
+
*/
|
|
1738
|
+
401: ResponseError;
|
|
1739
|
+
};
|
|
1740
|
+
export type DeleteAccountCartAssociationError = DeleteAccountCartAssociationErrors[keyof DeleteAccountCartAssociationErrors];
|
|
1741
|
+
export type DeleteAccountCartAssociationResponses = {
|
|
1742
|
+
/**
|
|
1743
|
+
* No Content
|
|
1744
|
+
*/
|
|
1745
|
+
204: void;
|
|
1746
|
+
};
|
|
1747
|
+
export type DeleteAccountCartAssociationResponse = DeleteAccountCartAssociationResponses[keyof DeleteAccountCartAssociationResponses];
|
|
1748
|
+
export type CreateAccountCartAssociationData = {
|
|
1749
|
+
body?: CartsRelationshipsAccountsData;
|
|
1750
|
+
headers?: {
|
|
1751
|
+
/**
|
|
1752
|
+
* An Account Management Authentication token to access a specific account's carts.
|
|
1753
|
+
*/
|
|
1754
|
+
"EP-Account-Management-Authentication-Token"?: string;
|
|
1755
|
+
};
|
|
1756
|
+
path: {
|
|
1757
|
+
/**
|
|
1758
|
+
* The ID for the cart created by the account. Ensure that you follow the guidelines for [Safe Characters](/guides/Getting-Started/safe-characters).
|
|
1759
|
+
*/
|
|
1760
|
+
cartID: string;
|
|
1761
|
+
};
|
|
1762
|
+
query?: never;
|
|
1763
|
+
url: "/v2/carts/{cartID}/relationships/accounts";
|
|
1764
|
+
};
|
|
1765
|
+
export type CreateAccountCartAssociationErrors = {
|
|
1766
|
+
/**
|
|
1767
|
+
* Unauthorized
|
|
1768
|
+
*/
|
|
1769
|
+
401: ResponseError;
|
|
1770
|
+
};
|
|
1771
|
+
export type CreateAccountCartAssociationError = CreateAccountCartAssociationErrors[keyof CreateAccountCartAssociationErrors];
|
|
1772
|
+
export type CreateAccountCartAssociationResponses = {
|
|
1773
|
+
/**
|
|
1774
|
+
* OK
|
|
1775
|
+
*/
|
|
1776
|
+
200: CartsRelationshipsAccountsData;
|
|
1777
|
+
/**
|
|
1778
|
+
* No Content is sent back in case the account has already been associated to the cart.
|
|
1779
|
+
*/
|
|
1780
|
+
204: void;
|
|
1781
|
+
};
|
|
1782
|
+
export type CreateAccountCartAssociationResponse = CreateAccountCartAssociationResponses[keyof CreateAccountCartAssociationResponses];
|
|
1783
|
+
export type DeleteCustomerCartAssociationData = {
|
|
1784
|
+
body?: CartsRelationshipsCustomersData;
|
|
1785
|
+
headers?: {
|
|
1786
|
+
/**
|
|
1787
|
+
* A customer token to access a specific customer's carts.
|
|
1788
|
+
*/
|
|
1789
|
+
"x-moltin-customer-token"?: string;
|
|
1790
|
+
};
|
|
1791
|
+
path: {
|
|
1792
|
+
/**
|
|
1793
|
+
* The ID for the cart created by the customer.
|
|
1794
|
+
*/
|
|
1795
|
+
cartID: string;
|
|
1796
|
+
};
|
|
1797
|
+
query?: never;
|
|
1798
|
+
url: "/v2/carts/{cartID}/relationships/customers";
|
|
1799
|
+
};
|
|
1800
|
+
export type DeleteCustomerCartAssociationErrors = {
|
|
1801
|
+
/**
|
|
1802
|
+
* Unauthorized
|
|
1803
|
+
*/
|
|
1804
|
+
401: ResponseError;
|
|
1805
|
+
};
|
|
1806
|
+
export type DeleteCustomerCartAssociationError = DeleteCustomerCartAssociationErrors[keyof DeleteCustomerCartAssociationErrors];
|
|
1807
|
+
export type DeleteCustomerCartAssociationResponses = {
|
|
1808
|
+
/**
|
|
1809
|
+
* No Content
|
|
1810
|
+
*/
|
|
1811
|
+
204: void;
|
|
1812
|
+
};
|
|
1813
|
+
export type DeleteCustomerCartAssociationResponse = DeleteCustomerCartAssociationResponses[keyof DeleteCustomerCartAssociationResponses];
|
|
1814
|
+
export type CreateCustomerCartAssociationData = {
|
|
1815
|
+
body?: CartsRelationshipsCustomersData;
|
|
1816
|
+
headers?: {
|
|
1817
|
+
/**
|
|
1818
|
+
* A customer token to access a specific customer's carts.
|
|
1819
|
+
*/
|
|
1820
|
+
"x-moltin-customer-token"?: string;
|
|
1821
|
+
};
|
|
1822
|
+
path: {
|
|
1823
|
+
/**
|
|
1824
|
+
* The ID for the cart created by the customer. Ensure that you follow the guidelines for [Safe Characters](/guides/Getting-Started/safe-characters).
|
|
1825
|
+
*/
|
|
1826
|
+
cartID: string;
|
|
1827
|
+
};
|
|
1828
|
+
query?: never;
|
|
1829
|
+
url: "/v2/carts/{cartID}/relationships/customers";
|
|
1830
|
+
};
|
|
1831
|
+
export type CreateCustomerCartAssociationErrors = {
|
|
1832
|
+
/**
|
|
1833
|
+
* Unauthorized
|
|
1834
|
+
*/
|
|
1835
|
+
401: ResponseError;
|
|
1836
|
+
};
|
|
1837
|
+
export type CreateCustomerCartAssociationError = CreateCustomerCartAssociationErrors[keyof CreateCustomerCartAssociationErrors];
|
|
1838
|
+
export type CreateCustomerCartAssociationResponses = {
|
|
1839
|
+
/**
|
|
1840
|
+
* OK
|
|
1841
|
+
*/
|
|
1842
|
+
200: CartsRelationshipsCustomersData;
|
|
1843
|
+
};
|
|
1844
|
+
export type CreateCustomerCartAssociationResponse = CreateCustomerCartAssociationResponses[keyof CreateCustomerCartAssociationResponses];
|
|
1845
|
+
export type DeleteAPromotionViaPromotionCodeData = {
|
|
1846
|
+
body?: never;
|
|
1847
|
+
path: {
|
|
1848
|
+
/**
|
|
1849
|
+
* Specifies the unique identifier of a cart created by you.
|
|
1850
|
+
*/
|
|
1851
|
+
cartID: string;
|
|
1852
|
+
/**
|
|
1853
|
+
* Specifies the promotion code to be deleted.
|
|
1854
|
+
*/
|
|
1855
|
+
promoCode: string;
|
|
1856
|
+
};
|
|
1857
|
+
query?: never;
|
|
1858
|
+
url: "/v2/carts/{cartID}/discounts/{promoCode}";
|
|
1859
|
+
};
|
|
1860
|
+
export type DeleteAPromotionViaPromotionCodeErrors = {
|
|
1861
|
+
/**
|
|
1862
|
+
* Unauthorized
|
|
1863
|
+
*/
|
|
1864
|
+
401: ResponseError;
|
|
1865
|
+
};
|
|
1866
|
+
export type DeleteAPromotionViaPromotionCodeError = DeleteAPromotionViaPromotionCodeErrors[keyof DeleteAPromotionViaPromotionCodeErrors];
|
|
1867
|
+
export type DeleteAPromotionViaPromotionCodeResponses = {
|
|
1868
|
+
/**
|
|
1869
|
+
* No Content
|
|
1870
|
+
*/
|
|
1871
|
+
204: void;
|
|
1872
|
+
};
|
|
1873
|
+
export type DeleteAPromotionViaPromotionCodeResponse = DeleteAPromotionViaPromotionCodeResponses[keyof DeleteAPromotionViaPromotionCodeResponses];
|
|
1874
|
+
export type AddTaxItemToCartData = {
|
|
1875
|
+
body?: ResponseData & {
|
|
1876
|
+
data?: CartsItemsTaxesObject;
|
|
1877
|
+
};
|
|
1878
|
+
path: {
|
|
1879
|
+
/**
|
|
1880
|
+
* The unique identifier of the cart.
|
|
1881
|
+
*/
|
|
1882
|
+
cartID: string;
|
|
1883
|
+
/**
|
|
1884
|
+
* The unique identifier of the cart item.
|
|
1885
|
+
*/
|
|
1886
|
+
cartitemID: string;
|
|
1887
|
+
};
|
|
1888
|
+
query?: never;
|
|
1889
|
+
url: "/v2/carts/{cartID}/items/{cartitemID}/taxes";
|
|
1890
|
+
};
|
|
1891
|
+
export type AddTaxItemToCartErrors = {
|
|
1892
|
+
/**
|
|
1893
|
+
* Unauthorized
|
|
1894
|
+
*/
|
|
1895
|
+
401: ResponseError;
|
|
1896
|
+
/**
|
|
1897
|
+
* Unauthorized
|
|
1898
|
+
*/
|
|
1899
|
+
422: ResponseError;
|
|
1900
|
+
};
|
|
1901
|
+
export type AddTaxItemToCartError = AddTaxItemToCartErrors[keyof AddTaxItemToCartErrors];
|
|
1902
|
+
export type AddTaxItemToCartResponses = {
|
|
1903
|
+
200: ResponseData & {
|
|
1904
|
+
data?: CartsItemsTaxesObject;
|
|
1905
|
+
};
|
|
1906
|
+
};
|
|
1907
|
+
export type AddTaxItemToCartResponse = AddTaxItemToCartResponses[keyof AddTaxItemToCartResponses];
|
|
1908
|
+
export type BulkDeleteTaxItemsFromCartData = {
|
|
1909
|
+
body?: never;
|
|
1910
|
+
path: {
|
|
1911
|
+
/**
|
|
1912
|
+
* The unique identifier of the cart.
|
|
1913
|
+
*/
|
|
1914
|
+
cartID: string;
|
|
1915
|
+
};
|
|
1916
|
+
query?: never;
|
|
1917
|
+
url: "/v2/carts/{cartID}/taxes";
|
|
1918
|
+
};
|
|
1919
|
+
export type BulkDeleteTaxItemsFromCartErrors = {
|
|
1920
|
+
/**
|
|
1921
|
+
* Unauthorized
|
|
1922
|
+
*/
|
|
1923
|
+
401: ResponseError;
|
|
1924
|
+
};
|
|
1925
|
+
export type BulkDeleteTaxItemsFromCartError = BulkDeleteTaxItemsFromCartErrors[keyof BulkDeleteTaxItemsFromCartErrors];
|
|
1926
|
+
export type BulkDeleteTaxItemsFromCartResponses = {
|
|
1927
|
+
/**
|
|
1928
|
+
* No Content
|
|
1929
|
+
*/
|
|
1930
|
+
204: void;
|
|
1931
|
+
};
|
|
1932
|
+
export type BulkDeleteTaxItemsFromCartResponse = BulkDeleteTaxItemsFromCartResponses[keyof BulkDeleteTaxItemsFromCartResponses];
|
|
1933
|
+
export type BulkAddTaxItemsToCartData = {
|
|
1934
|
+
body?: CartsBulkTaxes;
|
|
1935
|
+
path: {
|
|
1936
|
+
/**
|
|
1937
|
+
* The unique identifier of the cart.
|
|
1938
|
+
*/
|
|
1939
|
+
cartID: string;
|
|
1940
|
+
};
|
|
1941
|
+
query?: never;
|
|
1942
|
+
url: "/v2/carts/{cartID}/taxes";
|
|
1943
|
+
};
|
|
1944
|
+
export type BulkAddTaxItemsToCartErrors = {
|
|
1945
|
+
/**
|
|
1946
|
+
* Unauthorized
|
|
1947
|
+
*/
|
|
1948
|
+
401: ResponseError;
|
|
1949
|
+
};
|
|
1950
|
+
export type BulkAddTaxItemsToCartError = BulkAddTaxItemsToCartErrors[keyof BulkAddTaxItemsToCartErrors];
|
|
1951
|
+
export type BulkAddTaxItemsToCartResponses = {
|
|
1952
|
+
200: CartsBulkTaxes;
|
|
1953
|
+
};
|
|
1954
|
+
export type BulkAddTaxItemsToCartResponse = BulkAddTaxItemsToCartResponses[keyof BulkAddTaxItemsToCartResponses];
|
|
1955
|
+
export type DeleteATaxItemData = {
|
|
1956
|
+
body?: never;
|
|
1957
|
+
path: {
|
|
1958
|
+
/**
|
|
1959
|
+
* The unique identifier of the cart.
|
|
1960
|
+
*/
|
|
1961
|
+
cartID: string;
|
|
1962
|
+
/**
|
|
1963
|
+
* The unique identifier of the cart item.
|
|
1964
|
+
*/
|
|
1965
|
+
cartitemID: string;
|
|
1966
|
+
/**
|
|
1967
|
+
* The unique identifier of the tax item.
|
|
1968
|
+
*/
|
|
1969
|
+
taxitemID: string;
|
|
1970
|
+
};
|
|
1971
|
+
query?: never;
|
|
1972
|
+
url: "/v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}";
|
|
1973
|
+
};
|
|
1974
|
+
export type DeleteATaxItemErrors = {
|
|
1975
|
+
/**
|
|
1976
|
+
* Unauthorized
|
|
1977
|
+
*/
|
|
1978
|
+
401: ResponseError;
|
|
1979
|
+
};
|
|
1980
|
+
export type DeleteATaxItemError = DeleteATaxItemErrors[keyof DeleteATaxItemErrors];
|
|
1981
|
+
export type DeleteATaxItemResponses = {
|
|
1982
|
+
/**
|
|
1983
|
+
* No Content
|
|
1984
|
+
*/
|
|
1985
|
+
204: void;
|
|
1986
|
+
};
|
|
1987
|
+
export type DeleteATaxItemResponse = DeleteATaxItemResponses[keyof DeleteATaxItemResponses];
|
|
1988
|
+
export type UpdateATaxItemData = {
|
|
1989
|
+
body?: ResponseData & {
|
|
1990
|
+
data?: CartsItemsTaxesObject;
|
|
1991
|
+
};
|
|
1992
|
+
path: {
|
|
1993
|
+
/**
|
|
1994
|
+
* The unique identifier of the cart.
|
|
1995
|
+
*/
|
|
1996
|
+
cartID: string;
|
|
1997
|
+
/**
|
|
1998
|
+
* The unique identifier of the cart item.
|
|
1999
|
+
*/
|
|
2000
|
+
cartitemID: string;
|
|
2001
|
+
/**
|
|
2002
|
+
* The unique identifier of the tax item.
|
|
2003
|
+
*/
|
|
2004
|
+
taxitemID: string;
|
|
2005
|
+
};
|
|
2006
|
+
query?: never;
|
|
2007
|
+
url: "/v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}";
|
|
2008
|
+
};
|
|
2009
|
+
export type UpdateATaxItemErrors = {
|
|
2010
|
+
/**
|
|
2011
|
+
* Unauthorized
|
|
2012
|
+
*/
|
|
2013
|
+
401: ResponseError;
|
|
2014
|
+
};
|
|
2015
|
+
export type UpdateATaxItemError = UpdateATaxItemErrors[keyof UpdateATaxItemErrors];
|
|
2016
|
+
export type UpdateATaxItemResponses = {
|
|
2017
|
+
200: ResponseData & {
|
|
2018
|
+
data?: CartsItemsTaxesObject;
|
|
2019
|
+
};
|
|
2020
|
+
};
|
|
2021
|
+
export type UpdateATaxItemResponse = UpdateATaxItemResponses[keyof UpdateATaxItemResponses];
|
|
2022
|
+
export type BulkDeleteCustomDiscountsFromCartData = {
|
|
2023
|
+
body?: never;
|
|
2024
|
+
path: {
|
|
2025
|
+
/**
|
|
2026
|
+
* Specifies the unique ID for the cart.
|
|
2027
|
+
*/
|
|
2028
|
+
cartID: string;
|
|
2029
|
+
};
|
|
2030
|
+
query?: never;
|
|
2031
|
+
url: "/v2/carts/{cartID}/custom-discounts";
|
|
2032
|
+
};
|
|
2033
|
+
export type BulkDeleteCustomDiscountsFromCartErrors = {
|
|
2034
|
+
/**
|
|
2035
|
+
* Unauthorized
|
|
2036
|
+
*/
|
|
2037
|
+
401: ResponseError;
|
|
2038
|
+
};
|
|
2039
|
+
export type BulkDeleteCustomDiscountsFromCartError = BulkDeleteCustomDiscountsFromCartErrors[keyof BulkDeleteCustomDiscountsFromCartErrors];
|
|
2040
|
+
export type BulkDeleteCustomDiscountsFromCartResponses = {
|
|
2041
|
+
/**
|
|
2042
|
+
* No Content
|
|
2043
|
+
*/
|
|
2044
|
+
204: void;
|
|
2045
|
+
};
|
|
2046
|
+
export type BulkDeleteCustomDiscountsFromCartResponse = BulkDeleteCustomDiscountsFromCartResponses[keyof BulkDeleteCustomDiscountsFromCartResponses];
|
|
2047
|
+
export type BulkAddCustomDiscountsToCartData = {
|
|
2048
|
+
body?: CartsBulkCustomDiscounts;
|
|
2049
|
+
path: {
|
|
2050
|
+
/**
|
|
2051
|
+
* Specifies the system generated ID for the cart that the shopper created.
|
|
2052
|
+
*/
|
|
2053
|
+
cartID: string;
|
|
2054
|
+
};
|
|
2055
|
+
query?: never;
|
|
2056
|
+
url: "/v2/carts/{cartID}/custom-discounts";
|
|
2057
|
+
};
|
|
2058
|
+
export type BulkAddCustomDiscountsToCartErrors = {
|
|
2059
|
+
/**
|
|
2060
|
+
* Unauthorized
|
|
2061
|
+
*/
|
|
2062
|
+
401: ResponseError;
|
|
2063
|
+
};
|
|
2064
|
+
export type BulkAddCustomDiscountsToCartError = BulkAddCustomDiscountsToCartErrors[keyof BulkAddCustomDiscountsToCartErrors];
|
|
2065
|
+
export type BulkAddCustomDiscountsToCartResponses = {
|
|
2066
|
+
200: CartsBulkCustomDiscountsResponse;
|
|
2067
|
+
};
|
|
2068
|
+
export type BulkAddCustomDiscountsToCartResponse = BulkAddCustomDiscountsToCartResponses[keyof BulkAddCustomDiscountsToCartResponses];
|
|
2069
|
+
export type DeleteCustomDiscountFromCartData = {
|
|
2070
|
+
body?: never;
|
|
2071
|
+
path: {
|
|
2072
|
+
/**
|
|
2073
|
+
* Specifies the unique ID for the cart.
|
|
2074
|
+
*/
|
|
2075
|
+
cartID: string;
|
|
2076
|
+
/**
|
|
2077
|
+
* Specifies the ID for the custom discount to be deleted.
|
|
2078
|
+
*/
|
|
2079
|
+
customdiscountID: string;
|
|
2080
|
+
};
|
|
2081
|
+
query?: never;
|
|
2082
|
+
url: "/v2/carts/{cartID}/custom-discounts/{customdiscountID}";
|
|
2083
|
+
};
|
|
2084
|
+
export type DeleteCustomDiscountFromCartErrors = {
|
|
2085
|
+
/**
|
|
2086
|
+
* Unauthorized
|
|
2087
|
+
*/
|
|
2088
|
+
401: ResponseError;
|
|
2089
|
+
};
|
|
2090
|
+
export type DeleteCustomDiscountFromCartError = DeleteCustomDiscountFromCartErrors[keyof DeleteCustomDiscountFromCartErrors];
|
|
2091
|
+
export type DeleteCustomDiscountFromCartResponses = {
|
|
2092
|
+
/**
|
|
2093
|
+
* No Content
|
|
2094
|
+
*/
|
|
2095
|
+
204: void;
|
|
2096
|
+
};
|
|
2097
|
+
export type DeleteCustomDiscountFromCartResponse = DeleteCustomDiscountFromCartResponses[keyof DeleteCustomDiscountFromCartResponses];
|
|
2098
|
+
export type UpdateCustomDiscountForCartData = {
|
|
2099
|
+
body?: ResponseData & {
|
|
2100
|
+
data?: CartsCustomDiscountsObject;
|
|
2101
|
+
};
|
|
2102
|
+
path: {
|
|
2103
|
+
/**
|
|
2104
|
+
* Specifies the unique ID for the cart.
|
|
2105
|
+
*/
|
|
2106
|
+
cartID: string;
|
|
2107
|
+
/**
|
|
2108
|
+
* Specifies the ID for the custom discount to be updated.
|
|
2109
|
+
*/
|
|
2110
|
+
customdiscountID: string;
|
|
2111
|
+
};
|
|
2112
|
+
query?: never;
|
|
2113
|
+
url: "/v2/carts/{cartID}/custom-discounts/{customdiscountID}";
|
|
2114
|
+
};
|
|
2115
|
+
export type UpdateCustomDiscountForCartErrors = {
|
|
2116
|
+
/**
|
|
2117
|
+
* Unauthorized
|
|
2118
|
+
*/
|
|
2119
|
+
401: ResponseError;
|
|
2120
|
+
};
|
|
2121
|
+
export type UpdateCustomDiscountForCartError = UpdateCustomDiscountForCartErrors[keyof UpdateCustomDiscountForCartErrors];
|
|
2122
|
+
export type UpdateCustomDiscountForCartResponses = {
|
|
2123
|
+
200: ResponseData & {
|
|
2124
|
+
data?: CartsCustomDiscountsResponse;
|
|
2125
|
+
};
|
|
2126
|
+
};
|
|
2127
|
+
export type UpdateCustomDiscountForCartResponse = UpdateCustomDiscountForCartResponses[keyof UpdateCustomDiscountForCartResponses];
|
|
2128
|
+
export type AddCustomDiscountToCartItemData = {
|
|
2129
|
+
body?: CartsCustomDiscountsObject;
|
|
2130
|
+
path: {
|
|
2131
|
+
/**
|
|
2132
|
+
* Specifies the ID for the cart.
|
|
2133
|
+
*/
|
|
2134
|
+
cartID: string;
|
|
2135
|
+
/**
|
|
2136
|
+
* Specifies the unique identifier for the cart item.
|
|
2137
|
+
*/
|
|
2138
|
+
cartitemID: string;
|
|
2139
|
+
};
|
|
2140
|
+
query?: never;
|
|
2141
|
+
url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts";
|
|
2142
|
+
};
|
|
2143
|
+
export type AddCustomDiscountToCartItemErrors = {
|
|
2144
|
+
/**
|
|
2145
|
+
* Unauthorized
|
|
2146
|
+
*/
|
|
2147
|
+
401: ResponseError;
|
|
2148
|
+
};
|
|
2149
|
+
export type AddCustomDiscountToCartItemError = AddCustomDiscountToCartItemErrors[keyof AddCustomDiscountToCartItemErrors];
|
|
2150
|
+
export type AddCustomDiscountToCartItemResponses = {
|
|
2151
|
+
200: ResponseData & {
|
|
2152
|
+
data?: CartsCustomDiscountsResponse;
|
|
2153
|
+
};
|
|
2154
|
+
};
|
|
2155
|
+
export type AddCustomDiscountToCartItemResponse = AddCustomDiscountToCartItemResponses[keyof AddCustomDiscountToCartItemResponses];
|
|
2156
|
+
export type DeleteCustomDiscountFromCartItemData = {
|
|
2157
|
+
body?: never;
|
|
2158
|
+
path: {
|
|
2159
|
+
/**
|
|
2160
|
+
* Specifies the ID for the cart.
|
|
2161
|
+
*/
|
|
2162
|
+
cartID: string;
|
|
2163
|
+
/**
|
|
2164
|
+
* Specifies the ID for the cart item.
|
|
2165
|
+
*/
|
|
2166
|
+
cartitemID: string;
|
|
2167
|
+
/**
|
|
2168
|
+
* Specifies the ID for the custom discount to be deleted.
|
|
2169
|
+
*/
|
|
2170
|
+
customdiscountID: string;
|
|
2171
|
+
};
|
|
2172
|
+
query?: never;
|
|
2173
|
+
url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}";
|
|
2174
|
+
};
|
|
2175
|
+
export type DeleteCustomDiscountFromCartItemErrors = {
|
|
2176
|
+
/**
|
|
2177
|
+
* Unauthorized
|
|
2178
|
+
*/
|
|
2179
|
+
401: ResponseError;
|
|
2180
|
+
};
|
|
2181
|
+
export type DeleteCustomDiscountFromCartItemError = DeleteCustomDiscountFromCartItemErrors[keyof DeleteCustomDiscountFromCartItemErrors];
|
|
2182
|
+
export type DeleteCustomDiscountFromCartItemResponses = {
|
|
2183
|
+
/**
|
|
2184
|
+
* No Content
|
|
2185
|
+
*/
|
|
2186
|
+
204: void;
|
|
2187
|
+
};
|
|
2188
|
+
export type DeleteCustomDiscountFromCartItemResponse = DeleteCustomDiscountFromCartItemResponses[keyof DeleteCustomDiscountFromCartItemResponses];
|
|
2189
|
+
export type UpdateCustomDiscountForCartItemData = {
|
|
2190
|
+
body?: ResponseData & {
|
|
2191
|
+
data?: CartsCustomDiscountsObject;
|
|
2192
|
+
};
|
|
2193
|
+
path: {
|
|
2194
|
+
/**
|
|
2195
|
+
* Specifies the ID for the cart.
|
|
2196
|
+
*/
|
|
2197
|
+
cartID: string;
|
|
2198
|
+
/**
|
|
2199
|
+
* Specifies the ID for the cart item.
|
|
2200
|
+
*/
|
|
2201
|
+
cartitemID: string;
|
|
2202
|
+
/**
|
|
2203
|
+
* Specifies the ID for the custom discount to be updated.
|
|
2204
|
+
*/
|
|
2205
|
+
customdiscountID: string;
|
|
2206
|
+
};
|
|
2207
|
+
query?: never;
|
|
2208
|
+
url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}";
|
|
2209
|
+
};
|
|
2210
|
+
export type UpdateCustomDiscountForCartItemErrors = {
|
|
2211
|
+
/**
|
|
2212
|
+
* Unauthorized
|
|
2213
|
+
*/
|
|
2214
|
+
401: ResponseError;
|
|
2215
|
+
};
|
|
2216
|
+
export type UpdateCustomDiscountForCartItemError = UpdateCustomDiscountForCartItemErrors[keyof UpdateCustomDiscountForCartItemErrors];
|
|
2217
|
+
export type UpdateCustomDiscountForCartItemResponses = {
|
|
2218
|
+
200: ResponseData & {
|
|
2219
|
+
data?: CartsCustomDiscountsResponse;
|
|
2220
|
+
};
|
|
2221
|
+
};
|
|
2222
|
+
export type UpdateCustomDiscountForCartItemResponse = UpdateCustomDiscountForCartItemResponses[keyof UpdateCustomDiscountForCartItemResponses];
|
|
2223
|
+
export type CreateCartPaymentIntentData = {
|
|
2224
|
+
body?: ElasticPathPaymentsPoweredByStripePayment;
|
|
2225
|
+
path: {
|
|
2226
|
+
/**
|
|
2227
|
+
* The universally unique identifier of the cart for which you want to create a payment intent.
|
|
2228
|
+
*/
|
|
2229
|
+
cartID: string;
|
|
2230
|
+
};
|
|
2231
|
+
query?: never;
|
|
2232
|
+
url: "/v2/carts/{cartID}/payments";
|
|
2233
|
+
};
|
|
2234
|
+
export type CreateCartPaymentIntentErrors = {
|
|
2235
|
+
/**
|
|
2236
|
+
* Unauthorized
|
|
2237
|
+
*/
|
|
2238
|
+
401: ResponseError;
|
|
2239
|
+
};
|
|
2240
|
+
export type CreateCartPaymentIntentError = CreateCartPaymentIntentErrors[keyof CreateCartPaymentIntentErrors];
|
|
2241
|
+
export type CreateCartPaymentIntentResponses = {
|
|
2242
|
+
/**
|
|
2243
|
+
* Payment Intent created successfully.
|
|
2244
|
+
*/
|
|
2245
|
+
201: CartResponse;
|
|
2246
|
+
};
|
|
2247
|
+
export type CreateCartPaymentIntentResponse = CreateCartPaymentIntentResponses[keyof CreateCartPaymentIntentResponses];
|
|
2248
|
+
export type CheckoutApiData = {
|
|
2249
|
+
body?: CustomerCheckout | AccountCheckout;
|
|
2250
|
+
headers?: {
|
|
2251
|
+
/**
|
|
2252
|
+
* An account management authentication token that identifies the authenticated account member.
|
|
2253
|
+
*/
|
|
2254
|
+
"EP-Account-Management-Authentication-Token"?: string;
|
|
2255
|
+
};
|
|
2256
|
+
path: {
|
|
2257
|
+
/**
|
|
2258
|
+
* The ID of the cart that you want to checkout.
|
|
2259
|
+
*/
|
|
2260
|
+
cartID: string;
|
|
2261
|
+
};
|
|
2262
|
+
query?: never;
|
|
2263
|
+
url: "/v2/carts/{cartID}/checkout";
|
|
2264
|
+
};
|
|
2265
|
+
export type CheckoutApiErrors = {
|
|
2266
|
+
/**
|
|
2267
|
+
* Unauthorized
|
|
2268
|
+
*/
|
|
2269
|
+
401: ResponseError;
|
|
2270
|
+
};
|
|
2271
|
+
export type CheckoutApiError = CheckoutApiErrors[keyof CheckoutApiErrors];
|
|
2272
|
+
export type CheckoutApiResponses = {
|
|
2273
|
+
/**
|
|
2274
|
+
* OK
|
|
2275
|
+
*/
|
|
2276
|
+
200: ResponseData & {
|
|
2277
|
+
data?: OrderResponse;
|
|
2278
|
+
};
|
|
2279
|
+
};
|
|
2280
|
+
export type CheckoutApiResponse = CheckoutApiResponses[keyof CheckoutApiResponses];
|
|
2281
|
+
export type GetCustomerOrdersData = {
|
|
2282
|
+
body?: never;
|
|
2283
|
+
headers?: {
|
|
2284
|
+
/**
|
|
2285
|
+
* A customer token to access a specific customer's orders.
|
|
2286
|
+
*/
|
|
2287
|
+
"x-moltin-customer-token"?: string;
|
|
2288
|
+
};
|
|
2289
|
+
path?: never;
|
|
2290
|
+
query?: never;
|
|
2291
|
+
url: "/v2/orders";
|
|
2292
|
+
};
|
|
2293
|
+
export type GetCustomerOrdersErrors = {
|
|
2294
|
+
/**
|
|
2295
|
+
* Unauthorized
|
|
2296
|
+
*/
|
|
2297
|
+
401: ResponseError;
|
|
2298
|
+
};
|
|
2299
|
+
export type GetCustomerOrdersError = GetCustomerOrdersErrors[keyof GetCustomerOrdersErrors];
|
|
2300
|
+
export type GetCustomerOrdersResponses = {
|
|
2301
|
+
200: ResponseData & {
|
|
2302
|
+
data?: Array<OrderResponse>;
|
|
2303
|
+
links?: ResponsePageLinks;
|
|
2304
|
+
meta?: ResponseMetaOrders;
|
|
2305
|
+
};
|
|
2306
|
+
};
|
|
2307
|
+
export type GetCustomerOrdersResponse = GetCustomerOrdersResponses[keyof GetCustomerOrdersResponses];
|
|
2308
|
+
export type GetAnOrderData = {
|
|
2309
|
+
body?: never;
|
|
2310
|
+
path: {
|
|
2311
|
+
/**
|
|
2312
|
+
* The ID of the order.
|
|
2313
|
+
*/
|
|
2314
|
+
orderID: string;
|
|
2315
|
+
};
|
|
2316
|
+
query?: never;
|
|
2317
|
+
url: "/v2/orders/{orderID}";
|
|
2318
|
+
};
|
|
2319
|
+
export type GetAnOrderErrors = {
|
|
2320
|
+
/**
|
|
2321
|
+
* Unauthorized
|
|
2322
|
+
*/
|
|
2323
|
+
401: ResponseError;
|
|
2324
|
+
};
|
|
2325
|
+
export type GetAnOrderError = GetAnOrderErrors[keyof GetAnOrderErrors];
|
|
2326
|
+
export type GetAnOrderResponses = {
|
|
2327
|
+
/**
|
|
2328
|
+
* OK
|
|
2329
|
+
*/
|
|
2330
|
+
200: ResponseData & {
|
|
2331
|
+
data?: OrderResponse;
|
|
2332
|
+
};
|
|
2333
|
+
};
|
|
2334
|
+
export type GetAnOrderResponse = GetAnOrderResponses[keyof GetAnOrderResponses];
|
|
2335
|
+
export type UpdateAnOrderData = {
|
|
2336
|
+
body?: OrdersUpdateRequest;
|
|
2337
|
+
path: {
|
|
2338
|
+
/**
|
|
2339
|
+
* The unique identifier of the order.
|
|
2340
|
+
*/
|
|
2341
|
+
orderID: string;
|
|
2342
|
+
};
|
|
2343
|
+
query?: never;
|
|
2344
|
+
url: "/v2/orders/{orderID}";
|
|
2345
|
+
};
|
|
2346
|
+
export type UpdateAnOrderErrors = {
|
|
2347
|
+
/**
|
|
2348
|
+
* Unauthorized
|
|
2349
|
+
*/
|
|
2350
|
+
401: ResponseError;
|
|
2351
|
+
};
|
|
2352
|
+
export type UpdateAnOrderError = UpdateAnOrderErrors[keyof UpdateAnOrderErrors];
|
|
2353
|
+
export type UpdateAnOrderResponses = {
|
|
2354
|
+
/**
|
|
2355
|
+
* OK
|
|
2356
|
+
*/
|
|
2357
|
+
200: ResponseData & {
|
|
2358
|
+
data?: OrderResponse;
|
|
2359
|
+
};
|
|
2360
|
+
};
|
|
2361
|
+
export type UpdateAnOrderResponse = UpdateAnOrderResponses[keyof UpdateAnOrderResponses];
|
|
2362
|
+
export type GetOrderItemsData = {
|
|
2363
|
+
body?: never;
|
|
2364
|
+
path: {
|
|
2365
|
+
/**
|
|
2366
|
+
* The ID of the order.
|
|
2367
|
+
*/
|
|
2368
|
+
orderID: string;
|
|
2369
|
+
};
|
|
2370
|
+
query?: never;
|
|
2371
|
+
url: "/v2/orders/{orderID}/items";
|
|
2372
|
+
};
|
|
2373
|
+
export type GetOrderItemsErrors = {
|
|
2374
|
+
/**
|
|
2375
|
+
* Unauthorized
|
|
2376
|
+
*/
|
|
2377
|
+
401: ResponseError;
|
|
2378
|
+
};
|
|
2379
|
+
export type GetOrderItemsError = GetOrderItemsErrors[keyof GetOrderItemsErrors];
|
|
2380
|
+
export type GetOrderItemsResponses = {
|
|
2381
|
+
200: ResponseData & {
|
|
2382
|
+
data?: Array<OrderItemResponse>;
|
|
2383
|
+
};
|
|
2384
|
+
};
|
|
2385
|
+
export type GetOrderItemsResponse = GetOrderItemsResponses[keyof GetOrderItemsResponses];
|
|
2386
|
+
export type AnonymizeOrdersData = {
|
|
2387
|
+
body?: OrdersAnonymizeRequest & unknown;
|
|
2388
|
+
path?: never;
|
|
2389
|
+
query?: never;
|
|
2390
|
+
url: "/v2/orders/anonymize";
|
|
2391
|
+
};
|
|
2392
|
+
export type AnonymizeOrdersErrors = {
|
|
2393
|
+
/**
|
|
2394
|
+
* Unauthorized
|
|
2395
|
+
*/
|
|
2396
|
+
401: ResponseError;
|
|
2397
|
+
/**
|
|
2398
|
+
* Not Found
|
|
2399
|
+
*/
|
|
2400
|
+
422: ResponseError;
|
|
2401
|
+
};
|
|
2402
|
+
export type AnonymizeOrdersError = AnonymizeOrdersErrors[keyof AnonymizeOrdersErrors];
|
|
2403
|
+
export type AnonymizeOrdersResponses = {
|
|
2404
|
+
/**
|
|
2405
|
+
* OK
|
|
2406
|
+
*/
|
|
2407
|
+
200: ResponseData & {
|
|
2408
|
+
data?: OrderResponse;
|
|
2409
|
+
};
|
|
2410
|
+
};
|
|
2411
|
+
export type AnonymizeOrdersResponse = AnonymizeOrdersResponses[keyof AnonymizeOrdersResponses];
|
|
2412
|
+
export type PaymentSetupData = {
|
|
2413
|
+
body?: PaymentsRequest;
|
|
2414
|
+
path: {
|
|
2415
|
+
/**
|
|
2416
|
+
* The Universally Unique Identifier (UUID) of the order you want to pay for.
|
|
2417
|
+
*/
|
|
2418
|
+
orderID: string;
|
|
2419
|
+
};
|
|
2420
|
+
query?: never;
|
|
2421
|
+
url: "/v2/orders/{orderID}/payments";
|
|
2422
|
+
};
|
|
2423
|
+
export type PaymentSetupErrors = {
|
|
2424
|
+
/**
|
|
2425
|
+
* Unauthorized
|
|
2426
|
+
*/
|
|
2427
|
+
401: ResponseError;
|
|
2428
|
+
};
|
|
2429
|
+
export type PaymentSetupError = PaymentSetupErrors[keyof PaymentSetupErrors];
|
|
2430
|
+
export type PaymentSetupResponses = {
|
|
2431
|
+
/**
|
|
2432
|
+
* OK
|
|
2433
|
+
*/
|
|
2434
|
+
200: ResponseData & {
|
|
2435
|
+
data?: TransactionResponse;
|
|
2436
|
+
};
|
|
2437
|
+
};
|
|
2438
|
+
export type PaymentSetupResponse = PaymentSetupResponses[keyof PaymentSetupResponses];
|
|
2439
|
+
export type ConfirmPaymentData = {
|
|
2440
|
+
body?: OrdersTransactionsConfirmRequest;
|
|
2441
|
+
path: {
|
|
2442
|
+
/**
|
|
2443
|
+
* The unique identifier of the order.
|
|
2444
|
+
*/
|
|
2445
|
+
orderID: string;
|
|
2446
|
+
/**
|
|
2447
|
+
* The unique identifier of the transaction.
|
|
2448
|
+
*/
|
|
2449
|
+
transactionID: string;
|
|
2450
|
+
};
|
|
2451
|
+
query?: never;
|
|
2452
|
+
url: "/v2/orders/{orderID}/transactions/{transactionID}/confirm";
|
|
2453
|
+
};
|
|
2454
|
+
export type ConfirmPaymentErrors = {
|
|
2455
|
+
/**
|
|
2456
|
+
* Unauthorized
|
|
2457
|
+
*/
|
|
2458
|
+
401: ResponseError;
|
|
2459
|
+
};
|
|
2460
|
+
export type ConfirmPaymentError = ConfirmPaymentErrors[keyof ConfirmPaymentErrors];
|
|
2461
|
+
export type ConfirmPaymentResponses = {
|
|
2462
|
+
200: ResponseData & {
|
|
2463
|
+
data?: TransactionResponse;
|
|
2464
|
+
};
|
|
2465
|
+
};
|
|
2466
|
+
export type ConfirmPaymentResponse = ConfirmPaymentResponses[keyof ConfirmPaymentResponses];
|
|
2467
|
+
export type CaptureATransactionData = {
|
|
2468
|
+
body?: OrdersTransactionsCaptureRequest;
|
|
2469
|
+
path: {
|
|
2470
|
+
/**
|
|
2471
|
+
* The UUID of the order.
|
|
2472
|
+
*/
|
|
2473
|
+
orderID: string;
|
|
2474
|
+
/**
|
|
2475
|
+
* The UUID of the transaction to capture.
|
|
2476
|
+
*/
|
|
2477
|
+
transactionID: string;
|
|
2478
|
+
};
|
|
2479
|
+
query?: never;
|
|
2480
|
+
url: "/v2/orders/{orderID}/transactions/{transactionID}/capture";
|
|
2481
|
+
};
|
|
2482
|
+
export type CaptureATransactionErrors = {
|
|
2483
|
+
/**
|
|
2484
|
+
* Unauthorized
|
|
2485
|
+
*/
|
|
2486
|
+
401: ResponseError;
|
|
2487
|
+
};
|
|
2488
|
+
export type CaptureATransactionError = CaptureATransactionErrors[keyof CaptureATransactionErrors];
|
|
2489
|
+
export type CaptureATransactionResponses = {
|
|
2490
|
+
200: ResponseData & {
|
|
2491
|
+
data?: TransactionResponse;
|
|
2492
|
+
};
|
|
2493
|
+
};
|
|
2494
|
+
export type CaptureATransactionResponse = CaptureATransactionResponses[keyof CaptureATransactionResponses];
|
|
2495
|
+
export type RefundATransactionData = {
|
|
2496
|
+
body?: OrdersTransactionsRefundRequest;
|
|
2497
|
+
path: {
|
|
2498
|
+
/**
|
|
2499
|
+
* The UUID of the order.
|
|
2500
|
+
*/
|
|
2501
|
+
orderID: string;
|
|
2502
|
+
/**
|
|
2503
|
+
* The UUID of the transaction you want to refund.
|
|
2504
|
+
*/
|
|
2505
|
+
transactionID: string;
|
|
2506
|
+
};
|
|
2507
|
+
query?: never;
|
|
2508
|
+
url: "/v2/orders/{orderID}/transactions/{transactionID}/refund";
|
|
2509
|
+
};
|
|
2510
|
+
export type RefundATransactionErrors = {
|
|
2511
|
+
/**
|
|
2512
|
+
* Unauthorized
|
|
2513
|
+
*/
|
|
2514
|
+
401: ResponseError;
|
|
2515
|
+
};
|
|
2516
|
+
export type RefundATransactionError = RefundATransactionErrors[keyof RefundATransactionErrors];
|
|
2517
|
+
export type RefundATransactionResponses = {
|
|
2518
|
+
200: ResponseData & {
|
|
2519
|
+
data?: TransactionResponse;
|
|
2520
|
+
};
|
|
2521
|
+
};
|
|
2522
|
+
export type RefundATransactionResponse = RefundATransactionResponses[keyof RefundATransactionResponses];
|
|
2523
|
+
export type GetOrderTransactionsData = {
|
|
2524
|
+
body?: never;
|
|
2525
|
+
path: {
|
|
2526
|
+
/**
|
|
2527
|
+
* The unique identifier of the order.
|
|
2528
|
+
*/
|
|
2529
|
+
orderID: string;
|
|
2530
|
+
};
|
|
2531
|
+
query?: never;
|
|
2532
|
+
url: "/v2/orders/{orderID}/transactions";
|
|
2533
|
+
};
|
|
2534
|
+
export type GetOrderTransactionsErrors = {
|
|
2535
|
+
/**
|
|
2536
|
+
* Unauthorized
|
|
2537
|
+
*/
|
|
2538
|
+
401: ResponseError;
|
|
2539
|
+
};
|
|
2540
|
+
export type GetOrderTransactionsError = GetOrderTransactionsErrors[keyof GetOrderTransactionsErrors];
|
|
2541
|
+
export type GetOrderTransactionsResponses = {
|
|
2542
|
+
200: ResponseData & {
|
|
2543
|
+
data?: Array<TransactionResponse>;
|
|
2544
|
+
};
|
|
2545
|
+
};
|
|
2546
|
+
export type GetOrderTransactionsResponse = GetOrderTransactionsResponses[keyof GetOrderTransactionsResponses];
|
|
2547
|
+
export type GetATransactionData = {
|
|
2548
|
+
body?: never;
|
|
2549
|
+
path: {
|
|
2550
|
+
/**
|
|
2551
|
+
* The unique identifier of the order that you require transactions for.
|
|
2552
|
+
*/
|
|
2553
|
+
orderID: string;
|
|
2554
|
+
/**
|
|
2555
|
+
* The unique identifier of the transaction.
|
|
2556
|
+
*/
|
|
2557
|
+
transactionID: string;
|
|
2558
|
+
};
|
|
2559
|
+
query?: never;
|
|
2560
|
+
url: "/v2/orders/{orderID}/transactions/{transactionID}";
|
|
2561
|
+
};
|
|
2562
|
+
export type GetATransactionErrors = {
|
|
2563
|
+
/**
|
|
2564
|
+
* Unauthorized
|
|
2565
|
+
*/
|
|
2566
|
+
401: ResponseError;
|
|
2567
|
+
};
|
|
2568
|
+
export type GetATransactionError = GetATransactionErrors[keyof GetATransactionErrors];
|
|
2569
|
+
export type GetATransactionResponses = {
|
|
2570
|
+
200: ResponseData & {
|
|
2571
|
+
data?: TransactionResponse;
|
|
2572
|
+
};
|
|
2573
|
+
};
|
|
2574
|
+
export type GetATransactionResponse = GetATransactionResponses[keyof GetATransactionResponses];
|
|
2575
|
+
export type CancelATransactionData = {
|
|
2576
|
+
body?: OrdersTransactionsCancelRequest;
|
|
2577
|
+
path: {
|
|
2578
|
+
/**
|
|
2579
|
+
* The unique identifier of the order.
|
|
2580
|
+
*/
|
|
2581
|
+
orderID: string;
|
|
2582
|
+
/**
|
|
2583
|
+
* The unique identifier of the transaction to be canceled or voided.
|
|
2584
|
+
*/
|
|
2585
|
+
transactionID: string;
|
|
2586
|
+
};
|
|
2587
|
+
query?: never;
|
|
2588
|
+
url: "/v2/orders/{orderID}/transactions/{transactionID}/cancel";
|
|
2589
|
+
};
|
|
2590
|
+
export type CancelATransactionErrors = {
|
|
2591
|
+
/**
|
|
2592
|
+
* Unauthorized
|
|
2593
|
+
*/
|
|
2594
|
+
401: ResponseError;
|
|
2595
|
+
};
|
|
2596
|
+
export type CancelATransactionError = CancelATransactionErrors[keyof CancelATransactionErrors];
|
|
2597
|
+
export type CancelATransactionResponses = {
|
|
2598
|
+
200: ResponseData & {
|
|
2599
|
+
data?: TransactionResponse;
|
|
2600
|
+
};
|
|
2601
|
+
};
|
|
2602
|
+
export type CancelATransactionResponse = CancelATransactionResponses[keyof CancelATransactionResponses];
|