@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,5 +1,5 @@
|
|
|
1
1
|
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
-
/**
|
|
2
|
+
/** Draft Orders main entity. */
|
|
3
3
|
export interface DraftOrder {
|
|
4
4
|
/**
|
|
5
5
|
* Draft order ID.
|
|
@@ -40,12 +40,14 @@ export interface DraftOrder {
|
|
|
40
40
|
billingInfo?: AddressWithContact;
|
|
41
41
|
/**
|
|
42
42
|
* Additional fees.
|
|
43
|
+
*
|
|
43
44
|
* Includes details about the source, and whether the additional fee is applied to the order.
|
|
44
45
|
* @maxSize 100
|
|
45
46
|
*/
|
|
46
47
|
additionalFees?: AdditionalFeeDetails[];
|
|
47
48
|
/**
|
|
48
49
|
* Discounts.
|
|
50
|
+
*
|
|
49
51
|
* Includes details about the source, and whether the discount is applied to the order.
|
|
50
52
|
* @maxSize 320
|
|
51
53
|
*/
|
|
@@ -123,11 +125,13 @@ export interface DraftOrder {
|
|
|
123
125
|
taxInfo?: OrderTaxInfo;
|
|
124
126
|
/**
|
|
125
127
|
* Custom field data for the draft order object.
|
|
128
|
+
*
|
|
126
129
|
* [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.
|
|
127
130
|
*/
|
|
128
131
|
extendedFields?: ExtendedFields;
|
|
129
132
|
/**
|
|
130
133
|
* Buyer information.
|
|
134
|
+
*
|
|
131
135
|
* Includes details about changes when relevant.
|
|
132
136
|
*/
|
|
133
137
|
buyerDetails?: BuyerDetails;
|
|
@@ -137,7 +141,8 @@ export interface DraftOrder {
|
|
|
137
141
|
*/
|
|
138
142
|
billingDetails?: BillingDetails;
|
|
139
143
|
/**
|
|
140
|
-
* Order business location
|
|
144
|
+
* Order business location.
|
|
145
|
+
*
|
|
141
146
|
* Includes details about changes when relevant.
|
|
142
147
|
*/
|
|
143
148
|
businessLocationDetails?: BusinessLocationDetails;
|
|
@@ -1182,10 +1187,10 @@ export interface AdditionalFee {
|
|
|
1182
1187
|
subscriptionCycles?: number | null;
|
|
1183
1188
|
}
|
|
1184
1189
|
export interface TaxDetails {
|
|
1185
|
-
/**
|
|
1190
|
+
/** Whether the additional fee is taxable. */
|
|
1186
1191
|
taxable?: boolean;
|
|
1187
1192
|
/**
|
|
1188
|
-
* Optional tax group ID to use when calculating tax for this additional fee
|
|
1193
|
+
* Optional tax group ID to use when calculating tax for this additional fee.
|
|
1189
1194
|
* @format GUID
|
|
1190
1195
|
*/
|
|
1191
1196
|
taxGroupId?: string | null;
|
|
@@ -1376,9 +1381,13 @@ export interface CreatedByStringOneOf {
|
|
|
1376
1381
|
appId?: string;
|
|
1377
1382
|
}
|
|
1378
1383
|
export declare enum EditingStatus {
|
|
1379
|
-
/** Draft order
|
|
1384
|
+
/** Draft order is being edited. */
|
|
1380
1385
|
DRAFT = "DRAFT",
|
|
1381
|
-
/**
|
|
1386
|
+
/**
|
|
1387
|
+
* Draft order has been committed - No further modifications allowed.
|
|
1388
|
+
*
|
|
1389
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
1390
|
+
*/
|
|
1382
1391
|
COMMITTED = "COMMITTED"
|
|
1383
1392
|
}
|
|
1384
1393
|
export declare enum WeightUnit {
|
|
@@ -1412,7 +1421,7 @@ export interface TaxSummary {
|
|
|
1412
1421
|
}
|
|
1413
1422
|
export interface BalanceSummary {
|
|
1414
1423
|
/**
|
|
1415
|
-
* Amount left to pay for order to be considered paid.
|
|
1424
|
+
* Amount left to pay for the order to be considered paid.
|
|
1416
1425
|
* @readonly
|
|
1417
1426
|
*/
|
|
1418
1427
|
balance?: Balance;
|
|
@@ -1652,31 +1661,33 @@ export interface BusinessLocationChangedDetails {
|
|
|
1652
1661
|
}
|
|
1653
1662
|
export interface CreateDraftOrderRequest {
|
|
1654
1663
|
/**
|
|
1655
|
-
*
|
|
1664
|
+
* ID of the order to create a draft for.
|
|
1656
1665
|
* @format GUID
|
|
1657
1666
|
*/
|
|
1658
1667
|
orderId: string | null;
|
|
1659
1668
|
}
|
|
1660
1669
|
export interface CreateDraftOrderResponse {
|
|
1661
|
-
/** Draft order
|
|
1670
|
+
/** Draft order calculated with the latest changes. */
|
|
1662
1671
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1663
1672
|
/**
|
|
1664
|
-
*
|
|
1665
|
-
*
|
|
1673
|
+
* Whether the response contains a draft order that existed before request.
|
|
1674
|
+
*
|
|
1675
|
+
* `true`: The draft order already exists and is updated.
|
|
1676
|
+
* `false`: A new draft order is created.
|
|
1666
1677
|
*/
|
|
1667
1678
|
preexistingDraftOrder?: boolean | null;
|
|
1668
1679
|
}
|
|
1669
1680
|
export interface CalculatedDraftOrder {
|
|
1670
|
-
/** Draft order
|
|
1681
|
+
/** Draft order. */
|
|
1671
1682
|
draftOrder?: DraftOrder;
|
|
1672
|
-
/**
|
|
1683
|
+
/** Shipping options. */
|
|
1673
1684
|
shippingOptions?: ShippingOption[];
|
|
1674
1685
|
/** Errors that occurred during calculation. */
|
|
1675
1686
|
calculationErrors?: CalculationErrors;
|
|
1676
1687
|
}
|
|
1677
1688
|
export interface ShippingOption {
|
|
1678
1689
|
/**
|
|
1679
|
-
*
|
|
1690
|
+
* Carrier ID.
|
|
1680
1691
|
* @format GUID
|
|
1681
1692
|
*/
|
|
1682
1693
|
carrierId?: string | null;
|
|
@@ -1692,37 +1703,39 @@ export interface ShippingOption {
|
|
|
1692
1703
|
export interface DeliveryLogistics {
|
|
1693
1704
|
/** When the item is expected to be delivered in free text, e.g "3-5 business days" */
|
|
1694
1705
|
deliveryTime?: string | null;
|
|
1695
|
-
/**
|
|
1706
|
+
/**
|
|
1707
|
+
* Instructions for delivery.
|
|
1708
|
+
*
|
|
1709
|
+
* For example, "Please arrive during business hours."
|
|
1710
|
+
*/
|
|
1696
1711
|
instructions?: string | null;
|
|
1697
|
-
/** Additional pickup details
|
|
1712
|
+
/** Additional pickup details. */
|
|
1698
1713
|
pickupDetails?: PickupDetails;
|
|
1699
|
-
/** Expected delivery time slot
|
|
1714
|
+
/** Expected delivery time slot. */
|
|
1700
1715
|
deliveryTimeSlot?: DeliveryTimeSlot;
|
|
1701
1716
|
}
|
|
1702
1717
|
export interface PickupDetails {
|
|
1703
|
-
/** Pickup address */
|
|
1718
|
+
/** Pickup address. */
|
|
1704
1719
|
address?: Address;
|
|
1705
1720
|
/** Pickup method. */
|
|
1706
1721
|
pickupMethod?: PickupMethod;
|
|
1707
1722
|
}
|
|
1708
1723
|
export declare enum PickupMethod {
|
|
1709
1724
|
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1710
|
-
/** Pickup is from the merchant's brick and mortar store. */
|
|
1711
1725
|
STORE_PICKUP = "STORE_PICKUP",
|
|
1712
|
-
/** Item is shipped to a specified pickup point. */
|
|
1713
1726
|
PICKUP_POINT = "PICKUP_POINT"
|
|
1714
1727
|
}
|
|
1715
1728
|
export interface DeliveryTimeSlot {
|
|
1716
|
-
/**
|
|
1729
|
+
/** Delivery time slot start time. */
|
|
1717
1730
|
from?: Date | null;
|
|
1718
|
-
/**
|
|
1731
|
+
/** Delivery time slot end time. */
|
|
1719
1732
|
to?: Date | null;
|
|
1720
1733
|
}
|
|
1721
1734
|
export interface ShippingPrice {
|
|
1722
|
-
/**
|
|
1735
|
+
/** Shipping price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */
|
|
1723
1736
|
price?: Price;
|
|
1724
1737
|
/**
|
|
1725
|
-
* Currency of the shipping
|
|
1738
|
+
* 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.
|
|
1726
1739
|
* @format CURRENCY
|
|
1727
1740
|
*/
|
|
1728
1741
|
currency?: string;
|
|
@@ -1851,7 +1864,7 @@ export interface CarrierError {
|
|
|
1851
1864
|
export interface CreateEmptyDraftOrderRequest {
|
|
1852
1865
|
}
|
|
1853
1866
|
export interface CreateEmptyDraftOrderResponse {
|
|
1854
|
-
/** Draft order
|
|
1867
|
+
/** Draft order calculated with the latest changes. */
|
|
1855
1868
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1856
1869
|
}
|
|
1857
1870
|
export interface AddLineItemsToDraftOrderRequest {
|
|
@@ -1866,7 +1879,9 @@ export interface AddLineItemsToDraftOrderRequest {
|
|
|
1866
1879
|
*/
|
|
1867
1880
|
catalogLineItems?: CatalogReferenceLineItem[];
|
|
1868
1881
|
/**
|
|
1869
|
-
* Custom line items to add to draft order.
|
|
1882
|
+
* Custom line items to add to draft order.
|
|
1883
|
+
*
|
|
1884
|
+
* Custom line items do not trigger the Catalog Service Plugin.
|
|
1870
1885
|
* @maxSize 300
|
|
1871
1886
|
*/
|
|
1872
1887
|
customLineItems?: CustomLineItem[];
|
|
@@ -1915,7 +1930,9 @@ export interface CustomLineItem {
|
|
|
1915
1930
|
*/
|
|
1916
1931
|
quantity?: number;
|
|
1917
1932
|
/**
|
|
1918
|
-
* Catalog and item reference.
|
|
1933
|
+
* Catalog and item reference.
|
|
1934
|
+
*
|
|
1935
|
+
* Includes IDs for the item and the catalog it came from, as well as further optional info.
|
|
1919
1936
|
* Optional for custom line items, which don't trigger the Catalog service plugin.
|
|
1920
1937
|
*/
|
|
1921
1938
|
catalogReference?: CatalogReference;
|
|
@@ -1984,7 +2001,7 @@ export declare enum FileType {
|
|
|
1984
2001
|
SECURE_ARCHIVE = "SECURE_ARCHIVE"
|
|
1985
2002
|
}
|
|
1986
2003
|
export interface AddLineItemsToDraftOrderResponse {
|
|
1987
|
-
/** Draft order
|
|
2004
|
+
/** Draft order calculated with the latest changes. */
|
|
1988
2005
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1989
2006
|
}
|
|
1990
2007
|
export interface UpdateLineItemsRequest {
|
|
@@ -2007,20 +2024,26 @@ export interface LineItemChangeDetails {
|
|
|
2007
2024
|
*/
|
|
2008
2025
|
lineItemId?: string;
|
|
2009
2026
|
/**
|
|
2010
|
-
* The
|
|
2027
|
+
* The line item's new quantity.
|
|
2028
|
+
*
|
|
2029
|
+
* > **Note:** Passing `0` will remove the line item.
|
|
2011
2030
|
* @max 1000000
|
|
2012
2031
|
*/
|
|
2013
2032
|
newQuantity?: number | null;
|
|
2014
2033
|
/**
|
|
2015
|
-
*
|
|
2034
|
+
* New price for 1 unit of the line item.
|
|
2016
2035
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
2017
2036
|
*/
|
|
2018
2037
|
newPrice?: string | null;
|
|
2019
|
-
/**
|
|
2038
|
+
/**
|
|
2039
|
+
* New description for the price.
|
|
2040
|
+
*
|
|
2041
|
+
* For example, when price is `0` but additional details about the actual price are needed - `"Starts at $67"`.
|
|
2042
|
+
*/
|
|
2020
2043
|
newPriceDescription?: PriceDescription;
|
|
2021
2044
|
}
|
|
2022
2045
|
export interface UpdateLineItemsResponse {
|
|
2023
|
-
/** Draft order
|
|
2046
|
+
/** Draft order calculated with the latest changes. */
|
|
2024
2047
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2025
2048
|
}
|
|
2026
2049
|
export interface SetDiscountsRequest {
|
|
@@ -2030,8 +2053,9 @@ export interface SetDiscountsRequest {
|
|
|
2030
2053
|
*/
|
|
2031
2054
|
draftOrderId: string;
|
|
2032
2055
|
/**
|
|
2033
|
-
*
|
|
2034
|
-
*
|
|
2056
|
+
* Discounts to set on the draft order.
|
|
2057
|
+
*
|
|
2058
|
+
* Any existing discounts that are not passed will not change.
|
|
2035
2059
|
* @minSize 1
|
|
2036
2060
|
* @maxSize 320
|
|
2037
2061
|
*/
|
|
@@ -2039,15 +2063,17 @@ export interface SetDiscountsRequest {
|
|
|
2039
2063
|
}
|
|
2040
2064
|
export interface IdAndApplied {
|
|
2041
2065
|
/**
|
|
2042
|
-
* Entity ID.
|
|
2066
|
+
* Entity ID.
|
|
2067
|
+
*
|
|
2068
|
+
* Depending on the context, the value is either a discount ID or an additional fee ID.
|
|
2043
2069
|
* @format GUID
|
|
2044
2070
|
*/
|
|
2045
2071
|
_id?: string;
|
|
2046
|
-
/**
|
|
2072
|
+
/** Whether the discount or additional fee should be applied to the draft order. */
|
|
2047
2073
|
applied?: boolean;
|
|
2048
2074
|
}
|
|
2049
2075
|
export interface SetDiscountsResponse {
|
|
2050
|
-
/** Draft order
|
|
2076
|
+
/** Draft order calculated with the latest changes. */
|
|
2051
2077
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2052
2078
|
}
|
|
2053
2079
|
export interface CreateCustomDiscountsRequest {
|
|
@@ -2057,17 +2083,19 @@ export interface CreateCustomDiscountsRequest {
|
|
|
2057
2083
|
*/
|
|
2058
2084
|
draftOrderId: string;
|
|
2059
2085
|
/**
|
|
2060
|
-
*
|
|
2086
|
+
* Custom discounts to create.
|
|
2087
|
+
*
|
|
2088
|
+
* Created discounts are not applied by default.
|
|
2061
2089
|
* @minSize 1
|
|
2062
2090
|
* @maxSize 100
|
|
2063
2091
|
*/
|
|
2064
2092
|
discounts?: DiscountOption[];
|
|
2065
2093
|
}
|
|
2066
2094
|
export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
2067
|
-
/**
|
|
2095
|
+
/** Amount to discount from the line item price. */
|
|
2068
2096
|
priceAmount?: Price;
|
|
2069
2097
|
/**
|
|
2070
|
-
*
|
|
2098
|
+
* Percentage to discount from the line item price.
|
|
2071
2099
|
* @format DECIMAL_VALUE
|
|
2072
2100
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2073
2101
|
*/
|
|
@@ -2095,8 +2123,9 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2095
2123
|
*/
|
|
2096
2124
|
description?: string | null;
|
|
2097
2125
|
/**
|
|
2098
|
-
*
|
|
2099
|
-
*
|
|
2126
|
+
* Whether to apply the discount to the draft order.
|
|
2127
|
+
*
|
|
2128
|
+
* Default: `false`
|
|
2100
2129
|
*/
|
|
2101
2130
|
applyToDraftOrder?: boolean | null;
|
|
2102
2131
|
/**
|
|
@@ -2107,10 +2136,10 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2107
2136
|
}
|
|
2108
2137
|
/** @oneof */
|
|
2109
2138
|
export interface DiscountOptionDiscountAmountOneOf {
|
|
2110
|
-
/**
|
|
2139
|
+
/** Amount to discount from the line item price. */
|
|
2111
2140
|
priceAmount?: Price;
|
|
2112
2141
|
/**
|
|
2113
|
-
*
|
|
2142
|
+
* Percentage to discount from the line item price.
|
|
2114
2143
|
* @format DECIMAL_VALUE
|
|
2115
2144
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2116
2145
|
*/
|
|
@@ -2118,15 +2147,15 @@ export interface DiscountOptionDiscountAmountOneOf {
|
|
|
2118
2147
|
}
|
|
2119
2148
|
export declare enum DiscountType {
|
|
2120
2149
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
2121
|
-
/** Discount applies to entire order. */
|
|
2150
|
+
/** Discount applies to the entire order. */
|
|
2122
2151
|
GLOBAL = "GLOBAL",
|
|
2123
|
-
/** Discount applies to specific
|
|
2152
|
+
/** Discount applies to a specific item. */
|
|
2124
2153
|
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
2125
|
-
/** Discount applies to shipping
|
|
2154
|
+
/** Discount applies to shipping fee. */
|
|
2126
2155
|
SHIPPING = "SHIPPING"
|
|
2127
2156
|
}
|
|
2128
2157
|
export interface CreateCustomDiscountsResponse {
|
|
2129
|
-
/** Draft order
|
|
2158
|
+
/** Draft order calculated with the latest changes. */
|
|
2130
2159
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2131
2160
|
}
|
|
2132
2161
|
export interface DeleteCustomDiscountsRequest {
|
|
@@ -2136,7 +2165,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2136
2165
|
*/
|
|
2137
2166
|
draftOrderId: string;
|
|
2138
2167
|
/**
|
|
2139
|
-
*
|
|
2168
|
+
* IDs of the discounts to remove from the draft order.
|
|
2140
2169
|
* @format GUID
|
|
2141
2170
|
* @minSize 1
|
|
2142
2171
|
* @maxSize 100
|
|
@@ -2144,7 +2173,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2144
2173
|
discountIds: string[];
|
|
2145
2174
|
}
|
|
2146
2175
|
export interface DeleteCustomDiscountsResponse {
|
|
2147
|
-
/** Draft order
|
|
2176
|
+
/** Draft order calculated with the latest changes. */
|
|
2148
2177
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2149
2178
|
}
|
|
2150
2179
|
export interface SetAdditionalFeesRequest {
|
|
@@ -2154,15 +2183,16 @@ export interface SetAdditionalFeesRequest {
|
|
|
2154
2183
|
*/
|
|
2155
2184
|
draftOrderId: string;
|
|
2156
2185
|
/**
|
|
2157
|
-
* Additional
|
|
2158
|
-
*
|
|
2186
|
+
* Additional fees to set on the draft order.
|
|
2187
|
+
*
|
|
2188
|
+
* Any existing additional fees that are not passed will not change.
|
|
2159
2189
|
* @minSize 1
|
|
2160
2190
|
* @maxSize 100
|
|
2161
2191
|
*/
|
|
2162
2192
|
additionalFees: IdAndApplied[];
|
|
2163
2193
|
}
|
|
2164
2194
|
export interface SetAdditionalFeesResponse {
|
|
2165
|
-
/** Draft order
|
|
2195
|
+
/** Draft order calculated with the latest changes. */
|
|
2166
2196
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2167
2197
|
}
|
|
2168
2198
|
export interface CreateCustomAdditionalFeesRequest {
|
|
@@ -2172,7 +2202,9 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2172
2202
|
*/
|
|
2173
2203
|
draftOrderId: string;
|
|
2174
2204
|
/**
|
|
2175
|
-
*
|
|
2205
|
+
* Custom additional fees to create.
|
|
2206
|
+
*
|
|
2207
|
+
* Created additional fees are not applied by default.
|
|
2176
2208
|
* @minSize 1
|
|
2177
2209
|
* @maxSize 100
|
|
2178
2210
|
*/
|
|
@@ -2180,28 +2212,30 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2180
2212
|
}
|
|
2181
2213
|
export interface AdditionalFeeOption {
|
|
2182
2214
|
/**
|
|
2183
|
-
*
|
|
2215
|
+
* Name of the additional fee.
|
|
2184
2216
|
* @minLength 1
|
|
2185
2217
|
* @maxLength 50
|
|
2186
2218
|
*/
|
|
2187
2219
|
name?: string;
|
|
2188
|
-
/**
|
|
2220
|
+
/** Price of the additional fee. */
|
|
2189
2221
|
price?: Price;
|
|
2190
|
-
/** Tax calculation details */
|
|
2222
|
+
/** Tax calculation details. */
|
|
2191
2223
|
taxDetails?: TaxDetails;
|
|
2192
2224
|
/**
|
|
2193
|
-
*
|
|
2194
|
-
*
|
|
2225
|
+
* Whether to apply the additional fee to the draft order.
|
|
2226
|
+
*
|
|
2227
|
+
* Default: `false`
|
|
2195
2228
|
*/
|
|
2196
2229
|
applyToDraftOrder?: boolean | null;
|
|
2197
2230
|
/**
|
|
2198
|
-
* Additional fee
|
|
2231
|
+
* Additional fee unique code (or ID) for future processing.
|
|
2199
2232
|
* @minLength 1
|
|
2200
2233
|
* @maxLength 100
|
|
2201
2234
|
*/
|
|
2202
2235
|
code?: string | null;
|
|
2203
2236
|
/**
|
|
2204
|
-
*
|
|
2237
|
+
* IDs of the line items associated with this additional fee.
|
|
2238
|
+
*
|
|
2205
2239
|
* If no `lineItemIds` are provided, the fee will be associated with the whole order.
|
|
2206
2240
|
* @format GUID
|
|
2207
2241
|
* @maxSize 300
|
|
@@ -2209,7 +2243,7 @@ export interface AdditionalFeeOption {
|
|
|
2209
2243
|
lineItemIds?: string[];
|
|
2210
2244
|
}
|
|
2211
2245
|
export interface CreateCustomAdditionalFeesResponse {
|
|
2212
|
-
/** Draft order
|
|
2246
|
+
/** Draft order calculated with the latest changes. */
|
|
2213
2247
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2214
2248
|
}
|
|
2215
2249
|
export interface DeleteCustomAdditionalFeesRequest {
|
|
@@ -2219,7 +2253,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2219
2253
|
*/
|
|
2220
2254
|
draftOrderId: string;
|
|
2221
2255
|
/**
|
|
2222
|
-
*
|
|
2256
|
+
* IDs of the additional fees to remove from the draft order.
|
|
2223
2257
|
* @format GUID
|
|
2224
2258
|
* @minSize 1
|
|
2225
2259
|
* @maxSize 100
|
|
@@ -2227,7 +2261,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2227
2261
|
customAdditionalFees: string[];
|
|
2228
2262
|
}
|
|
2229
2263
|
export interface DeleteCustomAdditionalFeesResponse {
|
|
2230
|
-
/** Draft order
|
|
2264
|
+
/** Draft order calculated with the latest changes. */
|
|
2231
2265
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2232
2266
|
}
|
|
2233
2267
|
export interface SetShippingInfoRequest {
|
|
@@ -2236,11 +2270,15 @@ export interface SetShippingInfoRequest {
|
|
|
2236
2270
|
* @format GUID
|
|
2237
2271
|
*/
|
|
2238
2272
|
draftOrderId: string;
|
|
2239
|
-
/**
|
|
2273
|
+
/**
|
|
2274
|
+
* Shipping info to set on the draft order.
|
|
2275
|
+
*
|
|
2276
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2277
|
+
*/
|
|
2240
2278
|
shippingInfo?: V1ShippingInformation;
|
|
2241
2279
|
}
|
|
2242
2280
|
export interface SetShippingInfoResponse {
|
|
2243
|
-
/** Draft order
|
|
2281
|
+
/** Draft order calculated with the latest changes. */
|
|
2244
2282
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2245
2283
|
}
|
|
2246
2284
|
export interface SetBuyerInfoRequest {
|
|
@@ -2249,11 +2287,15 @@ export interface SetBuyerInfoRequest {
|
|
|
2249
2287
|
* @format GUID
|
|
2250
2288
|
*/
|
|
2251
2289
|
draftOrderId: string;
|
|
2252
|
-
/**
|
|
2290
|
+
/**
|
|
2291
|
+
* Shipping info to set on the draft order.
|
|
2292
|
+
*
|
|
2293
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2294
|
+
*/
|
|
2253
2295
|
buyerInfo?: BuyerInfo;
|
|
2254
2296
|
}
|
|
2255
2297
|
export interface SetBuyerInfoResponse {
|
|
2256
|
-
/** Draft order
|
|
2298
|
+
/** Draft order calculated with the latest changes. */
|
|
2257
2299
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2258
2300
|
}
|
|
2259
2301
|
export interface SetRecipientInfoRequest {
|
|
@@ -2262,11 +2304,15 @@ export interface SetRecipientInfoRequest {
|
|
|
2262
2304
|
* @format GUID
|
|
2263
2305
|
*/
|
|
2264
2306
|
draftOrderId: string;
|
|
2265
|
-
/**
|
|
2307
|
+
/**
|
|
2308
|
+
* Recipient address and contact details.
|
|
2309
|
+
*
|
|
2310
|
+
* > **Note:** Passing an empty object will remove the existing recipient info.
|
|
2311
|
+
*/
|
|
2266
2312
|
recipientInfo?: AddressWithContact;
|
|
2267
2313
|
}
|
|
2268
2314
|
export interface SetRecipientInfoResponse {
|
|
2269
|
-
/** Draft order
|
|
2315
|
+
/** Draft order calculated with the latest changes. */
|
|
2270
2316
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2271
2317
|
}
|
|
2272
2318
|
export interface SetBillingInfoRequest {
|
|
@@ -2275,11 +2321,15 @@ export interface SetBillingInfoRequest {
|
|
|
2275
2321
|
* @format GUID
|
|
2276
2322
|
*/
|
|
2277
2323
|
draftOrderId: string;
|
|
2278
|
-
/**
|
|
2324
|
+
/**
|
|
2325
|
+
* Billing address and contact details.
|
|
2326
|
+
*
|
|
2327
|
+
* > **Note:** Passing an empty object will remove the existing billing info.
|
|
2328
|
+
*/
|
|
2279
2329
|
billingInfo?: AddressWithContact;
|
|
2280
2330
|
}
|
|
2281
2331
|
export interface SetBillingInfoResponse {
|
|
2282
|
-
/** Draft order
|
|
2332
|
+
/** Draft order calculated with the latest changes. */
|
|
2283
2333
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2284
2334
|
}
|
|
2285
2335
|
/** Deprecated */
|
|
@@ -2294,7 +2344,7 @@ export interface UpdateShippingInfoRequest {
|
|
|
2294
2344
|
}
|
|
2295
2345
|
/** Deprecated */
|
|
2296
2346
|
export interface UpdateShippingInfoResponse {
|
|
2297
|
-
/** Draft order
|
|
2347
|
+
/** Draft order calculated with the latest changes. */
|
|
2298
2348
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2299
2349
|
}
|
|
2300
2350
|
export interface GetDraftOrderRequest {
|
|
@@ -2305,26 +2355,30 @@ export interface GetDraftOrderRequest {
|
|
|
2305
2355
|
draftOrderId: string;
|
|
2306
2356
|
}
|
|
2307
2357
|
export interface GetDraftOrderResponse {
|
|
2308
|
-
/** Draft order
|
|
2358
|
+
/** Draft order calculated with the latest changes. */
|
|
2309
2359
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2310
2360
|
}
|
|
2311
2361
|
export interface GetOrderDraftabilityStatusRequest {
|
|
2312
2362
|
/**
|
|
2313
|
-
* Order
|
|
2363
|
+
* Order ID.
|
|
2314
2364
|
* @format GUID
|
|
2315
2365
|
*/
|
|
2316
2366
|
orderId: string;
|
|
2317
2367
|
}
|
|
2318
2368
|
export interface GetOrderDraftabilityStatusResponse {
|
|
2319
2369
|
/**
|
|
2320
|
-
* Order
|
|
2370
|
+
* Order ID.
|
|
2321
2371
|
* @format GUID
|
|
2322
2372
|
*/
|
|
2323
2373
|
orderId?: string;
|
|
2324
|
-
/**
|
|
2374
|
+
/**
|
|
2375
|
+
* Whether a draft can be created based on the order.
|
|
2376
|
+
*
|
|
2377
|
+
* Default: `false`
|
|
2378
|
+
*/
|
|
2325
2379
|
orderDraftable?: boolean;
|
|
2326
2380
|
/**
|
|
2327
|
-
* Reasons why
|
|
2381
|
+
* Reasons why a draft order cannot be created from the order.
|
|
2328
2382
|
* @maxSize 5
|
|
2329
2383
|
*/
|
|
2330
2384
|
nonDraftableReasons?: NonDraftableReason[];
|
|
@@ -2361,7 +2415,7 @@ export interface CommitDraftOrderRequest {
|
|
|
2361
2415
|
/** Optional side effects to trigger. */
|
|
2362
2416
|
commitSettings?: DraftOrderCommitSettings;
|
|
2363
2417
|
/**
|
|
2364
|
-
* Reason for edit,
|
|
2418
|
+
* Reason for edit, provided by user (optional).
|
|
2365
2419
|
* @maxLength 200
|
|
2366
2420
|
*/
|
|
2367
2421
|
reason?: string | null;
|
|
@@ -3552,7 +3606,7 @@ export interface CreateOrderFromDraftRequest {
|
|
|
3552
3606
|
/** Optional side effects to trigger. */
|
|
3553
3607
|
createSettings?: OrderCreateSettings;
|
|
3554
3608
|
/**
|
|
3555
|
-
* Reason for order creation,
|
|
3609
|
+
* Reason for order creation, provided by user (optional).
|
|
3556
3610
|
* @maxLength 200
|
|
3557
3611
|
*/
|
|
3558
3612
|
reason?: string | null;
|
|
@@ -3578,7 +3632,7 @@ export interface OrderCreateNotifications {
|
|
|
3578
3632
|
sendNotificationsToBusiness?: boolean | null;
|
|
3579
3633
|
}
|
|
3580
3634
|
export interface CreateOrderFromDraftResponse {
|
|
3581
|
-
/**
|
|
3635
|
+
/** Draft order after commit. */
|
|
3582
3636
|
committedDraftOrder?: DraftOrder;
|
|
3583
3637
|
/** Created order. */
|
|
3584
3638
|
createdOrder?: Order;
|
|
@@ -3704,14 +3758,14 @@ export interface SetTaxExemptionRequest {
|
|
|
3704
3758
|
*/
|
|
3705
3759
|
draftOrderId: string;
|
|
3706
3760
|
/**
|
|
3707
|
-
*
|
|
3761
|
+
* Whether the draft order is exempt from tax calculations.
|
|
3708
3762
|
*
|
|
3709
3763
|
* Default: `false`
|
|
3710
3764
|
*/
|
|
3711
3765
|
taxExempt: boolean | null;
|
|
3712
3766
|
}
|
|
3713
3767
|
export interface SetTaxExemptionResponse {
|
|
3714
|
-
/** Draft order
|
|
3768
|
+
/** Draft order calculated with the latest changes. */
|
|
3715
3769
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3716
3770
|
}
|
|
3717
3771
|
export interface SetBusinessLocationRequest {
|
|
@@ -3724,7 +3778,7 @@ export interface SetBusinessLocationRequest {
|
|
|
3724
3778
|
businessLocation?: Location;
|
|
3725
3779
|
}
|
|
3726
3780
|
export interface SetBusinessLocationResponse {
|
|
3727
|
-
/** Draft order
|
|
3781
|
+
/** Draft order calculated with the latest changes. */
|
|
3728
3782
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3729
3783
|
}
|
|
3730
3784
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -3873,7 +3927,7 @@ type DraftOrderNonNullablePaths = `lineItems` | `lineItems.${number}.added` | `l
|
|
|
3873
3927
|
*
|
|
3874
3928
|
* When passing the ID of an order that is already in draft, the existing draft order will be returned.
|
|
3875
3929
|
* To complete a draft and update the order, call Commit Draft Order([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/draft-orders/commit-draft-order) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/draft-orders/commit-draft-order)).
|
|
3876
|
-
* @param orderId -
|
|
3930
|
+
* @param orderId - ID of the order to create a draft for.
|
|
3877
3931
|
* @public
|
|
3878
3932
|
* @documentationMaturity preview
|
|
3879
3933
|
* @requiredField orderId
|
|
@@ -3912,7 +3966,7 @@ export declare function createEmptyDraftOrder(): Promise<NonNullablePaths<Create
|
|
|
3912
3966
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3913
3967
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
3914
3968
|
/**
|
|
3915
|
-
* Adds line items to a draft order.
|
|
3969
|
+
* Adds catalog or custom line items to a draft order.
|
|
3916
3970
|
* @param draftOrderId - Draft order ID.
|
|
3917
3971
|
* @public
|
|
3918
3972
|
* @documentationMaturity preview
|
|
@@ -3938,7 +3992,9 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3938
3992
|
*/
|
|
3939
3993
|
catalogLineItems?: CatalogReferenceLineItem[];
|
|
3940
3994
|
/**
|
|
3941
|
-
* Custom line items to add to draft order.
|
|
3995
|
+
* Custom line items to add to draft order.
|
|
3996
|
+
*
|
|
3997
|
+
* Custom line items do not trigger the Catalog Service Plugin.
|
|
3942
3998
|
* @maxSize 300
|
|
3943
3999
|
*/
|
|
3944
4000
|
customLineItems?: CustomLineItem[];
|
|
@@ -3950,7 +4006,7 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3950
4006
|
* > **Notes:**
|
|
3951
4007
|
* > + Passing a quantity of `0` will remove the line item.
|
|
3952
4008
|
* > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
|
|
3953
|
-
* > + Quantity cannot be decreased fulfilled line items. To
|
|
4009
|
+
* > + Quantity cannot be decreased fulfilled line items. To retrive fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-fulfillments/list-fulfillments-for-single-order).
|
|
3954
4010
|
* @param draftOrderId - Draft order ID.
|
|
3955
4011
|
* @param lineItemChanges - Details of changes to apply per line item.
|
|
3956
4012
|
* @public
|
|
@@ -3974,11 +4030,12 @@ export declare function updateLineItems(draftOrderId: string, lineItemChanges: N
|
|
|
3974
4030
|
/**
|
|
3975
4031
|
* Applies or unapplies discounts on a draft order.
|
|
3976
4032
|
*
|
|
3977
|
-
* Unapplied discounts are still part of draft order, but do not affect balance.
|
|
3978
|
-
* Existing discounts
|
|
4033
|
+
* Unapplied discounts are still part of the draft order, but do not affect balance.
|
|
4034
|
+
* Existing discounts that are not passed in the request will keep their current state.
|
|
3979
4035
|
* @param draftOrderId - Draft order ID.
|
|
3980
|
-
* @param discounts -
|
|
3981
|
-
*
|
|
4036
|
+
* @param discounts - Discounts to set on the draft order.
|
|
4037
|
+
*
|
|
4038
|
+
* Any existing discounts that are not passed will not change.
|
|
3982
4039
|
* @public
|
|
3983
4040
|
* @documentationMaturity preview
|
|
3984
4041
|
* @requiredField discounts
|
|
@@ -3999,9 +4056,9 @@ export declare function setDiscounts(draftOrderId: string, discounts: NonNullabl
|
|
|
3999
4056
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4000
4057
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4001
4058
|
/**
|
|
4002
|
-
*
|
|
4059
|
+
* Creates custom discounts.
|
|
4003
4060
|
*
|
|
4004
|
-
* Newly
|
|
4061
|
+
* Newly created discounts are unapplied by default.
|
|
4005
4062
|
* To apply them, use Set Discounts ([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/draft-orders/set-discounts) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/draft-orders/set-discounts)).
|
|
4006
4063
|
* @param draftOrderId - Draft order ID.
|
|
4007
4064
|
* @public
|
|
@@ -4025,16 +4082,18 @@ export declare function createCustomDiscounts(draftOrderId: string, options?: No
|
|
|
4025
4082
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4026
4083
|
export interface CreateCustomDiscountsOptions {
|
|
4027
4084
|
/**
|
|
4028
|
-
*
|
|
4085
|
+
* Custom discounts to create.
|
|
4086
|
+
*
|
|
4087
|
+
* Created discounts are not applied by default.
|
|
4029
4088
|
* @minSize 1
|
|
4030
4089
|
* @maxSize 100
|
|
4031
4090
|
*/
|
|
4032
4091
|
discounts?: DiscountOption[];
|
|
4033
4092
|
}
|
|
4034
4093
|
/**
|
|
4035
|
-
*
|
|
4094
|
+
* Removes custom discounts from a draft order.
|
|
4036
4095
|
* @param draftOrderId - Draft order ID.
|
|
4037
|
-
* @param discountIds -
|
|
4096
|
+
* @param discountIds - IDs of the discounts to remove from the draft order.
|
|
4038
4097
|
* @public
|
|
4039
4098
|
* @documentationMaturity preview
|
|
4040
4099
|
* @requiredField discountIds
|
|
@@ -4055,11 +4114,12 @@ export declare function deleteCustomDiscounts(draftOrderId: string, discountIds:
|
|
|
4055
4114
|
/**
|
|
4056
4115
|
* Applies or unapplies additional fees on a draft order.
|
|
4057
4116
|
*
|
|
4058
|
-
*
|
|
4059
|
-
* Existing additional fees
|
|
4117
|
+
* Additional fees that are not applied are still part of the draft order, but do not affect balance.
|
|
4118
|
+
* Existing additional fees that are not passed in the request will keep their current state.
|
|
4060
4119
|
* @param draftOrderId - Draft order ID.
|
|
4061
|
-
* @param additionalFees - Additional
|
|
4062
|
-
*
|
|
4120
|
+
* @param additionalFees - Additional fees to set on the draft order.
|
|
4121
|
+
*
|
|
4122
|
+
* Any existing additional fees that are not passed will not change.
|
|
4063
4123
|
* @public
|
|
4064
4124
|
* @documentationMaturity preview
|
|
4065
4125
|
* @requiredField additionalFees
|
|
@@ -4082,7 +4142,7 @@ export declare function setAdditionalFees(draftOrderId: string, additionalFees:
|
|
|
4082
4142
|
/**
|
|
4083
4143
|
* Creates custom additional fees on a draft order.
|
|
4084
4144
|
*
|
|
4085
|
-
* Newly
|
|
4145
|
+
* Newly created additional fees are not applied by default.
|
|
4086
4146
|
* To apply them, use Set Additional Fees ([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/draft-orders/set-additional-fees) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/draft-orders/set-additional-fees)).
|
|
4087
4147
|
* @param draftOrderId - Draft order ID.
|
|
4088
4148
|
* @public
|
|
@@ -4106,16 +4166,18 @@ export declare function createCustomAdditionalFees(draftOrderId: string, options
|
|
|
4106
4166
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4107
4167
|
export interface CreateCustomAdditionalFeesOptions {
|
|
4108
4168
|
/**
|
|
4109
|
-
*
|
|
4169
|
+
* Custom additional fees to create.
|
|
4170
|
+
*
|
|
4171
|
+
* Created additional fees are not applied by default.
|
|
4110
4172
|
* @minSize 1
|
|
4111
4173
|
* @maxSize 100
|
|
4112
4174
|
*/
|
|
4113
4175
|
customAdditionalFees?: AdditionalFeeOption[];
|
|
4114
4176
|
}
|
|
4115
4177
|
/**
|
|
4116
|
-
*
|
|
4178
|
+
* Removes custom additional fees from a draft order.
|
|
4117
4179
|
* @param draftOrderId - Draft order ID.
|
|
4118
|
-
* @param customAdditionalFees -
|
|
4180
|
+
* @param customAdditionalFees - IDs of the additional fees to remove from the draft order.
|
|
4119
4181
|
* @public
|
|
4120
4182
|
* @documentationMaturity preview
|
|
4121
4183
|
* @requiredField customAdditionalFees
|
|
@@ -4153,7 +4215,11 @@ export declare function setShippingInfo(draftOrderId: string, options?: SetShipp
|
|
|
4153
4215
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4154
4216
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4155
4217
|
export interface SetShippingInfoOptions {
|
|
4156
|
-
/**
|
|
4218
|
+
/**
|
|
4219
|
+
* Shipping info to set on the draft order.
|
|
4220
|
+
*
|
|
4221
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
4222
|
+
*/
|
|
4157
4223
|
shippingInfo?: V1ShippingInformation;
|
|
4158
4224
|
}
|
|
4159
4225
|
/**
|
|
@@ -4176,7 +4242,11 @@ export declare function setBuyerInfo(draftOrderId: string, options?: SetBuyerInf
|
|
|
4176
4242
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4177
4243
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4178
4244
|
export interface SetBuyerInfoOptions {
|
|
4179
|
-
/**
|
|
4245
|
+
/**
|
|
4246
|
+
* Shipping info to set on the draft order.
|
|
4247
|
+
*
|
|
4248
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
4249
|
+
*/
|
|
4180
4250
|
buyerInfo?: BuyerInfo;
|
|
4181
4251
|
}
|
|
4182
4252
|
/**
|
|
@@ -4199,7 +4269,11 @@ export declare function setRecipientInfo(draftOrderId: string, options?: SetReci
|
|
|
4199
4269
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4200
4270
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4201
4271
|
export interface SetRecipientInfoOptions {
|
|
4202
|
-
/**
|
|
4272
|
+
/**
|
|
4273
|
+
* Recipient address and contact details.
|
|
4274
|
+
*
|
|
4275
|
+
* > **Note:** Passing an empty object will remove the existing recipient info.
|
|
4276
|
+
*/
|
|
4203
4277
|
recipientInfo?: AddressWithContact;
|
|
4204
4278
|
}
|
|
4205
4279
|
/**
|
|
@@ -4222,16 +4296,22 @@ export declare function setBillingInfo(draftOrderId: string, options?: SetBillin
|
|
|
4222
4296
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4223
4297
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4224
4298
|
export interface SetBillingInfoOptions {
|
|
4225
|
-
/**
|
|
4299
|
+
/**
|
|
4300
|
+
* Billing address and contact details.
|
|
4301
|
+
*
|
|
4302
|
+
* > **Note:** Passing an empty object will remove the existing billing info.
|
|
4303
|
+
*/
|
|
4226
4304
|
billingInfo?: AddressWithContact;
|
|
4227
4305
|
}
|
|
4228
4306
|
/**
|
|
4229
|
-
*
|
|
4307
|
+
* Retrieves a draft order.
|
|
4308
|
+
*
|
|
4309
|
+
* The retrieved draft order contains the latest calculations:
|
|
4310
|
+
* + Line items, shipping details, and buyer information.
|
|
4311
|
+
* + Tax details and price totals.
|
|
4312
|
+
* + Automatic discounts and automatic additional fees, along with updated eligibility.
|
|
4230
4313
|
*
|
|
4231
|
-
*
|
|
4232
|
-
* Automatic discounts and automatic additional fees will reflect the latest prices and eligibility.
|
|
4233
|
-
* Calculation will be based on current draft order content - items, shipping info and eligible discounts and additional fees.
|
|
4234
|
-
* When retrieving an already committed draft, it's not recalculated and contains data calculated during commit.
|
|
4314
|
+
* > **Note:** When retrieving a committed draft order, it **is not recalculated**.
|
|
4235
4315
|
* @param draftOrderId - Draft order ID.
|
|
4236
4316
|
* @public
|
|
4237
4317
|
* @documentationMaturity preview
|
|
@@ -4251,8 +4331,8 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
4251
4331
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4252
4332
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4253
4333
|
/**
|
|
4254
|
-
* Checks whether a draft can be created for
|
|
4255
|
-
* @param orderId - Order
|
|
4334
|
+
* Checks whether a draft can be created for an order.
|
|
4335
|
+
* @param orderId - Order ID.
|
|
4256
4336
|
* @public
|
|
4257
4337
|
* @documentationMaturity preview
|
|
4258
4338
|
* @requiredField orderId
|
|
@@ -4268,10 +4348,13 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
4268
4348
|
*/
|
|
4269
4349
|
export declare function getOrderDraftabilityStatus(orderId: string): Promise<NonNullablePaths<GetOrderDraftabilityStatusResponse, `orderId` | `orderDraftable` | `nonDraftableReasons`>>;
|
|
4270
4350
|
/**
|
|
4271
|
-
*
|
|
4351
|
+
* Finalizes a draft order and applies its modifications to the associated order.
|
|
4352
|
+
* You can also control which side-effects are executed on commit.
|
|
4272
4353
|
*
|
|
4273
|
-
*
|
|
4274
|
-
*
|
|
4354
|
+
* > **Notes:**
|
|
4355
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
4356
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
4357
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
4275
4358
|
* @param draftOrderId - Draft order ID.
|
|
4276
4359
|
* @public
|
|
4277
4360
|
* @documentationMaturity preview
|
|
@@ -4294,16 +4377,18 @@ export interface CommitDraftOrderOptions {
|
|
|
4294
4377
|
/** Optional side effects to trigger. */
|
|
4295
4378
|
commitSettings?: DraftOrderCommitSettings;
|
|
4296
4379
|
/**
|
|
4297
|
-
* Reason for edit,
|
|
4380
|
+
* Reason for edit, provided by user (optional).
|
|
4298
4381
|
* @maxLength 200
|
|
4299
4382
|
*/
|
|
4300
4383
|
reason?: string | null;
|
|
4301
4384
|
}
|
|
4302
4385
|
/**
|
|
4303
|
-
* Creates a new order while specifying which side-effects are executed.
|
|
4386
|
+
* Creates a new order from a draft, while specifying which side-effects are executed.
|
|
4304
4387
|
*
|
|
4305
|
-
*
|
|
4306
|
-
*
|
|
4388
|
+
* > **Notes:**
|
|
4389
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
4390
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
4391
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
4307
4392
|
* @param draftOrderId - Draft order ID.
|
|
4308
4393
|
* @public
|
|
4309
4394
|
* @documentationMaturity preview
|
|
@@ -4326,7 +4411,7 @@ export interface CreateOrderFromDraftOptions {
|
|
|
4326
4411
|
/** Optional side effects to trigger. */
|
|
4327
4412
|
createSettings?: OrderCreateSettings;
|
|
4328
4413
|
/**
|
|
4329
|
-
* Reason for order creation,
|
|
4414
|
+
* Reason for order creation, provided by user (optional).
|
|
4330
4415
|
* @maxLength 200
|
|
4331
4416
|
*/
|
|
4332
4417
|
reason?: string | null;
|
|
@@ -4336,7 +4421,7 @@ export interface CreateOrderFromDraftOptions {
|
|
|
4336
4421
|
/**
|
|
4337
4422
|
* Deletes a draft order along with all its pending changes.
|
|
4338
4423
|
*
|
|
4339
|
-
* Draft orders
|
|
4424
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
4340
4425
|
* @param draftOrderId - Draft order ID.
|
|
4341
4426
|
* @public
|
|
4342
4427
|
* @documentationMaturity preview
|
|
@@ -4363,6 +4448,7 @@ export declare function deleteDraftOrder(draftOrderId: string): Promise<void>;
|
|
|
4363
4448
|
* | `_updatedDate` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `lt()`, `le()`, `gt()`, `ge()` | Sortable |
|
|
4364
4449
|
* | `status` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()` | Sortable |
|
|
4365
4450
|
* | `orderId` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `startsWith()` | |
|
|
4451
|
+
*
|
|
4366
4452
|
* To learn how to query draft orders, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
4367
4453
|
* @public
|
|
4368
4454
|
* @documentationMaturity preview
|
|
@@ -4491,7 +4577,9 @@ export interface UpdateExtendedFieldsOptions {
|
|
|
4491
4577
|
namespaceData: Record<string, any> | null;
|
|
4492
4578
|
}
|
|
4493
4579
|
/**
|
|
4494
|
-
* Sets
|
|
4580
|
+
* Sets whether a draft order is tax-exempt.
|
|
4581
|
+
*
|
|
4582
|
+
* A tax exempted draft order ignores taxes during calculation. Tax information will return empty.
|
|
4495
4583
|
* @param draftOrderId - Draft order ID.
|
|
4496
4584
|
* @public
|
|
4497
4585
|
* @documentationMaturity preview
|
|
@@ -4513,7 +4601,7 @@ export declare function setTaxExemption(draftOrderId: string, options: NonNullab
|
|
|
4513
4601
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4514
4602
|
export interface SetTaxExemptionOptions {
|
|
4515
4603
|
/**
|
|
4516
|
-
*
|
|
4604
|
+
* Whether the draft order is exempt from tax calculations.
|
|
4517
4605
|
*
|
|
4518
4606
|
* Default: `false`
|
|
4519
4607
|
*/
|
|
@@ -4521,6 +4609,8 @@ export interface SetTaxExemptionOptions {
|
|
|
4521
4609
|
}
|
|
4522
4610
|
/**
|
|
4523
4611
|
* Sets business location on a draft order.
|
|
4612
|
+
*
|
|
4613
|
+
* When committed, the order will become associated to a specific business location. This affects who can see and manage this order, and how it is calculated in reports.
|
|
4524
4614
|
* @param draftOrderId - Draft order ID.
|
|
4525
4615
|
* @public
|
|
4526
4616
|
* @documentationMaturity preview
|