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