@wix/auto_sdk_ecom_current-cart-v-2 1.0.8 → 1.0.9

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 +114 -99
  2. package/build/cjs/index.js +41 -53
  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 -46
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +100 -97
  8. package/build/cjs/meta.js +20 -20
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +114 -99
  11. package/build/es/index.mjs +39 -50
  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 -43
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +100 -97
  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 -53
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +132 -121
  23. package/build/internal/cjs/index.typings.js +34 -46
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +100 -97
  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 -50
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +132 -121
  32. package/build/internal/es/index.typings.mjs +32 -43
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +100 -97
  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 { CreateCurrentCartRequest as CreateCurrentCartRequest$1, CreateCurrentCartResponse as CreateCurrentCartResponse$1, GetCurrentCartRequest as GetCurrentCartRequest$1, GetCurrentCartResponse as GetCurrentCartResponse$1, UpdateCurrentCartRequest as UpdateCurrentCartRequest$1, UpdateCurrentCartResponse as UpdateCurrentCartResponse$1, DeleteCurrentCartRequest as DeleteCurrentCartRequest$1, DeleteCurrentCartResponse as DeleteCurrentCartResponse$1, RefreshCurrentCartRequest as RefreshCurrentCartRequest$1, RefreshCurrentCartResponse as RefreshCurrentCartResponse$1, CalculateCurrentCartRequest as CalculateCurrentCartRequest$1, CalculateCurrentCartResponse as CalculateCurrentCartResponse$1, AddLineItemsToCurrentCartRequest as AddLineItemsToCurrentCartRequest$1, AddLineItemsToCurrentCartResponse as AddLineItemsToCurrentCartResponse$1, RemoveLineItemsFromCurrentCartRequest as RemoveLineItemsFromCurrentCartRequest$1, RemoveLineItemsFromCurrentCartResponse as RemoveLineItemsFromCurrentCartResponse$1, UpdateLineItemsInCurrentCartRequest as UpdateLineItemsInCurrentCartRequest$1, UpdateLineItemsInCurrentCartResponse as UpdateLineItemsInCurrentCartResponse$1, AddDiscountToCurrentCartRequest as AddDiscountToCurrentCartRequest$1, AddDiscountToCurrentCartResponse as AddDiscountToCurrentCartResponse$1, RemoveDiscountFromCurrentCartRequest as RemoveDiscountFromCurrentCartRequest$1, RemoveDiscountFromCurrentCartResponse as RemoveDiscountFromCurrentCartResponse$1, AddGiftCardToCurrentCartRequest as AddGiftCardToCurrentCartRequest$1, AddGiftCardToCurrentCartResponse as AddGiftCardToCurrentCartResponse$1, RemoveGiftCardFromCurrentCartRequest as RemoveGiftCardFromCurrentCartRequest$1, RemoveGiftCardFromCurrentCartResponse as RemoveGiftCardFromCurrentCartResponse$1 } from './index.typings.mjs';
1
+ import { CreateCurrentCartRequest as CreateCurrentCartRequest$1, CreateCurrentCartResponse as CreateCurrentCartResponse$1, GetCurrentCartRequest as GetCurrentCartRequest$1, GetCurrentCartResponse as GetCurrentCartResponse$1, UpdateCurrentCartRequest as UpdateCurrentCartRequest$1, UpdateCurrentCartResponse as UpdateCurrentCartResponse$1, DeleteCurrentCartRequest as DeleteCurrentCartRequest$1, DeleteCurrentCartResponse as DeleteCurrentCartResponse$1, RefreshCurrentCartRequest as RefreshCurrentCartRequest$1, RefreshCurrentCartResponse as RefreshCurrentCartResponse$1, CalculateCurrentCartRequest as CalculateCurrentCartRequest$1, CalculateCurrentCartResponse as CalculateCurrentCartResponse$1, AddLineItemsToCurrentCartRequest as AddLineItemsToCurrentCartRequest$1, AddLineItemsToCurrentCartResponse as AddLineItemsToCurrentCartResponse$1, RemoveLineItemsFromCurrentCartRequest as RemoveLineItemsFromCurrentCartRequest$1, RemoveLineItemsFromCurrentCartResponse as RemoveLineItemsFromCurrentCartResponse$1, UpdateLineItemsInCurrentCartRequest as UpdateLineItemsInCurrentCartRequest$1, UpdateLineItemsInCurrentCartResponse as UpdateLineItemsInCurrentCartResponse$1, AddCouponToCurrentCartRequest as AddCouponToCurrentCartRequest$1, AddCouponToCurrentCartResponse as AddCouponToCurrentCartResponse$1, RemoveCouponFromCurrentCartRequest as RemoveCouponFromCurrentCartRequest$1, RemoveCouponFromCurrentCartResponse as RemoveCouponFromCurrentCartResponse$1, AddGiftCardToCurrentCartRequest as AddGiftCardToCurrentCartRequest$1, AddGiftCardToCurrentCartResponse as AddGiftCardToCurrentCartResponse$1, RemoveGiftCardFromCurrentCartRequest as RemoveGiftCardFromCurrentCartRequest$1, RemoveGiftCardFromCurrentCartResponse as RemoveGiftCardFromCurrentCartResponse$1 } from './index.typings.mjs';
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.
@@ -854,95 +857,29 @@ interface ItemModifier {
854
857
  /** The price of the modifier. */
855
858
  price?: MultiCurrencyPrice;
856
859
  }
857
- interface Discount {
858
- /**
859
- * A unique identifier of the discount within the Cart.
860
- * @format GUID
861
- */
862
- id?: string;
860
+ /**
861
+ * Currently, only automatic discounts are applied to line items.
862
+ * In the future, coupon discounts will be supported as well.
863
+ */
864
+ interface ItemDiscount {
863
865
  /** The display name of the discount. */
864
866
  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;
867
+ /** The amount discounted from the item's sale price (per unit). */
868
+ amountOff?: MultiCurrencyPrice;
887
869
  }
888
- interface DiscountSource {
889
- /** The type of the discount source. */
890
- sourceType?: DiscountSourceTypeWithLiterals;
870
+ interface Coupon {
891
871
  /**
892
- * Coupon code that triggered the discount.
893
- * Relevant for coupon discounts only.
894
- * @maxLength 50
872
+ * ID of the coupon in the Cart.
873
+ * @format GUID
895
874
  */
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;
875
+ id?: string;
921
876
  /**
922
- * The ID of line item that the discount applies to.
923
- * Relevant for item-level discounts only.
924
- * @format GUID
877
+ * Coupon code.
878
+ * @minLength 1
879
+ * @maxLength 50
925
880
  */
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"
881
+ code?: string;
943
882
  }
944
- /** @enumType */
945
- type DiscountStatusWithLiterals = DiscountStatus | 'UNKNOWN_DISCOUNT_STATUS' | 'ACTIVE' | 'EXPIRED' | 'DELETED' | 'MAX_USAGE_REACHED';
946
883
  interface CartSource {
947
884
  /**
948
885
  * Sales channel that created the Cart.
@@ -1421,6 +1358,72 @@ interface CartSettings {
1421
1358
  */
1422
1359
  manualPaymentDisabled?: boolean;
1423
1360
  }
1361
+ interface Discount {
1362
+ /** The display name of the discount. */
1363
+ name?: TranslatableString;
1364
+ /** The source of the discount, indicating how it was applied. */
1365
+ source?: DiscountSource;
1366
+ /** The component in the Cart that the discount applies to. */
1367
+ scope?: DiscountScopeWithLiterals;
1368
+ /**
1369
+ * List of benefits provided by the discount.
1370
+ * @minSize 1
1371
+ * @maxSize 100
1372
+ */
1373
+ benefits?: DiscountBenefit[];
1374
+ /**
1375
+ * Number of subscription cycles this discount applies to.
1376
+ * If unset, the discount applies to all billing cycles.
1377
+ * @min 1
1378
+ * @max 1000
1379
+ */
1380
+ subscriptionCycles?: number | null;
1381
+ }
1382
+ interface DiscountSource {
1383
+ /** The type of the discount source. */
1384
+ sourceType?: DiscountSourceTypeWithLiterals;
1385
+ /**
1386
+ * Coupon code that triggered the discount.
1387
+ * Relevant for coupon discounts only.
1388
+ * @maxLength 50
1389
+ */
1390
+ couponCode?: string | null;
1391
+ }
1392
+ declare enum DiscountSourceType {
1393
+ UNKNOWN_DISCOUNT_SOURCE_TYPE = "UNKNOWN_DISCOUNT_SOURCE_TYPE",
1394
+ /** The discount was applied automatically by a rule. */
1395
+ AUTOMATIC_RULE = "AUTOMATIC_RULE",
1396
+ /** The discount was applied by a coupon code. */
1397
+ COUPON = "COUPON"
1398
+ }
1399
+ /** @enumType */
1400
+ type DiscountSourceTypeWithLiterals = DiscountSourceType | 'UNKNOWN_DISCOUNT_SOURCE_TYPE' | 'AUTOMATIC_RULE' | 'COUPON';
1401
+ declare enum DiscountScope {
1402
+ UNKNOWN_DISCOUNT_SCOPE = "UNKNOWN_DISCOUNT_SCOPE",
1403
+ /** The discount applies to the cart's subtotal. */
1404
+ CART_SUBTOTAL = "CART_SUBTOTAL",
1405
+ /** The discount applies to a specific line item. */
1406
+ LINE_ITEM = "LINE_ITEM",
1407
+ /** The discount applies to the delivery price. */
1408
+ DELIVERY = "DELIVERY"
1409
+ }
1410
+ /** @enumType */
1411
+ type DiscountScopeWithLiterals = DiscountScope | 'UNKNOWN_DISCOUNT_SCOPE' | 'CART_SUBTOTAL' | 'LINE_ITEM' | 'DELIVERY';
1412
+ interface DiscountBenefit extends DiscountBenefitValueOneOf {
1413
+ /** A specific monetary value deducted from the total cost. */
1414
+ amountOff?: MultiCurrencyPrice;
1415
+ /**
1416
+ * The ID of line item that the discount applies to.
1417
+ * Relevant for item-level discounts only.
1418
+ * @format GUID
1419
+ */
1420
+ lineItemId?: string | null;
1421
+ }
1422
+ /** @oneof */
1423
+ interface DiscountBenefitValueOneOf {
1424
+ /** A specific monetary value deducted from the total cost. */
1425
+ amountOff?: MultiCurrencyPrice;
1426
+ }
1424
1427
  interface CartSummary {
1425
1428
  /**
1426
1429
  * The Cart ID.
@@ -2160,7 +2163,7 @@ interface UpdateLineItemsInCurrentCartResponse {
2160
2163
  /** Updated Cart. */
2161
2164
  cart?: Cart;
2162
2165
  }
2163
- interface AddDiscountToCurrentCartRequest {
2166
+ interface AddCouponToCurrentCartRequest {
2164
2167
  /**
2165
2168
  * Coupon to apply.
2166
2169
  *
@@ -2170,18 +2173,18 @@ interface AddDiscountToCurrentCartRequest {
2170
2173
  */
2171
2174
  couponCode: string;
2172
2175
  }
2173
- interface AddDiscountToCurrentCartResponse {
2176
+ interface AddCouponToCurrentCartResponse {
2174
2177
  /** Updated Cart. */
2175
2178
  cart?: Cart;
2176
2179
  }
2177
- interface RemoveDiscountFromCurrentCartRequest {
2180
+ interface RemoveCouponFromCurrentCartRequest {
2178
2181
  /**
2179
- * Discount ID.
2182
+ * Coupon ID.
2180
2183
  * @format GUID
2181
2184
  */
2182
- discountId: string;
2185
+ couponId: string;
2183
2186
  }
2184
- interface RemoveDiscountFromCurrentCartResponse {
2187
+ interface RemoveCouponFromCurrentCartResponse {
2185
2188
  /** Updated Cart. */
2186
2189
  cart?: Cart;
2187
2190
  }
@@ -2229,9 +2232,9 @@ declare function calculateCurrentCart(): __PublicMethodMetaInfo<'POST', {}, Calc
2229
2232
  declare function addLineItemsToCurrentCart(): __PublicMethodMetaInfo<'POST', {}, AddLineItemsToCurrentCartRequest$1, AddLineItemsToCurrentCartRequest, AddLineItemsToCurrentCartResponse$1, AddLineItemsToCurrentCartResponse>;
2230
2233
  declare function removeLineItemsFromCurrentCart(): __PublicMethodMetaInfo<'POST', {}, RemoveLineItemsFromCurrentCartRequest$1, RemoveLineItemsFromCurrentCartRequest, RemoveLineItemsFromCurrentCartResponse$1, RemoveLineItemsFromCurrentCartResponse>;
2231
2234
  declare function updateLineItemsInCurrentCart(): __PublicMethodMetaInfo<'POST', {}, UpdateLineItemsInCurrentCartRequest$1, UpdateLineItemsInCurrentCartRequest, UpdateLineItemsInCurrentCartResponse$1, UpdateLineItemsInCurrentCartResponse>;
2232
- declare function addDiscountToCurrentCart(): __PublicMethodMetaInfo<'POST', {}, AddDiscountToCurrentCartRequest$1, AddDiscountToCurrentCartRequest, AddDiscountToCurrentCartResponse$1, AddDiscountToCurrentCartResponse>;
2233
- declare function removeDiscountFromCurrentCart(): __PublicMethodMetaInfo<'POST', {}, RemoveDiscountFromCurrentCartRequest$1, RemoveDiscountFromCurrentCartRequest, RemoveDiscountFromCurrentCartResponse$1, RemoveDiscountFromCurrentCartResponse>;
2235
+ declare function addCouponToCurrentCart(): __PublicMethodMetaInfo<'POST', {}, AddCouponToCurrentCartRequest$1, AddCouponToCurrentCartRequest, AddCouponToCurrentCartResponse$1, AddCouponToCurrentCartResponse>;
2236
+ declare function removeCouponFromCurrentCart(): __PublicMethodMetaInfo<'POST', {}, RemoveCouponFromCurrentCartRequest$1, RemoveCouponFromCurrentCartRequest, RemoveCouponFromCurrentCartResponse$1, RemoveCouponFromCurrentCartResponse>;
2234
2237
  declare function addGiftCardToCurrentCart(): __PublicMethodMetaInfo<'POST', {}, AddGiftCardToCurrentCartRequest$1, AddGiftCardToCurrentCartRequest, AddGiftCardToCurrentCartResponse$1, AddGiftCardToCurrentCartResponse>;
2235
2238
  declare function removeGiftCardFromCurrentCart(): __PublicMethodMetaInfo<'POST', {}, RemoveGiftCardFromCurrentCartRequest$1, RemoveGiftCardFromCurrentCartRequest, RemoveGiftCardFromCurrentCartResponse$1, RemoveGiftCardFromCurrentCartResponse>;
2236
2239
 
2237
- export { type __PublicMethodMetaInfo, addDiscountToCurrentCart, addGiftCardToCurrentCart, addLineItemsToCurrentCart, calculateCurrentCart, createCurrentCart, deleteCurrentCart, getCurrentCart, refreshCurrentCart, removeDiscountFromCurrentCart, removeGiftCardFromCurrentCart, removeLineItemsFromCurrentCart, updateCurrentCart, updateLineItemsInCurrentCart };
2240
+ export { type __PublicMethodMetaInfo, addCouponToCurrentCart, addGiftCardToCurrentCart, addLineItemsToCurrentCart, calculateCurrentCart, createCurrentCart, deleteCurrentCart, getCurrentCart, refreshCurrentCart, removeCouponFromCurrentCart, removeGiftCardFromCurrentCart, removeLineItemsFromCurrentCart, updateCurrentCart, updateLineItemsInCurrentCart };
@@ -618,15 +618,15 @@ function updateLineItemsInCurrentCart(payload) {
618
618
  }
619
619
  return __updateLineItemsInCurrentCart;
620
620
  }
621
- function addDiscountToCurrentCart(payload) {
622
- function __addDiscountToCurrentCart({ host }) {
621
+ function addCouponToCurrentCart(payload) {
622
+ function __addCouponToCurrentCart({ host }) {
623
623
  const metadata = {
624
624
  entityFqdn: "wix.ecom.v2.cart",
625
625
  method: "POST",
626
- methodFqn: "wix.ecom.cart.v2.CurrentCartService.AddDiscountToCurrentCart",
626
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.AddCouponToCurrentCart",
627
627
  packageName: PACKAGE_NAME,
628
628
  url: resolveWixEcomCartV2CurrentCartServiceUrl({
629
- protoPath: "/v2/carts/current/add-discount",
629
+ protoPath: "/v2/carts/current/add-coupon",
630
630
  data: payload,
631
631
  host
632
632
  }),
@@ -666,17 +666,17 @@ function addDiscountToCurrentCart(payload) {
666
666
  };
667
667
  return metadata;
668
668
  }
669
- return __addDiscountToCurrentCart;
669
+ return __addCouponToCurrentCart;
670
670
  }
671
- function removeDiscountFromCurrentCart(payload) {
672
- function __removeDiscountFromCurrentCart({ host }) {
671
+ function removeCouponFromCurrentCart(payload) {
672
+ function __removeCouponFromCurrentCart({ host }) {
673
673
  const metadata = {
674
674
  entityFqdn: "wix.ecom.v2.cart",
675
675
  method: "POST",
676
- methodFqn: "wix.ecom.cart.v2.CurrentCartService.RemoveDiscountFromCurrentCart",
676
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.RemoveCouponFromCurrentCart",
677
677
  packageName: PACKAGE_NAME,
678
678
  url: resolveWixEcomCartV2CurrentCartServiceUrl({
679
- protoPath: "/v2/carts/current/remove-discount",
679
+ protoPath: "/v2/carts/current/remove-coupon",
680
680
  data: payload,
681
681
  host
682
682
  }),
@@ -716,7 +716,7 @@ function removeDiscountFromCurrentCart(payload) {
716
716
  };
717
717
  return metadata;
718
718
  }
719
- return __removeDiscountFromCurrentCart;
719
+ return __removeCouponFromCurrentCart;
720
720
  }
721
721
  function addGiftCardToCurrentCart(payload) {
722
722
  function __addGiftCardToCurrentCart({ host }) {
@@ -982,9 +982,9 @@ function updateLineItemsInCurrentCart2() {
982
982
  __originalResponseType: null
983
983
  };
984
984
  }
985
- function addDiscountToCurrentCart2() {
985
+ function addCouponToCurrentCart2() {
986
986
  const payload = {};
987
- const getRequestOptions = addDiscountToCurrentCart(payload);
987
+ const getRequestOptions = addCouponToCurrentCart(payload);
988
988
  const getUrl = (context) => {
989
989
  const { url } = getRequestOptions(context);
990
990
  return url;
@@ -992,7 +992,7 @@ function addDiscountToCurrentCart2() {
992
992
  return {
993
993
  getUrl,
994
994
  httpMethod: "POST",
995
- path: "/v2/carts/current/add-discount",
995
+ path: "/v2/carts/current/add-coupon",
996
996
  pathParams: {},
997
997
  __requestType: null,
998
998
  __originalRequestType: null,
@@ -1000,9 +1000,9 @@ function addDiscountToCurrentCart2() {
1000
1000
  __originalResponseType: null
1001
1001
  };
1002
1002
  }
1003
- function removeDiscountFromCurrentCart2() {
1003
+ function removeCouponFromCurrentCart2() {
1004
1004
  const payload = {};
1005
- const getRequestOptions = removeDiscountFromCurrentCart(payload);
1005
+ const getRequestOptions = removeCouponFromCurrentCart(payload);
1006
1006
  const getUrl = (context) => {
1007
1007
  const { url } = getRequestOptions(context);
1008
1008
  return url;
@@ -1010,7 +1010,7 @@ function removeDiscountFromCurrentCart2() {
1010
1010
  return {
1011
1011
  getUrl,
1012
1012
  httpMethod: "POST",
1013
- path: "/v2/carts/current/remove-discount",
1013
+ path: "/v2/carts/current/remove-coupon",
1014
1014
  pathParams: {},
1015
1015
  __requestType: null,
1016
1016
  __originalRequestType: null,
@@ -1055,7 +1055,7 @@ function removeGiftCardFromCurrentCart2() {
1055
1055
  };
1056
1056
  }
1057
1057
  export {
1058
- addDiscountToCurrentCart2 as addDiscountToCurrentCart,
1058
+ addCouponToCurrentCart2 as addCouponToCurrentCart,
1059
1059
  addGiftCardToCurrentCart2 as addGiftCardToCurrentCart,
1060
1060
  addLineItemsToCurrentCart2 as addLineItemsToCurrentCart,
1061
1061
  calculateCurrentCart2 as calculateCurrentCart,
@@ -1063,7 +1063,7 @@ export {
1063
1063
  deleteCurrentCart2 as deleteCurrentCart,
1064
1064
  getCurrentCart2 as getCurrentCart,
1065
1065
  refreshCurrentCart2 as refreshCurrentCart,
1066
- removeDiscountFromCurrentCart2 as removeDiscountFromCurrentCart,
1066
+ removeCouponFromCurrentCart2 as removeCouponFromCurrentCart,
1067
1067
  removeGiftCardFromCurrentCart2 as removeGiftCardFromCurrentCart,
1068
1068
  removeLineItemsFromCurrentCart2 as removeLineItemsFromCurrentCart,
1069
1069
  updateCurrentCart2 as updateCurrentCart,