@usethrottle/api-client 5.29.2 → 6.1.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/__tests__/order-holds-types.test.js +4 -3
- package/dist/__tests__/order-holds-types.test.js.map +1 -1
- package/dist/generated/core/OpenAPI.js +2 -2
- package/dist/generated/core/OpenAPI.js.map +1 -1
- package/dist/generated/services/CustomersService.d.ts +71 -1
- package/dist/generated/services/CustomersService.d.ts.map +1 -1
- package/dist/generated/services/CustomersService.js +48 -1
- package/dist/generated/services/CustomersService.js.map +1 -1
- package/dist/generated/services/OrdersService.d.ts +352 -26
- package/dist/generated/services/OrdersService.d.ts.map +1 -1
- package/dist/generated/services/OrdersService.js +76 -11
- package/dist/generated/services/OrdersService.js.map +1 -1
- package/dist/generated/services/PaymentsService.d.ts +16 -1
- package/dist/generated/services/PaymentsService.d.ts.map +1 -1
- package/dist/generated/services/PaymentsService.js +3 -3
- package/dist/generated/services/PaymentsService.js.map +1 -1
- package/dist/generated/services/QuotesService.d.ts +18 -0
- package/dist/generated/services/QuotesService.d.ts.map +1 -1
- package/dist/generated/services/QuotesService.js.map +1 -1
- package/dist/generated/services/WebhooksOutboundService.d.ts +3 -3
- package/dist/generated/services/WebhooksOutboundService.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -211,8 +211,16 @@ export declare class OrdersService {
|
|
|
211
211
|
shippingDiscountId?: string | null;
|
|
212
212
|
shippingDiscountCode?: string | null;
|
|
213
213
|
orderNumber?: string;
|
|
214
|
-
status?: 'draft' | '
|
|
214
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
215
|
+
/**
|
|
216
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
217
|
+
*/
|
|
218
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
215
219
|
displayStatus?: string;
|
|
220
|
+
/**
|
|
221
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
222
|
+
*/
|
|
223
|
+
amountDue?: number;
|
|
216
224
|
fulfillmentSummary?: {
|
|
217
225
|
itemsTotal?: number;
|
|
218
226
|
itemsFulfilled?: number;
|
|
@@ -357,7 +365,13 @@ export declare class OrdersService {
|
|
|
357
365
|
company?: string | null;
|
|
358
366
|
} | null;
|
|
359
367
|
cancelledAt?: string | null;
|
|
368
|
+
/**
|
|
369
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
370
|
+
*/
|
|
360
371
|
completedAt?: string | null;
|
|
372
|
+
/**
|
|
373
|
+
* When the order was marked completed.
|
|
374
|
+
*/
|
|
361
375
|
closedAt?: string | null;
|
|
362
376
|
createdAt?: string;
|
|
363
377
|
updatedAt?: string;
|
|
@@ -449,10 +463,11 @@ export declare class OrdersService {
|
|
|
449
463
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
450
464
|
* @param cursor Cursor for pagination (last item ID)
|
|
451
465
|
* @param limit Number of items per page
|
|
452
|
-
* @param status
|
|
466
|
+
* @param status Retired values accepted until 2027-02-20; see /docs/developers/reference/order-states/#renamed-statuses
|
|
453
467
|
* @param paymentStatus
|
|
468
|
+
* @param effectiveStatus Filter on the derived `effectiveStatus`: the lifecycle status unless the order is cancelled, on hold, refunded, partially refunded or disputed.
|
|
454
469
|
* @param type
|
|
455
|
-
* @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 `
|
|
470
|
+
* @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 `awaiting_fulfillment`, `awaiting_shipment` or `partially_shipped`, no returns), `in_transit` = something shipped and something has not arrived, `delivered` = every shipment arrived, `returned` = any items came back (a partial return included).
|
|
456
471
|
* @param source
|
|
457
472
|
* @param q Search order id, number, source, status, or metadata.
|
|
458
473
|
* @param customerId
|
|
@@ -463,7 +478,7 @@ export declare class OrdersService {
|
|
|
463
478
|
* @returns any Default Response
|
|
464
479
|
* @throws ApiError
|
|
465
480
|
*/
|
|
466
|
-
static getApiV1Orders(xThrottleEnvironmentId?: string, cursor?: string, limit?: number, status?: 'draft' | '
|
|
481
|
+
static getApiV1Orders(xThrottleEnvironmentId?: string, cursor?: string, limit?: number, status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'closed', paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired' | 'charged_back', effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed', 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, include?: 'lineItems'): CancelablePromise<{
|
|
467
482
|
data?: Array<{
|
|
468
483
|
id?: string;
|
|
469
484
|
workspaceId?: string;
|
|
@@ -472,8 +487,16 @@ export declare class OrdersService {
|
|
|
472
487
|
shippingDiscountId?: string | null;
|
|
473
488
|
shippingDiscountCode?: string | null;
|
|
474
489
|
orderNumber?: string;
|
|
475
|
-
status?: 'draft' | '
|
|
490
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
491
|
+
/**
|
|
492
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
493
|
+
*/
|
|
494
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
476
495
|
displayStatus?: string;
|
|
496
|
+
/**
|
|
497
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
498
|
+
*/
|
|
499
|
+
amountDue?: number;
|
|
477
500
|
fulfillmentSummary?: {
|
|
478
501
|
itemsTotal?: number;
|
|
479
502
|
itemsFulfilled?: number;
|
|
@@ -618,7 +641,13 @@ export declare class OrdersService {
|
|
|
618
641
|
company?: string | null;
|
|
619
642
|
} | null;
|
|
620
643
|
cancelledAt?: string | null;
|
|
644
|
+
/**
|
|
645
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
646
|
+
*/
|
|
621
647
|
completedAt?: string | null;
|
|
648
|
+
/**
|
|
649
|
+
* When the order was marked completed.
|
|
650
|
+
*/
|
|
622
651
|
closedAt?: string | null;
|
|
623
652
|
createdAt?: string;
|
|
624
653
|
updatedAt?: string;
|
|
@@ -706,14 +735,15 @@ export declare class OrdersService {
|
|
|
706
735
|
};
|
|
707
736
|
}>;
|
|
708
737
|
/**
|
|
709
|
-
* Export orders (respecting list filters) as a CSV attachment. Capped at 10,000
|
|
738
|
+
* Export orders (respecting list filters) as a CSV attachment. Capped at 10,000 orders, newest first; a capped file answers `X-Throttle-Export-Truncated: true`.
|
|
710
739
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
711
740
|
* @param cursor Cursor for pagination (last item ID)
|
|
712
741
|
* @param limit Number of items per page
|
|
713
|
-
* @param status
|
|
742
|
+
* @param status Retired values accepted until 2027-02-20; see /docs/developers/reference/order-states/#renamed-statuses
|
|
714
743
|
* @param paymentStatus
|
|
744
|
+
* @param effectiveStatus Filter on the derived `effectiveStatus`: the lifecycle status unless the order is cancelled, on hold, refunded, partially refunded or disputed.
|
|
715
745
|
* @param type
|
|
716
|
-
* @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 `
|
|
746
|
+
* @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 `awaiting_fulfillment`, `awaiting_shipment` or `partially_shipped`, no returns), `in_transit` = something shipped and something has not arrived, `delivered` = every shipment arrived, `returned` = any items came back (a partial return included).
|
|
717
747
|
* @param source
|
|
718
748
|
* @param q Search order id, number, source, status, or metadata.
|
|
719
749
|
* @param customerId
|
|
@@ -721,10 +751,11 @@ export declare class OrdersService {
|
|
|
721
751
|
* @param createdAfter ISO 8601 lower bound on creation time, EXCLUSIVE (created_at > value).
|
|
722
752
|
* @param createdBefore ISO 8601 upper bound on creation time, EXCLUSIVE (created_at < value).
|
|
723
753
|
* @param include Add each order's line items, as GET /api/v1/orders/{id} answers them. Without it, list rows carry none.
|
|
754
|
+
* @param rows What a row is: one per order (the default), or one per line item.
|
|
724
755
|
* @returns any Default Response
|
|
725
756
|
* @throws ApiError
|
|
726
757
|
*/
|
|
727
|
-
static getApiV1OrdersExportCsv(xThrottleEnvironmentId?: string, cursor?: string, limit?: number, status?: 'draft' | '
|
|
758
|
+
static getApiV1OrdersExportCsv(xThrottleEnvironmentId?: string, cursor?: string, limit?: number, status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'closed', paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired' | 'charged_back', effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed', 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, include?: 'lineItems', rows?: 'orders' | 'lineItems'): CancelablePromise<any>;
|
|
728
759
|
/**
|
|
729
760
|
* Get an order by ID (includes line items, plus `capturedAmount` and `refundedAmount`)
|
|
730
761
|
* @param id
|
|
@@ -741,8 +772,16 @@ export declare class OrdersService {
|
|
|
741
772
|
shippingDiscountId?: string | null;
|
|
742
773
|
shippingDiscountCode?: string | null;
|
|
743
774
|
orderNumber?: string;
|
|
744
|
-
status?: 'draft' | '
|
|
775
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
776
|
+
/**
|
|
777
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
778
|
+
*/
|
|
779
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
745
780
|
displayStatus?: string;
|
|
781
|
+
/**
|
|
782
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
783
|
+
*/
|
|
784
|
+
amountDue?: number;
|
|
746
785
|
fulfillmentSummary?: {
|
|
747
786
|
itemsTotal?: number;
|
|
748
787
|
itemsFulfilled?: number;
|
|
@@ -887,7 +926,13 @@ export declare class OrdersService {
|
|
|
887
926
|
company?: string | null;
|
|
888
927
|
} | null;
|
|
889
928
|
cancelledAt?: string | null;
|
|
929
|
+
/**
|
|
930
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
931
|
+
*/
|
|
890
932
|
completedAt?: string | null;
|
|
933
|
+
/**
|
|
934
|
+
* When the order was marked completed.
|
|
935
|
+
*/
|
|
891
936
|
closedAt?: string | null;
|
|
892
937
|
createdAt?: string;
|
|
893
938
|
updatedAt?: string;
|
|
@@ -1047,8 +1092,16 @@ export declare class OrdersService {
|
|
|
1047
1092
|
shippingDiscountId?: string | null;
|
|
1048
1093
|
shippingDiscountCode?: string | null;
|
|
1049
1094
|
orderNumber?: string;
|
|
1050
|
-
status?: 'draft' | '
|
|
1095
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
1096
|
+
/**
|
|
1097
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
1098
|
+
*/
|
|
1099
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
1051
1100
|
displayStatus?: string;
|
|
1101
|
+
/**
|
|
1102
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
1103
|
+
*/
|
|
1104
|
+
amountDue?: number;
|
|
1052
1105
|
fulfillmentSummary?: {
|
|
1053
1106
|
itemsTotal?: number;
|
|
1054
1107
|
itemsFulfilled?: number;
|
|
@@ -1193,7 +1246,13 @@ export declare class OrdersService {
|
|
|
1193
1246
|
company?: string | null;
|
|
1194
1247
|
} | null;
|
|
1195
1248
|
cancelledAt?: string | null;
|
|
1249
|
+
/**
|
|
1250
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
1251
|
+
*/
|
|
1196
1252
|
completedAt?: string | null;
|
|
1253
|
+
/**
|
|
1254
|
+
* When the order was marked completed.
|
|
1255
|
+
*/
|
|
1197
1256
|
closedAt?: string | null;
|
|
1198
1257
|
createdAt?: string;
|
|
1199
1258
|
updatedAt?: string;
|
|
@@ -1304,8 +1363,16 @@ export declare class OrdersService {
|
|
|
1304
1363
|
shippingDiscountId?: string | null;
|
|
1305
1364
|
shippingDiscountCode?: string | null;
|
|
1306
1365
|
orderNumber?: string;
|
|
1307
|
-
status?: 'draft' | '
|
|
1366
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
1367
|
+
/**
|
|
1368
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
1369
|
+
*/
|
|
1370
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
1308
1371
|
displayStatus?: string;
|
|
1372
|
+
/**
|
|
1373
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
1374
|
+
*/
|
|
1375
|
+
amountDue?: number;
|
|
1309
1376
|
fulfillmentSummary?: {
|
|
1310
1377
|
itemsTotal?: number;
|
|
1311
1378
|
itemsFulfilled?: number;
|
|
@@ -1450,7 +1517,13 @@ export declare class OrdersService {
|
|
|
1450
1517
|
company?: string | null;
|
|
1451
1518
|
} | null;
|
|
1452
1519
|
cancelledAt?: string | null;
|
|
1520
|
+
/**
|
|
1521
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
1522
|
+
*/
|
|
1453
1523
|
completedAt?: string | null;
|
|
1524
|
+
/**
|
|
1525
|
+
* When the order was marked completed.
|
|
1526
|
+
*/
|
|
1454
1527
|
closedAt?: string | null;
|
|
1455
1528
|
createdAt?: string;
|
|
1456
1529
|
updatedAt?: string;
|
|
@@ -1556,8 +1629,16 @@ export declare class OrdersService {
|
|
|
1556
1629
|
shippingDiscountId?: string | null;
|
|
1557
1630
|
shippingDiscountCode?: string | null;
|
|
1558
1631
|
orderNumber?: string;
|
|
1559
|
-
status?: 'draft' | '
|
|
1632
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
1633
|
+
/**
|
|
1634
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
1635
|
+
*/
|
|
1636
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
1560
1637
|
displayStatus?: string;
|
|
1638
|
+
/**
|
|
1639
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
1640
|
+
*/
|
|
1641
|
+
amountDue?: number;
|
|
1561
1642
|
fulfillmentSummary?: {
|
|
1562
1643
|
itemsTotal?: number;
|
|
1563
1644
|
itemsFulfilled?: number;
|
|
@@ -1702,7 +1783,13 @@ export declare class OrdersService {
|
|
|
1702
1783
|
company?: string | null;
|
|
1703
1784
|
} | null;
|
|
1704
1785
|
cancelledAt?: string | null;
|
|
1786
|
+
/**
|
|
1787
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
1788
|
+
*/
|
|
1705
1789
|
completedAt?: string | null;
|
|
1790
|
+
/**
|
|
1791
|
+
* When the order was marked completed.
|
|
1792
|
+
*/
|
|
1706
1793
|
closedAt?: string | null;
|
|
1707
1794
|
createdAt?: string;
|
|
1708
1795
|
updatedAt?: string;
|
|
@@ -1808,8 +1895,16 @@ export declare class OrdersService {
|
|
|
1808
1895
|
shippingDiscountId?: string | null;
|
|
1809
1896
|
shippingDiscountCode?: string | null;
|
|
1810
1897
|
orderNumber?: string;
|
|
1811
|
-
status?: 'draft' | '
|
|
1898
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
1899
|
+
/**
|
|
1900
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
1901
|
+
*/
|
|
1902
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
1812
1903
|
displayStatus?: string;
|
|
1904
|
+
/**
|
|
1905
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
1906
|
+
*/
|
|
1907
|
+
amountDue?: number;
|
|
1813
1908
|
fulfillmentSummary?: {
|
|
1814
1909
|
itemsTotal?: number;
|
|
1815
1910
|
itemsFulfilled?: number;
|
|
@@ -1954,7 +2049,13 @@ export declare class OrdersService {
|
|
|
1954
2049
|
company?: string | null;
|
|
1955
2050
|
} | null;
|
|
1956
2051
|
cancelledAt?: string | null;
|
|
2052
|
+
/**
|
|
2053
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
2054
|
+
*/
|
|
1957
2055
|
completedAt?: string | null;
|
|
2056
|
+
/**
|
|
2057
|
+
* When the order was marked completed.
|
|
2058
|
+
*/
|
|
1958
2059
|
closedAt?: string | null;
|
|
1959
2060
|
createdAt?: string;
|
|
1960
2061
|
updatedAt?: string;
|
|
@@ -2061,8 +2162,16 @@ export declare class OrdersService {
|
|
|
2061
2162
|
shippingDiscountId?: string | null;
|
|
2062
2163
|
shippingDiscountCode?: string | null;
|
|
2063
2164
|
orderNumber?: string;
|
|
2064
|
-
status?: 'draft' | '
|
|
2165
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
2166
|
+
/**
|
|
2167
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
2168
|
+
*/
|
|
2169
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
2065
2170
|
displayStatus?: string;
|
|
2171
|
+
/**
|
|
2172
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
2173
|
+
*/
|
|
2174
|
+
amountDue?: number;
|
|
2066
2175
|
fulfillmentSummary?: {
|
|
2067
2176
|
itemsTotal?: number;
|
|
2068
2177
|
itemsFulfilled?: number;
|
|
@@ -2207,7 +2316,13 @@ export declare class OrdersService {
|
|
|
2207
2316
|
company?: string | null;
|
|
2208
2317
|
} | null;
|
|
2209
2318
|
cancelledAt?: string | null;
|
|
2319
|
+
/**
|
|
2320
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
2321
|
+
*/
|
|
2210
2322
|
completedAt?: string | null;
|
|
2323
|
+
/**
|
|
2324
|
+
* When the order was marked completed.
|
|
2325
|
+
*/
|
|
2211
2326
|
closedAt?: string | null;
|
|
2212
2327
|
createdAt?: string;
|
|
2213
2328
|
updatedAt?: string;
|
|
@@ -2312,7 +2427,10 @@ export declare class OrdersService {
|
|
|
2312
2427
|
* @throws ApiError
|
|
2313
2428
|
*/
|
|
2314
2429
|
static postApiV1OrdersStatus(id: string, requestBody: {
|
|
2315
|
-
|
|
2430
|
+
/**
|
|
2431
|
+
* Retired values accepted until 2027-02-20; see /docs/developers/reference/order-states/#renamed-statuses
|
|
2432
|
+
*/
|
|
2433
|
+
status: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'closed';
|
|
2316
2434
|
reason?: string;
|
|
2317
2435
|
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
2318
2436
|
data?: {
|
|
@@ -2323,8 +2441,16 @@ export declare class OrdersService {
|
|
|
2323
2441
|
shippingDiscountId?: string | null;
|
|
2324
2442
|
shippingDiscountCode?: string | null;
|
|
2325
2443
|
orderNumber?: string;
|
|
2326
|
-
status?: 'draft' | '
|
|
2444
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
2445
|
+
/**
|
|
2446
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
2447
|
+
*/
|
|
2448
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
2327
2449
|
displayStatus?: string;
|
|
2450
|
+
/**
|
|
2451
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
2452
|
+
*/
|
|
2453
|
+
amountDue?: number;
|
|
2328
2454
|
fulfillmentSummary?: {
|
|
2329
2455
|
itemsTotal?: number;
|
|
2330
2456
|
itemsFulfilled?: number;
|
|
@@ -2469,7 +2595,13 @@ export declare class OrdersService {
|
|
|
2469
2595
|
company?: string | null;
|
|
2470
2596
|
} | null;
|
|
2471
2597
|
cancelledAt?: string | null;
|
|
2598
|
+
/**
|
|
2599
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
2600
|
+
*/
|
|
2472
2601
|
completedAt?: string | null;
|
|
2602
|
+
/**
|
|
2603
|
+
* When the order was marked completed.
|
|
2604
|
+
*/
|
|
2473
2605
|
closedAt?: string | null;
|
|
2474
2606
|
createdAt?: string;
|
|
2475
2607
|
updatedAt?: string;
|
|
@@ -2575,8 +2707,16 @@ export declare class OrdersService {
|
|
|
2575
2707
|
shippingDiscountId?: string | null;
|
|
2576
2708
|
shippingDiscountCode?: string | null;
|
|
2577
2709
|
orderNumber?: string;
|
|
2578
|
-
status?: 'draft' | '
|
|
2710
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
2711
|
+
/**
|
|
2712
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
2713
|
+
*/
|
|
2714
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
2579
2715
|
displayStatus?: string;
|
|
2716
|
+
/**
|
|
2717
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
2718
|
+
*/
|
|
2719
|
+
amountDue?: number;
|
|
2580
2720
|
fulfillmentSummary?: {
|
|
2581
2721
|
itemsTotal?: number;
|
|
2582
2722
|
itemsFulfilled?: number;
|
|
@@ -2721,7 +2861,13 @@ export declare class OrdersService {
|
|
|
2721
2861
|
company?: string | null;
|
|
2722
2862
|
} | null;
|
|
2723
2863
|
cancelledAt?: string | null;
|
|
2864
|
+
/**
|
|
2865
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
2866
|
+
*/
|
|
2724
2867
|
completedAt?: string | null;
|
|
2868
|
+
/**
|
|
2869
|
+
* When the order was marked completed.
|
|
2870
|
+
*/
|
|
2725
2871
|
closedAt?: string | null;
|
|
2726
2872
|
createdAt?: string;
|
|
2727
2873
|
updatedAt?: string;
|
|
@@ -2833,8 +2979,16 @@ export declare class OrdersService {
|
|
|
2833
2979
|
shippingDiscountId?: string | null;
|
|
2834
2980
|
shippingDiscountCode?: string | null;
|
|
2835
2981
|
orderNumber?: string;
|
|
2836
|
-
status?: 'draft' | '
|
|
2982
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
2983
|
+
/**
|
|
2984
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
2985
|
+
*/
|
|
2986
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
2837
2987
|
displayStatus?: string;
|
|
2988
|
+
/**
|
|
2989
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
2990
|
+
*/
|
|
2991
|
+
amountDue?: number;
|
|
2838
2992
|
fulfillmentSummary?: {
|
|
2839
2993
|
itemsTotal?: number;
|
|
2840
2994
|
itemsFulfilled?: number;
|
|
@@ -2979,7 +3133,13 @@ export declare class OrdersService {
|
|
|
2979
3133
|
company?: string | null;
|
|
2980
3134
|
} | null;
|
|
2981
3135
|
cancelledAt?: string | null;
|
|
3136
|
+
/**
|
|
3137
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
3138
|
+
*/
|
|
2982
3139
|
completedAt?: string | null;
|
|
3140
|
+
/**
|
|
3141
|
+
* When the order was marked completed.
|
|
3142
|
+
*/
|
|
2983
3143
|
closedAt?: string | null;
|
|
2984
3144
|
createdAt?: string;
|
|
2985
3145
|
updatedAt?: string;
|
|
@@ -3067,7 +3227,7 @@ export declare class OrdersService {
|
|
|
3067
3227
|
};
|
|
3068
3228
|
}>;
|
|
3069
3229
|
/**
|
|
3070
|
-
* 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 (`
|
|
3230
|
+
* 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 (`awaiting_payment`, `awaiting_fulfillment`, `awaiting_shipment`, `partially_shipped`, `shipped`); a draft, cancelled or completed 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.
|
|
3071
3231
|
* @param id
|
|
3072
3232
|
* @param requestBody
|
|
3073
3233
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
@@ -3085,8 +3245,16 @@ export declare class OrdersService {
|
|
|
3085
3245
|
shippingDiscountId?: string | null;
|
|
3086
3246
|
shippingDiscountCode?: string | null;
|
|
3087
3247
|
orderNumber?: string;
|
|
3088
|
-
status?: 'draft' | '
|
|
3248
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
3249
|
+
/**
|
|
3250
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
3251
|
+
*/
|
|
3252
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
3089
3253
|
displayStatus?: string;
|
|
3254
|
+
/**
|
|
3255
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
3256
|
+
*/
|
|
3257
|
+
amountDue?: number;
|
|
3090
3258
|
fulfillmentSummary?: {
|
|
3091
3259
|
itemsTotal?: number;
|
|
3092
3260
|
itemsFulfilled?: number;
|
|
@@ -3231,7 +3399,13 @@ export declare class OrdersService {
|
|
|
3231
3399
|
company?: string | null;
|
|
3232
3400
|
} | null;
|
|
3233
3401
|
cancelledAt?: string | null;
|
|
3402
|
+
/**
|
|
3403
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
3404
|
+
*/
|
|
3234
3405
|
completedAt?: string | null;
|
|
3406
|
+
/**
|
|
3407
|
+
* When the order was marked completed.
|
|
3408
|
+
*/
|
|
3235
3409
|
closedAt?: string | null;
|
|
3236
3410
|
createdAt?: string;
|
|
3237
3411
|
updatedAt?: string;
|
|
@@ -3334,8 +3508,16 @@ export declare class OrdersService {
|
|
|
3334
3508
|
shippingDiscountId?: string | null;
|
|
3335
3509
|
shippingDiscountCode?: string | null;
|
|
3336
3510
|
orderNumber?: string;
|
|
3337
|
-
status?: 'draft' | '
|
|
3511
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
3512
|
+
/**
|
|
3513
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
3514
|
+
*/
|
|
3515
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
3338
3516
|
displayStatus?: string;
|
|
3517
|
+
/**
|
|
3518
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
3519
|
+
*/
|
|
3520
|
+
amountDue?: number;
|
|
3339
3521
|
fulfillmentSummary?: {
|
|
3340
3522
|
itemsTotal?: number;
|
|
3341
3523
|
itemsFulfilled?: number;
|
|
@@ -3480,7 +3662,13 @@ export declare class OrdersService {
|
|
|
3480
3662
|
company?: string | null;
|
|
3481
3663
|
} | null;
|
|
3482
3664
|
cancelledAt?: string | null;
|
|
3665
|
+
/**
|
|
3666
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
3667
|
+
*/
|
|
3483
3668
|
completedAt?: string | null;
|
|
3669
|
+
/**
|
|
3670
|
+
* When the order was marked completed.
|
|
3671
|
+
*/
|
|
3484
3672
|
closedAt?: string | null;
|
|
3485
3673
|
createdAt?: string;
|
|
3486
3674
|
updatedAt?: string;
|
|
@@ -3632,7 +3820,7 @@ export declare class OrdersService {
|
|
|
3632
3820
|
};
|
|
3633
3821
|
}>;
|
|
3634
3822
|
/**
|
|
3635
|
-
*
|
|
3823
|
+
* Mark a shipped order completed.
|
|
3636
3824
|
* @param id
|
|
3637
3825
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
3638
3826
|
* @returns any Default Response
|
|
@@ -3647,8 +3835,16 @@ export declare class OrdersService {
|
|
|
3647
3835
|
shippingDiscountId?: string | null;
|
|
3648
3836
|
shippingDiscountCode?: string | null;
|
|
3649
3837
|
orderNumber?: string;
|
|
3650
|
-
status?: 'draft' | '
|
|
3838
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
3839
|
+
/**
|
|
3840
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
3841
|
+
*/
|
|
3842
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
3651
3843
|
displayStatus?: string;
|
|
3844
|
+
/**
|
|
3845
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
3846
|
+
*/
|
|
3847
|
+
amountDue?: number;
|
|
3652
3848
|
fulfillmentSummary?: {
|
|
3653
3849
|
itemsTotal?: number;
|
|
3654
3850
|
itemsFulfilled?: number;
|
|
@@ -3793,7 +3989,13 @@ export declare class OrdersService {
|
|
|
3793
3989
|
company?: string | null;
|
|
3794
3990
|
} | null;
|
|
3795
3991
|
cancelledAt?: string | null;
|
|
3992
|
+
/**
|
|
3993
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
3994
|
+
*/
|
|
3796
3995
|
completedAt?: string | null;
|
|
3996
|
+
/**
|
|
3997
|
+
* When the order was marked completed.
|
|
3998
|
+
*/
|
|
3797
3999
|
closedAt?: string | null;
|
|
3798
4000
|
createdAt?: string;
|
|
3799
4001
|
updatedAt?: string;
|
|
@@ -3990,6 +4192,49 @@ export declare class OrdersService {
|
|
|
3990
4192
|
* @throws ApiError
|
|
3991
4193
|
*/
|
|
3992
4194
|
static deleteApiV1OrdersPaymentLink(id: string, xThrottleEnvironmentId?: string): CancelablePromise<void>;
|
|
4195
|
+
/**
|
|
4196
|
+
* Create a 7-day payment link for what a placed order still owes (its `amountDue`: the total, less any comp, less what has been captured), and email it to the customer unless `send` is false. Use it when the order cannot be charged on a saved card: a guest checkout, or an order paid with PayPal whose total was raised. The customer pays by card or any other enabled method; the payment is recorded on this order, never as a new order. Replaces, and cancels, the balance link the order already has. If the balance changes before the link is paid (a payment was recorded, the order was cancelled or put on hold), paying it is refused and nothing is charged. An API key needs both `orders:write` and `checkout_sessions:write`.
|
|
4197
|
+
* @param id
|
|
4198
|
+
* @param requestBody
|
|
4199
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
4200
|
+
* @returns any Default Response
|
|
4201
|
+
* @throws ApiError
|
|
4202
|
+
*/
|
|
4203
|
+
static postApiV1OrdersBalanceLink(id: string, requestBody: {
|
|
4204
|
+
/**
|
|
4205
|
+
* Email the link to the order's customer (default true). `false` creates and returns it only.
|
|
4206
|
+
*/
|
|
4207
|
+
send?: boolean;
|
|
4208
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
4209
|
+
data?: {
|
|
4210
|
+
sessionId?: string;
|
|
4211
|
+
/**
|
|
4212
|
+
* The hosted page the customer pays the balance at.
|
|
4213
|
+
*/
|
|
4214
|
+
url?: string;
|
|
4215
|
+
/**
|
|
4216
|
+
* The balance the link charges, in minor units of `currency`.
|
|
4217
|
+
*/
|
|
4218
|
+
amount?: number;
|
|
4219
|
+
currency?: CurrencyCode;
|
|
4220
|
+
sentAt?: string;
|
|
4221
|
+
expiresAt?: string;
|
|
4222
|
+
/**
|
|
4223
|
+
* The address the link was emailed to; null when it was not emailed.
|
|
4224
|
+
*/
|
|
4225
|
+
emailedTo?: string | null;
|
|
4226
|
+
};
|
|
4227
|
+
meta?: {
|
|
4228
|
+
/**
|
|
4229
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
4230
|
+
*/
|
|
4231
|
+
requestId?: string;
|
|
4232
|
+
pagination?: {
|
|
4233
|
+
cursor?: string | null;
|
|
4234
|
+
hasMore?: boolean;
|
|
4235
|
+
};
|
|
4236
|
+
};
|
|
4237
|
+
}>;
|
|
3993
4238
|
/**
|
|
3994
4239
|
* Start a card payment the merchant types in for the customer (a mail or telephone order) on a draft order built in the dashboard. Returns a 30-minute `embedUrl` that only the Throttle dashboard can show; the secure card form there charges the order as a MOTO transaction and the card never reaches Throttle. The card is saved to the order's customer when `saveCard` is true or the order has a subscription line (renewals charge it). Cancels any open payment link first. An API key needs both `orders:write` and `checkout_sessions:write`.
|
|
3995
4240
|
* @param id
|
|
@@ -4105,7 +4350,14 @@ export declare class OrdersService {
|
|
|
4105
4350
|
*/
|
|
4106
4351
|
static patchApiV1OrdersLineItems(id: string, requestBody: {
|
|
4107
4352
|
add?: Array<{
|
|
4353
|
+
/**
|
|
4354
|
+
* Your id for the item. Defaults to `sku` when one is given.
|
|
4355
|
+
*/
|
|
4108
4356
|
referenceId?: string;
|
|
4357
|
+
/**
|
|
4358
|
+
* The item's SKU, stored as the line's `metadata.sku` (where inventory and fulfillment integrations read it) and as its `referenceId` unless you send one.
|
|
4359
|
+
*/
|
|
4360
|
+
sku?: string;
|
|
4109
4361
|
name: string;
|
|
4110
4362
|
unitPrice: number;
|
|
4111
4363
|
quantity: number;
|
|
@@ -4125,6 +4377,14 @@ export declare class OrdersService {
|
|
|
4125
4377
|
}>;
|
|
4126
4378
|
update?: Array<{
|
|
4127
4379
|
lineItemId: string;
|
|
4380
|
+
/**
|
|
4381
|
+
* The line's new name.
|
|
4382
|
+
*/
|
|
4383
|
+
name?: string;
|
|
4384
|
+
/**
|
|
4385
|
+
* Swap the line to another item: `metadata.sku` and `referenceId` both take the new SKU, and a `metadata.catalogLink` for another SKU is dropped. Send an empty string or null to clear it. Sending the line's current SKU changes nothing.
|
|
4386
|
+
*/
|
|
4387
|
+
sku?: string | null;
|
|
4128
4388
|
quantity?: number;
|
|
4129
4389
|
unitPrice?: number;
|
|
4130
4390
|
/**
|
|
@@ -4149,7 +4409,15 @@ export declare class OrdersService {
|
|
|
4149
4409
|
shippingDiscountId?: string | null;
|
|
4150
4410
|
shippingDiscountCode?: string | null;
|
|
4151
4411
|
orderNumber?: string;
|
|
4152
|
-
status?: 'draft' | '
|
|
4412
|
+
status?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled';
|
|
4413
|
+
/**
|
|
4414
|
+
* One status combining the lifecycle with hold, refund and dispute, for tools that read a single status. Derived, never stored.
|
|
4415
|
+
*/
|
|
4416
|
+
effectiveStatus?: 'draft' | 'awaiting_payment' | 'awaiting_fulfillment' | 'awaiting_shipment' | 'partially_shipped' | 'shipped' | 'completed' | 'cancelled' | 'on_hold' | 'refunded' | 'partially_refunded' | 'disputed';
|
|
4417
|
+
/**
|
|
4418
|
+
* What the order still owes, in minor units of `currency`: the total, less any comp, less what has been captured. 0 for a draft or a cancelled order. Returned by `GET /orders` (the list) only; derived, never stored.
|
|
4419
|
+
*/
|
|
4420
|
+
amountDue?: number;
|
|
4153
4421
|
type?: 'one_time' | 'recurring' | 'mixed';
|
|
4154
4422
|
paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired' | 'charged_back';
|
|
4155
4423
|
source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine';
|
|
@@ -4281,7 +4549,13 @@ export declare class OrdersService {
|
|
|
4281
4549
|
clientContext?: Record<string, any> | null;
|
|
4282
4550
|
subscriptionId?: string | null;
|
|
4283
4551
|
cancelledAt?: string | null;
|
|
4552
|
+
/**
|
|
4553
|
+
* When everything was handed over (entering shipped, or completed directly for orders with nothing to ship).
|
|
4554
|
+
*/
|
|
4284
4555
|
completedAt?: string | null;
|
|
4556
|
+
/**
|
|
4557
|
+
* When the order was marked completed.
|
|
4558
|
+
*/
|
|
4285
4559
|
closedAt?: string | null;
|
|
4286
4560
|
createdAt?: string;
|
|
4287
4561
|
updatedAt?: string;
|
|
@@ -4361,7 +4635,7 @@ export declare class OrdersService {
|
|
|
4361
4635
|
*/
|
|
4362
4636
|
adjustment: {
|
|
4363
4637
|
/**
|
|
4364
|
-
* Change in what the buyer owes, in minor units. On an order with an outstanding Net-N invoice it is billed on that invoice (see `invoice`). Otherwise, on an order with a captured payment a positive delta
|
|
4638
|
+
* Change in what the buyer owes, in minor units. On an order with an outstanding Net-N invoice it is billed on that invoice (see `invoice`). Otherwise, on an order with a captured payment a positive delta is charged to the customer's default saved card, or left owing when there is no card to charge (see `leftOutstanding`); a negative one comes off any balance still owed first and the rest is refunded. On an order with no captured payment no money moved.
|
|
4365
4639
|
*/
|
|
4366
4640
|
delta: number;
|
|
4367
4641
|
/**
|
|
@@ -4376,6 +4650,14 @@ export declare class OrdersService {
|
|
|
4376
4650
|
* The payment that charged a positive delta; null when nothing was charged.
|
|
4377
4651
|
*/
|
|
4378
4652
|
chargedPaymentId?: string | null;
|
|
4653
|
+
/**
|
|
4654
|
+
* The part of a positive delta left owing because there was no card to charge, in minor units: the order has no customer, the customer has no saved card, or no card processor is connected (`chargeSkippedReason`). The edit was still saved and the order's `paymentStatus` reads `partially_paid`. Collect the balance by recording a payment or charging a saved card. 0 when nothing was left owing. A card that was tried and declined still refuses the edit with `402 payment_failed`.
|
|
4655
|
+
*/
|
|
4656
|
+
leftOutstanding?: number;
|
|
4657
|
+
/**
|
|
4658
|
+
* Why a positive delta was not charged: `no_customer`, `no_payment_method`, `payment_method_not_chargeable` or `no_payment_connection`. Null when it was charged or there was nothing to charge.
|
|
4659
|
+
*/
|
|
4660
|
+
chargeSkippedReason?: string | null;
|
|
4379
4661
|
/**
|
|
4380
4662
|
* The payment a negative delta was refunded on; null when nothing was refunded.
|
|
4381
4663
|
*/
|
|
@@ -4577,5 +4859,49 @@ export declare class OrdersService {
|
|
|
4577
4859
|
};
|
|
4578
4860
|
};
|
|
4579
4861
|
}>;
|
|
4862
|
+
/**
|
|
4863
|
+
* The emails this order sent its customer, newest first: confirmation, payment receipts, shipping, refunds, invoices and payment requests. Emails to your own team are not included. The email body is not stored.
|
|
4864
|
+
* @param id
|
|
4865
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
4866
|
+
* @param limit
|
|
4867
|
+
* @returns any Default Response
|
|
4868
|
+
* @throws ApiError
|
|
4869
|
+
*/
|
|
4870
|
+
static getApiV1OrdersEmails(id: string, xThrottleEnvironmentId?: string, limit?: number): CancelablePromise<{
|
|
4871
|
+
data: Array<{
|
|
4872
|
+
id: string;
|
|
4873
|
+
/**
|
|
4874
|
+
* Which email, such as `customer.order_shipped`.
|
|
4875
|
+
*/
|
|
4876
|
+
templateKey: string;
|
|
4877
|
+
/**
|
|
4878
|
+
* The subject line as sent. For an email that was not sent, filled in from the template.
|
|
4879
|
+
*/
|
|
4880
|
+
subject: string;
|
|
4881
|
+
/**
|
|
4882
|
+
* Who it went to. Null unless the caller holds `customer_pii:read`.
|
|
4883
|
+
*/
|
|
4884
|
+
recipientEmail: string | null;
|
|
4885
|
+
/**
|
|
4886
|
+
* `suppressed_optout`: not sent because the customer opted out or the template is switched off. `suppressed_cooldown`: not sent because the same email went out moments before.
|
|
4887
|
+
*/
|
|
4888
|
+
status: 'queued' | 'sending' | 'sent' | 'delivered' | 'bounced' | 'complained' | 'failed' | 'suppressed_optout' | 'suppressed_cooldown';
|
|
4889
|
+
/**
|
|
4890
|
+
* The order the email was about.
|
|
4891
|
+
*/
|
|
4892
|
+
orderId: string | null;
|
|
4893
|
+
createdAt: string;
|
|
4894
|
+
sentAt?: string | null;
|
|
4895
|
+
deliveredAt?: string | null;
|
|
4896
|
+
openedAt?: string | null;
|
|
4897
|
+
bouncedAt?: string | null;
|
|
4898
|
+
}>;
|
|
4899
|
+
meta: {
|
|
4900
|
+
/**
|
|
4901
|
+
* More emails exist than `limit`.
|
|
4902
|
+
*/
|
|
4903
|
+
hasMore?: boolean;
|
|
4904
|
+
};
|
|
4905
|
+
}>;
|
|
4580
4906
|
}
|
|
4581
4907
|
//# sourceMappingURL=OrdersService.d.ts.map
|