@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
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class SkuListItems extends ApiResource {
|
3
|
-
// static readonly PATH = 'sku_list_items'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: SkuListItems.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: SkuListItems.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: SkuListItems.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: SkuListItems.TYPE } : id, options);
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class SkuListPromotionRules extends ApiResource {
|
3
|
-
// static readonly PATH = 'sku_list_promotion_rules'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: SkuListPromotionRules.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: SkuListPromotionRules.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: SkuListPromotionRules.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: SkuListPromotionRules.TYPE } : id, options);
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class SkuLists extends ApiResource {
|
3
|
-
// static readonly PATH = 'sku_lists'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: SkuLists.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: SkuLists.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: SkuLists.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: SkuLists.TYPE } : id, options);
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class SkuOptions extends ApiResource {
|
3
|
-
// static readonly PATH = 'sku_options'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: SkuOptions.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: SkuOptions.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: SkuOptions.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: SkuOptions.TYPE } : id, options);
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Skus extends ApiResource {
|
3
|
-
// static readonly PATH = 'skus'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: Skus.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: Skus.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: Skus.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: Skus.TYPE } : id, options);
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class StockItems extends ApiResource {
|
3
|
-
// static readonly PATH = 'stock_items'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: StockItems.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: StockItems.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: StockItems.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: StockItems.TYPE } : id, options);
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class StockLocations extends ApiResource {
|
3
|
-
// static readonly PATH = 'stock_locations'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: StockLocations.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: StockLocations.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: StockLocations.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: StockLocations.TYPE } : id, options);
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class StockTransfers extends ApiResource {
|
3
|
-
// static readonly PATH = 'stock_transfers'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: StockTransfers.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: StockTransfers.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: StockTransfers.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: StockTransfers.TYPE } : id, options);
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class StripeGateways extends ApiResource {
|
3
|
-
// static readonly PATH = 'stripe_gateways'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: StripeGateways.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: StripeGateways.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: StripeGateways.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: StripeGateways.TYPE } : id, options);
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class StripePayments extends ApiResource {
|
3
|
-
// static readonly PATH = 'stripe_payments'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: StripePayments.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: StripePayments.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: StripePayments.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: StripePayments.TYPE } : id, options);
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class TaxCategories extends ApiResource {
|
3
|
-
// static readonly PATH = 'tax_categories'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: TaxCategories.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: TaxCategories.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: TaxCategories.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: TaxCategories.TYPE } : id, options);
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class TaxRules extends ApiResource {
|
3
|
-
// static readonly PATH = 'tax_rules'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: TaxRules.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: TaxRules.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: TaxRules.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: TaxRules.TYPE } : id, options);
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class TaxjarAccounts extends ApiResource {
|
3
|
-
// static readonly PATH = 'taxjar_accounts'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: TaxjarAccounts.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: TaxjarAccounts.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: TaxjarAccounts.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: TaxjarAccounts.TYPE } : id, options);
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Webhooks extends ApiResource {
|
3
|
-
// static readonly PATH = 'webhooks'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: Webhooks.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: Webhooks.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: Webhooks.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: Webhooks.TYPE } : id, options);
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class WireTransfers extends ApiResource {
|
3
|
-
// static readonly PATH = 'wire_transfers'
|
4
3
|
async list(params, options) {
|
5
4
|
return this.resources.list({ type: WireTransfers.TYPE }, params, options);
|
6
5
|
}
|
7
6
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create(
|
7
|
+
return this.resources.create({ ...resource, type: WireTransfers.TYPE }, params, options);
|
9
8
|
}
|
10
9
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update(
|
10
|
+
return this.resources.update({ ...resource, type: WireTransfers.TYPE }, params, options);
|
12
11
|
}
|
13
12
|
async delete(id, options) {
|
14
13
|
await this.resources.delete((typeof id === 'string') ? { id, type: WireTransfers.TYPE } : id, options);
|