@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.typings.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.typings.js';
2
2
  import '@wix/sdk-types';
3
3
 
4
4
  interface Cart {
@@ -40,13 +40,11 @@ interface Cart {
40
40
  */
41
41
  note?: string | null;
42
42
  /**
43
- * The discounts of the Cart.
44
- * Automatic discounts are removed from the Cart entirely when they are no longer valid.
45
- * Coupon discounts are not removed from the Cart, but are marked as invalid.
46
- * @maxSize 100
47
- * @readonly
43
+ * List of coupons added to the Cart.
44
+ * Currently, only one coupon code is supported.
45
+ * @maxSize 1
48
46
  */
49
- discounts?: Discount[];
47
+ coupons?: Coupon[];
50
48
  /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
51
49
  source?: CartSource;
52
50
  /** Information about the site from which the Cart's line items were added. */
@@ -141,6 +139,11 @@ interface V2LineItem {
141
139
  * @maxSize 25
142
140
  */
143
141
  modifierGroups?: ModifierGroup[];
142
+ /**
143
+ * List of discounts applied to this line item.
144
+ * @maxSize 100
145
+ */
146
+ discounts?: ItemDiscount[];
144
147
  /**
145
148
  * Whether the line item is a custom line item.
146
149
  * Custom line items don't trigger the Catalog service plugin.
@@ -754,6 +757,11 @@ interface SelectedMembership {
754
757
  * @format GUID
755
758
  */
756
759
  appId?: string;
760
+ /**
761
+ * Name of the selected membership.
762
+ * @readonly
763
+ */
764
+ name?: TranslatableString;
757
765
  }
758
766
  declare enum ItemStatus {
759
767
  UNKNOWN_ITEM_STATUS = "UNKNOWN_ITEM_STATUS",
@@ -854,95 +862,29 @@ interface ItemModifier {
854
862
  /** The price of the modifier. */
855
863
  price?: MultiCurrencyPrice;
856
864
  }
857
- interface Discount {
858
- /**
859
- * A unique identifier of the discount within the Cart.
860
- * @format GUID
861
- */
862
- id?: string;
865
+ /**
866
+ * Currently, only automatic discounts are applied to line items.
867
+ * In the future, coupon discounts will be supported as well.
868
+ */
869
+ interface ItemDiscount {
863
870
  /** The display name of the discount. */
864
871
  name?: TranslatableString;
865
- /** The source of the discount, indicating how it was applied. */
866
- source?: DiscountSource;
867
- /** The component in the Cart that the discount applies to. */
868
- scope?: DiscountScopeWithLiterals;
869
- /**
870
- * List of benefits provided by the discount.
871
- * @minSize 1
872
- * @maxSize 100
873
- */
874
- benefits?: DiscountBenefit[];
875
- /**
876
- * The current status of the discount.
877
- * TODO: remodel.
878
- */
879
- status?: DiscountStatusWithLiterals;
880
- /**
881
- * Number of subscription cycles this discount applies to.
882
- * If unset, the discount applies to all billing cycles.
883
- * @min 1
884
- * @max 1000
885
- */
886
- subscriptionCycles?: number | null;
872
+ /** The amount discounted from the item's sale price (per unit). */
873
+ amountOff?: MultiCurrencyPrice;
887
874
  }
888
- interface DiscountSource {
889
- /** The type of the discount source. */
890
- sourceType?: DiscountSourceTypeWithLiterals;
875
+ interface Coupon {
891
876
  /**
892
- * Coupon code that triggered the discount.
893
- * Relevant for coupon discounts only.
894
- * @maxLength 50
877
+ * ID of the coupon in the Cart.
878
+ * @format GUID
895
879
  */
896
- couponCode?: string | null;
897
- }
898
- declare enum DiscountSourceType {
899
- UNKNOWN_DISCOUNT_SOURCE_TYPE = "UNKNOWN_DISCOUNT_SOURCE_TYPE",
900
- /** The discount was applied automatically by a rule. */
901
- AUTOMATIC_RULE = "AUTOMATIC_RULE",
902
- /** The discount was applied by a coupon code. */
903
- COUPON = "COUPON"
904
- }
905
- /** @enumType */
906
- type DiscountSourceTypeWithLiterals = DiscountSourceType | 'UNKNOWN_DISCOUNT_SOURCE_TYPE' | 'AUTOMATIC_RULE' | 'COUPON';
907
- declare enum DiscountScope {
908
- UNKNOWN_DISCOUNT_SCOPE = "UNKNOWN_DISCOUNT_SCOPE",
909
- /** The discount applies to the cart's subtotal. */
910
- CART_SUBTOTAL = "CART_SUBTOTAL",
911
- /** The discount applies to a specific line item. */
912
- LINE_ITEM = "LINE_ITEM",
913
- /** The discount applies to the delivery price. */
914
- DELIVERY = "DELIVERY"
915
- }
916
- /** @enumType */
917
- type DiscountScopeWithLiterals = DiscountScope | 'UNKNOWN_DISCOUNT_SCOPE' | 'CART_SUBTOTAL' | 'LINE_ITEM' | 'DELIVERY';
918
- interface DiscountBenefit extends DiscountBenefitValueOneOf {
919
- /** A specific monetary value deducted from the total cost. */
920
- amountOff?: MultiCurrencyPrice;
880
+ id?: string;
921
881
  /**
922
- * The ID of line item that the discount applies to.
923
- * Relevant for item-level discounts only.
924
- * @format GUID
882
+ * Coupon code.
883
+ * @minLength 1
884
+ * @maxLength 50
925
885
  */
926
- lineItemId?: string | null;
927
- }
928
- /** @oneof */
929
- interface DiscountBenefitValueOneOf {
930
- /** A specific monetary value deducted from the total cost. */
931
- amountOff?: MultiCurrencyPrice;
932
- }
933
- declare enum DiscountStatus {
934
- UNKNOWN_DISCOUNT_STATUS = "UNKNOWN_DISCOUNT_STATUS",
935
- /** The discount is active and valid. */
936
- ACTIVE = "ACTIVE",
937
- /** The discount has expired. */
938
- EXPIRED = "EXPIRED",
939
- /** The discount was deleted from the system. */
940
- DELETED = "DELETED",
941
- /** The discount reached the maximum number of uses. */
942
- MAX_USAGE_REACHED = "MAX_USAGE_REACHED"
886
+ code?: string;
943
887
  }
944
- /** @enumType */
945
- type DiscountStatusWithLiterals = DiscountStatus | 'UNKNOWN_DISCOUNT_STATUS' | 'ACTIVE' | 'EXPIRED' | 'DELETED' | 'MAX_USAGE_REACHED';
946
888
  interface CartSource {
947
889
  /**
948
890
  * Sales channel that created the Cart.
@@ -1421,6 +1363,72 @@ interface CartSettings {
1421
1363
  */
1422
1364
  manualPaymentDisabled?: boolean;
1423
1365
  }
1366
+ interface Discount {
1367
+ /** The display name of the discount. */
1368
+ name?: TranslatableString;
1369
+ /** The source of the discount, indicating how it was applied. */
1370
+ source?: DiscountSource;
1371
+ /** The component in the Cart that the discount applies to. */
1372
+ scope?: DiscountScopeWithLiterals;
1373
+ /**
1374
+ * List of benefits provided by the discount.
1375
+ * @minSize 1
1376
+ * @maxSize 100
1377
+ */
1378
+ benefits?: DiscountBenefit[];
1379
+ /**
1380
+ * Number of subscription cycles this discount applies to.
1381
+ * If unset, the discount applies to all billing cycles.
1382
+ * @min 1
1383
+ * @max 1000
1384
+ */
1385
+ subscriptionCycles?: number | null;
1386
+ }
1387
+ interface DiscountSource {
1388
+ /** The type of the discount source. */
1389
+ sourceType?: DiscountSourceTypeWithLiterals;
1390
+ /**
1391
+ * Coupon code that triggered the discount.
1392
+ * Relevant for coupon discounts only.
1393
+ * @maxLength 50
1394
+ */
1395
+ couponCode?: string | null;
1396
+ }
1397
+ declare enum DiscountSourceType {
1398
+ UNKNOWN_DISCOUNT_SOURCE_TYPE = "UNKNOWN_DISCOUNT_SOURCE_TYPE",
1399
+ /** The discount was applied automatically by a rule. */
1400
+ AUTOMATIC_RULE = "AUTOMATIC_RULE",
1401
+ /** The discount was applied by a coupon code. */
1402
+ COUPON = "COUPON"
1403
+ }
1404
+ /** @enumType */
1405
+ type DiscountSourceTypeWithLiterals = DiscountSourceType | 'UNKNOWN_DISCOUNT_SOURCE_TYPE' | 'AUTOMATIC_RULE' | 'COUPON';
1406
+ declare enum DiscountScope {
1407
+ UNKNOWN_DISCOUNT_SCOPE = "UNKNOWN_DISCOUNT_SCOPE",
1408
+ /** The discount applies to the cart's subtotal. */
1409
+ CART_SUBTOTAL = "CART_SUBTOTAL",
1410
+ /** The discount applies to a specific line item. */
1411
+ LINE_ITEM = "LINE_ITEM",
1412
+ /** The discount applies to the delivery price. */
1413
+ DELIVERY = "DELIVERY"
1414
+ }
1415
+ /** @enumType */
1416
+ type DiscountScopeWithLiterals = DiscountScope | 'UNKNOWN_DISCOUNT_SCOPE' | 'CART_SUBTOTAL' | 'LINE_ITEM' | 'DELIVERY';
1417
+ interface DiscountBenefit extends DiscountBenefitValueOneOf {
1418
+ /** A specific monetary value deducted from the total cost. */
1419
+ amountOff?: MultiCurrencyPrice;
1420
+ /**
1421
+ * The ID of line item that the discount applies to.
1422
+ * Relevant for item-level discounts only.
1423
+ * @format GUID
1424
+ */
1425
+ lineItemId?: string | null;
1426
+ }
1427
+ /** @oneof */
1428
+ interface DiscountBenefitValueOneOf {
1429
+ /** A specific monetary value deducted from the total cost. */
1430
+ amountOff?: MultiCurrencyPrice;
1431
+ }
1424
1432
  interface CartSummary {
1425
1433
  /**
1426
1434
  * The Cart ID.
@@ -1689,8 +1697,6 @@ interface Membership {
1689
1697
  * @maxLength 100
1690
1698
  */
1691
1699
  lineItemIds?: string[];
1692
- /** The name of this membership. */
1693
- name?: TranslatableString;
1694
1700
  }
1695
1701
  interface SubscriptionCharges {
1696
1702
  /**
@@ -2279,7 +2285,7 @@ interface UpdateLineItemsResponse {
2279
2285
  /** Updated Cart. */
2280
2286
  cart?: Cart;
2281
2287
  }
2282
- interface AddDiscountRequest {
2288
+ interface AddCouponRequest {
2283
2289
  /**
2284
2290
  * Cart ID.
2285
2291
  * @format GUID
@@ -2294,11 +2300,11 @@ interface AddDiscountRequest {
2294
2300
  */
2295
2301
  couponCode: string;
2296
2302
  }
2297
- interface AddDiscountResponse {
2303
+ interface AddCouponResponse {
2298
2304
  /** Updated Cart. */
2299
2305
  cart?: Cart;
2300
2306
  }
2301
- interface RemoveDiscountRequest {
2307
+ interface RemoveCouponRequest {
2302
2308
  /**
2303
2309
  * Cart ID.
2304
2310
  * @format GUID
@@ -2308,9 +2314,9 @@ interface RemoveDiscountRequest {
2308
2314
  * Discount ID.
2309
2315
  * @format GUID
2310
2316
  */
2311
- discountId: string;
2317
+ couponId: string;
2312
2318
  }
2313
- interface RemoveDiscountResponse {
2319
+ interface RemoveCouponResponse {
2314
2320
  /** Updated Cart. */
2315
2321
  cart?: Cart;
2316
2322
  }
@@ -2422,12 +2428,12 @@ declare function removeLineItems(): __PublicMethodMetaInfo<'POST', {
2422
2428
  declare function updateLineItems(): __PublicMethodMetaInfo<'POST', {
2423
2429
  cartId: string;
2424
2430
  }, UpdateLineItemsRequest$1, UpdateLineItemsRequest, UpdateLineItemsResponse$1, UpdateLineItemsResponse>;
2425
- declare function addDiscount(): __PublicMethodMetaInfo<'POST', {
2431
+ declare function addCoupon(): __PublicMethodMetaInfo<'POST', {
2426
2432
  cartId: string;
2427
- }, AddDiscountRequest$1, AddDiscountRequest, AddDiscountResponse$1, AddDiscountResponse>;
2428
- declare function removeDiscount(): __PublicMethodMetaInfo<'POST', {
2433
+ }, AddCouponRequest$1, AddCouponRequest, AddCouponResponse$1, AddCouponResponse>;
2434
+ declare function removeCoupon(): __PublicMethodMetaInfo<'POST', {
2429
2435
  cartId: string;
2430
- }, RemoveDiscountRequest$1, RemoveDiscountRequest, RemoveDiscountResponse$1, RemoveDiscountResponse>;
2436
+ }, RemoveCouponRequest$1, RemoveCouponRequest, RemoveCouponResponse$1, RemoveCouponResponse>;
2431
2437
  declare function addGiftCard(): __PublicMethodMetaInfo<'POST', {
2432
2438
  cartId: string;
2433
2439
  }, AddGiftCardRequest$1, AddGiftCardRequest, AddGiftCardResponse$1, AddGiftCardResponse>;
@@ -2439,4 +2445,4 @@ declare function markCartAsCompleted(): __PublicMethodMetaInfo<'POST', {
2439
2445
  }, MarkCartAsCompletedRequest$1, MarkCartAsCompletedRequest, MarkCartAsCompletedResponse$1, MarkCartAsCompletedResponse>;
2440
2446
  declare function handleAsyncCheckoutCompletion(): __PublicMethodMetaInfo<'POST', {}, HandleAsyncCheckoutCompletionRequest$1, HandleAsyncCheckoutCompletionRequest, RawHttpResponse$1, RawHttpResponse>;
2441
2447
 
2442
- export { type __PublicMethodMetaInfo, addDiscount, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeDiscount, removeGiftCard, removeLineItems, updateCart, updateLineItems };
2448
+ export { type __PublicMethodMetaInfo, addCoupon, addGiftCard, addLineItems, calculateCart, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, placeOrder, refreshCart, removeCoupon, removeGiftCard, removeLineItems, updateCart, updateLineItems };
@@ -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,