@commercelayer/sdk 5.35.0 → 6.0.0-alfa.10
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/api.d.ts +0 -3
- package/lib/cjs/api.js +0 -10
- package/lib/cjs/client.d.ts +6 -14
- package/lib/cjs/client.js +41 -75
- package/lib/cjs/commercelayer.d.ts +126 -125
- package/lib/cjs/commercelayer.js +267 -155
- package/lib/cjs/common.js +1 -12
- package/lib/cjs/config.js +0 -2
- package/lib/cjs/debug.js +0 -21
- package/lib/cjs/error.d.ts +6 -7
- package/lib/cjs/error.js +36 -35
- package/lib/cjs/fetch.d.ts +13 -0
- package/lib/cjs/fetch.js +67 -0
- package/lib/cjs/index.js +0 -2
- package/lib/cjs/interceptor.d.ts +22 -10
- package/lib/cjs/jsonapi.js +0 -2
- package/lib/cjs/model.d.ts +0 -3
- package/lib/cjs/model.js +0 -1
- package/lib/cjs/query.d.ts +2 -1
- package/lib/cjs/query.js +8 -7
- package/lib/cjs/resource.d.ts +2 -5
- package/lib/cjs/resource.js +32 -58
- package/lib/cjs/resources/addresses.d.ts +1 -0
- package/lib/cjs/resources/addresses.js +4 -1
- package/lib/cjs/resources/adjustments.d.ts +1 -0
- package/lib/cjs/resources/adjustments.js +4 -1
- package/lib/cjs/resources/adyen_gateways.d.ts +1 -0
- package/lib/cjs/resources/adyen_gateways.js +4 -1
- package/lib/cjs/resources/adyen_payments.d.ts +1 -0
- package/lib/cjs/resources/adyen_payments.js +4 -1
- package/lib/cjs/resources/application.d.ts +1 -0
- package/lib/cjs/resources/application.js +4 -1
- package/lib/cjs/resources/attachments.d.ts +1 -0
- package/lib/cjs/resources/attachments.js +4 -1
- package/lib/cjs/resources/authorizations.d.ts +1 -0
- package/lib/cjs/resources/authorizations.js +4 -1
- package/lib/cjs/resources/avalara_accounts.d.ts +1 -0
- package/lib/cjs/resources/avalara_accounts.js +4 -1
- package/lib/cjs/resources/axerve_gateways.d.ts +1 -0
- package/lib/cjs/resources/axerve_gateways.js +4 -1
- package/lib/cjs/resources/axerve_payments.d.ts +1 -0
- package/lib/cjs/resources/axerve_payments.js +4 -1
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -0
- package/lib/cjs/resources/billing_info_validation_rules.js +4 -1
- package/lib/cjs/resources/bing_geocoders.d.ts +1 -0
- package/lib/cjs/resources/bing_geocoders.js +4 -1
- package/lib/cjs/resources/braintree_gateways.d.ts +1 -0
- package/lib/cjs/resources/braintree_gateways.js +4 -1
- package/lib/cjs/resources/braintree_payments.d.ts +1 -0
- package/lib/cjs/resources/braintree_payments.js +4 -1
- package/lib/cjs/resources/bundles.d.ts +1 -0
- package/lib/cjs/resources/bundles.js +4 -1
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +1 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +4 -1
- package/lib/cjs/resources/captures.d.ts +1 -0
- package/lib/cjs/resources/captures.js +4 -1
- package/lib/cjs/resources/carrier_accounts.d.ts +1 -0
- package/lib/cjs/resources/carrier_accounts.js +4 -1
- package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -0
- package/lib/cjs/resources/checkout_com_gateways.js +4 -1
- package/lib/cjs/resources/checkout_com_payments.d.ts +1 -0
- package/lib/cjs/resources/checkout_com_payments.js +4 -1
- package/lib/cjs/resources/cleanups.d.ts +1 -0
- package/lib/cjs/resources/cleanups.js +4 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -0
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +4 -1
- package/lib/cjs/resources/coupon_recipients.d.ts +1 -0
- package/lib/cjs/resources/coupon_recipients.js +4 -1
- package/lib/cjs/resources/coupons.d.ts +1 -0
- package/lib/cjs/resources/coupons.js +4 -1
- package/lib/cjs/resources/custom_promotion_rules.d.ts +1 -0
- package/lib/cjs/resources/custom_promotion_rules.js +4 -1
- package/lib/cjs/resources/customer_addresses.d.ts +1 -0
- package/lib/cjs/resources/customer_addresses.js +4 -1
- package/lib/cjs/resources/customer_groups.d.ts +1 -0
- package/lib/cjs/resources/customer_groups.js +4 -1
- package/lib/cjs/resources/customer_password_resets.d.ts +1 -0
- package/lib/cjs/resources/customer_password_resets.js +4 -1
- package/lib/cjs/resources/customer_payment_sources.d.ts +1 -0
- package/lib/cjs/resources/customer_payment_sources.js +4 -1
- package/lib/cjs/resources/customer_subscriptions.d.ts +1 -0
- package/lib/cjs/resources/customer_subscriptions.js +4 -1
- package/lib/cjs/resources/customers.d.ts +1 -0
- package/lib/cjs/resources/customers.js +4 -1
- package/lib/cjs/resources/delivery_lead_times.d.ts +1 -0
- package/lib/cjs/resources/delivery_lead_times.js +4 -1
- package/lib/cjs/resources/event_callbacks.d.ts +1 -0
- package/lib/cjs/resources/event_callbacks.js +4 -1
- package/lib/cjs/resources/events.d.ts +1 -0
- package/lib/cjs/resources/events.js +4 -1
- package/lib/cjs/resources/exports.d.ts +1 -0
- package/lib/cjs/resources/exports.js +4 -1
- package/lib/cjs/resources/external_gateways.d.ts +1 -0
- package/lib/cjs/resources/external_gateways.js +4 -1
- package/lib/cjs/resources/external_payments.d.ts +1 -0
- package/lib/cjs/resources/external_payments.js +4 -1
- package/lib/cjs/resources/external_promotions.d.ts +1 -0
- package/lib/cjs/resources/external_promotions.js +4 -1
- package/lib/cjs/resources/external_tax_calculators.d.ts +1 -0
- package/lib/cjs/resources/external_tax_calculators.js +4 -1
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -0
- package/lib/cjs/resources/fixed_amount_promotions.js +4 -1
- package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -0
- package/lib/cjs/resources/fixed_price_promotions.js +4 -1
- package/lib/cjs/resources/free_gift_promotions.d.ts +1 -0
- package/lib/cjs/resources/free_gift_promotions.js +4 -1
- package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -0
- package/lib/cjs/resources/free_shipping_promotions.js +4 -1
- package/lib/cjs/resources/geocoders.d.ts +1 -0
- package/lib/cjs/resources/geocoders.js +4 -1
- package/lib/cjs/resources/gift_card_recipients.d.ts +1 -0
- package/lib/cjs/resources/gift_card_recipients.js +4 -1
- package/lib/cjs/resources/gift_cards.d.ts +1 -0
- package/lib/cjs/resources/gift_cards.js +4 -1
- package/lib/cjs/resources/google_geocoders.d.ts +1 -0
- package/lib/cjs/resources/google_geocoders.js +4 -1
- package/lib/cjs/resources/imports.d.ts +1 -0
- package/lib/cjs/resources/imports.js +4 -1
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -0
- package/lib/cjs/resources/in_stock_subscriptions.js +4 -1
- package/lib/cjs/resources/inventory_models.d.ts +1 -0
- package/lib/cjs/resources/inventory_models.js +4 -1
- package/lib/cjs/resources/inventory_return_locations.d.ts +1 -0
- package/lib/cjs/resources/inventory_return_locations.js +4 -1
- package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -0
- package/lib/cjs/resources/inventory_stock_locations.js +4 -1
- package/lib/cjs/resources/klarna_gateways.d.ts +1 -0
- package/lib/cjs/resources/klarna_gateways.js +4 -1
- package/lib/cjs/resources/klarna_payments.d.ts +1 -0
- package/lib/cjs/resources/klarna_payments.js +4 -1
- package/lib/cjs/resources/line_item_options.d.ts +1 -0
- package/lib/cjs/resources/line_item_options.js +4 -1
- package/lib/cjs/resources/line_items.d.ts +1 -0
- package/lib/cjs/resources/line_items.js +4 -1
- package/lib/cjs/resources/manual_gateways.d.ts +1 -0
- package/lib/cjs/resources/manual_gateways.js +4 -1
- package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -0
- package/lib/cjs/resources/manual_tax_calculators.js +4 -1
- package/lib/cjs/resources/markets.d.ts +1 -0
- package/lib/cjs/resources/markets.js +4 -1
- package/lib/cjs/resources/merchants.d.ts +1 -0
- package/lib/cjs/resources/merchants.js +4 -1
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -0
- package/lib/cjs/resources/order_amount_promotion_rules.js +4 -1
- package/lib/cjs/resources/order_copies.d.ts +1 -0
- package/lib/cjs/resources/order_copies.js +4 -1
- package/lib/cjs/resources/order_factories.d.ts +1 -0
- package/lib/cjs/resources/order_factories.js +4 -1
- package/lib/cjs/resources/order_subscription_items.d.ts +1 -0
- package/lib/cjs/resources/order_subscription_items.js +4 -1
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -0
- package/lib/cjs/resources/order_subscriptions.js +4 -1
- package/lib/cjs/resources/order_validation_rules.d.ts +1 -0
- package/lib/cjs/resources/order_validation_rules.js +4 -1
- package/lib/cjs/resources/orders.d.ts +1 -0
- package/lib/cjs/resources/orders.js +4 -1
- package/lib/cjs/resources/organization.d.ts +1 -0
- package/lib/cjs/resources/organization.js +4 -1
- package/lib/cjs/resources/packages.d.ts +1 -0
- package/lib/cjs/resources/packages.js +4 -1
- package/lib/cjs/resources/parcel_line_items.d.ts +1 -0
- package/lib/cjs/resources/parcel_line_items.js +4 -1
- package/lib/cjs/resources/parcels.d.ts +1 -0
- package/lib/cjs/resources/parcels.js +4 -1
- package/lib/cjs/resources/payment_gateways.d.ts +1 -0
- package/lib/cjs/resources/payment_gateways.js +4 -1
- package/lib/cjs/resources/payment_methods.d.ts +1 -0
- package/lib/cjs/resources/payment_methods.js +4 -1
- package/lib/cjs/resources/payment_options.d.ts +1 -0
- package/lib/cjs/resources/payment_options.js +4 -1
- package/lib/cjs/resources/paypal_gateways.d.ts +1 -0
- package/lib/cjs/resources/paypal_gateways.js +4 -1
- package/lib/cjs/resources/paypal_payments.d.ts +1 -0
- package/lib/cjs/resources/paypal_payments.js +4 -1
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -0
- package/lib/cjs/resources/percentage_discount_promotions.js +4 -1
- package/lib/cjs/resources/price_frequency_tiers.d.ts +1 -0
- package/lib/cjs/resources/price_frequency_tiers.js +4 -1
- package/lib/cjs/resources/price_lists.d.ts +1 -0
- package/lib/cjs/resources/price_lists.js +4 -1
- package/lib/cjs/resources/price_tiers.d.ts +1 -0
- package/lib/cjs/resources/price_tiers.js +4 -1
- package/lib/cjs/resources/price_volume_tiers.d.ts +1 -0
- package/lib/cjs/resources/price_volume_tiers.js +4 -1
- package/lib/cjs/resources/prices.d.ts +1 -0
- package/lib/cjs/resources/prices.js +4 -1
- package/lib/cjs/resources/promotion_rules.d.ts +1 -0
- package/lib/cjs/resources/promotion_rules.js +4 -1
- package/lib/cjs/resources/promotions.d.ts +1 -0
- package/lib/cjs/resources/promotions.js +4 -1
- package/lib/cjs/resources/recurring_order_copies.d.ts +1 -0
- package/lib/cjs/resources/recurring_order_copies.js +4 -1
- package/lib/cjs/resources/refunds.d.ts +1 -0
- package/lib/cjs/resources/refunds.js +4 -1
- package/lib/cjs/resources/reserved_stocks.d.ts +1 -0
- package/lib/cjs/resources/reserved_stocks.js +4 -1
- package/lib/cjs/resources/resource_errors.d.ts +1 -0
- package/lib/cjs/resources/resource_errors.js +4 -1
- package/lib/cjs/resources/return_line_items.d.ts +1 -0
- package/lib/cjs/resources/return_line_items.js +4 -1
- package/lib/cjs/resources/returns.d.ts +1 -0
- package/lib/cjs/resources/returns.js +4 -1
- package/lib/cjs/resources/satispay_gateways.d.ts +1 -0
- package/lib/cjs/resources/satispay_gateways.js +4 -1
- package/lib/cjs/resources/satispay_payments.d.ts +1 -0
- package/lib/cjs/resources/satispay_payments.js +4 -1
- package/lib/cjs/resources/shipments.d.ts +1 -0
- package/lib/cjs/resources/shipments.js +4 -1
- package/lib/cjs/resources/shipping_categories.d.ts +1 -0
- package/lib/cjs/resources/shipping_categories.js +4 -1
- package/lib/cjs/resources/shipping_method_tiers.d.ts +1 -0
- package/lib/cjs/resources/shipping_method_tiers.js +4 -1
- package/lib/cjs/resources/shipping_methods.d.ts +1 -0
- package/lib/cjs/resources/shipping_methods.js +4 -1
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +1 -0
- package/lib/cjs/resources/shipping_weight_tiers.js +4 -1
- package/lib/cjs/resources/shipping_zones.d.ts +1 -0
- package/lib/cjs/resources/shipping_zones.js +4 -1
- package/lib/cjs/resources/sku_list_items.d.ts +1 -0
- package/lib/cjs/resources/sku_list_items.js +4 -1
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -0
- package/lib/cjs/resources/sku_list_promotion_rules.js +4 -1
- package/lib/cjs/resources/sku_lists.d.ts +1 -0
- package/lib/cjs/resources/sku_lists.js +4 -1
- package/lib/cjs/resources/sku_options.d.ts +1 -0
- package/lib/cjs/resources/sku_options.js +4 -1
- package/lib/cjs/resources/skus.d.ts +1 -0
- package/lib/cjs/resources/skus.js +4 -1
- package/lib/cjs/resources/stock_items.d.ts +1 -0
- package/lib/cjs/resources/stock_items.js +4 -1
- package/lib/cjs/resources/stock_line_items.d.ts +1 -0
- package/lib/cjs/resources/stock_line_items.js +4 -1
- package/lib/cjs/resources/stock_locations.d.ts +1 -0
- package/lib/cjs/resources/stock_locations.js +4 -1
- package/lib/cjs/resources/stock_reservations.d.ts +1 -0
- package/lib/cjs/resources/stock_reservations.js +4 -1
- package/lib/cjs/resources/stock_transfers.d.ts +1 -0
- package/lib/cjs/resources/stock_transfers.js +4 -1
- package/lib/cjs/resources/stripe_gateways.d.ts +1 -0
- package/lib/cjs/resources/stripe_gateways.js +4 -1
- package/lib/cjs/resources/stripe_payments.d.ts +1 -0
- package/lib/cjs/resources/stripe_payments.js +4 -1
- package/lib/cjs/resources/subscription_models.d.ts +1 -0
- package/lib/cjs/resources/subscription_models.js +4 -1
- package/lib/cjs/resources/tags.d.ts +1 -0
- package/lib/cjs/resources/tags.js +4 -1
- package/lib/cjs/resources/tax_calculators.d.ts +1 -0
- package/lib/cjs/resources/tax_calculators.js +4 -1
- package/lib/cjs/resources/tax_categories.d.ts +1 -0
- package/lib/cjs/resources/tax_categories.js +4 -1
- package/lib/cjs/resources/tax_rules.d.ts +1 -0
- package/lib/cjs/resources/tax_rules.js +4 -1
- package/lib/cjs/resources/taxjar_accounts.d.ts +1 -0
- package/lib/cjs/resources/taxjar_accounts.js +4 -1
- package/lib/cjs/resources/transactions.d.ts +1 -0
- package/lib/cjs/resources/transactions.js +4 -1
- package/lib/cjs/resources/versions.d.ts +1 -0
- package/lib/cjs/resources/versions.js +4 -1
- package/lib/cjs/resources/voids.d.ts +1 -0
- package/lib/cjs/resources/voids.js +4 -1
- package/lib/cjs/resources/webhooks.d.ts +1 -0
- package/lib/cjs/resources/webhooks.js +4 -1
- package/lib/cjs/resources/wire_transfers.d.ts +1 -0
- package/lib/cjs/resources/wire_transfers.js +4 -1
- package/lib/cjs/static.js +0 -1
- package/lib/cjs/util.js +0 -1
- package/lib/esm/api.d.ts +0 -3
- package/lib/esm/api.js +0 -10
- package/lib/esm/client.d.ts +6 -14
- package/lib/esm/client.js +43 -90
- package/lib/esm/commercelayer.d.ts +126 -125
- package/lib/esm/commercelayer.js +270 -171
- package/lib/esm/common.js +1 -12
- package/lib/esm/config.js +0 -2
- package/lib/esm/debug.js +0 -21
- package/lib/esm/error.d.ts +6 -7
- package/lib/esm/error.js +44 -35
- package/lib/esm/fetch.d.ts +13 -0
- package/lib/esm/fetch.js +46 -0
- package/lib/esm/index.js +0 -2
- package/lib/esm/interceptor.d.ts +22 -10
- package/lib/esm/jsonapi.js +0 -2
- package/lib/esm/model.d.ts +0 -3
- package/lib/esm/model.js +0 -1
- package/lib/esm/query.d.ts +2 -1
- package/lib/esm/query.js +7 -7
- package/lib/esm/resource.d.ts +2 -5
- package/lib/esm/resource.js +40 -76
- package/lib/esm/resources/addresses.d.ts +1 -0
- package/lib/esm/resources/addresses.js +5 -2
- package/lib/esm/resources/adjustments.d.ts +1 -0
- package/lib/esm/resources/adjustments.js +5 -2
- package/lib/esm/resources/adyen_gateways.d.ts +1 -0
- package/lib/esm/resources/adyen_gateways.js +5 -2
- package/lib/esm/resources/adyen_payments.d.ts +1 -0
- package/lib/esm/resources/adyen_payments.js +5 -2
- package/lib/esm/resources/application.d.ts +1 -0
- package/lib/esm/resources/application.js +5 -2
- package/lib/esm/resources/attachments.d.ts +1 -0
- package/lib/esm/resources/attachments.js +5 -2
- package/lib/esm/resources/authorizations.d.ts +1 -0
- package/lib/esm/resources/authorizations.js +5 -2
- package/lib/esm/resources/avalara_accounts.d.ts +1 -0
- package/lib/esm/resources/avalara_accounts.js +5 -2
- package/lib/esm/resources/axerve_gateways.d.ts +1 -0
- package/lib/esm/resources/axerve_gateways.js +5 -2
- package/lib/esm/resources/axerve_payments.d.ts +1 -0
- package/lib/esm/resources/axerve_payments.js +5 -2
- package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -0
- package/lib/esm/resources/billing_info_validation_rules.js +5 -2
- package/lib/esm/resources/bing_geocoders.d.ts +1 -0
- package/lib/esm/resources/bing_geocoders.js +5 -2
- package/lib/esm/resources/braintree_gateways.d.ts +1 -0
- package/lib/esm/resources/braintree_gateways.js +5 -2
- package/lib/esm/resources/braintree_payments.d.ts +1 -0
- package/lib/esm/resources/braintree_payments.js +5 -2
- package/lib/esm/resources/bundles.d.ts +1 -0
- package/lib/esm/resources/bundles.js +5 -2
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +1 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.js +5 -2
- package/lib/esm/resources/captures.d.ts +1 -0
- package/lib/esm/resources/captures.js +5 -2
- package/lib/esm/resources/carrier_accounts.d.ts +1 -0
- package/lib/esm/resources/carrier_accounts.js +5 -2
- package/lib/esm/resources/checkout_com_gateways.d.ts +1 -0
- package/lib/esm/resources/checkout_com_gateways.js +5 -2
- package/lib/esm/resources/checkout_com_payments.d.ts +1 -0
- package/lib/esm/resources/checkout_com_payments.js +5 -2
- package/lib/esm/resources/cleanups.d.ts +1 -0
- package/lib/esm/resources/cleanups.js +5 -2
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.js +5 -2
- package/lib/esm/resources/coupon_recipients.d.ts +1 -0
- package/lib/esm/resources/coupon_recipients.js +5 -2
- package/lib/esm/resources/coupons.d.ts +1 -0
- package/lib/esm/resources/coupons.js +5 -2
- package/lib/esm/resources/custom_promotion_rules.d.ts +1 -0
- package/lib/esm/resources/custom_promotion_rules.js +5 -2
- package/lib/esm/resources/customer_addresses.d.ts +1 -0
- package/lib/esm/resources/customer_addresses.js +5 -2
- package/lib/esm/resources/customer_groups.d.ts +1 -0
- package/lib/esm/resources/customer_groups.js +5 -2
- package/lib/esm/resources/customer_password_resets.d.ts +1 -0
- package/lib/esm/resources/customer_password_resets.js +5 -2
- package/lib/esm/resources/customer_payment_sources.d.ts +1 -0
- package/lib/esm/resources/customer_payment_sources.js +5 -2
- package/lib/esm/resources/customer_subscriptions.d.ts +1 -0
- package/lib/esm/resources/customer_subscriptions.js +5 -2
- package/lib/esm/resources/customers.d.ts +1 -0
- package/lib/esm/resources/customers.js +5 -2
- package/lib/esm/resources/delivery_lead_times.d.ts +1 -0
- package/lib/esm/resources/delivery_lead_times.js +5 -2
- package/lib/esm/resources/event_callbacks.d.ts +1 -0
- package/lib/esm/resources/event_callbacks.js +5 -2
- package/lib/esm/resources/events.d.ts +1 -0
- package/lib/esm/resources/events.js +5 -2
- package/lib/esm/resources/exports.d.ts +1 -0
- package/lib/esm/resources/exports.js +5 -2
- package/lib/esm/resources/external_gateways.d.ts +1 -0
- package/lib/esm/resources/external_gateways.js +5 -2
- package/lib/esm/resources/external_payments.d.ts +1 -0
- package/lib/esm/resources/external_payments.js +5 -2
- package/lib/esm/resources/external_promotions.d.ts +1 -0
- package/lib/esm/resources/external_promotions.js +5 -2
- package/lib/esm/resources/external_tax_calculators.d.ts +1 -0
- package/lib/esm/resources/external_tax_calculators.js +5 -2
- package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -0
- package/lib/esm/resources/fixed_amount_promotions.js +5 -2
- package/lib/esm/resources/fixed_price_promotions.d.ts +1 -0
- package/lib/esm/resources/fixed_price_promotions.js +5 -2
- package/lib/esm/resources/free_gift_promotions.d.ts +1 -0
- package/lib/esm/resources/free_gift_promotions.js +5 -2
- package/lib/esm/resources/free_shipping_promotions.d.ts +1 -0
- package/lib/esm/resources/free_shipping_promotions.js +5 -2
- package/lib/esm/resources/geocoders.d.ts +1 -0
- package/lib/esm/resources/geocoders.js +5 -2
- package/lib/esm/resources/gift_card_recipients.d.ts +1 -0
- package/lib/esm/resources/gift_card_recipients.js +5 -2
- package/lib/esm/resources/gift_cards.d.ts +1 -0
- package/lib/esm/resources/gift_cards.js +5 -2
- package/lib/esm/resources/google_geocoders.d.ts +1 -0
- package/lib/esm/resources/google_geocoders.js +5 -2
- package/lib/esm/resources/imports.d.ts +1 -0
- package/lib/esm/resources/imports.js +5 -2
- package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -0
- package/lib/esm/resources/in_stock_subscriptions.js +5 -2
- package/lib/esm/resources/inventory_models.d.ts +1 -0
- package/lib/esm/resources/inventory_models.js +5 -2
- package/lib/esm/resources/inventory_return_locations.d.ts +1 -0
- package/lib/esm/resources/inventory_return_locations.js +5 -2
- package/lib/esm/resources/inventory_stock_locations.d.ts +1 -0
- package/lib/esm/resources/inventory_stock_locations.js +5 -2
- package/lib/esm/resources/klarna_gateways.d.ts +1 -0
- package/lib/esm/resources/klarna_gateways.js +5 -2
- package/lib/esm/resources/klarna_payments.d.ts +1 -0
- package/lib/esm/resources/klarna_payments.js +5 -2
- package/lib/esm/resources/line_item_options.d.ts +1 -0
- package/lib/esm/resources/line_item_options.js +5 -2
- package/lib/esm/resources/line_items.d.ts +1 -0
- package/lib/esm/resources/line_items.js +5 -2
- package/lib/esm/resources/manual_gateways.d.ts +1 -0
- package/lib/esm/resources/manual_gateways.js +5 -2
- package/lib/esm/resources/manual_tax_calculators.d.ts +1 -0
- package/lib/esm/resources/manual_tax_calculators.js +5 -2
- package/lib/esm/resources/markets.d.ts +1 -0
- package/lib/esm/resources/markets.js +5 -2
- package/lib/esm/resources/merchants.d.ts +1 -0
- package/lib/esm/resources/merchants.js +5 -2
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -0
- package/lib/esm/resources/order_amount_promotion_rules.js +5 -2
- package/lib/esm/resources/order_copies.d.ts +1 -0
- package/lib/esm/resources/order_copies.js +5 -2
- package/lib/esm/resources/order_factories.d.ts +1 -0
- package/lib/esm/resources/order_factories.js +5 -2
- package/lib/esm/resources/order_subscription_items.d.ts +1 -0
- package/lib/esm/resources/order_subscription_items.js +5 -2
- package/lib/esm/resources/order_subscriptions.d.ts +1 -0
- package/lib/esm/resources/order_subscriptions.js +5 -2
- package/lib/esm/resources/order_validation_rules.d.ts +1 -0
- package/lib/esm/resources/order_validation_rules.js +5 -2
- package/lib/esm/resources/orders.d.ts +1 -0
- package/lib/esm/resources/orders.js +5 -2
- package/lib/esm/resources/organization.d.ts +1 -0
- package/lib/esm/resources/organization.js +5 -2
- package/lib/esm/resources/packages.d.ts +1 -0
- package/lib/esm/resources/packages.js +5 -2
- package/lib/esm/resources/parcel_line_items.d.ts +1 -0
- package/lib/esm/resources/parcel_line_items.js +5 -2
- package/lib/esm/resources/parcels.d.ts +1 -0
- package/lib/esm/resources/parcels.js +5 -2
- package/lib/esm/resources/payment_gateways.d.ts +1 -0
- package/lib/esm/resources/payment_gateways.js +5 -2
- package/lib/esm/resources/payment_methods.d.ts +1 -0
- package/lib/esm/resources/payment_methods.js +5 -2
- package/lib/esm/resources/payment_options.d.ts +1 -0
- package/lib/esm/resources/payment_options.js +5 -2
- package/lib/esm/resources/paypal_gateways.d.ts +1 -0
- package/lib/esm/resources/paypal_gateways.js +5 -2
- package/lib/esm/resources/paypal_payments.d.ts +1 -0
- package/lib/esm/resources/paypal_payments.js +5 -2
- package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -0
- package/lib/esm/resources/percentage_discount_promotions.js +5 -2
- package/lib/esm/resources/price_frequency_tiers.d.ts +1 -0
- package/lib/esm/resources/price_frequency_tiers.js +5 -2
- package/lib/esm/resources/price_lists.d.ts +1 -0
- package/lib/esm/resources/price_lists.js +5 -2
- package/lib/esm/resources/price_tiers.d.ts +1 -0
- package/lib/esm/resources/price_tiers.js +5 -2
- package/lib/esm/resources/price_volume_tiers.d.ts +1 -0
- package/lib/esm/resources/price_volume_tiers.js +5 -2
- package/lib/esm/resources/prices.d.ts +1 -0
- package/lib/esm/resources/prices.js +5 -2
- package/lib/esm/resources/promotion_rules.d.ts +1 -0
- package/lib/esm/resources/promotion_rules.js +5 -2
- package/lib/esm/resources/promotions.d.ts +1 -0
- package/lib/esm/resources/promotions.js +5 -2
- package/lib/esm/resources/recurring_order_copies.d.ts +1 -0
- package/lib/esm/resources/recurring_order_copies.js +5 -2
- package/lib/esm/resources/refunds.d.ts +1 -0
- package/lib/esm/resources/refunds.js +5 -2
- package/lib/esm/resources/reserved_stocks.d.ts +1 -0
- package/lib/esm/resources/reserved_stocks.js +5 -2
- package/lib/esm/resources/resource_errors.d.ts +1 -0
- package/lib/esm/resources/resource_errors.js +5 -2
- package/lib/esm/resources/return_line_items.d.ts +1 -0
- package/lib/esm/resources/return_line_items.js +5 -2
- package/lib/esm/resources/returns.d.ts +1 -0
- package/lib/esm/resources/returns.js +5 -2
- package/lib/esm/resources/satispay_gateways.d.ts +1 -0
- package/lib/esm/resources/satispay_gateways.js +5 -2
- package/lib/esm/resources/satispay_payments.d.ts +1 -0
- package/lib/esm/resources/satispay_payments.js +5 -2
- package/lib/esm/resources/shipments.d.ts +1 -0
- package/lib/esm/resources/shipments.js +5 -2
- package/lib/esm/resources/shipping_categories.d.ts +1 -0
- package/lib/esm/resources/shipping_categories.js +5 -2
- package/lib/esm/resources/shipping_method_tiers.d.ts +1 -0
- package/lib/esm/resources/shipping_method_tiers.js +5 -2
- package/lib/esm/resources/shipping_methods.d.ts +1 -0
- package/lib/esm/resources/shipping_methods.js +5 -2
- package/lib/esm/resources/shipping_weight_tiers.d.ts +1 -0
- package/lib/esm/resources/shipping_weight_tiers.js +5 -2
- package/lib/esm/resources/shipping_zones.d.ts +1 -0
- package/lib/esm/resources/shipping_zones.js +5 -2
- package/lib/esm/resources/sku_list_items.d.ts +1 -0
- package/lib/esm/resources/sku_list_items.js +5 -2
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -0
- package/lib/esm/resources/sku_list_promotion_rules.js +5 -2
- package/lib/esm/resources/sku_lists.d.ts +1 -0
- package/lib/esm/resources/sku_lists.js +5 -2
- package/lib/esm/resources/sku_options.d.ts +1 -0
- package/lib/esm/resources/sku_options.js +5 -2
- package/lib/esm/resources/skus.d.ts +1 -0
- package/lib/esm/resources/skus.js +5 -2
- package/lib/esm/resources/stock_items.d.ts +1 -0
- package/lib/esm/resources/stock_items.js +5 -2
- package/lib/esm/resources/stock_line_items.d.ts +1 -0
- package/lib/esm/resources/stock_line_items.js +5 -2
- package/lib/esm/resources/stock_locations.d.ts +1 -0
- package/lib/esm/resources/stock_locations.js +5 -2
- package/lib/esm/resources/stock_reservations.d.ts +1 -0
- package/lib/esm/resources/stock_reservations.js +5 -2
- package/lib/esm/resources/stock_transfers.d.ts +1 -0
- package/lib/esm/resources/stock_transfers.js +5 -2
- package/lib/esm/resources/stripe_gateways.d.ts +1 -0
- package/lib/esm/resources/stripe_gateways.js +5 -2
- package/lib/esm/resources/stripe_payments.d.ts +1 -0
- package/lib/esm/resources/stripe_payments.js +5 -2
- package/lib/esm/resources/subscription_models.d.ts +1 -0
- package/lib/esm/resources/subscription_models.js +5 -2
- package/lib/esm/resources/tags.d.ts +1 -0
- package/lib/esm/resources/tags.js +5 -2
- package/lib/esm/resources/tax_calculators.d.ts +1 -0
- package/lib/esm/resources/tax_calculators.js +5 -2
- package/lib/esm/resources/tax_categories.d.ts +1 -0
- package/lib/esm/resources/tax_categories.js +5 -2
- package/lib/esm/resources/tax_rules.d.ts +1 -0
- package/lib/esm/resources/tax_rules.js +5 -2
- package/lib/esm/resources/taxjar_accounts.d.ts +1 -0
- package/lib/esm/resources/taxjar_accounts.js +5 -2
- package/lib/esm/resources/transactions.d.ts +1 -0
- package/lib/esm/resources/transactions.js +5 -2
- package/lib/esm/resources/versions.d.ts +1 -0
- package/lib/esm/resources/versions.js +5 -2
- package/lib/esm/resources/voids.d.ts +1 -0
- package/lib/esm/resources/voids.js +5 -2
- package/lib/esm/resources/webhooks.d.ts +1 -0
- package/lib/esm/resources/webhooks.js +5 -2
- package/lib/esm/resources/wire_transfers.d.ts +1 -0
- package/lib/esm/resources/wire_transfers.js +5 -2
- package/lib/esm/static.js +0 -1
- package/lib/esm/util.js +1 -27
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +20 -17
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class CouponRecipients extends ApiResource {
|
3
|
+
static TYPE = 'coupon_recipients';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: CouponRecipients.TYPE }, params, options);
|
5
6
|
}
|
@@ -25,11 +26,13 @@ class CouponRecipients extends ApiResource {
|
|
25
26
|
return resource.type && (resource.type === CouponRecipients.TYPE);
|
26
27
|
}
|
27
28
|
relationship(id) {
|
28
|
-
return (
|
29
|
+
return super.relationshipOneToOne(id);
|
30
|
+
}
|
31
|
+
relationshipToMany(...ids) {
|
32
|
+
return super.relationshipOneToMany(...ids);
|
29
33
|
}
|
30
34
|
type() {
|
31
35
|
return CouponRecipients.TYPE;
|
32
36
|
}
|
33
37
|
}
|
34
|
-
CouponRecipients.TYPE = 'coupon_recipients';
|
35
38
|
export default CouponRecipients;
|
@@ -65,6 +65,7 @@ declare class Coupons extends ApiResource<Coupon> {
|
|
65
65
|
versions(couponId: string | Coupon, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
66
66
|
isCoupon(resource: any): resource is Coupon;
|
67
67
|
relationship(id: string | ResourceId | null): CouponRel;
|
68
|
+
relationshipToMany(...ids: string[]): CouponRel[];
|
68
69
|
type(): CouponType;
|
69
70
|
}
|
70
71
|
export default Coupons;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Coupons extends ApiResource {
|
3
|
+
static TYPE = 'coupons';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: Coupons.TYPE }, params, options);
|
5
6
|
}
|
@@ -33,11 +34,13 @@ class Coupons extends ApiResource {
|
|
33
34
|
return resource.type && (resource.type === Coupons.TYPE);
|
34
35
|
}
|
35
36
|
relationship(id) {
|
36
|
-
return (
|
37
|
+
return super.relationshipOneToOne(id);
|
38
|
+
}
|
39
|
+
relationshipToMany(...ids) {
|
40
|
+
return super.relationshipOneToMany(...ids);
|
37
41
|
}
|
38
42
|
type() {
|
39
43
|
return Coupons.TYPE;
|
40
44
|
}
|
41
45
|
}
|
42
|
-
Coupons.TYPE = 'coupons';
|
43
46
|
export default Coupons;
|
@@ -56,6 +56,7 @@ declare class CustomPromotionRules extends ApiResource<CustomPromotionRule> {
|
|
56
56
|
versions(customPromotionRuleId: string | CustomPromotionRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
57
57
|
isCustomPromotionRule(resource: any): resource is CustomPromotionRule;
|
58
58
|
relationship(id: string | ResourceId | null): CustomPromotionRuleRel;
|
59
|
+
relationshipToMany(...ids: string[]): CustomPromotionRuleRel[];
|
59
60
|
type(): CustomPromotionRuleType;
|
60
61
|
}
|
61
62
|
export default CustomPromotionRules;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class CustomPromotionRules extends ApiResource {
|
3
|
+
static TYPE = 'custom_promotion_rules';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: CustomPromotionRules.TYPE }, params, options);
|
5
6
|
}
|
@@ -17,11 +18,13 @@ class CustomPromotionRules extends ApiResource {
|
|
17
18
|
return resource.type && (resource.type === CustomPromotionRules.TYPE);
|
18
19
|
}
|
19
20
|
relationship(id) {
|
20
|
-
return (
|
21
|
+
return super.relationshipOneToOne(id);
|
22
|
+
}
|
23
|
+
relationshipToMany(...ids) {
|
24
|
+
return super.relationshipOneToMany(...ids);
|
21
25
|
}
|
22
26
|
type() {
|
23
27
|
return CustomPromotionRules.TYPE;
|
24
28
|
}
|
25
29
|
}
|
26
|
-
CustomPromotionRules.TYPE = 'custom_promotion_rules';
|
27
30
|
export default CustomPromotionRules;
|
@@ -44,6 +44,7 @@ declare class CustomerAddresses extends ApiResource<CustomerAddress> {
|
|
44
44
|
versions(customerAddressId: string | CustomerAddress, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
45
45
|
isCustomerAddress(resource: any): resource is CustomerAddress;
|
46
46
|
relationship(id: string | ResourceId | null): CustomerAddressRel;
|
47
|
+
relationshipToMany(...ids: string[]): CustomerAddressRel[];
|
47
48
|
type(): CustomerAddressType;
|
48
49
|
}
|
49
50
|
export default CustomerAddresses;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class CustomerAddresses extends ApiResource {
|
3
|
+
static TYPE = 'customer_addresses';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: CustomerAddresses.TYPE }, params, options);
|
5
6
|
}
|
@@ -29,11 +30,13 @@ class CustomerAddresses extends ApiResource {
|
|
29
30
|
return resource.type && (resource.type === CustomerAddresses.TYPE);
|
30
31
|
}
|
31
32
|
relationship(id) {
|
32
|
-
return (
|
33
|
+
return super.relationshipOneToOne(id);
|
34
|
+
}
|
35
|
+
relationshipToMany(...ids) {
|
36
|
+
return super.relationshipOneToMany(...ids);
|
33
37
|
}
|
34
38
|
type() {
|
35
39
|
return CustomerAddresses.TYPE;
|
36
40
|
}
|
37
41
|
}
|
38
|
-
CustomerAddresses.TYPE = 'customer_addresses';
|
39
42
|
export default CustomerAddresses;
|
@@ -34,6 +34,7 @@ declare class CustomerGroups extends ApiResource<CustomerGroup> {
|
|
34
34
|
versions(customerGroupId: string | CustomerGroup, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
35
35
|
isCustomerGroup(resource: any): resource is CustomerGroup;
|
36
36
|
relationship(id: string | ResourceId | null): CustomerGroupRel;
|
37
|
+
relationshipToMany(...ids: string[]): CustomerGroupRel[];
|
37
38
|
type(): CustomerGroupType;
|
38
39
|
}
|
39
40
|
export default CustomerGroups;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class CustomerGroups extends ApiResource {
|
3
|
+
static TYPE = 'customer_groups';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: CustomerGroups.TYPE }, params, options);
|
5
6
|
}
|
@@ -29,11 +30,13 @@ class CustomerGroups extends ApiResource {
|
|
29
30
|
return resource.type && (resource.type === CustomerGroups.TYPE);
|
30
31
|
}
|
31
32
|
relationship(id) {
|
32
|
-
return (
|
33
|
+
return super.relationshipOneToOne(id);
|
34
|
+
}
|
35
|
+
relationshipToMany(...ids) {
|
36
|
+
return super.relationshipOneToMany(...ids);
|
33
37
|
}
|
34
38
|
type() {
|
35
39
|
return CustomerGroups.TYPE;
|
36
40
|
}
|
37
41
|
}
|
38
|
-
CustomerGroups.TYPE = 'customer_groups';
|
39
42
|
export default CustomerGroups;
|
@@ -32,6 +32,7 @@ declare class CustomerPasswordResets extends ApiResource<CustomerPasswordReset>
|
|
32
32
|
_reset_password_token(id: string | CustomerPasswordReset, triggerValue: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPasswordReset>;
|
33
33
|
isCustomerPasswordReset(resource: any): resource is CustomerPasswordReset;
|
34
34
|
relationship(id: string | ResourceId | null): CustomerPasswordResetRel;
|
35
|
+
relationshipToMany(...ids: string[]): CustomerPasswordResetRel[];
|
35
36
|
type(): CustomerPasswordResetType;
|
36
37
|
}
|
37
38
|
export default CustomerPasswordResets;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class CustomerPasswordResets extends ApiResource {
|
3
|
+
static TYPE = 'customer_password_resets';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: CustomerPasswordResets.TYPE }, params, options);
|
5
6
|
}
|
@@ -24,11 +25,13 @@ class CustomerPasswordResets extends ApiResource {
|
|
24
25
|
return resource.type && (resource.type === CustomerPasswordResets.TYPE);
|
25
26
|
}
|
26
27
|
relationship(id) {
|
27
|
-
return (
|
28
|
+
return super.relationshipOneToOne(id);
|
29
|
+
}
|
30
|
+
relationshipToMany(...ids) {
|
31
|
+
return super.relationshipOneToMany(...ids);
|
28
32
|
}
|
29
33
|
type() {
|
30
34
|
return CustomerPasswordResets.TYPE;
|
31
35
|
}
|
32
36
|
}
|
33
|
-
CustomerPasswordResets.TYPE = 'customer_password_resets';
|
34
37
|
export default CustomerPasswordResets;
|
@@ -80,6 +80,7 @@ declare class CustomerPaymentSources extends ApiResource<CustomerPaymentSource>
|
|
80
80
|
versions(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
81
81
|
isCustomerPaymentSource(resource: any): resource is CustomerPaymentSource;
|
82
82
|
relationship(id: string | ResourceId | null): CustomerPaymentSourceRel;
|
83
|
+
relationshipToMany(...ids: string[]): CustomerPaymentSourceRel[];
|
83
84
|
type(): CustomerPaymentSourceType;
|
84
85
|
}
|
85
86
|
export default CustomerPaymentSources;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class CustomerPaymentSources extends ApiResource {
|
3
|
+
static TYPE = 'customer_payment_sources';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: CustomerPaymentSources.TYPE }, params, options);
|
5
6
|
}
|
@@ -25,11 +26,13 @@ class CustomerPaymentSources extends ApiResource {
|
|
25
26
|
return resource.type && (resource.type === CustomerPaymentSources.TYPE);
|
26
27
|
}
|
27
28
|
relationship(id) {
|
28
|
-
return (
|
29
|
+
return super.relationshipOneToOne(id);
|
30
|
+
}
|
31
|
+
relationshipToMany(...ids) {
|
32
|
+
return super.relationshipOneToMany(...ids);
|
29
33
|
}
|
30
34
|
type() {
|
31
35
|
return CustomerPaymentSources.TYPE;
|
32
36
|
}
|
33
37
|
}
|
34
|
-
CustomerPaymentSources.TYPE = 'customer_payment_sources';
|
35
38
|
export default CustomerPaymentSources;
|
@@ -29,6 +29,7 @@ declare class CustomerSubscriptions extends ApiResource<CustomerSubscription> {
|
|
29
29
|
versions(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
30
30
|
isCustomerSubscription(resource: any): resource is CustomerSubscription;
|
31
31
|
relationship(id: string | ResourceId | null): CustomerSubscriptionRel;
|
32
|
+
relationshipToMany(...ids: string[]): CustomerSubscriptionRel[];
|
32
33
|
type(): CustomerSubscriptionType;
|
33
34
|
}
|
34
35
|
export default CustomerSubscriptions;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class CustomerSubscriptions extends ApiResource {
|
3
|
+
static TYPE = 'customer_subscriptions';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: CustomerSubscriptions.TYPE }, params, options);
|
5
6
|
}
|
@@ -25,11 +26,13 @@ class CustomerSubscriptions extends ApiResource {
|
|
25
26
|
return resource.type && (resource.type === CustomerSubscriptions.TYPE);
|
26
27
|
}
|
27
28
|
relationship(id) {
|
28
|
-
return (
|
29
|
+
return super.relationshipOneToOne(id);
|
30
|
+
}
|
31
|
+
relationshipToMany(...ids) {
|
32
|
+
return super.relationshipOneToMany(...ids);
|
29
33
|
}
|
30
34
|
type() {
|
31
35
|
return CustomerSubscriptions.TYPE;
|
32
36
|
}
|
33
37
|
}
|
34
|
-
CustomerSubscriptions.TYPE = 'customer_subscriptions';
|
35
38
|
export default CustomerSubscriptions;
|
@@ -70,6 +70,7 @@ declare class Customers extends ApiResource<Customer> {
|
|
70
70
|
tags(customerId: string | Customer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
71
71
|
isCustomer(resource: any): resource is Customer;
|
72
72
|
relationship(id: string | ResourceId | null): CustomerRel;
|
73
|
+
relationshipToMany(...ids: string[]): CustomerRel[];
|
73
74
|
type(): CustomerType;
|
74
75
|
}
|
75
76
|
export default Customers;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Customers extends ApiResource {
|
3
|
+
static TYPE = 'customers';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: Customers.TYPE }, params, options);
|
5
6
|
}
|
@@ -57,11 +58,13 @@ class Customers extends ApiResource {
|
|
57
58
|
return resource.type && (resource.type === Customers.TYPE);
|
58
59
|
}
|
59
60
|
relationship(id) {
|
60
|
-
return (
|
61
|
+
return super.relationshipOneToOne(id);
|
62
|
+
}
|
63
|
+
relationshipToMany(...ids) {
|
64
|
+
return super.relationshipOneToMany(...ids);
|
61
65
|
}
|
62
66
|
type() {
|
63
67
|
return Customers.TYPE;
|
64
68
|
}
|
65
69
|
}
|
66
|
-
Customers.TYPE = 'customers';
|
67
70
|
export default Customers;
|
@@ -49,6 +49,7 @@ declare class DeliveryLeadTimes extends ApiResource<DeliveryLeadTime> {
|
|
49
49
|
versions(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
50
50
|
isDeliveryLeadTime(resource: any): resource is DeliveryLeadTime;
|
51
51
|
relationship(id: string | ResourceId | null): DeliveryLeadTimeRel;
|
52
|
+
relationshipToMany(...ids: string[]): DeliveryLeadTimeRel[];
|
52
53
|
type(): DeliveryLeadTimeType;
|
53
54
|
}
|
54
55
|
export default DeliveryLeadTimes;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class DeliveryLeadTimes extends ApiResource {
|
3
|
+
static TYPE = 'delivery_lead_times';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: DeliveryLeadTimes.TYPE }, params, options);
|
5
6
|
}
|
@@ -29,11 +30,13 @@ class DeliveryLeadTimes extends ApiResource {
|
|
29
30
|
return resource.type && (resource.type === DeliveryLeadTimes.TYPE);
|
30
31
|
}
|
31
32
|
relationship(id) {
|
32
|
-
return (
|
33
|
+
return super.relationshipOneToOne(id);
|
34
|
+
}
|
35
|
+
relationshipToMany(...ids) {
|
36
|
+
return super.relationshipOneToMany(...ids);
|
33
37
|
}
|
34
38
|
type() {
|
35
39
|
return DeliveryLeadTimes.TYPE;
|
36
40
|
}
|
37
41
|
}
|
38
|
-
DeliveryLeadTimes.TYPE = 'delivery_lead_times';
|
39
42
|
export default DeliveryLeadTimes;
|
@@ -19,6 +19,7 @@ declare class EventCallbacks extends ApiResource<EventCallback> {
|
|
19
19
|
webhook(eventCallbackId: string | EventCallback, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
20
20
|
isEventCallback(resource: any): resource is EventCallback;
|
21
21
|
relationship(id: string | ResourceId | null): EventCallbackRel;
|
22
|
+
relationshipToMany(...ids: string[]): EventCallbackRel[];
|
22
23
|
type(): EventCallbackType;
|
23
24
|
}
|
24
25
|
export default EventCallbacks;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class EventCallbacks extends ApiResource {
|
3
|
+
static TYPE = 'event_callbacks';
|
3
4
|
async webhook(eventCallbackId, params, options) {
|
4
5
|
const _eventCallbackId = eventCallbackId.id || eventCallbackId;
|
5
6
|
return this.resources.fetch({ type: 'webhooks' }, `event_callbacks/${_eventCallbackId}/webhook`, params, options);
|
@@ -8,11 +9,13 @@ class EventCallbacks extends ApiResource {
|
|
8
9
|
return resource.type && (resource.type === EventCallbacks.TYPE);
|
9
10
|
}
|
10
11
|
relationship(id) {
|
11
|
-
return (
|
12
|
+
return super.relationshipOneToOne(id);
|
13
|
+
}
|
14
|
+
relationshipToMany(...ids) {
|
15
|
+
return super.relationshipOneToMany(...ids);
|
12
16
|
}
|
13
17
|
type() {
|
14
18
|
return EventCallbacks.TYPE;
|
15
19
|
}
|
16
20
|
}
|
17
|
-
EventCallbacks.TYPE = 'event_callbacks';
|
18
21
|
export default EventCallbacks;
|
@@ -19,6 +19,7 @@ declare class Events extends ApiResource<Event> {
|
|
19
19
|
last_event_callbacks(eventId: string | Event, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
|
20
20
|
isEvent(resource: any): resource is Event;
|
21
21
|
relationship(id: string | ResourceId | null): EventRel;
|
22
|
+
relationshipToMany(...ids: string[]): EventRel[];
|
22
23
|
type(): EventType;
|
23
24
|
}
|
24
25
|
export default Events;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Events extends ApiResource {
|
3
|
+
static TYPE = 'events';
|
3
4
|
async webhooks(eventId, params, options) {
|
4
5
|
const _eventId = eventId.id || eventId;
|
5
6
|
return this.resources.fetch({ type: 'webhooks' }, `events/${_eventId}/webhooks`, params, options);
|
@@ -12,11 +13,13 @@ class Events extends ApiResource {
|
|
12
13
|
return resource.type && (resource.type === Events.TYPE);
|
13
14
|
}
|
14
15
|
relationship(id) {
|
15
|
-
return (
|
16
|
+
return super.relationshipOneToOne(id);
|
17
|
+
}
|
18
|
+
relationshipToMany(...ids) {
|
19
|
+
return super.relationshipOneToMany(...ids);
|
16
20
|
}
|
17
21
|
type() {
|
18
22
|
return Events.TYPE;
|
19
23
|
}
|
20
24
|
}
|
21
|
-
Events.TYPE = 'events';
|
22
25
|
export default Events;
|
@@ -35,6 +35,7 @@ declare class Exports extends ApiResource<Export> {
|
|
35
35
|
events(exportId: string | Export, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
36
36
|
isExport(resource: any): resource is Export;
|
37
37
|
relationship(id: string | ResourceId | null): ExportRel;
|
38
|
+
relationshipToMany(...ids: string[]): ExportRel[];
|
38
39
|
type(): ExportType;
|
39
40
|
}
|
40
41
|
export default Exports;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class Exports extends ApiResource {
|
3
|
+
static TYPE = 'exports';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: Exports.TYPE }, params, options);
|
5
6
|
}
|
@@ -14,11 +15,13 @@ class Exports extends ApiResource {
|
|
14
15
|
return resource.type && (resource.type === Exports.TYPE);
|
15
16
|
}
|
16
17
|
relationship(id) {
|
17
|
-
return (
|
18
|
+
return super.relationshipOneToOne(id);
|
19
|
+
}
|
20
|
+
relationshipToMany(...ids) {
|
21
|
+
return super.relationshipOneToMany(...ids);
|
18
22
|
}
|
19
23
|
type() {
|
20
24
|
return Exports.TYPE;
|
21
25
|
}
|
22
26
|
}
|
23
|
-
Exports.TYPE = 'exports';
|
24
27
|
export default Exports;
|
@@ -51,6 +51,7 @@ declare class ExternalGateways extends ApiResource<ExternalGateway> {
|
|
51
51
|
_reset_circuit(id: string | ExternalGateway, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
|
52
52
|
isExternalGateway(resource: any): resource is ExternalGateway;
|
53
53
|
relationship(id: string | ResourceId | null): ExternalGatewayRel;
|
54
|
+
relationshipToMany(...ids: string[]): ExternalGatewayRel[];
|
54
55
|
type(): ExternalGatewayType;
|
55
56
|
}
|
56
57
|
export default ExternalGateways;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class ExternalGateways extends ApiResource {
|
3
|
+
static TYPE = 'external_gateways';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: ExternalGateways.TYPE }, params, options);
|
5
6
|
}
|
@@ -28,11 +29,13 @@ class ExternalGateways extends ApiResource {
|
|
28
29
|
return resource.type && (resource.type === ExternalGateways.TYPE);
|
29
30
|
}
|
30
31
|
relationship(id) {
|
31
|
-
return (
|
32
|
+
return super.relationshipOneToOne(id);
|
33
|
+
}
|
34
|
+
relationshipToMany(...ids) {
|
35
|
+
return super.relationshipOneToMany(...ids);
|
32
36
|
}
|
33
37
|
type() {
|
34
38
|
return ExternalGateways.TYPE;
|
35
39
|
}
|
36
40
|
}
|
37
|
-
ExternalGateways.TYPE = 'external_gateways';
|
38
41
|
export default ExternalGateways;
|
@@ -42,6 +42,7 @@ declare class ExternalPayments extends ApiResource<ExternalPayment> {
|
|
42
42
|
versions(externalPaymentId: string | ExternalPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
43
43
|
isExternalPayment(resource: any): resource is ExternalPayment;
|
44
44
|
relationship(id: string | ResourceId | null): ExternalPaymentRel;
|
45
|
+
relationshipToMany(...ids: string[]): ExternalPaymentRel[];
|
45
46
|
type(): ExternalPaymentType;
|
46
47
|
}
|
47
48
|
export default ExternalPayments;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class ExternalPayments extends ApiResource {
|
3
|
+
static TYPE = 'external_payments';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: ExternalPayments.TYPE }, params, options);
|
5
6
|
}
|
@@ -29,11 +30,13 @@ class ExternalPayments extends ApiResource {
|
|
29
30
|
return resource.type && (resource.type === ExternalPayments.TYPE);
|
30
31
|
}
|
31
32
|
relationship(id) {
|
32
|
-
return (
|
33
|
+
return super.relationshipOneToOne(id);
|
34
|
+
}
|
35
|
+
relationshipToMany(...ids) {
|
36
|
+
return super.relationshipOneToMany(...ids);
|
33
37
|
}
|
34
38
|
type() {
|
35
39
|
return ExternalPayments.TYPE;
|
36
40
|
}
|
37
41
|
}
|
38
|
-
ExternalPayments.TYPE = 'external_payments';
|
39
42
|
export default ExternalPayments;
|
@@ -130,6 +130,7 @@ declare class ExternalPromotions extends ApiResource<ExternalPromotion> {
|
|
130
130
|
_reset_circuit(id: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
131
131
|
isExternalPromotion(resource: any): resource is ExternalPromotion;
|
132
132
|
relationship(id: string | ResourceId | null): ExternalPromotionRel;
|
133
|
+
relationshipToMany(...ids: string[]): ExternalPromotionRel[];
|
133
134
|
type(): ExternalPromotionType;
|
134
135
|
}
|
135
136
|
export default ExternalPromotions;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class ExternalPromotions extends ApiResource {
|
3
|
+
static TYPE = 'external_promotions';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: ExternalPromotions.TYPE }, params, options);
|
5
6
|
}
|
@@ -70,11 +71,13 @@ class ExternalPromotions extends ApiResource {
|
|
70
71
|
return resource.type && (resource.type === ExternalPromotions.TYPE);
|
71
72
|
}
|
72
73
|
relationship(id) {
|
73
|
-
return (
|
74
|
+
return super.relationshipOneToOne(id);
|
75
|
+
}
|
76
|
+
relationshipToMany(...ids) {
|
77
|
+
return super.relationshipOneToMany(...ids);
|
74
78
|
}
|
75
79
|
type() {
|
76
80
|
return ExternalPromotions.TYPE;
|
77
81
|
}
|
78
82
|
}
|
79
|
-
ExternalPromotions.TYPE = 'external_promotions';
|
80
83
|
export default ExternalPromotions;
|
@@ -39,6 +39,7 @@ declare class ExternalTaxCalculators extends ApiResource<ExternalTaxCalculator>
|
|
39
39
|
_reset_circuit(id: string | ExternalTaxCalculator, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalTaxCalculator>;
|
40
40
|
isExternalTaxCalculator(resource: any): resource is ExternalTaxCalculator;
|
41
41
|
relationship(id: string | ResourceId | null): ExternalTaxCalculatorRel;
|
42
|
+
relationshipToMany(...ids: string[]): ExternalTaxCalculatorRel[];
|
42
43
|
type(): ExternalTaxCalculatorType;
|
43
44
|
}
|
44
45
|
export default ExternalTaxCalculators;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class ExternalTaxCalculators extends ApiResource {
|
3
|
+
static TYPE = 'external_tax_calculators';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: ExternalTaxCalculators.TYPE }, params, options);
|
5
6
|
}
|
@@ -28,11 +29,13 @@ class ExternalTaxCalculators extends ApiResource {
|
|
28
29
|
return resource.type && (resource.type === ExternalTaxCalculators.TYPE);
|
29
30
|
}
|
30
31
|
relationship(id) {
|
31
|
-
return (
|
32
|
+
return super.relationshipOneToOne(id);
|
33
|
+
}
|
34
|
+
relationshipToMany(...ids) {
|
35
|
+
return super.relationshipOneToMany(...ids);
|
32
36
|
}
|
33
37
|
type() {
|
34
38
|
return ExternalTaxCalculators.TYPE;
|
35
39
|
}
|
36
40
|
}
|
37
|
-
ExternalTaxCalculators.TYPE = 'external_tax_calculators';
|
38
41
|
export default ExternalTaxCalculators;
|
@@ -127,6 +127,7 @@ declare class FixedAmountPromotions extends ApiResource<FixedAmountPromotion> {
|
|
127
127
|
_enable(id: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<FixedAmountPromotion>;
|
128
128
|
isFixedAmountPromotion(resource: any): resource is FixedAmountPromotion;
|
129
129
|
relationship(id: string | ResourceId | null): FixedAmountPromotionRel;
|
130
|
+
relationshipToMany(...ids: string[]): FixedAmountPromotionRel[];
|
130
131
|
type(): FixedAmountPromotionType;
|
131
132
|
}
|
132
133
|
export default FixedAmountPromotions;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class FixedAmountPromotions extends ApiResource {
|
3
|
+
static TYPE = 'fixed_amount_promotions';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: FixedAmountPromotions.TYPE }, params, options);
|
5
6
|
}
|
@@ -67,11 +68,13 @@ class FixedAmountPromotions extends ApiResource {
|
|
67
68
|
return resource.type && (resource.type === FixedAmountPromotions.TYPE);
|
68
69
|
}
|
69
70
|
relationship(id) {
|
70
|
-
return (
|
71
|
+
return super.relationshipOneToOne(id);
|
72
|
+
}
|
73
|
+
relationshipToMany(...ids) {
|
74
|
+
return super.relationshipOneToMany(...ids);
|
71
75
|
}
|
72
76
|
type() {
|
73
77
|
return FixedAmountPromotions.TYPE;
|
74
78
|
}
|
75
79
|
}
|
76
|
-
FixedAmountPromotions.TYPE = 'fixed_amount_promotions';
|
77
80
|
export default FixedAmountPromotions;
|
@@ -127,6 +127,7 @@ declare class FixedPricePromotions extends ApiResource<FixedPricePromotion> {
|
|
127
127
|
_enable(id: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<FixedPricePromotion>;
|
128
128
|
isFixedPricePromotion(resource: any): resource is FixedPricePromotion;
|
129
129
|
relationship(id: string | ResourceId | null): FixedPricePromotionRel;
|
130
|
+
relationshipToMany(...ids: string[]): FixedPricePromotionRel[];
|
130
131
|
type(): FixedPricePromotionType;
|
131
132
|
}
|
132
133
|
export default FixedPricePromotions;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class FixedPricePromotions extends ApiResource {
|
3
|
+
static TYPE = 'fixed_price_promotions';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: FixedPricePromotions.TYPE }, params, options);
|
5
6
|
}
|
@@ -67,11 +68,13 @@ class FixedPricePromotions extends ApiResource {
|
|
67
68
|
return resource.type && (resource.type === FixedPricePromotions.TYPE);
|
68
69
|
}
|
69
70
|
relationship(id) {
|
70
|
-
return (
|
71
|
+
return super.relationshipOneToOne(id);
|
72
|
+
}
|
73
|
+
relationshipToMany(...ids) {
|
74
|
+
return super.relationshipOneToMany(...ids);
|
71
75
|
}
|
72
76
|
type() {
|
73
77
|
return FixedPricePromotions.TYPE;
|
74
78
|
}
|
75
79
|
}
|
76
|
-
FixedPricePromotions.TYPE = 'fixed_price_promotions';
|
77
80
|
export default FixedPricePromotions;
|
@@ -125,6 +125,7 @@ declare class FreeGiftPromotions extends ApiResource<FreeGiftPromotion> {
|
|
125
125
|
_enable(id: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<FreeGiftPromotion>;
|
126
126
|
isFreeGiftPromotion(resource: any): resource is FreeGiftPromotion;
|
127
127
|
relationship(id: string | ResourceId | null): FreeGiftPromotionRel;
|
128
|
+
relationshipToMany(...ids: string[]): FreeGiftPromotionRel[];
|
128
129
|
type(): FreeGiftPromotionType;
|
129
130
|
}
|
130
131
|
export default FreeGiftPromotions;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
2
|
class FreeGiftPromotions extends ApiResource {
|
3
|
+
static TYPE = 'free_gift_promotions';
|
3
4
|
async create(resource, params, options) {
|
4
5
|
return this.resources.create({ ...resource, type: FreeGiftPromotions.TYPE }, params, options);
|
5
6
|
}
|
@@ -67,11 +68,13 @@ class FreeGiftPromotions extends ApiResource {
|
|
67
68
|
return resource.type && (resource.type === FreeGiftPromotions.TYPE);
|
68
69
|
}
|
69
70
|
relationship(id) {
|
70
|
-
return (
|
71
|
+
return super.relationshipOneToOne(id);
|
72
|
+
}
|
73
|
+
relationshipToMany(...ids) {
|
74
|
+
return super.relationshipOneToMany(...ids);
|
71
75
|
}
|
72
76
|
type() {
|
73
77
|
return FreeGiftPromotions.TYPE;
|
74
78
|
}
|
75
79
|
}
|
76
|
-
FreeGiftPromotions.TYPE = 'free_gift_promotions';
|
77
80
|
export default FreeGiftPromotions;
|