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