@commercelayer/sdk 7.0.0-beta.17 → 7.0.0-beta.19
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/api.cjs +0 -1
- package/lib/api.js +0 -1
- package/lib/client.cjs +45 -54
- package/lib/client.js +45 -54
- package/lib/commercelayer.cjs +11 -13
- package/lib/commercelayer.js +11 -13
- package/lib/common.cjs +0 -1
- package/lib/common.js +0 -1
- package/lib/config.cjs +0 -2
- package/lib/config.js +0 -2
- package/lib/debug.cjs +0 -2
- package/lib/debug.js +0 -2
- package/lib/enum.cjs +0 -2
- package/lib/enum.js +0 -2
- package/lib/error.cjs +19 -22
- package/lib/error.js +19 -22
- package/lib/fetch.cjs +17 -24
- package/lib/fetch.js +17 -24
- package/lib/index.cjs +0 -1
- package/lib/index.d.cts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +0 -1
- package/lib/jsonapi.cjs +0 -1
- package/lib/jsonapi.js +0 -1
- package/lib/query.cjs +0 -1
- package/lib/query.js +0 -1
- package/lib/resource.cjs +21 -26
- package/lib/resource.js +21 -26
- package/lib/resources/addresses.cjs +10 -12
- package/lib/resources/addresses.js +10 -12
- package/lib/resources/adjustments.cjs +8 -10
- package/lib/resources/adjustments.js +8 -10
- package/lib/resources/adyen_gateways.cjs +8 -10
- package/lib/resources/adyen_gateways.js +8 -10
- package/lib/resources/adyen_payments.cjs +10 -12
- package/lib/resources/adyen_payments.js +10 -12
- package/lib/resources/applications.cjs +5 -7
- package/lib/resources/applications.js +5 -7
- package/lib/resources/attachments.cjs +8 -10
- package/lib/resources/attachments.js +8 -10
- package/lib/resources/authorizations.cjs +11 -13
- package/lib/resources/authorizations.js +11 -13
- package/lib/resources/avalara_accounts.cjs +8 -10
- package/lib/resources/avalara_accounts.js +8 -10
- package/lib/resources/axerve_gateways.cjs +8 -10
- package/lib/resources/axerve_gateways.js +8 -10
- package/lib/resources/axerve_payments.cjs +9 -11
- package/lib/resources/axerve_payments.js +9 -11
- package/lib/resources/bing_geocoders.cjs +8 -10
- package/lib/resources/bing_geocoders.js +8 -10
- package/lib/resources/braintree_gateways.cjs +8 -10
- package/lib/resources/braintree_gateways.js +8 -10
- package/lib/resources/braintree_payments.cjs +8 -10
- package/lib/resources/braintree_payments.js +8 -10
- package/lib/resources/bundles.cjs +12 -14
- package/lib/resources/bundles.js +12 -14
- package/lib/resources/buy_x_pay_y_promotions.cjs +12 -14
- package/lib/resources/buy_x_pay_y_promotions.js +12 -14
- package/lib/resources/captures.cjs +10 -12
- package/lib/resources/captures.js +10 -12
- package/lib/resources/carrier_accounts.cjs +8 -10
- package/lib/resources/carrier_accounts.js +8 -10
- package/lib/resources/checkout_com_gateways.cjs +8 -10
- package/lib/resources/checkout_com_gateways.js +8 -10
- package/lib/resources/checkout_com_payments.cjs +10 -12
- package/lib/resources/checkout_com_payments.js +10 -12
- package/lib/resources/cleanups.cjs +9 -11
- package/lib/resources/cleanups.js +9 -11
- package/lib/resources/coupon_codes_promotion_rules.cjs +8 -10
- package/lib/resources/coupon_codes_promotion_rules.js +8 -10
- package/lib/resources/coupon_recipients.cjs +8 -10
- package/lib/resources/coupon_recipients.js +8 -10
- package/lib/resources/coupons.cjs +10 -12
- package/lib/resources/coupons.js +10 -12
- package/lib/resources/custom_promotion_rules.cjs +8 -10
- package/lib/resources/custom_promotion_rules.js +8 -10
- package/lib/resources/customer_addresses.cjs +8 -10
- package/lib/resources/customer_addresses.js +8 -10
- package/lib/resources/customer_groups.cjs +8 -10
- package/lib/resources/customer_groups.js +8 -10
- package/lib/resources/customer_password_resets.cjs +9 -11
- package/lib/resources/customer_password_resets.js +9 -11
- package/lib/resources/customer_payment_sources.cjs +8 -10
- package/lib/resources/customer_payment_sources.js +8 -10
- package/lib/resources/customer_subscriptions.cjs +8 -10
- package/lib/resources/customer_subscriptions.js +8 -10
- package/lib/resources/customers.cjs +10 -12
- package/lib/resources/customers.js +10 -12
- package/lib/resources/delivery_lead_times.cjs +8 -10
- package/lib/resources/delivery_lead_times.js +8 -10
- package/lib/resources/discount_engine_items.cjs +5 -7
- package/lib/resources/discount_engine_items.js +5 -7
- package/lib/resources/discount_engines.cjs +5 -7
- package/lib/resources/discount_engines.js +5 -7
- package/lib/resources/easypost_pickups.cjs +9 -11
- package/lib/resources/easypost_pickups.js +9 -11
- package/lib/resources/event_callbacks.cjs +5 -7
- package/lib/resources/event_callbacks.js +5 -7
- package/lib/resources/events.cjs +7 -9
- package/lib/resources/events.js +7 -9
- package/lib/resources/exports.cjs +9 -11
- package/lib/resources/exports.js +9 -11
- package/lib/resources/external_gateways.cjs +9 -11
- package/lib/resources/external_gateways.js +9 -11
- package/lib/resources/external_payments.cjs +8 -10
- package/lib/resources/external_payments.js +8 -10
- package/lib/resources/external_promotions.cjs +13 -15
- package/lib/resources/external_promotions.js +13 -15
- package/lib/resources/external_tax_calculators.cjs +9 -11
- package/lib/resources/external_tax_calculators.js +9 -11
- package/lib/resources/fixed_amount_promotions.cjs +12 -14
- package/lib/resources/fixed_amount_promotions.js +12 -14
- package/lib/resources/fixed_price_promotions.cjs +12 -14
- package/lib/resources/fixed_price_promotions.js +12 -14
- package/lib/resources/flex_promotions.cjs +12 -14
- package/lib/resources/flex_promotions.js +12 -14
- package/lib/resources/free_gift_promotions.cjs +12 -14
- package/lib/resources/free_gift_promotions.js +12 -14
- package/lib/resources/free_shipping_promotions.cjs +12 -14
- package/lib/resources/free_shipping_promotions.js +12 -14
- package/lib/resources/geocoders.cjs +5 -7
- package/lib/resources/geocoders.js +5 -7
- package/lib/resources/gift_card_recipients.cjs +8 -10
- package/lib/resources/gift_card_recipients.js +8 -10
- package/lib/resources/gift_cards.cjs +14 -16
- package/lib/resources/gift_cards.js +14 -16
- package/lib/resources/google_geocoders.cjs +8 -10
- package/lib/resources/google_geocoders.js +8 -10
- package/lib/resources/imports.cjs +9 -11
- package/lib/resources/imports.js +9 -11
- package/lib/resources/in_stock_subscriptions.cjs +10 -12
- package/lib/resources/in_stock_subscriptions.js +10 -12
- package/lib/resources/inventory_models.cjs +8 -10
- package/lib/resources/inventory_models.js +8 -10
- package/lib/resources/inventory_return_locations.cjs +8 -10
- package/lib/resources/inventory_return_locations.js +8 -10
- package/lib/resources/inventory_stock_locations.cjs +8 -10
- package/lib/resources/inventory_stock_locations.js +8 -10
- package/lib/resources/klarna_gateways.cjs +8 -10
- package/lib/resources/klarna_gateways.js +8 -10
- package/lib/resources/klarna_payments.cjs +9 -11
- package/lib/resources/klarna_payments.js +9 -11
- package/lib/resources/line_item_options.cjs +10 -12
- package/lib/resources/line_item_options.js +10 -12
- package/lib/resources/line_items.cjs +13 -15
- package/lib/resources/line_items.js +13 -15
- package/lib/resources/links.cjs +10 -12
- package/lib/resources/links.js +10 -12
- package/lib/resources/manual_gateways.cjs +8 -10
- package/lib/resources/manual_gateways.js +8 -10
- package/lib/resources/manual_tax_calculators.cjs +8 -10
- package/lib/resources/manual_tax_calculators.js +8 -10
- package/lib/resources/markets.cjs +10 -12
- package/lib/resources/markets.js +10 -12
- package/lib/resources/merchants.cjs +8 -10
- package/lib/resources/merchants.js +8 -10
- package/lib/resources/notifications.cjs +8 -10
- package/lib/resources/notifications.js +8 -10
- package/lib/resources/order_amount_promotion_rules.cjs +8 -10
- package/lib/resources/order_amount_promotion_rules.js +8 -10
- package/lib/resources/order_copies.cjs +8 -10
- package/lib/resources/order_copies.js +8 -10
- package/lib/resources/order_factories.cjs +5 -7
- package/lib/resources/order_factories.js +5 -7
- package/lib/resources/order_subscription_items.cjs +8 -10
- package/lib/resources/order_subscription_items.js +8 -10
- package/lib/resources/order_subscriptions.cjs +14 -16
- package/lib/resources/order_subscriptions.js +14 -16
- package/lib/resources/orders.cjs +41 -43
- package/lib/resources/orders.js +41 -43
- package/lib/resources/organizations.cjs +5 -7
- package/lib/resources/organizations.js +5 -7
- package/lib/resources/packages.cjs +8 -10
- package/lib/resources/packages.js +8 -10
- package/lib/resources/parcel_line_items.cjs +8 -10
- package/lib/resources/parcel_line_items.js +8 -10
- package/lib/resources/parcels.cjs +8 -10
- package/lib/resources/parcels.js +8 -10
- package/lib/resources/payment_gateways.cjs +5 -7
- package/lib/resources/payment_gateways.js +5 -7
- package/lib/resources/payment_methods.cjs +10 -12
- package/lib/resources/payment_methods.js +10 -12
- package/lib/resources/payment_options.cjs +8 -10
- package/lib/resources/payment_options.js +8 -10
- package/lib/resources/paypal_gateways.cjs +8 -10
- package/lib/resources/paypal_gateways.js +8 -10
- package/lib/resources/paypal_payments.cjs +8 -10
- package/lib/resources/paypal_payments.js +8 -10
- package/lib/resources/percentage_discount_promotions.cjs +12 -14
- package/lib/resources/percentage_discount_promotions.js +12 -14
- package/lib/resources/pickups.cjs +5 -7
- package/lib/resources/pickups.js +5 -7
- package/lib/resources/price_frequency_tiers.cjs +8 -10
- package/lib/resources/price_frequency_tiers.js +8 -10
- package/lib/resources/price_list_schedulers.cjs +10 -12
- package/lib/resources/price_list_schedulers.js +10 -12
- package/lib/resources/price_lists.cjs +8 -10
- package/lib/resources/price_lists.js +8 -10
- package/lib/resources/price_tiers.cjs +5 -7
- package/lib/resources/price_tiers.js +5 -7
- package/lib/resources/price_volume_tiers.cjs +8 -10
- package/lib/resources/price_volume_tiers.js +8 -10
- package/lib/resources/prices.cjs +8 -10
- package/lib/resources/prices.js +8 -10
- package/lib/resources/promotion_rules.cjs +5 -7
- package/lib/resources/promotion_rules.js +5 -7
- package/lib/resources/promotions.cjs +5 -7
- package/lib/resources/promotions.js +5 -7
- package/lib/resources/recurring_order_copies.cjs +8 -10
- package/lib/resources/recurring_order_copies.js +8 -10
- package/lib/resources/refunds.cjs +7 -9
- package/lib/resources/refunds.js +7 -9
- package/lib/resources/reserved_stocks.cjs +5 -7
- package/lib/resources/reserved_stocks.js +5 -7
- package/lib/resources/resource_errors.cjs +5 -7
- package/lib/resources/resource_errors.js +5 -7
- package/lib/resources/return_line_items.cjs +9 -11
- package/lib/resources/return_line_items.js +9 -11
- package/lib/resources/returns.cjs +21 -23
- package/lib/resources/returns.js +21 -23
- package/lib/resources/satispay_gateways.cjs +8 -10
- package/lib/resources/satispay_gateways.js +8 -10
- package/lib/resources/satispay_payments.cjs +9 -11
- package/lib/resources/satispay_payments.js +9 -11
- package/lib/resources/shipments.cjs +23 -25
- package/lib/resources/shipments.js +23 -25
- package/lib/resources/shipping_categories.cjs +8 -10
- package/lib/resources/shipping_categories.js +8 -10
- package/lib/resources/shipping_method_tiers.cjs +5 -7
- package/lib/resources/shipping_method_tiers.js +5 -7
- package/lib/resources/shipping_methods.cjs +11 -13
- package/lib/resources/shipping_methods.js +11 -13
- package/lib/resources/shipping_weight_tiers.cjs +8 -10
- package/lib/resources/shipping_weight_tiers.js +8 -10
- package/lib/resources/shipping_zones.cjs +8 -10
- package/lib/resources/shipping_zones.js +8 -10
- package/lib/resources/sku_list_items.cjs +8 -10
- package/lib/resources/sku_list_items.js +8 -10
- package/lib/resources/sku_list_promotion_rules.cjs +8 -10
- package/lib/resources/sku_list_promotion_rules.js +8 -10
- package/lib/resources/sku_lists.cjs +8 -10
- package/lib/resources/sku_lists.js +8 -10
- package/lib/resources/sku_options.cjs +10 -12
- package/lib/resources/sku_options.js +10 -12
- package/lib/resources/skus.cjs +10 -12
- package/lib/resources/skus.js +10 -12
- package/lib/resources/stock_items.cjs +9 -11
- package/lib/resources/stock_items.js +9 -11
- package/lib/resources/stock_line_items.cjs +11 -13
- package/lib/resources/stock_line_items.js +11 -13
- package/lib/resources/stock_locations.cjs +8 -10
- package/lib/resources/stock_locations.js +8 -10
- package/lib/resources/stock_reservations.cjs +9 -11
- package/lib/resources/stock_reservations.js +9 -11
- package/lib/resources/stock_transfers.cjs +14 -16
- package/lib/resources/stock_transfers.js +14 -16
- package/lib/resources/stores.cjs +8 -10
- package/lib/resources/stores.js +8 -10
- package/lib/resources/stripe_gateways.cjs +8 -10
- package/lib/resources/stripe_gateways.js +8 -10
- package/lib/resources/stripe_payments.cjs +10 -12
- package/lib/resources/stripe_payments.js +10 -12
- package/lib/resources/stripe_tax_accounts.cjs +8 -10
- package/lib/resources/stripe_tax_accounts.js +8 -10
- package/lib/resources/subscription_models.cjs +8 -10
- package/lib/resources/subscription_models.js +8 -10
- package/lib/resources/tags.cjs +8 -10
- package/lib/resources/tags.js +8 -10
- package/lib/resources/talon_one_accounts.cjs +8 -10
- package/lib/resources/talon_one_accounts.js +8 -10
- package/lib/resources/tax_calculators.cjs +5 -7
- package/lib/resources/tax_calculators.js +5 -7
- package/lib/resources/tax_categories.cjs +8 -10
- package/lib/resources/tax_categories.js +8 -10
- package/lib/resources/tax_rules.cjs +8 -10
- package/lib/resources/tax_rules.js +8 -10
- package/lib/resources/taxjar_accounts.cjs +8 -10
- package/lib/resources/taxjar_accounts.js +8 -10
- package/lib/resources/transactions.cjs +5 -7
- package/lib/resources/transactions.js +5 -7
- package/lib/resources/versions.cjs +5 -7
- package/lib/resources/versions.js +5 -7
- package/lib/resources/vertex_accounts.cjs +9 -11
- package/lib/resources/vertex_accounts.js +9 -11
- package/lib/resources/voids.cjs +7 -9
- package/lib/resources/voids.js +7 -9
- package/lib/resources/webhooks.cjs +11 -13
- package/lib/resources/webhooks.js +11 -13
- package/lib/resources/wire_transfers.cjs +8 -10
- package/lib/resources/wire_transfers.js +8 -10
- package/lib/static.cjs +0 -1
- package/lib/static.js +0 -1
- package/lib/util.cjs +0 -2
- package/lib/util.js +0 -2
- package/package.json +4 -4
- package/lib/chunk-AQ5VUG5P.js +0 -12
- package/lib/chunk-JE77HYXB.cjs +0 -17
@@ -1,15 +1,15 @@
|
|
1
|
-
import { __publicField } from '../chunk-AQ5VUG5P.js';
|
2
1
|
import { ApiResource } from '../resource';
|
3
2
|
|
4
|
-
|
3
|
+
class StockReservations extends ApiResource {
|
4
|
+
static TYPE = "stock_reservations";
|
5
5
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type:
|
6
|
+
return this.resources.create({ ...resource, type: StockReservations.TYPE }, params, options);
|
7
7
|
}
|
8
8
|
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type:
|
9
|
+
return this.resources.update({ ...resource, type: StockReservations.TYPE }, params, options);
|
10
10
|
}
|
11
11
|
async delete(id, options) {
|
12
|
-
await this.resources.delete(typeof id === "string" ? { id, type:
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: StockReservations.TYPE } : id, options);
|
13
13
|
}
|
14
14
|
async line_item(stockReservationId, params, options) {
|
15
15
|
const _stockReservationId = stockReservationId.id || stockReservationId;
|
@@ -40,10 +40,10 @@ const _StockReservations = class _StockReservations extends ApiResource {
|
|
40
40
|
return this.resources.fetch({ type: "skus" }, `stock_reservations/${_stockReservationId}/sku`, params, options);
|
41
41
|
}
|
42
42
|
async _pending(id, params, options) {
|
43
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
43
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockReservations.TYPE, _pending: true }, params, options);
|
44
44
|
}
|
45
45
|
isStockReservation(resource) {
|
46
|
-
return resource.type && resource.type ===
|
46
|
+
return resource.type && resource.type === StockReservations.TYPE;
|
47
47
|
}
|
48
48
|
relationship(id) {
|
49
49
|
return super.relationshipOneToOne(id);
|
@@ -52,11 +52,9 @@ const _StockReservations = class _StockReservations extends ApiResource {
|
|
52
52
|
return super.relationshipOneToMany(...ids);
|
53
53
|
}
|
54
54
|
type() {
|
55
|
-
return
|
55
|
+
return StockReservations.TYPE;
|
56
56
|
}
|
57
|
-
}
|
58
|
-
__publicField(_StockReservations, "TYPE", "stock_reservations");
|
59
|
-
let StockReservations = _StockReservations;
|
57
|
+
}
|
60
58
|
const instance = new StockReservations();
|
61
59
|
var stock_reservations_default = instance;
|
62
60
|
|
@@ -1,17 +1,17 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var chunkJE77HYXB_cjs = require('../chunk-JE77HYXB.cjs');
|
4
3
|
var resource = require('../resource');
|
5
4
|
|
6
|
-
|
5
|
+
class StockTransfers extends resource.ApiResource {
|
6
|
+
static TYPE = "stock_transfers";
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create({ ...resource, type:
|
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({ ...resource, type:
|
11
|
+
return this.resources.update({ ...resource, type: StockTransfers.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
|
-
await this.resources.delete(typeof id === "string" ? { id, type:
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: StockTransfers.TYPE } : id, options);
|
15
15
|
}
|
16
16
|
async sku(stockTransferId, params, options) {
|
17
17
|
const _stockTransferId = stockTransferId.id || stockTransferId;
|
@@ -50,25 +50,25 @@ const _StockTransfers = class _StockTransfers extends resource.ApiResource {
|
|
50
50
|
return this.resources.fetch({ type: "versions" }, `stock_transfers/${_stockTransferId}/versions`, params, options);
|
51
51
|
}
|
52
52
|
async _upcoming(id, params, options) {
|
53
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
53
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _upcoming: true }, params, options);
|
54
54
|
}
|
55
55
|
async _on_hold(id, params, options) {
|
56
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
56
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _on_hold: true }, params, options);
|
57
57
|
}
|
58
58
|
async _picking(id, params, options) {
|
59
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
59
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _picking: true }, params, options);
|
60
60
|
}
|
61
61
|
async _in_transit(id, params, options) {
|
62
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
62
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _in_transit: true }, params, options);
|
63
63
|
}
|
64
64
|
async _complete(id, params, options) {
|
65
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
65
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _complete: true }, params, options);
|
66
66
|
}
|
67
67
|
async _cancel(id, params, options) {
|
68
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
68
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _cancel: true }, params, options);
|
69
69
|
}
|
70
70
|
isStockTransfer(resource) {
|
71
|
-
return resource.type && resource.type ===
|
71
|
+
return resource.type && resource.type === StockTransfers.TYPE;
|
72
72
|
}
|
73
73
|
relationship(id) {
|
74
74
|
return super.relationshipOneToOne(id);
|
@@ -77,11 +77,9 @@ const _StockTransfers = class _StockTransfers extends resource.ApiResource {
|
|
77
77
|
return super.relationshipOneToMany(...ids);
|
78
78
|
}
|
79
79
|
type() {
|
80
|
-
return
|
80
|
+
return StockTransfers.TYPE;
|
81
81
|
}
|
82
|
-
}
|
83
|
-
chunkJE77HYXB_cjs.__publicField(_StockTransfers, "TYPE", "stock_transfers");
|
84
|
-
let StockTransfers = _StockTransfers;
|
82
|
+
}
|
85
83
|
const instance = new StockTransfers();
|
86
84
|
var stock_transfers_default = instance;
|
87
85
|
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { __publicField } from '../chunk-AQ5VUG5P.js';
|
2
1
|
import { ApiResource } from '../resource';
|
3
2
|
|
4
|
-
|
3
|
+
class StockTransfers extends ApiResource {
|
4
|
+
static TYPE = "stock_transfers";
|
5
5
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type:
|
6
|
+
return this.resources.create({ ...resource, type: StockTransfers.TYPE }, params, options);
|
7
7
|
}
|
8
8
|
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type:
|
9
|
+
return this.resources.update({ ...resource, type: StockTransfers.TYPE }, params, options);
|
10
10
|
}
|
11
11
|
async delete(id, options) {
|
12
|
-
await this.resources.delete(typeof id === "string" ? { id, type:
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: StockTransfers.TYPE } : id, options);
|
13
13
|
}
|
14
14
|
async sku(stockTransferId, params, options) {
|
15
15
|
const _stockTransferId = stockTransferId.id || stockTransferId;
|
@@ -48,25 +48,25 @@ const _StockTransfers = class _StockTransfers extends ApiResource {
|
|
48
48
|
return this.resources.fetch({ type: "versions" }, `stock_transfers/${_stockTransferId}/versions`, params, options);
|
49
49
|
}
|
50
50
|
async _upcoming(id, params, options) {
|
51
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
51
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _upcoming: true }, params, options);
|
52
52
|
}
|
53
53
|
async _on_hold(id, params, options) {
|
54
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
54
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _on_hold: true }, params, options);
|
55
55
|
}
|
56
56
|
async _picking(id, params, options) {
|
57
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
57
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _picking: true }, params, options);
|
58
58
|
}
|
59
59
|
async _in_transit(id, params, options) {
|
60
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
60
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _in_transit: true }, params, options);
|
61
61
|
}
|
62
62
|
async _complete(id, params, options) {
|
63
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
63
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _complete: true }, params, options);
|
64
64
|
}
|
65
65
|
async _cancel(id, params, options) {
|
66
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
66
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _cancel: true }, params, options);
|
67
67
|
}
|
68
68
|
isStockTransfer(resource) {
|
69
|
-
return resource.type && resource.type ===
|
69
|
+
return resource.type && resource.type === StockTransfers.TYPE;
|
70
70
|
}
|
71
71
|
relationship(id) {
|
72
72
|
return super.relationshipOneToOne(id);
|
@@ -75,11 +75,9 @@ const _StockTransfers = class _StockTransfers extends ApiResource {
|
|
75
75
|
return super.relationshipOneToMany(...ids);
|
76
76
|
}
|
77
77
|
type() {
|
78
|
-
return
|
78
|
+
return StockTransfers.TYPE;
|
79
79
|
}
|
80
|
-
}
|
81
|
-
__publicField(_StockTransfers, "TYPE", "stock_transfers");
|
82
|
-
let StockTransfers = _StockTransfers;
|
80
|
+
}
|
83
81
|
const instance = new StockTransfers();
|
84
82
|
var stock_transfers_default = instance;
|
85
83
|
|
package/lib/resources/stores.cjs
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var chunkJE77HYXB_cjs = require('../chunk-JE77HYXB.cjs');
|
4
3
|
var resource = require('../resource');
|
5
4
|
|
6
|
-
|
5
|
+
class Stores extends resource.ApiResource {
|
6
|
+
static TYPE = "stores";
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create({ ...resource, type:
|
8
|
+
return this.resources.create({ ...resource, type: Stores.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update({ ...resource, type:
|
11
|
+
return this.resources.update({ ...resource, type: Stores.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
|
-
await this.resources.delete(typeof id === "string" ? { id, type:
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: Stores.TYPE } : id, options);
|
15
15
|
}
|
16
16
|
async market(storeId, params, options) {
|
17
17
|
const _storeId = storeId.id || storeId;
|
@@ -42,7 +42,7 @@ const _Stores = class _Stores extends resource.ApiResource {
|
|
42
42
|
return this.resources.fetch({ type: "versions" }, `stores/${_storeId}/versions`, params, options);
|
43
43
|
}
|
44
44
|
isStore(resource) {
|
45
|
-
return resource.type && resource.type ===
|
45
|
+
return resource.type && resource.type === Stores.TYPE;
|
46
46
|
}
|
47
47
|
relationship(id) {
|
48
48
|
return super.relationshipOneToOne(id);
|
@@ -51,11 +51,9 @@ const _Stores = class _Stores extends resource.ApiResource {
|
|
51
51
|
return super.relationshipOneToMany(...ids);
|
52
52
|
}
|
53
53
|
type() {
|
54
|
-
return
|
54
|
+
return Stores.TYPE;
|
55
55
|
}
|
56
|
-
}
|
57
|
-
chunkJE77HYXB_cjs.__publicField(_Stores, "TYPE", "stores");
|
58
|
-
let Stores = _Stores;
|
56
|
+
}
|
59
57
|
const instance = new Stores();
|
60
58
|
var stores_default = instance;
|
61
59
|
|
package/lib/resources/stores.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
import { __publicField } from '../chunk-AQ5VUG5P.js';
|
2
1
|
import { ApiResource } from '../resource';
|
3
2
|
|
4
|
-
|
3
|
+
class Stores extends ApiResource {
|
4
|
+
static TYPE = "stores";
|
5
5
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type:
|
6
|
+
return this.resources.create({ ...resource, type: Stores.TYPE }, params, options);
|
7
7
|
}
|
8
8
|
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type:
|
9
|
+
return this.resources.update({ ...resource, type: Stores.TYPE }, params, options);
|
10
10
|
}
|
11
11
|
async delete(id, options) {
|
12
|
-
await this.resources.delete(typeof id === "string" ? { id, type:
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: Stores.TYPE } : id, options);
|
13
13
|
}
|
14
14
|
async market(storeId, params, options) {
|
15
15
|
const _storeId = storeId.id || storeId;
|
@@ -40,7 +40,7 @@ const _Stores = class _Stores extends ApiResource {
|
|
40
40
|
return this.resources.fetch({ type: "versions" }, `stores/${_storeId}/versions`, params, options);
|
41
41
|
}
|
42
42
|
isStore(resource) {
|
43
|
-
return resource.type && resource.type ===
|
43
|
+
return resource.type && resource.type === Stores.TYPE;
|
44
44
|
}
|
45
45
|
relationship(id) {
|
46
46
|
return super.relationshipOneToOne(id);
|
@@ -49,11 +49,9 @@ const _Stores = class _Stores extends ApiResource {
|
|
49
49
|
return super.relationshipOneToMany(...ids);
|
50
50
|
}
|
51
51
|
type() {
|
52
|
-
return
|
52
|
+
return Stores.TYPE;
|
53
53
|
}
|
54
|
-
}
|
55
|
-
__publicField(_Stores, "TYPE", "stores");
|
56
|
-
let Stores = _Stores;
|
54
|
+
}
|
57
55
|
const instance = new Stores();
|
58
56
|
var stores_default = instance;
|
59
57
|
|
@@ -1,17 +1,17 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var chunkJE77HYXB_cjs = require('../chunk-JE77HYXB.cjs');
|
4
3
|
var resource = require('../resource');
|
5
4
|
|
6
|
-
|
5
|
+
class StripeGateways extends resource.ApiResource {
|
6
|
+
static TYPE = "stripe_gateways";
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create({ ...resource, type:
|
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({ ...resource, type:
|
11
|
+
return this.resources.update({ ...resource, type: StripeGateways.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
|
-
await this.resources.delete(typeof id === "string" ? { id, type:
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: StripeGateways.TYPE } : id, options);
|
15
15
|
}
|
16
16
|
async payment_methods(stripeGatewayId, params, options) {
|
17
17
|
const _stripeGatewayId = stripeGatewayId.id || stripeGatewayId;
|
@@ -26,7 +26,7 @@ const _StripeGateways = class _StripeGateways extends resource.ApiResource {
|
|
26
26
|
return this.resources.fetch({ type: "stripe_payments" }, `stripe_gateways/${_stripeGatewayId}/stripe_payments`, params, options);
|
27
27
|
}
|
28
28
|
isStripeGateway(resource) {
|
29
|
-
return resource.type && resource.type ===
|
29
|
+
return resource.type && resource.type === StripeGateways.TYPE;
|
30
30
|
}
|
31
31
|
relationship(id) {
|
32
32
|
return super.relationshipOneToOne(id);
|
@@ -35,11 +35,9 @@ const _StripeGateways = class _StripeGateways extends resource.ApiResource {
|
|
35
35
|
return super.relationshipOneToMany(...ids);
|
36
36
|
}
|
37
37
|
type() {
|
38
|
-
return
|
38
|
+
return StripeGateways.TYPE;
|
39
39
|
}
|
40
|
-
}
|
41
|
-
chunkJE77HYXB_cjs.__publicField(_StripeGateways, "TYPE", "stripe_gateways");
|
42
|
-
let StripeGateways = _StripeGateways;
|
40
|
+
}
|
43
41
|
const instance = new StripeGateways();
|
44
42
|
var stripe_gateways_default = instance;
|
45
43
|
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { __publicField } from '../chunk-AQ5VUG5P.js';
|
2
1
|
import { ApiResource } from '../resource';
|
3
2
|
|
4
|
-
|
3
|
+
class StripeGateways extends ApiResource {
|
4
|
+
static TYPE = "stripe_gateways";
|
5
5
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type:
|
6
|
+
return this.resources.create({ ...resource, type: StripeGateways.TYPE }, params, options);
|
7
7
|
}
|
8
8
|
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type:
|
9
|
+
return this.resources.update({ ...resource, type: StripeGateways.TYPE }, params, options);
|
10
10
|
}
|
11
11
|
async delete(id, options) {
|
12
|
-
await this.resources.delete(typeof id === "string" ? { id, type:
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: StripeGateways.TYPE } : id, options);
|
13
13
|
}
|
14
14
|
async payment_methods(stripeGatewayId, params, options) {
|
15
15
|
const _stripeGatewayId = stripeGatewayId.id || stripeGatewayId;
|
@@ -24,7 +24,7 @@ const _StripeGateways = class _StripeGateways extends ApiResource {
|
|
24
24
|
return this.resources.fetch({ type: "stripe_payments" }, `stripe_gateways/${_stripeGatewayId}/stripe_payments`, params, options);
|
25
25
|
}
|
26
26
|
isStripeGateway(resource) {
|
27
|
-
return resource.type && resource.type ===
|
27
|
+
return resource.type && resource.type === StripeGateways.TYPE;
|
28
28
|
}
|
29
29
|
relationship(id) {
|
30
30
|
return super.relationshipOneToOne(id);
|
@@ -33,11 +33,9 @@ const _StripeGateways = class _StripeGateways extends ApiResource {
|
|
33
33
|
return super.relationshipOneToMany(...ids);
|
34
34
|
}
|
35
35
|
type() {
|
36
|
-
return
|
36
|
+
return StripeGateways.TYPE;
|
37
37
|
}
|
38
|
-
}
|
39
|
-
__publicField(_StripeGateways, "TYPE", "stripe_gateways");
|
40
|
-
let StripeGateways = _StripeGateways;
|
38
|
+
}
|
41
39
|
const instance = new StripeGateways();
|
42
40
|
var stripe_gateways_default = instance;
|
43
41
|
|
@@ -1,17 +1,17 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var chunkJE77HYXB_cjs = require('../chunk-JE77HYXB.cjs');
|
4
3
|
var resource = require('../resource');
|
5
4
|
|
6
|
-
|
5
|
+
class StripePayments extends resource.ApiResource {
|
6
|
+
static TYPE = "stripe_payments";
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create({ ...resource, type:
|
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({ ...resource, type:
|
11
|
+
return this.resources.update({ ...resource, type: StripePayments.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
|
-
await this.resources.delete(typeof id === "string" ? { id, type:
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: StripePayments.TYPE } : id, options);
|
15
15
|
}
|
16
16
|
async order(stripePaymentId, params, options) {
|
17
17
|
const _stripePaymentId = stripePaymentId.id || stripePaymentId;
|
@@ -26,13 +26,13 @@ const _StripePayments = class _StripePayments extends resource.ApiResource {
|
|
26
26
|
return this.resources.fetch({ type: "versions" }, `stripe_payments/${_stripePaymentId}/versions`, params, options);
|
27
27
|
}
|
28
28
|
async _update(id, params, options) {
|
29
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
29
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StripePayments.TYPE, _update: true }, params, options);
|
30
30
|
}
|
31
31
|
async _refresh(id, params, options) {
|
32
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
32
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StripePayments.TYPE, _refresh: true }, params, options);
|
33
33
|
}
|
34
34
|
isStripePayment(resource) {
|
35
|
-
return resource.type && resource.type ===
|
35
|
+
return resource.type && resource.type === StripePayments.TYPE;
|
36
36
|
}
|
37
37
|
relationship(id) {
|
38
38
|
return super.relationshipOneToOne(id);
|
@@ -41,11 +41,9 @@ const _StripePayments = class _StripePayments extends resource.ApiResource {
|
|
41
41
|
return super.relationshipOneToMany(...ids);
|
42
42
|
}
|
43
43
|
type() {
|
44
|
-
return
|
44
|
+
return StripePayments.TYPE;
|
45
45
|
}
|
46
|
-
}
|
47
|
-
chunkJE77HYXB_cjs.__publicField(_StripePayments, "TYPE", "stripe_payments");
|
48
|
-
let StripePayments = _StripePayments;
|
46
|
+
}
|
49
47
|
const instance = new StripePayments();
|
50
48
|
var stripe_payments_default = instance;
|
51
49
|
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { __publicField } from '../chunk-AQ5VUG5P.js';
|
2
1
|
import { ApiResource } from '../resource';
|
3
2
|
|
4
|
-
|
3
|
+
class StripePayments extends ApiResource {
|
4
|
+
static TYPE = "stripe_payments";
|
5
5
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type:
|
6
|
+
return this.resources.create({ ...resource, type: StripePayments.TYPE }, params, options);
|
7
7
|
}
|
8
8
|
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type:
|
9
|
+
return this.resources.update({ ...resource, type: StripePayments.TYPE }, params, options);
|
10
10
|
}
|
11
11
|
async delete(id, options) {
|
12
|
-
await this.resources.delete(typeof id === "string" ? { id, type:
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: StripePayments.TYPE } : id, options);
|
13
13
|
}
|
14
14
|
async order(stripePaymentId, params, options) {
|
15
15
|
const _stripePaymentId = stripePaymentId.id || stripePaymentId;
|
@@ -24,13 +24,13 @@ const _StripePayments = class _StripePayments extends ApiResource {
|
|
24
24
|
return this.resources.fetch({ type: "versions" }, `stripe_payments/${_stripePaymentId}/versions`, params, options);
|
25
25
|
}
|
26
26
|
async _update(id, params, options) {
|
27
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
27
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StripePayments.TYPE, _update: true }, params, options);
|
28
28
|
}
|
29
29
|
async _refresh(id, params, options) {
|
30
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
30
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StripePayments.TYPE, _refresh: true }, params, options);
|
31
31
|
}
|
32
32
|
isStripePayment(resource) {
|
33
|
-
return resource.type && resource.type ===
|
33
|
+
return resource.type && resource.type === StripePayments.TYPE;
|
34
34
|
}
|
35
35
|
relationship(id) {
|
36
36
|
return super.relationshipOneToOne(id);
|
@@ -39,11 +39,9 @@ const _StripePayments = class _StripePayments extends ApiResource {
|
|
39
39
|
return super.relationshipOneToMany(...ids);
|
40
40
|
}
|
41
41
|
type() {
|
42
|
-
return
|
42
|
+
return StripePayments.TYPE;
|
43
43
|
}
|
44
|
-
}
|
45
|
-
__publicField(_StripePayments, "TYPE", "stripe_payments");
|
46
|
-
let StripePayments = _StripePayments;
|
44
|
+
}
|
47
45
|
const instance = new StripePayments();
|
48
46
|
var stripe_payments_default = instance;
|
49
47
|
|
@@ -1,17 +1,17 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var chunkJE77HYXB_cjs = require('../chunk-JE77HYXB.cjs');
|
4
3
|
var resource = require('../resource');
|
5
4
|
|
6
|
-
|
5
|
+
class StripeTaxAccounts extends resource.ApiResource {
|
6
|
+
static TYPE = "stripe_tax_accounts";
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create({ ...resource, type:
|
8
|
+
return this.resources.create({ ...resource, type: StripeTaxAccounts.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update({ ...resource, type:
|
11
|
+
return this.resources.update({ ...resource, type: StripeTaxAccounts.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
|
-
await this.resources.delete(typeof id === "string" ? { id, type:
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: StripeTaxAccounts.TYPE } : id, options);
|
15
15
|
}
|
16
16
|
async markets(stripeTaxAccountId, params, options) {
|
17
17
|
const _stripeTaxAccountId = stripeTaxAccountId.id || stripeTaxAccountId;
|
@@ -34,7 +34,7 @@ const _StripeTaxAccounts = class _StripeTaxAccounts extends resource.ApiResource
|
|
34
34
|
return this.resources.fetch({ type: "tax_categories" }, `stripe_tax_accounts/${_stripeTaxAccountId}/tax_categories`, params, options);
|
35
35
|
}
|
36
36
|
isStripeTaxAccount(resource) {
|
37
|
-
return resource.type && resource.type ===
|
37
|
+
return resource.type && resource.type === StripeTaxAccounts.TYPE;
|
38
38
|
}
|
39
39
|
relationship(id) {
|
40
40
|
return super.relationshipOneToOne(id);
|
@@ -43,11 +43,9 @@ const _StripeTaxAccounts = class _StripeTaxAccounts extends resource.ApiResource
|
|
43
43
|
return super.relationshipOneToMany(...ids);
|
44
44
|
}
|
45
45
|
type() {
|
46
|
-
return
|
46
|
+
return StripeTaxAccounts.TYPE;
|
47
47
|
}
|
48
|
-
}
|
49
|
-
chunkJE77HYXB_cjs.__publicField(_StripeTaxAccounts, "TYPE", "stripe_tax_accounts");
|
50
|
-
let StripeTaxAccounts = _StripeTaxAccounts;
|
48
|
+
}
|
51
49
|
const instance = new StripeTaxAccounts();
|
52
50
|
var stripe_tax_accounts_default = instance;
|
53
51
|
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { __publicField } from '../chunk-AQ5VUG5P.js';
|
2
1
|
import { ApiResource } from '../resource';
|
3
2
|
|
4
|
-
|
3
|
+
class StripeTaxAccounts extends ApiResource {
|
4
|
+
static TYPE = "stripe_tax_accounts";
|
5
5
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type:
|
6
|
+
return this.resources.create({ ...resource, type: StripeTaxAccounts.TYPE }, params, options);
|
7
7
|
}
|
8
8
|
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type:
|
9
|
+
return this.resources.update({ ...resource, type: StripeTaxAccounts.TYPE }, params, options);
|
10
10
|
}
|
11
11
|
async delete(id, options) {
|
12
|
-
await this.resources.delete(typeof id === "string" ? { id, type:
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: StripeTaxAccounts.TYPE } : id, options);
|
13
13
|
}
|
14
14
|
async markets(stripeTaxAccountId, params, options) {
|
15
15
|
const _stripeTaxAccountId = stripeTaxAccountId.id || stripeTaxAccountId;
|
@@ -32,7 +32,7 @@ const _StripeTaxAccounts = class _StripeTaxAccounts extends ApiResource {
|
|
32
32
|
return this.resources.fetch({ type: "tax_categories" }, `stripe_tax_accounts/${_stripeTaxAccountId}/tax_categories`, params, options);
|
33
33
|
}
|
34
34
|
isStripeTaxAccount(resource) {
|
35
|
-
return resource.type && resource.type ===
|
35
|
+
return resource.type && resource.type === StripeTaxAccounts.TYPE;
|
36
36
|
}
|
37
37
|
relationship(id) {
|
38
38
|
return super.relationshipOneToOne(id);
|
@@ -41,11 +41,9 @@ const _StripeTaxAccounts = class _StripeTaxAccounts extends ApiResource {
|
|
41
41
|
return super.relationshipOneToMany(...ids);
|
42
42
|
}
|
43
43
|
type() {
|
44
|
-
return
|
44
|
+
return StripeTaxAccounts.TYPE;
|
45
45
|
}
|
46
|
-
}
|
47
|
-
__publicField(_StripeTaxAccounts, "TYPE", "stripe_tax_accounts");
|
48
|
-
let StripeTaxAccounts = _StripeTaxAccounts;
|
46
|
+
}
|
49
47
|
const instance = new StripeTaxAccounts();
|
50
48
|
var stripe_tax_accounts_default = instance;
|
51
49
|
|
@@ -1,17 +1,17 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var chunkJE77HYXB_cjs = require('../chunk-JE77HYXB.cjs');
|
4
3
|
var resource = require('../resource');
|
5
4
|
|
6
|
-
|
5
|
+
class SubscriptionModels extends resource.ApiResource {
|
6
|
+
static TYPE = "subscription_models";
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create({ ...resource, type:
|
8
|
+
return this.resources.create({ ...resource, type: SubscriptionModels.TYPE }, params, options);
|
9
9
|
}
|
10
10
|
async update(resource, params, options) {
|
11
|
-
return this.resources.update({ ...resource, type:
|
11
|
+
return this.resources.update({ ...resource, type: SubscriptionModels.TYPE }, params, options);
|
12
12
|
}
|
13
13
|
async delete(id, options) {
|
14
|
-
await this.resources.delete(typeof id === "string" ? { id, type:
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: SubscriptionModels.TYPE } : id, options);
|
15
15
|
}
|
16
16
|
async markets(subscriptionModelId, params, options) {
|
17
17
|
const _subscriptionModelId = subscriptionModelId.id || subscriptionModelId;
|
@@ -26,7 +26,7 @@ const _SubscriptionModels = class _SubscriptionModels extends resource.ApiResour
|
|
26
26
|
return this.resources.fetch({ type: "attachments" }, `subscription_models/${_subscriptionModelId}/attachments`, params, options);
|
27
27
|
}
|
28
28
|
isSubscriptionModel(resource) {
|
29
|
-
return resource.type && resource.type ===
|
29
|
+
return resource.type && resource.type === SubscriptionModels.TYPE;
|
30
30
|
}
|
31
31
|
relationship(id) {
|
32
32
|
return super.relationshipOneToOne(id);
|
@@ -35,11 +35,9 @@ const _SubscriptionModels = class _SubscriptionModels extends resource.ApiResour
|
|
35
35
|
return super.relationshipOneToMany(...ids);
|
36
36
|
}
|
37
37
|
type() {
|
38
|
-
return
|
38
|
+
return SubscriptionModels.TYPE;
|
39
39
|
}
|
40
|
-
}
|
41
|
-
chunkJE77HYXB_cjs.__publicField(_SubscriptionModels, "TYPE", "subscription_models");
|
42
|
-
let SubscriptionModels = _SubscriptionModels;
|
40
|
+
}
|
43
41
|
const instance = new SubscriptionModels();
|
44
42
|
var subscription_models_default = instance;
|
45
43
|
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { __publicField } from '../chunk-AQ5VUG5P.js';
|
2
1
|
import { ApiResource } from '../resource';
|
3
2
|
|
4
|
-
|
3
|
+
class SubscriptionModels extends ApiResource {
|
4
|
+
static TYPE = "subscription_models";
|
5
5
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type:
|
6
|
+
return this.resources.create({ ...resource, type: SubscriptionModels.TYPE }, params, options);
|
7
7
|
}
|
8
8
|
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type:
|
9
|
+
return this.resources.update({ ...resource, type: SubscriptionModels.TYPE }, params, options);
|
10
10
|
}
|
11
11
|
async delete(id, options) {
|
12
|
-
await this.resources.delete(typeof id === "string" ? { id, type:
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: SubscriptionModels.TYPE } : id, options);
|
13
13
|
}
|
14
14
|
async markets(subscriptionModelId, params, options) {
|
15
15
|
const _subscriptionModelId = subscriptionModelId.id || subscriptionModelId;
|
@@ -24,7 +24,7 @@ const _SubscriptionModels = class _SubscriptionModels extends ApiResource {
|
|
24
24
|
return this.resources.fetch({ type: "attachments" }, `subscription_models/${_subscriptionModelId}/attachments`, params, options);
|
25
25
|
}
|
26
26
|
isSubscriptionModel(resource) {
|
27
|
-
return resource.type && resource.type ===
|
27
|
+
return resource.type && resource.type === SubscriptionModels.TYPE;
|
28
28
|
}
|
29
29
|
relationship(id) {
|
30
30
|
return super.relationshipOneToOne(id);
|
@@ -33,11 +33,9 @@ const _SubscriptionModels = class _SubscriptionModels extends ApiResource {
|
|
33
33
|
return super.relationshipOneToMany(...ids);
|
34
34
|
}
|
35
35
|
type() {
|
36
|
-
return
|
36
|
+
return SubscriptionModels.TYPE;
|
37
37
|
}
|
38
|
-
}
|
39
|
-
__publicField(_SubscriptionModels, "TYPE", "subscription_models");
|
40
|
-
let SubscriptionModels = _SubscriptionModels;
|
38
|
+
}
|
41
39
|
const instance = new SubscriptionModels();
|
42
40
|
var subscription_models_default = instance;
|
43
41
|
|