@usethrottle/api-client 4.2.1 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/index.d.ts +2 -0
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +2 -0
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/services/ApplicationsService.d.ts +19 -0
- package/dist/generated/services/ApplicationsService.d.ts.map +1 -1
- package/dist/generated/services/ApplicationsService.js +41 -0
- package/dist/generated/services/ApplicationsService.js.map +1 -1
- package/dist/generated/services/CartsService.d.ts +117 -0
- package/dist/generated/services/CartsService.d.ts.map +1 -1
- package/dist/generated/services/CartsService.js.map +1 -1
- package/dist/generated/services/CheckoutSessionsService.d.ts +16 -1
- package/dist/generated/services/CheckoutSessionsService.d.ts.map +1 -1
- package/dist/generated/services/CheckoutSessionsService.js +24 -1
- package/dist/generated/services/CheckoutSessionsService.js.map +1 -1
- package/dist/generated/services/CustomersService.d.ts +24 -0
- package/dist/generated/services/CustomersService.d.ts.map +1 -1
- package/dist/generated/services/CustomersService.js +57 -0
- package/dist/generated/services/CustomersService.js.map +1 -1
- package/dist/generated/services/DefaultService.d.ts +500 -0
- package/dist/generated/services/DefaultService.d.ts.map +1 -1
- package/dist/generated/services/DefaultService.js +1097 -105
- package/dist/generated/services/DefaultService.js.map +1 -1
- package/dist/generated/services/EmbedService.d.ts +10 -0
- package/dist/generated/services/EmbedService.d.ts.map +1 -1
- package/dist/generated/services/EmbedService.js.map +1 -1
- package/dist/generated/services/ExtensionsService.d.ts +164 -1
- package/dist/generated/services/ExtensionsService.d.ts.map +1 -1
- package/dist/generated/services/ExtensionsService.js +192 -1
- package/dist/generated/services/ExtensionsService.js.map +1 -1
- package/dist/generated/services/FulfillmentsService.d.ts +78 -11
- package/dist/generated/services/FulfillmentsService.d.ts.map +1 -1
- package/dist/generated/services/FulfillmentsService.js +18 -18
- package/dist/generated/services/FulfillmentsService.js.map +1 -1
- package/dist/generated/services/ImportsService.d.ts +76 -0
- package/dist/generated/services/ImportsService.d.ts.map +1 -0
- package/dist/generated/services/ImportsService.js +174 -0
- package/dist/generated/services/ImportsService.js.map +1 -0
- package/dist/generated/services/OrdersService.d.ts +978 -227
- package/dist/generated/services/OrdersService.d.ts.map +1 -1
- package/dist/generated/services/OrdersService.js +53 -49
- package/dist/generated/services/OrdersService.js.map +1 -1
- package/dist/generated/services/PartnersService.d.ts +8 -0
- package/dist/generated/services/PartnersService.d.ts.map +1 -1
- package/dist/generated/services/PartnersService.js +19 -0
- package/dist/generated/services/PartnersService.js.map +1 -1
- package/dist/generated/services/PaymentMethodsService.d.ts +17 -0
- package/dist/generated/services/PaymentMethodsService.d.ts.map +1 -1
- package/dist/generated/services/PaymentMethodsService.js +38 -0
- package/dist/generated/services/PaymentMethodsService.js.map +1 -1
- package/dist/generated/services/PaymentsService.d.ts +58 -58
- package/dist/generated/services/PaymentsService.d.ts.map +1 -1
- package/dist/generated/services/PaymentsService.js +29 -25
- package/dist/generated/services/PaymentsService.js.map +1 -1
- package/dist/generated/services/QuotesService.d.ts +128 -1
- package/dist/generated/services/QuotesService.d.ts.map +1 -1
- package/dist/generated/services/QuotesService.js +68 -0
- package/dist/generated/services/QuotesService.js.map +1 -1
- package/dist/generated/services/ScriptsService.d.ts +110 -0
- package/dist/generated/services/ScriptsService.d.ts.map +1 -0
- package/dist/generated/services/ScriptsService.js +245 -0
- package/dist/generated/services/ScriptsService.js.map +1 -0
- package/dist/generated/services/SubscriptionsService.d.ts +144 -15
- package/dist/generated/services/SubscriptionsService.d.ts.map +1 -1
- package/dist/generated/services/SubscriptionsService.js +71 -0
- package/dist/generated/services/SubscriptionsService.js.map +1 -1
- package/dist/generated/services/WebhooksOutboundService.d.ts +9 -5
- package/dist/generated/services/WebhooksOutboundService.d.ts.map +1 -1
- package/dist/generated/services/WebhooksOutboundService.js +5 -1
- package/dist/generated/services/WebhooksOutboundService.js.map +1 -1
- package/dist/generated/services/WorkspacesService.d.ts +4 -0
- package/dist/generated/services/WorkspacesService.d.ts.map +1 -1
- package/dist/generated/services/WorkspacesService.js.map +1 -1
- package/package.json +11 -11
|
@@ -116,6 +116,16 @@ export declare class OrdersService {
|
|
|
116
116
|
taxTotal?: number;
|
|
117
117
|
buyerVatNumber?: string | null;
|
|
118
118
|
taxReverseCharge?: boolean;
|
|
119
|
+
taxProviderMessages?: Array<{
|
|
120
|
+
summary?: string;
|
|
121
|
+
details?: string;
|
|
122
|
+
citationCode?: string;
|
|
123
|
+
refersTo?: string;
|
|
124
|
+
severity?: string;
|
|
125
|
+
source?: string;
|
|
126
|
+
lineNumbers?: Array<string>;
|
|
127
|
+
lineItemIds?: Array<string>;
|
|
128
|
+
}>;
|
|
119
129
|
/**
|
|
120
130
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
121
131
|
*/
|
|
@@ -129,12 +139,17 @@ export declare class OrdersService {
|
|
|
129
139
|
*/
|
|
130
140
|
total?: number;
|
|
131
141
|
/**
|
|
132
|
-
*
|
|
142
|
+
* Balance written off. A credit against the order, not a re-pricing of it: `total` is unchanged, and what the buyer owes is `total - compAmount`.
|
|
133
143
|
*/
|
|
134
144
|
compAmount?: number;
|
|
135
145
|
compReason?: string | null;
|
|
136
146
|
compedAt?: string | null;
|
|
137
147
|
compedBy?: string | null;
|
|
148
|
+
onHold?: boolean;
|
|
149
|
+
holdReason?: string | null;
|
|
150
|
+
heldAt?: string | null;
|
|
151
|
+
heldBy?: string | null;
|
|
152
|
+
notes?: string | null;
|
|
138
153
|
/**
|
|
139
154
|
* Arbitrary key-value metadata
|
|
140
155
|
*/
|
|
@@ -177,7 +192,15 @@ export declare class OrdersService {
|
|
|
177
192
|
phone?: string;
|
|
178
193
|
email?: string;
|
|
179
194
|
} | null;
|
|
195
|
+
shippingMethod?: {
|
|
196
|
+
methodId?: string;
|
|
197
|
+
displayName?: string;
|
|
198
|
+
carrier?: string | null;
|
|
199
|
+
serviceCode?: string | null;
|
|
200
|
+
amount?: number;
|
|
201
|
+
} | null;
|
|
180
202
|
customerId?: string | null;
|
|
203
|
+
subscriptionId?: string | null;
|
|
181
204
|
customer?: {
|
|
182
205
|
id?: string;
|
|
183
206
|
email?: string;
|
|
@@ -190,10 +213,40 @@ export declare class OrdersService {
|
|
|
190
213
|
closedAt?: string | null;
|
|
191
214
|
createdAt?: string;
|
|
192
215
|
updatedAt?: string;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
216
|
+
lineItems?: Array<{
|
|
217
|
+
id?: string;
|
|
218
|
+
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
219
|
+
referenceId?: string | null;
|
|
220
|
+
name?: string;
|
|
221
|
+
description?: string | null;
|
|
222
|
+
/**
|
|
223
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
224
|
+
*/
|
|
225
|
+
unitPrice?: number;
|
|
226
|
+
quantity?: number;
|
|
227
|
+
/**
|
|
228
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
229
|
+
*/
|
|
230
|
+
subtotal?: number;
|
|
231
|
+
/**
|
|
232
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
233
|
+
*/
|
|
234
|
+
taxAmount?: number;
|
|
235
|
+
/**
|
|
236
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
237
|
+
*/
|
|
238
|
+
discountAmount?: number;
|
|
239
|
+
/**
|
|
240
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
241
|
+
*/
|
|
242
|
+
total?: number;
|
|
243
|
+
imageUrl?: string | null;
|
|
244
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
245
|
+
/**
|
|
246
|
+
* Arbitrary key-value metadata
|
|
247
|
+
*/
|
|
248
|
+
metadata?: Record<string, any>;
|
|
249
|
+
}>;
|
|
197
250
|
};
|
|
198
251
|
meta?: {
|
|
199
252
|
requestId?: string;
|
|
@@ -211,17 +264,17 @@ export declare class OrdersService {
|
|
|
211
264
|
* @param status
|
|
212
265
|
* @param paymentStatus
|
|
213
266
|
* @param type
|
|
214
|
-
* @param delivery Where the goods are. Derived from shipment and return records, not an order column: `in_transit` = something shipped and something has not arrived, `delivered` = every shipment arrived, `returned` = any items came back (a partial return included).
|
|
267
|
+
* @param delivery Where the goods are. Derived from shipment and return records, not an order column: `not_shipped` = nothing has left yet on an order that still owes goods (status `processing` or `partially_fulfilled`, no returns), `in_transit` = something shipped and something has not arrived, `delivered` = every shipment arrived, `returned` = any items came back (a partial return included).
|
|
215
268
|
* @param source
|
|
216
269
|
* @param q Search order id, number, source, status, or metadata.
|
|
217
270
|
* @param customerId
|
|
218
|
-
* @param subscriptionId Return only the orders this subscription billed (exact match on the
|
|
271
|
+
* @param subscriptionId Return only the orders this subscription billed (exact match on `subscriptionId`, or on the legacy `metadata.subscription_id` pointer). Covers renewals, plan-change charges and the signup order.
|
|
219
272
|
* @param createdAfter ISO 8601 lower bound on creation time, EXCLUSIVE (created_at > value).
|
|
220
273
|
* @param createdBefore ISO 8601 upper bound on creation time, EXCLUSIVE (created_at < value).
|
|
221
274
|
* @returns any Default Response
|
|
222
275
|
* @throws ApiError
|
|
223
276
|
*/
|
|
224
|
-
static getApiV1Orders(xThrottleEnvironmentId?: string, cursor?: string, limit?: number, status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed', paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired', type?: 'one_time' | 'recurring' | 'mixed', delivery?: 'in_transit' | 'delivered' | 'returned', source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine', q?: string, customerId?: string, subscriptionId?: string, createdAfter?: string, createdBefore?: string): CancelablePromise<{
|
|
277
|
+
static getApiV1Orders(xThrottleEnvironmentId?: string, cursor?: string, limit?: number, status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed', paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired', type?: 'one_time' | 'recurring' | 'mixed', delivery?: 'not_shipped' | 'in_transit' | 'delivered' | 'returned', source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine', q?: string, customerId?: string, subscriptionId?: string, createdAfter?: string, createdBefore?: string): CancelablePromise<{
|
|
225
278
|
data?: Array<{
|
|
226
279
|
id?: string;
|
|
227
280
|
workspaceId?: string;
|
|
@@ -249,6 +302,16 @@ export declare class OrdersService {
|
|
|
249
302
|
taxTotal?: number;
|
|
250
303
|
buyerVatNumber?: string | null;
|
|
251
304
|
taxReverseCharge?: boolean;
|
|
305
|
+
taxProviderMessages?: Array<{
|
|
306
|
+
summary?: string;
|
|
307
|
+
details?: string;
|
|
308
|
+
citationCode?: string;
|
|
309
|
+
refersTo?: string;
|
|
310
|
+
severity?: string;
|
|
311
|
+
source?: string;
|
|
312
|
+
lineNumbers?: Array<string>;
|
|
313
|
+
lineItemIds?: Array<string>;
|
|
314
|
+
}>;
|
|
252
315
|
/**
|
|
253
316
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
254
317
|
*/
|
|
@@ -262,12 +325,17 @@ export declare class OrdersService {
|
|
|
262
325
|
*/
|
|
263
326
|
total?: number;
|
|
264
327
|
/**
|
|
265
|
-
*
|
|
328
|
+
* Balance written off. A credit against the order, not a re-pricing of it: `total` is unchanged, and what the buyer owes is `total - compAmount`.
|
|
266
329
|
*/
|
|
267
330
|
compAmount?: number;
|
|
268
331
|
compReason?: string | null;
|
|
269
332
|
compedAt?: string | null;
|
|
270
333
|
compedBy?: string | null;
|
|
334
|
+
onHold?: boolean;
|
|
335
|
+
holdReason?: string | null;
|
|
336
|
+
heldAt?: string | null;
|
|
337
|
+
heldBy?: string | null;
|
|
338
|
+
notes?: string | null;
|
|
271
339
|
/**
|
|
272
340
|
* Arbitrary key-value metadata
|
|
273
341
|
*/
|
|
@@ -310,7 +378,15 @@ export declare class OrdersService {
|
|
|
310
378
|
phone?: string;
|
|
311
379
|
email?: string;
|
|
312
380
|
} | null;
|
|
381
|
+
shippingMethod?: {
|
|
382
|
+
methodId?: string;
|
|
383
|
+
displayName?: string;
|
|
384
|
+
carrier?: string | null;
|
|
385
|
+
serviceCode?: string | null;
|
|
386
|
+
amount?: number;
|
|
387
|
+
} | null;
|
|
313
388
|
customerId?: string | null;
|
|
389
|
+
subscriptionId?: string | null;
|
|
314
390
|
customer?: {
|
|
315
391
|
id?: string;
|
|
316
392
|
email?: string;
|
|
@@ -323,10 +399,40 @@ export declare class OrdersService {
|
|
|
323
399
|
closedAt?: string | null;
|
|
324
400
|
createdAt?: string;
|
|
325
401
|
updatedAt?: string;
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
402
|
+
lineItems?: Array<{
|
|
403
|
+
id?: string;
|
|
404
|
+
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
405
|
+
referenceId?: string | null;
|
|
406
|
+
name?: string;
|
|
407
|
+
description?: string | null;
|
|
408
|
+
/**
|
|
409
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
410
|
+
*/
|
|
411
|
+
unitPrice?: number;
|
|
412
|
+
quantity?: number;
|
|
413
|
+
/**
|
|
414
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
415
|
+
*/
|
|
416
|
+
subtotal?: number;
|
|
417
|
+
/**
|
|
418
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
419
|
+
*/
|
|
420
|
+
taxAmount?: number;
|
|
421
|
+
/**
|
|
422
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
423
|
+
*/
|
|
424
|
+
discountAmount?: number;
|
|
425
|
+
/**
|
|
426
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
427
|
+
*/
|
|
428
|
+
total?: number;
|
|
429
|
+
imageUrl?: string | null;
|
|
430
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
431
|
+
/**
|
|
432
|
+
* Arbitrary key-value metadata
|
|
433
|
+
*/
|
|
434
|
+
metadata?: Record<string, any>;
|
|
435
|
+
}>;
|
|
330
436
|
}>;
|
|
331
437
|
meta?: {
|
|
332
438
|
requestId?: string;
|
|
@@ -344,19 +450,19 @@ export declare class OrdersService {
|
|
|
344
450
|
* @param status
|
|
345
451
|
* @param paymentStatus
|
|
346
452
|
* @param type
|
|
347
|
-
* @param delivery Where the goods are. Derived from shipment and return records, not an order column: `in_transit` = something shipped and something has not arrived, `delivered` = every shipment arrived, `returned` = any items came back (a partial return included).
|
|
453
|
+
* @param delivery Where the goods are. Derived from shipment and return records, not an order column: `not_shipped` = nothing has left yet on an order that still owes goods (status `processing` or `partially_fulfilled`, no returns), `in_transit` = something shipped and something has not arrived, `delivered` = every shipment arrived, `returned` = any items came back (a partial return included).
|
|
348
454
|
* @param source
|
|
349
455
|
* @param q Search order id, number, source, status, or metadata.
|
|
350
456
|
* @param customerId
|
|
351
|
-
* @param subscriptionId Return only the orders this subscription billed (exact match on the
|
|
457
|
+
* @param subscriptionId Return only the orders this subscription billed (exact match on `subscriptionId`, or on the legacy `metadata.subscription_id` pointer). Covers renewals, plan-change charges and the signup order.
|
|
352
458
|
* @param createdAfter ISO 8601 lower bound on creation time, EXCLUSIVE (created_at > value).
|
|
353
459
|
* @param createdBefore ISO 8601 upper bound on creation time, EXCLUSIVE (created_at < value).
|
|
354
460
|
* @returns any Default Response
|
|
355
461
|
* @throws ApiError
|
|
356
462
|
*/
|
|
357
|
-
static getApiV1OrdersExportCsv(xThrottleEnvironmentId?: string, cursor?: string, limit?: number, status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed', paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired', type?: 'one_time' | 'recurring' | 'mixed', delivery?: 'in_transit' | 'delivered' | 'returned', source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine', q?: string, customerId?: string, subscriptionId?: string, createdAfter?: string, createdBefore?: string): CancelablePromise<any>;
|
|
463
|
+
static getApiV1OrdersExportCsv(xThrottleEnvironmentId?: string, cursor?: string, limit?: number, status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed', paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired', type?: 'one_time' | 'recurring' | 'mixed', delivery?: 'not_shipped' | 'in_transit' | 'delivered' | 'returned', source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine', q?: string, customerId?: string, subscriptionId?: string, createdAfter?: string, createdBefore?: string): CancelablePromise<any>;
|
|
358
464
|
/**
|
|
359
|
-
* Get an order by ID (includes line items)
|
|
465
|
+
* Get an order by ID (includes line items, plus `capturedAmount` and `refundedAmount`)
|
|
360
466
|
* @param id
|
|
361
467
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
362
468
|
* @returns any Default Response
|
|
@@ -390,6 +496,16 @@ export declare class OrdersService {
|
|
|
390
496
|
taxTotal?: number;
|
|
391
497
|
buyerVatNumber?: string | null;
|
|
392
498
|
taxReverseCharge?: boolean;
|
|
499
|
+
taxProviderMessages?: Array<{
|
|
500
|
+
summary?: string;
|
|
501
|
+
details?: string;
|
|
502
|
+
citationCode?: string;
|
|
503
|
+
refersTo?: string;
|
|
504
|
+
severity?: string;
|
|
505
|
+
source?: string;
|
|
506
|
+
lineNumbers?: Array<string>;
|
|
507
|
+
lineItemIds?: Array<string>;
|
|
508
|
+
}>;
|
|
393
509
|
/**
|
|
394
510
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
395
511
|
*/
|
|
@@ -403,12 +519,17 @@ export declare class OrdersService {
|
|
|
403
519
|
*/
|
|
404
520
|
total?: number;
|
|
405
521
|
/**
|
|
406
|
-
*
|
|
522
|
+
* Balance written off. A credit against the order, not a re-pricing of it: `total` is unchanged, and what the buyer owes is `total - compAmount`.
|
|
407
523
|
*/
|
|
408
524
|
compAmount?: number;
|
|
409
525
|
compReason?: string | null;
|
|
410
526
|
compedAt?: string | null;
|
|
411
527
|
compedBy?: string | null;
|
|
528
|
+
onHold?: boolean;
|
|
529
|
+
holdReason?: string | null;
|
|
530
|
+
heldAt?: string | null;
|
|
531
|
+
heldBy?: string | null;
|
|
532
|
+
notes?: string | null;
|
|
412
533
|
/**
|
|
413
534
|
* Arbitrary key-value metadata
|
|
414
535
|
*/
|
|
@@ -451,7 +572,15 @@ export declare class OrdersService {
|
|
|
451
572
|
phone?: string;
|
|
452
573
|
email?: string;
|
|
453
574
|
} | null;
|
|
575
|
+
shippingMethod?: {
|
|
576
|
+
methodId?: string;
|
|
577
|
+
displayName?: string;
|
|
578
|
+
carrier?: string | null;
|
|
579
|
+
serviceCode?: string | null;
|
|
580
|
+
amount?: number;
|
|
581
|
+
} | null;
|
|
454
582
|
customerId?: string | null;
|
|
583
|
+
subscriptionId?: string | null;
|
|
455
584
|
customer?: {
|
|
456
585
|
id?: string;
|
|
457
586
|
email?: string;
|
|
@@ -464,10 +593,48 @@ export declare class OrdersService {
|
|
|
464
593
|
closedAt?: string | null;
|
|
465
594
|
createdAt?: string;
|
|
466
595
|
updatedAt?: string;
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
596
|
+
lineItems?: Array<{
|
|
597
|
+
id?: string;
|
|
598
|
+
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
599
|
+
referenceId?: string | null;
|
|
600
|
+
name?: string;
|
|
601
|
+
description?: string | null;
|
|
602
|
+
/**
|
|
603
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
604
|
+
*/
|
|
605
|
+
unitPrice?: number;
|
|
606
|
+
quantity?: number;
|
|
607
|
+
/**
|
|
608
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
609
|
+
*/
|
|
610
|
+
subtotal?: number;
|
|
611
|
+
/**
|
|
612
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
613
|
+
*/
|
|
614
|
+
taxAmount?: number;
|
|
615
|
+
/**
|
|
616
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
617
|
+
*/
|
|
618
|
+
discountAmount?: number;
|
|
619
|
+
/**
|
|
620
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
621
|
+
*/
|
|
622
|
+
total?: number;
|
|
623
|
+
imageUrl?: string | null;
|
|
624
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
625
|
+
/**
|
|
626
|
+
* Arbitrary key-value metadata
|
|
627
|
+
*/
|
|
628
|
+
metadata?: Record<string, any>;
|
|
629
|
+
}>;
|
|
630
|
+
/**
|
|
631
|
+
* What this order actually collected, before refunds. Not the same as `total` on a partially-paid order.
|
|
632
|
+
*/
|
|
633
|
+
capturedAmount?: number;
|
|
634
|
+
/**
|
|
635
|
+
* How much of the captured money went back. `paymentStatus: "refunded"` says a full refund happened; this says how much it was.
|
|
636
|
+
*/
|
|
637
|
+
refundedAmount?: number;
|
|
471
638
|
};
|
|
472
639
|
meta?: {
|
|
473
640
|
requestId?: string;
|
|
@@ -557,6 +724,16 @@ export declare class OrdersService {
|
|
|
557
724
|
taxTotal?: number;
|
|
558
725
|
buyerVatNumber?: string | null;
|
|
559
726
|
taxReverseCharge?: boolean;
|
|
727
|
+
taxProviderMessages?: Array<{
|
|
728
|
+
summary?: string;
|
|
729
|
+
details?: string;
|
|
730
|
+
citationCode?: string;
|
|
731
|
+
refersTo?: string;
|
|
732
|
+
severity?: string;
|
|
733
|
+
source?: string;
|
|
734
|
+
lineNumbers?: Array<string>;
|
|
735
|
+
lineItemIds?: Array<string>;
|
|
736
|
+
}>;
|
|
560
737
|
/**
|
|
561
738
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
562
739
|
*/
|
|
@@ -570,12 +747,17 @@ export declare class OrdersService {
|
|
|
570
747
|
*/
|
|
571
748
|
total?: number;
|
|
572
749
|
/**
|
|
573
|
-
*
|
|
750
|
+
* Balance written off. A credit against the order, not a re-pricing of it: `total` is unchanged, and what the buyer owes is `total - compAmount`.
|
|
574
751
|
*/
|
|
575
752
|
compAmount?: number;
|
|
576
753
|
compReason?: string | null;
|
|
577
754
|
compedAt?: string | null;
|
|
578
755
|
compedBy?: string | null;
|
|
756
|
+
onHold?: boolean;
|
|
757
|
+
holdReason?: string | null;
|
|
758
|
+
heldAt?: string | null;
|
|
759
|
+
heldBy?: string | null;
|
|
760
|
+
notes?: string | null;
|
|
579
761
|
/**
|
|
580
762
|
* Arbitrary key-value metadata
|
|
581
763
|
*/
|
|
@@ -618,7 +800,15 @@ export declare class OrdersService {
|
|
|
618
800
|
phone?: string;
|
|
619
801
|
email?: string;
|
|
620
802
|
} | null;
|
|
803
|
+
shippingMethod?: {
|
|
804
|
+
methodId?: string;
|
|
805
|
+
displayName?: string;
|
|
806
|
+
carrier?: string | null;
|
|
807
|
+
serviceCode?: string | null;
|
|
808
|
+
amount?: number;
|
|
809
|
+
} | null;
|
|
621
810
|
customerId?: string | null;
|
|
811
|
+
subscriptionId?: string | null;
|
|
622
812
|
customer?: {
|
|
623
813
|
id?: string;
|
|
624
814
|
email?: string;
|
|
@@ -631,10 +821,40 @@ export declare class OrdersService {
|
|
|
631
821
|
closedAt?: string | null;
|
|
632
822
|
createdAt?: string;
|
|
633
823
|
updatedAt?: string;
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
824
|
+
lineItems?: Array<{
|
|
825
|
+
id?: string;
|
|
826
|
+
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
827
|
+
referenceId?: string | null;
|
|
828
|
+
name?: string;
|
|
829
|
+
description?: string | null;
|
|
830
|
+
/**
|
|
831
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
832
|
+
*/
|
|
833
|
+
unitPrice?: number;
|
|
834
|
+
quantity?: number;
|
|
835
|
+
/**
|
|
836
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
837
|
+
*/
|
|
838
|
+
subtotal?: number;
|
|
839
|
+
/**
|
|
840
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
841
|
+
*/
|
|
842
|
+
taxAmount?: number;
|
|
843
|
+
/**
|
|
844
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
845
|
+
*/
|
|
846
|
+
discountAmount?: number;
|
|
847
|
+
/**
|
|
848
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
849
|
+
*/
|
|
850
|
+
total?: number;
|
|
851
|
+
imageUrl?: string | null;
|
|
852
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
853
|
+
/**
|
|
854
|
+
* Arbitrary key-value metadata
|
|
855
|
+
*/
|
|
856
|
+
metadata?: Record<string, any>;
|
|
857
|
+
}>;
|
|
638
858
|
};
|
|
639
859
|
meta?: {
|
|
640
860
|
requestId?: string;
|
|
@@ -679,6 +899,16 @@ export declare class OrdersService {
|
|
|
679
899
|
taxTotal?: number;
|
|
680
900
|
buyerVatNumber?: string | null;
|
|
681
901
|
taxReverseCharge?: boolean;
|
|
902
|
+
taxProviderMessages?: Array<{
|
|
903
|
+
summary?: string;
|
|
904
|
+
details?: string;
|
|
905
|
+
citationCode?: string;
|
|
906
|
+
refersTo?: string;
|
|
907
|
+
severity?: string;
|
|
908
|
+
source?: string;
|
|
909
|
+
lineNumbers?: Array<string>;
|
|
910
|
+
lineItemIds?: Array<string>;
|
|
911
|
+
}>;
|
|
682
912
|
/**
|
|
683
913
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
684
914
|
*/
|
|
@@ -692,12 +922,17 @@ export declare class OrdersService {
|
|
|
692
922
|
*/
|
|
693
923
|
total?: number;
|
|
694
924
|
/**
|
|
695
|
-
*
|
|
925
|
+
* Balance written off. A credit against the order, not a re-pricing of it: `total` is unchanged, and what the buyer owes is `total - compAmount`.
|
|
696
926
|
*/
|
|
697
927
|
compAmount?: number;
|
|
698
928
|
compReason?: string | null;
|
|
699
929
|
compedAt?: string | null;
|
|
700
930
|
compedBy?: string | null;
|
|
931
|
+
onHold?: boolean;
|
|
932
|
+
holdReason?: string | null;
|
|
933
|
+
heldAt?: string | null;
|
|
934
|
+
heldBy?: string | null;
|
|
935
|
+
notes?: string | null;
|
|
701
936
|
/**
|
|
702
937
|
* Arbitrary key-value metadata
|
|
703
938
|
*/
|
|
@@ -740,7 +975,15 @@ export declare class OrdersService {
|
|
|
740
975
|
phone?: string;
|
|
741
976
|
email?: string;
|
|
742
977
|
} | null;
|
|
978
|
+
shippingMethod?: {
|
|
979
|
+
methodId?: string;
|
|
980
|
+
displayName?: string;
|
|
981
|
+
carrier?: string | null;
|
|
982
|
+
serviceCode?: string | null;
|
|
983
|
+
amount?: number;
|
|
984
|
+
} | null;
|
|
743
985
|
customerId?: string | null;
|
|
986
|
+
subscriptionId?: string | null;
|
|
744
987
|
customer?: {
|
|
745
988
|
id?: string;
|
|
746
989
|
email?: string;
|
|
@@ -753,10 +996,40 @@ export declare class OrdersService {
|
|
|
753
996
|
closedAt?: string | null;
|
|
754
997
|
createdAt?: string;
|
|
755
998
|
updatedAt?: string;
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
999
|
+
lineItems?: Array<{
|
|
1000
|
+
id?: string;
|
|
1001
|
+
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
1002
|
+
referenceId?: string | null;
|
|
1003
|
+
name?: string;
|
|
1004
|
+
description?: string | null;
|
|
1005
|
+
/**
|
|
1006
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1007
|
+
*/
|
|
1008
|
+
unitPrice?: number;
|
|
1009
|
+
quantity?: number;
|
|
1010
|
+
/**
|
|
1011
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1012
|
+
*/
|
|
1013
|
+
subtotal?: number;
|
|
1014
|
+
/**
|
|
1015
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1016
|
+
*/
|
|
1017
|
+
taxAmount?: number;
|
|
1018
|
+
/**
|
|
1019
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1020
|
+
*/
|
|
1021
|
+
discountAmount?: number;
|
|
1022
|
+
/**
|
|
1023
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1024
|
+
*/
|
|
1025
|
+
total?: number;
|
|
1026
|
+
imageUrl?: string | null;
|
|
1027
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
1028
|
+
/**
|
|
1029
|
+
* Arbitrary key-value metadata
|
|
1030
|
+
*/
|
|
1031
|
+
metadata?: Record<string, any>;
|
|
1032
|
+
}>;
|
|
760
1033
|
};
|
|
761
1034
|
meta?: {
|
|
762
1035
|
requestId?: string;
|
|
@@ -804,6 +1077,16 @@ export declare class OrdersService {
|
|
|
804
1077
|
taxTotal?: number;
|
|
805
1078
|
buyerVatNumber?: string | null;
|
|
806
1079
|
taxReverseCharge?: boolean;
|
|
1080
|
+
taxProviderMessages?: Array<{
|
|
1081
|
+
summary?: string;
|
|
1082
|
+
details?: string;
|
|
1083
|
+
citationCode?: string;
|
|
1084
|
+
refersTo?: string;
|
|
1085
|
+
severity?: string;
|
|
1086
|
+
source?: string;
|
|
1087
|
+
lineNumbers?: Array<string>;
|
|
1088
|
+
lineItemIds?: Array<string>;
|
|
1089
|
+
}>;
|
|
807
1090
|
/**
|
|
808
1091
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
809
1092
|
*/
|
|
@@ -817,12 +1100,17 @@ export declare class OrdersService {
|
|
|
817
1100
|
*/
|
|
818
1101
|
total?: number;
|
|
819
1102
|
/**
|
|
820
|
-
*
|
|
1103
|
+
* Balance written off. A credit against the order, not a re-pricing of it: `total` is unchanged, and what the buyer owes is `total - compAmount`.
|
|
821
1104
|
*/
|
|
822
1105
|
compAmount?: number;
|
|
823
1106
|
compReason?: string | null;
|
|
824
1107
|
compedAt?: string | null;
|
|
825
1108
|
compedBy?: string | null;
|
|
1109
|
+
onHold?: boolean;
|
|
1110
|
+
holdReason?: string | null;
|
|
1111
|
+
heldAt?: string | null;
|
|
1112
|
+
heldBy?: string | null;
|
|
1113
|
+
notes?: string | null;
|
|
826
1114
|
/**
|
|
827
1115
|
* Arbitrary key-value metadata
|
|
828
1116
|
*/
|
|
@@ -865,7 +1153,15 @@ export declare class OrdersService {
|
|
|
865
1153
|
phone?: string;
|
|
866
1154
|
email?: string;
|
|
867
1155
|
} | null;
|
|
1156
|
+
shippingMethod?: {
|
|
1157
|
+
methodId?: string;
|
|
1158
|
+
displayName?: string;
|
|
1159
|
+
carrier?: string | null;
|
|
1160
|
+
serviceCode?: string | null;
|
|
1161
|
+
amount?: number;
|
|
1162
|
+
} | null;
|
|
868
1163
|
customerId?: string | null;
|
|
1164
|
+
subscriptionId?: string | null;
|
|
869
1165
|
customer?: {
|
|
870
1166
|
id?: string;
|
|
871
1167
|
email?: string;
|
|
@@ -878,10 +1174,40 @@ export declare class OrdersService {
|
|
|
878
1174
|
closedAt?: string | null;
|
|
879
1175
|
createdAt?: string;
|
|
880
1176
|
updatedAt?: string;
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
1177
|
+
lineItems?: Array<{
|
|
1178
|
+
id?: string;
|
|
1179
|
+
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
1180
|
+
referenceId?: string | null;
|
|
1181
|
+
name?: string;
|
|
1182
|
+
description?: string | null;
|
|
1183
|
+
/**
|
|
1184
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1185
|
+
*/
|
|
1186
|
+
unitPrice?: number;
|
|
1187
|
+
quantity?: number;
|
|
1188
|
+
/**
|
|
1189
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1190
|
+
*/
|
|
1191
|
+
subtotal?: number;
|
|
1192
|
+
/**
|
|
1193
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1194
|
+
*/
|
|
1195
|
+
taxAmount?: number;
|
|
1196
|
+
/**
|
|
1197
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1198
|
+
*/
|
|
1199
|
+
discountAmount?: number;
|
|
1200
|
+
/**
|
|
1201
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1202
|
+
*/
|
|
1203
|
+
total?: number;
|
|
1204
|
+
imageUrl?: string | null;
|
|
1205
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
1206
|
+
/**
|
|
1207
|
+
* Arbitrary key-value metadata
|
|
1208
|
+
*/
|
|
1209
|
+
metadata?: Record<string, any>;
|
|
1210
|
+
}>;
|
|
885
1211
|
};
|
|
886
1212
|
meta?: {
|
|
887
1213
|
requestId?: string;
|
|
@@ -929,6 +1255,16 @@ export declare class OrdersService {
|
|
|
929
1255
|
taxTotal?: number;
|
|
930
1256
|
buyerVatNumber?: string | null;
|
|
931
1257
|
taxReverseCharge?: boolean;
|
|
1258
|
+
taxProviderMessages?: Array<{
|
|
1259
|
+
summary?: string;
|
|
1260
|
+
details?: string;
|
|
1261
|
+
citationCode?: string;
|
|
1262
|
+
refersTo?: string;
|
|
1263
|
+
severity?: string;
|
|
1264
|
+
source?: string;
|
|
1265
|
+
lineNumbers?: Array<string>;
|
|
1266
|
+
lineItemIds?: Array<string>;
|
|
1267
|
+
}>;
|
|
932
1268
|
/**
|
|
933
1269
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
934
1270
|
*/
|
|
@@ -942,12 +1278,17 @@ export declare class OrdersService {
|
|
|
942
1278
|
*/
|
|
943
1279
|
total?: number;
|
|
944
1280
|
/**
|
|
945
|
-
*
|
|
1281
|
+
* Balance written off. A credit against the order, not a re-pricing of it: `total` is unchanged, and what the buyer owes is `total - compAmount`.
|
|
946
1282
|
*/
|
|
947
1283
|
compAmount?: number;
|
|
948
1284
|
compReason?: string | null;
|
|
949
1285
|
compedAt?: string | null;
|
|
950
1286
|
compedBy?: string | null;
|
|
1287
|
+
onHold?: boolean;
|
|
1288
|
+
holdReason?: string | null;
|
|
1289
|
+
heldAt?: string | null;
|
|
1290
|
+
heldBy?: string | null;
|
|
1291
|
+
notes?: string | null;
|
|
951
1292
|
/**
|
|
952
1293
|
* Arbitrary key-value metadata
|
|
953
1294
|
*/
|
|
@@ -990,7 +1331,15 @@ export declare class OrdersService {
|
|
|
990
1331
|
phone?: string;
|
|
991
1332
|
email?: string;
|
|
992
1333
|
} | null;
|
|
1334
|
+
shippingMethod?: {
|
|
1335
|
+
methodId?: string;
|
|
1336
|
+
displayName?: string;
|
|
1337
|
+
carrier?: string | null;
|
|
1338
|
+
serviceCode?: string | null;
|
|
1339
|
+
amount?: number;
|
|
1340
|
+
} | null;
|
|
993
1341
|
customerId?: string | null;
|
|
1342
|
+
subscriptionId?: string | null;
|
|
994
1343
|
customer?: {
|
|
995
1344
|
id?: string;
|
|
996
1345
|
email?: string;
|
|
@@ -1003,10 +1352,40 @@ export declare class OrdersService {
|
|
|
1003
1352
|
closedAt?: string | null;
|
|
1004
1353
|
createdAt?: string;
|
|
1005
1354
|
updatedAt?: string;
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1355
|
+
lineItems?: Array<{
|
|
1356
|
+
id?: string;
|
|
1357
|
+
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
1358
|
+
referenceId?: string | null;
|
|
1359
|
+
name?: string;
|
|
1360
|
+
description?: string | null;
|
|
1361
|
+
/**
|
|
1362
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1363
|
+
*/
|
|
1364
|
+
unitPrice?: number;
|
|
1365
|
+
quantity?: number;
|
|
1366
|
+
/**
|
|
1367
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1368
|
+
*/
|
|
1369
|
+
subtotal?: number;
|
|
1370
|
+
/**
|
|
1371
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1372
|
+
*/
|
|
1373
|
+
taxAmount?: number;
|
|
1374
|
+
/**
|
|
1375
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1376
|
+
*/
|
|
1377
|
+
discountAmount?: number;
|
|
1378
|
+
/**
|
|
1379
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1380
|
+
*/
|
|
1381
|
+
total?: number;
|
|
1382
|
+
imageUrl?: string | null;
|
|
1383
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
1384
|
+
/**
|
|
1385
|
+
* Arbitrary key-value metadata
|
|
1386
|
+
*/
|
|
1387
|
+
metadata?: Record<string, any>;
|
|
1388
|
+
}>;
|
|
1010
1389
|
};
|
|
1011
1390
|
meta?: {
|
|
1012
1391
|
requestId?: string;
|
|
@@ -1055,6 +1434,16 @@ export declare class OrdersService {
|
|
|
1055
1434
|
taxTotal?: number;
|
|
1056
1435
|
buyerVatNumber?: string | null;
|
|
1057
1436
|
taxReverseCharge?: boolean;
|
|
1437
|
+
taxProviderMessages?: Array<{
|
|
1438
|
+
summary?: string;
|
|
1439
|
+
details?: string;
|
|
1440
|
+
citationCode?: string;
|
|
1441
|
+
refersTo?: string;
|
|
1442
|
+
severity?: string;
|
|
1443
|
+
source?: string;
|
|
1444
|
+
lineNumbers?: Array<string>;
|
|
1445
|
+
lineItemIds?: Array<string>;
|
|
1446
|
+
}>;
|
|
1058
1447
|
/**
|
|
1059
1448
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
1060
1449
|
*/
|
|
@@ -1068,12 +1457,17 @@ export declare class OrdersService {
|
|
|
1068
1457
|
*/
|
|
1069
1458
|
total?: number;
|
|
1070
1459
|
/**
|
|
1071
|
-
*
|
|
1460
|
+
* Balance written off. A credit against the order, not a re-pricing of it: `total` is unchanged, and what the buyer owes is `total - compAmount`.
|
|
1072
1461
|
*/
|
|
1073
1462
|
compAmount?: number;
|
|
1074
1463
|
compReason?: string | null;
|
|
1075
1464
|
compedAt?: string | null;
|
|
1076
1465
|
compedBy?: string | null;
|
|
1466
|
+
onHold?: boolean;
|
|
1467
|
+
holdReason?: string | null;
|
|
1468
|
+
heldAt?: string | null;
|
|
1469
|
+
heldBy?: string | null;
|
|
1470
|
+
notes?: string | null;
|
|
1077
1471
|
/**
|
|
1078
1472
|
* Arbitrary key-value metadata
|
|
1079
1473
|
*/
|
|
@@ -1116,7 +1510,15 @@ export declare class OrdersService {
|
|
|
1116
1510
|
phone?: string;
|
|
1117
1511
|
email?: string;
|
|
1118
1512
|
} | null;
|
|
1513
|
+
shippingMethod?: {
|
|
1514
|
+
methodId?: string;
|
|
1515
|
+
displayName?: string;
|
|
1516
|
+
carrier?: string | null;
|
|
1517
|
+
serviceCode?: string | null;
|
|
1518
|
+
amount?: number;
|
|
1519
|
+
} | null;
|
|
1119
1520
|
customerId?: string | null;
|
|
1521
|
+
subscriptionId?: string | null;
|
|
1120
1522
|
customer?: {
|
|
1121
1523
|
id?: string;
|
|
1122
1524
|
email?: string;
|
|
@@ -1129,6 +1531,40 @@ export declare class OrdersService {
|
|
|
1129
1531
|
closedAt?: string | null;
|
|
1130
1532
|
createdAt?: string;
|
|
1131
1533
|
updatedAt?: string;
|
|
1534
|
+
lineItems?: Array<{
|
|
1535
|
+
id?: string;
|
|
1536
|
+
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
1537
|
+
referenceId?: string | null;
|
|
1538
|
+
name?: string;
|
|
1539
|
+
description?: string | null;
|
|
1540
|
+
/**
|
|
1541
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1542
|
+
*/
|
|
1543
|
+
unitPrice?: number;
|
|
1544
|
+
quantity?: number;
|
|
1545
|
+
/**
|
|
1546
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1547
|
+
*/
|
|
1548
|
+
subtotal?: number;
|
|
1549
|
+
/**
|
|
1550
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1551
|
+
*/
|
|
1552
|
+
taxAmount?: number;
|
|
1553
|
+
/**
|
|
1554
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1555
|
+
*/
|
|
1556
|
+
discountAmount?: number;
|
|
1557
|
+
/**
|
|
1558
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1559
|
+
*/
|
|
1560
|
+
total?: number;
|
|
1561
|
+
imageUrl?: string | null;
|
|
1562
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
1563
|
+
/**
|
|
1564
|
+
* Arbitrary key-value metadata
|
|
1565
|
+
*/
|
|
1566
|
+
metadata?: Record<string, any>;
|
|
1567
|
+
}>;
|
|
1132
1568
|
/**
|
|
1133
1569
|
* Payment settlement performed by the cancel: voids of open authorizations (always) and refunds of captured payments (opt-in). Failures never undo the cancel.
|
|
1134
1570
|
*/
|
|
@@ -1138,10 +1574,6 @@ export declare class OrdersService {
|
|
|
1138
1574
|
status?: 'succeeded' | 'failed';
|
|
1139
1575
|
error?: string;
|
|
1140
1576
|
}>;
|
|
1141
|
-
onHold?: boolean;
|
|
1142
|
-
holdReason?: string | null;
|
|
1143
|
-
heldAt?: string | null;
|
|
1144
|
-
heldBy?: string | null;
|
|
1145
1577
|
};
|
|
1146
1578
|
meta?: {
|
|
1147
1579
|
requestId?: string;
|
|
@@ -1190,6 +1622,16 @@ export declare class OrdersService {
|
|
|
1190
1622
|
taxTotal?: number;
|
|
1191
1623
|
buyerVatNumber?: string | null;
|
|
1192
1624
|
taxReverseCharge?: boolean;
|
|
1625
|
+
taxProviderMessages?: Array<{
|
|
1626
|
+
summary?: string;
|
|
1627
|
+
details?: string;
|
|
1628
|
+
citationCode?: string;
|
|
1629
|
+
refersTo?: string;
|
|
1630
|
+
severity?: string;
|
|
1631
|
+
source?: string;
|
|
1632
|
+
lineNumbers?: Array<string>;
|
|
1633
|
+
lineItemIds?: Array<string>;
|
|
1634
|
+
}>;
|
|
1193
1635
|
/**
|
|
1194
1636
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
1195
1637
|
*/
|
|
@@ -1203,12 +1645,17 @@ export declare class OrdersService {
|
|
|
1203
1645
|
*/
|
|
1204
1646
|
total?: number;
|
|
1205
1647
|
/**
|
|
1206
|
-
*
|
|
1648
|
+
* Balance written off. A credit against the order, not a re-pricing of it: `total` is unchanged, and what the buyer owes is `total - compAmount`.
|
|
1207
1649
|
*/
|
|
1208
1650
|
compAmount?: number;
|
|
1209
1651
|
compReason?: string | null;
|
|
1210
1652
|
compedAt?: string | null;
|
|
1211
1653
|
compedBy?: string | null;
|
|
1654
|
+
onHold?: boolean;
|
|
1655
|
+
holdReason?: string | null;
|
|
1656
|
+
heldAt?: string | null;
|
|
1657
|
+
heldBy?: string | null;
|
|
1658
|
+
notes?: string | null;
|
|
1212
1659
|
/**
|
|
1213
1660
|
* Arbitrary key-value metadata
|
|
1214
1661
|
*/
|
|
@@ -1251,7 +1698,15 @@ export declare class OrdersService {
|
|
|
1251
1698
|
phone?: string;
|
|
1252
1699
|
email?: string;
|
|
1253
1700
|
} | null;
|
|
1701
|
+
shippingMethod?: {
|
|
1702
|
+
methodId?: string;
|
|
1703
|
+
displayName?: string;
|
|
1704
|
+
carrier?: string | null;
|
|
1705
|
+
serviceCode?: string | null;
|
|
1706
|
+
amount?: number;
|
|
1707
|
+
} | null;
|
|
1254
1708
|
customerId?: string | null;
|
|
1709
|
+
subscriptionId?: string | null;
|
|
1255
1710
|
customer?: {
|
|
1256
1711
|
id?: string;
|
|
1257
1712
|
email?: string;
|
|
@@ -1264,10 +1719,40 @@ export declare class OrdersService {
|
|
|
1264
1719
|
closedAt?: string | null;
|
|
1265
1720
|
createdAt?: string;
|
|
1266
1721
|
updatedAt?: string;
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1722
|
+
lineItems?: Array<{
|
|
1723
|
+
id?: string;
|
|
1724
|
+
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
1725
|
+
referenceId?: string | null;
|
|
1726
|
+
name?: string;
|
|
1727
|
+
description?: string | null;
|
|
1728
|
+
/**
|
|
1729
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1730
|
+
*/
|
|
1731
|
+
unitPrice?: number;
|
|
1732
|
+
quantity?: number;
|
|
1733
|
+
/**
|
|
1734
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1735
|
+
*/
|
|
1736
|
+
subtotal?: number;
|
|
1737
|
+
/**
|
|
1738
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1739
|
+
*/
|
|
1740
|
+
taxAmount?: number;
|
|
1741
|
+
/**
|
|
1742
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1743
|
+
*/
|
|
1744
|
+
discountAmount?: number;
|
|
1745
|
+
/**
|
|
1746
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1747
|
+
*/
|
|
1748
|
+
total?: number;
|
|
1749
|
+
imageUrl?: string | null;
|
|
1750
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
1751
|
+
/**
|
|
1752
|
+
* Arbitrary key-value metadata
|
|
1753
|
+
*/
|
|
1754
|
+
metadata?: Record<string, any>;
|
|
1755
|
+
}>;
|
|
1271
1756
|
};
|
|
1272
1757
|
meta?: {
|
|
1273
1758
|
requestId?: string;
|
|
@@ -1278,7 +1763,7 @@ export declare class OrdersService {
|
|
|
1278
1763
|
};
|
|
1279
1764
|
}>;
|
|
1280
1765
|
/**
|
|
1281
|
-
* Write off the order's remaining balance. Money already captured stays captured; the buyer is never charged and no processor is contacted. `compAmount` is set to the balance outstanding
|
|
1766
|
+
* Write off the order's remaining balance. Money already captured stays captured; the buyer is never charged and no processor is contacted. `compAmount` is set to the balance outstanding; `total` is NOT reduced, because the order is still a sale of that size — the comp is a credit recorded against it. What the buyer owes is `total - compAmount`, so `paymentStatus` settles at `captured` and `displayStatus` reads "… · Comped".
|
|
1282
1767
|
* @param id
|
|
1283
1768
|
* @param requestBody
|
|
1284
1769
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
@@ -1315,6 +1800,16 @@ export declare class OrdersService {
|
|
|
1315
1800
|
taxTotal?: number;
|
|
1316
1801
|
buyerVatNumber?: string | null;
|
|
1317
1802
|
taxReverseCharge?: boolean;
|
|
1803
|
+
taxProviderMessages?: Array<{
|
|
1804
|
+
summary?: string;
|
|
1805
|
+
details?: string;
|
|
1806
|
+
citationCode?: string;
|
|
1807
|
+
refersTo?: string;
|
|
1808
|
+
severity?: string;
|
|
1809
|
+
source?: string;
|
|
1810
|
+
lineNumbers?: Array<string>;
|
|
1811
|
+
lineItemIds?: Array<string>;
|
|
1812
|
+
}>;
|
|
1318
1813
|
/**
|
|
1319
1814
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
1320
1815
|
*/
|
|
@@ -1328,12 +1823,17 @@ export declare class OrdersService {
|
|
|
1328
1823
|
*/
|
|
1329
1824
|
total?: number;
|
|
1330
1825
|
/**
|
|
1331
|
-
*
|
|
1826
|
+
* Balance written off. A credit against the order, not a re-pricing of it: `total` is unchanged, and what the buyer owes is `total - compAmount`.
|
|
1332
1827
|
*/
|
|
1333
1828
|
compAmount?: number;
|
|
1334
1829
|
compReason?: string | null;
|
|
1335
1830
|
compedAt?: string | null;
|
|
1336
1831
|
compedBy?: string | null;
|
|
1832
|
+
onHold?: boolean;
|
|
1833
|
+
holdReason?: string | null;
|
|
1834
|
+
heldAt?: string | null;
|
|
1835
|
+
heldBy?: string | null;
|
|
1836
|
+
notes?: string | null;
|
|
1337
1837
|
/**
|
|
1338
1838
|
* Arbitrary key-value metadata
|
|
1339
1839
|
*/
|
|
@@ -1376,7 +1876,15 @@ export declare class OrdersService {
|
|
|
1376
1876
|
phone?: string;
|
|
1377
1877
|
email?: string;
|
|
1378
1878
|
} | null;
|
|
1879
|
+
shippingMethod?: {
|
|
1880
|
+
methodId?: string;
|
|
1881
|
+
displayName?: string;
|
|
1882
|
+
carrier?: string | null;
|
|
1883
|
+
serviceCode?: string | null;
|
|
1884
|
+
amount?: number;
|
|
1885
|
+
} | null;
|
|
1379
1886
|
customerId?: string | null;
|
|
1887
|
+
subscriptionId?: string | null;
|
|
1380
1888
|
customer?: {
|
|
1381
1889
|
id?: string;
|
|
1382
1890
|
email?: string;
|
|
@@ -1389,6 +1897,40 @@ export declare class OrdersService {
|
|
|
1389
1897
|
closedAt?: string | null;
|
|
1390
1898
|
createdAt?: string;
|
|
1391
1899
|
updatedAt?: string;
|
|
1900
|
+
lineItems?: Array<{
|
|
1901
|
+
id?: string;
|
|
1902
|
+
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
1903
|
+
referenceId?: string | null;
|
|
1904
|
+
name?: string;
|
|
1905
|
+
description?: string | null;
|
|
1906
|
+
/**
|
|
1907
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1908
|
+
*/
|
|
1909
|
+
unitPrice?: number;
|
|
1910
|
+
quantity?: number;
|
|
1911
|
+
/**
|
|
1912
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1913
|
+
*/
|
|
1914
|
+
subtotal?: number;
|
|
1915
|
+
/**
|
|
1916
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1917
|
+
*/
|
|
1918
|
+
taxAmount?: number;
|
|
1919
|
+
/**
|
|
1920
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1921
|
+
*/
|
|
1922
|
+
discountAmount?: number;
|
|
1923
|
+
/**
|
|
1924
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
1925
|
+
*/
|
|
1926
|
+
total?: number;
|
|
1927
|
+
imageUrl?: string | null;
|
|
1928
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
1929
|
+
/**
|
|
1930
|
+
* Arbitrary key-value metadata
|
|
1931
|
+
*/
|
|
1932
|
+
metadata?: Record<string, any>;
|
|
1933
|
+
}>;
|
|
1392
1934
|
/**
|
|
1393
1935
|
* Payment settlement performed by the comp: voids of anything still claiming the waived balance — open authorizations, and unpaid Net-N invoices, whose buyers are also emailed. Captured money is never touched. Failures never undo the comp.
|
|
1394
1936
|
*/
|
|
@@ -1398,10 +1940,6 @@ export declare class OrdersService {
|
|
|
1398
1940
|
status?: 'succeeded' | 'failed';
|
|
1399
1941
|
error?: string;
|
|
1400
1942
|
}>;
|
|
1401
|
-
onHold?: boolean;
|
|
1402
|
-
holdReason?: string | null;
|
|
1403
|
-
heldAt?: string | null;
|
|
1404
|
-
heldBy?: string | null;
|
|
1405
1943
|
};
|
|
1406
1944
|
meta?: {
|
|
1407
1945
|
requestId?: string;
|
|
@@ -1412,7 +1950,7 @@ export declare class OrdersService {
|
|
|
1412
1950
|
};
|
|
1413
1951
|
}>;
|
|
1414
1952
|
/**
|
|
1415
|
-
* Undo a comp. The order owes what it owed again: `compAmount` returns to 0
|
|
1953
|
+
* Undo a comp. The order owes what it owed again: `compAmount` returns to 0 (`total` never moved) and `paymentStatus` falls back out of `captured` on its own. Side effects of the comp are NOT rewound: an authorization voided at the processor cannot be un-voided, so collecting the restored balance needs a new payment, and a tax document voided or returned at the provider needs a manual re-file (`POST /v1/tax-documents/{id}/retry`).
|
|
1416
1954
|
* @param id
|
|
1417
1955
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
1418
1956
|
* @returns any Default Response
|
|
@@ -1446,6 +1984,16 @@ export declare class OrdersService {
|
|
|
1446
1984
|
taxTotal?: number;
|
|
1447
1985
|
buyerVatNumber?: string | null;
|
|
1448
1986
|
taxReverseCharge?: boolean;
|
|
1987
|
+
taxProviderMessages?: Array<{
|
|
1988
|
+
summary?: string;
|
|
1989
|
+
details?: string;
|
|
1990
|
+
citationCode?: string;
|
|
1991
|
+
refersTo?: string;
|
|
1992
|
+
severity?: string;
|
|
1993
|
+
source?: string;
|
|
1994
|
+
lineNumbers?: Array<string>;
|
|
1995
|
+
lineItemIds?: Array<string>;
|
|
1996
|
+
}>;
|
|
1449
1997
|
/**
|
|
1450
1998
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
1451
1999
|
*/
|
|
@@ -1459,12 +2007,17 @@ export declare class OrdersService {
|
|
|
1459
2007
|
*/
|
|
1460
2008
|
total?: number;
|
|
1461
2009
|
/**
|
|
1462
|
-
*
|
|
2010
|
+
* Balance written off. A credit against the order, not a re-pricing of it: `total` is unchanged, and what the buyer owes is `total - compAmount`.
|
|
1463
2011
|
*/
|
|
1464
2012
|
compAmount?: number;
|
|
1465
2013
|
compReason?: string | null;
|
|
1466
2014
|
compedAt?: string | null;
|
|
1467
2015
|
compedBy?: string | null;
|
|
2016
|
+
onHold?: boolean;
|
|
2017
|
+
holdReason?: string | null;
|
|
2018
|
+
heldAt?: string | null;
|
|
2019
|
+
heldBy?: string | null;
|
|
2020
|
+
notes?: string | null;
|
|
1468
2021
|
/**
|
|
1469
2022
|
* Arbitrary key-value metadata
|
|
1470
2023
|
*/
|
|
@@ -1507,7 +2060,15 @@ export declare class OrdersService {
|
|
|
1507
2060
|
phone?: string;
|
|
1508
2061
|
email?: string;
|
|
1509
2062
|
} | null;
|
|
2063
|
+
shippingMethod?: {
|
|
2064
|
+
methodId?: string;
|
|
2065
|
+
displayName?: string;
|
|
2066
|
+
carrier?: string | null;
|
|
2067
|
+
serviceCode?: string | null;
|
|
2068
|
+
amount?: number;
|
|
2069
|
+
} | null;
|
|
1510
2070
|
customerId?: string | null;
|
|
2071
|
+
subscriptionId?: string | null;
|
|
1511
2072
|
customer?: {
|
|
1512
2073
|
id?: string;
|
|
1513
2074
|
email?: string;
|
|
@@ -1520,68 +2081,41 @@ export declare class OrdersService {
|
|
|
1520
2081
|
closedAt?: string | null;
|
|
1521
2082
|
createdAt?: string;
|
|
1522
2083
|
updatedAt?: string;
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
cursor?: string | null;
|
|
1558
|
-
hasMore?: boolean;
|
|
1559
|
-
};
|
|
2084
|
+
lineItems?: Array<{
|
|
2085
|
+
id?: string;
|
|
2086
|
+
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
2087
|
+
referenceId?: string | null;
|
|
2088
|
+
name?: string;
|
|
2089
|
+
description?: string | null;
|
|
2090
|
+
/**
|
|
2091
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2092
|
+
*/
|
|
2093
|
+
unitPrice?: number;
|
|
2094
|
+
quantity?: number;
|
|
2095
|
+
/**
|
|
2096
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2097
|
+
*/
|
|
2098
|
+
subtotal?: number;
|
|
2099
|
+
/**
|
|
2100
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2101
|
+
*/
|
|
2102
|
+
taxAmount?: number;
|
|
2103
|
+
/**
|
|
2104
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2105
|
+
*/
|
|
2106
|
+
discountAmount?: number;
|
|
2107
|
+
/**
|
|
2108
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2109
|
+
*/
|
|
2110
|
+
total?: number;
|
|
2111
|
+
imageUrl?: string | null;
|
|
2112
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
2113
|
+
/**
|
|
2114
|
+
* Arbitrary key-value metadata
|
|
2115
|
+
*/
|
|
2116
|
+
metadata?: Record<string, any>;
|
|
2117
|
+
}>;
|
|
1560
2118
|
};
|
|
1561
|
-
}>;
|
|
1562
|
-
/**
|
|
1563
|
-
* Everything that happened to this order, newest first: status changes, payment attempts (including declines, which write no status-history row), and fulfillment events. One row shape for every source.
|
|
1564
|
-
* @param id
|
|
1565
|
-
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
1566
|
-
* @param limit
|
|
1567
|
-
* @param cursor
|
|
1568
|
-
* @returns any Default Response
|
|
1569
|
-
* @throws ApiError
|
|
1570
|
-
*/
|
|
1571
|
-
static getApiV1OrdersTimeline(id: string, xThrottleEnvironmentId?: string, limit?: number, cursor?: string): CancelablePromise<{
|
|
1572
|
-
data?: Array<{
|
|
1573
|
-
id: string;
|
|
1574
|
-
at: string;
|
|
1575
|
-
kind: 'status' | 'payment' | 'fulfillment' | 'hold';
|
|
1576
|
-
title: string;
|
|
1577
|
-
detail?: string;
|
|
1578
|
-
amount?: number;
|
|
1579
|
-
currency?: string;
|
|
1580
|
-
source: 'manual' | 'state_machine' | 'fulfillment' | 'payment' | 'migration' | 'provider';
|
|
1581
|
-
actorType?: 'user' | 'system' | 'integration' | 'api_key';
|
|
1582
|
-
actorName?: string;
|
|
1583
|
-
reason?: string;
|
|
1584
|
-
}>;
|
|
1585
2119
|
meta?: {
|
|
1586
2120
|
requestId?: string;
|
|
1587
2121
|
pagination?: {
|
|
@@ -1591,13 +2125,16 @@ export declare class OrdersService {
|
|
|
1591
2125
|
};
|
|
1592
2126
|
}>;
|
|
1593
2127
|
/**
|
|
1594
|
-
*
|
|
2128
|
+
* Freeze an order operationally. A hold is a flag, not a stage: `status`, `paymentStatus` and `displayStatus` are unchanged, and nothing about money or delivery moves. Holdable while the order is still live (`pending`, `processing`, `partially_fulfilled`, `fulfilled`); a draft, cancelled or closed order answers 422 `order_not_holdable`. Re-holding with the same reason is a no-op and does not restart `heldAt`; a new reason overwrites it. `heldBy` comes from the caller's credentials and cannot be supplied.
|
|
1595
2129
|
* @param id
|
|
2130
|
+
* @param requestBody
|
|
1596
2131
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
1597
2132
|
* @returns any Default Response
|
|
1598
2133
|
* @throws ApiError
|
|
1599
2134
|
*/
|
|
1600
|
-
static
|
|
2135
|
+
static postApiV1OrdersHold(id: string, requestBody: {
|
|
2136
|
+
reason: string;
|
|
2137
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
1601
2138
|
data?: {
|
|
1602
2139
|
id?: string;
|
|
1603
2140
|
workspaceId?: string;
|
|
@@ -1625,6 +2162,16 @@ export declare class OrdersService {
|
|
|
1625
2162
|
taxTotal?: number;
|
|
1626
2163
|
buyerVatNumber?: string | null;
|
|
1627
2164
|
taxReverseCharge?: boolean;
|
|
2165
|
+
taxProviderMessages?: Array<{
|
|
2166
|
+
summary?: string;
|
|
2167
|
+
details?: string;
|
|
2168
|
+
citationCode?: string;
|
|
2169
|
+
refersTo?: string;
|
|
2170
|
+
severity?: string;
|
|
2171
|
+
source?: string;
|
|
2172
|
+
lineNumbers?: Array<string>;
|
|
2173
|
+
lineItemIds?: Array<string>;
|
|
2174
|
+
}>;
|
|
1628
2175
|
/**
|
|
1629
2176
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
1630
2177
|
*/
|
|
@@ -1638,12 +2185,17 @@ export declare class OrdersService {
|
|
|
1638
2185
|
*/
|
|
1639
2186
|
total?: number;
|
|
1640
2187
|
/**
|
|
1641
|
-
*
|
|
2188
|
+
* Balance written off. A credit against the order, not a re-pricing of it: `total` is unchanged, and what the buyer owes is `total - compAmount`.
|
|
1642
2189
|
*/
|
|
1643
2190
|
compAmount?: number;
|
|
1644
2191
|
compReason?: string | null;
|
|
1645
2192
|
compedAt?: string | null;
|
|
1646
2193
|
compedBy?: string | null;
|
|
2194
|
+
onHold?: boolean;
|
|
2195
|
+
holdReason?: string | null;
|
|
2196
|
+
heldAt?: string | null;
|
|
2197
|
+
heldBy?: string | null;
|
|
2198
|
+
notes?: string | null;
|
|
1647
2199
|
/**
|
|
1648
2200
|
* Arbitrary key-value metadata
|
|
1649
2201
|
*/
|
|
@@ -1686,7 +2238,15 @@ export declare class OrdersService {
|
|
|
1686
2238
|
phone?: string;
|
|
1687
2239
|
email?: string;
|
|
1688
2240
|
} | null;
|
|
2241
|
+
shippingMethod?: {
|
|
2242
|
+
methodId?: string;
|
|
2243
|
+
displayName?: string;
|
|
2244
|
+
carrier?: string | null;
|
|
2245
|
+
serviceCode?: string | null;
|
|
2246
|
+
amount?: number;
|
|
2247
|
+
} | null;
|
|
1689
2248
|
customerId?: string | null;
|
|
2249
|
+
subscriptionId?: string | null;
|
|
1690
2250
|
customer?: {
|
|
1691
2251
|
id?: string;
|
|
1692
2252
|
email?: string;
|
|
@@ -1699,69 +2259,40 @@ export declare class OrdersService {
|
|
|
1699
2259
|
closedAt?: string | null;
|
|
1700
2260
|
createdAt?: string;
|
|
1701
2261
|
updatedAt?: string;
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
/**
|
|
1737
|
-
* Amount in cents (e.g. 1999 = $19.99)
|
|
1738
|
-
*/
|
|
1739
|
-
amount?: number;
|
|
1740
|
-
/**
|
|
1741
|
-
* Amount actually captured. May be less than `amount` on a partial capture; null until captured.
|
|
1742
|
-
*/
|
|
1743
|
-
capturedAmount?: number | null;
|
|
1744
|
-
currency?: string;
|
|
1745
|
-
status?: 'pending' | 'authorized' | 'processing' | 'captured' | 'failed' | 'voided' | 'expired' | 'refunded' | 'partially_refunded';
|
|
1746
|
-
errorCode?: string | null;
|
|
1747
|
-
/**
|
|
1748
|
-
* Why the payment failed. For a manually-marked failure this is the reason the merchant gave.
|
|
1749
|
-
*/
|
|
1750
|
-
errorMessage?: string | null;
|
|
1751
|
-
method?: 'card' | 'bank_transfer' | 'wallet' | 'cash' | 'cheque' | 'external' | 'manual' | 'net30';
|
|
1752
|
-
netN?: number;
|
|
1753
|
-
netNSource?: 'customer_override' | 'cart_override' | 'global_default';
|
|
1754
|
-
authorizedAt?: string | null;
|
|
1755
|
-
capturedAt?: string | null;
|
|
1756
|
-
voidedAt?: string | null;
|
|
1757
|
-
disputed?: boolean;
|
|
1758
|
-
disputeReason?: string | null;
|
|
1759
|
-
disputeOpenedAt?: string | null;
|
|
1760
|
-
/**
|
|
1761
|
-
* Arbitrary key-value metadata
|
|
1762
|
-
*/
|
|
1763
|
-
metadata?: Record<string, any>;
|
|
1764
|
-
createdAt?: string;
|
|
2262
|
+
lineItems?: Array<{
|
|
2263
|
+
id?: string;
|
|
2264
|
+
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
2265
|
+
referenceId?: string | null;
|
|
2266
|
+
name?: string;
|
|
2267
|
+
description?: string | null;
|
|
2268
|
+
/**
|
|
2269
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2270
|
+
*/
|
|
2271
|
+
unitPrice?: number;
|
|
2272
|
+
quantity?: number;
|
|
2273
|
+
/**
|
|
2274
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2275
|
+
*/
|
|
2276
|
+
subtotal?: number;
|
|
2277
|
+
/**
|
|
2278
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2279
|
+
*/
|
|
2280
|
+
taxAmount?: number;
|
|
2281
|
+
/**
|
|
2282
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2283
|
+
*/
|
|
2284
|
+
discountAmount?: number;
|
|
2285
|
+
/**
|
|
2286
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2287
|
+
*/
|
|
2288
|
+
total?: number;
|
|
2289
|
+
imageUrl?: string | null;
|
|
2290
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
2291
|
+
/**
|
|
2292
|
+
* Arbitrary key-value metadata
|
|
2293
|
+
*/
|
|
2294
|
+
metadata?: Record<string, any>;
|
|
2295
|
+
}>;
|
|
1765
2296
|
};
|
|
1766
2297
|
meta?: {
|
|
1767
2298
|
requestId?: string;
|
|
@@ -1772,47 +2303,13 @@ export declare class OrdersService {
|
|
|
1772
2303
|
};
|
|
1773
2304
|
}>;
|
|
1774
2305
|
/**
|
|
1775
|
-
*
|
|
1776
|
-
* @param id
|
|
1777
|
-
* @param requestBody
|
|
1778
|
-
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
1779
|
-
* @returns any Default Response
|
|
1780
|
-
* @throws ApiError
|
|
1781
|
-
*/
|
|
1782
|
-
static patchApiV1OrdersLineItems(id: string, requestBody: {
|
|
1783
|
-
add?: Array<{
|
|
1784
|
-
referenceId?: string;
|
|
1785
|
-
name: string;
|
|
1786
|
-
unitPrice: number;
|
|
1787
|
-
quantity: number;
|
|
1788
|
-
type?: string;
|
|
1789
|
-
/**
|
|
1790
|
-
* What this item needs before it counts as delivered. Omit to resolve from `type` and `metadata`. `digital` and `access_grant` are delivered automatically on payment capture; `none` means there is nothing to deliver.
|
|
1791
|
-
*/
|
|
1792
|
-
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
1793
|
-
/**
|
|
1794
|
-
* Arbitrary key-value metadata
|
|
1795
|
-
*/
|
|
1796
|
-
metadata?: Record<string, any>;
|
|
1797
|
-
}>;
|
|
1798
|
-
update?: Array<{
|
|
1799
|
-
lineItemId: string;
|
|
1800
|
-
quantity?: number;
|
|
1801
|
-
unitPrice?: number;
|
|
1802
|
-
}>;
|
|
1803
|
-
remove?: Array<string>;
|
|
1804
|
-
}, xThrottleEnvironmentId?: string): CancelablePromise<any>;
|
|
1805
|
-
/**
|
|
1806
|
-
* Freeze an order operationally. A hold is a flag, not a stage: `status`, `paymentStatus` and `displayStatus` are unchanged, and nothing about money or delivery moves. Holdable while the order is still live (`pending`, `processing`, `partially_fulfilled`, `fulfilled`); a draft, cancelled or closed order answers 422 `order_not_holdable`. Re-holding with the same reason is a no-op and does not restart `heldAt`; a new reason overwrites it. `heldBy` comes from the caller's credentials and cannot be supplied.
|
|
2306
|
+
* Lift a hold. All four hold columns are cleared together. An order that is not held answers 422 `order_not_on_hold`.
|
|
1807
2307
|
* @param id
|
|
1808
|
-
* @param requestBody
|
|
1809
2308
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
1810
2309
|
* @returns any Default Response
|
|
1811
2310
|
* @throws ApiError
|
|
1812
2311
|
*/
|
|
1813
|
-
static
|
|
1814
|
-
reason: string;
|
|
1815
|
-
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
2312
|
+
static postApiV1OrdersHoldRelease(id: string, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
1816
2313
|
data?: {
|
|
1817
2314
|
id?: string;
|
|
1818
2315
|
workspaceId?: string;
|
|
@@ -1840,6 +2337,16 @@ export declare class OrdersService {
|
|
|
1840
2337
|
taxTotal?: number;
|
|
1841
2338
|
buyerVatNumber?: string | null;
|
|
1842
2339
|
taxReverseCharge?: boolean;
|
|
2340
|
+
taxProviderMessages?: Array<{
|
|
2341
|
+
summary?: string;
|
|
2342
|
+
details?: string;
|
|
2343
|
+
citationCode?: string;
|
|
2344
|
+
refersTo?: string;
|
|
2345
|
+
severity?: string;
|
|
2346
|
+
source?: string;
|
|
2347
|
+
lineNumbers?: Array<string>;
|
|
2348
|
+
lineItemIds?: Array<string>;
|
|
2349
|
+
}>;
|
|
1843
2350
|
/**
|
|
1844
2351
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
1845
2352
|
*/
|
|
@@ -1853,7 +2360,7 @@ export declare class OrdersService {
|
|
|
1853
2360
|
*/
|
|
1854
2361
|
total?: number;
|
|
1855
2362
|
/**
|
|
1856
|
-
*
|
|
2363
|
+
* Balance written off. A credit against the order, not a re-pricing of it: `total` is unchanged, and what the buyer owes is `total - compAmount`.
|
|
1857
2364
|
*/
|
|
1858
2365
|
compAmount?: number;
|
|
1859
2366
|
compReason?: string | null;
|
|
@@ -1863,6 +2370,7 @@ export declare class OrdersService {
|
|
|
1863
2370
|
holdReason?: string | null;
|
|
1864
2371
|
heldAt?: string | null;
|
|
1865
2372
|
heldBy?: string | null;
|
|
2373
|
+
notes?: string | null;
|
|
1866
2374
|
/**
|
|
1867
2375
|
* Arbitrary key-value metadata
|
|
1868
2376
|
*/
|
|
@@ -1905,7 +2413,15 @@ export declare class OrdersService {
|
|
|
1905
2413
|
phone?: string;
|
|
1906
2414
|
email?: string;
|
|
1907
2415
|
} | null;
|
|
2416
|
+
shippingMethod?: {
|
|
2417
|
+
methodId?: string;
|
|
2418
|
+
displayName?: string;
|
|
2419
|
+
carrier?: string | null;
|
|
2420
|
+
serviceCode?: string | null;
|
|
2421
|
+
amount?: number;
|
|
2422
|
+
} | null;
|
|
1908
2423
|
customerId?: string | null;
|
|
2424
|
+
subscriptionId?: string | null;
|
|
1909
2425
|
customer?: {
|
|
1910
2426
|
id?: string;
|
|
1911
2427
|
email?: string;
|
|
@@ -1918,6 +2434,40 @@ export declare class OrdersService {
|
|
|
1918
2434
|
closedAt?: string | null;
|
|
1919
2435
|
createdAt?: string;
|
|
1920
2436
|
updatedAt?: string;
|
|
2437
|
+
lineItems?: Array<{
|
|
2438
|
+
id?: string;
|
|
2439
|
+
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
2440
|
+
referenceId?: string | null;
|
|
2441
|
+
name?: string;
|
|
2442
|
+
description?: string | null;
|
|
2443
|
+
/**
|
|
2444
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2445
|
+
*/
|
|
2446
|
+
unitPrice?: number;
|
|
2447
|
+
quantity?: number;
|
|
2448
|
+
/**
|
|
2449
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2450
|
+
*/
|
|
2451
|
+
subtotal?: number;
|
|
2452
|
+
/**
|
|
2453
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2454
|
+
*/
|
|
2455
|
+
taxAmount?: number;
|
|
2456
|
+
/**
|
|
2457
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2458
|
+
*/
|
|
2459
|
+
discountAmount?: number;
|
|
2460
|
+
/**
|
|
2461
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2462
|
+
*/
|
|
2463
|
+
total?: number;
|
|
2464
|
+
imageUrl?: string | null;
|
|
2465
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
2466
|
+
/**
|
|
2467
|
+
* Arbitrary key-value metadata
|
|
2468
|
+
*/
|
|
2469
|
+
metadata?: Record<string, any>;
|
|
2470
|
+
}>;
|
|
1921
2471
|
};
|
|
1922
2472
|
meta?: {
|
|
1923
2473
|
requestId?: string;
|
|
@@ -1928,13 +2478,71 @@ export declare class OrdersService {
|
|
|
1928
2478
|
};
|
|
1929
2479
|
}>;
|
|
1930
2480
|
/**
|
|
1931
|
-
*
|
|
2481
|
+
* Append-only record of every status change on this order, oldest first.
|
|
1932
2482
|
* @param id
|
|
1933
2483
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
1934
2484
|
* @returns any Default Response
|
|
1935
2485
|
* @throws ApiError
|
|
1936
2486
|
*/
|
|
1937
|
-
static
|
|
2487
|
+
static getApiV1OrdersStatusHistory(id: string, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
2488
|
+
data?: Array<{
|
|
2489
|
+
id?: string;
|
|
2490
|
+
fromStatus?: string | null;
|
|
2491
|
+
toStatus?: string;
|
|
2492
|
+
actorType?: 'user' | 'system' | 'integration';
|
|
2493
|
+
actorId?: string | null;
|
|
2494
|
+
reason?: string | null;
|
|
2495
|
+
source?: 'manual' | 'state_machine' | 'fulfillment' | 'payment' | 'migration';
|
|
2496
|
+
createdAt?: string;
|
|
2497
|
+
}>;
|
|
2498
|
+
meta?: {
|
|
2499
|
+
requestId?: string;
|
|
2500
|
+
pagination?: {
|
|
2501
|
+
cursor?: string | null;
|
|
2502
|
+
hasMore?: boolean;
|
|
2503
|
+
};
|
|
2504
|
+
};
|
|
2505
|
+
}>;
|
|
2506
|
+
/**
|
|
2507
|
+
* Everything that happened to this order, newest first: status changes, payment attempts (including declines, which write no status-history row), and fulfillment events. One row shape for every source.
|
|
2508
|
+
* @param id
|
|
2509
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
2510
|
+
* @param limit
|
|
2511
|
+
* @param cursor
|
|
2512
|
+
* @returns any Default Response
|
|
2513
|
+
* @throws ApiError
|
|
2514
|
+
*/
|
|
2515
|
+
static getApiV1OrdersTimeline(id: string, xThrottleEnvironmentId?: string, limit?: number, cursor?: string): CancelablePromise<{
|
|
2516
|
+
data?: Array<{
|
|
2517
|
+
id: string;
|
|
2518
|
+
at: string;
|
|
2519
|
+
kind: 'status' | 'payment' | 'fulfillment' | 'hold';
|
|
2520
|
+
title: string;
|
|
2521
|
+
detail?: string;
|
|
2522
|
+
amount?: number;
|
|
2523
|
+
currency?: string;
|
|
2524
|
+
source: 'manual' | 'state_machine' | 'fulfillment' | 'payment' | 'migration' | 'provider';
|
|
2525
|
+
actorType?: 'user' | 'system' | 'integration' | 'api_key';
|
|
2526
|
+
actorName?: string;
|
|
2527
|
+
reason?: string;
|
|
2528
|
+
subscriptionId?: string;
|
|
2529
|
+
}>;
|
|
2530
|
+
meta?: {
|
|
2531
|
+
requestId?: string;
|
|
2532
|
+
pagination?: {
|
|
2533
|
+
cursor?: string | null;
|
|
2534
|
+
hasMore?: boolean;
|
|
2535
|
+
};
|
|
2536
|
+
};
|
|
2537
|
+
}>;
|
|
2538
|
+
/**
|
|
2539
|
+
* Close a fulfilled order (archive it from active views)
|
|
2540
|
+
* @param id
|
|
2541
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
2542
|
+
* @returns any Default Response
|
|
2543
|
+
* @throws ApiError
|
|
2544
|
+
*/
|
|
2545
|
+
static postApiV1OrdersClose(id: string, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
1938
2546
|
data?: {
|
|
1939
2547
|
id?: string;
|
|
1940
2548
|
workspaceId?: string;
|
|
@@ -1962,6 +2570,16 @@ export declare class OrdersService {
|
|
|
1962
2570
|
taxTotal?: number;
|
|
1963
2571
|
buyerVatNumber?: string | null;
|
|
1964
2572
|
taxReverseCharge?: boolean;
|
|
2573
|
+
taxProviderMessages?: Array<{
|
|
2574
|
+
summary?: string;
|
|
2575
|
+
details?: string;
|
|
2576
|
+
citationCode?: string;
|
|
2577
|
+
refersTo?: string;
|
|
2578
|
+
severity?: string;
|
|
2579
|
+
source?: string;
|
|
2580
|
+
lineNumbers?: Array<string>;
|
|
2581
|
+
lineItemIds?: Array<string>;
|
|
2582
|
+
}>;
|
|
1965
2583
|
/**
|
|
1966
2584
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
1967
2585
|
*/
|
|
@@ -1975,7 +2593,7 @@ export declare class OrdersService {
|
|
|
1975
2593
|
*/
|
|
1976
2594
|
total?: number;
|
|
1977
2595
|
/**
|
|
1978
|
-
*
|
|
2596
|
+
* Balance written off. A credit against the order, not a re-pricing of it: `total` is unchanged, and what the buyer owes is `total - compAmount`.
|
|
1979
2597
|
*/
|
|
1980
2598
|
compAmount?: number;
|
|
1981
2599
|
compReason?: string | null;
|
|
@@ -1985,6 +2603,7 @@ export declare class OrdersService {
|
|
|
1985
2603
|
holdReason?: string | null;
|
|
1986
2604
|
heldAt?: string | null;
|
|
1987
2605
|
heldBy?: string | null;
|
|
2606
|
+
notes?: string | null;
|
|
1988
2607
|
/**
|
|
1989
2608
|
* Arbitrary key-value metadata
|
|
1990
2609
|
*/
|
|
@@ -2027,7 +2646,15 @@ export declare class OrdersService {
|
|
|
2027
2646
|
phone?: string;
|
|
2028
2647
|
email?: string;
|
|
2029
2648
|
} | null;
|
|
2649
|
+
shippingMethod?: {
|
|
2650
|
+
methodId?: string;
|
|
2651
|
+
displayName?: string;
|
|
2652
|
+
carrier?: string | null;
|
|
2653
|
+
serviceCode?: string | null;
|
|
2654
|
+
amount?: number;
|
|
2655
|
+
} | null;
|
|
2030
2656
|
customerId?: string | null;
|
|
2657
|
+
subscriptionId?: string | null;
|
|
2031
2658
|
customer?: {
|
|
2032
2659
|
id?: string;
|
|
2033
2660
|
email?: string;
|
|
@@ -2040,6 +2667,40 @@ export declare class OrdersService {
|
|
|
2040
2667
|
closedAt?: string | null;
|
|
2041
2668
|
createdAt?: string;
|
|
2042
2669
|
updatedAt?: string;
|
|
2670
|
+
lineItems?: Array<{
|
|
2671
|
+
id?: string;
|
|
2672
|
+
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
2673
|
+
referenceId?: string | null;
|
|
2674
|
+
name?: string;
|
|
2675
|
+
description?: string | null;
|
|
2676
|
+
/**
|
|
2677
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2678
|
+
*/
|
|
2679
|
+
unitPrice?: number;
|
|
2680
|
+
quantity?: number;
|
|
2681
|
+
/**
|
|
2682
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2683
|
+
*/
|
|
2684
|
+
subtotal?: number;
|
|
2685
|
+
/**
|
|
2686
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2687
|
+
*/
|
|
2688
|
+
taxAmount?: number;
|
|
2689
|
+
/**
|
|
2690
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2691
|
+
*/
|
|
2692
|
+
discountAmount?: number;
|
|
2693
|
+
/**
|
|
2694
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2695
|
+
*/
|
|
2696
|
+
total?: number;
|
|
2697
|
+
imageUrl?: string | null;
|
|
2698
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
2699
|
+
/**
|
|
2700
|
+
* Arbitrary key-value metadata
|
|
2701
|
+
*/
|
|
2702
|
+
metadata?: Record<string, any>;
|
|
2703
|
+
}>;
|
|
2043
2704
|
};
|
|
2044
2705
|
meta?: {
|
|
2045
2706
|
requestId?: string;
|
|
@@ -2049,5 +2710,95 @@ export declare class OrdersService {
|
|
|
2049
2710
|
};
|
|
2050
2711
|
};
|
|
2051
2712
|
}>;
|
|
2713
|
+
/**
|
|
2714
|
+
* Refund an order. Spread across its captured payments, newest capture first, when the order was paid in instalments.
|
|
2715
|
+
* @param id
|
|
2716
|
+
* @param requestBody
|
|
2717
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
2718
|
+
* @returns any Default Response
|
|
2719
|
+
* @throws ApiError
|
|
2720
|
+
*/
|
|
2721
|
+
static postApiV1OrdersRefund(id: string, requestBody: {
|
|
2722
|
+
/**
|
|
2723
|
+
* Partial refund amount (defaults to everything still refundable on the order)
|
|
2724
|
+
*/
|
|
2725
|
+
amount?: number;
|
|
2726
|
+
reason?: string;
|
|
2727
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
2728
|
+
data?: {
|
|
2729
|
+
id?: string;
|
|
2730
|
+
orderId?: string;
|
|
2731
|
+
processor?: string;
|
|
2732
|
+
processorTransactionId?: string | null;
|
|
2733
|
+
processorResponse?: any | null;
|
|
2734
|
+
/**
|
|
2735
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
2736
|
+
*/
|
|
2737
|
+
amount?: number;
|
|
2738
|
+
/**
|
|
2739
|
+
* Amount actually captured. May be less than `amount` on a partial capture; null until captured.
|
|
2740
|
+
*/
|
|
2741
|
+
capturedAmount?: number | null;
|
|
2742
|
+
currency?: string;
|
|
2743
|
+
status?: 'pending' | 'authorized' | 'processing' | 'captured' | 'failed' | 'voided' | 'expired' | 'refunded' | 'partially_refunded';
|
|
2744
|
+
errorCode?: string | null;
|
|
2745
|
+
/**
|
|
2746
|
+
* Why the payment failed. For a manually-marked failure this is the reason the merchant gave.
|
|
2747
|
+
*/
|
|
2748
|
+
errorMessage?: string | null;
|
|
2749
|
+
method?: 'card' | 'bank_transfer' | 'wallet' | 'cash' | 'cheque' | 'external' | 'manual' | 'net30';
|
|
2750
|
+
netN?: number;
|
|
2751
|
+
netNSource?: 'customer_override' | 'cart_override' | 'global_default';
|
|
2752
|
+
authorizedAt?: string | null;
|
|
2753
|
+
capturedAt?: string | null;
|
|
2754
|
+
voidedAt?: string | null;
|
|
2755
|
+
disputed?: boolean;
|
|
2756
|
+
disputeReason?: string | null;
|
|
2757
|
+
disputeOpenedAt?: string | null;
|
|
2758
|
+
/**
|
|
2759
|
+
* Arbitrary key-value metadata
|
|
2760
|
+
*/
|
|
2761
|
+
metadata?: Record<string, any>;
|
|
2762
|
+
createdAt?: string;
|
|
2763
|
+
};
|
|
2764
|
+
meta?: {
|
|
2765
|
+
requestId?: string;
|
|
2766
|
+
pagination?: {
|
|
2767
|
+
cursor?: string | null;
|
|
2768
|
+
hasMore?: boolean;
|
|
2769
|
+
};
|
|
2770
|
+
};
|
|
2771
|
+
}>;
|
|
2772
|
+
/**
|
|
2773
|
+
* Add, update, or remove line items on an order. On a captured order the total delta is charged (increase) or refunded (decrease) automatically.
|
|
2774
|
+
* @param id
|
|
2775
|
+
* @param requestBody
|
|
2776
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
2777
|
+
* @returns any Default Response
|
|
2778
|
+
* @throws ApiError
|
|
2779
|
+
*/
|
|
2780
|
+
static patchApiV1OrdersLineItems(id: string, requestBody: {
|
|
2781
|
+
add?: Array<{
|
|
2782
|
+
referenceId?: string;
|
|
2783
|
+
name: string;
|
|
2784
|
+
unitPrice: number;
|
|
2785
|
+
quantity: number;
|
|
2786
|
+
type?: string;
|
|
2787
|
+
/**
|
|
2788
|
+
* What this item needs before it counts as delivered. Omit to resolve from `type` and `metadata`. `digital` and `access_grant` are delivered automatically on payment capture; `none` means there is nothing to deliver.
|
|
2789
|
+
*/
|
|
2790
|
+
deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
|
|
2791
|
+
/**
|
|
2792
|
+
* Arbitrary key-value metadata
|
|
2793
|
+
*/
|
|
2794
|
+
metadata?: Record<string, any>;
|
|
2795
|
+
}>;
|
|
2796
|
+
update?: Array<{
|
|
2797
|
+
lineItemId: string;
|
|
2798
|
+
quantity?: number;
|
|
2799
|
+
unitPrice?: number;
|
|
2800
|
+
}>;
|
|
2801
|
+
remove?: Array<string>;
|
|
2802
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<any>;
|
|
2052
2803
|
}
|
|
2053
2804
|
//# sourceMappingURL=OrdersService.d.ts.map
|