@commercelayer/sdk 4.2.0-beta.3 → 4.3.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +31 -0
- package/lib/cjs/api.d.ts +1 -1
- package/lib/cjs/client.d.ts +3 -3
- package/lib/cjs/commercelayer.d.ts +2 -2
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/common.js +1 -1
- package/lib/cjs/jsonapi.d.ts +2 -2
- package/lib/cjs/jsonapi.js +1 -1
- package/lib/cjs/model.d.ts +1 -1
- package/lib/cjs/resource.d.ts +9 -4
- package/lib/cjs/resource.js +1 -1
- package/lib/cjs/resources/addresses.d.ts +6 -5
- package/lib/cjs/resources/addresses.js +1 -1
- package/lib/cjs/resources/adjustments.d.ts +4 -4
- package/lib/cjs/resources/adjustments.js +1 -1
- package/lib/cjs/resources/adyen_gateways.d.ts +7 -5
- package/lib/cjs/resources/adyen_gateways.js +1 -1
- package/lib/cjs/resources/adyen_payments.d.ts +7 -5
- package/lib/cjs/resources/adyen_payments.js +1 -1
- package/lib/cjs/resources/application.d.ts +4 -4
- package/lib/cjs/resources/application.js +1 -1
- package/lib/cjs/resources/attachments.d.ts +34 -34
- package/lib/cjs/resources/attachments.js +1 -1
- package/lib/cjs/resources/authorizations.d.ts +7 -4
- package/lib/cjs/resources/authorizations.js +1 -1
- package/lib/cjs/resources/avalara_accounts.d.ts +8 -5
- package/lib/cjs/resources/avalara_accounts.js +1 -1
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +6 -5
- package/lib/cjs/resources/billing_info_validation_rules.js +1 -1
- package/lib/cjs/resources/bing_geocoders.d.ts +6 -4
- package/lib/cjs/resources/bing_geocoders.js +1 -1
- package/lib/cjs/resources/braintree_gateways.d.ts +7 -5
- package/lib/cjs/resources/braintree_gateways.js +1 -1
- package/lib/cjs/resources/braintree_payments.d.ts +7 -5
- package/lib/cjs/resources/braintree_payments.js +1 -1
- package/lib/cjs/resources/bundles.d.ts +15 -6
- package/lib/cjs/resources/bundles.js +1 -1
- package/lib/cjs/resources/captures.d.ts +7 -4
- package/lib/cjs/resources/captures.js +1 -1
- package/lib/cjs/resources/carrier_accounts.d.ts +6 -4
- package/lib/cjs/resources/carrier_accounts.js +1 -1
- package/lib/cjs/resources/checkout_com_gateways.d.ts +7 -5
- package/lib/cjs/resources/checkout_com_gateways.js +1 -1
- package/lib/cjs/resources/checkout_com_payments.d.ts +7 -5
- package/lib/cjs/resources/checkout_com_payments.js +1 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +12 -11
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -1
- package/lib/cjs/resources/coupon_recipients.d.ts +7 -5
- package/lib/cjs/resources/coupon_recipients.js +1 -1
- package/lib/cjs/resources/coupons.d.ts +6 -5
- package/lib/cjs/resources/coupons.js +1 -1
- package/lib/cjs/resources/customer_addresses.d.ts +8 -6
- package/lib/cjs/resources/customer_addresses.js +1 -1
- package/lib/cjs/resources/customer_groups.d.ts +7 -4
- package/lib/cjs/resources/customer_groups.js +1 -1
- package/lib/cjs/resources/customer_password_resets.d.ts +5 -4
- package/lib/cjs/resources/customer_password_resets.js +1 -1
- package/lib/cjs/resources/customer_payment_sources.d.ts +14 -13
- package/lib/cjs/resources/customer_payment_sources.js +1 -1
- package/lib/cjs/resources/customer_subscriptions.d.ts +5 -4
- package/lib/cjs/resources/customer_subscriptions.js +1 -1
- package/lib/cjs/resources/customers.d.ts +13 -5
- package/lib/cjs/resources/customers.js +1 -1
- package/lib/cjs/resources/delivery_lead_times.d.ts +9 -6
- package/lib/cjs/resources/delivery_lead_times.js +1 -1
- package/lib/cjs/resources/event_callbacks.d.ts +5 -4
- package/lib/cjs/resources/event_callbacks.js +1 -1
- package/lib/cjs/resources/external_gateways.d.ts +6 -4
- package/lib/cjs/resources/external_gateways.js +1 -1
- package/lib/cjs/resources/external_payments.d.ts +8 -5
- package/lib/cjs/resources/external_payments.js +1 -1
- package/lib/cjs/resources/external_promotions.d.ts +17 -9
- package/lib/cjs/resources/external_promotions.js +1 -1
- package/lib/cjs/resources/external_tax_calculators.d.ts +8 -5
- package/lib/cjs/resources/external_tax_calculators.js +1 -1
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +17 -9
- package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
- package/lib/cjs/resources/fixed_price_promotions.d.ts +20 -10
- package/lib/cjs/resources/fixed_price_promotions.js +1 -1
- package/lib/cjs/resources/free_gift_promotions.d.ts +20 -10
- package/lib/cjs/resources/free_gift_promotions.js +1 -1
- package/lib/cjs/resources/free_shipping_promotions.d.ts +17 -9
- package/lib/cjs/resources/free_shipping_promotions.js +1 -1
- package/lib/cjs/resources/geocoders.d.ts +6 -4
- package/lib/cjs/resources/geocoders.js +1 -1
- package/lib/cjs/resources/gift_card_recipients.d.ts +7 -5
- package/lib/cjs/resources/gift_card_recipients.js +1 -1
- package/lib/cjs/resources/gift_cards.d.ts +10 -7
- package/lib/cjs/resources/gift_cards.js +1 -1
- package/lib/cjs/resources/google_geocoders.d.ts +6 -4
- package/lib/cjs/resources/google_geocoders.js +1 -1
- package/lib/cjs/resources/imports.d.ts +4 -4
- package/lib/cjs/resources/imports.js +1 -1
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +10 -7
- package/lib/cjs/resources/in_stock_subscriptions.js +1 -1
- package/lib/cjs/resources/inventory_models.d.ts +7 -4
- package/lib/cjs/resources/inventory_models.js +1 -1
- package/lib/cjs/resources/inventory_return_locations.d.ts +8 -6
- package/lib/cjs/resources/inventory_return_locations.js +1 -1
- package/lib/cjs/resources/inventory_stock_locations.d.ts +8 -6
- package/lib/cjs/resources/inventory_stock_locations.js +1 -1
- package/lib/cjs/resources/klarna_gateways.d.ts +7 -5
- package/lib/cjs/resources/klarna_gateways.js +1 -1
- package/lib/cjs/resources/klarna_payments.d.ts +7 -5
- package/lib/cjs/resources/klarna_payments.js +1 -1
- package/lib/cjs/resources/line_item_options.d.ts +8 -6
- package/lib/cjs/resources/line_item_options.js +1 -1
- package/lib/cjs/resources/line_items.d.ts +19 -15
- package/lib/cjs/resources/line_items.js +1 -1
- package/lib/cjs/resources/manual_gateways.d.ts +5 -4
- package/lib/cjs/resources/manual_gateways.js +1 -1
- package/lib/cjs/resources/manual_tax_calculators.d.ts +10 -6
- package/lib/cjs/resources/manual_tax_calculators.js +1 -1
- package/lib/cjs/resources/markets.d.ts +15 -9
- package/lib/cjs/resources/markets.js +1 -1
- package/lib/cjs/resources/merchants.d.ts +7 -5
- package/lib/cjs/resources/merchants.js +1 -1
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +10 -10
- package/lib/cjs/resources/order_amount_promotion_rules.js +1 -1
- package/lib/cjs/resources/order_copies.d.ts +8 -5
- package/lib/cjs/resources/order_copies.js +1 -1
- package/lib/cjs/resources/order_subscriptions.d.ts +11 -6
- package/lib/cjs/resources/order_subscriptions.js +1 -1
- package/lib/cjs/resources/order_validation_rules.d.ts +5 -4
- package/lib/cjs/resources/order_validation_rules.js +1 -1
- package/lib/cjs/resources/orders.d.ts +32 -16
- package/lib/cjs/resources/orders.js +1 -1
- package/lib/cjs/resources/organization.d.ts +4 -4
- package/lib/cjs/resources/organization.js +1 -1
- package/lib/cjs/resources/packages.d.ts +8 -5
- package/lib/cjs/resources/packages.js +1 -1
- package/lib/cjs/resources/parcel_line_items.d.ts +8 -6
- package/lib/cjs/resources/parcel_line_items.js +1 -1
- package/lib/cjs/resources/parcels.d.ts +10 -6
- package/lib/cjs/resources/parcels.js +1 -1
- package/lib/cjs/resources/payment_gateways.d.ts +5 -4
- package/lib/cjs/resources/payment_gateways.js +1 -1
- package/lib/cjs/resources/payment_methods.d.ts +13 -7
- package/lib/cjs/resources/payment_methods.js +1 -1
- package/lib/cjs/resources/paypal_gateways.d.ts +6 -4
- package/lib/cjs/resources/paypal_gateways.js +1 -1
- package/lib/cjs/resources/paypal_payments.d.ts +7 -5
- package/lib/cjs/resources/paypal_payments.js +1 -1
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +20 -10
- package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
- package/lib/cjs/resources/price_lists.d.ts +6 -4
- package/lib/cjs/resources/price_lists.js +1 -1
- package/lib/cjs/resources/prices.d.ts +9 -6
- package/lib/cjs/resources/prices.js +1 -1
- package/lib/cjs/resources/promotion_rules.d.ts +4 -4
- package/lib/cjs/resources/promotion_rules.js +1 -1
- package/lib/cjs/resources/promotions.d.ts +10 -4
- package/lib/cjs/resources/promotions.js +1 -1
- package/lib/cjs/resources/refunds.d.ts +6 -4
- package/lib/cjs/resources/refunds.js +1 -1
- package/lib/cjs/resources/return_line_items.d.ts +8 -6
- package/lib/cjs/resources/return_line_items.js +1 -1
- package/lib/cjs/resources/returns.d.ts +13 -6
- package/lib/cjs/resources/returns.js +1 -1
- package/lib/cjs/resources/shipments.d.ts +18 -5
- package/lib/cjs/resources/shipments.js +1 -1
- package/lib/cjs/resources/shipping_categories.d.ts +6 -4
- package/lib/cjs/resources/shipping_categories.js +1 -1
- package/lib/cjs/resources/shipping_methods.d.ts +16 -9
- package/lib/cjs/resources/shipping_methods.js +1 -1
- package/lib/cjs/resources/shipping_zones.d.ts +5 -4
- package/lib/cjs/resources/shipping_zones.js +1 -1
- package/lib/cjs/resources/sku_list_items.d.ts +8 -6
- package/lib/cjs/resources/sku_list_items.js +1 -1
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +13 -11
- package/lib/cjs/resources/sku_list_promotion_rules.js +1 -1
- package/lib/cjs/resources/sku_lists.d.ts +7 -4
- package/lib/cjs/resources/sku_lists.js +1 -1
- package/lib/cjs/resources/sku_options.d.ts +10 -5
- package/lib/cjs/resources/sku_options.js +1 -1
- package/lib/cjs/resources/skus.d.ts +11 -5
- package/lib/cjs/resources/skus.js +1 -1
- package/lib/cjs/resources/stock_items.d.ts +9 -6
- package/lib/cjs/resources/stock_items.js +1 -1
- package/lib/cjs/resources/stock_line_items.d.ts +7 -4
- package/lib/cjs/resources/stock_line_items.js +1 -1
- package/lib/cjs/resources/stock_locations.d.ts +11 -5
- package/lib/cjs/resources/stock_locations.js +1 -1
- package/lib/cjs/resources/stock_transfers.d.ts +13 -8
- package/lib/cjs/resources/stock_transfers.js +1 -1
- package/lib/cjs/resources/stripe_gateways.d.ts +6 -4
- package/lib/cjs/resources/stripe_gateways.js +1 -1
- package/lib/cjs/resources/stripe_payments.d.ts +7 -5
- package/lib/cjs/resources/stripe_payments.js +1 -1
- package/lib/cjs/resources/tax_calculators.d.ts +7 -4
- package/lib/cjs/resources/tax_calculators.js +1 -1
- package/lib/cjs/resources/tax_categories.d.ts +11 -9
- package/lib/cjs/resources/tax_categories.js +1 -1
- package/lib/cjs/resources/tax_rules.d.ts +6 -5
- package/lib/cjs/resources/tax_rules.js +1 -1
- package/lib/cjs/resources/taxjar_accounts.d.ts +8 -5
- package/lib/cjs/resources/taxjar_accounts.js +1 -1
- package/lib/cjs/resources/transactions.d.ts +5 -4
- package/lib/cjs/resources/transactions.js +1 -1
- package/lib/cjs/resources/voids.d.ts +6 -4
- package/lib/cjs/resources/voids.js +1 -1
- package/lib/cjs/resources/webhooks.d.ts +5 -4
- package/lib/cjs/resources/webhooks.js +1 -1
- package/lib/cjs/resources/wire_transfers.d.ts +6 -5
- package/lib/cjs/resources/wire_transfers.js +1 -1
- package/lib/esm/api.d.ts +1 -1
- package/lib/esm/client.d.ts +3 -3
- package/lib/esm/commercelayer.d.ts +2 -2
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/common.js +1 -1
- package/lib/esm/jsonapi.d.ts +2 -2
- package/lib/esm/jsonapi.js +1 -1
- package/lib/esm/model.d.ts +1 -1
- package/lib/esm/resource.d.ts +9 -4
- package/lib/esm/resource.js +1 -1
- package/lib/esm/resources/addresses.d.ts +6 -5
- package/lib/esm/resources/addresses.js +1 -1
- package/lib/esm/resources/adjustments.d.ts +4 -4
- package/lib/esm/resources/adjustments.js +1 -1
- package/lib/esm/resources/adyen_gateways.d.ts +7 -5
- package/lib/esm/resources/adyen_gateways.js +1 -1
- package/lib/esm/resources/adyen_payments.d.ts +7 -5
- package/lib/esm/resources/adyen_payments.js +1 -1
- package/lib/esm/resources/application.d.ts +4 -4
- package/lib/esm/resources/application.js +1 -1
- package/lib/esm/resources/attachments.d.ts +34 -34
- package/lib/esm/resources/attachments.js +1 -1
- package/lib/esm/resources/authorizations.d.ts +7 -4
- package/lib/esm/resources/authorizations.js +1 -1
- package/lib/esm/resources/avalara_accounts.d.ts +8 -5
- package/lib/esm/resources/avalara_accounts.js +1 -1
- package/lib/esm/resources/billing_info_validation_rules.d.ts +6 -5
- package/lib/esm/resources/billing_info_validation_rules.js +1 -1
- package/lib/esm/resources/bing_geocoders.d.ts +6 -4
- package/lib/esm/resources/bing_geocoders.js +1 -1
- package/lib/esm/resources/braintree_gateways.d.ts +7 -5
- package/lib/esm/resources/braintree_gateways.js +1 -1
- package/lib/esm/resources/braintree_payments.d.ts +7 -5
- package/lib/esm/resources/braintree_payments.js +1 -1
- package/lib/esm/resources/bundles.d.ts +15 -6
- package/lib/esm/resources/bundles.js +1 -1
- package/lib/esm/resources/captures.d.ts +7 -4
- package/lib/esm/resources/captures.js +1 -1
- package/lib/esm/resources/carrier_accounts.d.ts +6 -4
- package/lib/esm/resources/carrier_accounts.js +1 -1
- package/lib/esm/resources/checkout_com_gateways.d.ts +7 -5
- package/lib/esm/resources/checkout_com_gateways.js +1 -1
- package/lib/esm/resources/checkout_com_payments.d.ts +7 -5
- package/lib/esm/resources/checkout_com_payments.js +1 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +12 -11
- package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
- package/lib/esm/resources/coupon_recipients.d.ts +7 -5
- package/lib/esm/resources/coupon_recipients.js +1 -1
- package/lib/esm/resources/coupons.d.ts +6 -5
- package/lib/esm/resources/coupons.js +1 -1
- package/lib/esm/resources/customer_addresses.d.ts +8 -6
- package/lib/esm/resources/customer_addresses.js +1 -1
- package/lib/esm/resources/customer_groups.d.ts +7 -4
- package/lib/esm/resources/customer_groups.js +1 -1
- package/lib/esm/resources/customer_password_resets.d.ts +5 -4
- package/lib/esm/resources/customer_password_resets.js +1 -1
- package/lib/esm/resources/customer_payment_sources.d.ts +14 -13
- package/lib/esm/resources/customer_payment_sources.js +1 -1
- package/lib/esm/resources/customer_subscriptions.d.ts +5 -4
- package/lib/esm/resources/customer_subscriptions.js +1 -1
- package/lib/esm/resources/customers.d.ts +13 -5
- package/lib/esm/resources/customers.js +1 -1
- package/lib/esm/resources/delivery_lead_times.d.ts +9 -6
- package/lib/esm/resources/delivery_lead_times.js +1 -1
- package/lib/esm/resources/event_callbacks.d.ts +5 -4
- package/lib/esm/resources/event_callbacks.js +1 -1
- package/lib/esm/resources/external_gateways.d.ts +6 -4
- package/lib/esm/resources/external_gateways.js +1 -1
- package/lib/esm/resources/external_payments.d.ts +8 -5
- package/lib/esm/resources/external_payments.js +1 -1
- package/lib/esm/resources/external_promotions.d.ts +17 -9
- package/lib/esm/resources/external_promotions.js +1 -1
- package/lib/esm/resources/external_tax_calculators.d.ts +8 -5
- package/lib/esm/resources/external_tax_calculators.js +1 -1
- package/lib/esm/resources/fixed_amount_promotions.d.ts +17 -9
- package/lib/esm/resources/fixed_amount_promotions.js +1 -1
- package/lib/esm/resources/fixed_price_promotions.d.ts +20 -10
- package/lib/esm/resources/fixed_price_promotions.js +1 -1
- package/lib/esm/resources/free_gift_promotions.d.ts +20 -10
- package/lib/esm/resources/free_gift_promotions.js +1 -1
- package/lib/esm/resources/free_shipping_promotions.d.ts +17 -9
- package/lib/esm/resources/free_shipping_promotions.js +1 -1
- package/lib/esm/resources/geocoders.d.ts +6 -4
- package/lib/esm/resources/geocoders.js +1 -1
- package/lib/esm/resources/gift_card_recipients.d.ts +7 -5
- package/lib/esm/resources/gift_card_recipients.js +1 -1
- package/lib/esm/resources/gift_cards.d.ts +10 -7
- package/lib/esm/resources/gift_cards.js +1 -1
- package/lib/esm/resources/google_geocoders.d.ts +6 -4
- package/lib/esm/resources/google_geocoders.js +1 -1
- package/lib/esm/resources/imports.d.ts +4 -4
- package/lib/esm/resources/imports.js +1 -1
- package/lib/esm/resources/in_stock_subscriptions.d.ts +10 -7
- package/lib/esm/resources/in_stock_subscriptions.js +1 -1
- package/lib/esm/resources/inventory_models.d.ts +7 -4
- package/lib/esm/resources/inventory_models.js +1 -1
- package/lib/esm/resources/inventory_return_locations.d.ts +8 -6
- package/lib/esm/resources/inventory_return_locations.js +1 -1
- package/lib/esm/resources/inventory_stock_locations.d.ts +8 -6
- package/lib/esm/resources/inventory_stock_locations.js +1 -1
- package/lib/esm/resources/klarna_gateways.d.ts +7 -5
- package/lib/esm/resources/klarna_gateways.js +1 -1
- package/lib/esm/resources/klarna_payments.d.ts +7 -5
- package/lib/esm/resources/klarna_payments.js +1 -1
- package/lib/esm/resources/line_item_options.d.ts +8 -6
- package/lib/esm/resources/line_item_options.js +1 -1
- package/lib/esm/resources/line_items.d.ts +19 -15
- package/lib/esm/resources/line_items.js +1 -1
- package/lib/esm/resources/manual_gateways.d.ts +5 -4
- package/lib/esm/resources/manual_gateways.js +1 -1
- package/lib/esm/resources/manual_tax_calculators.d.ts +10 -6
- package/lib/esm/resources/manual_tax_calculators.js +1 -1
- package/lib/esm/resources/markets.d.ts +15 -9
- package/lib/esm/resources/markets.js +1 -1
- package/lib/esm/resources/merchants.d.ts +7 -5
- package/lib/esm/resources/merchants.js +1 -1
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +10 -10
- package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
- package/lib/esm/resources/order_copies.d.ts +8 -5
- package/lib/esm/resources/order_copies.js +1 -1
- package/lib/esm/resources/order_subscriptions.d.ts +11 -6
- package/lib/esm/resources/order_subscriptions.js +1 -1
- package/lib/esm/resources/order_validation_rules.d.ts +5 -4
- package/lib/esm/resources/order_validation_rules.js +1 -1
- package/lib/esm/resources/orders.d.ts +32 -16
- package/lib/esm/resources/orders.js +1 -1
- package/lib/esm/resources/organization.d.ts +4 -4
- package/lib/esm/resources/organization.js +1 -1
- package/lib/esm/resources/packages.d.ts +8 -5
- package/lib/esm/resources/packages.js +1 -1
- package/lib/esm/resources/parcel_line_items.d.ts +8 -6
- package/lib/esm/resources/parcel_line_items.js +1 -1
- package/lib/esm/resources/parcels.d.ts +10 -6
- package/lib/esm/resources/parcels.js +1 -1
- package/lib/esm/resources/payment_gateways.d.ts +5 -4
- package/lib/esm/resources/payment_gateways.js +1 -1
- package/lib/esm/resources/payment_methods.d.ts +13 -7
- package/lib/esm/resources/payment_methods.js +1 -1
- package/lib/esm/resources/paypal_gateways.d.ts +6 -4
- package/lib/esm/resources/paypal_gateways.js +1 -1
- package/lib/esm/resources/paypal_payments.d.ts +7 -5
- package/lib/esm/resources/paypal_payments.js +1 -1
- package/lib/esm/resources/percentage_discount_promotions.d.ts +20 -10
- package/lib/esm/resources/percentage_discount_promotions.js +1 -1
- package/lib/esm/resources/price_lists.d.ts +6 -4
- package/lib/esm/resources/price_lists.js +1 -1
- package/lib/esm/resources/prices.d.ts +9 -6
- package/lib/esm/resources/prices.js +1 -1
- package/lib/esm/resources/promotion_rules.d.ts +4 -4
- package/lib/esm/resources/promotion_rules.js +1 -1
- package/lib/esm/resources/promotions.d.ts +10 -4
- package/lib/esm/resources/promotions.js +1 -1
- package/lib/esm/resources/refunds.d.ts +6 -4
- package/lib/esm/resources/refunds.js +1 -1
- package/lib/esm/resources/return_line_items.d.ts +8 -6
- package/lib/esm/resources/return_line_items.js +1 -1
- package/lib/esm/resources/returns.d.ts +13 -6
- package/lib/esm/resources/returns.js +1 -1
- package/lib/esm/resources/shipments.d.ts +18 -5
- package/lib/esm/resources/shipments.js +1 -1
- package/lib/esm/resources/shipping_categories.d.ts +6 -4
- package/lib/esm/resources/shipping_categories.js +1 -1
- package/lib/esm/resources/shipping_methods.d.ts +16 -9
- package/lib/esm/resources/shipping_methods.js +1 -1
- package/lib/esm/resources/shipping_zones.d.ts +5 -4
- package/lib/esm/resources/shipping_zones.js +1 -1
- package/lib/esm/resources/sku_list_items.d.ts +8 -6
- package/lib/esm/resources/sku_list_items.js +1 -1
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +13 -11
- package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
- package/lib/esm/resources/sku_lists.d.ts +7 -4
- package/lib/esm/resources/sku_lists.js +1 -1
- package/lib/esm/resources/sku_options.d.ts +10 -5
- package/lib/esm/resources/sku_options.js +1 -1
- package/lib/esm/resources/skus.d.ts +11 -5
- package/lib/esm/resources/skus.js +1 -1
- package/lib/esm/resources/stock_items.d.ts +9 -6
- package/lib/esm/resources/stock_items.js +1 -1
- package/lib/esm/resources/stock_line_items.d.ts +7 -4
- package/lib/esm/resources/stock_line_items.js +1 -1
- package/lib/esm/resources/stock_locations.d.ts +11 -5
- package/lib/esm/resources/stock_locations.js +1 -1
- package/lib/esm/resources/stock_transfers.d.ts +13 -8
- package/lib/esm/resources/stock_transfers.js +1 -1
- package/lib/esm/resources/stripe_gateways.d.ts +6 -4
- package/lib/esm/resources/stripe_gateways.js +1 -1
- package/lib/esm/resources/stripe_payments.d.ts +7 -5
- package/lib/esm/resources/stripe_payments.js +1 -1
- package/lib/esm/resources/tax_calculators.d.ts +7 -4
- package/lib/esm/resources/tax_calculators.js +1 -1
- package/lib/esm/resources/tax_categories.d.ts +11 -9
- package/lib/esm/resources/tax_categories.js +1 -1
- package/lib/esm/resources/tax_rules.d.ts +6 -5
- package/lib/esm/resources/tax_rules.js +1 -1
- package/lib/esm/resources/taxjar_accounts.d.ts +8 -5
- package/lib/esm/resources/taxjar_accounts.js +1 -1
- package/lib/esm/resources/transactions.d.ts +5 -4
- package/lib/esm/resources/transactions.js +1 -1
- package/lib/esm/resources/voids.d.ts +6 -4
- package/lib/esm/resources/voids.js +1 -1
- package/lib/esm/resources/webhooks.d.ts +5 -4
- package/lib/esm/resources/webhooks.js +1 -1
- package/lib/esm/resources/wire_transfers.d.ts +6 -5
- package/lib/esm/resources/wire_transfers.js +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class PromotionRules extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:PromotionRules.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:PromotionRules.TYPE,id:e},r,t)}isPromotionRule(e){return e.type&&e.type===PromotionRules.TYPE}relationship(e){return typeof e=="string"?{id:e,type:PromotionRules.TYPE}:{id:e.id,type:PromotionRules.TYPE}}type(){return PromotionRules.TYPE}}PromotionRules.TYPE="promotion_rules",exports.default=PromotionRules;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class PromotionRules extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:PromotionRules.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:PromotionRules.TYPE,id:e},r,t)}isPromotionRule(e){return e.type&&e.type===PromotionRules.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:PromotionRules.TYPE}:{id:e.id,type:PromotionRules.TYPE}}type(){return PromotionRules.TYPE}}PromotionRules.TYPE="promotion_rules",exports.default=PromotionRules;
|
@@ -1,16 +1,17 @@
|
|
1
|
-
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Market } from './markets';
|
4
4
|
import { PromotionRule } from './promotion_rules';
|
5
5
|
import { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
6
6
|
import { SkuListPromotionRule } from './sku_list_promotion_rules';
|
7
7
|
import { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
8
8
|
import { Attachment } from './attachments';
|
9
|
-
declare type PromotionRel =
|
9
|
+
declare type PromotionRel = ResourceRel & {
|
10
10
|
type: typeof Promotions.TYPE;
|
11
11
|
};
|
12
12
|
interface Promotion extends Resource {
|
13
13
|
name?: string;
|
14
|
+
currency_code?: string;
|
14
15
|
starts_at?: string;
|
15
16
|
expires_at?: string;
|
16
17
|
total_usage_limit?: number;
|
@@ -27,8 +28,13 @@ declare class Promotions extends ApiResource {
|
|
27
28
|
static readonly TYPE: 'promotions';
|
28
29
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Promotion>>;
|
29
30
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Promotion>;
|
31
|
+
market(promotionId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
32
|
+
order_amount_promotion_rule(promotionId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
33
|
+
sku_list_promotion_rule(promotionId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
34
|
+
coupon_codes_promotion_rule(promotionId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
35
|
+
attachments(promotionId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
30
36
|
isPromotion(resource: any): resource is Promotion;
|
31
|
-
relationship(id: string | ResourceId): PromotionRel;
|
37
|
+
relationship(id: string | ResourceId | null): PromotionRel;
|
32
38
|
type(): string;
|
33
39
|
}
|
34
40
|
export default Promotions;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Promotions extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Promotions.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Promotions.TYPE,id:e},r,t)}isPromotion(e){return e.type&&e.type===Promotions.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Promotions.TYPE}:{id:e.id,type:Promotions.TYPE}}type(){return Promotions.TYPE}}Promotions.TYPE="promotions",exports.default=Promotions;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Promotions extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Promotions.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Promotions.TYPE,id:e},r,t)}async market(e,r,t){return this.resources.fetch({type:"markets"},`promotions/${e}/market`,r,t)}async order_amount_promotion_rule(e,r,t){return this.resources.fetch({type:"order_amount_promotion_rules"},`promotions/${e}/order_amount_promotion_rule`,r,t)}async sku_list_promotion_rule(e,r,t){return this.resources.fetch({type:"sku_list_promotion_rules"},`promotions/${e}/sku_list_promotion_rule`,r,t)}async coupon_codes_promotion_rule(e,r,t){return this.resources.fetch({type:"coupon_codes_promotion_rules"},`promotions/${e}/coupon_codes_promotion_rule`,r,t)}async attachments(e,r,t){return this.resources.fetch({type:"attachments"},`promotions/${e}/attachments`,r,t)}isPromotion(e){return e.type&&e.type===Promotions.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Promotions.TYPE}:{id:e.id,type:Promotions.TYPE}}type(){return Promotions.TYPE}}Promotions.TYPE="promotions",exports.default=Promotions;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Order } from './orders';
|
4
4
|
import { Capture } from './captures';
|
5
|
-
declare type RefundRel =
|
5
|
+
declare type RefundRel = ResourceRel & {
|
6
6
|
type: typeof Refunds.TYPE;
|
7
7
|
};
|
8
8
|
interface Refund extends Resource {
|
@@ -24,8 +24,10 @@ declare class Refunds extends ApiResource {
|
|
24
24
|
static readonly TYPE: 'refunds';
|
25
25
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Refund>>;
|
26
26
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Refund>;
|
27
|
+
order(refundId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
28
|
+
reference_capture(refundId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Capture>;
|
27
29
|
isRefund(resource: any): resource is Refund;
|
28
|
-
relationship(id: string | ResourceId): RefundRel;
|
30
|
+
relationship(id: string | ResourceId | null): RefundRel;
|
29
31
|
type(): string;
|
30
32
|
}
|
31
33
|
export default Refunds;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Refunds extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Refunds.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Refunds.TYPE,id:e},r,t)}isRefund(e){return e.type&&e.type===Refunds.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Refunds.TYPE}:{id:e.id,type:Refunds.TYPE}}type(){return Refunds.TYPE}}Refunds.TYPE="refunds",exports.default=Refunds;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Refunds extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Refunds.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Refunds.TYPE,id:e},r,t)}async order(e,r,t){return this.resources.fetch({type:"orders"},`refunds/${e}/order`,r,t)}async reference_capture(e,r,t){return this.resources.fetch({type:"captures"},`refunds/${e}/reference_capture`,r,t)}isRefund(e){return e.type&&e.type===Refunds.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Refunds.TYPE}:{id:e.id,type:Refunds.TYPE}}type(){return Refunds.TYPE}}Refunds.TYPE="refunds",exports.default=Refunds;
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Return } from './returns';
|
4
4
|
import { LineItem } from './line_items';
|
5
|
-
declare type ReturnLineItemRel =
|
5
|
+
declare type ReturnLineItemRel = ResourceRel & {
|
6
6
|
type: typeof ReturnLineItems.TYPE;
|
7
7
|
};
|
8
|
-
declare type ReturnRel =
|
8
|
+
declare type ReturnRel = ResourceRel & {
|
9
9
|
type: 'returns';
|
10
10
|
};
|
11
|
-
declare type LineItemRel =
|
11
|
+
declare type LineItemRel = ResourceRel & {
|
12
12
|
type: 'line_items';
|
13
13
|
};
|
14
14
|
interface ReturnLineItem extends Resource {
|
@@ -39,8 +39,10 @@ declare class ReturnLineItems extends ApiResource {
|
|
39
39
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ReturnLineItem>;
|
40
40
|
update(resource: ReturnLineItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ReturnLineItem>;
|
41
41
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
42
|
+
return(returnLineItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Return>;
|
43
|
+
line_item(returnLineItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
42
44
|
isReturnLineItem(resource: any): resource is ReturnLineItem;
|
43
|
-
relationship(id: string | ResourceId): ReturnLineItemRel;
|
45
|
+
relationship(id: string | ResourceId | null): ReturnLineItemRel;
|
44
46
|
type(): string;
|
45
47
|
}
|
46
48
|
export default ReturnLineItems;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ReturnLineItems extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:ReturnLineItems.TYPE},e,r)}async create(e,r,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ReturnLineItems extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:ReturnLineItems.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:ReturnLineItems.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:ReturnLineItems.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:ReturnLineItems.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:ReturnLineItems.TYPE,id:e},r)}async return(e,r,t){return this.resources.fetch({type:"returns"},`return_line_items/${e}/return`,r,t)}async line_item(e,r,t){return this.resources.fetch({type:"line_items"},`return_line_items/${e}/line_item`,r,t)}isReturnLineItem(e){return e.type&&e.type===ReturnLineItems.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:ReturnLineItems.TYPE}:{id:e.id,type:ReturnLineItems.TYPE}}type(){return ReturnLineItems.TYPE}}ReturnLineItems.TYPE="return_line_items",exports.default=ReturnLineItems;
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Order } from './orders';
|
4
4
|
import { Customer } from './customers';
|
5
5
|
import { StockLocation } from './stock_locations';
|
6
6
|
import { Address } from './addresses';
|
7
7
|
import { ReturnLineItem } from './return_line_items';
|
8
8
|
import { Attachment } from './attachments';
|
9
|
-
declare type ReturnRel =
|
9
|
+
declare type ReturnRel = ResourceRel & {
|
10
10
|
type: typeof Returns.TYPE;
|
11
11
|
};
|
12
|
-
declare type OrderRel =
|
12
|
+
declare type OrderRel = ResourceRel & {
|
13
13
|
type: 'orders';
|
14
14
|
};
|
15
|
-
declare type StockLocationRel =
|
15
|
+
declare type StockLocationRel = ResourceRel & {
|
16
16
|
type: 'stock_locations';
|
17
17
|
};
|
18
18
|
interface Return extends Resource {
|
@@ -57,8 +57,15 @@ declare class Returns extends ApiResource {
|
|
57
57
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Return>;
|
58
58
|
update(resource: ReturnUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Return>;
|
59
59
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
60
|
+
order(returnId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
61
|
+
customer(returnId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
62
|
+
stock_location(returnId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
63
|
+
origin_address(returnId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
64
|
+
destination_address(returnId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
65
|
+
return_line_items(returnId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>>;
|
66
|
+
attachments(returnId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
60
67
|
isReturn(resource: any): resource is Return;
|
61
|
-
relationship(id: string | ResourceId): ReturnRel;
|
68
|
+
relationship(id: string | ResourceId | null): ReturnRel;
|
62
69
|
type(): string;
|
63
70
|
}
|
64
71
|
export default Returns;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Returns extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Returns.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:Returns.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:Returns.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:Returns.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:Returns.TYPE,id:e},t)}isReturn(e){return e.type&&e.type===Returns.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Returns.TYPE}:{id:e.id,type:Returns.TYPE}}type(){return Returns.TYPE}}Returns.TYPE="returns",exports.default=Returns;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Returns extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Returns.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:Returns.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:Returns.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:Returns.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:Returns.TYPE,id:e},t)}async order(e,t,r){return this.resources.fetch({type:"orders"},`returns/${e}/order`,t,r)}async customer(e,t,r){return this.resources.fetch({type:"customers"},`returns/${e}/customer`,t,r)}async stock_location(e,t,r){return this.resources.fetch({type:"stock_locations"},`returns/${e}/stock_location`,t,r)}async origin_address(e,t,r){return this.resources.fetch({type:"addresses"},`returns/${e}/origin_address`,t,r)}async destination_address(e,t,r){return this.resources.fetch({type:"addresses"},`returns/${e}/destination_address`,t,r)}async return_line_items(e,t,r){return this.resources.fetch({type:"return_line_items"},`returns/${e}/return_line_items`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`returns/${e}/attachments`,t,r)}isReturn(e){return e.type&&e.type===Returns.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Returns.TYPE}:{id:e.id,type:Returns.TYPE}}type(){return Returns.TYPE}}Returns.TYPE="returns",exports.default=Returns;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Order } from './orders';
|
4
4
|
import { ShippingCategory } from './shipping_categories';
|
5
5
|
import { StockLocation } from './stock_locations';
|
@@ -11,10 +11,10 @@ import { StockTransfer } from './stock_transfers';
|
|
11
11
|
import { CarrierAccount } from './carrier_accounts';
|
12
12
|
import { Parcel } from './parcels';
|
13
13
|
import { Attachment } from './attachments';
|
14
|
-
declare type ShipmentRel =
|
14
|
+
declare type ShipmentRel = ResourceRel & {
|
15
15
|
type: typeof Shipments.TYPE;
|
16
16
|
};
|
17
|
-
declare type ShippingMethodRel =
|
17
|
+
declare type ShippingMethodRel = ResourceRel & {
|
18
18
|
type: 'shipping_methods';
|
19
19
|
};
|
20
20
|
interface Shipment extends Resource {
|
@@ -68,8 +68,21 @@ declare class Shipments extends ApiResource {
|
|
68
68
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Shipment>>;
|
69
69
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
70
70
|
update(resource: ShipmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
71
|
+
order(shipmentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
72
|
+
shipping_category(shipmentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
|
73
|
+
stock_location(shipmentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
74
|
+
origin_address(shipmentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
75
|
+
shipping_address(shipmentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
76
|
+
shipping_method(shipmentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
77
|
+
delivery_lead_time(shipmentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
|
78
|
+
stock_line_items(shipmentId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
|
79
|
+
stock_transfers(shipmentId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
|
80
|
+
available_shipping_methods(shipmentId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>>;
|
81
|
+
carrier_accounts(shipmentId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>>;
|
82
|
+
parcels(shipmentId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Parcel>>;
|
83
|
+
attachments(shipmentId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
71
84
|
isShipment(resource: any): resource is Shipment;
|
72
|
-
relationship(id: string | ResourceId): ShipmentRel;
|
85
|
+
relationship(id: string | ResourceId | null): ShipmentRel;
|
73
86
|
type(): string;
|
74
87
|
}
|
75
88
|
export default Shipments;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Shipments extends resource_1.ApiResource{async list(e,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Shipments extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:Shipments.TYPE},e,s)}async retrieve(e,s,t){return this.resources.retrieve({type:Shipments.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Shipments.TYPE}),s,t)}async order(e,s,t){return this.resources.fetch({type:"orders"},`shipments/${e}/order`,s,t)}async shipping_category(e,s,t){return this.resources.fetch({type:"shipping_categories"},`shipments/${e}/shipping_category`,s,t)}async stock_location(e,s,t){return this.resources.fetch({type:"stock_locations"},`shipments/${e}/stock_location`,s,t)}async origin_address(e,s,t){return this.resources.fetch({type:"addresses"},`shipments/${e}/origin_address`,s,t)}async shipping_address(e,s,t){return this.resources.fetch({type:"addresses"},`shipments/${e}/shipping_address`,s,t)}async shipping_method(e,s,t){return this.resources.fetch({type:"shipping_methods"},`shipments/${e}/shipping_method`,s,t)}async delivery_lead_time(e,s,t){return this.resources.fetch({type:"delivery_lead_times"},`shipments/${e}/delivery_lead_time`,s,t)}async stock_line_items(e,s,t){return this.resources.fetch({type:"stock_line_items"},`shipments/${e}/stock_line_items`,s,t)}async stock_transfers(e,s,t){return this.resources.fetch({type:"stock_transfers"},`shipments/${e}/stock_transfers`,s,t)}async available_shipping_methods(e,s,t){return this.resources.fetch({type:"shipping_methods"},`shipments/${e}/available_shipping_methods`,s,t)}async carrier_accounts(e,s,t){return this.resources.fetch({type:"carrier_accounts"},`shipments/${e}/carrier_accounts`,s,t)}async parcels(e,s,t){return this.resources.fetch({type:"parcels"},`shipments/${e}/parcels`,s,t)}async attachments(e,s,t){return this.resources.fetch({type:"attachments"},`shipments/${e}/attachments`,s,t)}isShipment(e){return e.type&&e.type===Shipments.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Shipments.TYPE}:{id:e.id,type:Shipments.TYPE}}type(){return Shipments.TYPE}}Shipments.TYPE="shipments",exports.default=Shipments;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Sku } from './skus';
|
4
4
|
import { Attachment } from './attachments';
|
5
|
-
declare type ShippingCategoryRel =
|
5
|
+
declare type ShippingCategoryRel = ResourceRel & {
|
6
6
|
type: typeof ShippingCategories.TYPE;
|
7
7
|
};
|
8
8
|
interface ShippingCategory extends Resource {
|
@@ -23,8 +23,10 @@ declare class ShippingCategories extends ApiResource {
|
|
23
23
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
|
24
24
|
update(resource: ShippingCategoryUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
|
25
25
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
26
|
+
skus(shippingCategoryId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
27
|
+
attachments(shippingCategoryId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
26
28
|
isShippingCategory(resource: any): resource is ShippingCategory;
|
27
|
-
relationship(id: string | ResourceId): ShippingCategoryRel;
|
29
|
+
relationship(id: string | ResourceId | null): ShippingCategoryRel;
|
28
30
|
type(): string;
|
29
31
|
}
|
30
32
|
export default ShippingCategories;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingCategories extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ShippingCategories.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingCategories.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:ShippingCategories.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingCategories.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:ShippingCategories.TYPE,id:e},t)}isShippingCategory(e){return e.type&&e.type===ShippingCategories.TYPE}relationship(e){return typeof e=="string"?{id:e,type:ShippingCategories.TYPE}:{id:e.id,type:ShippingCategories.TYPE}}type(){return ShippingCategories.TYPE}}ShippingCategories.TYPE="shipping_categories",exports.default=ShippingCategories;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingCategories extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ShippingCategories.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingCategories.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:ShippingCategories.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingCategories.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:ShippingCategories.TYPE,id:e},t)}async skus(e,t,s){return this.resources.fetch({type:"skus"},`shipping_categories/${e}/skus`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`shipping_categories/${e}/attachments`,t,s)}isShippingCategory(e){return e.type&&e.type===ShippingCategories.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:ShippingCategories.TYPE}:{id:e.id,type:ShippingCategories.TYPE}}type(){return ShippingCategories.TYPE}}ShippingCategories.TYPE="shipping_categories",exports.default=ShippingCategories;
|
@@ -1,26 +1,26 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Market } from './markets';
|
4
4
|
import { ShippingZone } from './shipping_zones';
|
5
5
|
import { ShippingCategory } from './shipping_categories';
|
6
6
|
import { DeliveryLeadTime } from './delivery_lead_times';
|
7
7
|
import { Attachment } from './attachments';
|
8
|
-
declare type ShippingMethodRel =
|
8
|
+
declare type ShippingMethodRel = ResourceRel & {
|
9
9
|
type: typeof ShippingMethods.TYPE;
|
10
10
|
};
|
11
|
-
declare type MarketRel =
|
11
|
+
declare type MarketRel = ResourceRel & {
|
12
12
|
type: 'markets';
|
13
13
|
};
|
14
|
-
declare type ShippingZoneRel =
|
14
|
+
declare type ShippingZoneRel = ResourceRel & {
|
15
15
|
type: 'shipping_zones';
|
16
16
|
};
|
17
|
-
declare type ShippingCategoryRel =
|
17
|
+
declare type ShippingCategoryRel = ResourceRel & {
|
18
18
|
type: 'shipping_categories';
|
19
19
|
};
|
20
20
|
interface ShippingMethod extends Resource {
|
21
21
|
name?: string;
|
22
|
-
disabled_at?: string;
|
23
22
|
currency_code?: string;
|
23
|
+
disabled_at?: string;
|
24
24
|
price_amount_cents?: number;
|
25
25
|
price_amount_float?: number;
|
26
26
|
formatted_price_amount?: string;
|
@@ -38,14 +38,16 @@ interface ShippingMethod extends Resource {
|
|
38
38
|
}
|
39
39
|
interface ShippingMethodCreate extends ResourceCreate {
|
40
40
|
name: string;
|
41
|
+
currency_code?: string;
|
41
42
|
price_amount_cents: number;
|
42
43
|
free_over_amount_cents?: number;
|
43
|
-
market
|
44
|
+
market?: MarketRel;
|
44
45
|
shipping_zone: ShippingZoneRel;
|
45
46
|
shipping_category: ShippingCategoryRel;
|
46
47
|
}
|
47
48
|
interface ShippingMethodUpdate extends ResourceUpdate {
|
48
49
|
name?: string;
|
50
|
+
currency_code?: string;
|
49
51
|
price_amount_cents?: number;
|
50
52
|
free_over_amount_cents?: number;
|
51
53
|
market?: MarketRel;
|
@@ -59,8 +61,13 @@ declare class ShippingMethods extends ApiResource {
|
|
59
61
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
60
62
|
update(resource: ShippingMethodUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
61
63
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
64
|
+
market(shippingMethodId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
65
|
+
shipping_zone(shippingMethodId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
|
66
|
+
shipping_category(shippingMethodId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
|
67
|
+
delivery_lead_time_for_shipment(shippingMethodId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
|
68
|
+
attachments(shippingMethodId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
62
69
|
isShippingMethod(resource: any): resource is ShippingMethod;
|
63
|
-
relationship(id: string | ResourceId): ShippingMethodRel;
|
70
|
+
relationship(id: string | ResourceId | null): ShippingMethodRel;
|
64
71
|
type(): string;
|
65
72
|
}
|
66
73
|
export default ShippingMethods;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingMethods extends resource_1.ApiResource{async list(e,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingMethods extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ShippingMethods.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingMethods.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:ShippingMethods.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingMethods.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:ShippingMethods.TYPE,id:e},t)}async market(e,t,s){return this.resources.fetch({type:"markets"},`shipping_methods/${e}/market`,t,s)}async shipping_zone(e,t,s){return this.resources.fetch({type:"shipping_zones"},`shipping_methods/${e}/shipping_zone`,t,s)}async shipping_category(e,t,s){return this.resources.fetch({type:"shipping_categories"},`shipping_methods/${e}/shipping_category`,t,s)}async delivery_lead_time_for_shipment(e,t,s){return this.resources.fetch({type:"delivery_lead_times"},`shipping_methods/${e}/delivery_lead_time_for_shipment`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`shipping_methods/${e}/attachments`,t,s)}isShippingMethod(e){return e.type&&e.type===ShippingMethods.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:ShippingMethods.TYPE}:{id:e.id,type:ShippingMethods.TYPE}}type(){return ShippingMethods.TYPE}}ShippingMethods.TYPE="shipping_methods",exports.default=ShippingMethods;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Attachment } from './attachments';
|
4
|
-
declare type ShippingZoneRel =
|
4
|
+
declare type ShippingZoneRel = ResourceRel & {
|
5
5
|
type: typeof ShippingZones.TYPE;
|
6
6
|
};
|
7
7
|
interface ShippingZone extends Resource {
|
@@ -39,8 +39,9 @@ declare class ShippingZones extends ApiResource {
|
|
39
39
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
|
40
40
|
update(resource: ShippingZoneUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
|
41
41
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
42
|
+
attachments(shippingZoneId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
42
43
|
isShippingZone(resource: any): resource is ShippingZone;
|
43
|
-
relationship(id: string | ResourceId): ShippingZoneRel;
|
44
|
+
relationship(id: string | ResourceId | null): ShippingZoneRel;
|
44
45
|
type(): string;
|
45
46
|
}
|
46
47
|
export default ShippingZones;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingZones extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ShippingZones.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingZones.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:ShippingZones.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingZones.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:ShippingZones.TYPE,id:e},t)}isShippingZone(e){return e.type&&e.type===ShippingZones.TYPE}relationship(e){return typeof e=="string"?{id:e,type:ShippingZones.TYPE}:{id:e.id,type:ShippingZones.TYPE}}type(){return ShippingZones.TYPE}}ShippingZones.TYPE="shipping_zones",exports.default=ShippingZones;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingZones extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ShippingZones.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingZones.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:ShippingZones.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingZones.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:ShippingZones.TYPE,id:e},t)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`shipping_zones/${e}/attachments`,t,r)}isShippingZone(e){return e.type&&e.type===ShippingZones.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:ShippingZones.TYPE}:{id:e.id,type:ShippingZones.TYPE}}type(){return ShippingZones.TYPE}}ShippingZones.TYPE="shipping_zones",exports.default=ShippingZones;
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { SkuList } from './sku_lists';
|
4
4
|
import { Sku } from './skus';
|
5
|
-
declare type SkuListItemRel =
|
5
|
+
declare type SkuListItemRel = ResourceRel & {
|
6
6
|
type: typeof SkuListItems.TYPE;
|
7
7
|
};
|
8
|
-
declare type SkuListRel =
|
8
|
+
declare type SkuListRel = ResourceRel & {
|
9
9
|
type: 'sku_lists';
|
10
10
|
};
|
11
|
-
declare type SkuRel =
|
11
|
+
declare type SkuRel = ResourceRel & {
|
12
12
|
type: 'skus';
|
13
13
|
};
|
14
14
|
interface SkuListItem extends Resource {
|
@@ -37,8 +37,10 @@ declare class SkuListItems extends ApiResource {
|
|
37
37
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListItem>;
|
38
38
|
update(resource: SkuListItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListItem>;
|
39
39
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
40
|
+
sku_list(skuListItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
41
|
+
sku(skuListItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
40
42
|
isSkuListItem(resource: any): resource is SkuListItem;
|
41
|
-
relationship(id: string | ResourceId): SkuListItemRel;
|
43
|
+
relationship(id: string | ResourceId | null): SkuListItemRel;
|
42
44
|
type(): string;
|
43
45
|
}
|
44
46
|
export default SkuListItems;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuListItems extends resource_1.ApiResource{async list(e,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuListItems extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:SkuListItems.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuListItems.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:SkuListItems.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuListItems.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:SkuListItems.TYPE,id:e},s)}async sku_list(e,s,r){return this.resources.fetch({type:"sku_lists"},`sku_list_items/${e}/sku_list`,s,r)}async sku(e,s,r){return this.resources.fetch({type:"skus"},`sku_list_items/${e}/sku`,s,r)}isSkuListItem(e){return e.type&&e.type===SkuListItems.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuListItems.TYPE}:{id:e.id,type:SkuListItems.TYPE}}type(){return SkuListItems.TYPE}}SkuListItems.TYPE="sku_list_items",exports.default=SkuListItems;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { PercentageDiscountPromotion } from './percentage_discount_promotions';
|
4
4
|
import { FreeShippingPromotion } from './free_shipping_promotions';
|
5
5
|
import { FixedAmountPromotion } from './fixed_amount_promotions';
|
@@ -8,28 +8,28 @@ import { FixedPricePromotion } from './fixed_price_promotions';
|
|
8
8
|
import { ExternalPromotion } from './external_promotions';
|
9
9
|
import { SkuList } from './sku_lists';
|
10
10
|
import { Sku } from './skus';
|
11
|
-
declare type SkuListPromotionRuleRel =
|
11
|
+
declare type SkuListPromotionRuleRel = ResourceRel & {
|
12
12
|
type: typeof SkuListPromotionRules.TYPE;
|
13
13
|
};
|
14
|
-
declare type PercentageDiscountPromotionRel =
|
14
|
+
declare type PercentageDiscountPromotionRel = ResourceRel & {
|
15
15
|
type: 'percentage_discount_promotions';
|
16
16
|
};
|
17
|
-
declare type FreeShippingPromotionRel =
|
17
|
+
declare type FreeShippingPromotionRel = ResourceRel & {
|
18
18
|
type: 'free_shipping_promotions';
|
19
19
|
};
|
20
|
-
declare type FixedAmountPromotionRel =
|
20
|
+
declare type FixedAmountPromotionRel = ResourceRel & {
|
21
21
|
type: 'fixed_amount_promotions';
|
22
22
|
};
|
23
|
-
declare type FreeGiftPromotionRel =
|
23
|
+
declare type FreeGiftPromotionRel = ResourceRel & {
|
24
24
|
type: 'free_gift_promotions';
|
25
25
|
};
|
26
|
-
declare type FixedPricePromotionRel =
|
26
|
+
declare type FixedPricePromotionRel = ResourceRel & {
|
27
27
|
type: 'fixed_price_promotions';
|
28
28
|
};
|
29
|
-
declare type ExternalPromotionRel =
|
29
|
+
declare type ExternalPromotionRel = ResourceRel & {
|
30
30
|
type: 'external_promotions';
|
31
31
|
};
|
32
|
-
declare type SkuListRel =
|
32
|
+
declare type SkuListRel = ResourceRel & {
|
33
33
|
type: 'sku_lists';
|
34
34
|
};
|
35
35
|
interface SkuListPromotionRule extends Resource {
|
@@ -58,8 +58,10 @@ declare class SkuListPromotionRules extends ApiResource {
|
|
58
58
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
59
59
|
update(resource: SkuListPromotionRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
60
60
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
61
|
+
sku_list(skuListPromotionRuleId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
62
|
+
skus(skuListPromotionRuleId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
61
63
|
isSkuListPromotionRule(resource: any): resource is SkuListPromotionRule;
|
62
|
-
relationship(id: string | ResourceId): SkuListPromotionRuleRel;
|
64
|
+
relationship(id: string | ResourceId | null): SkuListPromotionRuleRel;
|
63
65
|
type(): string;
|
64
66
|
}
|
65
67
|
export default SkuListPromotionRules;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuListPromotionRules extends resource_1.ApiResource{async list(e,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuListPromotionRules extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:SkuListPromotionRules.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuListPromotionRules.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:SkuListPromotionRules.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuListPromotionRules.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:SkuListPromotionRules.TYPE,id:e},s)}async sku_list(e,s,t){return this.resources.fetch({type:"sku_lists"},`sku_list_promotion_rules/${e}/sku_list`,s,t)}async skus(e,s,t){return this.resources.fetch({type:"skus"},`sku_list_promotion_rules/${e}/skus`,s,t)}isSkuListPromotionRule(e){return e.type&&e.type===SkuListPromotionRules.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuListPromotionRules.TYPE}:{id:e.id,type:SkuListPromotionRules.TYPE}}type(){return SkuListPromotionRules.TYPE}}SkuListPromotionRules.TYPE="sku_list_promotion_rules",exports.default=SkuListPromotionRules;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Sku } from './skus';
|
4
4
|
import { SkuListItem } from './sku_list_items';
|
5
5
|
import { Bundle } from './bundles';
|
6
|
-
declare type SkuListRel =
|
6
|
+
declare type SkuListRel = ResourceRel & {
|
7
7
|
type: typeof SkuLists.TYPE;
|
8
8
|
};
|
9
9
|
interface SkuList extends Resource {
|
@@ -38,8 +38,11 @@ declare class SkuLists extends ApiResource {
|
|
38
38
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
39
39
|
update(resource: SkuListUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
40
40
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
41
|
+
skus(skuListId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
42
|
+
sku_list_items(skuListId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuListItem>>;
|
43
|
+
bundles(skuListId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Bundle>>;
|
41
44
|
isSkuList(resource: any): resource is SkuList;
|
42
|
-
relationship(id: string | ResourceId): SkuListRel;
|
45
|
+
relationship(id: string | ResourceId | null): SkuListRel;
|
43
46
|
type(): string;
|
44
47
|
}
|
45
48
|
export default SkuLists;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuLists extends resource_1.ApiResource{async list(e,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuLists extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:SkuLists.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuLists.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:SkuLists.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuLists.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:SkuLists.TYPE,id:e},s)}async skus(e,s,t){return this.resources.fetch({type:"skus"},`sku_lists/${e}/skus`,s,t)}async sku_list_items(e,s,t){return this.resources.fetch({type:"sku_list_items"},`sku_lists/${e}/sku_list_items`,s,t)}async bundles(e,s,t){return this.resources.fetch({type:"bundles"},`sku_lists/${e}/bundles`,s,t)}isSkuList(e){return e.type&&e.type===SkuLists.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuLists.TYPE}:{id:e.id,type:SkuLists.TYPE}}type(){return SkuLists.TYPE}}SkuLists.TYPE="sku_lists",exports.default=SkuLists;
|
@@ -1,15 +1,16 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Market } from './markets';
|
4
4
|
import { Attachment } from './attachments';
|
5
|
-
declare type SkuOptionRel =
|
5
|
+
declare type SkuOptionRel = ResourceRel & {
|
6
6
|
type: typeof SkuOptions.TYPE;
|
7
7
|
};
|
8
|
-
declare type MarketRel =
|
8
|
+
declare type MarketRel = ResourceRel & {
|
9
9
|
type: 'markets';
|
10
10
|
};
|
11
11
|
interface SkuOption extends Resource {
|
12
12
|
name?: string;
|
13
|
+
currency_code?: string;
|
13
14
|
description?: string;
|
14
15
|
price_amount_cents?: number;
|
15
16
|
price_amount_float?: number;
|
@@ -22,6 +23,7 @@ interface SkuOption extends Resource {
|
|
22
23
|
}
|
23
24
|
interface SkuOptionCreate extends ResourceCreate {
|
24
25
|
name: string;
|
26
|
+
currency_code?: string;
|
25
27
|
description?: string;
|
26
28
|
price_amount_cents?: number;
|
27
29
|
delay_hours?: number;
|
@@ -30,6 +32,7 @@ interface SkuOptionCreate extends ResourceCreate {
|
|
30
32
|
}
|
31
33
|
interface SkuOptionUpdate extends ResourceUpdate {
|
32
34
|
name?: string;
|
35
|
+
currency_code?: string;
|
33
36
|
description?: string;
|
34
37
|
price_amount_cents?: number;
|
35
38
|
delay_hours?: number;
|
@@ -43,8 +46,10 @@ declare class SkuOptions extends ApiResource {
|
|
43
46
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuOption>;
|
44
47
|
update(resource: SkuOptionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuOption>;
|
45
48
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
49
|
+
market(skuOptionId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
50
|
+
attachments(skuOptionId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
46
51
|
isSkuOption(resource: any): resource is SkuOption;
|
47
|
-
relationship(id: string | ResourceId): SkuOptionRel;
|
52
|
+
relationship(id: string | ResourceId | null): SkuOptionRel;
|
48
53
|
type(): string;
|
49
54
|
}
|
50
55
|
export default SkuOptions;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuOptions extends resource_1.ApiResource{async list(e,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuOptions extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:SkuOptions.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuOptions.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:SkuOptions.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuOptions.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:SkuOptions.TYPE,id:e},t)}async market(e,t,r){return this.resources.fetch({type:"markets"},`sku_options/${e}/market`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`sku_options/${e}/attachments`,t,r)}isSkuOption(e){return e.type&&e.type===SkuOptions.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuOptions.TYPE}:{id:e.id,type:SkuOptions.TYPE}}type(){return SkuOptions.TYPE}}SkuOptions.TYPE="sku_options",exports.default=SkuOptions;
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
2
|
-
import {
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { ShippingCategory } from './shipping_categories';
|
4
4
|
import { Price } from './prices';
|
5
5
|
import { StockItem } from './stock_items';
|
6
6
|
import { DeliveryLeadTime } from './delivery_lead_times';
|
7
7
|
import { SkuOption } from './sku_options';
|
8
8
|
import { Attachment } from './attachments';
|
9
|
-
declare type SkuRel =
|
9
|
+
declare type SkuRel = ResourceRel & {
|
10
10
|
type: typeof Skus.TYPE;
|
11
11
|
};
|
12
|
-
declare type ShippingCategoryRel =
|
12
|
+
declare type ShippingCategoryRel = ResourceRel & {
|
13
13
|
type: 'shipping_categories';
|
14
14
|
};
|
15
15
|
interface Sku extends Resource {
|
@@ -64,8 +64,14 @@ declare class Skus extends ApiResource {
|
|
64
64
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
65
65
|
update(resource: SkuUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
66
66
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
67
|
+
shipping_category(skuId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
|
68
|
+
prices(skuId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Price>>;
|
69
|
+
stock_items(skuId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockItem>>;
|
70
|
+
delivery_lead_times(skuId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<DeliveryLeadTime>>;
|
71
|
+
sku_options(skuId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuOption>>;
|
72
|
+
attachments(skuId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
67
73
|
isSku(resource: any): resource is Sku;
|
68
|
-
relationship(id: string | ResourceId): SkuRel;
|
74
|
+
relationship(id: string | ResourceId | null): SkuRel;
|
69
75
|
type(): string;
|
70
76
|
}
|
71
77
|
export default Skus;
|