@wix/auto_sdk_ecom_draft-orders 1.0.23 → 1.0.24
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.http.d.ts +42 -26
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js +42 -26
- 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 +47 -33
- 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 +138 -84
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js +9 -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 +217 -127
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +56 -40
- 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.http.d.ts +42 -26
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.js +42 -26
- 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 +47 -33
- 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 +138 -84
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.js +9 -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 +217 -127
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js +56 -40
- 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.http.d.ts +42 -26
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js +42 -26
- 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 +47 -33
- 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 +138 -84
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js +9 -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 +217 -127
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +56 -40
- 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.http.d.ts +42 -26
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js +42 -26
- 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 +47 -33
- 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 +138 -84
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js +9 -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 +217 -127
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js +56 -40
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Draft Orders main entity. */
|
|
2
2
|
export interface DraftOrder {
|
|
3
3
|
/**
|
|
4
4
|
* Draft order ID.
|
|
@@ -39,12 +39,14 @@ export interface DraftOrder {
|
|
|
39
39
|
billingInfo?: AddressWithContact;
|
|
40
40
|
/**
|
|
41
41
|
* Additional fees.
|
|
42
|
+
*
|
|
42
43
|
* Includes details about the source, and whether the additional fee is applied to the order.
|
|
43
44
|
* @maxSize 100
|
|
44
45
|
*/
|
|
45
46
|
additionalFees?: AdditionalFeeDetails[];
|
|
46
47
|
/**
|
|
47
48
|
* Discounts.
|
|
49
|
+
*
|
|
48
50
|
* Includes details about the source, and whether the discount is applied to the order.
|
|
49
51
|
* @maxSize 320
|
|
50
52
|
*/
|
|
@@ -122,11 +124,13 @@ export interface DraftOrder {
|
|
|
122
124
|
taxInfo?: OrderTaxInfo;
|
|
123
125
|
/**
|
|
124
126
|
* Custom field data for the draft order object.
|
|
127
|
+
*
|
|
125
128
|
* [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
129
|
*/
|
|
127
130
|
extendedFields?: ExtendedFields;
|
|
128
131
|
/**
|
|
129
132
|
* Buyer information.
|
|
133
|
+
*
|
|
130
134
|
* Includes details about changes when relevant.
|
|
131
135
|
*/
|
|
132
136
|
buyerDetails?: BuyerDetails;
|
|
@@ -136,7 +140,8 @@ export interface DraftOrder {
|
|
|
136
140
|
*/
|
|
137
141
|
billingDetails?: BillingDetails;
|
|
138
142
|
/**
|
|
139
|
-
* Order business location
|
|
143
|
+
* Order business location.
|
|
144
|
+
*
|
|
140
145
|
* Includes details about changes when relevant.
|
|
141
146
|
*/
|
|
142
147
|
businessLocationDetails?: BusinessLocationDetails;
|
|
@@ -1154,10 +1159,10 @@ export interface AdditionalFee {
|
|
|
1154
1159
|
lineItemIds?: string[];
|
|
1155
1160
|
}
|
|
1156
1161
|
export interface TaxDetails {
|
|
1157
|
-
/**
|
|
1162
|
+
/** Whether the additional fee is taxable. */
|
|
1158
1163
|
taxable?: boolean;
|
|
1159
1164
|
/**
|
|
1160
|
-
* Optional tax group ID to use when calculating tax for this additional fee
|
|
1165
|
+
* Optional tax group ID to use when calculating tax for this additional fee.
|
|
1161
1166
|
* @format GUID
|
|
1162
1167
|
*/
|
|
1163
1168
|
taxGroupId?: string | null;
|
|
@@ -1333,9 +1338,13 @@ export interface CreatedByStringOneOf {
|
|
|
1333
1338
|
appId?: string;
|
|
1334
1339
|
}
|
|
1335
1340
|
export declare enum EditingStatus {
|
|
1336
|
-
/** Draft order
|
|
1341
|
+
/** Draft order is being edited. */
|
|
1337
1342
|
DRAFT = "DRAFT",
|
|
1338
|
-
/**
|
|
1343
|
+
/**
|
|
1344
|
+
* Draft order has been committed - No further modifications allowed.
|
|
1345
|
+
*
|
|
1346
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
1347
|
+
*/
|
|
1339
1348
|
COMMITTED = "COMMITTED"
|
|
1340
1349
|
}
|
|
1341
1350
|
export declare enum WeightUnit {
|
|
@@ -1369,7 +1378,7 @@ export interface TaxSummary {
|
|
|
1369
1378
|
}
|
|
1370
1379
|
export interface BalanceSummary {
|
|
1371
1380
|
/**
|
|
1372
|
-
* Amount left to pay for order to be considered paid.
|
|
1381
|
+
* Amount left to pay for the order to be considered paid.
|
|
1373
1382
|
* @readonly
|
|
1374
1383
|
*/
|
|
1375
1384
|
balance?: Balance;
|
|
@@ -1609,31 +1618,33 @@ export interface BusinessLocationChangedDetails {
|
|
|
1609
1618
|
}
|
|
1610
1619
|
export interface CreateDraftOrderRequest {
|
|
1611
1620
|
/**
|
|
1612
|
-
*
|
|
1621
|
+
* ID of the order to create a draft for.
|
|
1613
1622
|
* @format GUID
|
|
1614
1623
|
*/
|
|
1615
1624
|
orderId: string | null;
|
|
1616
1625
|
}
|
|
1617
1626
|
export interface CreateDraftOrderResponse {
|
|
1618
|
-
/** Draft order
|
|
1627
|
+
/** Draft order calculated with the latest changes. */
|
|
1619
1628
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1620
1629
|
/**
|
|
1621
|
-
*
|
|
1622
|
-
*
|
|
1630
|
+
* Whether the response contains a draft order that existed before request.
|
|
1631
|
+
*
|
|
1632
|
+
* `true`: The draft order already exists and is updated.
|
|
1633
|
+
* `false`: A new draft order is created.
|
|
1623
1634
|
*/
|
|
1624
1635
|
preexistingDraftOrder?: boolean | null;
|
|
1625
1636
|
}
|
|
1626
1637
|
export interface CalculatedDraftOrder {
|
|
1627
|
-
/** Draft order
|
|
1638
|
+
/** Draft order. */
|
|
1628
1639
|
draftOrder?: DraftOrder;
|
|
1629
|
-
/**
|
|
1640
|
+
/** Shipping options. */
|
|
1630
1641
|
shippingOptions?: ShippingOption[];
|
|
1631
1642
|
/** Errors that occurred during calculation. */
|
|
1632
1643
|
calculationErrors?: CalculationErrors;
|
|
1633
1644
|
}
|
|
1634
1645
|
export interface ShippingOption {
|
|
1635
1646
|
/**
|
|
1636
|
-
*
|
|
1647
|
+
* Carrier ID.
|
|
1637
1648
|
* @format GUID
|
|
1638
1649
|
*/
|
|
1639
1650
|
carrierId?: string | null;
|
|
@@ -1649,37 +1660,39 @@ export interface ShippingOption {
|
|
|
1649
1660
|
export interface DeliveryLogistics {
|
|
1650
1661
|
/** When the item is expected to be delivered in free text, e.g "3-5 business days" */
|
|
1651
1662
|
deliveryTime?: string | null;
|
|
1652
|
-
/**
|
|
1663
|
+
/**
|
|
1664
|
+
* Instructions for delivery.
|
|
1665
|
+
*
|
|
1666
|
+
* For example, "Please arrive during business hours."
|
|
1667
|
+
*/
|
|
1653
1668
|
instructions?: string | null;
|
|
1654
|
-
/** Additional pickup details
|
|
1669
|
+
/** Additional pickup details. */
|
|
1655
1670
|
pickupDetails?: PickupDetails;
|
|
1656
|
-
/** Expected delivery time slot
|
|
1671
|
+
/** Expected delivery time slot. */
|
|
1657
1672
|
deliveryTimeSlot?: DeliveryTimeSlot;
|
|
1658
1673
|
}
|
|
1659
1674
|
export interface PickupDetails {
|
|
1660
|
-
/** Pickup address */
|
|
1675
|
+
/** Pickup address. */
|
|
1661
1676
|
address?: Address;
|
|
1662
1677
|
/** Pickup method. */
|
|
1663
1678
|
pickupMethod?: PickupMethod;
|
|
1664
1679
|
}
|
|
1665
1680
|
export declare enum PickupMethod {
|
|
1666
1681
|
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1667
|
-
/** Pickup is from the merchant's brick and mortar store. */
|
|
1668
1682
|
STORE_PICKUP = "STORE_PICKUP",
|
|
1669
|
-
/** Item is shipped to a specified pickup point. */
|
|
1670
1683
|
PICKUP_POINT = "PICKUP_POINT"
|
|
1671
1684
|
}
|
|
1672
1685
|
export interface DeliveryTimeSlot {
|
|
1673
|
-
/**
|
|
1686
|
+
/** Delivery time slot start time. */
|
|
1674
1687
|
from?: Date | null;
|
|
1675
|
-
/**
|
|
1688
|
+
/** Delivery time slot end time. */
|
|
1676
1689
|
to?: Date | null;
|
|
1677
1690
|
}
|
|
1678
1691
|
export interface ShippingPrice {
|
|
1679
|
-
/**
|
|
1692
|
+
/** Shipping price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */
|
|
1680
1693
|
price?: Price;
|
|
1681
1694
|
/**
|
|
1682
|
-
* Currency of the shipping
|
|
1695
|
+
* 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
1696
|
* @format CURRENCY
|
|
1684
1697
|
*/
|
|
1685
1698
|
currency?: string;
|
|
@@ -1808,7 +1821,7 @@ export interface CarrierError {
|
|
|
1808
1821
|
export interface CreateEmptyDraftOrderRequest {
|
|
1809
1822
|
}
|
|
1810
1823
|
export interface CreateEmptyDraftOrderResponse {
|
|
1811
|
-
/** Draft order
|
|
1824
|
+
/** Draft order calculated with the latest changes. */
|
|
1812
1825
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1813
1826
|
}
|
|
1814
1827
|
export interface AddLineItemsToDraftOrderRequest {
|
|
@@ -1823,7 +1836,9 @@ export interface AddLineItemsToDraftOrderRequest {
|
|
|
1823
1836
|
*/
|
|
1824
1837
|
catalogLineItems?: CatalogReferenceLineItem[];
|
|
1825
1838
|
/**
|
|
1826
|
-
* Custom line items to add to draft order.
|
|
1839
|
+
* Custom line items to add to draft order.
|
|
1840
|
+
*
|
|
1841
|
+
* Custom line items do not trigger the Catalog Service Plugin.
|
|
1827
1842
|
* @maxSize 300
|
|
1828
1843
|
*/
|
|
1829
1844
|
customLineItems?: CustomLineItem[];
|
|
@@ -1872,7 +1887,9 @@ export interface CustomLineItem {
|
|
|
1872
1887
|
*/
|
|
1873
1888
|
quantity?: number;
|
|
1874
1889
|
/**
|
|
1875
|
-
* Catalog and item reference.
|
|
1890
|
+
* Catalog and item reference.
|
|
1891
|
+
*
|
|
1892
|
+
* Includes IDs for the item and the catalog it came from, as well as further optional info.
|
|
1876
1893
|
* Optional for custom line items, which don't trigger the Catalog service plugin.
|
|
1877
1894
|
*/
|
|
1878
1895
|
catalogReference?: CatalogReference;
|
|
@@ -1947,7 +1964,7 @@ export declare enum FileType {
|
|
|
1947
1964
|
SECURE_ARCHIVE = "SECURE_ARCHIVE"
|
|
1948
1965
|
}
|
|
1949
1966
|
export interface AddLineItemsToDraftOrderResponse {
|
|
1950
|
-
/** Draft order
|
|
1967
|
+
/** Draft order calculated with the latest changes. */
|
|
1951
1968
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1952
1969
|
}
|
|
1953
1970
|
export interface UpdateLineItemsRequest {
|
|
@@ -1970,20 +1987,26 @@ export interface LineItemChangeDetails {
|
|
|
1970
1987
|
*/
|
|
1971
1988
|
lineItemId?: string;
|
|
1972
1989
|
/**
|
|
1973
|
-
* The
|
|
1990
|
+
* The line item's new quantity.
|
|
1991
|
+
*
|
|
1992
|
+
* > **Note:** Passing `0` will remove the line item.
|
|
1974
1993
|
* @max 1000000
|
|
1975
1994
|
*/
|
|
1976
1995
|
newQuantity?: number | null;
|
|
1977
1996
|
/**
|
|
1978
|
-
*
|
|
1997
|
+
* New price for 1 unit of the line item.
|
|
1979
1998
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
1980
1999
|
*/
|
|
1981
2000
|
newPrice?: string | null;
|
|
1982
|
-
/**
|
|
2001
|
+
/**
|
|
2002
|
+
* New description for the price.
|
|
2003
|
+
*
|
|
2004
|
+
* For example, when price is `0` but additional details about the actual price are needed - `"Starts at $67"`.
|
|
2005
|
+
*/
|
|
1983
2006
|
newPriceDescription?: PriceDescription;
|
|
1984
2007
|
}
|
|
1985
2008
|
export interface UpdateLineItemsResponse {
|
|
1986
|
-
/** Draft order
|
|
2009
|
+
/** Draft order calculated with the latest changes. */
|
|
1987
2010
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1988
2011
|
}
|
|
1989
2012
|
export interface SetDiscountsRequest {
|
|
@@ -1993,8 +2016,9 @@ export interface SetDiscountsRequest {
|
|
|
1993
2016
|
*/
|
|
1994
2017
|
draftOrderId: string;
|
|
1995
2018
|
/**
|
|
1996
|
-
*
|
|
1997
|
-
*
|
|
2019
|
+
* Discounts to set on the draft order.
|
|
2020
|
+
*
|
|
2021
|
+
* Any existing discounts that are not passed will not change.
|
|
1998
2022
|
* @minSize 1
|
|
1999
2023
|
* @maxSize 320
|
|
2000
2024
|
*/
|
|
@@ -2002,15 +2026,17 @@ export interface SetDiscountsRequest {
|
|
|
2002
2026
|
}
|
|
2003
2027
|
export interface IdAndApplied {
|
|
2004
2028
|
/**
|
|
2005
|
-
* Entity ID.
|
|
2029
|
+
* Entity ID.
|
|
2030
|
+
*
|
|
2031
|
+
* Depending on the context, the value is either a discount ID or an additional fee ID.
|
|
2006
2032
|
* @format GUID
|
|
2007
2033
|
*/
|
|
2008
2034
|
id?: string;
|
|
2009
|
-
/**
|
|
2035
|
+
/** Whether the discount or additional fee should be applied to the draft order. */
|
|
2010
2036
|
applied?: boolean;
|
|
2011
2037
|
}
|
|
2012
2038
|
export interface SetDiscountsResponse {
|
|
2013
|
-
/** Draft order
|
|
2039
|
+
/** Draft order calculated with the latest changes. */
|
|
2014
2040
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2015
2041
|
}
|
|
2016
2042
|
export interface CreateCustomDiscountsRequest {
|
|
@@ -2020,17 +2046,19 @@ export interface CreateCustomDiscountsRequest {
|
|
|
2020
2046
|
*/
|
|
2021
2047
|
draftOrderId: string;
|
|
2022
2048
|
/**
|
|
2023
|
-
*
|
|
2049
|
+
* Custom discounts to create.
|
|
2050
|
+
*
|
|
2051
|
+
* Created discounts are not applied by default.
|
|
2024
2052
|
* @minSize 1
|
|
2025
2053
|
* @maxSize 100
|
|
2026
2054
|
*/
|
|
2027
2055
|
discounts?: DiscountOption[];
|
|
2028
2056
|
}
|
|
2029
2057
|
export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
2030
|
-
/**
|
|
2058
|
+
/** Amount to discount from the line item price. */
|
|
2031
2059
|
priceAmount?: Price;
|
|
2032
2060
|
/**
|
|
2033
|
-
*
|
|
2061
|
+
* Percentage to discount from the line item price.
|
|
2034
2062
|
* @format DECIMAL_VALUE
|
|
2035
2063
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2036
2064
|
*/
|
|
@@ -2058,8 +2086,9 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2058
2086
|
*/
|
|
2059
2087
|
description?: string | null;
|
|
2060
2088
|
/**
|
|
2061
|
-
*
|
|
2062
|
-
*
|
|
2089
|
+
* Whether to apply the discount to the draft order.
|
|
2090
|
+
*
|
|
2091
|
+
* Default: `false`
|
|
2063
2092
|
*/
|
|
2064
2093
|
applyToDraftOrder?: boolean | null;
|
|
2065
2094
|
/**
|
|
@@ -2070,10 +2099,10 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2070
2099
|
}
|
|
2071
2100
|
/** @oneof */
|
|
2072
2101
|
export interface DiscountOptionDiscountAmountOneOf {
|
|
2073
|
-
/**
|
|
2102
|
+
/** Amount to discount from the line item price. */
|
|
2074
2103
|
priceAmount?: Price;
|
|
2075
2104
|
/**
|
|
2076
|
-
*
|
|
2105
|
+
* Percentage to discount from the line item price.
|
|
2077
2106
|
* @format DECIMAL_VALUE
|
|
2078
2107
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2079
2108
|
*/
|
|
@@ -2081,15 +2110,15 @@ export interface DiscountOptionDiscountAmountOneOf {
|
|
|
2081
2110
|
}
|
|
2082
2111
|
export declare enum DiscountType {
|
|
2083
2112
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
2084
|
-
/** Discount applies to entire order. */
|
|
2113
|
+
/** Discount applies to the entire order. */
|
|
2085
2114
|
GLOBAL = "GLOBAL",
|
|
2086
|
-
/** Discount applies to specific
|
|
2115
|
+
/** Discount applies to a specific item. */
|
|
2087
2116
|
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
2088
|
-
/** Discount applies to shipping
|
|
2117
|
+
/** Discount applies to shipping fee. */
|
|
2089
2118
|
SHIPPING = "SHIPPING"
|
|
2090
2119
|
}
|
|
2091
2120
|
export interface CreateCustomDiscountsResponse {
|
|
2092
|
-
/** Draft order
|
|
2121
|
+
/** Draft order calculated with the latest changes. */
|
|
2093
2122
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2094
2123
|
}
|
|
2095
2124
|
export interface DeleteCustomDiscountsRequest {
|
|
@@ -2099,7 +2128,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2099
2128
|
*/
|
|
2100
2129
|
draftOrderId: string;
|
|
2101
2130
|
/**
|
|
2102
|
-
*
|
|
2131
|
+
* IDs of the discounts to remove from the draft order.
|
|
2103
2132
|
* @format GUID
|
|
2104
2133
|
* @minSize 1
|
|
2105
2134
|
* @maxSize 100
|
|
@@ -2107,7 +2136,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2107
2136
|
discountIds: string[];
|
|
2108
2137
|
}
|
|
2109
2138
|
export interface DeleteCustomDiscountsResponse {
|
|
2110
|
-
/** Draft order
|
|
2139
|
+
/** Draft order calculated with the latest changes. */
|
|
2111
2140
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2112
2141
|
}
|
|
2113
2142
|
export interface SetAdditionalFeesRequest {
|
|
@@ -2117,15 +2146,16 @@ export interface SetAdditionalFeesRequest {
|
|
|
2117
2146
|
*/
|
|
2118
2147
|
draftOrderId: string;
|
|
2119
2148
|
/**
|
|
2120
|
-
* Additional
|
|
2121
|
-
*
|
|
2149
|
+
* Additional fees to set on the draft order.
|
|
2150
|
+
*
|
|
2151
|
+
* Any existing additional fees that are not passed will not change.
|
|
2122
2152
|
* @minSize 1
|
|
2123
2153
|
* @maxSize 100
|
|
2124
2154
|
*/
|
|
2125
2155
|
additionalFees: IdAndApplied[];
|
|
2126
2156
|
}
|
|
2127
2157
|
export interface SetAdditionalFeesResponse {
|
|
2128
|
-
/** Draft order
|
|
2158
|
+
/** Draft order calculated with the latest changes. */
|
|
2129
2159
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2130
2160
|
}
|
|
2131
2161
|
export interface CreateCustomAdditionalFeesRequest {
|
|
@@ -2135,7 +2165,9 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2135
2165
|
*/
|
|
2136
2166
|
draftOrderId: string;
|
|
2137
2167
|
/**
|
|
2138
|
-
*
|
|
2168
|
+
* Custom additional fees to create.
|
|
2169
|
+
*
|
|
2170
|
+
* Created additional fees are not applied by default.
|
|
2139
2171
|
* @minSize 1
|
|
2140
2172
|
* @maxSize 100
|
|
2141
2173
|
*/
|
|
@@ -2143,28 +2175,30 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2143
2175
|
}
|
|
2144
2176
|
export interface AdditionalFeeOption {
|
|
2145
2177
|
/**
|
|
2146
|
-
*
|
|
2178
|
+
* Name of the additional fee.
|
|
2147
2179
|
* @minLength 1
|
|
2148
2180
|
* @maxLength 50
|
|
2149
2181
|
*/
|
|
2150
2182
|
name?: string;
|
|
2151
|
-
/**
|
|
2183
|
+
/** Price of the additional fee. */
|
|
2152
2184
|
price?: Price;
|
|
2153
|
-
/** Tax calculation details */
|
|
2185
|
+
/** Tax calculation details. */
|
|
2154
2186
|
taxDetails?: TaxDetails;
|
|
2155
2187
|
/**
|
|
2156
|
-
*
|
|
2157
|
-
*
|
|
2188
|
+
* Whether to apply the additional fee to the draft order.
|
|
2189
|
+
*
|
|
2190
|
+
* Default: `false`
|
|
2158
2191
|
*/
|
|
2159
2192
|
applyToDraftOrder?: boolean | null;
|
|
2160
2193
|
/**
|
|
2161
|
-
* Additional fee
|
|
2194
|
+
* Additional fee unique code (or ID) for future processing.
|
|
2162
2195
|
* @minLength 1
|
|
2163
2196
|
* @maxLength 100
|
|
2164
2197
|
*/
|
|
2165
2198
|
code?: string | null;
|
|
2166
2199
|
/**
|
|
2167
|
-
*
|
|
2200
|
+
* IDs of the line items associated with this additional fee.
|
|
2201
|
+
*
|
|
2168
2202
|
* If no `lineItemIds` are provided, the fee will be associated with the whole order.
|
|
2169
2203
|
* @format GUID
|
|
2170
2204
|
* @maxSize 300
|
|
@@ -2172,7 +2206,7 @@ export interface AdditionalFeeOption {
|
|
|
2172
2206
|
lineItemIds?: string[];
|
|
2173
2207
|
}
|
|
2174
2208
|
export interface CreateCustomAdditionalFeesResponse {
|
|
2175
|
-
/** Draft order
|
|
2209
|
+
/** Draft order calculated with the latest changes. */
|
|
2176
2210
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2177
2211
|
}
|
|
2178
2212
|
export interface DeleteCustomAdditionalFeesRequest {
|
|
@@ -2182,7 +2216,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2182
2216
|
*/
|
|
2183
2217
|
draftOrderId: string;
|
|
2184
2218
|
/**
|
|
2185
|
-
*
|
|
2219
|
+
* IDs of the additional fees to remove from the draft order.
|
|
2186
2220
|
* @format GUID
|
|
2187
2221
|
* @minSize 1
|
|
2188
2222
|
* @maxSize 100
|
|
@@ -2190,7 +2224,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2190
2224
|
customAdditionalFees: string[];
|
|
2191
2225
|
}
|
|
2192
2226
|
export interface DeleteCustomAdditionalFeesResponse {
|
|
2193
|
-
/** Draft order
|
|
2227
|
+
/** Draft order calculated with the latest changes. */
|
|
2194
2228
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2195
2229
|
}
|
|
2196
2230
|
export interface SetShippingInfoRequest {
|
|
@@ -2199,11 +2233,15 @@ export interface SetShippingInfoRequest {
|
|
|
2199
2233
|
* @format GUID
|
|
2200
2234
|
*/
|
|
2201
2235
|
draftOrderId: string;
|
|
2202
|
-
/**
|
|
2236
|
+
/**
|
|
2237
|
+
* Shipping info to set on the draft order.
|
|
2238
|
+
*
|
|
2239
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2240
|
+
*/
|
|
2203
2241
|
shippingInfo?: V1ShippingInformation;
|
|
2204
2242
|
}
|
|
2205
2243
|
export interface SetShippingInfoResponse {
|
|
2206
|
-
/** Draft order
|
|
2244
|
+
/** Draft order calculated with the latest changes. */
|
|
2207
2245
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2208
2246
|
}
|
|
2209
2247
|
export interface SetBuyerInfoRequest {
|
|
@@ -2212,11 +2250,15 @@ export interface SetBuyerInfoRequest {
|
|
|
2212
2250
|
* @format GUID
|
|
2213
2251
|
*/
|
|
2214
2252
|
draftOrderId: string;
|
|
2215
|
-
/**
|
|
2253
|
+
/**
|
|
2254
|
+
* Shipping info to set on the draft order.
|
|
2255
|
+
*
|
|
2256
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2257
|
+
*/
|
|
2216
2258
|
buyerInfo?: BuyerInfo;
|
|
2217
2259
|
}
|
|
2218
2260
|
export interface SetBuyerInfoResponse {
|
|
2219
|
-
/** Draft order
|
|
2261
|
+
/** Draft order calculated with the latest changes. */
|
|
2220
2262
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2221
2263
|
}
|
|
2222
2264
|
export interface SetRecipientInfoRequest {
|
|
@@ -2225,11 +2267,15 @@ export interface SetRecipientInfoRequest {
|
|
|
2225
2267
|
* @format GUID
|
|
2226
2268
|
*/
|
|
2227
2269
|
draftOrderId: string;
|
|
2228
|
-
/**
|
|
2270
|
+
/**
|
|
2271
|
+
* Recipient address and contact details.
|
|
2272
|
+
*
|
|
2273
|
+
* > **Note:** Passing an empty object will remove the existing recipient info.
|
|
2274
|
+
*/
|
|
2229
2275
|
recipientInfo?: AddressWithContact;
|
|
2230
2276
|
}
|
|
2231
2277
|
export interface SetRecipientInfoResponse {
|
|
2232
|
-
/** Draft order
|
|
2278
|
+
/** Draft order calculated with the latest changes. */
|
|
2233
2279
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2234
2280
|
}
|
|
2235
2281
|
export interface SetBillingInfoRequest {
|
|
@@ -2238,11 +2284,15 @@ export interface SetBillingInfoRequest {
|
|
|
2238
2284
|
* @format GUID
|
|
2239
2285
|
*/
|
|
2240
2286
|
draftOrderId: string;
|
|
2241
|
-
/**
|
|
2287
|
+
/**
|
|
2288
|
+
* Billing address and contact details.
|
|
2289
|
+
*
|
|
2290
|
+
* > **Note:** Passing an empty object will remove the existing billing info.
|
|
2291
|
+
*/
|
|
2242
2292
|
billingInfo?: AddressWithContact;
|
|
2243
2293
|
}
|
|
2244
2294
|
export interface SetBillingInfoResponse {
|
|
2245
|
-
/** Draft order
|
|
2295
|
+
/** Draft order calculated with the latest changes. */
|
|
2246
2296
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2247
2297
|
}
|
|
2248
2298
|
/** Deprecated */
|
|
@@ -2257,7 +2307,7 @@ export interface UpdateShippingInfoRequest {
|
|
|
2257
2307
|
}
|
|
2258
2308
|
/** Deprecated */
|
|
2259
2309
|
export interface UpdateShippingInfoResponse {
|
|
2260
|
-
/** Draft order
|
|
2310
|
+
/** Draft order calculated with the latest changes. */
|
|
2261
2311
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2262
2312
|
}
|
|
2263
2313
|
export interface GetDraftOrderRequest {
|
|
@@ -2268,26 +2318,30 @@ export interface GetDraftOrderRequest {
|
|
|
2268
2318
|
draftOrderId: string;
|
|
2269
2319
|
}
|
|
2270
2320
|
export interface GetDraftOrderResponse {
|
|
2271
|
-
/** Draft order
|
|
2321
|
+
/** Draft order calculated with the latest changes. */
|
|
2272
2322
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2273
2323
|
}
|
|
2274
2324
|
export interface GetOrderDraftabilityStatusRequest {
|
|
2275
2325
|
/**
|
|
2276
|
-
* Order
|
|
2326
|
+
* Order ID.
|
|
2277
2327
|
* @format GUID
|
|
2278
2328
|
*/
|
|
2279
2329
|
orderId: string;
|
|
2280
2330
|
}
|
|
2281
2331
|
export interface GetOrderDraftabilityStatusResponse {
|
|
2282
2332
|
/**
|
|
2283
|
-
* Order
|
|
2333
|
+
* Order ID.
|
|
2284
2334
|
* @format GUID
|
|
2285
2335
|
*/
|
|
2286
2336
|
orderId?: string;
|
|
2287
|
-
/**
|
|
2337
|
+
/**
|
|
2338
|
+
* Whether a draft can be created based on the order.
|
|
2339
|
+
*
|
|
2340
|
+
* Default: `false`
|
|
2341
|
+
*/
|
|
2288
2342
|
orderDraftable?: boolean;
|
|
2289
2343
|
/**
|
|
2290
|
-
* Reasons why
|
|
2344
|
+
* Reasons why a draft order cannot be created from the order.
|
|
2291
2345
|
* @maxSize 5
|
|
2292
2346
|
*/
|
|
2293
2347
|
nonDraftableReasons?: NonDraftableReason[];
|
|
@@ -2324,7 +2378,7 @@ export interface CommitDraftOrderRequest {
|
|
|
2324
2378
|
/** Optional side effects to trigger. */
|
|
2325
2379
|
commitSettings?: DraftOrderCommitSettings;
|
|
2326
2380
|
/**
|
|
2327
|
-
* Reason for edit,
|
|
2381
|
+
* Reason for edit, provided by user (optional).
|
|
2328
2382
|
* @maxLength 200
|
|
2329
2383
|
*/
|
|
2330
2384
|
reason?: string | null;
|
|
@@ -3395,7 +3449,7 @@ export interface CreateOrderFromDraftRequest {
|
|
|
3395
3449
|
/** Optional side effects to trigger. */
|
|
3396
3450
|
createSettings?: OrderCreateSettings;
|
|
3397
3451
|
/**
|
|
3398
|
-
* Reason for order creation,
|
|
3452
|
+
* Reason for order creation, provided by user (optional).
|
|
3399
3453
|
* @maxLength 200
|
|
3400
3454
|
*/
|
|
3401
3455
|
reason?: string | null;
|
|
@@ -3421,7 +3475,7 @@ export interface OrderCreateNotifications {
|
|
|
3421
3475
|
sendNotificationsToBusiness?: boolean | null;
|
|
3422
3476
|
}
|
|
3423
3477
|
export interface CreateOrderFromDraftResponse {
|
|
3424
|
-
/**
|
|
3478
|
+
/** Draft order after commit. */
|
|
3425
3479
|
committedDraftOrder?: DraftOrder;
|
|
3426
3480
|
/** Created order. */
|
|
3427
3481
|
createdOrder?: Order;
|
|
@@ -3547,14 +3601,14 @@ export interface SetTaxExemptionRequest {
|
|
|
3547
3601
|
*/
|
|
3548
3602
|
draftOrderId: string;
|
|
3549
3603
|
/**
|
|
3550
|
-
*
|
|
3604
|
+
* Whether the draft order is exempt from tax calculations.
|
|
3551
3605
|
*
|
|
3552
3606
|
* Default: `false`
|
|
3553
3607
|
*/
|
|
3554
3608
|
taxExempt: boolean | null;
|
|
3555
3609
|
}
|
|
3556
3610
|
export interface SetTaxExemptionResponse {
|
|
3557
|
-
/** Draft order
|
|
3611
|
+
/** Draft order calculated with the latest changes. */
|
|
3558
3612
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3559
3613
|
}
|
|
3560
3614
|
export interface SetBusinessLocationRequest {
|
|
@@ -3567,7 +3621,7 @@ export interface SetBusinessLocationRequest {
|
|
|
3567
3621
|
businessLocation?: Location;
|
|
3568
3622
|
}
|
|
3569
3623
|
export interface SetBusinessLocationResponse {
|
|
3570
|
-
/** Draft order
|
|
3624
|
+
/** Draft order calculated with the latest changes. */
|
|
3571
3625
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3572
3626
|
}
|
|
3573
3627
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -104,9 +104,13 @@ var DiscountReason;
|
|
|
104
104
|
})(DiscountReason || (exports.DiscountReason = DiscountReason = {}));
|
|
105
105
|
var EditingStatus;
|
|
106
106
|
(function (EditingStatus) {
|
|
107
|
-
/** Draft order
|
|
107
|
+
/** Draft order is being edited. */
|
|
108
108
|
EditingStatus["DRAFT"] = "DRAFT";
|
|
109
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* Draft order has been committed - No further modifications allowed.
|
|
111
|
+
*
|
|
112
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
113
|
+
*/
|
|
110
114
|
EditingStatus["COMMITTED"] = "COMMITTED";
|
|
111
115
|
})(EditingStatus || (exports.EditingStatus = EditingStatus = {}));
|
|
112
116
|
var WeightUnit;
|
|
@@ -121,9 +125,7 @@ var WeightUnit;
|
|
|
121
125
|
var PickupMethod;
|
|
122
126
|
(function (PickupMethod) {
|
|
123
127
|
PickupMethod["UNKNOWN_METHOD"] = "UNKNOWN_METHOD";
|
|
124
|
-
/** Pickup is from the merchant's brick and mortar store. */
|
|
125
128
|
PickupMethod["STORE_PICKUP"] = "STORE_PICKUP";
|
|
126
|
-
/** Item is shipped to a specified pickup point. */
|
|
127
129
|
PickupMethod["PICKUP_POINT"] = "PICKUP_POINT";
|
|
128
130
|
})(PickupMethod || (exports.PickupMethod = PickupMethod = {}));
|
|
129
131
|
var RuleType;
|
|
@@ -162,11 +164,11 @@ var FileType;
|
|
|
162
164
|
var DiscountType;
|
|
163
165
|
(function (DiscountType) {
|
|
164
166
|
DiscountType["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
165
|
-
/** Discount applies to entire order. */
|
|
167
|
+
/** Discount applies to the entire order. */
|
|
166
168
|
DiscountType["GLOBAL"] = "GLOBAL";
|
|
167
|
-
/** Discount applies to specific
|
|
169
|
+
/** Discount applies to a specific item. */
|
|
168
170
|
DiscountType["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
|
|
169
|
-
/** Discount applies to shipping
|
|
171
|
+
/** Discount applies to shipping fee. */
|
|
170
172
|
DiscountType["SHIPPING"] = "SHIPPING";
|
|
171
173
|
})(DiscountType || (exports.DiscountType = DiscountType = {}));
|
|
172
174
|
var NonDraftableReason;
|