@wix/auto_sdk_ecom_draft-orders 1.0.23 → 1.0.25
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/build/cjs/src/ecom-v1-draft-order-draft-orders.context.d.ts +17 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js +18 -2
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +62 -43
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js +213 -2
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.d.ts +207 -86
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js +11 -7
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.d.ts +457 -136
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.d.ts +17 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.js +16 -0
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +62 -43
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.js +211 -0
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.d.ts +207 -86
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.js +11 -7
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.d.ts +457 -136
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.d.ts +17 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js +18 -2
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +62 -43
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js +213 -2
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.d.ts +207 -86
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js +11 -7
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.d.ts +459 -137
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.d.ts +17 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js +16 -0
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +62 -43
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js +211 -0
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.d.ts +207 -86
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js +11 -7
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.d.ts +459 -137
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Draft Order main entity.
|
|
3
|
+
* A temporary version of an order, allowing modifications before finalization.
|
|
4
|
+
*/
|
|
2
5
|
export interface DraftOrder {
|
|
3
6
|
/**
|
|
4
7
|
* Draft order ID.
|
|
@@ -39,12 +42,14 @@ export interface DraftOrder {
|
|
|
39
42
|
billingInfo?: AddressWithContact;
|
|
40
43
|
/**
|
|
41
44
|
* Additional fees.
|
|
45
|
+
*
|
|
42
46
|
* Includes details about the source, and whether the additional fee is applied to the order.
|
|
43
47
|
* @maxSize 100
|
|
44
48
|
*/
|
|
45
49
|
additionalFees?: AdditionalFeeDetails[];
|
|
46
50
|
/**
|
|
47
51
|
* Discounts.
|
|
52
|
+
*
|
|
48
53
|
* Includes details about the source, and whether the discount is applied to the order.
|
|
49
54
|
* @maxSize 320
|
|
50
55
|
*/
|
|
@@ -122,11 +127,13 @@ export interface DraftOrder {
|
|
|
122
127
|
taxInfo?: OrderTaxInfo;
|
|
123
128
|
/**
|
|
124
129
|
* Custom field data for the draft order object.
|
|
130
|
+
*
|
|
125
131
|
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls.
|
|
126
132
|
*/
|
|
127
133
|
extendedFields?: ExtendedFields;
|
|
128
134
|
/**
|
|
129
135
|
* Buyer information.
|
|
136
|
+
*
|
|
130
137
|
* Includes details about changes when relevant.
|
|
131
138
|
*/
|
|
132
139
|
buyerDetails?: BuyerDetails;
|
|
@@ -136,7 +143,8 @@ export interface DraftOrder {
|
|
|
136
143
|
*/
|
|
137
144
|
billingDetails?: BillingDetails;
|
|
138
145
|
/**
|
|
139
|
-
* Order business location
|
|
146
|
+
* Order business location.
|
|
147
|
+
*
|
|
140
148
|
* Includes details about changes when relevant.
|
|
141
149
|
*/
|
|
142
150
|
businessLocationDetails?: BusinessLocationDetails;
|
|
@@ -634,6 +642,11 @@ export interface SubscriptionInfo {
|
|
|
634
642
|
* @immutable
|
|
635
643
|
*/
|
|
636
644
|
subscriptionSettings?: SubscriptionSettings;
|
|
645
|
+
/**
|
|
646
|
+
* Description of the charges that will be applied for subscription.
|
|
647
|
+
* @maxLength 1000
|
|
648
|
+
*/
|
|
649
|
+
chargesDescription?: string | null;
|
|
637
650
|
}
|
|
638
651
|
export interface SubscriptionTitle {
|
|
639
652
|
/**
|
|
@@ -771,6 +784,63 @@ export interface ExtendedFields {
|
|
|
771
784
|
*/
|
|
772
785
|
namespaces?: Record<string, Record<string, any>>;
|
|
773
786
|
}
|
|
787
|
+
export interface ModifierGroup {
|
|
788
|
+
/**
|
|
789
|
+
* Modifier group id.
|
|
790
|
+
* @minLength 1
|
|
791
|
+
* @maxLength 36
|
|
792
|
+
*/
|
|
793
|
+
id?: string;
|
|
794
|
+
/** Modifier group name. */
|
|
795
|
+
name?: TranslatableString;
|
|
796
|
+
/**
|
|
797
|
+
* List of modifiers in this group.
|
|
798
|
+
* @minSize 1
|
|
799
|
+
* @maxSize 10
|
|
800
|
+
*/
|
|
801
|
+
modifiers?: ItemModifier[];
|
|
802
|
+
}
|
|
803
|
+
export interface TranslatableString {
|
|
804
|
+
/**
|
|
805
|
+
* __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
806
|
+
*
|
|
807
|
+
* Min: 1 character.
|
|
808
|
+
* Max: 200 characters.
|
|
809
|
+
* @minLength 1
|
|
810
|
+
* @maxLength 200
|
|
811
|
+
*/
|
|
812
|
+
original?: string;
|
|
813
|
+
/**
|
|
814
|
+
* String translated into the buyer's language.
|
|
815
|
+
*
|
|
816
|
+
* Min: 1 character.
|
|
817
|
+
* Max: 400 characters.
|
|
818
|
+
* Default: Same as `original`.
|
|
819
|
+
* @minLength 1
|
|
820
|
+
* @maxLength 400
|
|
821
|
+
*/
|
|
822
|
+
translated?: string | null;
|
|
823
|
+
}
|
|
824
|
+
export interface ItemModifier {
|
|
825
|
+
/**
|
|
826
|
+
* Modifier ID.
|
|
827
|
+
* @minLength 1
|
|
828
|
+
* @maxLength 36
|
|
829
|
+
*/
|
|
830
|
+
id?: string;
|
|
831
|
+
/**
|
|
832
|
+
* The quantity of this modifier.
|
|
833
|
+
* @min 1
|
|
834
|
+
* @max 100000
|
|
835
|
+
*/
|
|
836
|
+
quantity?: number | null;
|
|
837
|
+
/** Primary display label for the modifier. */
|
|
838
|
+
label?: TranslatableString;
|
|
839
|
+
/** Optional additional details or clarification for the modifier. */
|
|
840
|
+
details?: TranslatableString;
|
|
841
|
+
/** The price of the modifier. */
|
|
842
|
+
price?: Price;
|
|
843
|
+
}
|
|
774
844
|
export interface ItemChangedDetails {
|
|
775
845
|
/**
|
|
776
846
|
* Line item quantity before change.
|
|
@@ -1108,7 +1178,7 @@ export interface AdditionalFeeDetails {
|
|
|
1108
1178
|
* Supported values:
|
|
1109
1179
|
* + `ORIGINAL_ORDER`: This additional fee is part of the original order.
|
|
1110
1180
|
* + `AUTOMATIC`: User added a catalog item which is configured to have an additional fee.
|
|
1111
|
-
* + `CUSTOM`: This additional fee was created by the
|
|
1181
|
+
* + `CUSTOM`: This additional fee was created by the Create Custom Additional Fees method.
|
|
1112
1182
|
*/
|
|
1113
1183
|
source?: SourceType;
|
|
1114
1184
|
/** Whether this additional fee is applied to the order. */
|
|
@@ -1154,10 +1224,10 @@ export interface AdditionalFee {
|
|
|
1154
1224
|
lineItemIds?: string[];
|
|
1155
1225
|
}
|
|
1156
1226
|
export interface TaxDetails {
|
|
1157
|
-
/**
|
|
1227
|
+
/** Whether the additional fee is taxable. */
|
|
1158
1228
|
taxable?: boolean;
|
|
1159
1229
|
/**
|
|
1160
|
-
* Optional tax group ID to use when calculating tax for this additional fee
|
|
1230
|
+
* Optional tax group ID to use when calculating tax for this additional fee.
|
|
1161
1231
|
* @format GUID
|
|
1162
1232
|
*/
|
|
1163
1233
|
taxGroupId?: string | null;
|
|
@@ -1178,7 +1248,7 @@ export interface DiscountDetails {
|
|
|
1178
1248
|
*
|
|
1179
1249
|
* Supported values:
|
|
1180
1250
|
* + `ORIGINAL_ORDER`: This discount is part of the original order.
|
|
1181
|
-
* + `CUSTOM`: This discount was created by the
|
|
1251
|
+
* + `CUSTOM`: This discount was created by the Create Custom Discounts method.
|
|
1182
1252
|
*/
|
|
1183
1253
|
source?: SourceType;
|
|
1184
1254
|
/** Whether this discount is applied to the order. */
|
|
@@ -1333,9 +1403,13 @@ export interface CreatedByStringOneOf {
|
|
|
1333
1403
|
appId?: string;
|
|
1334
1404
|
}
|
|
1335
1405
|
export declare enum EditingStatus {
|
|
1336
|
-
/** Draft order
|
|
1406
|
+
/** Draft order is being edited. */
|
|
1337
1407
|
DRAFT = "DRAFT",
|
|
1338
|
-
/**
|
|
1408
|
+
/**
|
|
1409
|
+
* Draft order has been committed - No further modifications allowed.
|
|
1410
|
+
*
|
|
1411
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
1412
|
+
*/
|
|
1339
1413
|
COMMITTED = "COMMITTED"
|
|
1340
1414
|
}
|
|
1341
1415
|
export declare enum WeightUnit {
|
|
@@ -1369,7 +1443,7 @@ export interface TaxSummary {
|
|
|
1369
1443
|
}
|
|
1370
1444
|
export interface BalanceSummary {
|
|
1371
1445
|
/**
|
|
1372
|
-
* Amount left to pay for order to be considered paid.
|
|
1446
|
+
* Amount left to pay for the order to be considered paid.
|
|
1373
1447
|
* @readonly
|
|
1374
1448
|
*/
|
|
1375
1449
|
balance?: Balance;
|
|
@@ -1609,31 +1683,33 @@ export interface BusinessLocationChangedDetails {
|
|
|
1609
1683
|
}
|
|
1610
1684
|
export interface CreateDraftOrderRequest {
|
|
1611
1685
|
/**
|
|
1612
|
-
*
|
|
1686
|
+
* ID of the order to create a draft for.
|
|
1613
1687
|
* @format GUID
|
|
1614
1688
|
*/
|
|
1615
1689
|
orderId: string | null;
|
|
1616
1690
|
}
|
|
1617
1691
|
export interface CreateDraftOrderResponse {
|
|
1618
|
-
/** Draft order
|
|
1692
|
+
/** Draft order calculated with the latest changes. */
|
|
1619
1693
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1620
1694
|
/**
|
|
1621
|
-
*
|
|
1622
|
-
*
|
|
1695
|
+
* Whether the response contains a draft order that existed before request.
|
|
1696
|
+
*
|
|
1697
|
+
* `true`: The draft order already exists and is updated.
|
|
1698
|
+
* `false`: A new draft order is created.
|
|
1623
1699
|
*/
|
|
1624
1700
|
preexistingDraftOrder?: boolean | null;
|
|
1625
1701
|
}
|
|
1626
1702
|
export interface CalculatedDraftOrder {
|
|
1627
|
-
/** Draft order
|
|
1703
|
+
/** Draft order. */
|
|
1628
1704
|
draftOrder?: DraftOrder;
|
|
1629
|
-
/**
|
|
1705
|
+
/** Shipping options. */
|
|
1630
1706
|
shippingOptions?: ShippingOption[];
|
|
1631
1707
|
/** Errors that occurred during calculation. */
|
|
1632
1708
|
calculationErrors?: CalculationErrors;
|
|
1633
1709
|
}
|
|
1634
1710
|
export interface ShippingOption {
|
|
1635
1711
|
/**
|
|
1636
|
-
*
|
|
1712
|
+
* Carrier ID.
|
|
1637
1713
|
* @format GUID
|
|
1638
1714
|
*/
|
|
1639
1715
|
carrierId?: string | null;
|
|
@@ -1649,37 +1725,41 @@ export interface ShippingOption {
|
|
|
1649
1725
|
export interface DeliveryLogistics {
|
|
1650
1726
|
/** When the item is expected to be delivered in free text, e.g "3-5 business days" */
|
|
1651
1727
|
deliveryTime?: string | null;
|
|
1652
|
-
/**
|
|
1728
|
+
/**
|
|
1729
|
+
* Instructions for delivery.
|
|
1730
|
+
*
|
|
1731
|
+
* For example, "Please arrive during business hours."
|
|
1732
|
+
*/
|
|
1653
1733
|
instructions?: string | null;
|
|
1654
|
-
/** Additional pickup details
|
|
1734
|
+
/** Additional pickup details. */
|
|
1655
1735
|
pickupDetails?: PickupDetails;
|
|
1656
|
-
/** Expected delivery time slot
|
|
1736
|
+
/** Expected delivery time slot. */
|
|
1657
1737
|
deliveryTimeSlot?: DeliveryTimeSlot;
|
|
1658
1738
|
}
|
|
1659
1739
|
export interface PickupDetails {
|
|
1660
|
-
/** Pickup address */
|
|
1740
|
+
/** Pickup address. */
|
|
1661
1741
|
address?: Address;
|
|
1662
1742
|
/** Pickup method. */
|
|
1663
1743
|
pickupMethod?: PickupMethod;
|
|
1664
1744
|
}
|
|
1665
1745
|
export declare enum PickupMethod {
|
|
1666
1746
|
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1667
|
-
/**
|
|
1747
|
+
/** Store pickup. */
|
|
1668
1748
|
STORE_PICKUP = "STORE_PICKUP",
|
|
1669
|
-
/**
|
|
1749
|
+
/** Pickup point. */
|
|
1670
1750
|
PICKUP_POINT = "PICKUP_POINT"
|
|
1671
1751
|
}
|
|
1672
1752
|
export interface DeliveryTimeSlot {
|
|
1673
|
-
/**
|
|
1753
|
+
/** Delivery time slot start time. */
|
|
1674
1754
|
from?: Date | null;
|
|
1675
|
-
/**
|
|
1755
|
+
/** Delivery time slot end time. */
|
|
1676
1756
|
to?: Date | null;
|
|
1677
1757
|
}
|
|
1678
1758
|
export interface ShippingPrice {
|
|
1679
|
-
/**
|
|
1759
|
+
/** Shipping price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */
|
|
1680
1760
|
price?: Price;
|
|
1681
1761
|
/**
|
|
1682
|
-
* Currency of the shipping
|
|
1762
|
+
* Currency of the shipping price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the method.
|
|
1683
1763
|
* @format CURRENCY
|
|
1684
1764
|
*/
|
|
1685
1765
|
currency?: string;
|
|
@@ -1808,7 +1888,7 @@ export interface CarrierError {
|
|
|
1808
1888
|
export interface CreateEmptyDraftOrderRequest {
|
|
1809
1889
|
}
|
|
1810
1890
|
export interface CreateEmptyDraftOrderResponse {
|
|
1811
|
-
/** Draft order
|
|
1891
|
+
/** Draft order calculated with the latest changes. */
|
|
1812
1892
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1813
1893
|
}
|
|
1814
1894
|
export interface AddLineItemsToDraftOrderRequest {
|
|
@@ -1823,7 +1903,9 @@ export interface AddLineItemsToDraftOrderRequest {
|
|
|
1823
1903
|
*/
|
|
1824
1904
|
catalogLineItems?: CatalogReferenceLineItem[];
|
|
1825
1905
|
/**
|
|
1826
|
-
* Custom line items to add to draft order.
|
|
1906
|
+
* Custom line items to add to draft order.
|
|
1907
|
+
*
|
|
1908
|
+
* Custom line items do not trigger the Catalog Service Plugin.
|
|
1827
1909
|
* @maxSize 300
|
|
1828
1910
|
*/
|
|
1829
1911
|
customLineItems?: CustomLineItem[];
|
|
@@ -1872,7 +1954,9 @@ export interface CustomLineItem {
|
|
|
1872
1954
|
*/
|
|
1873
1955
|
quantity?: number;
|
|
1874
1956
|
/**
|
|
1875
|
-
* Catalog and item reference.
|
|
1957
|
+
* Catalog and item reference.
|
|
1958
|
+
*
|
|
1959
|
+
* Includes IDs for the item and the catalog it came from, as well as further optional info.
|
|
1876
1960
|
* Optional for custom line items, which don't trigger the Catalog service plugin.
|
|
1877
1961
|
*/
|
|
1878
1962
|
catalogReference?: CatalogReference;
|
|
@@ -1947,7 +2031,7 @@ export declare enum FileType {
|
|
|
1947
2031
|
SECURE_ARCHIVE = "SECURE_ARCHIVE"
|
|
1948
2032
|
}
|
|
1949
2033
|
export interface AddLineItemsToDraftOrderResponse {
|
|
1950
|
-
/** Draft order
|
|
2034
|
+
/** Draft order calculated with the latest changes. */
|
|
1951
2035
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1952
2036
|
}
|
|
1953
2037
|
export interface UpdateLineItemsRequest {
|
|
@@ -1970,20 +2054,26 @@ export interface LineItemChangeDetails {
|
|
|
1970
2054
|
*/
|
|
1971
2055
|
lineItemId?: string;
|
|
1972
2056
|
/**
|
|
1973
|
-
* The
|
|
2057
|
+
* The line item's new quantity.
|
|
2058
|
+
*
|
|
2059
|
+
* > **Note:** Passing `0` will remove the line item.
|
|
1974
2060
|
* @max 1000000
|
|
1975
2061
|
*/
|
|
1976
2062
|
newQuantity?: number | null;
|
|
1977
2063
|
/**
|
|
1978
|
-
*
|
|
2064
|
+
* New price for 1 unit of the line item.
|
|
1979
2065
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
1980
2066
|
*/
|
|
1981
2067
|
newPrice?: string | null;
|
|
1982
|
-
/**
|
|
2068
|
+
/**
|
|
2069
|
+
* New description for the price.
|
|
2070
|
+
*
|
|
2071
|
+
* For example, when price is `0` but additional details about the actual price are needed - `"Starts at $67"`.
|
|
2072
|
+
*/
|
|
1983
2073
|
newPriceDescription?: PriceDescription;
|
|
1984
2074
|
}
|
|
1985
2075
|
export interface UpdateLineItemsResponse {
|
|
1986
|
-
/** Draft order
|
|
2076
|
+
/** Draft order calculated with the latest changes. */
|
|
1987
2077
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1988
2078
|
}
|
|
1989
2079
|
export interface SetDiscountsRequest {
|
|
@@ -1993,8 +2083,9 @@ export interface SetDiscountsRequest {
|
|
|
1993
2083
|
*/
|
|
1994
2084
|
draftOrderId: string;
|
|
1995
2085
|
/**
|
|
1996
|
-
*
|
|
1997
|
-
*
|
|
2086
|
+
* Discounts to set on the draft order.
|
|
2087
|
+
*
|
|
2088
|
+
* Any existing discounts that are not passed will not change.
|
|
1998
2089
|
* @minSize 1
|
|
1999
2090
|
* @maxSize 320
|
|
2000
2091
|
*/
|
|
@@ -2002,15 +2093,17 @@ export interface SetDiscountsRequest {
|
|
|
2002
2093
|
}
|
|
2003
2094
|
export interface IdAndApplied {
|
|
2004
2095
|
/**
|
|
2005
|
-
* Entity ID.
|
|
2096
|
+
* Entity ID.
|
|
2097
|
+
*
|
|
2098
|
+
* Depending on the context, the value is either a discount ID or an additional fee ID.
|
|
2006
2099
|
* @format GUID
|
|
2007
2100
|
*/
|
|
2008
2101
|
id?: string;
|
|
2009
|
-
/**
|
|
2102
|
+
/** Whether the discount or additional fee should be applied to the draft order. */
|
|
2010
2103
|
applied?: boolean;
|
|
2011
2104
|
}
|
|
2012
2105
|
export interface SetDiscountsResponse {
|
|
2013
|
-
/** Draft order
|
|
2106
|
+
/** Draft order calculated with the latest changes. */
|
|
2014
2107
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2015
2108
|
}
|
|
2016
2109
|
export interface CreateCustomDiscountsRequest {
|
|
@@ -2020,17 +2113,19 @@ export interface CreateCustomDiscountsRequest {
|
|
|
2020
2113
|
*/
|
|
2021
2114
|
draftOrderId: string;
|
|
2022
2115
|
/**
|
|
2023
|
-
*
|
|
2116
|
+
* Custom discounts to create.
|
|
2117
|
+
*
|
|
2118
|
+
* Created discounts are not applied by default.
|
|
2024
2119
|
* @minSize 1
|
|
2025
2120
|
* @maxSize 100
|
|
2026
2121
|
*/
|
|
2027
2122
|
discounts?: DiscountOption[];
|
|
2028
2123
|
}
|
|
2029
2124
|
export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
2030
|
-
/**
|
|
2125
|
+
/** Amount to discount from the line item price. */
|
|
2031
2126
|
priceAmount?: Price;
|
|
2032
2127
|
/**
|
|
2033
|
-
*
|
|
2128
|
+
* Percentage to discount from the line item price.
|
|
2034
2129
|
* @format DECIMAL_VALUE
|
|
2035
2130
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2036
2131
|
*/
|
|
@@ -2058,8 +2153,9 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2058
2153
|
*/
|
|
2059
2154
|
description?: string | null;
|
|
2060
2155
|
/**
|
|
2061
|
-
*
|
|
2062
|
-
*
|
|
2156
|
+
* Whether to apply the discount to the draft order.
|
|
2157
|
+
*
|
|
2158
|
+
* Default: `false`
|
|
2063
2159
|
*/
|
|
2064
2160
|
applyToDraftOrder?: boolean | null;
|
|
2065
2161
|
/**
|
|
@@ -2070,10 +2166,10 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2070
2166
|
}
|
|
2071
2167
|
/** @oneof */
|
|
2072
2168
|
export interface DiscountOptionDiscountAmountOneOf {
|
|
2073
|
-
/**
|
|
2169
|
+
/** Amount to discount from the line item price. */
|
|
2074
2170
|
priceAmount?: Price;
|
|
2075
2171
|
/**
|
|
2076
|
-
*
|
|
2172
|
+
* Percentage to discount from the line item price.
|
|
2077
2173
|
* @format DECIMAL_VALUE
|
|
2078
2174
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2079
2175
|
*/
|
|
@@ -2081,15 +2177,15 @@ export interface DiscountOptionDiscountAmountOneOf {
|
|
|
2081
2177
|
}
|
|
2082
2178
|
export declare enum DiscountType {
|
|
2083
2179
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
2084
|
-
/** Discount applies to entire order. */
|
|
2180
|
+
/** Discount applies to the entire order. */
|
|
2085
2181
|
GLOBAL = "GLOBAL",
|
|
2086
|
-
/** Discount applies to specific
|
|
2182
|
+
/** Discount applies to a specific item. */
|
|
2087
2183
|
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
2088
|
-
/** Discount applies to shipping
|
|
2184
|
+
/** Discount applies to shipping fee. */
|
|
2089
2185
|
SHIPPING = "SHIPPING"
|
|
2090
2186
|
}
|
|
2091
2187
|
export interface CreateCustomDiscountsResponse {
|
|
2092
|
-
/** Draft order
|
|
2188
|
+
/** Draft order calculated with the latest changes. */
|
|
2093
2189
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2094
2190
|
}
|
|
2095
2191
|
export interface DeleteCustomDiscountsRequest {
|
|
@@ -2099,7 +2195,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2099
2195
|
*/
|
|
2100
2196
|
draftOrderId: string;
|
|
2101
2197
|
/**
|
|
2102
|
-
*
|
|
2198
|
+
* IDs of the discounts to remove from the draft order.
|
|
2103
2199
|
* @format GUID
|
|
2104
2200
|
* @minSize 1
|
|
2105
2201
|
* @maxSize 100
|
|
@@ -2107,7 +2203,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2107
2203
|
discountIds: string[];
|
|
2108
2204
|
}
|
|
2109
2205
|
export interface DeleteCustomDiscountsResponse {
|
|
2110
|
-
/** Draft order
|
|
2206
|
+
/** Draft order calculated with the latest changes. */
|
|
2111
2207
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2112
2208
|
}
|
|
2113
2209
|
export interface SetAdditionalFeesRequest {
|
|
@@ -2117,15 +2213,16 @@ export interface SetAdditionalFeesRequest {
|
|
|
2117
2213
|
*/
|
|
2118
2214
|
draftOrderId: string;
|
|
2119
2215
|
/**
|
|
2120
|
-
* Additional
|
|
2121
|
-
*
|
|
2216
|
+
* Additional fees to set on the draft order.
|
|
2217
|
+
*
|
|
2218
|
+
* Any existing additional fees that are not passed will not change.
|
|
2122
2219
|
* @minSize 1
|
|
2123
2220
|
* @maxSize 100
|
|
2124
2221
|
*/
|
|
2125
2222
|
additionalFees: IdAndApplied[];
|
|
2126
2223
|
}
|
|
2127
2224
|
export interface SetAdditionalFeesResponse {
|
|
2128
|
-
/** Draft order
|
|
2225
|
+
/** Draft order calculated with the latest changes. */
|
|
2129
2226
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2130
2227
|
}
|
|
2131
2228
|
export interface CreateCustomAdditionalFeesRequest {
|
|
@@ -2135,7 +2232,9 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2135
2232
|
*/
|
|
2136
2233
|
draftOrderId: string;
|
|
2137
2234
|
/**
|
|
2138
|
-
*
|
|
2235
|
+
* Custom additional fees to create.
|
|
2236
|
+
*
|
|
2237
|
+
* Created additional fees are not applied by default.
|
|
2139
2238
|
* @minSize 1
|
|
2140
2239
|
* @maxSize 100
|
|
2141
2240
|
*/
|
|
@@ -2143,28 +2242,30 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2143
2242
|
}
|
|
2144
2243
|
export interface AdditionalFeeOption {
|
|
2145
2244
|
/**
|
|
2146
|
-
*
|
|
2245
|
+
* Name of the additional fee.
|
|
2147
2246
|
* @minLength 1
|
|
2148
2247
|
* @maxLength 50
|
|
2149
2248
|
*/
|
|
2150
2249
|
name?: string;
|
|
2151
|
-
/**
|
|
2250
|
+
/** Price of the additional fee. */
|
|
2152
2251
|
price?: Price;
|
|
2153
|
-
/** Tax calculation details */
|
|
2252
|
+
/** Tax calculation details. */
|
|
2154
2253
|
taxDetails?: TaxDetails;
|
|
2155
2254
|
/**
|
|
2156
|
-
*
|
|
2157
|
-
*
|
|
2255
|
+
* Whether to apply the additional fee to the draft order.
|
|
2256
|
+
*
|
|
2257
|
+
* Default: `false`
|
|
2158
2258
|
*/
|
|
2159
2259
|
applyToDraftOrder?: boolean | null;
|
|
2160
2260
|
/**
|
|
2161
|
-
* Additional fee
|
|
2261
|
+
* Additional fee unique code (or ID) for future processing.
|
|
2162
2262
|
* @minLength 1
|
|
2163
2263
|
* @maxLength 100
|
|
2164
2264
|
*/
|
|
2165
2265
|
code?: string | null;
|
|
2166
2266
|
/**
|
|
2167
|
-
*
|
|
2267
|
+
* IDs of the line items associated with this additional fee.
|
|
2268
|
+
*
|
|
2168
2269
|
* If no `lineItemIds` are provided, the fee will be associated with the whole order.
|
|
2169
2270
|
* @format GUID
|
|
2170
2271
|
* @maxSize 300
|
|
@@ -2172,7 +2273,7 @@ export interface AdditionalFeeOption {
|
|
|
2172
2273
|
lineItemIds?: string[];
|
|
2173
2274
|
}
|
|
2174
2275
|
export interface CreateCustomAdditionalFeesResponse {
|
|
2175
|
-
/** Draft order
|
|
2276
|
+
/** Draft order calculated with the latest changes. */
|
|
2176
2277
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2177
2278
|
}
|
|
2178
2279
|
export interface DeleteCustomAdditionalFeesRequest {
|
|
@@ -2182,7 +2283,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2182
2283
|
*/
|
|
2183
2284
|
draftOrderId: string;
|
|
2184
2285
|
/**
|
|
2185
|
-
*
|
|
2286
|
+
* IDs of the additional fees to remove from the draft order.
|
|
2186
2287
|
* @format GUID
|
|
2187
2288
|
* @minSize 1
|
|
2188
2289
|
* @maxSize 100
|
|
@@ -2190,7 +2291,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2190
2291
|
customAdditionalFees: string[];
|
|
2191
2292
|
}
|
|
2192
2293
|
export interface DeleteCustomAdditionalFeesResponse {
|
|
2193
|
-
/** Draft order
|
|
2294
|
+
/** Draft order calculated with the latest changes. */
|
|
2194
2295
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2195
2296
|
}
|
|
2196
2297
|
export interface SetShippingInfoRequest {
|
|
@@ -2199,11 +2300,15 @@ export interface SetShippingInfoRequest {
|
|
|
2199
2300
|
* @format GUID
|
|
2200
2301
|
*/
|
|
2201
2302
|
draftOrderId: string;
|
|
2202
|
-
/**
|
|
2303
|
+
/**
|
|
2304
|
+
* Shipping info to set on the draft order.
|
|
2305
|
+
*
|
|
2306
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2307
|
+
*/
|
|
2203
2308
|
shippingInfo?: V1ShippingInformation;
|
|
2204
2309
|
}
|
|
2205
2310
|
export interface SetShippingInfoResponse {
|
|
2206
|
-
/** Draft order
|
|
2311
|
+
/** Draft order calculated with the latest changes. */
|
|
2207
2312
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2208
2313
|
}
|
|
2209
2314
|
export interface SetBuyerInfoRequest {
|
|
@@ -2212,11 +2317,15 @@ export interface SetBuyerInfoRequest {
|
|
|
2212
2317
|
* @format GUID
|
|
2213
2318
|
*/
|
|
2214
2319
|
draftOrderId: string;
|
|
2215
|
-
/**
|
|
2320
|
+
/**
|
|
2321
|
+
* Shipping info to set on the draft order.
|
|
2322
|
+
*
|
|
2323
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2324
|
+
*/
|
|
2216
2325
|
buyerInfo?: BuyerInfo;
|
|
2217
2326
|
}
|
|
2218
2327
|
export interface SetBuyerInfoResponse {
|
|
2219
|
-
/** Draft order
|
|
2328
|
+
/** Draft order calculated with the latest changes. */
|
|
2220
2329
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2221
2330
|
}
|
|
2222
2331
|
export interface SetRecipientInfoRequest {
|
|
@@ -2225,11 +2334,15 @@ export interface SetRecipientInfoRequest {
|
|
|
2225
2334
|
* @format GUID
|
|
2226
2335
|
*/
|
|
2227
2336
|
draftOrderId: string;
|
|
2228
|
-
/**
|
|
2337
|
+
/**
|
|
2338
|
+
* Recipient address and contact details.
|
|
2339
|
+
*
|
|
2340
|
+
* > **Note:** Passing an empty object will remove the existing recipient info.
|
|
2341
|
+
*/
|
|
2229
2342
|
recipientInfo?: AddressWithContact;
|
|
2230
2343
|
}
|
|
2231
2344
|
export interface SetRecipientInfoResponse {
|
|
2232
|
-
/** Draft order
|
|
2345
|
+
/** Draft order calculated with the latest changes. */
|
|
2233
2346
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2234
2347
|
}
|
|
2235
2348
|
export interface SetBillingInfoRequest {
|
|
@@ -2238,11 +2351,15 @@ export interface SetBillingInfoRequest {
|
|
|
2238
2351
|
* @format GUID
|
|
2239
2352
|
*/
|
|
2240
2353
|
draftOrderId: string;
|
|
2241
|
-
/**
|
|
2354
|
+
/**
|
|
2355
|
+
* Billing address and contact details.
|
|
2356
|
+
*
|
|
2357
|
+
* > **Note:** Passing an empty object will remove the existing billing info.
|
|
2358
|
+
*/
|
|
2242
2359
|
billingInfo?: AddressWithContact;
|
|
2243
2360
|
}
|
|
2244
2361
|
export interface SetBillingInfoResponse {
|
|
2245
|
-
/** Draft order
|
|
2362
|
+
/** Draft order calculated with the latest changes. */
|
|
2246
2363
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2247
2364
|
}
|
|
2248
2365
|
/** Deprecated */
|
|
@@ -2257,7 +2374,7 @@ export interface UpdateShippingInfoRequest {
|
|
|
2257
2374
|
}
|
|
2258
2375
|
/** Deprecated */
|
|
2259
2376
|
export interface UpdateShippingInfoResponse {
|
|
2260
|
-
/** Draft order
|
|
2377
|
+
/** Draft order calculated with the latest changes. */
|
|
2261
2378
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2262
2379
|
}
|
|
2263
2380
|
export interface GetDraftOrderRequest {
|
|
@@ -2268,26 +2385,30 @@ export interface GetDraftOrderRequest {
|
|
|
2268
2385
|
draftOrderId: string;
|
|
2269
2386
|
}
|
|
2270
2387
|
export interface GetDraftOrderResponse {
|
|
2271
|
-
/** Draft order
|
|
2388
|
+
/** Draft order calculated with the latest changes. */
|
|
2272
2389
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2273
2390
|
}
|
|
2274
2391
|
export interface GetOrderDraftabilityStatusRequest {
|
|
2275
2392
|
/**
|
|
2276
|
-
* Order
|
|
2393
|
+
* Order ID.
|
|
2277
2394
|
* @format GUID
|
|
2278
2395
|
*/
|
|
2279
2396
|
orderId: string;
|
|
2280
2397
|
}
|
|
2281
2398
|
export interface GetOrderDraftabilityStatusResponse {
|
|
2282
2399
|
/**
|
|
2283
|
-
* Order
|
|
2400
|
+
* Order ID.
|
|
2284
2401
|
* @format GUID
|
|
2285
2402
|
*/
|
|
2286
2403
|
orderId?: string;
|
|
2287
|
-
/**
|
|
2404
|
+
/**
|
|
2405
|
+
* Whether a draft can be created based on the order.
|
|
2406
|
+
*
|
|
2407
|
+
* Default: `false`
|
|
2408
|
+
*/
|
|
2288
2409
|
orderDraftable?: boolean;
|
|
2289
2410
|
/**
|
|
2290
|
-
* Reasons why
|
|
2411
|
+
* Reasons why a draft order cannot be created from the order.
|
|
2291
2412
|
* @maxSize 5
|
|
2292
2413
|
*/
|
|
2293
2414
|
nonDraftableReasons?: NonDraftableReason[];
|
|
@@ -2324,7 +2445,7 @@ export interface CommitDraftOrderRequest {
|
|
|
2324
2445
|
/** Optional side effects to trigger. */
|
|
2325
2446
|
commitSettings?: DraftOrderCommitSettings;
|
|
2326
2447
|
/**
|
|
2327
|
-
* Reason for edit,
|
|
2448
|
+
* Reason for edit, provided by user (optional).
|
|
2328
2449
|
* @maxLength 200
|
|
2329
2450
|
*/
|
|
2330
2451
|
reason?: string | null;
|
|
@@ -3395,7 +3516,7 @@ export interface CreateOrderFromDraftRequest {
|
|
|
3395
3516
|
/** Optional side effects to trigger. */
|
|
3396
3517
|
createSettings?: OrderCreateSettings;
|
|
3397
3518
|
/**
|
|
3398
|
-
* Reason for order creation,
|
|
3519
|
+
* Reason for order creation, provided by user (optional).
|
|
3399
3520
|
* @maxLength 200
|
|
3400
3521
|
*/
|
|
3401
3522
|
reason?: string | null;
|
|
@@ -3421,7 +3542,7 @@ export interface OrderCreateNotifications {
|
|
|
3421
3542
|
sendNotificationsToBusiness?: boolean | null;
|
|
3422
3543
|
}
|
|
3423
3544
|
export interface CreateOrderFromDraftResponse {
|
|
3424
|
-
/**
|
|
3545
|
+
/** Draft order after commit. */
|
|
3425
3546
|
committedDraftOrder?: DraftOrder;
|
|
3426
3547
|
/** Created order. */
|
|
3427
3548
|
createdOrder?: Order;
|
|
@@ -3547,14 +3668,14 @@ export interface SetTaxExemptionRequest {
|
|
|
3547
3668
|
*/
|
|
3548
3669
|
draftOrderId: string;
|
|
3549
3670
|
/**
|
|
3550
|
-
*
|
|
3671
|
+
* Whether the draft order is exempt from tax calculations.
|
|
3551
3672
|
*
|
|
3552
3673
|
* Default: `false`
|
|
3553
3674
|
*/
|
|
3554
3675
|
taxExempt: boolean | null;
|
|
3555
3676
|
}
|
|
3556
3677
|
export interface SetTaxExemptionResponse {
|
|
3557
|
-
/** Draft order
|
|
3678
|
+
/** Draft order calculated with the latest changes. */
|
|
3558
3679
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3559
3680
|
}
|
|
3560
3681
|
export interface SetBusinessLocationRequest {
|
|
@@ -3567,7 +3688,7 @@ export interface SetBusinessLocationRequest {
|
|
|
3567
3688
|
businessLocation?: Location;
|
|
3568
3689
|
}
|
|
3569
3690
|
export interface SetBusinessLocationResponse {
|
|
3570
|
-
/** Draft order
|
|
3691
|
+
/** Draft order calculated with the latest changes. */
|
|
3571
3692
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3572
3693
|
}
|
|
3573
3694
|
export interface DomainEvent extends DomainEventBodyOneOf {
|