@wix/auto_sdk_ecom_cart-v-2 1.0.8 → 1.0.10

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 (37) hide show
  1. package/build/cjs/index.d.ts +123 -107
  2. package/build/cjs/index.js +41 -51
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1 -1
  5. package/build/cjs/index.typings.js +34 -44
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +106 -100
  8. package/build/cjs/meta.js +20 -20
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +123 -107
  11. package/build/es/index.mjs +39 -48
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +1 -1
  14. package/build/es/index.typings.mjs +32 -41
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +106 -100
  17. package/build/es/meta.mjs +18 -18
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +24 -28
  20. package/build/internal/cjs/index.js +41 -51
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +142 -130
  23. package/build/internal/cjs/index.typings.js +34 -44
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +106 -100
  26. package/build/internal/cjs/meta.js +20 -20
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +24 -28
  29. package/build/internal/es/index.mjs +39 -48
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +142 -130
  32. package/build/internal/es/index.typings.mjs +32 -41
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +106 -100
  35. package/build/internal/es/meta.mjs +18 -18
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { CreateCartRequest as CreateCartRequest$1, CreateCartResponse as CreateCartResponse$1, GetCartRequest as GetCartRequest$1, GetCartResponse as GetCartResponse$1, UpdateCartRequest as UpdateCartRequest$1, UpdateCartResponse as UpdateCartResponse$1, DeleteCartRequest as DeleteCartRequest$1, DeleteCartResponse as DeleteCartResponse$1, RefreshCartRequest as RefreshCartRequest$1, RefreshCartResponse as RefreshCartResponse$1, CalculateCartRequest as CalculateCartRequest$1, CalculateCartResponse as CalculateCartResponse$1, GetCheckoutURLRequest as GetCheckoutURLRequest$1, GetCheckoutURLResponse as GetCheckoutURLResponse$1, PlaceOrderRequest as PlaceOrderRequest$1, PlaceOrderResponse as PlaceOrderResponse$1, AddLineItemsRequest as AddLineItemsRequest$1, AddLineItemsResponse as AddLineItemsResponse$1, RemoveLineItemsRequest as RemoveLineItemsRequest$1, RemoveLineItemsResponse as RemoveLineItemsResponse$1, UpdateLineItemsRequest as UpdateLineItemsRequest$1, UpdateLineItemsResponse as UpdateLineItemsResponse$1, AddDiscountRequest as AddDiscountRequest$1, AddDiscountResponse as AddDiscountResponse$1, RemoveDiscountRequest as RemoveDiscountRequest$1, RemoveDiscountResponse as RemoveDiscountResponse$1, AddGiftCardRequest as AddGiftCardRequest$1, AddGiftCardResponse as AddGiftCardResponse$1, RemoveGiftCardRequest as RemoveGiftCardRequest$1, RemoveGiftCardResponse as RemoveGiftCardResponse$1, MarkCartAsCompletedRequest as MarkCartAsCompletedRequest$1, MarkCartAsCompletedResponse as MarkCartAsCompletedResponse$1, HandleAsyncCheckoutCompletionRequest as HandleAsyncCheckoutCompletionRequest$1, RawHttpResponse as RawHttpResponse$1 } from './index.js';
1
+ import { CreateCartRequest as CreateCartRequest$1, CreateCartResponse as CreateCartResponse$1, GetCartRequest as GetCartRequest$1, GetCartResponse as GetCartResponse$1, UpdateCartRequest as UpdateCartRequest$1, UpdateCartResponse as UpdateCartResponse$1, DeleteCartRequest as DeleteCartRequest$1, DeleteCartResponse as DeleteCartResponse$1, RefreshCartRequest as RefreshCartRequest$1, RefreshCartResponse as RefreshCartResponse$1, CalculateCartRequest as CalculateCartRequest$1, CalculateCartResponse as CalculateCartResponse$1, GetCheckoutURLRequest as GetCheckoutURLRequest$1, GetCheckoutURLResponse as GetCheckoutURLResponse$1, PlaceOrderRequest as PlaceOrderRequest$1, PlaceOrderResponse as PlaceOrderResponse$1, AddLineItemsRequest as AddLineItemsRequest$1, AddLineItemsResponse as AddLineItemsResponse$1, RemoveLineItemsRequest as RemoveLineItemsRequest$1, RemoveLineItemsResponse as RemoveLineItemsResponse$1, UpdateLineItemsRequest as UpdateLineItemsRequest$1, UpdateLineItemsResponse as UpdateLineItemsResponse$1, AddCouponRequest as AddCouponRequest$1, AddCouponResponse as AddCouponResponse$1, RemoveCouponRequest as RemoveCouponRequest$1, RemoveCouponResponse as RemoveCouponResponse$1, AddGiftCardRequest as AddGiftCardRequest$1, AddGiftCardResponse as AddGiftCardResponse$1, RemoveGiftCardRequest as RemoveGiftCardRequest$1, RemoveGiftCardResponse as RemoveGiftCardResponse$1, MarkCartAsCompletedRequest as MarkCartAsCompletedRequest$1, MarkCartAsCompletedResponse as MarkCartAsCompletedResponse$1, HandleAsyncCheckoutCompletionRequest as HandleAsyncCheckoutCompletionRequest$1, RawHttpResponse as RawHttpResponse$1 } from './index.js';
2
2
 
3
3
  interface Cart {
4
4
  /**
@@ -39,13 +39,11 @@ interface Cart {
39
39
  */
40
40
  note?: string | null;
41
41
  /**
42
- * The discounts of the Cart.
43
- * Automatic discounts are removed from the Cart entirely when they are no longer valid.
44
- * Coupon discounts are not removed from the Cart, but are marked as invalid.
45
- * @maxSize 100
46
- * @readonly
42
+ * List of coupons added to the Cart.
43
+ * Currently, only one coupon code is supported.
44
+ * @maxSize 1
47
45
  */
48
- discounts?: Discount[];
46
+ coupons?: Coupon[];
49
47
  /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
50
48
  source?: CartSource;
51
49
  /** Information about the site from which the Cart's line items were added. */
@@ -140,6 +138,11 @@ interface V2LineItem {
140
138
  * @maxSize 25
141
139
  */
142
140
  modifierGroups?: ModifierGroup[];
141
+ /**
142
+ * List of discounts applied to this line item.
143
+ * @maxSize 100
144
+ */
145
+ discounts?: ItemDiscount[];
143
146
  /**
144
147
  * Whether the line item is a custom line item.
145
148
  * Custom line items don't trigger the Catalog service plugin.
@@ -753,6 +756,11 @@ interface SelectedMembership {
753
756
  * @format GUID
754
757
  */
755
758
  appId?: string;
759
+ /**
760
+ * Name of the selected membership.
761
+ * @readonly
762
+ */
763
+ name?: TranslatableString;
756
764
  }
757
765
  declare enum ItemStatus {
758
766
  UNKNOWN_ITEM_STATUS = "UNKNOWN_ITEM_STATUS",
@@ -853,95 +861,29 @@ interface ItemModifier {
853
861
  /** The price of the modifier. */
854
862
  price?: MultiCurrencyPrice;
855
863
  }
856
- interface Discount {
857
- /**
858
- * A unique identifier of the discount within the Cart.
859
- * @format GUID
860
- */
861
- id?: string;
864
+ /**
865
+ * Currently, only automatic discounts are applied to line items.
866
+ * In the future, coupon discounts will be supported as well.
867
+ */
868
+ interface ItemDiscount {
862
869
  /** The display name of the discount. */
863
870
  name?: TranslatableString;
864
- /** The source of the discount, indicating how it was applied. */
865
- source?: DiscountSource;
866
- /** The component in the Cart that the discount applies to. */
867
- scope?: DiscountScopeWithLiterals;
868
- /**
869
- * List of benefits provided by the discount.
870
- * @minSize 1
871
- * @maxSize 100
872
- */
873
- benefits?: DiscountBenefit[];
874
- /**
875
- * The current status of the discount.
876
- * TODO: remodel.
877
- */
878
- status?: DiscountStatusWithLiterals;
879
- /**
880
- * Number of subscription cycles this discount applies to.
881
- * If unset, the discount applies to all billing cycles.
882
- * @min 1
883
- * @max 1000
884
- */
885
- subscriptionCycles?: number | null;
871
+ /** The amount discounted from the item's sale price (per unit). */
872
+ amountOff?: MultiCurrencyPrice;
886
873
  }
887
- interface DiscountSource {
888
- /** The type of the discount source. */
889
- sourceType?: DiscountSourceTypeWithLiterals;
874
+ interface Coupon {
890
875
  /**
891
- * Coupon code that triggered the discount.
892
- * Relevant for coupon discounts only.
893
- * @maxLength 50
876
+ * ID of the coupon in the Cart.
877
+ * @format GUID
894
878
  */
895
- couponCode?: string | null;
896
- }
897
- declare enum DiscountSourceType {
898
- UNKNOWN_DISCOUNT_SOURCE_TYPE = "UNKNOWN_DISCOUNT_SOURCE_TYPE",
899
- /** The discount was applied automatically by a rule. */
900
- AUTOMATIC_RULE = "AUTOMATIC_RULE",
901
- /** The discount was applied by a coupon code. */
902
- COUPON = "COUPON"
903
- }
904
- /** @enumType */
905
- type DiscountSourceTypeWithLiterals = DiscountSourceType | 'UNKNOWN_DISCOUNT_SOURCE_TYPE' | 'AUTOMATIC_RULE' | 'COUPON';
906
- declare enum DiscountScope {
907
- UNKNOWN_DISCOUNT_SCOPE = "UNKNOWN_DISCOUNT_SCOPE",
908
- /** The discount applies to the cart's subtotal. */
909
- CART_SUBTOTAL = "CART_SUBTOTAL",
910
- /** The discount applies to a specific line item. */
911
- LINE_ITEM = "LINE_ITEM",
912
- /** The discount applies to the delivery price. */
913
- DELIVERY = "DELIVERY"
914
- }
915
- /** @enumType */
916
- type DiscountScopeWithLiterals = DiscountScope | 'UNKNOWN_DISCOUNT_SCOPE' | 'CART_SUBTOTAL' | 'LINE_ITEM' | 'DELIVERY';
917
- interface DiscountBenefit extends DiscountBenefitValueOneOf {
918
- /** A specific monetary value deducted from the total cost. */
919
- amountOff?: MultiCurrencyPrice;
879
+ id?: string;
920
880
  /**
921
- * The ID of line item that the discount applies to.
922
- * Relevant for item-level discounts only.
923
- * @format GUID
881
+ * Coupon code.
882
+ * @minLength 1
883
+ * @maxLength 50
924
884
  */
925
- lineItemId?: string | null;
926
- }
927
- /** @oneof */
928
- interface DiscountBenefitValueOneOf {
929
- /** A specific monetary value deducted from the total cost. */
930
- amountOff?: MultiCurrencyPrice;
931
- }
932
- declare enum DiscountStatus {
933
- UNKNOWN_DISCOUNT_STATUS = "UNKNOWN_DISCOUNT_STATUS",
934
- /** The discount is active and valid. */
935
- ACTIVE = "ACTIVE",
936
- /** The discount has expired. */
937
- EXPIRED = "EXPIRED",
938
- /** The discount was deleted from the system. */
939
- DELETED = "DELETED",
940
- /** The discount reached the maximum number of uses. */
941
- MAX_USAGE_REACHED = "MAX_USAGE_REACHED"
885
+ code?: string;
942
886
  }
943
- /** @enumType */
944
- type DiscountStatusWithLiterals = DiscountStatus | 'UNKNOWN_DISCOUNT_STATUS' | 'ACTIVE' | 'EXPIRED' | 'DELETED' | 'MAX_USAGE_REACHED';
945
887
  interface CartSource {
946
888
  /**
947
889
  * Sales channel that created the Cart.
@@ -1420,6 +1362,72 @@ interface CartSettings {
1420
1362
  */
1421
1363
  manualPaymentDisabled?: boolean;
1422
1364
  }
1365
+ interface Discount {
1366
+ /** The display name of the discount. */
1367
+ name?: TranslatableString;
1368
+ /** The source of the discount, indicating how it was applied. */
1369
+ source?: DiscountSource;
1370
+ /** The component in the Cart that the discount applies to. */
1371
+ scope?: DiscountScopeWithLiterals;
1372
+ /**
1373
+ * List of benefits provided by the discount.
1374
+ * @minSize 1
1375
+ * @maxSize 100
1376
+ */
1377
+ benefits?: DiscountBenefit[];
1378
+ /**
1379
+ * Number of subscription cycles this discount applies to.
1380
+ * If unset, the discount applies to all billing cycles.
1381
+ * @min 1
1382
+ * @max 1000
1383
+ */
1384
+ subscriptionCycles?: number | null;
1385
+ }
1386
+ interface DiscountSource {
1387
+ /** The type of the discount source. */
1388
+ sourceType?: DiscountSourceTypeWithLiterals;
1389
+ /**
1390
+ * Coupon code that triggered the discount.
1391
+ * Relevant for coupon discounts only.
1392
+ * @maxLength 50
1393
+ */
1394
+ couponCode?: string | null;
1395
+ }
1396
+ declare enum DiscountSourceType {
1397
+ UNKNOWN_DISCOUNT_SOURCE_TYPE = "UNKNOWN_DISCOUNT_SOURCE_TYPE",
1398
+ /** The discount was applied automatically by a rule. */
1399
+ AUTOMATIC_RULE = "AUTOMATIC_RULE",
1400
+ /** The discount was applied by a coupon code. */
1401
+ COUPON = "COUPON"
1402
+ }
1403
+ /** @enumType */
1404
+ type DiscountSourceTypeWithLiterals = DiscountSourceType | 'UNKNOWN_DISCOUNT_SOURCE_TYPE' | 'AUTOMATIC_RULE' | 'COUPON';
1405
+ declare enum DiscountScope {
1406
+ UNKNOWN_DISCOUNT_SCOPE = "UNKNOWN_DISCOUNT_SCOPE",
1407
+ /** The discount applies to the cart's subtotal. */
1408
+ CART_SUBTOTAL = "CART_SUBTOTAL",
1409
+ /** The discount applies to a specific line item. */
1410
+ LINE_ITEM = "LINE_ITEM",
1411
+ /** The discount applies to the delivery price. */
1412
+ DELIVERY = "DELIVERY"
1413
+ }
1414
+ /** @enumType */
1415
+ type DiscountScopeWithLiterals = DiscountScope | 'UNKNOWN_DISCOUNT_SCOPE' | 'CART_SUBTOTAL' | 'LINE_ITEM' | 'DELIVERY';
1416
+ interface DiscountBenefit extends DiscountBenefitValueOneOf {
1417
+ /** A specific monetary value deducted from the total cost. */
1418
+ amountOff?: MultiCurrencyPrice;
1419
+ /**
1420
+ * The ID of line item that the discount applies to.
1421
+ * Relevant for item-level discounts only.
1422
+ * @format GUID
1423
+ */
1424
+ lineItemId?: string | null;
1425
+ }
1426
+ /** @oneof */
1427
+ interface DiscountBenefitValueOneOf {
1428
+ /** A specific monetary value deducted from the total cost. */
1429
+ amountOff?: MultiCurrencyPrice;
1430
+ }
1423
1431
  interface CartSummary {
1424
1432
  /**
1425
1433
  * The Cart ID.
@@ -1688,8 +1696,6 @@ interface Membership {
1688
1696
  * @maxLength 100
1689
1697
  */
1690
1698
  lineItemIds?: string[];
1691
- /** The name of this membership. */
1692
- name?: TranslatableString;
1693
1699
  }
1694
1700
  interface SubscriptionCharges {
1695
1701
  /**
@@ -2278,7 +2284,7 @@ interface UpdateLineItemsResponse {
2278
2284
  /** Updated Cart. */
2279
2285
  cart?: Cart;
2280
2286
  }
2281
- interface AddDiscountRequest {
2287
+ interface AddCouponRequest {
2282
2288
  /**
2283
2289
  * Cart ID.
2284
2290
  * @format GUID
@@ -2293,11 +2299,11 @@ interface AddDiscountRequest {
2293
2299
  */
2294
2300
  couponCode: string;
2295
2301
  }
2296
- interface AddDiscountResponse {
2302
+ interface AddCouponResponse {
2297
2303
  /** Updated Cart. */
2298
2304
  cart?: Cart;
2299
2305
  }
2300
- interface RemoveDiscountRequest {
2306
+ interface RemoveCouponRequest {
2301
2307
  /**
2302
2308
  * Cart ID.
2303
2309
  * @format GUID
@@ -2307,9 +2313,9 @@ interface RemoveDiscountRequest {
2307
2313
  * Discount ID.
2308
2314
  * @format GUID
2309
2315
  */
2310
- discountId: string;
2316
+ couponId: string;
2311
2317
  }
2312
- interface RemoveDiscountResponse {
2318
+ interface RemoveCouponResponse {
2313
2319
  /** Updated Cart. */
2314
2320
  cart?: Cart;
2315
2321
  }
@@ -2421,12 +2427,12 @@ declare function removeLineItems(): __PublicMethodMetaInfo<'POST', {
2421
2427
  declare function updateLineItems(): __PublicMethodMetaInfo<'POST', {
2422
2428
  cartId: string;
2423
2429
  }, UpdateLineItemsRequest$1, UpdateLineItemsRequest, UpdateLineItemsResponse$1, UpdateLineItemsResponse>;
2424
- declare function addDiscount(): __PublicMethodMetaInfo<'POST', {
2430
+ declare function addCoupon(): __PublicMethodMetaInfo<'POST', {
2425
2431
  cartId: string;
2426
- }, AddDiscountRequest$1, AddDiscountRequest, AddDiscountResponse$1, AddDiscountResponse>;
2427
- declare function removeDiscount(): __PublicMethodMetaInfo<'POST', {
2432
+ }, AddCouponRequest$1, AddCouponRequest, AddCouponResponse$1, AddCouponResponse>;
2433
+ declare function removeCoupon(): __PublicMethodMetaInfo<'POST', {
2428
2434
  cartId: string;
2429
- }, RemoveDiscountRequest$1, RemoveDiscountRequest, RemoveDiscountResponse$1, RemoveDiscountResponse>;
2435
+ }, RemoveCouponRequest$1, RemoveCouponRequest, RemoveCouponResponse$1, RemoveCouponResponse>;
2430
2436
  declare function addGiftCard(): __PublicMethodMetaInfo<'POST', {
2431
2437
  cartId: string;
2432
2438
  }, AddGiftCardRequest$1, AddGiftCardRequest, AddGiftCardResponse$1, AddGiftCardResponse>;
@@ -2438,4 +2444,4 @@ declare function markCartAsCompleted(): __PublicMethodMetaInfo<'POST', {
2438
2444
  }, MarkCartAsCompletedRequest$1, MarkCartAsCompletedRequest, MarkCartAsCompletedResponse$1, MarkCartAsCompletedResponse>;
2439
2445
  declare function handleAsyncCheckoutCompletion(): __PublicMethodMetaInfo<'POST', {}, HandleAsyncCheckoutCompletionRequest$1, HandleAsyncCheckoutCompletionRequest, RawHttpResponse$1, RawHttpResponse>;
2440
2446
 
2441
- export { type __PublicMethodMetaInfo, addDiscount, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeDiscount, removeGiftCard, removeLineItems, updateCart, updateLineItems };
2447
+ export { type __PublicMethodMetaInfo, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, updateCart, updateLineItems };
package/build/cjs/meta.js CHANGED
@@ -20,7 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // meta.ts
21
21
  var meta_exports = {};
22
22
  __export(meta_exports, {
23
- addDiscount: () => addDiscount2,
23
+ addCoupon: () => addCoupon2,
24
24
  addGiftCard: () => addGiftCard2,
25
25
  addLineItems: () => addLineItems2,
26
26
  calculateCart: () => calculateCart2,
@@ -32,7 +32,7 @@ __export(meta_exports, {
32
32
  markCartAsCompleted: () => markCartAsCompleted2,
33
33
  placeOrder: () => placeOrder2,
34
34
  refreshCart: () => refreshCart2,
35
- removeDiscount: () => removeDiscount2,
35
+ removeCoupon: () => removeCoupon2,
36
36
  removeGiftCard: () => removeGiftCard2,
37
37
  removeLineItems: () => removeLineItems2,
38
38
  updateCart: () => updateCart2,
@@ -697,15 +697,15 @@ function updateLineItems(payload) {
697
697
  }
698
698
  return __updateLineItems;
699
699
  }
700
- function addDiscount(payload) {
701
- function __addDiscount({ host }) {
700
+ function addCoupon(payload) {
701
+ function __addCoupon({ host }) {
702
702
  const metadata = {
703
703
  entityFqdn: "wix.ecom.v2.cart",
704
704
  method: "POST",
705
- methodFqn: "wix.ecom.cart.v2.CartService.AddDiscount",
705
+ methodFqn: "wix.ecom.cart.v2.CartService.AddCoupon",
706
706
  packageName: PACKAGE_NAME,
707
707
  url: resolveWixEcomCartV2CartServiceUrl({
708
- protoPath: "/v2/carts/{cartId}/add-discount",
708
+ protoPath: "/v2/carts/{cartId}/add-coupon",
709
709
  data: payload,
710
710
  host
711
711
  }),
@@ -745,17 +745,17 @@ function addDiscount(payload) {
745
745
  };
746
746
  return metadata;
747
747
  }
748
- return __addDiscount;
748
+ return __addCoupon;
749
749
  }
750
- function removeDiscount(payload) {
751
- function __removeDiscount({ host }) {
750
+ function removeCoupon(payload) {
751
+ function __removeCoupon({ host }) {
752
752
  const metadata = {
753
753
  entityFqdn: "wix.ecom.v2.cart",
754
754
  method: "POST",
755
- methodFqn: "wix.ecom.cart.v2.CartService.RemoveDiscount",
755
+ methodFqn: "wix.ecom.cart.v2.CartService.RemoveCoupon",
756
756
  packageName: PACKAGE_NAME,
757
757
  url: resolveWixEcomCartV2CartServiceUrl({
758
- protoPath: "/v2/carts/{cartId}/remove-discount",
758
+ protoPath: "/v2/carts/{cartId}/remove-coupon",
759
759
  data: payload,
760
760
  host
761
761
  }),
@@ -795,7 +795,7 @@ function removeDiscount(payload) {
795
795
  };
796
796
  return metadata;
797
797
  }
798
- return __removeDiscount;
798
+ return __removeCoupon;
799
799
  }
800
800
  function addGiftCard(payload) {
801
801
  function __addGiftCard({ host }) {
@@ -1171,9 +1171,9 @@ function updateLineItems2() {
1171
1171
  __originalResponseType: null
1172
1172
  };
1173
1173
  }
1174
- function addDiscount2() {
1174
+ function addCoupon2() {
1175
1175
  const payload = { cartId: ":cartId" };
1176
- const getRequestOptions = addDiscount(payload);
1176
+ const getRequestOptions = addCoupon(payload);
1177
1177
  const getUrl = (context) => {
1178
1178
  const { url } = getRequestOptions(context);
1179
1179
  return url;
@@ -1181,7 +1181,7 @@ function addDiscount2() {
1181
1181
  return {
1182
1182
  getUrl,
1183
1183
  httpMethod: "POST",
1184
- path: "/v2/carts/{cartId}/add-discount",
1184
+ path: "/v2/carts/{cartId}/add-coupon",
1185
1185
  pathParams: { cartId: "cartId" },
1186
1186
  __requestType: null,
1187
1187
  __originalRequestType: null,
@@ -1189,9 +1189,9 @@ function addDiscount2() {
1189
1189
  __originalResponseType: null
1190
1190
  };
1191
1191
  }
1192
- function removeDiscount2() {
1192
+ function removeCoupon2() {
1193
1193
  const payload = { cartId: ":cartId" };
1194
- const getRequestOptions = removeDiscount(payload);
1194
+ const getRequestOptions = removeCoupon(payload);
1195
1195
  const getUrl = (context) => {
1196
1196
  const { url } = getRequestOptions(context);
1197
1197
  return url;
@@ -1199,7 +1199,7 @@ function removeDiscount2() {
1199
1199
  return {
1200
1200
  getUrl,
1201
1201
  httpMethod: "POST",
1202
- path: "/v2/carts/{cartId}/remove-discount",
1202
+ path: "/v2/carts/{cartId}/remove-coupon",
1203
1203
  pathParams: { cartId: "cartId" },
1204
1204
  __requestType: null,
1205
1205
  __originalRequestType: null,
@@ -1281,7 +1281,7 @@ function handleAsyncCheckoutCompletion2() {
1281
1281
  }
1282
1282
  // Annotate the CommonJS export names for ESM import in node:
1283
1283
  0 && (module.exports = {
1284
- addDiscount,
1284
+ addCoupon,
1285
1285
  addGiftCard,
1286
1286
  addLineItems,
1287
1287
  calculateCart,
@@ -1293,7 +1293,7 @@ function handleAsyncCheckoutCompletion2() {
1293
1293
  markCartAsCompleted,
1294
1294
  placeOrder,
1295
1295
  refreshCart,
1296
- removeDiscount,
1296
+ removeCoupon,
1297
1297
  removeGiftCard,
1298
1298
  removeLineItems,
1299
1299
  updateCart,