@commercelayer/sdk 5.0.0-beta.4 → 5.0.0-beta.5
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/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 -2
- package/lib/cjs/resources/adjustments.js +2 -2
- package/lib/cjs/resources/adyen_gateways.js +2 -2
- package/lib/cjs/resources/adyen_payments.js +2 -2
- package/lib/cjs/resources/attachments.js +2 -2
- package/lib/cjs/resources/authorizations.js +1 -1
- package/lib/cjs/resources/avalara_accounts.js +2 -2
- package/lib/cjs/resources/axerve_gateways.js +2 -2
- package/lib/cjs/resources/axerve_payments.js +2 -2
- package/lib/cjs/resources/billing_info_validation_rules.js +2 -2
- package/lib/cjs/resources/bing_geocoders.js +2 -2
- package/lib/cjs/resources/braintree_gateways.js +2 -2
- package/lib/cjs/resources/braintree_payments.js +2 -2
- package/lib/cjs/resources/bundles.js +2 -2
- package/lib/cjs/resources/captures.js +1 -1
- package/lib/cjs/resources/checkout_com_gateways.js +2 -2
- package/lib/cjs/resources/checkout_com_payments.js +2 -2
- package/lib/cjs/resources/cleanups.js +1 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +2 -2
- package/lib/cjs/resources/coupon_recipients.js +2 -2
- package/lib/cjs/resources/coupons.js +2 -2
- package/lib/cjs/resources/customer_addresses.js +2 -2
- package/lib/cjs/resources/customer_groups.js +2 -2
- package/lib/cjs/resources/customer_password_resets.js +2 -2
- package/lib/cjs/resources/customer_payment_sources.js +2 -2
- package/lib/cjs/resources/customer_subscriptions.js +2 -2
- package/lib/cjs/resources/customers.js +2 -2
- package/lib/cjs/resources/delivery_lead_times.js +2 -2
- package/lib/cjs/resources/exports.js +1 -1
- package/lib/cjs/resources/external_gateways.js +2 -2
- package/lib/cjs/resources/external_payments.js +2 -2
- package/lib/cjs/resources/external_promotions.js +2 -2
- package/lib/cjs/resources/external_tax_calculators.js +2 -2
- package/lib/cjs/resources/fixed_amount_promotions.js +2 -2
- package/lib/cjs/resources/fixed_price_promotions.js +2 -2
- package/lib/cjs/resources/free_gift_promotions.js +2 -2
- package/lib/cjs/resources/free_shipping_promotions.js +2 -2
- package/lib/cjs/resources/gift_card_recipients.js +2 -2
- package/lib/cjs/resources/gift_cards.js +2 -2
- package/lib/cjs/resources/google_geocoders.js +2 -2
- package/lib/cjs/resources/imports.js +1 -1
- package/lib/cjs/resources/in_stock_subscriptions.js +2 -2
- package/lib/cjs/resources/inventory_models.js +2 -2
- package/lib/cjs/resources/inventory_return_locations.js +2 -2
- package/lib/cjs/resources/inventory_stock_locations.js +2 -2
- package/lib/cjs/resources/klarna_gateways.js +2 -2
- package/lib/cjs/resources/klarna_payments.js +2 -2
- package/lib/cjs/resources/line_item_options.js +2 -2
- package/lib/cjs/resources/line_items.js +2 -2
- package/lib/cjs/resources/manual_gateways.js +2 -2
- package/lib/cjs/resources/manual_tax_calculators.js +2 -2
- package/lib/cjs/resources/markets.js +2 -2
- package/lib/cjs/resources/merchants.js +2 -2
- package/lib/cjs/resources/order_amount_promotion_rules.js +2 -2
- package/lib/cjs/resources/order_copies.js +1 -1
- package/lib/cjs/resources/order_subscriptions.js +2 -2
- package/lib/cjs/resources/orders.js +2 -2
- package/lib/cjs/resources/packages.js +2 -2
- package/lib/cjs/resources/parcel_line_items.js +2 -2
- package/lib/cjs/resources/parcels.js +2 -2
- package/lib/cjs/resources/payment_methods.js +2 -2
- package/lib/cjs/resources/paypal_gateways.js +2 -2
- package/lib/cjs/resources/paypal_payments.js +2 -2
- package/lib/cjs/resources/percentage_discount_promotions.js +2 -2
- package/lib/cjs/resources/price_lists.js +2 -2
- package/lib/cjs/resources/price_volume_tiers.js +2 -2
- package/lib/cjs/resources/prices.js +2 -2
- package/lib/cjs/resources/return_line_items.js +2 -2
- package/lib/cjs/resources/returns.js +2 -2
- package/lib/cjs/resources/satispay_gateways.js +2 -2
- package/lib/cjs/resources/satispay_payments.js +2 -2
- package/lib/cjs/resources/shipments.js +1 -1
- package/lib/cjs/resources/shipping_categories.js +2 -2
- package/lib/cjs/resources/shipping_methods.js +2 -2
- package/lib/cjs/resources/shipping_weight_tiers.js +2 -2
- package/lib/cjs/resources/shipping_zones.js +2 -2
- package/lib/cjs/resources/sku_list_items.js +2 -2
- package/lib/cjs/resources/sku_list_promotion_rules.js +2 -2
- package/lib/cjs/resources/sku_lists.js +2 -2
- package/lib/cjs/resources/sku_options.js +2 -2
- package/lib/cjs/resources/skus.js +2 -2
- package/lib/cjs/resources/stock_items.js +2 -2
- package/lib/cjs/resources/stock_locations.js +2 -2
- package/lib/cjs/resources/stock_transfers.js +2 -2
- package/lib/cjs/resources/stripe_gateways.js +2 -2
- package/lib/cjs/resources/stripe_payments.js +2 -2
- package/lib/cjs/resources/tax_categories.js +2 -2
- package/lib/cjs/resources/tax_rules.js +2 -2
- package/lib/cjs/resources/taxjar_accounts.js +2 -2
- package/lib/cjs/resources/webhooks.js +2 -2
- package/lib/cjs/resources/wire_transfers.js +2 -2
- package/lib/esm/client.js +8 -3
- 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 -2
- package/lib/esm/resources/adjustments.js +2 -2
- package/lib/esm/resources/adyen_gateways.js +2 -2
- package/lib/esm/resources/adyen_payments.js +2 -2
- package/lib/esm/resources/attachments.js +2 -2
- package/lib/esm/resources/authorizations.js +1 -1
- package/lib/esm/resources/avalara_accounts.js +2 -2
- package/lib/esm/resources/axerve_gateways.js +2 -2
- package/lib/esm/resources/axerve_payments.js +2 -2
- package/lib/esm/resources/billing_info_validation_rules.js +2 -2
- package/lib/esm/resources/bing_geocoders.js +2 -2
- package/lib/esm/resources/braintree_gateways.js +2 -2
- package/lib/esm/resources/braintree_payments.js +2 -2
- package/lib/esm/resources/bundles.js +2 -2
- package/lib/esm/resources/captures.js +1 -1
- package/lib/esm/resources/checkout_com_gateways.js +2 -2
- package/lib/esm/resources/checkout_com_payments.js +2 -2
- package/lib/esm/resources/cleanups.js +1 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.js +2 -2
- package/lib/esm/resources/coupon_recipients.js +2 -2
- package/lib/esm/resources/coupons.js +2 -2
- package/lib/esm/resources/customer_addresses.js +2 -2
- package/lib/esm/resources/customer_groups.js +2 -2
- package/lib/esm/resources/customer_password_resets.js +2 -2
- package/lib/esm/resources/customer_payment_sources.js +2 -2
- package/lib/esm/resources/customer_subscriptions.js +2 -2
- package/lib/esm/resources/customers.js +2 -2
- package/lib/esm/resources/delivery_lead_times.js +2 -2
- package/lib/esm/resources/exports.js +1 -1
- package/lib/esm/resources/external_gateways.js +2 -2
- package/lib/esm/resources/external_payments.js +2 -2
- package/lib/esm/resources/external_promotions.js +2 -2
- package/lib/esm/resources/external_tax_calculators.js +2 -2
- package/lib/esm/resources/fixed_amount_promotions.js +2 -2
- package/lib/esm/resources/fixed_price_promotions.js +2 -2
- package/lib/esm/resources/free_gift_promotions.js +2 -2
- package/lib/esm/resources/free_shipping_promotions.js +2 -2
- package/lib/esm/resources/gift_card_recipients.js +2 -2
- package/lib/esm/resources/gift_cards.js +2 -2
- package/lib/esm/resources/google_geocoders.js +2 -2
- package/lib/esm/resources/imports.js +1 -1
- package/lib/esm/resources/in_stock_subscriptions.js +2 -2
- package/lib/esm/resources/inventory_models.js +2 -2
- package/lib/esm/resources/inventory_return_locations.js +2 -2
- package/lib/esm/resources/inventory_stock_locations.js +2 -2
- package/lib/esm/resources/klarna_gateways.js +2 -2
- package/lib/esm/resources/klarna_payments.js +2 -2
- package/lib/esm/resources/line_item_options.js +2 -2
- package/lib/esm/resources/line_items.js +2 -2
- package/lib/esm/resources/manual_gateways.js +2 -2
- package/lib/esm/resources/manual_tax_calculators.js +2 -2
- package/lib/esm/resources/markets.js +2 -2
- package/lib/esm/resources/merchants.js +2 -2
- package/lib/esm/resources/order_amount_promotion_rules.js +2 -2
- package/lib/esm/resources/order_copies.js +1 -1
- package/lib/esm/resources/order_subscriptions.js +2 -2
- package/lib/esm/resources/orders.js +2 -2
- package/lib/esm/resources/packages.js +2 -2
- package/lib/esm/resources/parcel_line_items.js +2 -2
- package/lib/esm/resources/parcels.js +2 -2
- package/lib/esm/resources/payment_methods.js +2 -2
- package/lib/esm/resources/paypal_gateways.js +2 -2
- package/lib/esm/resources/paypal_payments.js +2 -2
- package/lib/esm/resources/percentage_discount_promotions.js +2 -2
- package/lib/esm/resources/price_lists.js +2 -2
- package/lib/esm/resources/price_volume_tiers.js +2 -2
- package/lib/esm/resources/prices.js +2 -2
- package/lib/esm/resources/return_line_items.js +2 -2
- package/lib/esm/resources/returns.js +2 -2
- package/lib/esm/resources/satispay_gateways.js +2 -2
- package/lib/esm/resources/satispay_payments.js +2 -2
- package/lib/esm/resources/shipments.js +1 -1
- package/lib/esm/resources/shipping_categories.js +2 -2
- package/lib/esm/resources/shipping_methods.js +2 -2
- package/lib/esm/resources/shipping_weight_tiers.js +2 -2
- package/lib/esm/resources/shipping_zones.js +2 -2
- package/lib/esm/resources/sku_list_items.js +2 -2
- package/lib/esm/resources/sku_list_promotion_rules.js +2 -2
- package/lib/esm/resources/sku_lists.js +2 -2
- package/lib/esm/resources/sku_options.js +2 -2
- package/lib/esm/resources/skus.js +2 -2
- package/lib/esm/resources/stock_items.js +2 -2
- package/lib/esm/resources/stock_locations.js +2 -2
- package/lib/esm/resources/stock_transfers.js +2 -2
- package/lib/esm/resources/stripe_gateways.js +2 -2
- package/lib/esm/resources/stripe_payments.js +2 -2
- package/lib/esm/resources/tax_categories.js +2 -2
- package/lib/esm/resources/tax_rules.js +2 -2
- package/lib/esm/resources/taxjar_accounts.js +2 -2
- package/lib/esm/resources/webhooks.js +2 -2
- package/lib/esm/resources/wire_transfers.js +2 -2
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
@@ -5,10 +5,10 @@ class PercentageDiscountPromotions extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: PercentageDiscountPromotions.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: PercentageDiscountPromotions.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: PercentageDiscountPromotions.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: PercentageDiscountPromotions.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class PriceLists extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: PriceLists.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: PriceLists.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: PriceLists.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: PriceLists.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class PriceVolumeTiers extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: PriceVolumeTiers.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: PriceVolumeTiers.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: PriceVolumeTiers.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: PriceVolumeTiers.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class Prices extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: Prices.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: Prices.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: Prices.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: Prices.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class ReturnLineItems extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: ReturnLineItems.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: ReturnLineItems.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: ReturnLineItems.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: ReturnLineItems.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class Returns extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: Returns.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: Returns.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: Returns.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: Returns.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class SatispayGateways extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: SatispayGateways.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: SatispayGateways.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: SatispayGateways.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: SatispayGateways.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class SatispayPayments extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: SatispayPayments.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: SatispayPayments.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: SatispayPayments.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: SatispayPayments.TYPE } : id, options);
|
@@ -5,7 +5,7 @@ class Shipments extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: Shipments.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async update(resource, params, options) {
|
8
|
-
return this.resources.update(
|
8
|
+
return this.resources.update({ ...resource, type: Shipments.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async order(shipmentId, params, options) {
|
11
11
|
const _shipmentId = shipmentId.id || shipmentId;
|
@@ -5,10 +5,10 @@ class ShippingCategories extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: ShippingCategories.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: ShippingCategories.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: ShippingCategories.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: ShippingCategories.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class ShippingMethods extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: ShippingMethods.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: ShippingMethods.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: ShippingMethods.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: ShippingMethods.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class ShippingWeightTiers extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: ShippingWeightTiers.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: ShippingWeightTiers.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: ShippingWeightTiers.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: ShippingWeightTiers.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class ShippingZones extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: ShippingZones.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: ShippingZones.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: ShippingZones.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: ShippingZones.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class SkuListItems extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: SkuListItems.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: SkuListItems.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: SkuListItems.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: SkuListItems.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class SkuListPromotionRules extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: SkuListPromotionRules.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: SkuListPromotionRules.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: SkuListPromotionRules.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: SkuListPromotionRules.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class SkuLists extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: SkuLists.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: SkuLists.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: SkuLists.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: SkuLists.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class SkuOptions extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: SkuOptions.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: SkuOptions.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: SkuOptions.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: SkuOptions.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class Skus extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: Skus.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: Skus.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: Skus.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: Skus.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class StockItems extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: StockItems.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: StockItems.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: StockItems.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: StockItems.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class StockLocations extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: StockLocations.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: StockLocations.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: StockLocations.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: StockLocations.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class StockTransfers extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: StockTransfers.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: StockTransfers.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: StockTransfers.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: StockTransfers.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class StripeGateways extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: StripeGateways.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: StripeGateways.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: StripeGateways.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: StripeGateways.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class StripePayments extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: StripePayments.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: StripePayments.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: StripePayments.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: StripePayments.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class TaxCategories extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: TaxCategories.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: TaxCategories.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: TaxCategories.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: TaxCategories.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class TaxRules extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: TaxRules.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: TaxRules.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: TaxRules.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: TaxRules.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class TaxjarAccounts extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: TaxjarAccounts.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: TaxjarAccounts.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: TaxjarAccounts.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: TaxjarAccounts.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class Webhooks extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: Webhooks.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: Webhooks.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: Webhooks.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: Webhooks.TYPE } : id, options);
|
@@ -5,10 +5,10 @@ class WireTransfers extends ApiResource {
|
|
5
5
|
return this.resources.list({ type: WireTransfers.TYPE }, params, options);
|
6
6
|
}
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
8
|
+
return this.resources.create({ ...resource, type: WireTransfers.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
11
|
+
return this.resources.update({ ...resource, type: WireTransfers.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
14
|
await this.resources.delete((typeof id === 'string') ? { id, type: WireTransfers.TYPE } : id, options);
|