@commercelayer/sdk 4.42.0 → 4.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +0 -38
- package/lib/cjs/api.js +14 -7
- package/lib/cjs/client.d.ts +14 -20
- package/lib/cjs/client.js +43 -74
- package/lib/cjs/commercelayer.d.ts +6 -7
- package/lib/cjs/commercelayer.js +4 -14
- 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 -3
- package/lib/cjs/debug.js +4 -0
- package/lib/cjs/error.d.ts +8 -11
- package/lib/cjs/error.js +8 -42
- 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.d.ts +0 -1
- package/lib/cjs/jsonapi.js +3 -10
- package/lib/cjs/query.d.ts +15 -9
- package/lib/cjs/query.js +2 -3
- package/lib/cjs/resource.d.ts +20 -31
- package/lib/cjs/resource.js +10 -56
- package/lib/cjs/resources/addresses.d.ts +73 -74
- package/lib/cjs/resources/addresses.js +11 -3
- package/lib/cjs/resources/adjustments.d.ts +19 -20
- package/lib/cjs/resources/adjustments.js +11 -3
- package/lib/cjs/resources/adyen_gateways.d.ts +34 -35
- package/lib/cjs/resources/adyen_gateways.js +11 -3
- package/lib/cjs/resources/adyen_payments.d.ts +27 -29
- package/lib/cjs/resources/adyen_payments.js +11 -6
- 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 +43 -47
- package/lib/cjs/resources/authorizations.js +9 -10
- package/lib/cjs/resources/avalara_accounts.d.ts +31 -32
- package/lib/cjs/resources/avalara_accounts.js +11 -3
- package/lib/cjs/resources/axerve_gateways.d.ts +23 -24
- package/lib/cjs/resources/axerve_gateways.js +11 -3
- package/lib/cjs/resources/axerve_payments.d.ts +32 -34
- package/lib/cjs/resources/axerve_payments.js +11 -6
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +16 -17
- package/lib/cjs/resources/billing_info_validation_rules.js +11 -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 +33 -34
- package/lib/cjs/resources/braintree_gateways.js +11 -3
- package/lib/cjs/resources/braintree_payments.d.ts +29 -30
- package/lib/cjs/resources/braintree_payments.js +11 -3
- package/lib/cjs/resources/bundles.d.ts +56 -59
- package/lib/cjs/resources/bundles.js +11 -9
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +85 -98
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +15 -13
- package/lib/cjs/resources/captures.d.ts +34 -37
- package/lib/cjs/resources/captures.js +9 -7
- package/lib/cjs/resources/carrier_accounts.d.ts +15 -16
- package/lib/cjs/resources/carrier_accounts.js +8 -0
- package/lib/cjs/resources/checkout_com_gateways.d.ts +24 -25
- package/lib/cjs/resources/checkout_com_gateways.js +11 -3
- package/lib/cjs/resources/checkout_com_payments.d.ts +38 -41
- package/lib/cjs/resources/checkout_com_payments.js +11 -9
- package/lib/cjs/resources/cleanups.d.ts +23 -24
- package/lib/cjs/resources/cleanups.js +10 -2
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +32 -33
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +11 -3
- package/lib/cjs/resources/coupon_recipients.d.ts +25 -26
- package/lib/cjs/resources/coupon_recipients.js +11 -3
- package/lib/cjs/resources/coupons.d.ts +41 -42
- package/lib/cjs/resources/coupons.js +11 -3
- package/lib/cjs/resources/custom_promotion_rules.d.ts +30 -31
- package/lib/cjs/resources/custom_promotion_rules.js +11 -3
- package/lib/cjs/resources/customer_addresses.d.ts +22 -23
- package/lib/cjs/resources/customer_addresses.js +11 -3
- package/lib/cjs/resources/customer_groups.d.ts +16 -17
- package/lib/cjs/resources/customer_groups.js +11 -3
- package/lib/cjs/resources/customer_password_resets.d.ts +17 -19
- package/lib/cjs/resources/customer_password_resets.js +11 -6
- package/lib/cjs/resources/customer_payment_sources.d.ts +46 -47
- package/lib/cjs/resources/customer_payment_sources.js +11 -3
- package/lib/cjs/resources/customer_subscriptions.d.ts +14 -15
- package/lib/cjs/resources/customer_subscriptions.js +11 -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 +26 -27
- package/lib/cjs/resources/delivery_lead_times.js +11 -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 +31 -32
- package/lib/cjs/resources/external_gateways.js +11 -3
- package/lib/cjs/resources/external_payments.d.ts +22 -23
- package/lib/cjs/resources/external_payments.js +11 -3
- package/lib/cjs/resources/external_promotions.d.ts +82 -95
- package/lib/cjs/resources/external_promotions.js +15 -13
- package/lib/cjs/resources/external_tax_calculators.d.ts +18 -19
- package/lib/cjs/resources/external_tax_calculators.js +11 -3
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +83 -96
- package/lib/cjs/resources/fixed_amount_promotions.js +15 -13
- package/lib/cjs/resources/fixed_price_promotions.d.ts +82 -95
- package/lib/cjs/resources/fixed_price_promotions.js +15 -13
- package/lib/cjs/resources/free_gift_promotions.d.ts +81 -94
- package/lib/cjs/resources/free_gift_promotions.js +15 -13
- package/lib/cjs/resources/free_shipping_promotions.d.ts +78 -86
- package/lib/cjs/resources/free_shipping_promotions.js +15 -13
- 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 +25 -26
- package/lib/cjs/resources/gift_card_recipients.js +11 -3
- package/lib/cjs/resources/gift_cards.d.ts +66 -71
- package/lib/cjs/resources/gift_cards.js +11 -15
- 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 +29 -30
- package/lib/cjs/resources/imports.js +10 -2
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +35 -38
- package/lib/cjs/resources/in_stock_subscriptions.js +11 -9
- package/lib/cjs/resources/inventory_models.d.ts +31 -32
- package/lib/cjs/resources/inventory_models.js +11 -3
- package/lib/cjs/resources/inventory_return_locations.d.ts +21 -22
- package/lib/cjs/resources/inventory_return_locations.js +11 -3
- package/lib/cjs/resources/inventory_stock_locations.d.ts +24 -25
- package/lib/cjs/resources/inventory_stock_locations.js +11 -3
- package/lib/cjs/resources/klarna_gateways.d.ts +22 -23
- package/lib/cjs/resources/klarna_gateways.js +11 -3
- package/lib/cjs/resources/klarna_payments.d.ts +27 -29
- package/lib/cjs/resources/klarna_payments.js +11 -6
- 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 +101 -104
- package/lib/cjs/resources/line_items.js +11 -9
- package/lib/cjs/resources/manual_gateways.d.ts +14 -15
- package/lib/cjs/resources/manual_gateways.js +11 -3
- package/lib/cjs/resources/manual_tax_calculators.d.ts +20 -21
- package/lib/cjs/resources/manual_tax_calculators.js +11 -3
- package/lib/cjs/resources/markets.d.ts +64 -67
- package/lib/cjs/resources/markets.js +11 -9
- package/lib/cjs/resources/merchants.d.ts +18 -19
- package/lib/cjs/resources/merchants.js +11 -3
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +35 -36
- package/lib/cjs/resources/order_amount_promotion_rules.js +11 -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 +39 -40
- package/lib/cjs/resources/order_subscription_items.js +11 -3
- package/lib/cjs/resources/order_subscriptions.d.ts +52 -55
- package/lib/cjs/resources/order_subscriptions.js +11 -12
- package/lib/cjs/resources/order_validation_rules.d.ts +12 -13
- package/lib/cjs/resources/order_validation_rules.js +8 -0
- package/lib/cjs/resources/orders.d.ts +252 -280
- package/lib/cjs/resources/orders.js +11 -84
- package/lib/cjs/resources/organization.d.ts +24 -25
- package/lib/cjs/resources/organization.js +6 -1
- package/lib/cjs/resources/packages.d.ts +30 -31
- package/lib/cjs/resources/packages.js +11 -3
- package/lib/cjs/resources/parcel_line_items.d.ts +22 -23
- package/lib/cjs/resources/parcel_line_items.js +11 -3
- package/lib/cjs/resources/parcels.d.ts +93 -94
- package/lib/cjs/resources/parcels.js +11 -3
- package/lib/cjs/resources/payment_gateways.d.ts +12 -13
- package/lib/cjs/resources/payment_gateways.js +8 -0
- package/lib/cjs/resources/payment_methods.d.ts +54 -54
- package/lib/cjs/resources/payment_methods.js +11 -9
- package/lib/cjs/resources/payment_options.d.ts +23 -24
- package/lib/cjs/resources/payment_options.js +11 -3
- package/lib/cjs/resources/paypal_gateways.d.ts +17 -18
- package/lib/cjs/resources/paypal_gateways.js +11 -3
- package/lib/cjs/resources/paypal_payments.d.ts +31 -32
- package/lib/cjs/resources/paypal_payments.js +11 -3
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +81 -94
- package/lib/cjs/resources/percentage_discount_promotions.js +15 -13
- package/lib/cjs/resources/price_frequency_tiers.d.ts +26 -27
- package/lib/cjs/resources/price_frequency_tiers.js +11 -3
- package/lib/cjs/resources/price_lists.d.ts +23 -24
- package/lib/cjs/resources/price_lists.js +11 -3
- package/lib/cjs/resources/price_tiers.d.ts +17 -18
- package/lib/cjs/resources/price_tiers.js +8 -0
- package/lib/cjs/resources/price_volume_tiers.d.ts +26 -27
- package/lib/cjs/resources/price_volume_tiers.js +11 -3
- package/lib/cjs/resources/prices.d.ts +40 -41
- package/lib/cjs/resources/prices.js +11 -3
- package/lib/cjs/resources/promotion_rules.d.ts +11 -12
- package/lib/cjs/resources/promotion_rules.js +8 -0
- package/lib/cjs/resources/promotions.d.ts +33 -34
- package/lib/cjs/resources/promotions.js +12 -4
- 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 +25 -26
- package/lib/cjs/resources/refunds.js +8 -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 -29
- package/lib/cjs/resources/return_line_items.js +11 -6
- package/lib/cjs/resources/returns.d.ts +49 -59
- package/lib/cjs/resources/returns.js +11 -30
- package/lib/cjs/resources/satispay_gateways.d.ts +22 -23
- package/lib/cjs/resources/satispay_gateways.js +11 -3
- package/lib/cjs/resources/satispay_payments.d.ts +29 -31
- package/lib/cjs/resources/satispay_payments.js +11 -6
- package/lib/cjs/resources/shipments.d.ts +82 -94
- package/lib/cjs/resources/shipments.js +11 -36
- package/lib/cjs/resources/shipping_categories.d.ts +18 -19
- package/lib/cjs/resources/shipping_categories.js +11 -3
- package/lib/cjs/resources/shipping_method_tiers.d.ts +17 -18
- package/lib/cjs/resources/shipping_method_tiers.js +8 -0
- package/lib/cjs/resources/shipping_methods.d.ts +79 -82
- package/lib/cjs/resources/shipping_methods.js +11 -9
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +25 -26
- package/lib/cjs/resources/shipping_weight_tiers.js +11 -3
- package/lib/cjs/resources/shipping_zones.d.ts +32 -33
- package/lib/cjs/resources/shipping_zones.js +11 -3
- package/lib/cjs/resources/sku_list_items.d.ts +26 -27
- package/lib/cjs/resources/sku_list_items.js +11 -3
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +39 -40
- package/lib/cjs/resources/sku_list_promotion_rules.js +11 -3
- package/lib/cjs/resources/sku_lists.d.ts +35 -36
- package/lib/cjs/resources/sku_lists.js +11 -3
- package/lib/cjs/resources/sku_options.d.ts +43 -44
- package/lib/cjs/resources/sku_options.js +11 -3
- package/lib/cjs/resources/skus.d.ts +56 -57
- package/lib/cjs/resources/skus.js +11 -3
- package/lib/cjs/resources/stock_items.d.ts +28 -29
- package/lib/cjs/resources/stock_items.js +11 -3
- package/lib/cjs/resources/stock_line_items.d.ts +40 -44
- package/lib/cjs/resources/stock_line_items.js +11 -12
- package/lib/cjs/resources/stock_locations.d.ts +32 -33
- package/lib/cjs/resources/stock_locations.js +11 -3
- package/lib/cjs/resources/stock_reservations.d.ts +22 -24
- package/lib/cjs/resources/stock_reservations.js +11 -6
- package/lib/cjs/resources/stock_transfers.d.ts +44 -51
- package/lib/cjs/resources/stock_transfers.js +11 -21
- package/lib/cjs/resources/stripe_gateways.d.ts +22 -23
- package/lib/cjs/resources/stripe_gateways.js +11 -3
- package/lib/cjs/resources/stripe_payments.d.ts +37 -37
- package/lib/cjs/resources/stripe_payments.js +11 -9
- 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 +13 -14
- package/lib/cjs/resources/tax_calculators.js +8 -0
- package/lib/cjs/resources/tax_categories.d.ts +30 -31
- package/lib/cjs/resources/tax_categories.js +11 -3
- package/lib/cjs/resources/tax_rules.d.ts +51 -52
- package/lib/cjs/resources/tax_rules.js +11 -3
- package/lib/cjs/resources/taxjar_accounts.d.ts +21 -22
- package/lib/cjs/resources/taxjar_accounts.js +11 -3
- package/lib/cjs/resources/transactions.d.ts +24 -25
- package/lib/cjs/resources/transactions.js +8 -0
- package/lib/cjs/resources/versions.d.ts +14 -14
- package/lib/cjs/resources/versions.js +8 -0
- package/lib/cjs/resources/voids.d.ts +25 -26
- package/lib/cjs/resources/voids.js +8 -0
- package/lib/cjs/resources/webhooks.d.ts +31 -35
- package/lib/cjs/resources/webhooks.js +11 -12
- package/lib/cjs/resources/wire_transfers.d.ts +16 -17
- package/lib/cjs/resources/wire_transfers.js +11 -3
- package/lib/cjs/static.d.ts +2 -5
- package/lib/cjs/static.js +2 -8
- package/lib/cjs/util.d.ts +4 -2
- package/lib/cjs/util.js +0 -1
- package/lib/esm/api.d.ts +0 -38
- package/lib/esm/api.js +13 -6
- package/lib/esm/client.d.ts +14 -20
- package/lib/esm/client.js +44 -75
- package/lib/esm/commercelayer.d.ts +6 -7
- package/lib/esm/commercelayer.js +4 -14
- 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 -3
- package/lib/esm/debug.js +4 -0
- package/lib/esm/error.d.ts +8 -11
- package/lib/esm/error.js +6 -37
- 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.d.ts +0 -1
- package/lib/esm/jsonapi.js +3 -10
- package/lib/esm/query.d.ts +15 -9
- package/lib/esm/query.js +2 -2
- package/lib/esm/resource.d.ts +20 -31
- package/lib/esm/resource.js +11 -56
- package/lib/esm/resources/addresses.d.ts +73 -74
- package/lib/esm/resources/addresses.js +11 -3
- package/lib/esm/resources/adjustments.d.ts +19 -20
- package/lib/esm/resources/adjustments.js +11 -3
- package/lib/esm/resources/adyen_gateways.d.ts +34 -35
- package/lib/esm/resources/adyen_gateways.js +11 -3
- package/lib/esm/resources/adyen_payments.d.ts +27 -29
- package/lib/esm/resources/adyen_payments.js +11 -6
- 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 +43 -47
- package/lib/esm/resources/authorizations.js +9 -10
- package/lib/esm/resources/avalara_accounts.d.ts +31 -32
- package/lib/esm/resources/avalara_accounts.js +11 -3
- package/lib/esm/resources/axerve_gateways.d.ts +23 -24
- package/lib/esm/resources/axerve_gateways.js +11 -3
- package/lib/esm/resources/axerve_payments.d.ts +32 -34
- package/lib/esm/resources/axerve_payments.js +11 -6
- package/lib/esm/resources/billing_info_validation_rules.d.ts +16 -17
- package/lib/esm/resources/billing_info_validation_rules.js +11 -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 +33 -34
- package/lib/esm/resources/braintree_gateways.js +11 -3
- package/lib/esm/resources/braintree_payments.d.ts +29 -30
- package/lib/esm/resources/braintree_payments.js +11 -3
- package/lib/esm/resources/bundles.d.ts +56 -59
- package/lib/esm/resources/bundles.js +11 -9
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +85 -98
- package/lib/esm/resources/buy_x_pay_y_promotions.js +15 -13
- package/lib/esm/resources/captures.d.ts +34 -37
- package/lib/esm/resources/captures.js +9 -7
- package/lib/esm/resources/carrier_accounts.d.ts +15 -16
- package/lib/esm/resources/carrier_accounts.js +8 -0
- package/lib/esm/resources/checkout_com_gateways.d.ts +24 -25
- package/lib/esm/resources/checkout_com_gateways.js +11 -3
- package/lib/esm/resources/checkout_com_payments.d.ts +38 -41
- package/lib/esm/resources/checkout_com_payments.js +11 -9
- package/lib/esm/resources/cleanups.d.ts +23 -24
- package/lib/esm/resources/cleanups.js +10 -2
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +32 -33
- package/lib/esm/resources/coupon_codes_promotion_rules.js +11 -3
- package/lib/esm/resources/coupon_recipients.d.ts +25 -26
- package/lib/esm/resources/coupon_recipients.js +11 -3
- package/lib/esm/resources/coupons.d.ts +41 -42
- package/lib/esm/resources/coupons.js +11 -3
- package/lib/esm/resources/custom_promotion_rules.d.ts +30 -31
- package/lib/esm/resources/custom_promotion_rules.js +11 -3
- package/lib/esm/resources/customer_addresses.d.ts +22 -23
- package/lib/esm/resources/customer_addresses.js +11 -3
- package/lib/esm/resources/customer_groups.d.ts +16 -17
- package/lib/esm/resources/customer_groups.js +11 -3
- package/lib/esm/resources/customer_password_resets.d.ts +17 -19
- package/lib/esm/resources/customer_password_resets.js +11 -6
- package/lib/esm/resources/customer_payment_sources.d.ts +46 -47
- package/lib/esm/resources/customer_payment_sources.js +11 -3
- package/lib/esm/resources/customer_subscriptions.d.ts +14 -15
- package/lib/esm/resources/customer_subscriptions.js +11 -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 +26 -27
- package/lib/esm/resources/delivery_lead_times.js +11 -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 +31 -32
- package/lib/esm/resources/external_gateways.js +11 -3
- package/lib/esm/resources/external_payments.d.ts +22 -23
- package/lib/esm/resources/external_payments.js +11 -3
- package/lib/esm/resources/external_promotions.d.ts +82 -95
- package/lib/esm/resources/external_promotions.js +15 -13
- package/lib/esm/resources/external_tax_calculators.d.ts +18 -19
- package/lib/esm/resources/external_tax_calculators.js +11 -3
- package/lib/esm/resources/fixed_amount_promotions.d.ts +83 -96
- package/lib/esm/resources/fixed_amount_promotions.js +15 -13
- package/lib/esm/resources/fixed_price_promotions.d.ts +82 -95
- package/lib/esm/resources/fixed_price_promotions.js +15 -13
- package/lib/esm/resources/free_gift_promotions.d.ts +81 -94
- package/lib/esm/resources/free_gift_promotions.js +15 -13
- package/lib/esm/resources/free_shipping_promotions.d.ts +78 -86
- package/lib/esm/resources/free_shipping_promotions.js +15 -13
- 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 +25 -26
- package/lib/esm/resources/gift_card_recipients.js +11 -3
- package/lib/esm/resources/gift_cards.d.ts +66 -71
- package/lib/esm/resources/gift_cards.js +11 -15
- 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 +29 -30
- package/lib/esm/resources/imports.js +10 -2
- package/lib/esm/resources/in_stock_subscriptions.d.ts +35 -38
- package/lib/esm/resources/in_stock_subscriptions.js +11 -9
- package/lib/esm/resources/inventory_models.d.ts +31 -32
- package/lib/esm/resources/inventory_models.js +11 -3
- package/lib/esm/resources/inventory_return_locations.d.ts +21 -22
- package/lib/esm/resources/inventory_return_locations.js +11 -3
- package/lib/esm/resources/inventory_stock_locations.d.ts +24 -25
- package/lib/esm/resources/inventory_stock_locations.js +11 -3
- package/lib/esm/resources/klarna_gateways.d.ts +22 -23
- package/lib/esm/resources/klarna_gateways.js +11 -3
- package/lib/esm/resources/klarna_payments.d.ts +27 -29
- package/lib/esm/resources/klarna_payments.js +11 -6
- 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 +101 -104
- package/lib/esm/resources/line_items.js +11 -9
- package/lib/esm/resources/manual_gateways.d.ts +14 -15
- package/lib/esm/resources/manual_gateways.js +11 -3
- package/lib/esm/resources/manual_tax_calculators.d.ts +20 -21
- package/lib/esm/resources/manual_tax_calculators.js +11 -3
- package/lib/esm/resources/markets.d.ts +64 -67
- package/lib/esm/resources/markets.js +11 -9
- package/lib/esm/resources/merchants.d.ts +18 -19
- package/lib/esm/resources/merchants.js +11 -3
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +35 -36
- package/lib/esm/resources/order_amount_promotion_rules.js +11 -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 +39 -40
- package/lib/esm/resources/order_subscription_items.js +11 -3
- package/lib/esm/resources/order_subscriptions.d.ts +52 -55
- package/lib/esm/resources/order_subscriptions.js +11 -12
- package/lib/esm/resources/order_validation_rules.d.ts +12 -13
- package/lib/esm/resources/order_validation_rules.js +8 -0
- package/lib/esm/resources/orders.d.ts +252 -280
- package/lib/esm/resources/orders.js +11 -84
- package/lib/esm/resources/organization.d.ts +24 -25
- package/lib/esm/resources/organization.js +7 -2
- package/lib/esm/resources/packages.d.ts +30 -31
- package/lib/esm/resources/packages.js +11 -3
- package/lib/esm/resources/parcel_line_items.d.ts +22 -23
- package/lib/esm/resources/parcel_line_items.js +11 -3
- package/lib/esm/resources/parcels.d.ts +93 -94
- package/lib/esm/resources/parcels.js +11 -3
- package/lib/esm/resources/payment_gateways.d.ts +12 -13
- package/lib/esm/resources/payment_gateways.js +8 -0
- package/lib/esm/resources/payment_methods.d.ts +54 -54
- package/lib/esm/resources/payment_methods.js +11 -9
- package/lib/esm/resources/payment_options.d.ts +23 -24
- package/lib/esm/resources/payment_options.js +11 -3
- package/lib/esm/resources/paypal_gateways.d.ts +17 -18
- package/lib/esm/resources/paypal_gateways.js +11 -3
- package/lib/esm/resources/paypal_payments.d.ts +31 -32
- package/lib/esm/resources/paypal_payments.js +11 -3
- package/lib/esm/resources/percentage_discount_promotions.d.ts +81 -94
- package/lib/esm/resources/percentage_discount_promotions.js +15 -13
- package/lib/esm/resources/price_frequency_tiers.d.ts +26 -27
- package/lib/esm/resources/price_frequency_tiers.js +11 -3
- package/lib/esm/resources/price_lists.d.ts +23 -24
- package/lib/esm/resources/price_lists.js +11 -3
- package/lib/esm/resources/price_tiers.d.ts +17 -18
- package/lib/esm/resources/price_tiers.js +8 -0
- package/lib/esm/resources/price_volume_tiers.d.ts +26 -27
- package/lib/esm/resources/price_volume_tiers.js +11 -3
- package/lib/esm/resources/prices.d.ts +40 -41
- package/lib/esm/resources/prices.js +11 -3
- package/lib/esm/resources/promotion_rules.d.ts +11 -12
- package/lib/esm/resources/promotion_rules.js +8 -0
- package/lib/esm/resources/promotions.d.ts +33 -34
- package/lib/esm/resources/promotions.js +12 -4
- 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 +25 -26
- package/lib/esm/resources/refunds.js +8 -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 -29
- package/lib/esm/resources/return_line_items.js +11 -6
- package/lib/esm/resources/returns.d.ts +49 -59
- package/lib/esm/resources/returns.js +11 -30
- package/lib/esm/resources/satispay_gateways.d.ts +22 -23
- package/lib/esm/resources/satispay_gateways.js +11 -3
- package/lib/esm/resources/satispay_payments.d.ts +29 -31
- package/lib/esm/resources/satispay_payments.js +11 -6
- package/lib/esm/resources/shipments.d.ts +82 -94
- package/lib/esm/resources/shipments.js +11 -36
- package/lib/esm/resources/shipping_categories.d.ts +18 -19
- package/lib/esm/resources/shipping_categories.js +11 -3
- package/lib/esm/resources/shipping_method_tiers.d.ts +17 -18
- package/lib/esm/resources/shipping_method_tiers.js +8 -0
- package/lib/esm/resources/shipping_methods.d.ts +79 -82
- package/lib/esm/resources/shipping_methods.js +11 -9
- package/lib/esm/resources/shipping_weight_tiers.d.ts +25 -26
- package/lib/esm/resources/shipping_weight_tiers.js +11 -3
- package/lib/esm/resources/shipping_zones.d.ts +32 -33
- package/lib/esm/resources/shipping_zones.js +11 -3
- package/lib/esm/resources/sku_list_items.d.ts +26 -27
- package/lib/esm/resources/sku_list_items.js +11 -3
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +39 -40
- package/lib/esm/resources/sku_list_promotion_rules.js +11 -3
- package/lib/esm/resources/sku_lists.d.ts +35 -36
- package/lib/esm/resources/sku_lists.js +11 -3
- package/lib/esm/resources/sku_options.d.ts +43 -44
- package/lib/esm/resources/sku_options.js +11 -3
- package/lib/esm/resources/skus.d.ts +56 -57
- package/lib/esm/resources/skus.js +11 -3
- package/lib/esm/resources/stock_items.d.ts +28 -29
- package/lib/esm/resources/stock_items.js +11 -3
- package/lib/esm/resources/stock_line_items.d.ts +40 -44
- package/lib/esm/resources/stock_line_items.js +11 -12
- package/lib/esm/resources/stock_locations.d.ts +32 -33
- package/lib/esm/resources/stock_locations.js +11 -3
- package/lib/esm/resources/stock_reservations.d.ts +22 -24
- package/lib/esm/resources/stock_reservations.js +11 -6
- package/lib/esm/resources/stock_transfers.d.ts +44 -51
- package/lib/esm/resources/stock_transfers.js +11 -21
- package/lib/esm/resources/stripe_gateways.d.ts +22 -23
- package/lib/esm/resources/stripe_gateways.js +11 -3
- package/lib/esm/resources/stripe_payments.d.ts +37 -37
- package/lib/esm/resources/stripe_payments.js +11 -9
- 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 +13 -14
- package/lib/esm/resources/tax_calculators.js +8 -0
- package/lib/esm/resources/tax_categories.d.ts +30 -31
- package/lib/esm/resources/tax_categories.js +11 -3
- package/lib/esm/resources/tax_rules.d.ts +51 -52
- package/lib/esm/resources/tax_rules.js +11 -3
- package/lib/esm/resources/taxjar_accounts.d.ts +21 -22
- package/lib/esm/resources/taxjar_accounts.js +11 -3
- package/lib/esm/resources/transactions.d.ts +24 -25
- package/lib/esm/resources/transactions.js +8 -0
- package/lib/esm/resources/versions.d.ts +14 -14
- package/lib/esm/resources/versions.js +8 -0
- package/lib/esm/resources/voids.d.ts +25 -26
- package/lib/esm/resources/voids.js +8 -0
- package/lib/esm/resources/webhooks.d.ts +31 -35
- package/lib/esm/resources/webhooks.js +11 -12
- package/lib/esm/resources/wire_transfers.d.ts +16 -17
- package/lib/esm/resources/wire_transfers.js +11 -3
- package/lib/esm/static.d.ts +2 -5
- package/lib/esm/static.js +2 -8
- package/lib/esm/util.d.ts +4 -2
- package/lib/esm/util.js +1 -27
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +18 -18
@@ -1,69 +1,68 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type {
|
3
|
-
import type {
|
4
|
-
import type {
|
5
|
-
import type { SkuOption, SkuOptionType } from './sku_options';
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { LineItem } from './line_items';
|
4
|
+
import type { SkuOption } from './sku_options';
|
6
5
|
import type { Event } from './events';
|
7
|
-
import type { Tag
|
8
|
-
type LineItemOptionType = 'line_item_options';
|
6
|
+
import type { Tag } from './tags';
|
9
7
|
type LineItemOptionRel = ResourceRel & {
|
10
|
-
type:
|
8
|
+
type: typeof LineItemOptions.TYPE;
|
11
9
|
};
|
12
10
|
type LineItemRel = ResourceRel & {
|
13
|
-
type:
|
11
|
+
type: 'line_items';
|
14
12
|
};
|
15
13
|
type SkuOptionRel = ResourceRel & {
|
16
|
-
type:
|
14
|
+
type: 'sku_options';
|
17
15
|
};
|
18
16
|
type TagRel = ResourceRel & {
|
19
|
-
type:
|
17
|
+
type: 'tags';
|
20
18
|
};
|
21
19
|
interface LineItemOption extends Resource {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
tags?: Tag[] | null;
|
20
|
+
name?: string;
|
21
|
+
quantity?: number;
|
22
|
+
currency_code?: string;
|
23
|
+
unit_amount_cents?: number;
|
24
|
+
unit_amount_float?: number;
|
25
|
+
formatted_unit_amount?: string;
|
26
|
+
total_amount_cents?: number;
|
27
|
+
total_amount_float?: number;
|
28
|
+
formatted_total_amount?: string;
|
29
|
+
delay_hours?: number;
|
30
|
+
delay_days?: number;
|
31
|
+
options?: object;
|
32
|
+
line_item?: LineItem;
|
33
|
+
sku_option?: SkuOption;
|
34
|
+
events?: Event[];
|
35
|
+
tags?: Tag[];
|
39
36
|
}
|
40
37
|
interface LineItemOptionCreate extends ResourceCreate {
|
41
|
-
name?: string
|
38
|
+
name?: string;
|
42
39
|
quantity: number;
|
43
|
-
options:
|
40
|
+
options: object;
|
44
41
|
line_item: LineItemRel;
|
45
42
|
sku_option: SkuOptionRel;
|
46
|
-
tags?: TagRel[]
|
43
|
+
tags?: TagRel[];
|
47
44
|
}
|
48
45
|
interface LineItemOptionUpdate extends ResourceUpdate {
|
49
|
-
name?: string
|
50
|
-
quantity?: number
|
51
|
-
options?:
|
52
|
-
sku_option?: SkuOptionRel
|
53
|
-
tags?: TagRel[]
|
46
|
+
name?: string;
|
47
|
+
quantity?: number;
|
48
|
+
options?: object;
|
49
|
+
sku_option?: SkuOptionRel;
|
50
|
+
tags?: TagRel[];
|
54
51
|
}
|
55
|
-
declare class LineItemOptions extends ApiResource
|
56
|
-
static readonly TYPE:
|
52
|
+
declare class LineItemOptions extends ApiResource {
|
53
|
+
static readonly TYPE: 'line_item_options';
|
54
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>>;
|
57
55
|
create(resource: LineItemOptionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItemOption>;
|
56
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItemOption>;
|
58
57
|
update(resource: LineItemOptionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItemOption>;
|
59
|
-
delete(id: string
|
58
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
60
59
|
line_item(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
61
60
|
sku_option(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuOption>;
|
62
61
|
events(lineItemOptionId: string | LineItemOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
63
62
|
tags(lineItemOptionId: string | LineItemOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
64
63
|
isLineItemOption(resource: any): resource is LineItemOption;
|
65
64
|
relationship(id: string | ResourceId | null): LineItemOptionRel;
|
66
|
-
type():
|
65
|
+
type(): string;
|
67
66
|
}
|
68
67
|
export default LineItemOptions;
|
69
|
-
export
|
68
|
+
export { LineItemOption, LineItemOptionCreate, LineItemOptionUpdate };
|
@@ -2,14 +2,21 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class LineItemOptions extends resource_1.ApiResource {
|
5
|
+
// static readonly PATH = 'line_item_options'
|
6
|
+
async list(params, options) {
|
7
|
+
return this.resources.list({ type: LineItemOptions.TYPE }, params, options);
|
8
|
+
}
|
5
9
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({
|
10
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: LineItemOptions.TYPE }), params, options);
|
11
|
+
}
|
12
|
+
async retrieve(id, params, options) {
|
13
|
+
return this.resources.retrieve({ type: LineItemOptions.TYPE, id }, params, options);
|
7
14
|
}
|
8
15
|
async update(resource, params, options) {
|
9
|
-
return this.resources.update({
|
16
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: LineItemOptions.TYPE }), params, options);
|
10
17
|
}
|
11
18
|
async delete(id, options) {
|
12
|
-
await this.resources.delete(
|
19
|
+
await this.resources.delete({ type: LineItemOptions.TYPE, id }, options);
|
13
20
|
}
|
14
21
|
async line_item(lineItemOptionId, params, options) {
|
15
22
|
const _lineItemOptionId = lineItemOptionId.id || lineItemOptionId;
|
@@ -27,6 +34,7 @@ class LineItemOptions extends resource_1.ApiResource {
|
|
27
34
|
const _lineItemOptionId = lineItemOptionId.id || lineItemOptionId;
|
28
35
|
return this.resources.fetch({ type: 'tags' }, `line_item_options/${_lineItemOptionId}/tags`, params, options);
|
29
36
|
}
|
37
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
30
38
|
isLineItemOption(resource) {
|
31
39
|
return resource.type && (resource.type === LineItemOptions.TYPE);
|
32
40
|
}
|
@@ -1,149 +1,148 @@
|
|
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 {
|
9
|
-
import type {
|
10
|
-
import type {
|
11
|
-
import type {
|
12
|
-
import type {
|
13
|
-
import type {
|
14
|
-
import type { Sku, SkuType } from './skus';
|
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 { Adjustment } from './adjustments';
|
5
|
+
import type { Bundle } from './bundles';
|
6
|
+
import type { ExternalPromotion } from './external_promotions';
|
7
|
+
import type { FixedAmountPromotion } from './fixed_amount_promotions';
|
8
|
+
import type { FreeShippingPromotion } from './free_shipping_promotions';
|
9
|
+
import type { GiftCard } from './gift_cards';
|
10
|
+
import type { PaymentMethod } from './payment_methods';
|
11
|
+
import type { PercentageDiscountPromotion } from './percentage_discount_promotions';
|
12
|
+
import type { Shipment } from './shipments';
|
13
|
+
import type { Sku } from './skus';
|
15
14
|
import type { LineItemOption } from './line_item_options';
|
16
15
|
import type { ReturnLineItem } from './return_line_items';
|
17
16
|
import type { StockReservation } from './stock_reservations';
|
18
17
|
import type { StockLineItem } from './stock_line_items';
|
19
18
|
import type { StockTransfer } from './stock_transfers';
|
20
19
|
import type { Event } from './events';
|
21
|
-
import type { Tag
|
22
|
-
type LineItemType = 'line_items';
|
20
|
+
import type { Tag } from './tags';
|
23
21
|
type LineItemRel = ResourceRel & {
|
24
|
-
type:
|
22
|
+
type: typeof LineItems.TYPE;
|
25
23
|
};
|
26
24
|
type OrderRel = ResourceRel & {
|
27
|
-
type:
|
25
|
+
type: 'orders';
|
28
26
|
};
|
29
27
|
type AdjustmentRel = ResourceRel & {
|
30
|
-
type:
|
28
|
+
type: 'adjustments';
|
31
29
|
};
|
32
30
|
type BundleRel = ResourceRel & {
|
33
|
-
type:
|
31
|
+
type: 'bundles';
|
34
32
|
};
|
35
33
|
type ExternalPromotionRel = ResourceRel & {
|
36
|
-
type:
|
34
|
+
type: 'external_promotions';
|
37
35
|
};
|
38
36
|
type FixedAmountPromotionRel = ResourceRel & {
|
39
|
-
type:
|
37
|
+
type: 'fixed_amount_promotions';
|
40
38
|
};
|
41
39
|
type FreeShippingPromotionRel = ResourceRel & {
|
42
|
-
type:
|
40
|
+
type: 'free_shipping_promotions';
|
43
41
|
};
|
44
42
|
type GiftCardRel = ResourceRel & {
|
45
|
-
type:
|
43
|
+
type: 'gift_cards';
|
46
44
|
};
|
47
45
|
type PaymentMethodRel = ResourceRel & {
|
48
|
-
type:
|
46
|
+
type: 'payment_methods';
|
49
47
|
};
|
50
48
|
type PercentageDiscountPromotionRel = ResourceRel & {
|
51
|
-
type:
|
49
|
+
type: 'percentage_discount_promotions';
|
52
50
|
};
|
53
51
|
type ShipmentRel = ResourceRel & {
|
54
|
-
type:
|
52
|
+
type: 'shipments';
|
55
53
|
};
|
56
54
|
type SkuRel = ResourceRel & {
|
57
|
-
type:
|
55
|
+
type: 'skus';
|
58
56
|
};
|
59
57
|
type TagRel = ResourceRel & {
|
60
|
-
type:
|
58
|
+
type: 'tags';
|
61
59
|
};
|
62
60
|
interface LineItem extends Resource {
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
return_line_items?: ReturnLineItem[] | null;
|
61
|
+
sku_code?: string;
|
62
|
+
bundle_code?: string;
|
63
|
+
quantity?: number;
|
64
|
+
_external_price?: boolean;
|
65
|
+
currency_code?: string;
|
66
|
+
unit_amount_cents?: number;
|
67
|
+
unit_amount_float?: number;
|
68
|
+
formatted_unit_amount?: string;
|
69
|
+
compare_at_amount_cents?: number;
|
70
|
+
compare_at_amount_float?: number;
|
71
|
+
formatted_compare_at_amount?: string;
|
72
|
+
options_amount_cents?: number;
|
73
|
+
options_amount_float?: number;
|
74
|
+
formatted_options_amount?: string;
|
75
|
+
discount_cents?: number;
|
76
|
+
discount_float?: number;
|
77
|
+
formatted_discount?: string;
|
78
|
+
total_amount_cents?: number;
|
79
|
+
total_amount_float?: number;
|
80
|
+
formatted_total_amount?: string;
|
81
|
+
tax_amount_cents?: number;
|
82
|
+
tax_amount_float?: number;
|
83
|
+
formatted_tax_amount?: string;
|
84
|
+
name?: string;
|
85
|
+
image_url?: string;
|
86
|
+
discount_breakdown?: object;
|
87
|
+
tax_rate?: number;
|
88
|
+
tax_breakdown?: object;
|
89
|
+
item_type?: string;
|
90
|
+
frequency?: string;
|
91
|
+
coupon_code?: string;
|
92
|
+
order?: Order;
|
93
|
+
item?: Adjustment | Bundle | ExternalPromotion | FixedAmountPromotion | FreeShippingPromotion | GiftCard | PaymentMethod | PercentageDiscountPromotion | Shipment | Sku;
|
94
|
+
sku?: Sku;
|
95
|
+
bundle?: Bundle;
|
96
|
+
line_item_options?: LineItemOption[];
|
97
|
+
return_line_items?: ReturnLineItem[];
|
101
98
|
/**
|
102
99
|
* @deprecated This field should not be used as it may be removed in the future without notice
|
103
100
|
*/
|
104
101
|
shipment_line_items?: object[];
|
105
|
-
stock_reservations?: StockReservation[]
|
106
|
-
stock_line_items?: StockLineItem[]
|
107
|
-
stock_transfers?: StockTransfer[]
|
108
|
-
events?: Event[]
|
109
|
-
tags?: Tag[]
|
102
|
+
stock_reservations?: StockReservation[];
|
103
|
+
stock_line_items?: StockLineItem[];
|
104
|
+
stock_transfers?: StockTransfer[];
|
105
|
+
events?: Event[];
|
106
|
+
tags?: Tag[];
|
110
107
|
}
|
111
108
|
interface LineItemCreate extends ResourceCreate {
|
112
|
-
sku_code?: string
|
113
|
-
bundle_code?: string
|
109
|
+
sku_code?: string;
|
110
|
+
bundle_code?: string;
|
114
111
|
quantity: number;
|
115
|
-
_external_price?: boolean
|
116
|
-
_update_quantity?: boolean
|
117
|
-
_reserve_stock?: boolean
|
118
|
-
unit_amount_cents?: number
|
119
|
-
compare_at_amount_cents?: number
|
120
|
-
name?: string
|
121
|
-
image_url?: string
|
122
|
-
item_type?:
|
123
|
-
frequency?: string
|
112
|
+
_external_price?: boolean;
|
113
|
+
_update_quantity?: boolean;
|
114
|
+
_reserve_stock?: boolean;
|
115
|
+
unit_amount_cents?: number;
|
116
|
+
compare_at_amount_cents?: number;
|
117
|
+
name?: string;
|
118
|
+
image_url?: string;
|
119
|
+
item_type?: string;
|
120
|
+
frequency?: string;
|
124
121
|
order: OrderRel;
|
125
|
-
item?: AdjustmentRel | BundleRel | ExternalPromotionRel | FixedAmountPromotionRel | FreeShippingPromotionRel | GiftCardRel | PaymentMethodRel | PercentageDiscountPromotionRel | ShipmentRel | SkuRel
|
126
|
-
sku?: SkuRel
|
127
|
-
bundle?: BundleRel
|
128
|
-
tags?: TagRel[]
|
122
|
+
item?: AdjustmentRel | BundleRel | ExternalPromotionRel | FixedAmountPromotionRel | FreeShippingPromotionRel | GiftCardRel | PaymentMethodRel | PercentageDiscountPromotionRel | ShipmentRel | SkuRel;
|
123
|
+
sku?: SkuRel;
|
124
|
+
bundle?: BundleRel;
|
125
|
+
tags?: TagRel[];
|
129
126
|
}
|
130
127
|
interface LineItemUpdate extends ResourceUpdate {
|
131
|
-
sku_code?: string
|
132
|
-
bundle_code?: string
|
133
|
-
quantity?: number
|
134
|
-
_external_price?: boolean
|
135
|
-
_reserve_stock?: boolean
|
136
|
-
compare_at_amount_cents?: number
|
137
|
-
name?: string
|
138
|
-
image_url?: string
|
139
|
-
frequency?: string
|
140
|
-
tags?: TagRel[]
|
128
|
+
sku_code?: string;
|
129
|
+
bundle_code?: string;
|
130
|
+
quantity?: number;
|
131
|
+
_external_price?: boolean;
|
132
|
+
_reserve_stock?: boolean;
|
133
|
+
compare_at_amount_cents?: number;
|
134
|
+
name?: string;
|
135
|
+
image_url?: string;
|
136
|
+
frequency?: string;
|
137
|
+
tags?: TagRel[];
|
141
138
|
}
|
142
|
-
declare class LineItems extends ApiResource
|
143
|
-
static readonly TYPE:
|
139
|
+
declare class LineItems extends ApiResource {
|
140
|
+
static readonly TYPE: 'line_items';
|
141
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItem>>;
|
144
142
|
create(resource: LineItemCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
143
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
145
144
|
update(resource: LineItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
146
|
-
delete(id: string
|
145
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
147
146
|
order(lineItemId: string | LineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
148
147
|
line_item_options(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>>;
|
149
148
|
return_line_items(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>>;
|
@@ -152,11 +151,9 @@ declare class LineItems extends ApiResource<LineItem> {
|
|
152
151
|
stock_transfers(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
|
153
152
|
events(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
154
153
|
tags(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
155
|
-
_external_price(id: string | LineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
156
|
-
_reserve_stock(id: string | LineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
157
154
|
isLineItem(resource: any): resource is LineItem;
|
158
155
|
relationship(id: string | ResourceId | null): LineItemRel;
|
159
|
-
type():
|
156
|
+
type(): string;
|
160
157
|
}
|
161
158
|
export default LineItems;
|
162
|
-
export
|
159
|
+
export { LineItem, LineItemCreate, LineItemUpdate };
|
@@ -2,14 +2,21 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class LineItems extends resource_1.ApiResource {
|
5
|
+
// static readonly PATH = 'line_items'
|
6
|
+
async list(params, options) {
|
7
|
+
return this.resources.list({ type: LineItems.TYPE }, params, options);
|
8
|
+
}
|
5
9
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({
|
10
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: LineItems.TYPE }), params, options);
|
11
|
+
}
|
12
|
+
async retrieve(id, params, options) {
|
13
|
+
return this.resources.retrieve({ type: LineItems.TYPE, id }, params, options);
|
7
14
|
}
|
8
15
|
async update(resource, params, options) {
|
9
|
-
return this.resources.update({
|
16
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: LineItems.TYPE }), params, options);
|
10
17
|
}
|
11
18
|
async delete(id, options) {
|
12
|
-
await this.resources.delete(
|
19
|
+
await this.resources.delete({ type: LineItems.TYPE, id }, options);
|
13
20
|
}
|
14
21
|
async order(lineItemId, params, options) {
|
15
22
|
const _lineItemId = lineItemId.id || lineItemId;
|
@@ -43,12 +50,7 @@ class LineItems extends resource_1.ApiResource {
|
|
43
50
|
const _lineItemId = lineItemId.id || lineItemId;
|
44
51
|
return this.resources.fetch({ type: 'tags' }, `line_items/${_lineItemId}/tags`, params, options);
|
45
52
|
}
|
46
|
-
|
47
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: LineItems.TYPE, _external_price: true }, params, options);
|
48
|
-
}
|
49
|
-
async _reserve_stock(id, params, options) {
|
50
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: LineItems.TYPE, _reserve_stock: true }, params, options);
|
51
|
-
}
|
53
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
52
54
|
isLineItem(resource) {
|
53
55
|
return resource.type && (resource.type === LineItems.TYPE);
|
54
56
|
}
|
@@ -1,34 +1,33 @@
|
|
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 { PaymentMethod } from './payment_methods';
|
5
4
|
import type { Version } from './versions';
|
6
|
-
type ManualGatewayType = 'manual_gateways';
|
7
5
|
type ManualGatewayRel = ResourceRel & {
|
8
|
-
type:
|
6
|
+
type: typeof ManualGateways.TYPE;
|
9
7
|
};
|
10
8
|
interface ManualGateway extends Resource {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
versions?: Version[] | null;
|
9
|
+
name?: string;
|
10
|
+
payment_methods?: PaymentMethod[];
|
11
|
+
versions?: Version[];
|
15
12
|
}
|
16
13
|
interface ManualGatewayCreate extends ResourceCreate {
|
17
14
|
name: string;
|
18
15
|
}
|
19
16
|
interface ManualGatewayUpdate extends ResourceUpdate {
|
20
|
-
name?: string
|
17
|
+
name?: string;
|
21
18
|
}
|
22
|
-
declare class ManualGateways extends ApiResource
|
23
|
-
static readonly TYPE:
|
19
|
+
declare class ManualGateways extends ApiResource {
|
20
|
+
static readonly TYPE: 'manual_gateways';
|
21
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ManualGateway>>;
|
24
22
|
create(resource: ManualGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualGateway>;
|
23
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualGateway>;
|
25
24
|
update(resource: ManualGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualGateway>;
|
26
|
-
delete(id: string
|
25
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
27
26
|
payment_methods(manualGatewayId: string | ManualGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
28
27
|
versions(manualGatewayId: string | ManualGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
29
28
|
isManualGateway(resource: any): resource is ManualGateway;
|
30
29
|
relationship(id: string | ResourceId | null): ManualGatewayRel;
|
31
|
-
type():
|
30
|
+
type(): string;
|
32
31
|
}
|
33
32
|
export default ManualGateways;
|
34
|
-
export
|
33
|
+
export { ManualGateway, ManualGatewayCreate, ManualGatewayUpdate };
|
@@ -2,14 +2,21 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class ManualGateways extends resource_1.ApiResource {
|
5
|
+
// static readonly PATH = 'manual_gateways'
|
6
|
+
async list(params, options) {
|
7
|
+
return this.resources.list({ type: ManualGateways.TYPE }, params, options);
|
8
|
+
}
|
5
9
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({
|
10
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ManualGateways.TYPE }), params, options);
|
11
|
+
}
|
12
|
+
async retrieve(id, params, options) {
|
13
|
+
return this.resources.retrieve({ type: ManualGateways.TYPE, id }, params, options);
|
7
14
|
}
|
8
15
|
async update(resource, params, options) {
|
9
|
-
return this.resources.update({
|
16
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ManualGateways.TYPE }), params, options);
|
10
17
|
}
|
11
18
|
async delete(id, options) {
|
12
|
-
await this.resources.delete(
|
19
|
+
await this.resources.delete({ type: ManualGateways.TYPE, id }, options);
|
13
20
|
}
|
14
21
|
async payment_methods(manualGatewayId, params, options) {
|
15
22
|
const _manualGatewayId = manualGatewayId.id || manualGatewayId;
|
@@ -19,6 +26,7 @@ class ManualGateways extends resource_1.ApiResource {
|
|
19
26
|
const _manualGatewayId = manualGatewayId.id || manualGatewayId;
|
20
27
|
return this.resources.fetch({ type: 'versions' }, `manual_gateways/${_manualGatewayId}/versions`, params, options);
|
21
28
|
}
|
29
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
22
30
|
isManualGateway(resource) {
|
23
31
|
return resource.type && (resource.type === ManualGateways.TYPE);
|
24
32
|
}
|
@@ -1,45 +1,44 @@
|
|
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
5
|
import type { Version } from './versions';
|
7
|
-
import type { TaxRule
|
8
|
-
type ManualTaxCalculatorType = 'manual_tax_calculators';
|
6
|
+
import type { TaxRule } from './tax_rules';
|
9
7
|
type ManualTaxCalculatorRel = ResourceRel & {
|
10
|
-
type:
|
8
|
+
type: typeof ManualTaxCalculators.TYPE;
|
11
9
|
};
|
12
10
|
type TaxRuleRel = ResourceRel & {
|
13
|
-
type:
|
11
|
+
type: 'tax_rules';
|
14
12
|
};
|
15
13
|
interface ManualTaxCalculator extends Resource {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
tax_rules?: TaxRule[] | null;
|
14
|
+
name?: string;
|
15
|
+
markets?: Market[];
|
16
|
+
attachments?: Attachment[];
|
17
|
+
versions?: Version[];
|
18
|
+
tax_rules?: TaxRule[];
|
22
19
|
}
|
23
20
|
interface ManualTaxCalculatorCreate extends ResourceCreate {
|
24
21
|
name: string;
|
25
|
-
tax_rules?: TaxRuleRel[]
|
22
|
+
tax_rules?: TaxRuleRel[];
|
26
23
|
}
|
27
24
|
interface ManualTaxCalculatorUpdate extends ResourceUpdate {
|
28
|
-
name?: string
|
29
|
-
tax_rules?: TaxRuleRel[]
|
25
|
+
name?: string;
|
26
|
+
tax_rules?: TaxRuleRel[];
|
30
27
|
}
|
31
|
-
declare class ManualTaxCalculators extends ApiResource
|
32
|
-
static readonly TYPE:
|
28
|
+
declare class ManualTaxCalculators extends ApiResource {
|
29
|
+
static readonly TYPE: 'manual_tax_calculators';
|
30
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ManualTaxCalculator>>;
|
33
31
|
create(resource: ManualTaxCalculatorCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
32
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
34
33
|
update(resource: ManualTaxCalculatorUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
35
|
-
delete(id: string
|
34
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
36
35
|
markets(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
37
36
|
attachments(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
38
37
|
versions(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
39
38
|
tax_rules(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxRule>>;
|
40
39
|
isManualTaxCalculator(resource: any): resource is ManualTaxCalculator;
|
41
40
|
relationship(id: string | ResourceId | null): ManualTaxCalculatorRel;
|
42
|
-
type():
|
41
|
+
type(): string;
|
43
42
|
}
|
44
43
|
export default ManualTaxCalculators;
|
45
|
-
export
|
44
|
+
export { ManualTaxCalculator, ManualTaxCalculatorCreate, ManualTaxCalculatorUpdate };
|
@@ -2,14 +2,21 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const resource_1 = require("../resource");
|
4
4
|
class ManualTaxCalculators extends resource_1.ApiResource {
|
5
|
+
// static readonly PATH = 'manual_tax_calculators'
|
6
|
+
async list(params, options) {
|
7
|
+
return this.resources.list({ type: ManualTaxCalculators.TYPE }, params, options);
|
8
|
+
}
|
5
9
|
async create(resource, params, options) {
|
6
|
-
return this.resources.create({
|
10
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ManualTaxCalculators.TYPE }), params, options);
|
11
|
+
}
|
12
|
+
async retrieve(id, params, options) {
|
13
|
+
return this.resources.retrieve({ type: ManualTaxCalculators.TYPE, id }, params, options);
|
7
14
|
}
|
8
15
|
async update(resource, params, options) {
|
9
|
-
return this.resources.update({
|
16
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ManualTaxCalculators.TYPE }), params, options);
|
10
17
|
}
|
11
18
|
async delete(id, options) {
|
12
|
-
await this.resources.delete(
|
19
|
+
await this.resources.delete({ type: ManualTaxCalculators.TYPE, id }, options);
|
13
20
|
}
|
14
21
|
async markets(manualTaxCalculatorId, params, options) {
|
15
22
|
const _manualTaxCalculatorId = manualTaxCalculatorId.id || manualTaxCalculatorId;
|
@@ -27,6 +34,7 @@ class ManualTaxCalculators extends resource_1.ApiResource {
|
|
27
34
|
const _manualTaxCalculatorId = manualTaxCalculatorId.id || manualTaxCalculatorId;
|
28
35
|
return this.resources.fetch({ type: 'tax_rules' }, `manual_tax_calculators/${_manualTaxCalculatorId}/tax_rules`, params, options);
|
29
36
|
}
|
37
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
30
38
|
isManualTaxCalculator(resource) {
|
31
39
|
return resource.type && (resource.type === ManualTaxCalculators.TYPE);
|
32
40
|
}
|