@commercelayer/sdk 4.36.0 → 4.38.0
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/lib/cjs/api.d.ts +10 -7
- package/lib/cjs/api.js +12 -3
- package/lib/cjs/commercelayer.d.ts +5 -2
- package/lib/cjs/commercelayer.js +4 -1
- package/lib/cjs/error.d.ts +3 -2
- package/lib/cjs/error.js +2 -1
- package/lib/cjs/model.d.ts +3 -0
- package/lib/cjs/resource.d.ts +1 -0
- package/lib/cjs/resource.js +16 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +137 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +75 -0
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +7 -3
- package/lib/cjs/resources/coupons.d.ts +3 -0
- package/lib/cjs/resources/custom_promotion_rules.d.ts +62 -0
- package/lib/cjs/resources/custom_promotion_rules.js +29 -0
- package/lib/cjs/resources/external_promotions.d.ts +20 -1
- package/lib/cjs/resources/external_promotions.js +10 -0
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +20 -1
- package/lib/cjs/resources/fixed_amount_promotions.js +10 -0
- package/lib/cjs/resources/fixed_price_promotions.d.ts +11 -0
- package/lib/cjs/resources/fixed_price_promotions.js +6 -0
- package/lib/cjs/resources/free_gift_promotions.d.ts +11 -0
- package/lib/cjs/resources/free_gift_promotions.js +6 -0
- package/lib/cjs/resources/free_shipping_promotions.d.ts +11 -0
- package/lib/cjs/resources/free_shipping_promotions.js +6 -0
- package/lib/cjs/resources/line_items.d.ts +1 -0
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +7 -3
- package/lib/cjs/resources/orders.d.ts +24 -0
- package/lib/cjs/resources/orders.js +20 -0
- package/lib/cjs/resources/payment_methods.d.ts +3 -3
- package/lib/cjs/resources/payment_options.d.ts +44 -0
- package/lib/cjs/resources/payment_options.js +33 -0
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +11 -0
- package/lib/cjs/resources/percentage_discount_promotions.js +6 -0
- package/lib/cjs/resources/promotion_rules.d.ts +2 -1
- package/lib/cjs/resources/promotions.d.ts +3 -0
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +7 -3
- package/lib/esm/api.d.ts +10 -7
- package/lib/esm/api.js +6 -0
- package/lib/esm/commercelayer.d.ts +5 -2
- package/lib/esm/commercelayer.js +4 -1
- package/lib/esm/error.d.ts +3 -2
- package/lib/esm/error.js +2 -1
- package/lib/esm/model.d.ts +3 -0
- package/lib/esm/resource.d.ts +1 -0
- package/lib/esm/resource.js +16 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +137 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.js +73 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +7 -3
- package/lib/esm/resources/coupons.d.ts +3 -0
- package/lib/esm/resources/custom_promotion_rules.d.ts +62 -0
- package/lib/esm/resources/custom_promotion_rules.js +27 -0
- package/lib/esm/resources/external_promotions.d.ts +20 -1
- package/lib/esm/resources/external_promotions.js +10 -0
- package/lib/esm/resources/fixed_amount_promotions.d.ts +20 -1
- package/lib/esm/resources/fixed_amount_promotions.js +10 -0
- package/lib/esm/resources/fixed_price_promotions.d.ts +11 -0
- package/lib/esm/resources/fixed_price_promotions.js +6 -0
- package/lib/esm/resources/free_gift_promotions.d.ts +11 -0
- package/lib/esm/resources/free_gift_promotions.js +6 -0
- package/lib/esm/resources/free_shipping_promotions.d.ts +11 -0
- package/lib/esm/resources/free_shipping_promotions.js +6 -0
- package/lib/esm/resources/line_items.d.ts +1 -0
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +7 -3
- package/lib/esm/resources/orders.d.ts +24 -0
- package/lib/esm/resources/orders.js +20 -0
- package/lib/esm/resources/payment_methods.d.ts +3 -3
- package/lib/esm/resources/payment_options.d.ts +44 -0
- package/lib/esm/resources/payment_options.js +31 -0
- package/lib/esm/resources/percentage_discount_promotions.d.ts +11 -0
- package/lib/esm/resources/percentage_discount_promotions.js +6 -0
- package/lib/esm/resources/promotion_rules.d.ts +2 -1
- package/lib/esm/resources/promotions.d.ts +3 -0
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +7 -3
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
@@ -19,7 +19,12 @@ import type { SatispayPayment, SatispayPaymentType } from './satispay_payments';
|
|
19
19
|
import type { StripePayment, StripePaymentType } from './stripe_payments';
|
20
20
|
import type { WireTransfer, WireTransferType } from './wire_transfers';
|
21
21
|
import type { LineItem } from './line_items';
|
22
|
+
import type { LineItemOption } from './line_item_options';
|
23
|
+
import type { StockReservation } from './stock_reservations';
|
24
|
+
import type { StockLineItem } from './stock_line_items';
|
25
|
+
import type { StockTransfer } from './stock_transfers';
|
22
26
|
import type { Shipment } from './shipments';
|
27
|
+
import type { PaymentOption } from './payment_options';
|
23
28
|
import type { Authorization } from './authorizations';
|
24
29
|
import type { Capture } from './captures';
|
25
30
|
import type { Void } from './voids';
|
@@ -97,6 +102,9 @@ interface Order extends Resource {
|
|
97
102
|
tax_included?: boolean | null;
|
98
103
|
tax_rate?: number | null;
|
99
104
|
freight_taxable?: boolean | null;
|
105
|
+
payment_method_taxable?: boolean | null;
|
106
|
+
adjustment_taxable?: boolean | null;
|
107
|
+
gift_card_taxable?: boolean | null;
|
100
108
|
requires_billing_info?: boolean | null;
|
101
109
|
country_code?: string | null;
|
102
110
|
shipping_country_code_lock?: string | null;
|
@@ -197,7 +205,12 @@ interface Order extends Resource {
|
|
197
205
|
payment_method?: PaymentMethod | null;
|
198
206
|
payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null;
|
199
207
|
line_items?: LineItem[] | null;
|
208
|
+
line_item_options?: LineItemOption[] | null;
|
209
|
+
stock_reservations?: StockReservation[] | null;
|
210
|
+
stock_line_items?: StockLineItem[] | null;
|
211
|
+
stock_transfers?: StockTransfer[] | null;
|
200
212
|
shipments?: Shipment[] | null;
|
213
|
+
payment_options?: PaymentOption[] | null;
|
201
214
|
transactions?: Array<Authorization | Capture | Void | Refund> | null;
|
202
215
|
authorizations?: Authorization[] | null;
|
203
216
|
captures?: Capture[] | null;
|
@@ -220,6 +233,9 @@ interface OrderCreate extends ResourceCreate {
|
|
220
233
|
customer_password?: string | null;
|
221
234
|
language_code?: string | null;
|
222
235
|
freight_taxable?: boolean | null;
|
236
|
+
payment_method_taxable?: boolean | null;
|
237
|
+
adjustment_taxable?: boolean | null;
|
238
|
+
gift_card_taxable?: boolean | null;
|
223
239
|
shipping_country_code_lock?: string | null;
|
224
240
|
coupon_code?: string | null;
|
225
241
|
gift_card_code?: string | null;
|
@@ -242,6 +258,9 @@ interface OrderUpdate extends ResourceUpdate {
|
|
242
258
|
customer_password?: string | null;
|
243
259
|
language_code?: string | null;
|
244
260
|
freight_taxable?: boolean | null;
|
261
|
+
payment_method_taxable?: boolean | null;
|
262
|
+
adjustment_taxable?: boolean | null;
|
263
|
+
gift_card_taxable?: boolean | null;
|
245
264
|
shipping_country_code_lock?: string | null;
|
246
265
|
coupon_code?: string | null;
|
247
266
|
gift_card_code?: string | null;
|
@@ -299,7 +318,12 @@ declare class Orders extends ApiResource<Order> {
|
|
299
318
|
available_free_bundles(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Bundle>>;
|
300
319
|
payment_method(orderId: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentMethod>;
|
301
320
|
line_items(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItem>>;
|
321
|
+
line_item_options(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>>;
|
322
|
+
stock_reservations(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockReservation>>;
|
323
|
+
stock_line_items(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
|
324
|
+
stock_transfers(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
|
302
325
|
shipments(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Shipment>>;
|
326
|
+
payment_options(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentOption>>;
|
303
327
|
authorizations(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Authorization>>;
|
304
328
|
captures(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
|
305
329
|
voids(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
|
@@ -51,10 +51,30 @@ class Orders extends resource_1.ApiResource {
|
|
51
51
|
const _orderId = orderId.id || orderId;
|
52
52
|
return this.resources.fetch({ type: 'line_items' }, `orders/${_orderId}/line_items`, params, options);
|
53
53
|
}
|
54
|
+
async line_item_options(orderId, params, options) {
|
55
|
+
const _orderId = orderId.id || orderId;
|
56
|
+
return this.resources.fetch({ type: 'line_item_options' }, `orders/${_orderId}/line_item_options`, params, options);
|
57
|
+
}
|
58
|
+
async stock_reservations(orderId, params, options) {
|
59
|
+
const _orderId = orderId.id || orderId;
|
60
|
+
return this.resources.fetch({ type: 'stock_reservations' }, `orders/${_orderId}/stock_reservations`, params, options);
|
61
|
+
}
|
62
|
+
async stock_line_items(orderId, params, options) {
|
63
|
+
const _orderId = orderId.id || orderId;
|
64
|
+
return this.resources.fetch({ type: 'stock_line_items' }, `orders/${_orderId}/stock_line_items`, params, options);
|
65
|
+
}
|
66
|
+
async stock_transfers(orderId, params, options) {
|
67
|
+
const _orderId = orderId.id || orderId;
|
68
|
+
return this.resources.fetch({ type: 'stock_transfers' }, `orders/${_orderId}/stock_transfers`, params, options);
|
69
|
+
}
|
54
70
|
async shipments(orderId, params, options) {
|
55
71
|
const _orderId = orderId.id || orderId;
|
56
72
|
return this.resources.fetch({ type: 'shipments' }, `orders/${_orderId}/shipments`, params, options);
|
57
73
|
}
|
74
|
+
async payment_options(orderId, params, options) {
|
75
|
+
const _orderId = orderId.id || orderId;
|
76
|
+
return this.resources.fetch({ type: 'payment_options' }, `orders/${_orderId}/payment_options`, params, options);
|
77
|
+
}
|
58
78
|
async authorizations(orderId, params, options) {
|
59
79
|
const _orderId = orderId.id || orderId;
|
60
80
|
return this.resources.fetch({ type: 'authorizations' }, `orders/${_orderId}/authorizations`, params, options);
|
@@ -17,8 +17,8 @@ type PaymentGatewayRel = ResourceRel & {
|
|
17
17
|
};
|
18
18
|
interface PaymentMethod extends Resource {
|
19
19
|
readonly type: PaymentMethodType;
|
20
|
-
payment_source_type: string;
|
21
20
|
name?: string | null;
|
21
|
+
payment_source_type: 'AdyenPayment' | 'AxervePayment' | 'BraintreePayment' | 'CheckoutComPayment' | 'CreditCard' | 'ExternalPayment' | 'KlarnaPayment' | 'PaypalPayment' | 'SatispayPayment' | 'StripePayment' | 'WireTransfer';
|
22
22
|
currency_code?: string | null;
|
23
23
|
moto?: boolean | null;
|
24
24
|
require_capture?: boolean | null;
|
@@ -36,7 +36,7 @@ interface PaymentMethod extends Resource {
|
|
36
36
|
versions?: Version[] | null;
|
37
37
|
}
|
38
38
|
interface PaymentMethodCreate extends ResourceCreate {
|
39
|
-
payment_source_type:
|
39
|
+
payment_source_type: 'AdyenPayment' | 'AxervePayment' | 'BraintreePayment' | 'CheckoutComPayment' | 'CreditCard' | 'ExternalPayment' | 'KlarnaPayment' | 'PaypalPayment' | 'SatispayPayment' | 'StripePayment' | 'WireTransfer';
|
40
40
|
currency_code?: string | null;
|
41
41
|
moto?: boolean | null;
|
42
42
|
require_capture?: boolean | null;
|
@@ -47,7 +47,7 @@ interface PaymentMethodCreate extends ResourceCreate {
|
|
47
47
|
payment_gateway: PaymentGatewayRel;
|
48
48
|
}
|
49
49
|
interface PaymentMethodUpdate extends ResourceUpdate {
|
50
|
-
payment_source_type?:
|
50
|
+
payment_source_type?: 'AdyenPayment' | 'AxervePayment' | 'BraintreePayment' | 'CheckoutComPayment' | 'CreditCard' | 'ExternalPayment' | 'KlarnaPayment' | 'PaypalPayment' | 'SatispayPayment' | 'StripePayment' | 'WireTransfer' | null;
|
51
51
|
currency_code?: string | null;
|
52
52
|
moto?: boolean | null;
|
53
53
|
require_capture?: boolean | null;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
+
import type { Order, OrderType } from './orders';
|
5
|
+
import type { Attachment } from './attachments';
|
6
|
+
type PaymentOptionType = 'payment_options';
|
7
|
+
type PaymentOptionRel = ResourceRel & {
|
8
|
+
type: PaymentOptionType;
|
9
|
+
};
|
10
|
+
type OrderRel = ResourceRel & {
|
11
|
+
type: OrderType;
|
12
|
+
};
|
13
|
+
interface PaymentOption extends Resource {
|
14
|
+
readonly type: PaymentOptionType;
|
15
|
+
name?: string | null;
|
16
|
+
payment_source_type: 'AdyenPayment' | 'AxervePayment' | 'BraintreePayment' | 'CheckoutComPayment' | 'CreditCard' | 'ExternalPayment' | 'KlarnaPayment' | 'PaypalPayment' | 'SatispayPayment' | 'StripePayment' | 'WireTransfer';
|
17
|
+
data: Record<string, any>;
|
18
|
+
order?: Order | null;
|
19
|
+
attachments?: Attachment[] | null;
|
20
|
+
}
|
21
|
+
interface PaymentOptionCreate extends ResourceCreate {
|
22
|
+
name?: string | null;
|
23
|
+
payment_source_type: 'AdyenPayment' | 'AxervePayment' | 'BraintreePayment' | 'CheckoutComPayment' | 'CreditCard' | 'ExternalPayment' | 'KlarnaPayment' | 'PaypalPayment' | 'SatispayPayment' | 'StripePayment' | 'WireTransfer';
|
24
|
+
data: Record<string, any>;
|
25
|
+
order: OrderRel;
|
26
|
+
}
|
27
|
+
interface PaymentOptionUpdate extends ResourceUpdate {
|
28
|
+
name?: string | null;
|
29
|
+
data?: Record<string, any> | null;
|
30
|
+
order?: OrderRel | null;
|
31
|
+
}
|
32
|
+
declare class PaymentOptions extends ApiResource<PaymentOption> {
|
33
|
+
static readonly TYPE: PaymentOptionType;
|
34
|
+
create(resource: PaymentOptionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentOption>;
|
35
|
+
update(resource: PaymentOptionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentOption>;
|
36
|
+
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
37
|
+
order(paymentOptionId: string | PaymentOption, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
38
|
+
attachments(paymentOptionId: string | PaymentOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
39
|
+
isPaymentOption(resource: any): resource is PaymentOption;
|
40
|
+
relationship(id: string | ResourceId | null): PaymentOptionRel;
|
41
|
+
type(): PaymentOptionType;
|
42
|
+
}
|
43
|
+
export default PaymentOptions;
|
44
|
+
export type { PaymentOption, PaymentOptionCreate, PaymentOptionUpdate, PaymentOptionType };
|
@@ -0,0 +1,33 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const resource_1 = require("../resource");
|
4
|
+
class PaymentOptions extends resource_1.ApiResource {
|
5
|
+
async create(resource, params, options) {
|
6
|
+
return this.resources.create({ ...resource, type: PaymentOptions.TYPE }, params, options);
|
7
|
+
}
|
8
|
+
async update(resource, params, options) {
|
9
|
+
return this.resources.update({ ...resource, type: PaymentOptions.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async delete(id, options) {
|
12
|
+
await this.resources.delete((typeof id === 'string') ? { id, type: PaymentOptions.TYPE } : id, options);
|
13
|
+
}
|
14
|
+
async order(paymentOptionId, params, options) {
|
15
|
+
const _paymentOptionId = paymentOptionId.id || paymentOptionId;
|
16
|
+
return this.resources.fetch({ type: 'orders' }, `payment_options/${_paymentOptionId}/order`, params, options);
|
17
|
+
}
|
18
|
+
async attachments(paymentOptionId, params, options) {
|
19
|
+
const _paymentOptionId = paymentOptionId.id || paymentOptionId;
|
20
|
+
return this.resources.fetch({ type: 'attachments' }, `payment_options/${_paymentOptionId}/attachments`, params, options);
|
21
|
+
}
|
22
|
+
isPaymentOption(resource) {
|
23
|
+
return resource.type && (resource.type === PaymentOptions.TYPE);
|
24
|
+
}
|
25
|
+
relationship(id) {
|
26
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: PaymentOptions.TYPE } : { id: id.id, type: PaymentOptions.TYPE };
|
27
|
+
}
|
28
|
+
type() {
|
29
|
+
return PaymentOptions.TYPE;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
PaymentOptions.TYPE = 'payment_options';
|
33
|
+
exports.default = PaymentOptions;
|
@@ -45,11 +45,14 @@ interface PercentageDiscountPromotion extends Resource {
|
|
45
45
|
readonly type: PercentageDiscountPromotionType;
|
46
46
|
name: string;
|
47
47
|
currency_code?: string | null;
|
48
|
+
exclusive?: boolean | null;
|
49
|
+
priority?: number | null;
|
48
50
|
starts_at: string;
|
49
51
|
expires_at: string;
|
50
52
|
total_usage_limit: number;
|
51
53
|
total_usage_count?: number | null;
|
52
54
|
active?: boolean | null;
|
55
|
+
disabled_at?: string | null;
|
53
56
|
percentage: number;
|
54
57
|
market?: Market | null;
|
55
58
|
promotion_rules?: PromotionRule[] | null;
|
@@ -67,6 +70,8 @@ interface PercentageDiscountPromotion extends Resource {
|
|
67
70
|
interface PercentageDiscountPromotionCreate extends ResourceCreate {
|
68
71
|
name: string;
|
69
72
|
currency_code?: string | null;
|
73
|
+
exclusive?: boolean | null;
|
74
|
+
priority?: number | null;
|
70
75
|
starts_at: string;
|
71
76
|
expires_at: string;
|
72
77
|
total_usage_limit: number;
|
@@ -83,9 +88,13 @@ interface PercentageDiscountPromotionCreate extends ResourceCreate {
|
|
83
88
|
interface PercentageDiscountPromotionUpdate extends ResourceUpdate {
|
84
89
|
name?: string | null;
|
85
90
|
currency_code?: string | null;
|
91
|
+
exclusive?: boolean | null;
|
92
|
+
priority?: number | null;
|
86
93
|
starts_at?: string | null;
|
87
94
|
expires_at?: string | null;
|
88
95
|
total_usage_limit?: number | null;
|
96
|
+
_disable?: boolean | null;
|
97
|
+
_enable?: boolean | null;
|
89
98
|
percentage?: number | null;
|
90
99
|
market?: MarketRel | null;
|
91
100
|
promotion_rules?: PromotionRuleRel[] | null;
|
@@ -112,6 +121,8 @@ declare class PercentageDiscountPromotions extends ApiResource<PercentageDiscoun
|
|
112
121
|
tags(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
113
122
|
versions(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
114
123
|
skus(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
124
|
+
_disable(id: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PercentageDiscountPromotion>;
|
125
|
+
_enable(id: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PercentageDiscountPromotion>;
|
115
126
|
isPercentageDiscountPromotion(resource: any): resource is PercentageDiscountPromotion;
|
116
127
|
relationship(id: string | ResourceId | null): PercentageDiscountPromotionRel;
|
117
128
|
type(): PercentageDiscountPromotionType;
|
@@ -55,6 +55,12 @@ class PercentageDiscountPromotions extends resource_1.ApiResource {
|
|
55
55
|
const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
|
56
56
|
return this.resources.fetch({ type: 'skus' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/skus`, params, options);
|
57
57
|
}
|
58
|
+
async _disable(id, params, options) {
|
59
|
+
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: PercentageDiscountPromotions.TYPE, _disable: true }, params, options);
|
60
|
+
}
|
61
|
+
async _enable(id, params, options) {
|
62
|
+
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: PercentageDiscountPromotions.TYPE, _enable: true }, params, options);
|
63
|
+
}
|
58
64
|
isPercentageDiscountPromotion(resource) {
|
59
65
|
return resource.type && (resource.type === PercentageDiscountPromotions.TYPE);
|
60
66
|
}
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse }
|
|
3
3
|
import type { QueryParamsList } from '../query';
|
4
4
|
import type { PercentageDiscountPromotion } from './percentage_discount_promotions';
|
5
5
|
import type { FreeShippingPromotion } from './free_shipping_promotions';
|
6
|
+
import type { BuyXPayYPromotion } from './buy_x_pay_y_promotions';
|
6
7
|
import type { FreeGiftPromotion } from './free_gift_promotions';
|
7
8
|
import type { FixedPricePromotion } from './fixed_price_promotions';
|
8
9
|
import type { ExternalPromotion } from './external_promotions';
|
@@ -14,7 +15,7 @@ type PromotionRuleRel = ResourceRel & {
|
|
14
15
|
};
|
15
16
|
interface PromotionRule extends Resource {
|
16
17
|
readonly type: PromotionRuleType;
|
17
|
-
promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null;
|
18
|
+
promotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null;
|
18
19
|
versions?: Version[] | null;
|
19
20
|
}
|
20
21
|
declare class PromotionRules extends ApiResource<PromotionRule> {
|
@@ -20,11 +20,14 @@ interface Promotion extends Resource {
|
|
20
20
|
readonly type: PromotionType;
|
21
21
|
name: string;
|
22
22
|
currency_code?: string | null;
|
23
|
+
exclusive?: boolean | null;
|
24
|
+
priority?: number | null;
|
23
25
|
starts_at: string;
|
24
26
|
expires_at: string;
|
25
27
|
total_usage_limit: number;
|
26
28
|
total_usage_count?: number | null;
|
27
29
|
active?: boolean | null;
|
30
|
+
disabled_at?: string | null;
|
28
31
|
market?: Market | null;
|
29
32
|
promotion_rules?: PromotionRule[] | null;
|
30
33
|
order_amount_promotion_rule?: OrderAmountPromotionRule | null;
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesCon
|
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions';
|
5
5
|
import type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions';
|
6
|
+
import type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions';
|
6
7
|
import type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions';
|
7
8
|
import type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions';
|
8
9
|
import type { ExternalPromotion, ExternalPromotionType } from './external_promotions';
|
@@ -20,6 +21,9 @@ type PercentageDiscountPromotionRel = ResourceRel & {
|
|
20
21
|
type FreeShippingPromotionRel = ResourceRel & {
|
21
22
|
type: FreeShippingPromotionType;
|
22
23
|
};
|
24
|
+
type BuyXPayYPromotionRel = ResourceRel & {
|
25
|
+
type: BuyXPayYPromotionType;
|
26
|
+
};
|
23
27
|
type FreeGiftPromotionRel = ResourceRel & {
|
24
28
|
type: FreeGiftPromotionType;
|
25
29
|
};
|
@@ -39,7 +43,7 @@ interface SkuListPromotionRule extends Resource {
|
|
39
43
|
readonly type: SkuListPromotionRuleType;
|
40
44
|
all_skus?: boolean | null;
|
41
45
|
min_quantity?: number | null;
|
42
|
-
promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null;
|
46
|
+
promotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null;
|
43
47
|
versions?: Version[] | null;
|
44
48
|
sku_list?: SkuList | null;
|
45
49
|
skus?: Sku[] | null;
|
@@ -47,13 +51,13 @@ interface SkuListPromotionRule extends Resource {
|
|
47
51
|
interface SkuListPromotionRuleCreate extends ResourceCreate {
|
48
52
|
all_skus?: boolean | null;
|
49
53
|
min_quantity?: number | null;
|
50
|
-
promotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
|
54
|
+
promotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
|
51
55
|
sku_list?: SkuListRel | null;
|
52
56
|
}
|
53
57
|
interface SkuListPromotionRuleUpdate extends ResourceUpdate {
|
54
58
|
all_skus?: boolean | null;
|
55
59
|
min_quantity?: number | null;
|
56
|
-
promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | null;
|
60
|
+
promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | null;
|
57
61
|
sku_list?: SkuListRel | null;
|
58
62
|
}
|
59
63
|
declare class SkuListPromotionRules extends ApiResource<SkuListPromotionRule> {
|
package/lib/esm/api.d.ts
CHANGED
@@ -19,6 +19,7 @@ export { default as BingGeocoders } from './resources/bing_geocoders';
|
|
19
19
|
export { default as BraintreeGateways } from './resources/braintree_gateways';
|
20
20
|
export { default as BraintreePayments } from './resources/braintree_payments';
|
21
21
|
export { default as Bundles } from './resources/bundles';
|
22
|
+
export { default as BuyXPayYPromotions } from './resources/buy_x_pay_y_promotions';
|
22
23
|
export { default as Captures } from './resources/captures';
|
23
24
|
export { default as CarrierAccounts } from './resources/carrier_accounts';
|
24
25
|
export { default as CheckoutComGateways } from './resources/checkout_com_gateways';
|
@@ -27,6 +28,7 @@ export { default as Cleanups } from './resources/cleanups';
|
|
27
28
|
export { default as CouponCodesPromotionRules } from './resources/coupon_codes_promotion_rules';
|
28
29
|
export { default as CouponRecipients } from './resources/coupon_recipients';
|
29
30
|
export { default as Coupons } from './resources/coupons';
|
31
|
+
export { default as CustomPromotionRules } from './resources/custom_promotion_rules';
|
30
32
|
export { default as CustomerAddresses } from './resources/customer_addresses';
|
31
33
|
export { default as CustomerGroups } from './resources/customer_groups';
|
32
34
|
export { default as CustomerPasswordResets } from './resources/customer_password_resets';
|
@@ -75,6 +77,7 @@ export { default as ParcelLineItems } from './resources/parcel_line_items';
|
|
75
77
|
export { default as Parcels } from './resources/parcels';
|
76
78
|
export { default as PaymentGateways } from './resources/payment_gateways';
|
77
79
|
export { default as PaymentMethods } from './resources/payment_methods';
|
80
|
+
export { default as PaymentOptions } from './resources/payment_options';
|
78
81
|
export { default as PaypalGateways } from './resources/paypal_gateways';
|
79
82
|
export { default as PaypalPayments } from './resources/paypal_payments';
|
80
83
|
export { default as PercentageDiscountPromotions } from './resources/percentage_discount_promotions';
|
@@ -121,8 +124,8 @@ export { default as Versions } from './resources/versions';
|
|
121
124
|
export { default as Voids } from './resources/voids';
|
122
125
|
export { default as Webhooks } from './resources/webhooks';
|
123
126
|
export { default as WireTransfers } from './resources/wire_transfers';
|
124
|
-
export type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'application' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'event_callbacks' | 'events' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'geocoders' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_factories' | 'order_subscription_items' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'recurring_order_copies' | 'refunds' | 'reserved_stocks' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_method_tiers' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_reservations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'versions' | 'voids' | 'webhooks' | 'wire_transfers';
|
125
|
-
export declare const resourceList: readonly ["addresses", "adjustments", "adyen_gateways", "adyen_payments", "application", "attachments", "authorizations", "avalara_accounts", "axerve_gateways", "axerve_payments", "billing_info_validation_rules", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "event_callbacks", "events", "exports", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "free_gift_promotions", "free_shipping_promotions", "geocoders", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "klarna_gateways", "klarna_payments", "line_item_options", "line_items", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "order_amount_promotion_rules", "order_copies", "order_factories", "order_subscription_items", "order_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_frequency_tiers", "price_lists", "price_tiers", "price_volume_tiers", "prices", "promotion_rules", "promotions", "recurring_order_copies", "refunds", "reserved_stocks", "return_line_items", "returns", "satispay_gateways", "satispay_payments", "shipments", "shipping_categories", "shipping_method_tiers", "shipping_methods", "shipping_weight_tiers", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_reservations", "stock_transfers", "stripe_gateways", "stripe_payments", "subscription_models", "tags", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "versions", "voids", "webhooks", "wire_transfers"];
|
127
|
+
export type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'application' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'buy_x_pay_y_promotions' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'custom_promotion_rules' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'event_callbacks' | 'events' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'geocoders' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_factories' | 'order_subscription_items' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'payment_options' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'recurring_order_copies' | 'refunds' | 'reserved_stocks' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_method_tiers' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_reservations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'versions' | 'voids' | 'webhooks' | 'wire_transfers';
|
128
|
+
export declare const resourceList: readonly ["addresses", "adjustments", "adyen_gateways", "adyen_payments", "application", "attachments", "authorizations", "avalara_accounts", "axerve_gateways", "axerve_payments", "billing_info_validation_rules", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "buy_x_pay_y_promotions", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "custom_promotion_rules", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "event_callbacks", "events", "exports", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "free_gift_promotions", "free_shipping_promotions", "geocoders", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "klarna_gateways", "klarna_payments", "line_item_options", "line_items", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "order_amount_promotion_rules", "order_copies", "order_factories", "order_subscription_items", "order_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "payment_options", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_frequency_tiers", "price_lists", "price_tiers", "price_volume_tiers", "prices", "promotion_rules", "promotions", "recurring_order_copies", "refunds", "reserved_stocks", "return_line_items", "returns", "satispay_gateways", "satispay_payments", "shipments", "shipping_categories", "shipping_method_tiers", "shipping_methods", "shipping_weight_tiers", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_reservations", "stock_transfers", "stripe_gateways", "stripe_payments", "subscription_models", "tags", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "versions", "voids", "webhooks", "wire_transfers"];
|
126
129
|
export type RetrievableResourceType = ResourceTypeLock;
|
127
130
|
export type RetrievableResource = Resource & {
|
128
131
|
type: RetrievableResourceType;
|
@@ -131,26 +134,26 @@ export type ListableResourceType = Exclude<ResourceTypeLock, 'application' | 'or
|
|
131
134
|
export type ListableResource = Resource & {
|
132
135
|
type: ListableResourceType;
|
133
136
|
};
|
134
|
-
export type CreatableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
|
137
|
+
export type CreatableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'buy_x_pay_y_promotions' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'custom_promotion_rules' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'payment_options' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
|
135
138
|
export type CreatableResource = Resource & {
|
136
139
|
type: CreatableResourceType;
|
137
140
|
};
|
138
|
-
export type UpdatableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'checkout_com_gateways' | 'checkout_com_payments' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
|
141
|
+
export type UpdatableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'buy_x_pay_y_promotions' | 'captures' | 'checkout_com_gateways' | 'checkout_com_payments' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'custom_promotion_rules' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'payment_options' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
|
139
142
|
export type UpdatableResource = Resource & {
|
140
143
|
type: UpdatableResourceType;
|
141
144
|
};
|
142
|
-
export type DeletableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
|
145
|
+
export type DeletableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'buy_x_pay_y_promotions' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'custom_promotion_rules' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'payment_options' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
|
143
146
|
export type DeletableResource = Resource & {
|
144
147
|
type: DeletableResourceType;
|
145
148
|
};
|
146
|
-
export type TaggableResourceType = 'addresses' | 'bundles' | 'coupons' | 'customers' | 'external_promotions' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'gift_cards' | 'line_item_options' | 'line_items' | 'orders' | 'percentage_discount_promotions' | 'promotions' | 'returns' | 'sku_options' | 'skus';
|
149
|
+
export type TaggableResourceType = 'addresses' | 'bundles' | 'buy_x_pay_y_promotions' | 'coupons' | 'customers' | 'external_promotions' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'gift_cards' | 'line_item_options' | 'line_items' | 'orders' | 'percentage_discount_promotions' | 'promotions' | 'returns' | 'sku_options' | 'skus';
|
147
150
|
export type TaggableResource = Resource & {
|
148
151
|
type: TaggableResourceType;
|
149
152
|
tags?: Array<ResourceRel & {
|
150
153
|
type: TagType;
|
151
154
|
}> | null;
|
152
155
|
};
|
153
|
-
export type VersionableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_payment_sources' | 'customer_subscriptions' | 'delivery_lead_times' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'gift_card_recipients' | 'gift_cards' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'refunds' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_method_tiers' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
|
156
|
+
export type VersionableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'buy_x_pay_y_promotions' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'custom_promotion_rules' | 'customer_addresses' | 'customer_groups' | 'customer_payment_sources' | 'customer_subscriptions' | 'delivery_lead_times' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'gift_card_recipients' | 'gift_cards' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'refunds' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_method_tiers' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
|
154
157
|
export type VersionableResource = Resource & {
|
155
158
|
type: VersionableResourceType;
|
156
159
|
versions?: Array<ResourceRel & {
|
package/lib/esm/api.js
CHANGED
@@ -18,6 +18,7 @@ export { default as BingGeocoders } from './resources/bing_geocoders';
|
|
18
18
|
export { default as BraintreeGateways } from './resources/braintree_gateways';
|
19
19
|
export { default as BraintreePayments } from './resources/braintree_payments';
|
20
20
|
export { default as Bundles } from './resources/bundles';
|
21
|
+
export { default as BuyXPayYPromotions } from './resources/buy_x_pay_y_promotions';
|
21
22
|
export { default as Captures } from './resources/captures';
|
22
23
|
export { default as CarrierAccounts } from './resources/carrier_accounts';
|
23
24
|
export { default as CheckoutComGateways } from './resources/checkout_com_gateways';
|
@@ -26,6 +27,7 @@ export { default as Cleanups } from './resources/cleanups';
|
|
26
27
|
export { default as CouponCodesPromotionRules } from './resources/coupon_codes_promotion_rules';
|
27
28
|
export { default as CouponRecipients } from './resources/coupon_recipients';
|
28
29
|
export { default as Coupons } from './resources/coupons';
|
30
|
+
export { default as CustomPromotionRules } from './resources/custom_promotion_rules';
|
29
31
|
export { default as CustomerAddresses } from './resources/customer_addresses';
|
30
32
|
export { default as CustomerGroups } from './resources/customer_groups';
|
31
33
|
export { default as CustomerPasswordResets } from './resources/customer_password_resets';
|
@@ -74,6 +76,7 @@ export { default as ParcelLineItems } from './resources/parcel_line_items';
|
|
74
76
|
export { default as Parcels } from './resources/parcels';
|
75
77
|
export { default as PaymentGateways } from './resources/payment_gateways';
|
76
78
|
export { default as PaymentMethods } from './resources/payment_methods';
|
79
|
+
export { default as PaymentOptions } from './resources/payment_options';
|
77
80
|
export { default as PaypalGateways } from './resources/paypal_gateways';
|
78
81
|
export { default as PaypalPayments } from './resources/paypal_payments';
|
79
82
|
export { default as PercentageDiscountPromotions } from './resources/percentage_discount_promotions';
|
@@ -138,6 +141,7 @@ export const resourceList = [
|
|
138
141
|
'braintree_gateways',
|
139
142
|
'braintree_payments',
|
140
143
|
'bundles',
|
144
|
+
'buy_x_pay_y_promotions',
|
141
145
|
'captures',
|
142
146
|
'carrier_accounts',
|
143
147
|
'checkout_com_gateways',
|
@@ -146,6 +150,7 @@ export const resourceList = [
|
|
146
150
|
'coupon_codes_promotion_rules',
|
147
151
|
'coupon_recipients',
|
148
152
|
'coupons',
|
153
|
+
'custom_promotion_rules',
|
149
154
|
'customer_addresses',
|
150
155
|
'customer_groups',
|
151
156
|
'customer_password_resets',
|
@@ -194,6 +199,7 @@ export const resourceList = [
|
|
194
199
|
'parcels',
|
195
200
|
'payment_gateways',
|
196
201
|
'payment_methods',
|
202
|
+
'payment_options',
|
197
203
|
'paypal_gateways',
|
198
204
|
'paypal_payments',
|
199
205
|
'percentage_discount_promotions',
|
@@ -2,14 +2,14 @@ import * as api from './api';
|
|
2
2
|
import type { ApiError } from './error';
|
3
3
|
import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
|
4
4
|
import { type ResourcesInitConfig } from './resource';
|
5
|
-
declare const OPEN_API_SCHEMA_VERSION = "4.
|
5
|
+
declare const OPEN_API_SCHEMA_VERSION = "4.14.0";
|
6
6
|
export { OPEN_API_SCHEMA_VERSION };
|
7
7
|
type SdkConfig = {};
|
8
8
|
type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
9
9
|
type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
10
10
|
declare class CommerceLayerClient {
|
11
11
|
#private;
|
12
|
-
readonly openApiSchemaVersion = "4.
|
12
|
+
readonly openApiSchemaVersion = "4.14.0";
|
13
13
|
addresses: api.Addresses;
|
14
14
|
adjustments: api.Adjustments;
|
15
15
|
adyen_gateways: api.AdyenGateways;
|
@@ -25,6 +25,7 @@ declare class CommerceLayerClient {
|
|
25
25
|
braintree_gateways: api.BraintreeGateways;
|
26
26
|
braintree_payments: api.BraintreePayments;
|
27
27
|
bundles: api.Bundles;
|
28
|
+
buy_x_pay_y_promotions: api.BuyXPayYPromotions;
|
28
29
|
captures: api.Captures;
|
29
30
|
carrier_accounts: api.CarrierAccounts;
|
30
31
|
checkout_com_gateways: api.CheckoutComGateways;
|
@@ -33,6 +34,7 @@ declare class CommerceLayerClient {
|
|
33
34
|
coupon_codes_promotion_rules: api.CouponCodesPromotionRules;
|
34
35
|
coupon_recipients: api.CouponRecipients;
|
35
36
|
coupons: api.Coupons;
|
37
|
+
custom_promotion_rules: api.CustomPromotionRules;
|
36
38
|
customer_addresses: api.CustomerAddresses;
|
37
39
|
customer_groups: api.CustomerGroups;
|
38
40
|
customer_password_resets: api.CustomerPasswordResets;
|
@@ -81,6 +83,7 @@ declare class CommerceLayerClient {
|
|
81
83
|
parcels: api.Parcels;
|
82
84
|
payment_gateways: api.PaymentGateways;
|
83
85
|
payment_methods: api.PaymentMethods;
|
86
|
+
payment_options: api.PaymentOptions;
|
84
87
|
paypal_gateways: api.PaypalGateways;
|
85
88
|
paypal_payments: api.PaypalPayments;
|
86
89
|
percentage_discount_promotions: api.PercentageDiscountPromotions;
|
package/lib/esm/commercelayer.js
CHANGED
@@ -16,7 +16,7 @@ import ResourceAdapter from './resource';
|
|
16
16
|
import Debug from './debug';
|
17
17
|
const debug = Debug('commercelayer');
|
18
18
|
// Autogenerated schema version number, do not remove this line
|
19
|
-
const OPEN_API_SCHEMA_VERSION = '4.
|
19
|
+
const OPEN_API_SCHEMA_VERSION = '4.14.0';
|
20
20
|
export { OPEN_API_SCHEMA_VERSION };
|
21
21
|
class CommerceLayerClient {
|
22
22
|
// ##__CL_RESOURCES_DEF_STOP__##
|
@@ -46,6 +46,7 @@ class CommerceLayerClient {
|
|
46
46
|
this.braintree_gateways = new api.BraintreeGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
47
47
|
this.braintree_payments = new api.BraintreePayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
48
48
|
this.bundles = new api.Bundles(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
49
|
+
this.buy_x_pay_y_promotions = new api.BuyXPayYPromotions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
49
50
|
this.captures = new api.Captures(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
50
51
|
this.carrier_accounts = new api.CarrierAccounts(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
51
52
|
this.checkout_com_gateways = new api.CheckoutComGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
@@ -54,6 +55,7 @@ class CommerceLayerClient {
|
|
54
55
|
this.coupon_codes_promotion_rules = new api.CouponCodesPromotionRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
55
56
|
this.coupon_recipients = new api.CouponRecipients(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
56
57
|
this.coupons = new api.Coupons(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
58
|
+
this.custom_promotion_rules = new api.CustomPromotionRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
57
59
|
this.customer_addresses = new api.CustomerAddresses(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
58
60
|
this.customer_groups = new api.CustomerGroups(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
59
61
|
this.customer_password_resets = new api.CustomerPasswordResets(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
@@ -102,6 +104,7 @@ class CommerceLayerClient {
|
|
102
104
|
this.parcels = new api.Parcels(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
103
105
|
this.payment_gateways = new api.PaymentGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
104
106
|
this.payment_methods = new api.PaymentMethods(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
107
|
+
this.payment_options = new api.PaymentOptions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
105
108
|
this.paypal_gateways = new api.PaypalGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
106
109
|
this.paypal_payments = new api.PaypalPayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
107
110
|
this.percentage_discount_promotions = new api.PercentageDiscountPromotions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
package/lib/esm/error.d.ts
CHANGED
@@ -2,8 +2,9 @@ declare enum ErrorType {
|
|
2
2
|
CLIENT = "client",
|
3
3
|
REQUEST = "request",
|
4
4
|
RESPONSE = "response",
|
5
|
-
|
6
|
-
|
5
|
+
CANCEL = "cancel",
|
6
|
+
PARSE = "parse",
|
7
|
+
GENERIC = "generic"
|
7
8
|
}
|
8
9
|
declare class SdkError extends Error {
|
9
10
|
static NAME: string;
|