@wix/auto_sdk_ecom_current-cart-v-2 1.0.7 → 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.
- package/build/cjs/index.d.ts +116 -99
- package/build/cjs/index.js +41 -53
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +34 -46
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +102 -97
- package/build/cjs/meta.js +20 -20
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +116 -99
- package/build/es/index.mjs +39 -50
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +32 -43
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +102 -97
- package/build/es/meta.mjs +18 -18
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +24 -28
- package/build/internal/cjs/index.js +41 -53
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +134 -121
- package/build/internal/cjs/index.typings.js +34 -46
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +102 -97
- package/build/internal/cjs/meta.js +20 -20
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +24 -28
- package/build/internal/es/index.mjs +39 -50
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +134 -121
- package/build/internal/es/index.typings.mjs +32 -43
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +102 -97
- package/build/internal/es/meta.mjs +18 -18
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/meta.d.mts
CHANGED
|
@@ -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,
|
|
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.mjs';
|
|
2
2
|
|
|
3
3
|
interface Cart {
|
|
4
4
|
/**
|
|
@@ -39,13 +39,11 @@ interface Cart {
|
|
|
39
39
|
*/
|
|
40
40
|
note?: string | null;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
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
|
-
|
|
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.
|
|
@@ -853,95 +856,29 @@ interface ItemModifier {
|
|
|
853
856
|
/** The price of the modifier. */
|
|
854
857
|
price?: MultiCurrencyPrice;
|
|
855
858
|
}
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
id?: string;
|
|
859
|
+
/**
|
|
860
|
+
* Currently, only automatic discounts are applied to line items.
|
|
861
|
+
* In the future, coupon discounts will be supported as well.
|
|
862
|
+
*/
|
|
863
|
+
interface ItemDiscount {
|
|
862
864
|
/** The display name of the discount. */
|
|
863
865
|
name?: TranslatableString;
|
|
864
|
-
/** The
|
|
865
|
-
|
|
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;
|
|
866
|
+
/** The amount discounted from the item's sale price (per unit). */
|
|
867
|
+
amountOff?: MultiCurrencyPrice;
|
|
886
868
|
}
|
|
887
|
-
interface
|
|
888
|
-
/** The type of the discount source. */
|
|
889
|
-
sourceType?: DiscountSourceTypeWithLiterals;
|
|
869
|
+
interface Coupon {
|
|
890
870
|
/**
|
|
891
|
-
*
|
|
892
|
-
*
|
|
893
|
-
* @maxLength 50
|
|
871
|
+
* ID of the coupon in the Cart.
|
|
872
|
+
* @format GUID
|
|
894
873
|
*/
|
|
895
|
-
|
|
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;
|
|
874
|
+
id?: string;
|
|
920
875
|
/**
|
|
921
|
-
*
|
|
922
|
-
*
|
|
923
|
-
* @
|
|
876
|
+
* Coupon code.
|
|
877
|
+
* @minLength 1
|
|
878
|
+
* @maxLength 50
|
|
924
879
|
*/
|
|
925
|
-
|
|
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"
|
|
880
|
+
code?: string;
|
|
942
881
|
}
|
|
943
|
-
/** @enumType */
|
|
944
|
-
type DiscountStatusWithLiterals = DiscountStatus | 'UNKNOWN_DISCOUNT_STATUS' | 'ACTIVE' | 'EXPIRED' | 'DELETED' | 'MAX_USAGE_REACHED';
|
|
945
882
|
interface CartSource {
|
|
946
883
|
/**
|
|
947
884
|
* Sales channel that created the Cart.
|
|
@@ -1420,6 +1357,72 @@ interface CartSettings {
|
|
|
1420
1357
|
*/
|
|
1421
1358
|
manualPaymentDisabled?: boolean;
|
|
1422
1359
|
}
|
|
1360
|
+
interface Discount {
|
|
1361
|
+
/** The display name of the discount. */
|
|
1362
|
+
name?: TranslatableString;
|
|
1363
|
+
/** The source of the discount, indicating how it was applied. */
|
|
1364
|
+
source?: DiscountSource;
|
|
1365
|
+
/** The component in the Cart that the discount applies to. */
|
|
1366
|
+
scope?: DiscountScopeWithLiterals;
|
|
1367
|
+
/**
|
|
1368
|
+
* List of benefits provided by the discount.
|
|
1369
|
+
* @minSize 1
|
|
1370
|
+
* @maxSize 100
|
|
1371
|
+
*/
|
|
1372
|
+
benefits?: DiscountBenefit[];
|
|
1373
|
+
/**
|
|
1374
|
+
* Number of subscription cycles this discount applies to.
|
|
1375
|
+
* If unset, the discount applies to all billing cycles.
|
|
1376
|
+
* @min 1
|
|
1377
|
+
* @max 1000
|
|
1378
|
+
*/
|
|
1379
|
+
subscriptionCycles?: number | null;
|
|
1380
|
+
}
|
|
1381
|
+
interface DiscountSource {
|
|
1382
|
+
/** The type of the discount source. */
|
|
1383
|
+
sourceType?: DiscountSourceTypeWithLiterals;
|
|
1384
|
+
/**
|
|
1385
|
+
* Coupon code that triggered the discount.
|
|
1386
|
+
* Relevant for coupon discounts only.
|
|
1387
|
+
* @maxLength 50
|
|
1388
|
+
*/
|
|
1389
|
+
couponCode?: string | null;
|
|
1390
|
+
}
|
|
1391
|
+
declare enum DiscountSourceType {
|
|
1392
|
+
UNKNOWN_DISCOUNT_SOURCE_TYPE = "UNKNOWN_DISCOUNT_SOURCE_TYPE",
|
|
1393
|
+
/** The discount was applied automatically by a rule. */
|
|
1394
|
+
AUTOMATIC_RULE = "AUTOMATIC_RULE",
|
|
1395
|
+
/** The discount was applied by a coupon code. */
|
|
1396
|
+
COUPON = "COUPON"
|
|
1397
|
+
}
|
|
1398
|
+
/** @enumType */
|
|
1399
|
+
type DiscountSourceTypeWithLiterals = DiscountSourceType | 'UNKNOWN_DISCOUNT_SOURCE_TYPE' | 'AUTOMATIC_RULE' | 'COUPON';
|
|
1400
|
+
declare enum DiscountScope {
|
|
1401
|
+
UNKNOWN_DISCOUNT_SCOPE = "UNKNOWN_DISCOUNT_SCOPE",
|
|
1402
|
+
/** The discount applies to the cart's subtotal. */
|
|
1403
|
+
CART_SUBTOTAL = "CART_SUBTOTAL",
|
|
1404
|
+
/** The discount applies to a specific line item. */
|
|
1405
|
+
LINE_ITEM = "LINE_ITEM",
|
|
1406
|
+
/** The discount applies to the delivery price. */
|
|
1407
|
+
DELIVERY = "DELIVERY"
|
|
1408
|
+
}
|
|
1409
|
+
/** @enumType */
|
|
1410
|
+
type DiscountScopeWithLiterals = DiscountScope | 'UNKNOWN_DISCOUNT_SCOPE' | 'CART_SUBTOTAL' | 'LINE_ITEM' | 'DELIVERY';
|
|
1411
|
+
interface DiscountBenefit extends DiscountBenefitValueOneOf {
|
|
1412
|
+
/** A specific monetary value deducted from the total cost. */
|
|
1413
|
+
amountOff?: MultiCurrencyPrice;
|
|
1414
|
+
/**
|
|
1415
|
+
* The ID of line item that the discount applies to.
|
|
1416
|
+
* Relevant for item-level discounts only.
|
|
1417
|
+
* @format GUID
|
|
1418
|
+
*/
|
|
1419
|
+
lineItemId?: string | null;
|
|
1420
|
+
}
|
|
1421
|
+
/** @oneof */
|
|
1422
|
+
interface DiscountBenefitValueOneOf {
|
|
1423
|
+
/** A specific monetary value deducted from the total cost. */
|
|
1424
|
+
amountOff?: MultiCurrencyPrice;
|
|
1425
|
+
}
|
|
1423
1426
|
interface CartSummary {
|
|
1424
1427
|
/**
|
|
1425
1428
|
* The Cart ID.
|
|
@@ -1582,6 +1585,8 @@ interface Tax {
|
|
|
1582
1585
|
rate?: string | null;
|
|
1583
1586
|
/** Calculated tax, based on `taxable_amount` and `rate`. */
|
|
1584
1587
|
totalTax?: MultiCurrencyPrice;
|
|
1588
|
+
/** Amount that is exempt from tax. */
|
|
1589
|
+
totalExemptAmount?: MultiCurrencyPrice;
|
|
1585
1590
|
}
|
|
1586
1591
|
interface LineItemTax {
|
|
1587
1592
|
/**
|
|
@@ -2157,7 +2162,7 @@ interface UpdateLineItemsInCurrentCartResponse {
|
|
|
2157
2162
|
/** Updated Cart. */
|
|
2158
2163
|
cart?: Cart;
|
|
2159
2164
|
}
|
|
2160
|
-
interface
|
|
2165
|
+
interface AddCouponToCurrentCartRequest {
|
|
2161
2166
|
/**
|
|
2162
2167
|
* Coupon to apply.
|
|
2163
2168
|
*
|
|
@@ -2167,18 +2172,18 @@ interface AddDiscountToCurrentCartRequest {
|
|
|
2167
2172
|
*/
|
|
2168
2173
|
couponCode: string;
|
|
2169
2174
|
}
|
|
2170
|
-
interface
|
|
2175
|
+
interface AddCouponToCurrentCartResponse {
|
|
2171
2176
|
/** Updated Cart. */
|
|
2172
2177
|
cart?: Cart;
|
|
2173
2178
|
}
|
|
2174
|
-
interface
|
|
2179
|
+
interface RemoveCouponFromCurrentCartRequest {
|
|
2175
2180
|
/**
|
|
2176
|
-
*
|
|
2181
|
+
* Coupon ID.
|
|
2177
2182
|
* @format GUID
|
|
2178
2183
|
*/
|
|
2179
|
-
|
|
2184
|
+
couponId: string;
|
|
2180
2185
|
}
|
|
2181
|
-
interface
|
|
2186
|
+
interface RemoveCouponFromCurrentCartResponse {
|
|
2182
2187
|
/** Updated Cart. */
|
|
2183
2188
|
cart?: Cart;
|
|
2184
2189
|
}
|
|
@@ -2226,9 +2231,9 @@ declare function calculateCurrentCart(): __PublicMethodMetaInfo<'POST', {}, Calc
|
|
|
2226
2231
|
declare function addLineItemsToCurrentCart(): __PublicMethodMetaInfo<'POST', {}, AddLineItemsToCurrentCartRequest$1, AddLineItemsToCurrentCartRequest, AddLineItemsToCurrentCartResponse$1, AddLineItemsToCurrentCartResponse>;
|
|
2227
2232
|
declare function removeLineItemsFromCurrentCart(): __PublicMethodMetaInfo<'POST', {}, RemoveLineItemsFromCurrentCartRequest$1, RemoveLineItemsFromCurrentCartRequest, RemoveLineItemsFromCurrentCartResponse$1, RemoveLineItemsFromCurrentCartResponse>;
|
|
2228
2233
|
declare function updateLineItemsInCurrentCart(): __PublicMethodMetaInfo<'POST', {}, UpdateLineItemsInCurrentCartRequest$1, UpdateLineItemsInCurrentCartRequest, UpdateLineItemsInCurrentCartResponse$1, UpdateLineItemsInCurrentCartResponse>;
|
|
2229
|
-
declare function
|
|
2230
|
-
declare function
|
|
2234
|
+
declare function addCouponToCurrentCart(): __PublicMethodMetaInfo<'POST', {}, AddCouponToCurrentCartRequest$1, AddCouponToCurrentCartRequest, AddCouponToCurrentCartResponse$1, AddCouponToCurrentCartResponse>;
|
|
2235
|
+
declare function removeCouponFromCurrentCart(): __PublicMethodMetaInfo<'POST', {}, RemoveCouponFromCurrentCartRequest$1, RemoveCouponFromCurrentCartRequest, RemoveCouponFromCurrentCartResponse$1, RemoveCouponFromCurrentCartResponse>;
|
|
2231
2236
|
declare function addGiftCardToCurrentCart(): __PublicMethodMetaInfo<'POST', {}, AddGiftCardToCurrentCartRequest$1, AddGiftCardToCurrentCartRequest, AddGiftCardToCurrentCartResponse$1, AddGiftCardToCurrentCartResponse>;
|
|
2232
2237
|
declare function removeGiftCardFromCurrentCart(): __PublicMethodMetaInfo<'POST', {}, RemoveGiftCardFromCurrentCartRequest$1, RemoveGiftCardFromCurrentCartRequest, RemoveGiftCardFromCurrentCartResponse$1, RemoveGiftCardFromCurrentCartResponse>;
|
|
2233
2238
|
|
|
2234
|
-
export { type __PublicMethodMetaInfo,
|
|
2239
|
+
export { type __PublicMethodMetaInfo, addCouponToCurrentCart, addGiftCardToCurrentCart, addLineItemsToCurrentCart, calculateCurrentCart, createCurrentCart, deleteCurrentCart, getCurrentCart, refreshCurrentCart, removeCouponFromCurrentCart, removeGiftCardFromCurrentCart, removeLineItemsFromCurrentCart, updateCurrentCart, updateLineItemsInCurrentCart };
|
package/build/es/meta.mjs
CHANGED
|
@@ -618,15 +618,15 @@ function updateLineItemsInCurrentCart(payload) {
|
|
|
618
618
|
}
|
|
619
619
|
return __updateLineItemsInCurrentCart;
|
|
620
620
|
}
|
|
621
|
-
function
|
|
622
|
-
function
|
|
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.
|
|
626
|
+
methodFqn: "wix.ecom.cart.v2.CurrentCartService.AddCouponToCurrentCart",
|
|
627
627
|
packageName: PACKAGE_NAME,
|
|
628
628
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
629
|
-
protoPath: "/v2/carts/current/add-
|
|
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
|
|
669
|
+
return __addCouponToCurrentCart;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
672
|
-
function
|
|
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.
|
|
676
|
+
methodFqn: "wix.ecom.cart.v2.CurrentCartService.RemoveCouponFromCurrentCart",
|
|
677
677
|
packageName: PACKAGE_NAME,
|
|
678
678
|
url: resolveWixEcomCartV2CurrentCartServiceUrl({
|
|
679
|
-
protoPath: "/v2/carts/current/remove-
|
|
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
|
|
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
|
|
985
|
+
function addCouponToCurrentCart2() {
|
|
986
986
|
const payload = {};
|
|
987
|
-
const getRequestOptions =
|
|
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-
|
|
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
|
|
1003
|
+
function removeCouponFromCurrentCart2() {
|
|
1004
1004
|
const payload = {};
|
|
1005
|
-
const getRequestOptions =
|
|
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-
|
|
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
|
-
|
|
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
|
-
|
|
1066
|
+
removeCouponFromCurrentCart2 as removeCouponFromCurrentCart,
|
|
1067
1067
|
removeGiftCardFromCurrentCart2 as removeGiftCardFromCurrentCart,
|
|
1068
1068
|
removeLineItemsFromCurrentCart2 as removeLineItemsFromCurrentCart,
|
|
1069
1069
|
updateCurrentCart2 as updateCurrentCart,
|