@commercelayer/sdk 4.21.0 → 4.23.0
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 +109 -1
- package/lib/cjs/api.js +343 -1
- package/lib/cjs/client.d.ts +31 -1
- package/lib/cjs/client.js +123 -1
- package/lib/cjs/commercelayer.d.ts +133 -1
- package/lib/cjs/commercelayer.js +224 -1
- package/lib/cjs/common.d.ts +4 -1
- package/lib/cjs/common.js +14 -1
- package/lib/cjs/config.d.ts +11 -1
- package/lib/cjs/config.js +13 -1
- package/lib/cjs/debug.d.ts +3 -1
- package/lib/cjs/debug.js +42 -1
- package/lib/cjs/error.d.ts +28 -1
- package/lib/cjs/error.js +43 -1
- package/lib/cjs/index.d.ts +7 -1
- package/lib/cjs/index.js +29 -1
- package/lib/cjs/interceptor.d.ts +21 -1
- package/lib/cjs/interceptor.js +2 -1
- package/lib/cjs/jsonapi.d.ts +5 -1
- package/lib/cjs/jsonapi.js +82 -1
- package/lib/cjs/model.d.ts +107 -1
- package/lib/cjs/model.js +3 -1
- package/lib/cjs/query.d.ts +23 -1
- package/lib/cjs/query.js +51 -1
- package/lib/cjs/resource.d.ts +77 -1
- package/lib/cjs/resource.js +145 -1
- package/lib/cjs/resources/addresses.d.ts +88 -1
- package/lib/cjs/resources/addresses.js +37 -1
- package/lib/cjs/resources/adjustments.d.ts +35 -1
- package/lib/cjs/resources/adjustments.js +33 -1
- package/lib/cjs/resources/adyen_gateways.d.ts +56 -1
- package/lib/cjs/resources/adyen_gateways.js +41 -1
- package/lib/cjs/resources/adyen_payments.d.ts +45 -1
- package/lib/cjs/resources/adyen_payments.js +41 -1
- package/lib/cjs/resources/application.d.ts +21 -1
- package/lib/cjs/resources/application.js +21 -1
- package/lib/cjs/resources/attachments.d.ts +156 -1
- package/lib/cjs/resources/attachments.js +33 -1
- package/lib/cjs/resources/authorizations.d.ts +60 -1
- package/lib/cjs/resources/authorizations.js +43 -1
- package/lib/cjs/resources/avalara_accounts.d.ts +55 -1
- package/lib/cjs/resources/avalara_accounts.js +45 -1
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +35 -1
- package/lib/cjs/resources/billing_info_validation_rules.js +41 -1
- package/lib/cjs/resources/bing_geocoders.d.ts +35 -1
- package/lib/cjs/resources/bing_geocoders.js +41 -1
- package/lib/cjs/resources/braintree_gateways.d.ts +56 -1
- package/lib/cjs/resources/braintree_gateways.js +41 -1
- package/lib/cjs/resources/braintree_payments.d.ts +47 -1
- package/lib/cjs/resources/braintree_payments.js +41 -1
- package/lib/cjs/resources/bundles.d.ts +76 -1
- package/lib/cjs/resources/bundles.js +49 -1
- package/lib/cjs/resources/captures.d.ts +51 -1
- package/lib/cjs/resources/captures.js +43 -1
- package/lib/cjs/resources/carrier_accounts.d.ts +26 -1
- package/lib/cjs/resources/carrier_accounts.js +32 -1
- package/lib/cjs/resources/checkout_com_gateways.d.ts +45 -1
- package/lib/cjs/resources/checkout_com_gateways.js +41 -1
- package/lib/cjs/resources/checkout_com_payments.d.ts +58 -1
- package/lib/cjs/resources/checkout_com_payments.js +41 -1
- package/lib/cjs/resources/cleanups.d.ts +36 -1
- package/lib/cjs/resources/cleanups.js +34 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +59 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +37 -1
- package/lib/cjs/resources/coupon_recipients.d.ts +44 -1
- package/lib/cjs/resources/coupon_recipients.js +41 -1
- package/lib/cjs/resources/coupons.d.ts +45 -1
- package/lib/cjs/resources/coupons.js +37 -1
- package/lib/cjs/resources/customer_addresses.d.ts +44 -1
- package/lib/cjs/resources/customer_addresses.js +45 -1
- package/lib/cjs/resources/customer_groups.d.ts +36 -1
- package/lib/cjs/resources/customer_groups.js +45 -1
- package/lib/cjs/resources/customer_password_resets.d.ts +36 -1
- package/lib/cjs/resources/customer_password_resets.js +41 -1
- package/lib/cjs/resources/customer_payment_sources.d.ts +70 -1
- package/lib/cjs/resources/customer_payment_sources.js +37 -1
- package/lib/cjs/resources/customer_subscriptions.d.ts +31 -1
- package/lib/cjs/resources/customer_subscriptions.js +41 -1
- package/lib/cjs/resources/customers.d.ts +66 -1
- package/lib/cjs/resources/customers.js +73 -1
- package/lib/cjs/resources/delivery_lead_times.d.ts +51 -1
- package/lib/cjs/resources/delivery_lead_times.js +45 -1
- package/lib/cjs/resources/event_callbacks.d.ts +24 -1
- package/lib/cjs/resources/event_callbacks.js +28 -1
- package/lib/cjs/resources/events.d.ts +24 -1
- package/lib/cjs/resources/events.js +32 -1
- package/lib/cjs/resources/exports.d.ts +40 -1
- package/lib/cjs/resources/exports.js +34 -1
- package/lib/cjs/resources/external_gateways.d.ts +49 -1
- package/lib/cjs/resources/external_gateways.js +41 -1
- package/lib/cjs/resources/external_payments.d.ts +43 -1
- package/lib/cjs/resources/external_payments.js +45 -1
- package/lib/cjs/resources/external_promotions.d.ts +90 -1
- package/lib/cjs/resources/external_promotions.js +57 -1
- package/lib/cjs/resources/external_tax_calculators.d.ts +37 -1
- package/lib/cjs/resources/external_tax_calculators.js +41 -1
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +91 -1
- package/lib/cjs/resources/fixed_amount_promotions.js +57 -1
- package/lib/cjs/resources/fixed_price_promotions.d.ts +102 -1
- package/lib/cjs/resources/fixed_price_promotions.js +65 -1
- package/lib/cjs/resources/free_gift_promotions.d.ts +100 -1
- package/lib/cjs/resources/free_gift_promotions.js +65 -1
- package/lib/cjs/resources/free_shipping_promotions.d.ts +83 -1
- package/lib/cjs/resources/free_shipping_promotions.js +53 -1
- package/lib/cjs/resources/geocoders.d.ts +24 -1
- package/lib/cjs/resources/geocoders.js +32 -1
- package/lib/cjs/resources/gift_card_recipients.d.ts +44 -1
- package/lib/cjs/resources/gift_card_recipients.js +41 -1
- package/lib/cjs/resources/gift_cards.d.ts +85 -1
- package/lib/cjs/resources/gift_cards.js +49 -1
- package/lib/cjs/resources/google_geocoders.d.ts +35 -1
- package/lib/cjs/resources/google_geocoders.js +41 -1
- package/lib/cjs/resources/imports.d.ts +45 -1
- package/lib/cjs/resources/imports.js +34 -1
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +62 -1
- package/lib/cjs/resources/in_stock_subscriptions.js +49 -1
- package/lib/cjs/resources/inventory_models.d.ts +42 -1
- package/lib/cjs/resources/inventory_models.js +45 -1
- package/lib/cjs/resources/inventory_return_locations.d.ts +43 -1
- package/lib/cjs/resources/inventory_return_locations.js +41 -1
- package/lib/cjs/resources/inventory_stock_locations.d.ts +46 -1
- package/lib/cjs/resources/inventory_stock_locations.js +41 -1
- package/lib/cjs/resources/klarna_gateways.d.ts +44 -1
- package/lib/cjs/resources/klarna_gateways.js +41 -1
- package/lib/cjs/resources/klarna_payments.d.ts +45 -1
- package/lib/cjs/resources/klarna_payments.js +41 -1
- package/lib/cjs/resources/line_item_options.d.ts +57 -1
- package/lib/cjs/resources/line_item_options.js +41 -1
- package/lib/cjs/resources/line_items.d.ts +126 -1
- package/lib/cjs/resources/line_items.js +49 -1
- package/lib/cjs/resources/manual_gateways.d.ts +33 -1
- package/lib/cjs/resources/manual_gateways.js +37 -1
- package/lib/cjs/resources/manual_tax_calculators.d.ts +41 -1
- package/lib/cjs/resources/manual_tax_calculators.js +45 -1
- package/lib/cjs/resources/markets.d.ts +88 -1
- package/lib/cjs/resources/markets.js +57 -1
- package/lib/cjs/resources/merchants.d.ts +38 -1
- package/lib/cjs/resources/merchants.js +41 -1
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +56 -1
- package/lib/cjs/resources/order_amount_promotion_rules.js +33 -1
- package/lib/cjs/resources/order_copies.d.ts +48 -1
- package/lib/cjs/resources/order_copies.js +46 -1
- package/lib/cjs/resources/order_subscriptions.d.ts +70 -1
- package/lib/cjs/resources/order_subscriptions.js +57 -1
- package/lib/cjs/resources/order_validation_rules.d.ts +23 -1
- package/lib/cjs/resources/order_validation_rules.js +32 -1
- package/lib/cjs/resources/orders.d.ts +288 -1
- package/lib/cjs/resources/orders.js +113 -1
- package/lib/cjs/resources/organization.d.ts +32 -1
- package/lib/cjs/resources/organization.js +21 -1
- package/lib/cjs/resources/packages.d.ts +56 -1
- package/lib/cjs/resources/packages.js +45 -1
- package/lib/cjs/resources/parcel_line_items.d.ts +51 -1
- package/lib/cjs/resources/parcel_line_items.js +41 -1
- package/lib/cjs/resources/parcels.d.ts +119 -1
- package/lib/cjs/resources/parcels.js +53 -1
- package/lib/cjs/resources/payment_gateways.d.ts +21 -1
- package/lib/cjs/resources/payment_gateways.js +28 -1
- package/lib/cjs/resources/payment_methods.d.ts +61 -1
- package/lib/cjs/resources/payment_methods.js +45 -1
- package/lib/cjs/resources/paypal_gateways.d.ts +37 -1
- package/lib/cjs/resources/paypal_gateways.js +41 -1
- package/lib/cjs/resources/paypal_payments.d.ts +51 -1
- package/lib/cjs/resources/paypal_payments.js +41 -1
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +100 -1
- package/lib/cjs/resources/percentage_discount_promotions.js +65 -1
- package/lib/cjs/resources/price_lists.d.ts +39 -1
- package/lib/cjs/resources/price_lists.js +41 -1
- package/lib/cjs/resources/price_tiers.d.ts +28 -1
- package/lib/cjs/resources/price_tiers.js +32 -1
- package/lib/cjs/resources/price_volume_tiers.d.ts +46 -1
- package/lib/cjs/resources/price_volume_tiers.js +41 -1
- package/lib/cjs/resources/prices.d.ts +68 -1
- package/lib/cjs/resources/prices.js +53 -1
- package/lib/cjs/resources/promotion_rules.d.ts +24 -1
- package/lib/cjs/resources/promotion_rules.js +24 -1
- package/lib/cjs/resources/promotions.d.ts +41 -1
- package/lib/cjs/resources/promotions.js +44 -1
- package/lib/cjs/resources/refunds.d.ts +37 -1
- package/lib/cjs/resources/refunds.js +36 -1
- package/lib/cjs/resources/return_line_items.d.ts +49 -1
- package/lib/cjs/resources/return_line_items.js +41 -1
- package/lib/cjs/resources/returns.d.ts +75 -1
- package/lib/cjs/resources/returns.js +65 -1
- package/lib/cjs/resources/shipments.d.ts +93 -1
- package/lib/cjs/resources/shipments.js +83 -1
- package/lib/cjs/resources/shipping_categories.d.ts +33 -1
- package/lib/cjs/resources/shipping_categories.js +41 -1
- package/lib/cjs/resources/shipping_method_tiers.d.ts +28 -1
- package/lib/cjs/resources/shipping_method_tiers.js +32 -1
- package/lib/cjs/resources/shipping_methods.d.ts +107 -1
- package/lib/cjs/resources/shipping_methods.js +65 -1
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +46 -1
- package/lib/cjs/resources/shipping_weight_tiers.js +41 -1
- package/lib/cjs/resources/shipping_zones.d.ts +48 -1
- package/lib/cjs/resources/shipping_zones.js +37 -1
- package/lib/cjs/resources/sku_list_items.d.ts +47 -1
- package/lib/cjs/resources/sku_list_items.js +41 -1
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +68 -1
- package/lib/cjs/resources/sku_list_promotion_rules.js +41 -1
- package/lib/cjs/resources/sku_lists.d.ts +60 -1
- package/lib/cjs/resources/sku_lists.js +53 -1
- package/lib/cjs/resources/sku_options.d.ts +56 -1
- package/lib/cjs/resources/sku_options.js +41 -1
- package/lib/cjs/resources/skus.d.ts +78 -1
- package/lib/cjs/resources/skus.js +57 -1
- package/lib/cjs/resources/stock_items.d.ts +49 -1
- package/lib/cjs/resources/stock_items.js +45 -1
- package/lib/cjs/resources/stock_line_items.d.ts +29 -1
- package/lib/cjs/resources/stock_line_items.js +36 -1
- package/lib/cjs/resources/stock_locations.d.ts +57 -1
- package/lib/cjs/resources/stock_locations.js +57 -1
- package/lib/cjs/resources/stock_transfers.d.ts +74 -1
- package/lib/cjs/resources/stock_transfers.js +57 -1
- package/lib/cjs/resources/stripe_gateways.d.ts +41 -1
- package/lib/cjs/resources/stripe_gateways.js +41 -1
- package/lib/cjs/resources/stripe_payments.d.ts +46 -1
- package/lib/cjs/resources/stripe_payments.js +41 -1
- package/lib/cjs/resources/tax_calculators.d.ts +24 -1
- package/lib/cjs/resources/tax_calculators.js +32 -1
- package/lib/cjs/resources/tax_categories.d.ts +59 -1
- package/lib/cjs/resources/tax_categories.js +41 -1
- package/lib/cjs/resources/tax_rules.d.ts +69 -1
- package/lib/cjs/resources/tax_rules.js +37 -1
- package/lib/cjs/resources/taxjar_accounts.d.ts +43 -1
- package/lib/cjs/resources/taxjar_accounts.js +45 -1
- package/lib/cjs/resources/transactions.d.ts +31 -1
- package/lib/cjs/resources/transactions.js +28 -1
- package/lib/cjs/resources/voids.d.ts +37 -1
- package/lib/cjs/resources/voids.js +36 -1
- package/lib/cjs/resources/webhooks.d.ts +43 -1
- package/lib/cjs/resources/webhooks.js +37 -1
- package/lib/cjs/resources/wire_transfers.d.ts +32 -1
- package/lib/cjs/resources/wire_transfers.js +37 -1
- package/lib/cjs/static.d.ts +8 -1
- package/lib/cjs/static.js +47 -1
- package/lib/cjs/util.d.ts +6 -1
- package/lib/cjs/util.js +15 -1
- package/lib/esm/api.d.ts +109 -1
- package/lib/esm/api.js +231 -1
- package/lib/esm/client.d.ts +31 -1
- package/lib/esm/client.js +118 -1
- package/lib/esm/commercelayer.d.ts +133 -1
- package/lib/esm/commercelayer.js +195 -1
- package/lib/esm/common.d.ts +4 -1
- package/lib/esm/common.js +10 -1
- package/lib/esm/config.d.ts +11 -1
- package/lib/esm/config.js +11 -1
- package/lib/esm/debug.d.ts +3 -1
- package/lib/esm/debug.js +40 -1
- package/lib/esm/error.d.ts +28 -1
- package/lib/esm/error.js +38 -1
- package/lib/esm/index.d.ts +7 -1
- package/lib/esm/index.js +6 -1
- package/lib/esm/interceptor.d.ts +21 -1
- package/lib/esm/interceptor.js +1 -1
- package/lib/esm/jsonapi.d.ts +5 -1
- package/lib/esm/jsonapi.js +75 -1
- package/lib/esm/model.d.ts +107 -1
- package/lib/esm/model.js +2 -1
- package/lib/esm/query.d.ts +23 -1
- package/lib/esm/query.js +45 -1
- package/lib/esm/resource.d.ts +77 -1
- package/lib/esm/resource.js +139 -1
- package/lib/esm/resources/addresses.d.ts +88 -1
- package/lib/esm/resources/addresses.js +35 -1
- package/lib/esm/resources/adjustments.d.ts +35 -1
- package/lib/esm/resources/adjustments.js +31 -1
- package/lib/esm/resources/adyen_gateways.d.ts +56 -1
- package/lib/esm/resources/adyen_gateways.js +39 -1
- package/lib/esm/resources/adyen_payments.d.ts +45 -1
- package/lib/esm/resources/adyen_payments.js +39 -1
- package/lib/esm/resources/application.d.ts +21 -1
- package/lib/esm/resources/application.js +19 -1
- package/lib/esm/resources/attachments.d.ts +156 -1
- package/lib/esm/resources/attachments.js +31 -1
- package/lib/esm/resources/authorizations.d.ts +60 -1
- package/lib/esm/resources/authorizations.js +41 -1
- package/lib/esm/resources/avalara_accounts.d.ts +55 -1
- package/lib/esm/resources/avalara_accounts.js +43 -1
- package/lib/esm/resources/billing_info_validation_rules.d.ts +35 -1
- package/lib/esm/resources/billing_info_validation_rules.js +39 -1
- package/lib/esm/resources/bing_geocoders.d.ts +35 -1
- package/lib/esm/resources/bing_geocoders.js +39 -1
- package/lib/esm/resources/braintree_gateways.d.ts +56 -1
- package/lib/esm/resources/braintree_gateways.js +39 -1
- package/lib/esm/resources/braintree_payments.d.ts +47 -1
- package/lib/esm/resources/braintree_payments.js +39 -1
- package/lib/esm/resources/bundles.d.ts +76 -1
- package/lib/esm/resources/bundles.js +47 -1
- package/lib/esm/resources/captures.d.ts +51 -1
- package/lib/esm/resources/captures.js +41 -1
- package/lib/esm/resources/carrier_accounts.d.ts +26 -1
- package/lib/esm/resources/carrier_accounts.js +30 -1
- package/lib/esm/resources/checkout_com_gateways.d.ts +45 -1
- package/lib/esm/resources/checkout_com_gateways.js +39 -1
- package/lib/esm/resources/checkout_com_payments.d.ts +58 -1
- package/lib/esm/resources/checkout_com_payments.js +39 -1
- package/lib/esm/resources/cleanups.d.ts +36 -1
- package/lib/esm/resources/cleanups.js +32 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +59 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.js +35 -1
- package/lib/esm/resources/coupon_recipients.d.ts +44 -1
- package/lib/esm/resources/coupon_recipients.js +39 -1
- package/lib/esm/resources/coupons.d.ts +45 -1
- package/lib/esm/resources/coupons.js +35 -1
- package/lib/esm/resources/customer_addresses.d.ts +44 -1
- package/lib/esm/resources/customer_addresses.js +43 -1
- package/lib/esm/resources/customer_groups.d.ts +36 -1
- package/lib/esm/resources/customer_groups.js +43 -1
- package/lib/esm/resources/customer_password_resets.d.ts +36 -1
- package/lib/esm/resources/customer_password_resets.js +39 -1
- package/lib/esm/resources/customer_payment_sources.d.ts +70 -1
- package/lib/esm/resources/customer_payment_sources.js +35 -1
- package/lib/esm/resources/customer_subscriptions.d.ts +31 -1
- package/lib/esm/resources/customer_subscriptions.js +39 -1
- package/lib/esm/resources/customers.d.ts +66 -1
- package/lib/esm/resources/customers.js +71 -1
- package/lib/esm/resources/delivery_lead_times.d.ts +51 -1
- package/lib/esm/resources/delivery_lead_times.js +43 -1
- package/lib/esm/resources/event_callbacks.d.ts +24 -1
- package/lib/esm/resources/event_callbacks.js +26 -1
- package/lib/esm/resources/events.d.ts +24 -1
- package/lib/esm/resources/events.js +30 -1
- package/lib/esm/resources/exports.d.ts +40 -1
- package/lib/esm/resources/exports.js +32 -1
- package/lib/esm/resources/external_gateways.d.ts +49 -1
- package/lib/esm/resources/external_gateways.js +39 -1
- package/lib/esm/resources/external_payments.d.ts +43 -1
- package/lib/esm/resources/external_payments.js +43 -1
- package/lib/esm/resources/external_promotions.d.ts +90 -1
- package/lib/esm/resources/external_promotions.js +55 -1
- package/lib/esm/resources/external_tax_calculators.d.ts +37 -1
- package/lib/esm/resources/external_tax_calculators.js +39 -1
- package/lib/esm/resources/fixed_amount_promotions.d.ts +91 -1
- package/lib/esm/resources/fixed_amount_promotions.js +55 -1
- package/lib/esm/resources/fixed_price_promotions.d.ts +102 -1
- package/lib/esm/resources/fixed_price_promotions.js +63 -1
- package/lib/esm/resources/free_gift_promotions.d.ts +100 -1
- package/lib/esm/resources/free_gift_promotions.js +63 -1
- package/lib/esm/resources/free_shipping_promotions.d.ts +83 -1
- package/lib/esm/resources/free_shipping_promotions.js +51 -1
- package/lib/esm/resources/geocoders.d.ts +24 -1
- package/lib/esm/resources/geocoders.js +30 -1
- package/lib/esm/resources/gift_card_recipients.d.ts +44 -1
- package/lib/esm/resources/gift_card_recipients.js +39 -1
- package/lib/esm/resources/gift_cards.d.ts +85 -1
- package/lib/esm/resources/gift_cards.js +47 -1
- package/lib/esm/resources/google_geocoders.d.ts +35 -1
- package/lib/esm/resources/google_geocoders.js +39 -1
- package/lib/esm/resources/imports.d.ts +45 -1
- package/lib/esm/resources/imports.js +32 -1
- package/lib/esm/resources/in_stock_subscriptions.d.ts +62 -1
- package/lib/esm/resources/in_stock_subscriptions.js +47 -1
- package/lib/esm/resources/inventory_models.d.ts +42 -1
- package/lib/esm/resources/inventory_models.js +43 -1
- package/lib/esm/resources/inventory_return_locations.d.ts +43 -1
- package/lib/esm/resources/inventory_return_locations.js +39 -1
- package/lib/esm/resources/inventory_stock_locations.d.ts +46 -1
- package/lib/esm/resources/inventory_stock_locations.js +39 -1
- package/lib/esm/resources/klarna_gateways.d.ts +44 -1
- package/lib/esm/resources/klarna_gateways.js +39 -1
- package/lib/esm/resources/klarna_payments.d.ts +45 -1
- package/lib/esm/resources/klarna_payments.js +39 -1
- package/lib/esm/resources/line_item_options.d.ts +57 -1
- package/lib/esm/resources/line_item_options.js +39 -1
- package/lib/esm/resources/line_items.d.ts +126 -1
- package/lib/esm/resources/line_items.js +47 -1
- package/lib/esm/resources/manual_gateways.d.ts +33 -1
- package/lib/esm/resources/manual_gateways.js +35 -1
- package/lib/esm/resources/manual_tax_calculators.d.ts +41 -1
- package/lib/esm/resources/manual_tax_calculators.js +43 -1
- package/lib/esm/resources/markets.d.ts +88 -1
- package/lib/esm/resources/markets.js +55 -1
- package/lib/esm/resources/merchants.d.ts +38 -1
- package/lib/esm/resources/merchants.js +39 -1
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +56 -1
- package/lib/esm/resources/order_amount_promotion_rules.js +31 -1
- package/lib/esm/resources/order_copies.d.ts +48 -1
- package/lib/esm/resources/order_copies.js +44 -1
- package/lib/esm/resources/order_subscriptions.d.ts +70 -1
- package/lib/esm/resources/order_subscriptions.js +55 -1
- package/lib/esm/resources/order_validation_rules.d.ts +23 -1
- package/lib/esm/resources/order_validation_rules.js +30 -1
- package/lib/esm/resources/orders.d.ts +288 -1
- package/lib/esm/resources/orders.js +111 -1
- package/lib/esm/resources/organization.d.ts +32 -1
- package/lib/esm/resources/organization.js +19 -1
- package/lib/esm/resources/packages.d.ts +56 -1
- package/lib/esm/resources/packages.js +43 -1
- package/lib/esm/resources/parcel_line_items.d.ts +51 -1
- package/lib/esm/resources/parcel_line_items.js +39 -1
- package/lib/esm/resources/parcels.d.ts +119 -1
- package/lib/esm/resources/parcels.js +51 -1
- package/lib/esm/resources/payment_gateways.d.ts +21 -1
- package/lib/esm/resources/payment_gateways.js +26 -1
- package/lib/esm/resources/payment_methods.d.ts +61 -1
- package/lib/esm/resources/payment_methods.js +43 -1
- package/lib/esm/resources/paypal_gateways.d.ts +37 -1
- package/lib/esm/resources/paypal_gateways.js +39 -1
- package/lib/esm/resources/paypal_payments.d.ts +51 -1
- package/lib/esm/resources/paypal_payments.js +39 -1
- package/lib/esm/resources/percentage_discount_promotions.d.ts +100 -1
- package/lib/esm/resources/percentage_discount_promotions.js +63 -1
- package/lib/esm/resources/price_lists.d.ts +39 -1
- package/lib/esm/resources/price_lists.js +39 -1
- package/lib/esm/resources/price_tiers.d.ts +28 -1
- package/lib/esm/resources/price_tiers.js +30 -1
- package/lib/esm/resources/price_volume_tiers.d.ts +46 -1
- package/lib/esm/resources/price_volume_tiers.js +39 -1
- package/lib/esm/resources/prices.d.ts +68 -1
- package/lib/esm/resources/prices.js +51 -1
- package/lib/esm/resources/promotion_rules.d.ts +24 -1
- package/lib/esm/resources/promotion_rules.js +22 -1
- package/lib/esm/resources/promotions.d.ts +41 -1
- package/lib/esm/resources/promotions.js +42 -1
- package/lib/esm/resources/refunds.d.ts +37 -1
- package/lib/esm/resources/refunds.js +34 -1
- package/lib/esm/resources/return_line_items.d.ts +49 -1
- package/lib/esm/resources/return_line_items.js +39 -1
- package/lib/esm/resources/returns.d.ts +75 -1
- package/lib/esm/resources/returns.js +63 -1
- package/lib/esm/resources/shipments.d.ts +93 -1
- package/lib/esm/resources/shipments.js +81 -1
- package/lib/esm/resources/shipping_categories.d.ts +33 -1
- package/lib/esm/resources/shipping_categories.js +39 -1
- package/lib/esm/resources/shipping_method_tiers.d.ts +28 -1
- package/lib/esm/resources/shipping_method_tiers.js +30 -1
- package/lib/esm/resources/shipping_methods.d.ts +107 -1
- package/lib/esm/resources/shipping_methods.js +63 -1
- package/lib/esm/resources/shipping_weight_tiers.d.ts +46 -1
- package/lib/esm/resources/shipping_weight_tiers.js +39 -1
- package/lib/esm/resources/shipping_zones.d.ts +48 -1
- package/lib/esm/resources/shipping_zones.js +35 -1
- package/lib/esm/resources/sku_list_items.d.ts +47 -1
- package/lib/esm/resources/sku_list_items.js +39 -1
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +68 -1
- package/lib/esm/resources/sku_list_promotion_rules.js +39 -1
- package/lib/esm/resources/sku_lists.d.ts +60 -1
- package/lib/esm/resources/sku_lists.js +51 -1
- package/lib/esm/resources/sku_options.d.ts +56 -1
- package/lib/esm/resources/sku_options.js +39 -1
- package/lib/esm/resources/skus.d.ts +78 -1
- package/lib/esm/resources/skus.js +55 -1
- package/lib/esm/resources/stock_items.d.ts +49 -1
- package/lib/esm/resources/stock_items.js +43 -1
- package/lib/esm/resources/stock_line_items.d.ts +29 -1
- package/lib/esm/resources/stock_line_items.js +34 -1
- package/lib/esm/resources/stock_locations.d.ts +57 -1
- package/lib/esm/resources/stock_locations.js +55 -1
- package/lib/esm/resources/stock_transfers.d.ts +74 -1
- package/lib/esm/resources/stock_transfers.js +55 -1
- package/lib/esm/resources/stripe_gateways.d.ts +41 -1
- package/lib/esm/resources/stripe_gateways.js +39 -1
- package/lib/esm/resources/stripe_payments.d.ts +46 -1
- package/lib/esm/resources/stripe_payments.js +39 -1
- package/lib/esm/resources/tax_calculators.d.ts +24 -1
- package/lib/esm/resources/tax_calculators.js +30 -1
- package/lib/esm/resources/tax_categories.d.ts +59 -1
- package/lib/esm/resources/tax_categories.js +39 -1
- package/lib/esm/resources/tax_rules.d.ts +69 -1
- package/lib/esm/resources/tax_rules.js +35 -1
- package/lib/esm/resources/taxjar_accounts.d.ts +43 -1
- package/lib/esm/resources/taxjar_accounts.js +43 -1
- package/lib/esm/resources/transactions.d.ts +31 -1
- package/lib/esm/resources/transactions.js +26 -1
- package/lib/esm/resources/voids.d.ts +37 -1
- package/lib/esm/resources/voids.js +34 -1
- package/lib/esm/resources/webhooks.d.ts +43 -1
- package/lib/esm/resources/webhooks.js +35 -1
- package/lib/esm/resources/wire_transfers.d.ts +32 -1
- package/lib/esm/resources/wire_transfers.js +35 -1
- package/lib/esm/static.d.ts +8 -1
- package/lib/esm/static.js +18 -1
- package/lib/esm/util.d.ts +6 -1
- package/lib/esm/util.js +11 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -15
@@ -1 +1,43 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { Order } from './orders';
|
4
|
+
import type { PaymentGateway } from './payment_gateways';
|
5
|
+
import type { CustomerPaymentSource } from './customer_payment_sources';
|
6
|
+
type ExternalPaymentRel = ResourceRel & {
|
7
|
+
type: typeof ExternalPayments.TYPE;
|
8
|
+
};
|
9
|
+
type OrderRel = ResourceRel & {
|
10
|
+
type: 'orders';
|
11
|
+
};
|
12
|
+
interface ExternalPayment extends Resource {
|
13
|
+
payment_source_token?: string;
|
14
|
+
options?: object;
|
15
|
+
order?: Order;
|
16
|
+
payment_gateway?: PaymentGateway;
|
17
|
+
wallet?: CustomerPaymentSource;
|
18
|
+
}
|
19
|
+
interface ExternalPaymentCreate extends ResourceCreate {
|
20
|
+
payment_source_token: string;
|
21
|
+
options?: object;
|
22
|
+
order: OrderRel;
|
23
|
+
}
|
24
|
+
interface ExternalPaymentUpdate extends ResourceUpdate {
|
25
|
+
options?: object;
|
26
|
+
order?: OrderRel;
|
27
|
+
}
|
28
|
+
declare class ExternalPayments extends ApiResource {
|
29
|
+
static readonly TYPE: 'external_payments';
|
30
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalPayment>>;
|
31
|
+
create(resource: ExternalPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPayment>;
|
32
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPayment>;
|
33
|
+
update(resource: ExternalPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPayment>;
|
34
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
35
|
+
order(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
36
|
+
payment_gateway(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
37
|
+
wallet(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPaymentSource>;
|
38
|
+
isExternalPayment(resource: any): resource is ExternalPayment;
|
39
|
+
relationship(id: string | ResourceId | null): ExternalPaymentRel;
|
40
|
+
type(): string;
|
41
|
+
}
|
42
|
+
export default ExternalPayments;
|
43
|
+
export { ExternalPayment, ExternalPaymentCreate, ExternalPaymentUpdate };
|
@@ -1 +1,43 @@
|
|
1
|
-
import{ApiResource
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
class ExternalPayments extends ApiResource {
|
3
|
+
// static readonly PATH = 'external_payments'
|
4
|
+
async list(params, options) {
|
5
|
+
return this.resources.list({ type: ExternalPayments.TYPE }, params, options);
|
6
|
+
}
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ExternalPayments.TYPE }), params, options);
|
9
|
+
}
|
10
|
+
async retrieve(id, params, options) {
|
11
|
+
return this.resources.retrieve({ type: ExternalPayments.TYPE, id }, params, options);
|
12
|
+
}
|
13
|
+
async update(resource, params, options) {
|
14
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalPayments.TYPE }), params, options);
|
15
|
+
}
|
16
|
+
async delete(id, options) {
|
17
|
+
await this.resources.delete({ type: ExternalPayments.TYPE, id }, options);
|
18
|
+
}
|
19
|
+
async order(externalPaymentId, params, options) {
|
20
|
+
const _externalPaymentId = externalPaymentId.id || externalPaymentId;
|
21
|
+
return this.resources.fetch({ type: 'orders' }, `external_payments/${_externalPaymentId}/order`, params, options);
|
22
|
+
}
|
23
|
+
async payment_gateway(externalPaymentId, params, options) {
|
24
|
+
const _externalPaymentId = externalPaymentId.id || externalPaymentId;
|
25
|
+
return this.resources.fetch({ type: 'payment_gateways' }, `external_payments/${_externalPaymentId}/payment_gateway`, params, options);
|
26
|
+
}
|
27
|
+
async wallet(externalPaymentId, params, options) {
|
28
|
+
const _externalPaymentId = externalPaymentId.id || externalPaymentId;
|
29
|
+
return this.resources.fetch({ type: 'customer_payment_sources' }, `external_payments/${_externalPaymentId}/wallet`, params, options);
|
30
|
+
}
|
31
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
32
|
+
isExternalPayment(resource) {
|
33
|
+
return resource.type && (resource.type === ExternalPayments.TYPE);
|
34
|
+
}
|
35
|
+
relationship(id) {
|
36
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: ExternalPayments.TYPE } : { id: id.id, type: ExternalPayments.TYPE };
|
37
|
+
}
|
38
|
+
type() {
|
39
|
+
return ExternalPayments.TYPE;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
ExternalPayments.TYPE = 'external_payments';
|
43
|
+
export default ExternalPayments;
|
@@ -1 +1,90 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { Market } from './markets';
|
4
|
+
import type { PromotionRule } from './promotion_rules';
|
5
|
+
import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
6
|
+
import type { SkuListPromotionRule } from './sku_list_promotion_rules';
|
7
|
+
import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
8
|
+
import type { Attachment } from './attachments';
|
9
|
+
import type { Event } from './events';
|
10
|
+
type ExternalPromotionRel = ResourceRel & {
|
11
|
+
type: typeof ExternalPromotions.TYPE;
|
12
|
+
};
|
13
|
+
type MarketRel = ResourceRel & {
|
14
|
+
type: 'markets';
|
15
|
+
};
|
16
|
+
type PromotionRuleRel = ResourceRel & {
|
17
|
+
type: 'promotion_rules';
|
18
|
+
};
|
19
|
+
type OrderAmountPromotionRuleRel = ResourceRel & {
|
20
|
+
type: 'order_amount_promotion_rules';
|
21
|
+
};
|
22
|
+
type SkuListPromotionRuleRel = ResourceRel & {
|
23
|
+
type: 'sku_list_promotion_rules';
|
24
|
+
};
|
25
|
+
type CouponCodesPromotionRuleRel = ResourceRel & {
|
26
|
+
type: 'coupon_codes_promotion_rules';
|
27
|
+
};
|
28
|
+
interface ExternalPromotion extends Resource {
|
29
|
+
name?: string;
|
30
|
+
currency_code?: string;
|
31
|
+
starts_at?: string;
|
32
|
+
expires_at?: string;
|
33
|
+
total_usage_limit?: number;
|
34
|
+
total_usage_count?: number;
|
35
|
+
active?: boolean;
|
36
|
+
promotion_url?: string;
|
37
|
+
shared_secret?: string;
|
38
|
+
market?: Market;
|
39
|
+
promotion_rules?: PromotionRule[];
|
40
|
+
order_amount_promotion_rule?: OrderAmountPromotionRule;
|
41
|
+
sku_list_promotion_rule?: SkuListPromotionRule;
|
42
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
43
|
+
attachments?: Attachment[];
|
44
|
+
events?: Event[];
|
45
|
+
}
|
46
|
+
interface ExternalPromotionCreate extends ResourceCreate {
|
47
|
+
name: string;
|
48
|
+
currency_code?: string;
|
49
|
+
starts_at: string;
|
50
|
+
expires_at: string;
|
51
|
+
total_usage_limit: number;
|
52
|
+
promotion_url: string;
|
53
|
+
market?: MarketRel;
|
54
|
+
promotion_rules?: PromotionRuleRel[];
|
55
|
+
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
56
|
+
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
57
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
58
|
+
}
|
59
|
+
interface ExternalPromotionUpdate extends ResourceUpdate {
|
60
|
+
name?: string;
|
61
|
+
currency_code?: string;
|
62
|
+
starts_at?: string;
|
63
|
+
expires_at?: string;
|
64
|
+
total_usage_limit?: number;
|
65
|
+
promotion_url?: string;
|
66
|
+
market?: MarketRel;
|
67
|
+
promotion_rules?: PromotionRuleRel[];
|
68
|
+
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
69
|
+
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
70
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
71
|
+
}
|
72
|
+
declare class ExternalPromotions extends ApiResource {
|
73
|
+
static readonly TYPE: 'external_promotions';
|
74
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalPromotion>>;
|
75
|
+
create(resource: ExternalPromotionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
76
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
77
|
+
update(resource: ExternalPromotionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
78
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
79
|
+
market(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
80
|
+
order_amount_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
81
|
+
sku_list_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
82
|
+
coupon_codes_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
83
|
+
attachments(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
84
|
+
events(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
85
|
+
isExternalPromotion(resource: any): resource is ExternalPromotion;
|
86
|
+
relationship(id: string | ResourceId | null): ExternalPromotionRel;
|
87
|
+
type(): string;
|
88
|
+
}
|
89
|
+
export default ExternalPromotions;
|
90
|
+
export { ExternalPromotion, ExternalPromotionCreate, ExternalPromotionUpdate };
|
@@ -1 +1,55 @@
|
|
1
|
-
import{ApiResource
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
class ExternalPromotions extends ApiResource {
|
3
|
+
// static readonly PATH = 'external_promotions'
|
4
|
+
async list(params, options) {
|
5
|
+
return this.resources.list({ type: ExternalPromotions.TYPE }, params, options);
|
6
|
+
}
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ExternalPromotions.TYPE }), params, options);
|
9
|
+
}
|
10
|
+
async retrieve(id, params, options) {
|
11
|
+
return this.resources.retrieve({ type: ExternalPromotions.TYPE, id }, params, options);
|
12
|
+
}
|
13
|
+
async update(resource, params, options) {
|
14
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalPromotions.TYPE }), params, options);
|
15
|
+
}
|
16
|
+
async delete(id, options) {
|
17
|
+
await this.resources.delete({ type: ExternalPromotions.TYPE, id }, options);
|
18
|
+
}
|
19
|
+
async market(externalPromotionId, params, options) {
|
20
|
+
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
21
|
+
return this.resources.fetch({ type: 'markets' }, `external_promotions/${_externalPromotionId}/market`, params, options);
|
22
|
+
}
|
23
|
+
async order_amount_promotion_rule(externalPromotionId, params, options) {
|
24
|
+
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
25
|
+
return this.resources.fetch({ type: 'order_amount_promotion_rules' }, `external_promotions/${_externalPromotionId}/order_amount_promotion_rule`, params, options);
|
26
|
+
}
|
27
|
+
async sku_list_promotion_rule(externalPromotionId, params, options) {
|
28
|
+
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
29
|
+
return this.resources.fetch({ type: 'sku_list_promotion_rules' }, `external_promotions/${_externalPromotionId}/sku_list_promotion_rule`, params, options);
|
30
|
+
}
|
31
|
+
async coupon_codes_promotion_rule(externalPromotionId, params, options) {
|
32
|
+
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
33
|
+
return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `external_promotions/${_externalPromotionId}/coupon_codes_promotion_rule`, params, options);
|
34
|
+
}
|
35
|
+
async attachments(externalPromotionId, params, options) {
|
36
|
+
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
37
|
+
return this.resources.fetch({ type: 'attachments' }, `external_promotions/${_externalPromotionId}/attachments`, params, options);
|
38
|
+
}
|
39
|
+
async events(externalPromotionId, params, options) {
|
40
|
+
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
41
|
+
return this.resources.fetch({ type: 'events' }, `external_promotions/${_externalPromotionId}/events`, params, options);
|
42
|
+
}
|
43
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
44
|
+
isExternalPromotion(resource) {
|
45
|
+
return resource.type && (resource.type === ExternalPromotions.TYPE);
|
46
|
+
}
|
47
|
+
relationship(id) {
|
48
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: ExternalPromotions.TYPE } : { id: id.id, type: ExternalPromotions.TYPE };
|
49
|
+
}
|
50
|
+
type() {
|
51
|
+
return ExternalPromotions.TYPE;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
ExternalPromotions.TYPE = 'external_promotions';
|
55
|
+
export default ExternalPromotions;
|
@@ -1 +1,37 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { Market } from './markets';
|
4
|
+
import type { Attachment } from './attachments';
|
5
|
+
type ExternalTaxCalculatorRel = ResourceRel & {
|
6
|
+
type: typeof ExternalTaxCalculators.TYPE;
|
7
|
+
};
|
8
|
+
interface ExternalTaxCalculator extends Resource {
|
9
|
+
name?: string;
|
10
|
+
tax_calculator_url?: string;
|
11
|
+
shared_secret?: string;
|
12
|
+
markets?: Market[];
|
13
|
+
attachments?: Attachment[];
|
14
|
+
}
|
15
|
+
interface ExternalTaxCalculatorCreate extends ResourceCreate {
|
16
|
+
name: string;
|
17
|
+
tax_calculator_url: string;
|
18
|
+
}
|
19
|
+
interface ExternalTaxCalculatorUpdate extends ResourceUpdate {
|
20
|
+
name?: string;
|
21
|
+
tax_calculator_url?: string;
|
22
|
+
}
|
23
|
+
declare class ExternalTaxCalculators extends ApiResource {
|
24
|
+
static readonly TYPE: 'external_tax_calculators';
|
25
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalTaxCalculator>>;
|
26
|
+
create(resource: ExternalTaxCalculatorCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalTaxCalculator>;
|
27
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalTaxCalculator>;
|
28
|
+
update(resource: ExternalTaxCalculatorUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalTaxCalculator>;
|
29
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
30
|
+
markets(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
31
|
+
attachments(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
32
|
+
isExternalTaxCalculator(resource: any): resource is ExternalTaxCalculator;
|
33
|
+
relationship(id: string | ResourceId | null): ExternalTaxCalculatorRel;
|
34
|
+
type(): string;
|
35
|
+
}
|
36
|
+
export default ExternalTaxCalculators;
|
37
|
+
export { ExternalTaxCalculator, ExternalTaxCalculatorCreate, ExternalTaxCalculatorUpdate };
|
@@ -1 +1,39 @@
|
|
1
|
-
import{ApiResource
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
class ExternalTaxCalculators extends ApiResource {
|
3
|
+
// static readonly PATH = 'external_tax_calculators'
|
4
|
+
async list(params, options) {
|
5
|
+
return this.resources.list({ type: ExternalTaxCalculators.TYPE }, params, options);
|
6
|
+
}
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ExternalTaxCalculators.TYPE }), params, options);
|
9
|
+
}
|
10
|
+
async retrieve(id, params, options) {
|
11
|
+
return this.resources.retrieve({ type: ExternalTaxCalculators.TYPE, id }, params, options);
|
12
|
+
}
|
13
|
+
async update(resource, params, options) {
|
14
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalTaxCalculators.TYPE }), params, options);
|
15
|
+
}
|
16
|
+
async delete(id, options) {
|
17
|
+
await this.resources.delete({ type: ExternalTaxCalculators.TYPE, id }, options);
|
18
|
+
}
|
19
|
+
async markets(externalTaxCalculatorId, params, options) {
|
20
|
+
const _externalTaxCalculatorId = externalTaxCalculatorId.id || externalTaxCalculatorId;
|
21
|
+
return this.resources.fetch({ type: 'markets' }, `external_tax_calculators/${_externalTaxCalculatorId}/markets`, params, options);
|
22
|
+
}
|
23
|
+
async attachments(externalTaxCalculatorId, params, options) {
|
24
|
+
const _externalTaxCalculatorId = externalTaxCalculatorId.id || externalTaxCalculatorId;
|
25
|
+
return this.resources.fetch({ type: 'attachments' }, `external_tax_calculators/${_externalTaxCalculatorId}/attachments`, params, options);
|
26
|
+
}
|
27
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
|
+
isExternalTaxCalculator(resource) {
|
29
|
+
return resource.type && (resource.type === ExternalTaxCalculators.TYPE);
|
30
|
+
}
|
31
|
+
relationship(id) {
|
32
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: ExternalTaxCalculators.TYPE } : { id: id.id, type: ExternalTaxCalculators.TYPE };
|
33
|
+
}
|
34
|
+
type() {
|
35
|
+
return ExternalTaxCalculators.TYPE;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
ExternalTaxCalculators.TYPE = 'external_tax_calculators';
|
39
|
+
export default ExternalTaxCalculators;
|
@@ -1 +1,91 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { Market } from './markets';
|
4
|
+
import type { PromotionRule } from './promotion_rules';
|
5
|
+
import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
6
|
+
import type { SkuListPromotionRule } from './sku_list_promotion_rules';
|
7
|
+
import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
8
|
+
import type { Attachment } from './attachments';
|
9
|
+
import type { Event } from './events';
|
10
|
+
type FixedAmountPromotionRel = ResourceRel & {
|
11
|
+
type: typeof FixedAmountPromotions.TYPE;
|
12
|
+
};
|
13
|
+
type MarketRel = ResourceRel & {
|
14
|
+
type: 'markets';
|
15
|
+
};
|
16
|
+
type PromotionRuleRel = ResourceRel & {
|
17
|
+
type: 'promotion_rules';
|
18
|
+
};
|
19
|
+
type OrderAmountPromotionRuleRel = ResourceRel & {
|
20
|
+
type: 'order_amount_promotion_rules';
|
21
|
+
};
|
22
|
+
type SkuListPromotionRuleRel = ResourceRel & {
|
23
|
+
type: 'sku_list_promotion_rules';
|
24
|
+
};
|
25
|
+
type CouponCodesPromotionRuleRel = ResourceRel & {
|
26
|
+
type: 'coupon_codes_promotion_rules';
|
27
|
+
};
|
28
|
+
interface FixedAmountPromotion extends Resource {
|
29
|
+
name?: string;
|
30
|
+
currency_code?: string;
|
31
|
+
starts_at?: string;
|
32
|
+
expires_at?: string;
|
33
|
+
total_usage_limit?: number;
|
34
|
+
total_usage_count?: number;
|
35
|
+
active?: boolean;
|
36
|
+
fixed_amount_cents?: number;
|
37
|
+
fixed_amount_float?: number;
|
38
|
+
formatted_fixed_amount?: string;
|
39
|
+
market?: Market;
|
40
|
+
promotion_rules?: PromotionRule[];
|
41
|
+
order_amount_promotion_rule?: OrderAmountPromotionRule;
|
42
|
+
sku_list_promotion_rule?: SkuListPromotionRule;
|
43
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
44
|
+
attachments?: Attachment[];
|
45
|
+
events?: Event[];
|
46
|
+
}
|
47
|
+
interface FixedAmountPromotionCreate extends ResourceCreate {
|
48
|
+
name: string;
|
49
|
+
currency_code?: string;
|
50
|
+
starts_at: string;
|
51
|
+
expires_at: string;
|
52
|
+
total_usage_limit: number;
|
53
|
+
fixed_amount_cents: number;
|
54
|
+
market?: MarketRel;
|
55
|
+
promotion_rules?: PromotionRuleRel[];
|
56
|
+
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
57
|
+
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
58
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
59
|
+
}
|
60
|
+
interface FixedAmountPromotionUpdate extends ResourceUpdate {
|
61
|
+
name?: string;
|
62
|
+
currency_code?: string;
|
63
|
+
starts_at?: string;
|
64
|
+
expires_at?: string;
|
65
|
+
total_usage_limit?: number;
|
66
|
+
fixed_amount_cents?: number;
|
67
|
+
market?: MarketRel;
|
68
|
+
promotion_rules?: PromotionRuleRel[];
|
69
|
+
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
70
|
+
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
71
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
72
|
+
}
|
73
|
+
declare class FixedAmountPromotions extends ApiResource {
|
74
|
+
static readonly TYPE: 'fixed_amount_promotions';
|
75
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<FixedAmountPromotion>>;
|
76
|
+
create(resource: FixedAmountPromotionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<FixedAmountPromotion>;
|
77
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<FixedAmountPromotion>;
|
78
|
+
update(resource: FixedAmountPromotionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<FixedAmountPromotion>;
|
79
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
80
|
+
market(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
81
|
+
order_amount_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
82
|
+
sku_list_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
83
|
+
coupon_codes_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
84
|
+
attachments(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
85
|
+
events(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
86
|
+
isFixedAmountPromotion(resource: any): resource is FixedAmountPromotion;
|
87
|
+
relationship(id: string | ResourceId | null): FixedAmountPromotionRel;
|
88
|
+
type(): string;
|
89
|
+
}
|
90
|
+
export default FixedAmountPromotions;
|
91
|
+
export { FixedAmountPromotion, FixedAmountPromotionCreate, FixedAmountPromotionUpdate };
|
@@ -1 +1,55 @@
|
|
1
|
-
import{ApiResource
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
class FixedAmountPromotions extends ApiResource {
|
3
|
+
// static readonly PATH = 'fixed_amount_promotions'
|
4
|
+
async list(params, options) {
|
5
|
+
return this.resources.list({ type: FixedAmountPromotions.TYPE }, params, options);
|
6
|
+
}
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: FixedAmountPromotions.TYPE }), params, options);
|
9
|
+
}
|
10
|
+
async retrieve(id, params, options) {
|
11
|
+
return this.resources.retrieve({ type: FixedAmountPromotions.TYPE, id }, params, options);
|
12
|
+
}
|
13
|
+
async update(resource, params, options) {
|
14
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: FixedAmountPromotions.TYPE }), params, options);
|
15
|
+
}
|
16
|
+
async delete(id, options) {
|
17
|
+
await this.resources.delete({ type: FixedAmountPromotions.TYPE, id }, options);
|
18
|
+
}
|
19
|
+
async market(fixedAmountPromotionId, params, options) {
|
20
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
21
|
+
return this.resources.fetch({ type: 'markets' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/market`, params, options);
|
22
|
+
}
|
23
|
+
async order_amount_promotion_rule(fixedAmountPromotionId, params, options) {
|
24
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
25
|
+
return this.resources.fetch({ type: 'order_amount_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/order_amount_promotion_rule`, params, options);
|
26
|
+
}
|
27
|
+
async sku_list_promotion_rule(fixedAmountPromotionId, params, options) {
|
28
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
29
|
+
return this.resources.fetch({ type: 'sku_list_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/sku_list_promotion_rule`, params, options);
|
30
|
+
}
|
31
|
+
async coupon_codes_promotion_rule(fixedAmountPromotionId, params, options) {
|
32
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
33
|
+
return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupon_codes_promotion_rule`, params, options);
|
34
|
+
}
|
35
|
+
async attachments(fixedAmountPromotionId, params, options) {
|
36
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
37
|
+
return this.resources.fetch({ type: 'attachments' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/attachments`, params, options);
|
38
|
+
}
|
39
|
+
async events(fixedAmountPromotionId, params, options) {
|
40
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
41
|
+
return this.resources.fetch({ type: 'events' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/events`, params, options);
|
42
|
+
}
|
43
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
44
|
+
isFixedAmountPromotion(resource) {
|
45
|
+
return resource.type && (resource.type === FixedAmountPromotions.TYPE);
|
46
|
+
}
|
47
|
+
relationship(id) {
|
48
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: FixedAmountPromotions.TYPE } : { id: id.id, type: FixedAmountPromotions.TYPE };
|
49
|
+
}
|
50
|
+
type() {
|
51
|
+
return FixedAmountPromotions.TYPE;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
FixedAmountPromotions.TYPE = 'fixed_amount_promotions';
|
55
|
+
export default FixedAmountPromotions;
|
@@ -1 +1,102 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { Market } from './markets';
|
4
|
+
import type { PromotionRule } from './promotion_rules';
|
5
|
+
import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
6
|
+
import type { SkuListPromotionRule } from './sku_list_promotion_rules';
|
7
|
+
import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
8
|
+
import type { Attachment } from './attachments';
|
9
|
+
import type { SkuList } from './sku_lists';
|
10
|
+
import type { Sku } from './skus';
|
11
|
+
import type { Event } from './events';
|
12
|
+
type FixedPricePromotionRel = ResourceRel & {
|
13
|
+
type: typeof FixedPricePromotions.TYPE;
|
14
|
+
};
|
15
|
+
type MarketRel = ResourceRel & {
|
16
|
+
type: 'markets';
|
17
|
+
};
|
18
|
+
type PromotionRuleRel = ResourceRel & {
|
19
|
+
type: 'promotion_rules';
|
20
|
+
};
|
21
|
+
type OrderAmountPromotionRuleRel = ResourceRel & {
|
22
|
+
type: 'order_amount_promotion_rules';
|
23
|
+
};
|
24
|
+
type SkuListPromotionRuleRel = ResourceRel & {
|
25
|
+
type: 'sku_list_promotion_rules';
|
26
|
+
};
|
27
|
+
type CouponCodesPromotionRuleRel = ResourceRel & {
|
28
|
+
type: 'coupon_codes_promotion_rules';
|
29
|
+
};
|
30
|
+
type SkuListRel = ResourceRel & {
|
31
|
+
type: 'sku_lists';
|
32
|
+
};
|
33
|
+
interface FixedPricePromotion extends Resource {
|
34
|
+
name?: string;
|
35
|
+
currency_code?: string;
|
36
|
+
starts_at?: string;
|
37
|
+
expires_at?: string;
|
38
|
+
total_usage_limit?: number;
|
39
|
+
total_usage_count?: number;
|
40
|
+
active?: boolean;
|
41
|
+
fixed_amount_cents?: number;
|
42
|
+
fixed_amount_float?: number;
|
43
|
+
formatted_fixed_amount?: string;
|
44
|
+
market?: Market;
|
45
|
+
promotion_rules?: PromotionRule[];
|
46
|
+
order_amount_promotion_rule?: OrderAmountPromotionRule;
|
47
|
+
sku_list_promotion_rule?: SkuListPromotionRule;
|
48
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
49
|
+
attachments?: Attachment[];
|
50
|
+
sku_list?: SkuList;
|
51
|
+
skus?: Sku[];
|
52
|
+
events?: Event[];
|
53
|
+
}
|
54
|
+
interface FixedPricePromotionCreate extends ResourceCreate {
|
55
|
+
name: string;
|
56
|
+
currency_code?: string;
|
57
|
+
starts_at: string;
|
58
|
+
expires_at: string;
|
59
|
+
total_usage_limit: number;
|
60
|
+
fixed_amount_cents: number;
|
61
|
+
market?: MarketRel;
|
62
|
+
promotion_rules?: PromotionRuleRel[];
|
63
|
+
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
64
|
+
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
65
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
66
|
+
sku_list: SkuListRel;
|
67
|
+
}
|
68
|
+
interface FixedPricePromotionUpdate extends ResourceUpdate {
|
69
|
+
name?: string;
|
70
|
+
currency_code?: string;
|
71
|
+
starts_at?: string;
|
72
|
+
expires_at?: string;
|
73
|
+
total_usage_limit?: number;
|
74
|
+
fixed_amount_cents?: number;
|
75
|
+
market?: MarketRel;
|
76
|
+
promotion_rules?: PromotionRuleRel[];
|
77
|
+
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
78
|
+
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
79
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
80
|
+
sku_list?: SkuListRel;
|
81
|
+
}
|
82
|
+
declare class FixedPricePromotions extends ApiResource {
|
83
|
+
static readonly TYPE: 'fixed_price_promotions';
|
84
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<FixedPricePromotion>>;
|
85
|
+
create(resource: FixedPricePromotionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<FixedPricePromotion>;
|
86
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<FixedPricePromotion>;
|
87
|
+
update(resource: FixedPricePromotionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<FixedPricePromotion>;
|
88
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
89
|
+
market(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
90
|
+
order_amount_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
91
|
+
sku_list_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
92
|
+
coupon_codes_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
93
|
+
attachments(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
94
|
+
sku_list(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
95
|
+
skus(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
96
|
+
events(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
97
|
+
isFixedPricePromotion(resource: any): resource is FixedPricePromotion;
|
98
|
+
relationship(id: string | ResourceId | null): FixedPricePromotionRel;
|
99
|
+
type(): string;
|
100
|
+
}
|
101
|
+
export default FixedPricePromotions;
|
102
|
+
export { FixedPricePromotion, FixedPricePromotionCreate, FixedPricePromotionUpdate };
|