@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 Merchants extends ApiResource {
|
4
|
+
static TYPE = "merchants";
|
5
5
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type:
|
6
|
+
return this.resources.create({ ...resource, type: Merchants.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: Merchants.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: Merchants.TYPE } : id, options);
|
13
13
|
}
|
14
14
|
async address(merchantId, params, options) {
|
15
15
|
const _merchantId = merchantId.id || merchantId;
|
@@ -24,7 +24,7 @@ const _Merchants = class _Merchants extends ApiResource {
|
|
24
24
|
return this.resources.fetch({ type: "versions" }, `merchants/${_merchantId}/versions`, params, options);
|
25
25
|
}
|
26
26
|
isMerchant(resource) {
|
27
|
-
return resource.type && resource.type ===
|
27
|
+
return resource.type && resource.type === Merchants.TYPE;
|
28
28
|
}
|
29
29
|
relationship(id) {
|
30
30
|
return super.relationshipOneToOne(id);
|
@@ -33,11 +33,9 @@ const _Merchants = class _Merchants extends ApiResource {
|
|
33
33
|
return super.relationshipOneToMany(...ids);
|
34
34
|
}
|
35
35
|
type() {
|
36
|
-
return
|
36
|
+
return Merchants.TYPE;
|
37
37
|
}
|
38
|
-
}
|
39
|
-
__publicField(_Merchants, "TYPE", "merchants");
|
40
|
-
let Merchants = _Merchants;
|
38
|
+
}
|
41
39
|
const instance = new Merchants();
|
42
40
|
var merchants_default = instance;
|
43
41
|
|
@@ -1,20 +1,20 @@
|
|
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 Notifications extends resource.ApiResource {
|
6
|
+
static TYPE = "notifications";
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create({ ...resource, type:
|
8
|
+
return this.resources.create({ ...resource, type: Notifications.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: Notifications.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: Notifications.TYPE } : id, options);
|
15
15
|
}
|
16
16
|
isNotification(resource) {
|
17
|
-
return resource.type && resource.type ===
|
17
|
+
return resource.type && resource.type === Notifications.TYPE;
|
18
18
|
}
|
19
19
|
relationship(id) {
|
20
20
|
return super.relationshipOneToOne(id);
|
@@ -23,11 +23,9 @@ const _Notifications = class _Notifications extends resource.ApiResource {
|
|
23
23
|
return super.relationshipOneToMany(...ids);
|
24
24
|
}
|
25
25
|
type() {
|
26
|
-
return
|
26
|
+
return Notifications.TYPE;
|
27
27
|
}
|
28
|
-
}
|
29
|
-
chunkJE77HYXB_cjs.__publicField(_Notifications, "TYPE", "notifications");
|
30
|
-
let Notifications = _Notifications;
|
28
|
+
}
|
31
29
|
const instance = new Notifications();
|
32
30
|
var notifications_default = instance;
|
33
31
|
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import { __publicField } from '../chunk-AQ5VUG5P.js';
|
2
1
|
import { ApiResource } from '../resource';
|
3
2
|
|
4
|
-
|
3
|
+
class Notifications extends ApiResource {
|
4
|
+
static TYPE = "notifications";
|
5
5
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type:
|
6
|
+
return this.resources.create({ ...resource, type: Notifications.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: Notifications.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: Notifications.TYPE } : id, options);
|
13
13
|
}
|
14
14
|
isNotification(resource) {
|
15
|
-
return resource.type && resource.type ===
|
15
|
+
return resource.type && resource.type === Notifications.TYPE;
|
16
16
|
}
|
17
17
|
relationship(id) {
|
18
18
|
return super.relationshipOneToOne(id);
|
@@ -21,11 +21,9 @@ const _Notifications = class _Notifications extends ApiResource {
|
|
21
21
|
return super.relationshipOneToMany(...ids);
|
22
22
|
}
|
23
23
|
type() {
|
24
|
-
return
|
24
|
+
return Notifications.TYPE;
|
25
25
|
}
|
26
|
-
}
|
27
|
-
__publicField(_Notifications, "TYPE", "notifications");
|
28
|
-
let Notifications = _Notifications;
|
26
|
+
}
|
29
27
|
const instance = new Notifications();
|
30
28
|
var notifications_default = instance;
|
31
29
|
|
@@ -1,24 +1,24 @@
|
|
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 OrderAmountPromotionRules extends resource.ApiResource {
|
6
|
+
static TYPE = "order_amount_promotion_rules";
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create({ ...resource, type:
|
8
|
+
return this.resources.create({ ...resource, type: OrderAmountPromotionRules.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: OrderAmountPromotionRules.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: OrderAmountPromotionRules.TYPE } : id, options);
|
15
15
|
}
|
16
16
|
async versions(orderAmountPromotionRuleId, params, options) {
|
17
17
|
const _orderAmountPromotionRuleId = orderAmountPromotionRuleId.id || orderAmountPromotionRuleId;
|
18
18
|
return this.resources.fetch({ type: "versions" }, `order_amount_promotion_rules/${_orderAmountPromotionRuleId}/versions`, params, options);
|
19
19
|
}
|
20
20
|
isOrderAmountPromotionRule(resource) {
|
21
|
-
return resource.type && resource.type ===
|
21
|
+
return resource.type && resource.type === OrderAmountPromotionRules.TYPE;
|
22
22
|
}
|
23
23
|
relationship(id) {
|
24
24
|
return super.relationshipOneToOne(id);
|
@@ -27,11 +27,9 @@ const _OrderAmountPromotionRules = class _OrderAmountPromotionRules extends reso
|
|
27
27
|
return super.relationshipOneToMany(...ids);
|
28
28
|
}
|
29
29
|
type() {
|
30
|
-
return
|
30
|
+
return OrderAmountPromotionRules.TYPE;
|
31
31
|
}
|
32
|
-
}
|
33
|
-
chunkJE77HYXB_cjs.__publicField(_OrderAmountPromotionRules, "TYPE", "order_amount_promotion_rules");
|
34
|
-
let OrderAmountPromotionRules = _OrderAmountPromotionRules;
|
32
|
+
}
|
35
33
|
const instance = new OrderAmountPromotionRules();
|
36
34
|
var order_amount_promotion_rules_default = instance;
|
37
35
|
|
@@ -1,22 +1,22 @@
|
|
1
|
-
import { __publicField } from '../chunk-AQ5VUG5P.js';
|
2
1
|
import { ApiResource } from '../resource';
|
3
2
|
|
4
|
-
|
3
|
+
class OrderAmountPromotionRules extends ApiResource {
|
4
|
+
static TYPE = "order_amount_promotion_rules";
|
5
5
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type:
|
6
|
+
return this.resources.create({ ...resource, type: OrderAmountPromotionRules.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: OrderAmountPromotionRules.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: OrderAmountPromotionRules.TYPE } : id, options);
|
13
13
|
}
|
14
14
|
async versions(orderAmountPromotionRuleId, params, options) {
|
15
15
|
const _orderAmountPromotionRuleId = orderAmountPromotionRuleId.id || orderAmountPromotionRuleId;
|
16
16
|
return this.resources.fetch({ type: "versions" }, `order_amount_promotion_rules/${_orderAmountPromotionRuleId}/versions`, params, options);
|
17
17
|
}
|
18
18
|
isOrderAmountPromotionRule(resource) {
|
19
|
-
return resource.type && resource.type ===
|
19
|
+
return resource.type && resource.type === OrderAmountPromotionRules.TYPE;
|
20
20
|
}
|
21
21
|
relationship(id) {
|
22
22
|
return super.relationshipOneToOne(id);
|
@@ -25,11 +25,9 @@ const _OrderAmountPromotionRules = class _OrderAmountPromotionRules extends ApiR
|
|
25
25
|
return super.relationshipOneToMany(...ids);
|
26
26
|
}
|
27
27
|
type() {
|
28
|
-
return
|
28
|
+
return OrderAmountPromotionRules.TYPE;
|
29
29
|
}
|
30
|
-
}
|
31
|
-
__publicField(_OrderAmountPromotionRules, "TYPE", "order_amount_promotion_rules");
|
32
|
-
let OrderAmountPromotionRules = _OrderAmountPromotionRules;
|
30
|
+
}
|
33
31
|
const instance = new OrderAmountPromotionRules();
|
34
32
|
var order_amount_promotion_rules_default = instance;
|
35
33
|
|
@@ -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 OrderCopies extends resource.ApiResource {
|
6
|
+
static TYPE = "order_copies";
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create({ ...resource, type:
|
8
|
+
return this.resources.create({ ...resource, type: OrderCopies.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: OrderCopies.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: OrderCopies.TYPE } : id, options);
|
15
15
|
}
|
16
16
|
async source_order(orderCopyId, params, options) {
|
17
17
|
const _orderCopyId = orderCopyId.id || orderCopyId;
|
@@ -30,7 +30,7 @@ const _OrderCopies = class _OrderCopies extends resource.ApiResource {
|
|
30
30
|
return this.resources.fetch({ type: "order_subscriptions" }, `order_copies/${_orderCopyId}/order_subscription`, params, options);
|
31
31
|
}
|
32
32
|
isOrderCopy(resource) {
|
33
|
-
return resource.type && resource.type ===
|
33
|
+
return resource.type && resource.type === OrderCopies.TYPE;
|
34
34
|
}
|
35
35
|
relationship(id) {
|
36
36
|
return super.relationshipOneToOne(id);
|
@@ -39,11 +39,9 @@ const _OrderCopies = class _OrderCopies extends resource.ApiResource {
|
|
39
39
|
return super.relationshipOneToMany(...ids);
|
40
40
|
}
|
41
41
|
type() {
|
42
|
-
return
|
42
|
+
return OrderCopies.TYPE;
|
43
43
|
}
|
44
|
-
}
|
45
|
-
chunkJE77HYXB_cjs.__publicField(_OrderCopies, "TYPE", "order_copies");
|
46
|
-
let OrderCopies = _OrderCopies;
|
44
|
+
}
|
47
45
|
const instance = new OrderCopies();
|
48
46
|
var order_copies_default = instance;
|
49
47
|
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { __publicField } from '../chunk-AQ5VUG5P.js';
|
2
1
|
import { ApiResource } from '../resource';
|
3
2
|
|
4
|
-
|
3
|
+
class OrderCopies extends ApiResource {
|
4
|
+
static TYPE = "order_copies";
|
5
5
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type:
|
6
|
+
return this.resources.create({ ...resource, type: OrderCopies.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: OrderCopies.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: OrderCopies.TYPE } : id, options);
|
13
13
|
}
|
14
14
|
async source_order(orderCopyId, params, options) {
|
15
15
|
const _orderCopyId = orderCopyId.id || orderCopyId;
|
@@ -28,7 +28,7 @@ const _OrderCopies = class _OrderCopies extends ApiResource {
|
|
28
28
|
return this.resources.fetch({ type: "order_subscriptions" }, `order_copies/${_orderCopyId}/order_subscription`, params, options);
|
29
29
|
}
|
30
30
|
isOrderCopy(resource) {
|
31
|
-
return resource.type && resource.type ===
|
31
|
+
return resource.type && resource.type === OrderCopies.TYPE;
|
32
32
|
}
|
33
33
|
relationship(id) {
|
34
34
|
return super.relationshipOneToOne(id);
|
@@ -37,11 +37,9 @@ const _OrderCopies = class _OrderCopies extends ApiResource {
|
|
37
37
|
return super.relationshipOneToMany(...ids);
|
38
38
|
}
|
39
39
|
type() {
|
40
|
-
return
|
40
|
+
return OrderCopies.TYPE;
|
41
41
|
}
|
42
|
-
}
|
43
|
-
__publicField(_OrderCopies, "TYPE", "order_copies");
|
44
|
-
let OrderCopies = _OrderCopies;
|
42
|
+
}
|
45
43
|
const instance = new OrderCopies();
|
46
44
|
var order_copies_default = instance;
|
47
45
|
|
@@ -1,9 +1,9 @@
|
|
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 OrderFactories extends resource.ApiResource {
|
6
|
+
static TYPE = "order_factories";
|
7
7
|
async source_order(orderFactoryId, params, options) {
|
8
8
|
const _orderFactoryId = orderFactoryId.id || orderFactoryId;
|
9
9
|
return this.resources.fetch({ type: "orders" }, `order_factories/${_orderFactoryId}/source_order`, params, options);
|
@@ -17,7 +17,7 @@ const _OrderFactories = class _OrderFactories extends resource.ApiResource {
|
|
17
17
|
return this.resources.fetch({ type: "events" }, `order_factories/${_orderFactoryId}/events`, params, options);
|
18
18
|
}
|
19
19
|
isOrderFactory(resource) {
|
20
|
-
return resource.type && resource.type ===
|
20
|
+
return resource.type && resource.type === OrderFactories.TYPE;
|
21
21
|
}
|
22
22
|
relationship(id) {
|
23
23
|
return super.relationshipOneToOne(id);
|
@@ -26,11 +26,9 @@ const _OrderFactories = class _OrderFactories extends resource.ApiResource {
|
|
26
26
|
return super.relationshipOneToMany(...ids);
|
27
27
|
}
|
28
28
|
type() {
|
29
|
-
return
|
29
|
+
return OrderFactories.TYPE;
|
30
30
|
}
|
31
|
-
}
|
32
|
-
chunkJE77HYXB_cjs.__publicField(_OrderFactories, "TYPE", "order_factories");
|
33
|
-
let OrderFactories = _OrderFactories;
|
31
|
+
}
|
34
32
|
const instance = new OrderFactories();
|
35
33
|
var order_factories_default = instance;
|
36
34
|
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { __publicField } from '../chunk-AQ5VUG5P.js';
|
2
1
|
import { ApiResource } from '../resource';
|
3
2
|
|
4
|
-
|
3
|
+
class OrderFactories extends ApiResource {
|
4
|
+
static TYPE = "order_factories";
|
5
5
|
async source_order(orderFactoryId, params, options) {
|
6
6
|
const _orderFactoryId = orderFactoryId.id || orderFactoryId;
|
7
7
|
return this.resources.fetch({ type: "orders" }, `order_factories/${_orderFactoryId}/source_order`, params, options);
|
@@ -15,7 +15,7 @@ const _OrderFactories = class _OrderFactories extends ApiResource {
|
|
15
15
|
return this.resources.fetch({ type: "events" }, `order_factories/${_orderFactoryId}/events`, params, options);
|
16
16
|
}
|
17
17
|
isOrderFactory(resource) {
|
18
|
-
return resource.type && resource.type ===
|
18
|
+
return resource.type && resource.type === OrderFactories.TYPE;
|
19
19
|
}
|
20
20
|
relationship(id) {
|
21
21
|
return super.relationshipOneToOne(id);
|
@@ -24,11 +24,9 @@ const _OrderFactories = class _OrderFactories extends ApiResource {
|
|
24
24
|
return super.relationshipOneToMany(...ids);
|
25
25
|
}
|
26
26
|
type() {
|
27
|
-
return
|
27
|
+
return OrderFactories.TYPE;
|
28
28
|
}
|
29
|
-
}
|
30
|
-
__publicField(_OrderFactories, "TYPE", "order_factories");
|
31
|
-
let OrderFactories = _OrderFactories;
|
29
|
+
}
|
32
30
|
const instance = new OrderFactories();
|
33
31
|
var order_factories_default = instance;
|
34
32
|
|
@@ -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 OrderSubscriptionItems extends resource.ApiResource {
|
6
|
+
static TYPE = "order_subscription_items";
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create({ ...resource, type:
|
8
|
+
return this.resources.create({ ...resource, type: OrderSubscriptionItems.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: OrderSubscriptionItems.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: OrderSubscriptionItems.TYPE } : id, options);
|
15
15
|
}
|
16
16
|
async order_subscription(orderSubscriptionItemId, params, options) {
|
17
17
|
const _orderSubscriptionItemId = orderSubscriptionItemId.id || orderSubscriptionItemId;
|
@@ -22,7 +22,7 @@ const _OrderSubscriptionItems = class _OrderSubscriptionItems extends resource.A
|
|
22
22
|
return this.resources.fetch({ type: "line_items" }, `order_subscription_items/${_orderSubscriptionItemId}/source_line_item`, params, options);
|
23
23
|
}
|
24
24
|
isOrderSubscriptionItem(resource) {
|
25
|
-
return resource.type && resource.type ===
|
25
|
+
return resource.type && resource.type === OrderSubscriptionItems.TYPE;
|
26
26
|
}
|
27
27
|
relationship(id) {
|
28
28
|
return super.relationshipOneToOne(id);
|
@@ -31,11 +31,9 @@ const _OrderSubscriptionItems = class _OrderSubscriptionItems extends resource.A
|
|
31
31
|
return super.relationshipOneToMany(...ids);
|
32
32
|
}
|
33
33
|
type() {
|
34
|
-
return
|
34
|
+
return OrderSubscriptionItems.TYPE;
|
35
35
|
}
|
36
|
-
}
|
37
|
-
chunkJE77HYXB_cjs.__publicField(_OrderSubscriptionItems, "TYPE", "order_subscription_items");
|
38
|
-
let OrderSubscriptionItems = _OrderSubscriptionItems;
|
36
|
+
}
|
39
37
|
const instance = new OrderSubscriptionItems();
|
40
38
|
var order_subscription_items_default = instance;
|
41
39
|
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { __publicField } from '../chunk-AQ5VUG5P.js';
|
2
1
|
import { ApiResource } from '../resource';
|
3
2
|
|
4
|
-
|
3
|
+
class OrderSubscriptionItems extends ApiResource {
|
4
|
+
static TYPE = "order_subscription_items";
|
5
5
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type:
|
6
|
+
return this.resources.create({ ...resource, type: OrderSubscriptionItems.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: OrderSubscriptionItems.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: OrderSubscriptionItems.TYPE } : id, options);
|
13
13
|
}
|
14
14
|
async order_subscription(orderSubscriptionItemId, params, options) {
|
15
15
|
const _orderSubscriptionItemId = orderSubscriptionItemId.id || orderSubscriptionItemId;
|
@@ -20,7 +20,7 @@ const _OrderSubscriptionItems = class _OrderSubscriptionItems extends ApiResourc
|
|
20
20
|
return this.resources.fetch({ type: "line_items" }, `order_subscription_items/${_orderSubscriptionItemId}/source_line_item`, params, options);
|
21
21
|
}
|
22
22
|
isOrderSubscriptionItem(resource) {
|
23
|
-
return resource.type && resource.type ===
|
23
|
+
return resource.type && resource.type === OrderSubscriptionItems.TYPE;
|
24
24
|
}
|
25
25
|
relationship(id) {
|
26
26
|
return super.relationshipOneToOne(id);
|
@@ -29,11 +29,9 @@ const _OrderSubscriptionItems = class _OrderSubscriptionItems extends ApiResourc
|
|
29
29
|
return super.relationshipOneToMany(...ids);
|
30
30
|
}
|
31
31
|
type() {
|
32
|
-
return
|
32
|
+
return OrderSubscriptionItems.TYPE;
|
33
33
|
}
|
34
|
-
}
|
35
|
-
__publicField(_OrderSubscriptionItems, "TYPE", "order_subscription_items");
|
36
|
-
let OrderSubscriptionItems = _OrderSubscriptionItems;
|
34
|
+
}
|
37
35
|
const instance = new OrderSubscriptionItems();
|
38
36
|
var order_subscription_items_default = instance;
|
39
37
|
|
@@ -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 OrderSubscriptions extends resource.ApiResource {
|
6
|
+
static TYPE = "order_subscriptions";
|
7
7
|
async create(resource, params, options) {
|
8
|
-
return this.resources.create({ ...resource, type:
|
8
|
+
return this.resources.create({ ...resource, type: OrderSubscriptions.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: OrderSubscriptions.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: OrderSubscriptions.TYPE } : id, options);
|
15
15
|
}
|
16
16
|
async market(orderSubscriptionId, params, options) {
|
17
17
|
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
@@ -62,25 +62,25 @@ const _OrderSubscriptions = class _OrderSubscriptions extends resource.ApiResour
|
|
62
62
|
return this.resources.fetch({ type: "versions" }, `order_subscriptions/${_orderSubscriptionId}/versions`, params, options);
|
63
63
|
}
|
64
64
|
async _activate(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: OrderSubscriptions.TYPE, _activate: true }, params, options);
|
66
66
|
}
|
67
67
|
async _deactivate(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: OrderSubscriptions.TYPE, _deactivate: true }, params, options);
|
69
69
|
}
|
70
70
|
async _cancel(id, params, options) {
|
71
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
71
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: OrderSubscriptions.TYPE, _cancel: true }, params, options);
|
72
72
|
}
|
73
73
|
async _convert(id, params, options) {
|
74
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
74
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: OrderSubscriptions.TYPE, _convert: true }, params, options);
|
75
75
|
}
|
76
76
|
async _add_tags(id, triggerValue, params, options) {
|
77
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
77
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: OrderSubscriptions.TYPE, _add_tags: triggerValue }, params, options);
|
78
78
|
}
|
79
79
|
async _remove_tags(id, triggerValue, params, options) {
|
80
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
80
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: OrderSubscriptions.TYPE, _remove_tags: triggerValue }, params, options);
|
81
81
|
}
|
82
82
|
isOrderSubscription(resource) {
|
83
|
-
return resource.type && resource.type ===
|
83
|
+
return resource.type && resource.type === OrderSubscriptions.TYPE;
|
84
84
|
}
|
85
85
|
relationship(id) {
|
86
86
|
return super.relationshipOneToOne(id);
|
@@ -89,11 +89,9 @@ const _OrderSubscriptions = class _OrderSubscriptions extends resource.ApiResour
|
|
89
89
|
return super.relationshipOneToMany(...ids);
|
90
90
|
}
|
91
91
|
type() {
|
92
|
-
return
|
92
|
+
return OrderSubscriptions.TYPE;
|
93
93
|
}
|
94
|
-
}
|
95
|
-
chunkJE77HYXB_cjs.__publicField(_OrderSubscriptions, "TYPE", "order_subscriptions");
|
96
|
-
let OrderSubscriptions = _OrderSubscriptions;
|
94
|
+
}
|
97
95
|
const instance = new OrderSubscriptions();
|
98
96
|
var order_subscriptions_default = instance;
|
99
97
|
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { __publicField } from '../chunk-AQ5VUG5P.js';
|
2
1
|
import { ApiResource } from '../resource';
|
3
2
|
|
4
|
-
|
3
|
+
class OrderSubscriptions extends ApiResource {
|
4
|
+
static TYPE = "order_subscriptions";
|
5
5
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type:
|
6
|
+
return this.resources.create({ ...resource, type: OrderSubscriptions.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: OrderSubscriptions.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: OrderSubscriptions.TYPE } : id, options);
|
13
13
|
}
|
14
14
|
async market(orderSubscriptionId, params, options) {
|
15
15
|
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
@@ -60,25 +60,25 @@ const _OrderSubscriptions = class _OrderSubscriptions extends ApiResource {
|
|
60
60
|
return this.resources.fetch({ type: "versions" }, `order_subscriptions/${_orderSubscriptionId}/versions`, params, options);
|
61
61
|
}
|
62
62
|
async _activate(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: OrderSubscriptions.TYPE, _activate: true }, params, options);
|
64
64
|
}
|
65
65
|
async _deactivate(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: OrderSubscriptions.TYPE, _deactivate: true }, params, options);
|
67
67
|
}
|
68
68
|
async _cancel(id, params, options) {
|
69
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
69
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: OrderSubscriptions.TYPE, _cancel: true }, params, options);
|
70
70
|
}
|
71
71
|
async _convert(id, params, options) {
|
72
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
72
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: OrderSubscriptions.TYPE, _convert: true }, params, options);
|
73
73
|
}
|
74
74
|
async _add_tags(id, triggerValue, params, options) {
|
75
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
75
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: OrderSubscriptions.TYPE, _add_tags: triggerValue }, params, options);
|
76
76
|
}
|
77
77
|
async _remove_tags(id, triggerValue, params, options) {
|
78
|
-
return this.resources.update({ id: typeof id === "string" ? id : id.id, type:
|
78
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: OrderSubscriptions.TYPE, _remove_tags: triggerValue }, params, options);
|
79
79
|
}
|
80
80
|
isOrderSubscription(resource) {
|
81
|
-
return resource.type && resource.type ===
|
81
|
+
return resource.type && resource.type === OrderSubscriptions.TYPE;
|
82
82
|
}
|
83
83
|
relationship(id) {
|
84
84
|
return super.relationshipOneToOne(id);
|
@@ -87,11 +87,9 @@ const _OrderSubscriptions = class _OrderSubscriptions extends ApiResource {
|
|
87
87
|
return super.relationshipOneToMany(...ids);
|
88
88
|
}
|
89
89
|
type() {
|
90
|
-
return
|
90
|
+
return OrderSubscriptions.TYPE;
|
91
91
|
}
|
92
|
-
}
|
93
|
-
__publicField(_OrderSubscriptions, "TYPE", "order_subscriptions");
|
94
|
-
let OrderSubscriptions = _OrderSubscriptions;
|
92
|
+
}
|
95
93
|
const instance = new OrderSubscriptions();
|
96
94
|
var order_subscriptions_default = instance;
|
97
95
|
|