@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;
|
|
@@ -1132,10 +1137,10 @@ export interface AdditionalFee {
|
|
|
1132
1137
|
lineItemIds?: string[];
|
|
1133
1138
|
}
|
|
1134
1139
|
export interface TaxDetails {
|
|
1135
|
-
/**
|
|
1140
|
+
/** Whether the additional fee is taxable. */
|
|
1136
1141
|
taxable?: boolean;
|
|
1137
1142
|
/**
|
|
1138
|
-
* Optional tax group ID to use when calculating tax for this additional fee
|
|
1143
|
+
* Optional tax group ID to use when calculating tax for this additional fee.
|
|
1139
1144
|
* @format GUID
|
|
1140
1145
|
*/
|
|
1141
1146
|
taxGroupId?: string | null;
|
|
@@ -1311,9 +1316,13 @@ export interface CreatedByStringOneOf {
|
|
|
1311
1316
|
appId?: string;
|
|
1312
1317
|
}
|
|
1313
1318
|
export declare enum EditingStatus {
|
|
1314
|
-
/** Draft order
|
|
1319
|
+
/** Draft order is being edited. */
|
|
1315
1320
|
DRAFT = "DRAFT",
|
|
1316
|
-
/**
|
|
1321
|
+
/**
|
|
1322
|
+
* Draft order has been committed - No further modifications allowed.
|
|
1323
|
+
*
|
|
1324
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
1325
|
+
*/
|
|
1317
1326
|
COMMITTED = "COMMITTED"
|
|
1318
1327
|
}
|
|
1319
1328
|
export declare enum WeightUnit {
|
|
@@ -1347,7 +1356,7 @@ export interface TaxSummary {
|
|
|
1347
1356
|
}
|
|
1348
1357
|
export interface BalanceSummary {
|
|
1349
1358
|
/**
|
|
1350
|
-
* Amount left to pay for order to be considered paid.
|
|
1359
|
+
* Amount left to pay for the order to be considered paid.
|
|
1351
1360
|
* @readonly
|
|
1352
1361
|
*/
|
|
1353
1362
|
balance?: Balance;
|
|
@@ -1587,31 +1596,33 @@ export interface BusinessLocationChangedDetails {
|
|
|
1587
1596
|
}
|
|
1588
1597
|
export interface CreateDraftOrderRequest {
|
|
1589
1598
|
/**
|
|
1590
|
-
*
|
|
1599
|
+
* ID of the order to create a draft for.
|
|
1591
1600
|
* @format GUID
|
|
1592
1601
|
*/
|
|
1593
1602
|
orderId: string | null;
|
|
1594
1603
|
}
|
|
1595
1604
|
export interface CreateDraftOrderResponse {
|
|
1596
|
-
/** Draft order
|
|
1605
|
+
/** Draft order calculated with the latest changes. */
|
|
1597
1606
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1598
1607
|
/**
|
|
1599
|
-
*
|
|
1600
|
-
*
|
|
1608
|
+
* Whether the response contains a draft order that existed before request.
|
|
1609
|
+
*
|
|
1610
|
+
* `true`: The draft order already exists and is updated.
|
|
1611
|
+
* `false`: A new draft order is created.
|
|
1601
1612
|
*/
|
|
1602
1613
|
preexistingDraftOrder?: boolean | null;
|
|
1603
1614
|
}
|
|
1604
1615
|
export interface CalculatedDraftOrder {
|
|
1605
|
-
/** Draft order
|
|
1616
|
+
/** Draft order. */
|
|
1606
1617
|
draftOrder?: DraftOrder;
|
|
1607
|
-
/**
|
|
1618
|
+
/** Shipping options. */
|
|
1608
1619
|
shippingOptions?: ShippingOption[];
|
|
1609
1620
|
/** Errors that occurred during calculation. */
|
|
1610
1621
|
calculationErrors?: CalculationErrors;
|
|
1611
1622
|
}
|
|
1612
1623
|
export interface ShippingOption {
|
|
1613
1624
|
/**
|
|
1614
|
-
*
|
|
1625
|
+
* Carrier ID.
|
|
1615
1626
|
* @format GUID
|
|
1616
1627
|
*/
|
|
1617
1628
|
carrierId?: string | null;
|
|
@@ -1627,37 +1638,39 @@ export interface ShippingOption {
|
|
|
1627
1638
|
export interface DeliveryLogistics {
|
|
1628
1639
|
/** When the item is expected to be delivered in free text, e.g "3-5 business days" */
|
|
1629
1640
|
deliveryTime?: string | null;
|
|
1630
|
-
/**
|
|
1641
|
+
/**
|
|
1642
|
+
* Instructions for delivery.
|
|
1643
|
+
*
|
|
1644
|
+
* For example, "Please arrive during business hours."
|
|
1645
|
+
*/
|
|
1631
1646
|
instructions?: string | null;
|
|
1632
|
-
/** Additional pickup details
|
|
1647
|
+
/** Additional pickup details. */
|
|
1633
1648
|
pickupDetails?: PickupDetails;
|
|
1634
|
-
/** Expected delivery time slot
|
|
1649
|
+
/** Expected delivery time slot. */
|
|
1635
1650
|
deliveryTimeSlot?: DeliveryTimeSlot;
|
|
1636
1651
|
}
|
|
1637
1652
|
export interface PickupDetails {
|
|
1638
|
-
/** Pickup address */
|
|
1653
|
+
/** Pickup address. */
|
|
1639
1654
|
address?: Address;
|
|
1640
1655
|
/** Pickup method. */
|
|
1641
1656
|
pickupMethod?: PickupMethod;
|
|
1642
1657
|
}
|
|
1643
1658
|
export declare enum PickupMethod {
|
|
1644
1659
|
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1645
|
-
/** Pickup is from the merchant's brick and mortar store. */
|
|
1646
1660
|
STORE_PICKUP = "STORE_PICKUP",
|
|
1647
|
-
/** Item is shipped to a specified pickup point. */
|
|
1648
1661
|
PICKUP_POINT = "PICKUP_POINT"
|
|
1649
1662
|
}
|
|
1650
1663
|
export interface DeliveryTimeSlot {
|
|
1651
|
-
/**
|
|
1664
|
+
/** Delivery time slot start time. */
|
|
1652
1665
|
from?: Date | null;
|
|
1653
|
-
/**
|
|
1666
|
+
/** Delivery time slot end time. */
|
|
1654
1667
|
to?: Date | null;
|
|
1655
1668
|
}
|
|
1656
1669
|
export interface ShippingPrice {
|
|
1657
|
-
/**
|
|
1670
|
+
/** Shipping price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */
|
|
1658
1671
|
price?: Price;
|
|
1659
1672
|
/**
|
|
1660
|
-
* Currency of the shipping
|
|
1673
|
+
* 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.
|
|
1661
1674
|
* @format CURRENCY
|
|
1662
1675
|
*/
|
|
1663
1676
|
currency?: string;
|
|
@@ -1786,7 +1799,7 @@ export interface CarrierError {
|
|
|
1786
1799
|
export interface CreateEmptyDraftOrderRequest {
|
|
1787
1800
|
}
|
|
1788
1801
|
export interface CreateEmptyDraftOrderResponse {
|
|
1789
|
-
/** Draft order
|
|
1802
|
+
/** Draft order calculated with the latest changes. */
|
|
1790
1803
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1791
1804
|
}
|
|
1792
1805
|
export interface AddLineItemsToDraftOrderRequest {
|
|
@@ -1801,7 +1814,9 @@ export interface AddLineItemsToDraftOrderRequest {
|
|
|
1801
1814
|
*/
|
|
1802
1815
|
catalogLineItems?: CatalogReferenceLineItem[];
|
|
1803
1816
|
/**
|
|
1804
|
-
* Custom line items to add to draft order.
|
|
1817
|
+
* Custom line items to add to draft order.
|
|
1818
|
+
*
|
|
1819
|
+
* Custom line items do not trigger the Catalog Service Plugin.
|
|
1805
1820
|
* @maxSize 300
|
|
1806
1821
|
*/
|
|
1807
1822
|
customLineItems?: CustomLineItem[];
|
|
@@ -1850,7 +1865,9 @@ export interface CustomLineItem {
|
|
|
1850
1865
|
*/
|
|
1851
1866
|
quantity?: number;
|
|
1852
1867
|
/**
|
|
1853
|
-
* Catalog and item reference.
|
|
1868
|
+
* Catalog and item reference.
|
|
1869
|
+
*
|
|
1870
|
+
* Includes IDs for the item and the catalog it came from, as well as further optional info.
|
|
1854
1871
|
* Optional for custom line items, which don't trigger the Catalog service plugin.
|
|
1855
1872
|
*/
|
|
1856
1873
|
catalogReference?: CatalogReference;
|
|
@@ -1919,7 +1936,7 @@ export declare enum FileType {
|
|
|
1919
1936
|
SECURE_ARCHIVE = "SECURE_ARCHIVE"
|
|
1920
1937
|
}
|
|
1921
1938
|
export interface AddLineItemsToDraftOrderResponse {
|
|
1922
|
-
/** Draft order
|
|
1939
|
+
/** Draft order calculated with the latest changes. */
|
|
1923
1940
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1924
1941
|
}
|
|
1925
1942
|
export interface UpdateLineItemsRequest {
|
|
@@ -1942,20 +1959,26 @@ export interface LineItemChangeDetails {
|
|
|
1942
1959
|
*/
|
|
1943
1960
|
lineItemId?: string;
|
|
1944
1961
|
/**
|
|
1945
|
-
* The
|
|
1962
|
+
* The line item's new quantity.
|
|
1963
|
+
*
|
|
1964
|
+
* > **Note:** Passing `0` will remove the line item.
|
|
1946
1965
|
* @max 1000000
|
|
1947
1966
|
*/
|
|
1948
1967
|
newQuantity?: number | null;
|
|
1949
1968
|
/**
|
|
1950
|
-
*
|
|
1969
|
+
* New price for 1 unit of the line item.
|
|
1951
1970
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
1952
1971
|
*/
|
|
1953
1972
|
newPrice?: string | null;
|
|
1954
|
-
/**
|
|
1973
|
+
/**
|
|
1974
|
+
* New description for the price.
|
|
1975
|
+
*
|
|
1976
|
+
* For example, when price is `0` but additional details about the actual price are needed - `"Starts at $67"`.
|
|
1977
|
+
*/
|
|
1955
1978
|
newPriceDescription?: PriceDescription;
|
|
1956
1979
|
}
|
|
1957
1980
|
export interface UpdateLineItemsResponse {
|
|
1958
|
-
/** Draft order
|
|
1981
|
+
/** Draft order calculated with the latest changes. */
|
|
1959
1982
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1960
1983
|
}
|
|
1961
1984
|
export interface SetDiscountsRequest {
|
|
@@ -1965,8 +1988,9 @@ export interface SetDiscountsRequest {
|
|
|
1965
1988
|
*/
|
|
1966
1989
|
draftOrderId: string;
|
|
1967
1990
|
/**
|
|
1968
|
-
*
|
|
1969
|
-
*
|
|
1991
|
+
* Discounts to set on the draft order.
|
|
1992
|
+
*
|
|
1993
|
+
* Any existing discounts that are not passed will not change.
|
|
1970
1994
|
* @minSize 1
|
|
1971
1995
|
* @maxSize 320
|
|
1972
1996
|
*/
|
|
@@ -1974,15 +1998,17 @@ export interface SetDiscountsRequest {
|
|
|
1974
1998
|
}
|
|
1975
1999
|
export interface IdAndApplied {
|
|
1976
2000
|
/**
|
|
1977
|
-
* Entity ID.
|
|
2001
|
+
* Entity ID.
|
|
2002
|
+
*
|
|
2003
|
+
* Depending on the context, the value is either a discount ID or an additional fee ID.
|
|
1978
2004
|
* @format GUID
|
|
1979
2005
|
*/
|
|
1980
2006
|
_id?: string;
|
|
1981
|
-
/**
|
|
2007
|
+
/** Whether the discount or additional fee should be applied to the draft order. */
|
|
1982
2008
|
applied?: boolean;
|
|
1983
2009
|
}
|
|
1984
2010
|
export interface SetDiscountsResponse {
|
|
1985
|
-
/** Draft order
|
|
2011
|
+
/** Draft order calculated with the latest changes. */
|
|
1986
2012
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1987
2013
|
}
|
|
1988
2014
|
export interface CreateCustomDiscountsRequest {
|
|
@@ -1992,17 +2018,19 @@ export interface CreateCustomDiscountsRequest {
|
|
|
1992
2018
|
*/
|
|
1993
2019
|
draftOrderId: string;
|
|
1994
2020
|
/**
|
|
1995
|
-
*
|
|
2021
|
+
* Custom discounts to create.
|
|
2022
|
+
*
|
|
2023
|
+
* Created discounts are not applied by default.
|
|
1996
2024
|
* @minSize 1
|
|
1997
2025
|
* @maxSize 100
|
|
1998
2026
|
*/
|
|
1999
2027
|
discounts?: DiscountOption[];
|
|
2000
2028
|
}
|
|
2001
2029
|
export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
2002
|
-
/**
|
|
2030
|
+
/** Amount to discount from the line item price. */
|
|
2003
2031
|
priceAmount?: Price;
|
|
2004
2032
|
/**
|
|
2005
|
-
*
|
|
2033
|
+
* Percentage to discount from the line item price.
|
|
2006
2034
|
* @format DECIMAL_VALUE
|
|
2007
2035
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2008
2036
|
*/
|
|
@@ -2030,8 +2058,9 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2030
2058
|
*/
|
|
2031
2059
|
description?: string | null;
|
|
2032
2060
|
/**
|
|
2033
|
-
*
|
|
2034
|
-
*
|
|
2061
|
+
* Whether to apply the discount to the draft order.
|
|
2062
|
+
*
|
|
2063
|
+
* Default: `false`
|
|
2035
2064
|
*/
|
|
2036
2065
|
applyToDraftOrder?: boolean | null;
|
|
2037
2066
|
/**
|
|
@@ -2042,10 +2071,10 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2042
2071
|
}
|
|
2043
2072
|
/** @oneof */
|
|
2044
2073
|
export interface DiscountOptionDiscountAmountOneOf {
|
|
2045
|
-
/**
|
|
2074
|
+
/** Amount to discount from the line item price. */
|
|
2046
2075
|
priceAmount?: Price;
|
|
2047
2076
|
/**
|
|
2048
|
-
*
|
|
2077
|
+
* Percentage to discount from the line item price.
|
|
2049
2078
|
* @format DECIMAL_VALUE
|
|
2050
2079
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2051
2080
|
*/
|
|
@@ -2053,15 +2082,15 @@ export interface DiscountOptionDiscountAmountOneOf {
|
|
|
2053
2082
|
}
|
|
2054
2083
|
export declare enum DiscountType {
|
|
2055
2084
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
2056
|
-
/** Discount applies to entire order. */
|
|
2085
|
+
/** Discount applies to the entire order. */
|
|
2057
2086
|
GLOBAL = "GLOBAL",
|
|
2058
|
-
/** Discount applies to specific
|
|
2087
|
+
/** Discount applies to a specific item. */
|
|
2059
2088
|
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
2060
|
-
/** Discount applies to shipping
|
|
2089
|
+
/** Discount applies to shipping fee. */
|
|
2061
2090
|
SHIPPING = "SHIPPING"
|
|
2062
2091
|
}
|
|
2063
2092
|
export interface CreateCustomDiscountsResponse {
|
|
2064
|
-
/** Draft order
|
|
2093
|
+
/** Draft order calculated with the latest changes. */
|
|
2065
2094
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2066
2095
|
}
|
|
2067
2096
|
export interface DeleteCustomDiscountsRequest {
|
|
@@ -2071,7 +2100,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2071
2100
|
*/
|
|
2072
2101
|
draftOrderId: string;
|
|
2073
2102
|
/**
|
|
2074
|
-
*
|
|
2103
|
+
* IDs of the discounts to remove from the draft order.
|
|
2075
2104
|
* @format GUID
|
|
2076
2105
|
* @minSize 1
|
|
2077
2106
|
* @maxSize 100
|
|
@@ -2079,7 +2108,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2079
2108
|
discountIds: string[];
|
|
2080
2109
|
}
|
|
2081
2110
|
export interface DeleteCustomDiscountsResponse {
|
|
2082
|
-
/** Draft order
|
|
2111
|
+
/** Draft order calculated with the latest changes. */
|
|
2083
2112
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2084
2113
|
}
|
|
2085
2114
|
export interface SetAdditionalFeesRequest {
|
|
@@ -2089,15 +2118,16 @@ export interface SetAdditionalFeesRequest {
|
|
|
2089
2118
|
*/
|
|
2090
2119
|
draftOrderId: string;
|
|
2091
2120
|
/**
|
|
2092
|
-
* Additional
|
|
2093
|
-
*
|
|
2121
|
+
* Additional fees to set on the draft order.
|
|
2122
|
+
*
|
|
2123
|
+
* Any existing additional fees that are not passed will not change.
|
|
2094
2124
|
* @minSize 1
|
|
2095
2125
|
* @maxSize 100
|
|
2096
2126
|
*/
|
|
2097
2127
|
additionalFees: IdAndApplied[];
|
|
2098
2128
|
}
|
|
2099
2129
|
export interface SetAdditionalFeesResponse {
|
|
2100
|
-
/** Draft order
|
|
2130
|
+
/** Draft order calculated with the latest changes. */
|
|
2101
2131
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2102
2132
|
}
|
|
2103
2133
|
export interface CreateCustomAdditionalFeesRequest {
|
|
@@ -2107,7 +2137,9 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2107
2137
|
*/
|
|
2108
2138
|
draftOrderId: string;
|
|
2109
2139
|
/**
|
|
2110
|
-
*
|
|
2140
|
+
* Custom additional fees to create.
|
|
2141
|
+
*
|
|
2142
|
+
* Created additional fees are not applied by default.
|
|
2111
2143
|
* @minSize 1
|
|
2112
2144
|
* @maxSize 100
|
|
2113
2145
|
*/
|
|
@@ -2115,28 +2147,30 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2115
2147
|
}
|
|
2116
2148
|
export interface AdditionalFeeOption {
|
|
2117
2149
|
/**
|
|
2118
|
-
*
|
|
2150
|
+
* Name of the additional fee.
|
|
2119
2151
|
* @minLength 1
|
|
2120
2152
|
* @maxLength 50
|
|
2121
2153
|
*/
|
|
2122
2154
|
name?: string;
|
|
2123
|
-
/**
|
|
2155
|
+
/** Price of the additional fee. */
|
|
2124
2156
|
price?: Price;
|
|
2125
|
-
/** Tax calculation details */
|
|
2157
|
+
/** Tax calculation details. */
|
|
2126
2158
|
taxDetails?: TaxDetails;
|
|
2127
2159
|
/**
|
|
2128
|
-
*
|
|
2129
|
-
*
|
|
2160
|
+
* Whether to apply the additional fee to the draft order.
|
|
2161
|
+
*
|
|
2162
|
+
* Default: `false`
|
|
2130
2163
|
*/
|
|
2131
2164
|
applyToDraftOrder?: boolean | null;
|
|
2132
2165
|
/**
|
|
2133
|
-
* Additional fee
|
|
2166
|
+
* Additional fee unique code (or ID) for future processing.
|
|
2134
2167
|
* @minLength 1
|
|
2135
2168
|
* @maxLength 100
|
|
2136
2169
|
*/
|
|
2137
2170
|
code?: string | null;
|
|
2138
2171
|
/**
|
|
2139
|
-
*
|
|
2172
|
+
* IDs of the line items associated with this additional fee.
|
|
2173
|
+
*
|
|
2140
2174
|
* If no `lineItemIds` are provided, the fee will be associated with the whole order.
|
|
2141
2175
|
* @format GUID
|
|
2142
2176
|
* @maxSize 300
|
|
@@ -2144,7 +2178,7 @@ export interface AdditionalFeeOption {
|
|
|
2144
2178
|
lineItemIds?: string[];
|
|
2145
2179
|
}
|
|
2146
2180
|
export interface CreateCustomAdditionalFeesResponse {
|
|
2147
|
-
/** Draft order
|
|
2181
|
+
/** Draft order calculated with the latest changes. */
|
|
2148
2182
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2149
2183
|
}
|
|
2150
2184
|
export interface DeleteCustomAdditionalFeesRequest {
|
|
@@ -2154,7 +2188,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2154
2188
|
*/
|
|
2155
2189
|
draftOrderId: string;
|
|
2156
2190
|
/**
|
|
2157
|
-
*
|
|
2191
|
+
* IDs of the additional fees to remove from the draft order.
|
|
2158
2192
|
* @format GUID
|
|
2159
2193
|
* @minSize 1
|
|
2160
2194
|
* @maxSize 100
|
|
@@ -2162,7 +2196,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2162
2196
|
customAdditionalFees: string[];
|
|
2163
2197
|
}
|
|
2164
2198
|
export interface DeleteCustomAdditionalFeesResponse {
|
|
2165
|
-
/** Draft order
|
|
2199
|
+
/** Draft order calculated with the latest changes. */
|
|
2166
2200
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2167
2201
|
}
|
|
2168
2202
|
export interface SetShippingInfoRequest {
|
|
@@ -2171,11 +2205,15 @@ export interface SetShippingInfoRequest {
|
|
|
2171
2205
|
* @format GUID
|
|
2172
2206
|
*/
|
|
2173
2207
|
draftOrderId: string;
|
|
2174
|
-
/**
|
|
2208
|
+
/**
|
|
2209
|
+
* Shipping info to set on the draft order.
|
|
2210
|
+
*
|
|
2211
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2212
|
+
*/
|
|
2175
2213
|
shippingInfo?: V1ShippingInformation;
|
|
2176
2214
|
}
|
|
2177
2215
|
export interface SetShippingInfoResponse {
|
|
2178
|
-
/** Draft order
|
|
2216
|
+
/** Draft order calculated with the latest changes. */
|
|
2179
2217
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2180
2218
|
}
|
|
2181
2219
|
export interface SetBuyerInfoRequest {
|
|
@@ -2184,11 +2222,15 @@ export interface SetBuyerInfoRequest {
|
|
|
2184
2222
|
* @format GUID
|
|
2185
2223
|
*/
|
|
2186
2224
|
draftOrderId: string;
|
|
2187
|
-
/**
|
|
2225
|
+
/**
|
|
2226
|
+
* Shipping info to set on the draft order.
|
|
2227
|
+
*
|
|
2228
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2229
|
+
*/
|
|
2188
2230
|
buyerInfo?: BuyerInfo;
|
|
2189
2231
|
}
|
|
2190
2232
|
export interface SetBuyerInfoResponse {
|
|
2191
|
-
/** Draft order
|
|
2233
|
+
/** Draft order calculated with the latest changes. */
|
|
2192
2234
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2193
2235
|
}
|
|
2194
2236
|
export interface SetRecipientInfoRequest {
|
|
@@ -2197,11 +2239,15 @@ export interface SetRecipientInfoRequest {
|
|
|
2197
2239
|
* @format GUID
|
|
2198
2240
|
*/
|
|
2199
2241
|
draftOrderId: string;
|
|
2200
|
-
/**
|
|
2242
|
+
/**
|
|
2243
|
+
* Recipient address and contact details.
|
|
2244
|
+
*
|
|
2245
|
+
* > **Note:** Passing an empty object will remove the existing recipient info.
|
|
2246
|
+
*/
|
|
2201
2247
|
recipientInfo?: AddressWithContact;
|
|
2202
2248
|
}
|
|
2203
2249
|
export interface SetRecipientInfoResponse {
|
|
2204
|
-
/** Draft order
|
|
2250
|
+
/** Draft order calculated with the latest changes. */
|
|
2205
2251
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2206
2252
|
}
|
|
2207
2253
|
export interface SetBillingInfoRequest {
|
|
@@ -2210,11 +2256,15 @@ export interface SetBillingInfoRequest {
|
|
|
2210
2256
|
* @format GUID
|
|
2211
2257
|
*/
|
|
2212
2258
|
draftOrderId: string;
|
|
2213
|
-
/**
|
|
2259
|
+
/**
|
|
2260
|
+
* Billing address and contact details.
|
|
2261
|
+
*
|
|
2262
|
+
* > **Note:** Passing an empty object will remove the existing billing info.
|
|
2263
|
+
*/
|
|
2214
2264
|
billingInfo?: AddressWithContact;
|
|
2215
2265
|
}
|
|
2216
2266
|
export interface SetBillingInfoResponse {
|
|
2217
|
-
/** Draft order
|
|
2267
|
+
/** Draft order calculated with the latest changes. */
|
|
2218
2268
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2219
2269
|
}
|
|
2220
2270
|
/** Deprecated */
|
|
@@ -2229,7 +2279,7 @@ export interface UpdateShippingInfoRequest {
|
|
|
2229
2279
|
}
|
|
2230
2280
|
/** Deprecated */
|
|
2231
2281
|
export interface UpdateShippingInfoResponse {
|
|
2232
|
-
/** Draft order
|
|
2282
|
+
/** Draft order calculated with the latest changes. */
|
|
2233
2283
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2234
2284
|
}
|
|
2235
2285
|
export interface GetDraftOrderRequest {
|
|
@@ -2240,26 +2290,30 @@ export interface GetDraftOrderRequest {
|
|
|
2240
2290
|
draftOrderId: string;
|
|
2241
2291
|
}
|
|
2242
2292
|
export interface GetDraftOrderResponse {
|
|
2243
|
-
/** Draft order
|
|
2293
|
+
/** Draft order calculated with the latest changes. */
|
|
2244
2294
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2245
2295
|
}
|
|
2246
2296
|
export interface GetOrderDraftabilityStatusRequest {
|
|
2247
2297
|
/**
|
|
2248
|
-
* Order
|
|
2298
|
+
* Order ID.
|
|
2249
2299
|
* @format GUID
|
|
2250
2300
|
*/
|
|
2251
2301
|
orderId: string;
|
|
2252
2302
|
}
|
|
2253
2303
|
export interface GetOrderDraftabilityStatusResponse {
|
|
2254
2304
|
/**
|
|
2255
|
-
* Order
|
|
2305
|
+
* Order ID.
|
|
2256
2306
|
* @format GUID
|
|
2257
2307
|
*/
|
|
2258
2308
|
orderId?: string;
|
|
2259
|
-
/**
|
|
2309
|
+
/**
|
|
2310
|
+
* Whether a draft can be created based on the order.
|
|
2311
|
+
*
|
|
2312
|
+
* Default: `false`
|
|
2313
|
+
*/
|
|
2260
2314
|
orderDraftable?: boolean;
|
|
2261
2315
|
/**
|
|
2262
|
-
* Reasons why
|
|
2316
|
+
* Reasons why a draft order cannot be created from the order.
|
|
2263
2317
|
* @maxSize 5
|
|
2264
2318
|
*/
|
|
2265
2319
|
nonDraftableReasons?: NonDraftableReason[];
|
|
@@ -2296,7 +2350,7 @@ export interface CommitDraftOrderRequest {
|
|
|
2296
2350
|
/** Optional side effects to trigger. */
|
|
2297
2351
|
commitSettings?: DraftOrderCommitSettings;
|
|
2298
2352
|
/**
|
|
2299
|
-
* Reason for edit,
|
|
2353
|
+
* Reason for edit, provided by user (optional).
|
|
2300
2354
|
* @maxLength 200
|
|
2301
2355
|
*/
|
|
2302
2356
|
reason?: string | null;
|
|
@@ -3367,7 +3421,7 @@ export interface CreateOrderFromDraftRequest {
|
|
|
3367
3421
|
/** Optional side effects to trigger. */
|
|
3368
3422
|
createSettings?: OrderCreateSettings;
|
|
3369
3423
|
/**
|
|
3370
|
-
* Reason for order creation,
|
|
3424
|
+
* Reason for order creation, provided by user (optional).
|
|
3371
3425
|
* @maxLength 200
|
|
3372
3426
|
*/
|
|
3373
3427
|
reason?: string | null;
|
|
@@ -3393,7 +3447,7 @@ export interface OrderCreateNotifications {
|
|
|
3393
3447
|
sendNotificationsToBusiness?: boolean | null;
|
|
3394
3448
|
}
|
|
3395
3449
|
export interface CreateOrderFromDraftResponse {
|
|
3396
|
-
/**
|
|
3450
|
+
/** Draft order after commit. */
|
|
3397
3451
|
committedDraftOrder?: DraftOrder;
|
|
3398
3452
|
/** Created order. */
|
|
3399
3453
|
createdOrder?: Order;
|
|
@@ -3519,14 +3573,14 @@ export interface SetTaxExemptionRequest {
|
|
|
3519
3573
|
*/
|
|
3520
3574
|
draftOrderId: string;
|
|
3521
3575
|
/**
|
|
3522
|
-
*
|
|
3576
|
+
* Whether the draft order is exempt from tax calculations.
|
|
3523
3577
|
*
|
|
3524
3578
|
* Default: `false`
|
|
3525
3579
|
*/
|
|
3526
3580
|
taxExempt: boolean | null;
|
|
3527
3581
|
}
|
|
3528
3582
|
export interface SetTaxExemptionResponse {
|
|
3529
|
-
/** Draft order
|
|
3583
|
+
/** Draft order calculated with the latest changes. */
|
|
3530
3584
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3531
3585
|
}
|
|
3532
3586
|
export interface SetBusinessLocationRequest {
|
|
@@ -3539,7 +3593,7 @@ export interface SetBusinessLocationRequest {
|
|
|
3539
3593
|
businessLocation?: Location;
|
|
3540
3594
|
}
|
|
3541
3595
|
export interface SetBusinessLocationResponse {
|
|
3542
|
-
/** Draft order
|
|
3596
|
+
/** Draft order calculated with the latest changes. */
|
|
3543
3597
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3544
3598
|
}
|
|
3545
3599
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -3688,7 +3742,7 @@ type DraftOrderNonNullablePaths = `lineItems` | `lineItems.${number}.added` | `l
|
|
|
3688
3742
|
*
|
|
3689
3743
|
* When passing the ID of an order that is already in draft, the existing draft order will be returned.
|
|
3690
3744
|
* 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)).
|
|
3691
|
-
* @param orderId -
|
|
3745
|
+
* @param orderId - ID of the order to create a draft for.
|
|
3692
3746
|
* @public
|
|
3693
3747
|
* @documentationMaturity preview
|
|
3694
3748
|
* @requiredField orderId
|
|
@@ -3727,7 +3781,7 @@ export declare function createEmptyDraftOrder(): Promise<NonNullablePaths<Create
|
|
|
3727
3781
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3728
3782
|
}[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`>>;
|
|
3729
3783
|
/**
|
|
3730
|
-
* Adds line items to a draft order.
|
|
3784
|
+
* Adds catalog or custom line items to a draft order.
|
|
3731
3785
|
* @param draftOrderId - Draft order ID.
|
|
3732
3786
|
* @public
|
|
3733
3787
|
* @documentationMaturity preview
|
|
@@ -3753,7 +3807,9 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3753
3807
|
*/
|
|
3754
3808
|
catalogLineItems?: CatalogReferenceLineItem[];
|
|
3755
3809
|
/**
|
|
3756
|
-
* Custom line items to add to draft order.
|
|
3810
|
+
* Custom line items to add to draft order.
|
|
3811
|
+
*
|
|
3812
|
+
* Custom line items do not trigger the Catalog Service Plugin.
|
|
3757
3813
|
* @maxSize 300
|
|
3758
3814
|
*/
|
|
3759
3815
|
customLineItems?: CustomLineItem[];
|
|
@@ -3765,7 +3821,7 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3765
3821
|
* > **Notes:**
|
|
3766
3822
|
* > + Passing a quantity of `0` will remove the line item.
|
|
3767
3823
|
* > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
|
|
3768
|
-
* > + Quantity cannot be decreased fulfilled line items. To
|
|
3824
|
+
* > + 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).
|
|
3769
3825
|
* @param draftOrderId - Draft order ID.
|
|
3770
3826
|
* @param lineItemChanges - Details of changes to apply per line item.
|
|
3771
3827
|
* @public
|
|
@@ -3789,11 +3845,12 @@ export declare function updateLineItems(draftOrderId: string, lineItemChanges: N
|
|
|
3789
3845
|
/**
|
|
3790
3846
|
* Applies or unapplies discounts on a draft order.
|
|
3791
3847
|
*
|
|
3792
|
-
* Unapplied discounts are still part of draft order, but do not affect balance.
|
|
3793
|
-
* Existing discounts
|
|
3848
|
+
* Unapplied discounts are still part of the draft order, but do not affect balance.
|
|
3849
|
+
* Existing discounts that are not passed in the request will keep their current state.
|
|
3794
3850
|
* @param draftOrderId - Draft order ID.
|
|
3795
|
-
* @param discounts -
|
|
3796
|
-
*
|
|
3851
|
+
* @param discounts - Discounts to set on the draft order.
|
|
3852
|
+
*
|
|
3853
|
+
* Any existing discounts that are not passed will not change.
|
|
3797
3854
|
* @public
|
|
3798
3855
|
* @documentationMaturity preview
|
|
3799
3856
|
* @requiredField discounts
|
|
@@ -3814,9 +3871,9 @@ export declare function setDiscounts(draftOrderId: string, discounts: NonNullabl
|
|
|
3814
3871
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3815
3872
|
}[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`>>;
|
|
3816
3873
|
/**
|
|
3817
|
-
*
|
|
3874
|
+
* Creates custom discounts.
|
|
3818
3875
|
*
|
|
3819
|
-
* Newly
|
|
3876
|
+
* Newly created discounts are unapplied by default.
|
|
3820
3877
|
* 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)).
|
|
3821
3878
|
* @param draftOrderId - Draft order ID.
|
|
3822
3879
|
* @public
|
|
@@ -3840,16 +3897,18 @@ export declare function createCustomDiscounts(draftOrderId: string, options?: No
|
|
|
3840
3897
|
}[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`>>;
|
|
3841
3898
|
export interface CreateCustomDiscountsOptions {
|
|
3842
3899
|
/**
|
|
3843
|
-
*
|
|
3900
|
+
* Custom discounts to create.
|
|
3901
|
+
*
|
|
3902
|
+
* Created discounts are not applied by default.
|
|
3844
3903
|
* @minSize 1
|
|
3845
3904
|
* @maxSize 100
|
|
3846
3905
|
*/
|
|
3847
3906
|
discounts?: DiscountOption[];
|
|
3848
3907
|
}
|
|
3849
3908
|
/**
|
|
3850
|
-
*
|
|
3909
|
+
* Removes custom discounts from a draft order.
|
|
3851
3910
|
* @param draftOrderId - Draft order ID.
|
|
3852
|
-
* @param discountIds -
|
|
3911
|
+
* @param discountIds - IDs of the discounts to remove from the draft order.
|
|
3853
3912
|
* @public
|
|
3854
3913
|
* @documentationMaturity preview
|
|
3855
3914
|
* @requiredField discountIds
|
|
@@ -3870,11 +3929,12 @@ export declare function deleteCustomDiscounts(draftOrderId: string, discountIds:
|
|
|
3870
3929
|
/**
|
|
3871
3930
|
* Applies or unapplies additional fees on a draft order.
|
|
3872
3931
|
*
|
|
3873
|
-
*
|
|
3874
|
-
* Existing additional fees
|
|
3932
|
+
* Additional fees that are not applied are still part of the draft order, but do not affect balance.
|
|
3933
|
+
* Existing additional fees that are not passed in the request will keep their current state.
|
|
3875
3934
|
* @param draftOrderId - Draft order ID.
|
|
3876
|
-
* @param additionalFees - Additional
|
|
3877
|
-
*
|
|
3935
|
+
* @param additionalFees - Additional fees to set on the draft order.
|
|
3936
|
+
*
|
|
3937
|
+
* Any existing additional fees that are not passed will not change.
|
|
3878
3938
|
* @public
|
|
3879
3939
|
* @documentationMaturity preview
|
|
3880
3940
|
* @requiredField additionalFees
|
|
@@ -3897,7 +3957,7 @@ export declare function setAdditionalFees(draftOrderId: string, additionalFees:
|
|
|
3897
3957
|
/**
|
|
3898
3958
|
* Creates custom additional fees on a draft order.
|
|
3899
3959
|
*
|
|
3900
|
-
* Newly
|
|
3960
|
+
* Newly created additional fees are not applied by default.
|
|
3901
3961
|
* 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)).
|
|
3902
3962
|
* @param draftOrderId - Draft order ID.
|
|
3903
3963
|
* @public
|
|
@@ -3921,16 +3981,18 @@ export declare function createCustomAdditionalFees(draftOrderId: string, options
|
|
|
3921
3981
|
}[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`>>;
|
|
3922
3982
|
export interface CreateCustomAdditionalFeesOptions {
|
|
3923
3983
|
/**
|
|
3924
|
-
*
|
|
3984
|
+
* Custom additional fees to create.
|
|
3985
|
+
*
|
|
3986
|
+
* Created additional fees are not applied by default.
|
|
3925
3987
|
* @minSize 1
|
|
3926
3988
|
* @maxSize 100
|
|
3927
3989
|
*/
|
|
3928
3990
|
customAdditionalFees?: AdditionalFeeOption[];
|
|
3929
3991
|
}
|
|
3930
3992
|
/**
|
|
3931
|
-
*
|
|
3993
|
+
* Removes custom additional fees from a draft order.
|
|
3932
3994
|
* @param draftOrderId - Draft order ID.
|
|
3933
|
-
* @param customAdditionalFees -
|
|
3995
|
+
* @param customAdditionalFees - IDs of the additional fees to remove from the draft order.
|
|
3934
3996
|
* @public
|
|
3935
3997
|
* @documentationMaturity preview
|
|
3936
3998
|
* @requiredField customAdditionalFees
|
|
@@ -3968,7 +4030,11 @@ export declare function setShippingInfo(draftOrderId: string, options?: SetShipp
|
|
|
3968
4030
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3969
4031
|
}[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`>>;
|
|
3970
4032
|
export interface SetShippingInfoOptions {
|
|
3971
|
-
/**
|
|
4033
|
+
/**
|
|
4034
|
+
* Shipping info to set on the draft order.
|
|
4035
|
+
*
|
|
4036
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
4037
|
+
*/
|
|
3972
4038
|
shippingInfo?: V1ShippingInformation;
|
|
3973
4039
|
}
|
|
3974
4040
|
/**
|
|
@@ -3991,7 +4057,11 @@ export declare function setBuyerInfo(draftOrderId: string, options?: SetBuyerInf
|
|
|
3991
4057
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3992
4058
|
}[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`>>;
|
|
3993
4059
|
export interface SetBuyerInfoOptions {
|
|
3994
|
-
/**
|
|
4060
|
+
/**
|
|
4061
|
+
* Shipping info to set on the draft order.
|
|
4062
|
+
*
|
|
4063
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
4064
|
+
*/
|
|
3995
4065
|
buyerInfo?: BuyerInfo;
|
|
3996
4066
|
}
|
|
3997
4067
|
/**
|
|
@@ -4014,7 +4084,11 @@ export declare function setRecipientInfo(draftOrderId: string, options?: SetReci
|
|
|
4014
4084
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4015
4085
|
}[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`>>;
|
|
4016
4086
|
export interface SetRecipientInfoOptions {
|
|
4017
|
-
/**
|
|
4087
|
+
/**
|
|
4088
|
+
* Recipient address and contact details.
|
|
4089
|
+
*
|
|
4090
|
+
* > **Note:** Passing an empty object will remove the existing recipient info.
|
|
4091
|
+
*/
|
|
4018
4092
|
recipientInfo?: AddressWithContact;
|
|
4019
4093
|
}
|
|
4020
4094
|
/**
|
|
@@ -4037,16 +4111,22 @@ export declare function setBillingInfo(draftOrderId: string, options?: SetBillin
|
|
|
4037
4111
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4038
4112
|
}[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`>>;
|
|
4039
4113
|
export interface SetBillingInfoOptions {
|
|
4040
|
-
/**
|
|
4114
|
+
/**
|
|
4115
|
+
* Billing address and contact details.
|
|
4116
|
+
*
|
|
4117
|
+
* > **Note:** Passing an empty object will remove the existing billing info.
|
|
4118
|
+
*/
|
|
4041
4119
|
billingInfo?: AddressWithContact;
|
|
4042
4120
|
}
|
|
4043
4121
|
/**
|
|
4044
|
-
*
|
|
4122
|
+
* Retrieves a draft order.
|
|
4123
|
+
*
|
|
4124
|
+
* The retrieved draft order contains the latest calculations:
|
|
4125
|
+
* + Line items, shipping details, and buyer information.
|
|
4126
|
+
* + Tax details and price totals.
|
|
4127
|
+
* + Automatic discounts and automatic additional fees, along with updated eligibility.
|
|
4045
4128
|
*
|
|
4046
|
-
*
|
|
4047
|
-
* Automatic discounts and automatic additional fees will reflect the latest prices and eligibility.
|
|
4048
|
-
* Calculation will be based on current draft order content - items, shipping info and eligible discounts and additional fees.
|
|
4049
|
-
* When retrieving an already committed draft, it's not recalculated and contains data calculated during commit.
|
|
4129
|
+
* > **Note:** When retrieving a committed draft order, it **is not recalculated**.
|
|
4050
4130
|
* @param draftOrderId - Draft order ID.
|
|
4051
4131
|
* @public
|
|
4052
4132
|
* @documentationMaturity preview
|
|
@@ -4066,8 +4146,8 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
4066
4146
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4067
4147
|
}[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`>>;
|
|
4068
4148
|
/**
|
|
4069
|
-
* Checks whether a draft can be created for
|
|
4070
|
-
* @param orderId - Order
|
|
4149
|
+
* Checks whether a draft can be created for an order.
|
|
4150
|
+
* @param orderId - Order ID.
|
|
4071
4151
|
* @public
|
|
4072
4152
|
* @documentationMaturity preview
|
|
4073
4153
|
* @requiredField orderId
|
|
@@ -4083,10 +4163,13 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
4083
4163
|
*/
|
|
4084
4164
|
export declare function getOrderDraftabilityStatus(orderId: string): Promise<NonNullablePaths<GetOrderDraftabilityStatusResponse, `orderId` | `orderDraftable` | `nonDraftableReasons`>>;
|
|
4085
4165
|
/**
|
|
4086
|
-
*
|
|
4166
|
+
* Finalizes a draft order and applies its modifications to the associated order.
|
|
4167
|
+
* You can also control which side-effects are executed on commit.
|
|
4087
4168
|
*
|
|
4088
|
-
*
|
|
4089
|
-
*
|
|
4169
|
+
* > **Notes:**
|
|
4170
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
4171
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
4172
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
4090
4173
|
* @param draftOrderId - Draft order ID.
|
|
4091
4174
|
* @public
|
|
4092
4175
|
* @documentationMaturity preview
|
|
@@ -4109,16 +4192,18 @@ export interface CommitDraftOrderOptions {
|
|
|
4109
4192
|
/** Optional side effects to trigger. */
|
|
4110
4193
|
commitSettings?: DraftOrderCommitSettings;
|
|
4111
4194
|
/**
|
|
4112
|
-
* Reason for edit,
|
|
4195
|
+
* Reason for edit, provided by user (optional).
|
|
4113
4196
|
* @maxLength 200
|
|
4114
4197
|
*/
|
|
4115
4198
|
reason?: string | null;
|
|
4116
4199
|
}
|
|
4117
4200
|
/**
|
|
4118
|
-
* Creates a new order while specifying which side-effects are executed.
|
|
4201
|
+
* Creates a new order from a draft, while specifying which side-effects are executed.
|
|
4119
4202
|
*
|
|
4120
|
-
*
|
|
4121
|
-
*
|
|
4203
|
+
* > **Notes:**
|
|
4204
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
4205
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
4206
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
4122
4207
|
* @param draftOrderId - Draft order ID.
|
|
4123
4208
|
* @public
|
|
4124
4209
|
* @documentationMaturity preview
|
|
@@ -4141,7 +4226,7 @@ export interface CreateOrderFromDraftOptions {
|
|
|
4141
4226
|
/** Optional side effects to trigger. */
|
|
4142
4227
|
createSettings?: OrderCreateSettings;
|
|
4143
4228
|
/**
|
|
4144
|
-
* Reason for order creation,
|
|
4229
|
+
* Reason for order creation, provided by user (optional).
|
|
4145
4230
|
* @maxLength 200
|
|
4146
4231
|
*/
|
|
4147
4232
|
reason?: string | null;
|
|
@@ -4151,7 +4236,7 @@ export interface CreateOrderFromDraftOptions {
|
|
|
4151
4236
|
/**
|
|
4152
4237
|
* Deletes a draft order along with all its pending changes.
|
|
4153
4238
|
*
|
|
4154
|
-
* Draft orders
|
|
4239
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
4155
4240
|
* @param draftOrderId - Draft order ID.
|
|
4156
4241
|
* @public
|
|
4157
4242
|
* @documentationMaturity preview
|
|
@@ -4178,6 +4263,7 @@ export declare function deleteDraftOrder(draftOrderId: string): Promise<void>;
|
|
|
4178
4263
|
* | `_updatedDate` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `lt()`, `le()`, `gt()`, `ge()` | Sortable |
|
|
4179
4264
|
* | `status` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()` | Sortable |
|
|
4180
4265
|
* | `orderId` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `startsWith()` | |
|
|
4266
|
+
*
|
|
4181
4267
|
* To learn how to query draft orders, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
4182
4268
|
* @public
|
|
4183
4269
|
* @documentationMaturity preview
|
|
@@ -4306,7 +4392,9 @@ export interface UpdateExtendedFieldsOptions {
|
|
|
4306
4392
|
namespaceData: Record<string, any> | null;
|
|
4307
4393
|
}
|
|
4308
4394
|
/**
|
|
4309
|
-
* Sets
|
|
4395
|
+
* Sets whether a draft order is tax-exempt.
|
|
4396
|
+
*
|
|
4397
|
+
* A tax exempted draft order ignores taxes during calculation. Tax information will return empty.
|
|
4310
4398
|
* @param draftOrderId - Draft order ID.
|
|
4311
4399
|
* @public
|
|
4312
4400
|
* @documentationMaturity preview
|
|
@@ -4328,7 +4416,7 @@ export declare function setTaxExemption(draftOrderId: string, options: NonNullab
|
|
|
4328
4416
|
}[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`>>;
|
|
4329
4417
|
export interface SetTaxExemptionOptions {
|
|
4330
4418
|
/**
|
|
4331
|
-
*
|
|
4419
|
+
* Whether the draft order is exempt from tax calculations.
|
|
4332
4420
|
*
|
|
4333
4421
|
* Default: `false`
|
|
4334
4422
|
*/
|
|
@@ -4336,6 +4424,8 @@ export interface SetTaxExemptionOptions {
|
|
|
4336
4424
|
}
|
|
4337
4425
|
/**
|
|
4338
4426
|
* Sets business location on a draft order.
|
|
4427
|
+
*
|
|
4428
|
+
* 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.
|
|
4339
4429
|
* @param draftOrderId - Draft order ID.
|
|
4340
4430
|
* @public
|
|
4341
4431
|
* @documentationMaturity preview
|