@commercelayer/sdk 5.0.0-beta.4 → 5.0.0-beta.6
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/client.js +8 -3
- package/lib/cjs/commercelayer.d.ts +2 -2
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/error.js +1 -1
- package/lib/cjs/jsonapi.js +5 -1
- package/lib/cjs/resource.js +7 -7
- package/lib/cjs/resources/addresses.js +2 -3
- package/lib/cjs/resources/adjustments.js +2 -3
- package/lib/cjs/resources/adyen_gateways.js +2 -3
- package/lib/cjs/resources/adyen_payments.js +2 -3
- package/lib/cjs/resources/application.js +0 -1
- package/lib/cjs/resources/attachments.js +2 -3
- package/lib/cjs/resources/authorizations.js +1 -2
- package/lib/cjs/resources/avalara_accounts.js +2 -3
- package/lib/cjs/resources/axerve_gateways.js +2 -3
- package/lib/cjs/resources/axerve_payments.js +2 -3
- package/lib/cjs/resources/billing_info_validation_rules.js +2 -3
- package/lib/cjs/resources/bing_geocoders.js +2 -3
- package/lib/cjs/resources/braintree_gateways.js +2 -3
- package/lib/cjs/resources/braintree_payments.js +2 -3
- package/lib/cjs/resources/bundles.js +2 -3
- package/lib/cjs/resources/captures.js +1 -2
- package/lib/cjs/resources/carrier_accounts.js +0 -1
- package/lib/cjs/resources/checkout_com_gateways.js +2 -3
- package/lib/cjs/resources/checkout_com_payments.js +2 -3
- package/lib/cjs/resources/cleanups.js +1 -2
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +2 -3
- package/lib/cjs/resources/coupon_recipients.js +2 -3
- package/lib/cjs/resources/coupons.js +2 -3
- package/lib/cjs/resources/customer_addresses.js +2 -3
- package/lib/cjs/resources/customer_groups.js +2 -3
- package/lib/cjs/resources/customer_password_resets.js +2 -3
- package/lib/cjs/resources/customer_payment_sources.js +2 -3
- package/lib/cjs/resources/customer_subscriptions.js +2 -3
- package/lib/cjs/resources/customers.js +2 -3
- package/lib/cjs/resources/delivery_lead_times.js +2 -3
- package/lib/cjs/resources/event_callbacks.js +0 -1
- package/lib/cjs/resources/events.js +0 -1
- package/lib/cjs/resources/exports.js +1 -2
- package/lib/cjs/resources/external_gateways.js +2 -3
- package/lib/cjs/resources/external_payments.js +2 -3
- package/lib/cjs/resources/external_promotions.js +2 -3
- package/lib/cjs/resources/external_tax_calculators.js +2 -3
- package/lib/cjs/resources/fixed_amount_promotions.js +2 -3
- package/lib/cjs/resources/fixed_price_promotions.js +2 -3
- package/lib/cjs/resources/free_gift_promotions.js +2 -3
- package/lib/cjs/resources/free_shipping_promotions.js +2 -3
- package/lib/cjs/resources/geocoders.js +0 -1
- package/lib/cjs/resources/gift_card_recipients.js +2 -3
- package/lib/cjs/resources/gift_cards.js +2 -3
- package/lib/cjs/resources/google_geocoders.js +2 -3
- package/lib/cjs/resources/imports.js +1 -2
- package/lib/cjs/resources/in_stock_subscriptions.js +2 -3
- package/lib/cjs/resources/inventory_models.js +2 -3
- package/lib/cjs/resources/inventory_return_locations.js +2 -3
- package/lib/cjs/resources/inventory_stock_locations.js +2 -3
- package/lib/cjs/resources/klarna_gateways.js +2 -3
- package/lib/cjs/resources/klarna_payments.js +2 -3
- package/lib/cjs/resources/line_item_options.js +2 -3
- package/lib/cjs/resources/line_items.d.ts +2 -2
- package/lib/cjs/resources/line_items.js +2 -3
- package/lib/cjs/resources/manual_gateways.js +2 -3
- package/lib/cjs/resources/manual_tax_calculators.js +2 -3
- package/lib/cjs/resources/markets.js +2 -3
- package/lib/cjs/resources/merchants.js +2 -3
- package/lib/cjs/resources/order_amount_promotion_rules.js +2 -3
- package/lib/cjs/resources/order_copies.js +1 -2
- package/lib/cjs/resources/order_subscriptions.js +2 -3
- package/lib/cjs/resources/order_validation_rules.js +0 -1
- package/lib/cjs/resources/orders.d.ts +2 -2
- package/lib/cjs/resources/orders.js +2 -3
- package/lib/cjs/resources/organization.js +0 -1
- package/lib/cjs/resources/packages.js +2 -3
- package/lib/cjs/resources/parcel_line_items.js +2 -3
- package/lib/cjs/resources/parcels.js +2 -3
- package/lib/cjs/resources/payment_gateways.js +0 -1
- package/lib/cjs/resources/payment_methods.js +2 -3
- package/lib/cjs/resources/paypal_gateways.js +2 -3
- package/lib/cjs/resources/paypal_payments.js +2 -3
- package/lib/cjs/resources/percentage_discount_promotions.js +2 -3
- package/lib/cjs/resources/price_lists.js +2 -3
- package/lib/cjs/resources/price_tiers.js +0 -1
- package/lib/cjs/resources/price_volume_tiers.js +2 -3
- package/lib/cjs/resources/prices.js +2 -3
- package/lib/cjs/resources/promotion_rules.js +0 -1
- package/lib/cjs/resources/promotions.js +0 -1
- package/lib/cjs/resources/refunds.js +0 -1
- package/lib/cjs/resources/return_line_items.js +2 -3
- package/lib/cjs/resources/returns.js +2 -3
- package/lib/cjs/resources/satispay_gateways.js +2 -3
- package/lib/cjs/resources/satispay_payments.js +2 -3
- package/lib/cjs/resources/shipments.js +1 -2
- package/lib/cjs/resources/shipping_categories.js +2 -3
- package/lib/cjs/resources/shipping_method_tiers.js +0 -1
- package/lib/cjs/resources/shipping_methods.js +2 -3
- package/lib/cjs/resources/shipping_weight_tiers.js +2 -3
- package/lib/cjs/resources/shipping_zones.js +2 -3
- package/lib/cjs/resources/sku_list_items.js +2 -3
- package/lib/cjs/resources/sku_list_promotion_rules.js +2 -3
- package/lib/cjs/resources/sku_lists.js +2 -3
- package/lib/cjs/resources/sku_options.js +2 -3
- package/lib/cjs/resources/skus.js +2 -3
- package/lib/cjs/resources/stock_items.js +2 -3
- package/lib/cjs/resources/stock_line_items.js +0 -1
- package/lib/cjs/resources/stock_locations.js +2 -3
- package/lib/cjs/resources/stock_transfers.js +2 -3
- package/lib/cjs/resources/stripe_gateways.js +2 -3
- package/lib/cjs/resources/stripe_payments.js +2 -3
- package/lib/cjs/resources/tax_calculators.js +0 -1
- package/lib/cjs/resources/tax_categories.js +2 -3
- package/lib/cjs/resources/tax_rules.js +2 -3
- package/lib/cjs/resources/taxjar_accounts.js +2 -3
- package/lib/cjs/resources/transactions.js +0 -1
- package/lib/cjs/resources/voids.js +0 -1
- package/lib/cjs/resources/webhooks.js +2 -3
- package/lib/cjs/resources/wire_transfers.js +2 -3
- package/lib/esm/client.js +8 -3
- package/lib/esm/commercelayer.d.ts +2 -2
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/error.js +1 -1
- package/lib/esm/jsonapi.js +5 -1
- package/lib/esm/resource.js +7 -7
- package/lib/esm/resources/addresses.js +2 -3
- package/lib/esm/resources/adjustments.js +2 -3
- package/lib/esm/resources/adyen_gateways.js +2 -3
- package/lib/esm/resources/adyen_payments.js +2 -3
- package/lib/esm/resources/application.js +0 -1
- package/lib/esm/resources/attachments.js +2 -3
- package/lib/esm/resources/authorizations.js +1 -2
- package/lib/esm/resources/avalara_accounts.js +2 -3
- package/lib/esm/resources/axerve_gateways.js +2 -3
- package/lib/esm/resources/axerve_payments.js +2 -3
- package/lib/esm/resources/billing_info_validation_rules.js +2 -3
- package/lib/esm/resources/bing_geocoders.js +2 -3
- package/lib/esm/resources/braintree_gateways.js +2 -3
- package/lib/esm/resources/braintree_payments.js +2 -3
- package/lib/esm/resources/bundles.js +2 -3
- package/lib/esm/resources/captures.js +1 -2
- package/lib/esm/resources/carrier_accounts.js +0 -1
- package/lib/esm/resources/checkout_com_gateways.js +2 -3
- package/lib/esm/resources/checkout_com_payments.js +2 -3
- package/lib/esm/resources/cleanups.js +1 -2
- package/lib/esm/resources/coupon_codes_promotion_rules.js +2 -3
- package/lib/esm/resources/coupon_recipients.js +2 -3
- package/lib/esm/resources/coupons.js +2 -3
- package/lib/esm/resources/customer_addresses.js +2 -3
- package/lib/esm/resources/customer_groups.js +2 -3
- package/lib/esm/resources/customer_password_resets.js +2 -3
- package/lib/esm/resources/customer_payment_sources.js +2 -3
- package/lib/esm/resources/customer_subscriptions.js +2 -3
- package/lib/esm/resources/customers.js +2 -3
- package/lib/esm/resources/delivery_lead_times.js +2 -3
- package/lib/esm/resources/event_callbacks.js +0 -1
- package/lib/esm/resources/events.js +0 -1
- package/lib/esm/resources/exports.js +1 -2
- package/lib/esm/resources/external_gateways.js +2 -3
- package/lib/esm/resources/external_payments.js +2 -3
- package/lib/esm/resources/external_promotions.js +2 -3
- package/lib/esm/resources/external_tax_calculators.js +2 -3
- package/lib/esm/resources/fixed_amount_promotions.js +2 -3
- package/lib/esm/resources/fixed_price_promotions.js +2 -3
- package/lib/esm/resources/free_gift_promotions.js +2 -3
- package/lib/esm/resources/free_shipping_promotions.js +2 -3
- package/lib/esm/resources/geocoders.js +0 -1
- package/lib/esm/resources/gift_card_recipients.js +2 -3
- package/lib/esm/resources/gift_cards.js +2 -3
- package/lib/esm/resources/google_geocoders.js +2 -3
- package/lib/esm/resources/imports.js +1 -2
- package/lib/esm/resources/in_stock_subscriptions.js +2 -3
- package/lib/esm/resources/inventory_models.js +2 -3
- package/lib/esm/resources/inventory_return_locations.js +2 -3
- package/lib/esm/resources/inventory_stock_locations.js +2 -3
- package/lib/esm/resources/klarna_gateways.js +2 -3
- package/lib/esm/resources/klarna_payments.js +2 -3
- package/lib/esm/resources/line_item_options.js +2 -3
- package/lib/esm/resources/line_items.d.ts +2 -2
- package/lib/esm/resources/line_items.js +2 -3
- package/lib/esm/resources/manual_gateways.js +2 -3
- package/lib/esm/resources/manual_tax_calculators.js +2 -3
- package/lib/esm/resources/markets.js +2 -3
- package/lib/esm/resources/merchants.js +2 -3
- package/lib/esm/resources/order_amount_promotion_rules.js +2 -3
- package/lib/esm/resources/order_copies.js +1 -2
- package/lib/esm/resources/order_subscriptions.js +2 -3
- package/lib/esm/resources/order_validation_rules.js +0 -1
- package/lib/esm/resources/orders.d.ts +2 -2
- package/lib/esm/resources/orders.js +2 -3
- package/lib/esm/resources/organization.js +0 -1
- package/lib/esm/resources/packages.js +2 -3
- package/lib/esm/resources/parcel_line_items.js +2 -3
- package/lib/esm/resources/parcels.js +2 -3
- package/lib/esm/resources/payment_gateways.js +0 -1
- package/lib/esm/resources/payment_methods.js +2 -3
- package/lib/esm/resources/paypal_gateways.js +2 -3
- package/lib/esm/resources/paypal_payments.js +2 -3
- package/lib/esm/resources/percentage_discount_promotions.js +2 -3
- package/lib/esm/resources/price_lists.js +2 -3
- package/lib/esm/resources/price_tiers.js +0 -1
- package/lib/esm/resources/price_volume_tiers.js +2 -3
- package/lib/esm/resources/prices.js +2 -3
- package/lib/esm/resources/promotion_rules.js +0 -1
- package/lib/esm/resources/promotions.js +0 -1
- package/lib/esm/resources/refunds.js +0 -1
- package/lib/esm/resources/return_line_items.js +2 -3
- package/lib/esm/resources/returns.js +2 -3
- package/lib/esm/resources/satispay_gateways.js +2 -3
- package/lib/esm/resources/satispay_payments.js +2 -3
- package/lib/esm/resources/shipments.js +1 -2
- package/lib/esm/resources/shipping_categories.js +2 -3
- package/lib/esm/resources/shipping_method_tiers.js +0 -1
- package/lib/esm/resources/shipping_methods.js +2 -3
- package/lib/esm/resources/shipping_weight_tiers.js +2 -3
- package/lib/esm/resources/shipping_zones.js +2 -3
- package/lib/esm/resources/sku_list_items.js +2 -3
- package/lib/esm/resources/sku_list_promotion_rules.js +2 -3
- package/lib/esm/resources/sku_lists.js +2 -3
- package/lib/esm/resources/sku_options.js +2 -3
- package/lib/esm/resources/skus.js +2 -3
- package/lib/esm/resources/stock_items.js +2 -3
- package/lib/esm/resources/stock_line_items.js +0 -1
- package/lib/esm/resources/stock_locations.js +2 -3
- package/lib/esm/resources/stock_transfers.js +2 -3
- package/lib/esm/resources/stripe_gateways.js +2 -3
- package/lib/esm/resources/stripe_payments.js +2 -3
- package/lib/esm/resources/tax_calculators.js +0 -1
- package/lib/esm/resources/tax_categories.js +2 -3
- package/lib/esm/resources/tax_rules.js +2 -3
- package/lib/esm/resources/taxjar_accounts.js +2 -3
- package/lib/esm/resources/transactions.js +0 -1
- package/lib/esm/resources/voids.js +0 -1
- package/lib/esm/resources/webhooks.js +2 -3
- package/lib/esm/resources/wire_transfers.js +2 -3
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class CustomerPaymentSources extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'customer_payment_sources'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: CustomerPaymentSources.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: CustomerPaymentSources.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: CustomerPaymentSources.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: CustomerPaymentSources.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class CustomerSubscriptions extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'customer_subscriptions'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: CustomerSubscriptions.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: CustomerSubscriptions.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: CustomerSubscriptions.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: CustomerSubscriptions.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class Customers extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'customers'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: Customers.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: Customers.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: Customers.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: Customers.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class DeliveryLeadTimes extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'delivery_lead_times'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: DeliveryLeadTimes.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: DeliveryLeadTimes.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: DeliveryLeadTimes.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: DeliveryLeadTimes.TYPE } : id, options);
|
@@ -2,7 +2,6 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class EventCallbacks extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'event_callbacks'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: EventCallbacks.TYPE }, params, options);
|
8
7
|
}
|
@@ -2,7 +2,6 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class Events extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'events'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: Events.TYPE }, params, options);
|
8
7
|
}
|
@@ -2,12 +2,11 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class Exports extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'exports'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: Exports.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: Exports.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async delete(id, options) {
|
13
12
|
await this.resources.delete((typeof id === 'string') ? { id, type: Exports.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class ExternalGateways extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'external_gateways'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: ExternalGateways.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: ExternalGateways.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: ExternalGateways.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: ExternalGateways.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class ExternalPayments extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'external_payments'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: ExternalPayments.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: ExternalPayments.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: ExternalPayments.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: ExternalPayments.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class ExternalPromotions extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'external_promotions'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: ExternalPromotions.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: ExternalPromotions.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: ExternalPromotions.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: ExternalPromotions.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class ExternalTaxCalculators extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'external_tax_calculators'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: ExternalTaxCalculators.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: ExternalTaxCalculators.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: ExternalTaxCalculators.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: ExternalTaxCalculators.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class FixedAmountPromotions extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'fixed_amount_promotions'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: FixedAmountPromotions.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: FixedAmountPromotions.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: FixedAmountPromotions.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: FixedAmountPromotions.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class FixedPricePromotions extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'fixed_price_promotions'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: FixedPricePromotions.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: FixedPricePromotions.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: FixedPricePromotions.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: FixedPricePromotions.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class FreeGiftPromotions extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'free_gift_promotions'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: FreeGiftPromotions.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: FreeGiftPromotions.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: FreeGiftPromotions.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: FreeGiftPromotions.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class FreeShippingPromotions extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'free_shipping_promotions'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: FreeShippingPromotions.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: FreeShippingPromotions.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: FreeShippingPromotions.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: FreeShippingPromotions.TYPE } : id, options);
|
@@ -2,7 +2,6 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class Geocoders extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'geocoders'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: Geocoders.TYPE }, params, options);
|
8
7
|
}
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class GiftCardRecipients extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'gift_card_recipients'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: GiftCardRecipients.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: GiftCardRecipients.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: GiftCardRecipients.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: GiftCardRecipients.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class GiftCards extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'gift_cards'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: GiftCards.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: GiftCards.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: GiftCards.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: GiftCards.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class GoogleGeocoders extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'google_geocoders'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: GoogleGeocoders.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: GoogleGeocoders.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: GoogleGeocoders.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: GoogleGeocoders.TYPE } : id, options);
|
@@ -2,12 +2,11 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class Imports extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'imports'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: Imports.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: Imports.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async delete(id, options) {
|
13
12
|
await this.resources.delete((typeof id === 'string') ? { id, type: Imports.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class InStockSubscriptions extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'in_stock_subscriptions'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: InStockSubscriptions.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: InStockSubscriptions.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: InStockSubscriptions.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: InStockSubscriptions.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class InventoryModels extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'inventory_models'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: InventoryModels.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: InventoryModels.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: InventoryModels.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: InventoryModels.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class InventoryReturnLocations extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'inventory_return_locations'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: InventoryReturnLocations.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: InventoryReturnLocations.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: InventoryReturnLocations.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: InventoryReturnLocations.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class InventoryStockLocations extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'inventory_stock_locations'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: InventoryStockLocations.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: InventoryStockLocations.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: InventoryStockLocations.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: InventoryStockLocations.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class KlarnaGateways extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'klarna_gateways'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: KlarnaGateways.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: KlarnaGateways.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: KlarnaGateways.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: KlarnaGateways.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class KlarnaPayments extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'klarna_payments'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: KlarnaPayments.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: KlarnaPayments.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: KlarnaPayments.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: KlarnaPayments.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class LineItemOptions extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'line_item_options'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: LineItemOptions.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: LineItemOptions.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: LineItemOptions.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: LineItemOptions.TYPE } : id, options);
|
@@ -77,7 +77,7 @@ interface LineItem extends Resource {
|
|
77
77
|
discount_breakdown?: object;
|
78
78
|
tax_rate?: number;
|
79
79
|
tax_breakdown?: object;
|
80
|
-
item_type?:
|
80
|
+
item_type?: 'sku' | 'bundle' | 'shipment' | 'payment_method' | 'adjustment' | 'gift_card' | 'percentage_discount_promotion' | 'free_shipping_promotion' | 'free_gift_promotion' | 'fixed_price_promotion' | 'external_promotion' | 'fixed_amount_promotion';
|
81
81
|
order?: Order;
|
82
82
|
item?: Adjustment | Bundle | ExternalPromotion | FixedAmountPromotion | FreeShippingPromotion | GiftCard | PaymentMethod | PercentageDiscountPromotion | Shipment | Sku;
|
83
83
|
line_item_options?: LineItemOption[];
|
@@ -97,7 +97,7 @@ interface LineItemCreate extends ResourceCreate {
|
|
97
97
|
unit_amount_cents?: number;
|
98
98
|
name?: string;
|
99
99
|
image_url?: string;
|
100
|
-
item_type?:
|
100
|
+
item_type?: 'sku' | 'bundle' | 'shipment' | 'payment_method' | 'adjustment' | 'gift_card' | 'percentage_discount_promotion' | 'free_shipping_promotion' | 'free_gift_promotion' | 'fixed_price_promotion' | 'external_promotion' | 'fixed_amount_promotion';
|
101
101
|
order: OrderRel;
|
102
102
|
item?: AdjustmentRel | BundleRel | ExternalPromotionRel | FixedAmountPromotionRel | FreeShippingPromotionRel | GiftCardRel | PaymentMethodRel | PercentageDiscountPromotionRel | ShipmentRel | SkuRel;
|
103
103
|
}
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class LineItems extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'line_items'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: LineItems.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: LineItems.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: LineItems.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: LineItems.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class ManualGateways extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'manual_gateways'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: ManualGateways.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: ManualGateways.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: ManualGateways.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: ManualGateways.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class ManualTaxCalculators extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'manual_tax_calculators'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: ManualTaxCalculators.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: ManualTaxCalculators.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: ManualTaxCalculators.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: ManualTaxCalculators.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class Markets extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'markets'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: Markets.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: Markets.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: Markets.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: Markets.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class Merchants extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'merchants'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: Merchants.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: Merchants.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: Merchants.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: Merchants.TYPE } : id, options);
|
@@ -2,15 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class OrderAmountPromotionRules extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'order_amount_promotion_rules'
|
6
5
|
async list(params, options) {
|
7
6
|
return this.resources.list({ type: OrderAmountPromotionRules.TYPE }, params, options);
|
8
7
|
}
|
9
8
|
async create(resource, params, options) {
|
10
|
-
return this.resources.create(
|
9
|
+
return this.resources.create({ ...resource, type: OrderAmountPromotionRules.TYPE }, params, options);
|
11
10
|
}
|
12
11
|
async update(resource, params, options) {
|
13
|
-
return this.resources.update(
|
12
|
+
return this.resources.update({ ...resource, type: OrderAmountPromotionRules.TYPE }, params, options);
|
14
13
|
}
|
15
14
|
async delete(id, options) {
|
16
15
|
await this.resources.delete((typeof id === 'string') ? { id, type: OrderAmountPromotionRules.TYPE } : id, options);
|