@commercelayer/sdk 4.27.1 → 4.28.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 +10 -3
- package/lib/cjs/api.js +25 -4
- package/lib/cjs/commercelayer.d.ts +9 -2
- package/lib/cjs/commercelayer.js +8 -1
- package/lib/cjs/model.d.ts +10 -3
- package/lib/cjs/resource.d.ts +7 -9
- package/lib/cjs/resources/addresses.d.ts +14 -0
- package/lib/cjs/resources/addresses.js +12 -0
- package/lib/cjs/resources/adjustments.d.ts +3 -0
- package/lib/cjs/resources/adjustments.js +4 -0
- package/lib/cjs/resources/adyen_gateways.d.ts +5 -2
- package/lib/cjs/resources/adyen_gateways.js +4 -0
- package/lib/cjs/resources/adyen_payments.d.ts +3 -0
- package/lib/cjs/resources/adyen_payments.js +4 -0
- package/lib/cjs/resources/authorizations.d.ts +9 -3
- package/lib/cjs/resources/authorizations.js +12 -4
- package/lib/cjs/resources/avalara_accounts.d.ts +9 -6
- package/lib/cjs/resources/avalara_accounts.js +4 -0
- package/lib/cjs/resources/axerve_gateways.d.ts +4 -0
- package/lib/cjs/resources/axerve_gateways.js +4 -0
- package/lib/cjs/resources/axerve_payments.d.ts +9 -0
- package/lib/cjs/resources/axerve_payments.js +4 -0
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +3 -0
- package/lib/cjs/resources/billing_info_validation_rules.js +4 -0
- package/lib/cjs/resources/braintree_gateways.d.ts +3 -0
- package/lib/cjs/resources/braintree_gateways.js +4 -0
- package/lib/cjs/resources/braintree_payments.d.ts +3 -0
- package/lib/cjs/resources/braintree_payments.js +4 -0
- package/lib/cjs/resources/bundles.d.ts +16 -2
- package/lib/cjs/resources/bundles.js +12 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +134 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +81 -0
- package/lib/cjs/resources/captures.d.ts +9 -3
- package/lib/cjs/resources/captures.js +12 -4
- package/lib/cjs/resources/carrier_accounts.d.ts +3 -0
- package/lib/cjs/resources/carrier_accounts.js +4 -0
- package/lib/cjs/resources/checkout_com_gateways.d.ts +3 -0
- package/lib/cjs/resources/checkout_com_gateways.js +4 -0
- package/lib/cjs/resources/checkout_com_payments.d.ts +3 -0
- package/lib/cjs/resources/checkout_com_payments.js +4 -0
- package/lib/cjs/resources/cleanups.d.ts +3 -0
- package/lib/cjs/resources/cleanups.js +4 -0
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +10 -3
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +4 -0
- package/lib/cjs/resources/coupon_recipients.d.ts +3 -0
- package/lib/cjs/resources/coupon_recipients.js +4 -0
- package/lib/cjs/resources/coupons.d.ts +26 -1
- package/lib/cjs/resources/coupons.js +16 -0
- package/lib/cjs/resources/custom_promotion_rules.d.ts +61 -0
- package/lib/cjs/resources/custom_promotion_rules.js +37 -0
- package/lib/cjs/resources/customer_addresses.d.ts +5 -0
- package/lib/cjs/resources/customer_addresses.js +4 -0
- package/lib/cjs/resources/customer_groups.d.ts +3 -0
- package/lib/cjs/resources/customer_groups.js +4 -0
- package/lib/cjs/resources/customer_payment_sources.d.ts +18 -11
- package/lib/cjs/resources/customer_payment_sources.js +8 -0
- package/lib/cjs/resources/customer_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/customer_subscriptions.js +4 -0
- package/lib/cjs/resources/customers.d.ts +9 -0
- package/lib/cjs/resources/customers.js +4 -0
- package/lib/cjs/resources/delivery_lead_times.d.ts +3 -0
- package/lib/cjs/resources/delivery_lead_times.js +4 -0
- package/lib/cjs/resources/external_gateways.d.ts +3 -0
- package/lib/cjs/resources/external_gateways.js +4 -0
- package/lib/cjs/resources/external_payments.d.ts +3 -0
- package/lib/cjs/resources/external_payments.js +4 -0
- package/lib/cjs/resources/external_promotions.d.ts +45 -6
- package/lib/cjs/resources/external_promotions.js +24 -0
- package/lib/cjs/resources/external_tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/external_tax_calculators.js +4 -0
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +45 -6
- package/lib/cjs/resources/fixed_amount_promotions.js +24 -0
- package/lib/cjs/resources/fixed_price_promotions.d.ts +37 -9
- package/lib/cjs/resources/fixed_price_promotions.js +18 -2
- package/lib/cjs/resources/free_gift_promotions.d.ts +37 -9
- package/lib/cjs/resources/free_gift_promotions.js +18 -2
- package/lib/cjs/resources/free_shipping_promotions.d.ts +42 -6
- package/lib/cjs/resources/free_shipping_promotions.js +20 -0
- package/lib/cjs/resources/gift_card_recipients.d.ts +3 -0
- package/lib/cjs/resources/gift_card_recipients.js +4 -0
- package/lib/cjs/resources/gift_cards.d.ts +11 -0
- package/lib/cjs/resources/gift_cards.js +8 -0
- package/lib/cjs/resources/imports.d.ts +1 -3
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/in_stock_subscriptions.js +4 -0
- package/lib/cjs/resources/inventory_models.d.ts +12 -0
- package/lib/cjs/resources/inventory_models.js +4 -0
- package/lib/cjs/resources/inventory_return_locations.d.ts +3 -0
- package/lib/cjs/resources/inventory_return_locations.js +4 -0
- package/lib/cjs/resources/inventory_stock_locations.d.ts +3 -0
- package/lib/cjs/resources/inventory_stock_locations.js +4 -0
- package/lib/cjs/resources/klarna_gateways.d.ts +3 -0
- package/lib/cjs/resources/klarna_gateways.js +4 -0
- package/lib/cjs/resources/klarna_payments.d.ts +3 -0
- package/lib/cjs/resources/klarna_payments.js +4 -0
- package/lib/cjs/resources/line_item_options.d.ts +11 -0
- package/lib/cjs/resources/line_item_options.js +8 -0
- package/lib/cjs/resources/line_items.d.ts +30 -0
- package/lib/cjs/resources/line_items.js +16 -0
- package/lib/cjs/resources/manual_gateways.d.ts +3 -0
- package/lib/cjs/resources/manual_gateways.js +4 -0
- package/lib/cjs/resources/manual_tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/manual_tax_calculators.js +4 -0
- package/lib/cjs/resources/markets.d.ts +8 -0
- package/lib/cjs/resources/markets.js +4 -0
- package/lib/cjs/resources/merchants.d.ts +3 -0
- package/lib/cjs/resources/merchants.js +4 -0
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +13 -3
- package/lib/cjs/resources/order_amount_promotion_rules.js +4 -0
- package/lib/cjs/resources/order_subscription_items.d.ts +7 -0
- package/lib/cjs/resources/order_subscription_items.js +4 -0
- package/lib/cjs/resources/order_subscriptions.d.ts +4 -0
- package/lib/cjs/resources/order_subscriptions.js +4 -0
- package/lib/cjs/resources/order_validation_rules.d.ts +3 -0
- package/lib/cjs/resources/order_validation_rules.js +4 -0
- package/lib/cjs/resources/orders.d.ts +50 -6
- package/lib/cjs/resources/orders.js +32 -0
- package/lib/cjs/resources/organization.d.ts +4 -4
- package/lib/cjs/resources/packages.d.ts +3 -0
- package/lib/cjs/resources/packages.js +4 -0
- package/lib/cjs/resources/parcel_line_items.d.ts +4 -1
- package/lib/cjs/resources/parcel_line_items.js +4 -0
- package/lib/cjs/resources/parcels.d.ts +9 -3
- package/lib/cjs/resources/parcels.js +4 -0
- package/lib/cjs/resources/payment_gateways.d.ts +3 -0
- package/lib/cjs/resources/payment_gateways.js +4 -0
- package/lib/cjs/resources/payment_methods.d.ts +9 -1
- package/lib/cjs/resources/payment_methods.js +4 -0
- package/lib/cjs/resources/payment_options.d.ts +43 -0
- package/lib/cjs/resources/payment_options.js +41 -0
- package/lib/cjs/resources/paypal_gateways.d.ts +3 -0
- package/lib/cjs/resources/paypal_gateways.js +4 -0
- package/lib/cjs/resources/paypal_payments.d.ts +3 -0
- package/lib/cjs/resources/paypal_payments.js +4 -0
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +37 -9
- package/lib/cjs/resources/percentage_discount_promotions.js +18 -2
- package/lib/cjs/resources/price_frequency_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_frequency_tiers.js +4 -0
- package/lib/cjs/resources/price_lists.d.ts +6 -0
- package/lib/cjs/resources/price_lists.js +4 -0
- package/lib/cjs/resources/price_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_tiers.js +4 -0
- package/lib/cjs/resources/price_volume_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_volume_tiers.js +4 -0
- package/lib/cjs/resources/prices.d.ts +4 -1
- package/lib/cjs/resources/prices.js +4 -0
- package/lib/cjs/resources/promotion_rules.d.ts +5 -1
- package/lib/cjs/resources/promotion_rules.js +4 -0
- package/lib/cjs/resources/promotions.d.ts +18 -0
- package/lib/cjs/resources/promotions.js +20 -0
- package/lib/cjs/resources/refunds.d.ts +9 -3
- package/lib/cjs/resources/refunds.js +10 -2
- package/lib/cjs/resources/reserved_stocks.d.ts +27 -0
- package/lib/cjs/resources/reserved_stocks.js +36 -0
- package/lib/cjs/resources/return_line_items.d.ts +2 -1
- package/lib/cjs/resources/returns.d.ts +11 -0
- package/lib/cjs/resources/returns.js +8 -0
- package/lib/cjs/resources/satispay_gateways.d.ts +6 -0
- package/lib/cjs/resources/satispay_gateways.js +4 -0
- package/lib/cjs/resources/satispay_payments.d.ts +11 -3
- package/lib/cjs/resources/satispay_payments.js +4 -0
- package/lib/cjs/resources/shipments.d.ts +49 -2
- package/lib/cjs/resources/shipments.js +18 -0
- package/lib/cjs/resources/shipping_categories.d.ts +6 -0
- package/lib/cjs/resources/shipping_categories.js +4 -0
- package/lib/cjs/resources/shipping_method_tiers.d.ts +3 -0
- package/lib/cjs/resources/shipping_method_tiers.js +4 -0
- package/lib/cjs/resources/shipping_methods.d.ts +11 -0
- package/lib/cjs/resources/shipping_methods.js +4 -0
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +3 -0
- package/lib/cjs/resources/shipping_weight_tiers.js +4 -0
- package/lib/cjs/resources/shipping_zones.d.ts +3 -0
- package/lib/cjs/resources/shipping_zones.js +4 -0
- package/lib/cjs/resources/sku_list_items.d.ts +3 -0
- package/lib/cjs/resources/sku_list_items.js +4 -0
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +10 -3
- package/lib/cjs/resources/sku_list_promotion_rules.js +4 -0
- package/lib/cjs/resources/sku_lists.d.ts +3 -0
- package/lib/cjs/resources/sku_lists.js +4 -0
- package/lib/cjs/resources/sku_options.d.ts +14 -0
- package/lib/cjs/resources/sku_options.js +12 -0
- package/lib/cjs/resources/skus.d.ts +17 -0
- package/lib/cjs/resources/skus.js +16 -0
- package/lib/cjs/resources/stock_items.d.ts +9 -0
- package/lib/cjs/resources/stock_items.js +12 -0
- package/lib/cjs/resources/stock_line_items.d.ts +42 -2
- package/lib/cjs/resources/stock_line_items.js +17 -0
- package/lib/cjs/resources/stock_locations.d.ts +6 -0
- package/lib/cjs/resources/stock_locations.js +4 -0
- package/lib/cjs/resources/stock_reservations.d.ts +49 -0
- package/lib/cjs/resources/stock_reservations.js +53 -0
- package/lib/cjs/resources/stock_transfers.d.ts +5 -0
- package/lib/cjs/resources/stock_transfers.js +4 -0
- package/lib/cjs/resources/stripe_gateways.d.ts +3 -0
- package/lib/cjs/resources/stripe_gateways.js +4 -0
- package/lib/cjs/resources/stripe_payments.d.ts +12 -0
- package/lib/cjs/resources/stripe_payments.js +4 -0
- package/lib/cjs/resources/tags.d.ts +27 -0
- package/lib/cjs/resources/tags.js +33 -0
- package/lib/cjs/resources/tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/tax_calculators.js +4 -0
- package/lib/cjs/resources/tax_categories.d.ts +3 -0
- package/lib/cjs/resources/tax_categories.js +4 -0
- package/lib/cjs/resources/tax_rules.d.ts +3 -0
- package/lib/cjs/resources/tax_rules.js +4 -0
- package/lib/cjs/resources/taxjar_accounts.d.ts +3 -0
- package/lib/cjs/resources/taxjar_accounts.js +4 -0
- package/lib/cjs/resources/transactions.d.ts +9 -0
- package/lib/cjs/resources/transactions.js +12 -0
- package/lib/cjs/resources/versions.d.ts +22 -0
- package/lib/cjs/resources/versions.js +24 -0
- package/lib/cjs/resources/voids.d.ts +9 -3
- package/lib/cjs/resources/voids.js +10 -2
- package/lib/cjs/resources/webhooks.d.ts +8 -0
- package/lib/cjs/resources/webhooks.js +4 -0
- package/lib/cjs/resources/wire_transfers.d.ts +3 -0
- package/lib/cjs/resources/wire_transfers.js +4 -0
- package/lib/cjs/util.d.ts +1 -0
- package/lib/esm/api.d.ts +10 -3
- package/lib/esm/api.js +15 -1
- package/lib/esm/commercelayer.d.ts +9 -2
- package/lib/esm/commercelayer.js +8 -1
- package/lib/esm/model.d.ts +10 -3
- package/lib/esm/resource.d.ts +7 -9
- package/lib/esm/resources/addresses.d.ts +14 -0
- package/lib/esm/resources/addresses.js +12 -0
- package/lib/esm/resources/adjustments.d.ts +3 -0
- package/lib/esm/resources/adjustments.js +4 -0
- package/lib/esm/resources/adyen_gateways.d.ts +5 -2
- package/lib/esm/resources/adyen_gateways.js +4 -0
- package/lib/esm/resources/adyen_payments.d.ts +3 -0
- package/lib/esm/resources/adyen_payments.js +4 -0
- package/lib/esm/resources/authorizations.d.ts +9 -3
- package/lib/esm/resources/authorizations.js +12 -4
- package/lib/esm/resources/avalara_accounts.d.ts +9 -6
- package/lib/esm/resources/avalara_accounts.js +4 -0
- package/lib/esm/resources/axerve_gateways.d.ts +4 -0
- package/lib/esm/resources/axerve_gateways.js +4 -0
- package/lib/esm/resources/axerve_payments.d.ts +9 -0
- package/lib/esm/resources/axerve_payments.js +4 -0
- package/lib/esm/resources/billing_info_validation_rules.d.ts +3 -0
- package/lib/esm/resources/billing_info_validation_rules.js +4 -0
- package/lib/esm/resources/braintree_gateways.d.ts +3 -0
- package/lib/esm/resources/braintree_gateways.js +4 -0
- package/lib/esm/resources/braintree_payments.d.ts +3 -0
- package/lib/esm/resources/braintree_payments.js +4 -0
- package/lib/esm/resources/bundles.d.ts +16 -2
- package/lib/esm/resources/bundles.js +12 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +134 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.js +79 -0
- package/lib/esm/resources/captures.d.ts +9 -3
- package/lib/esm/resources/captures.js +12 -4
- package/lib/esm/resources/carrier_accounts.d.ts +3 -0
- package/lib/esm/resources/carrier_accounts.js +4 -0
- package/lib/esm/resources/checkout_com_gateways.d.ts +3 -0
- package/lib/esm/resources/checkout_com_gateways.js +4 -0
- package/lib/esm/resources/checkout_com_payments.d.ts +3 -0
- package/lib/esm/resources/checkout_com_payments.js +4 -0
- package/lib/esm/resources/cleanups.d.ts +3 -0
- package/lib/esm/resources/cleanups.js +4 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +10 -3
- package/lib/esm/resources/coupon_codes_promotion_rules.js +4 -0
- package/lib/esm/resources/coupon_recipients.d.ts +3 -0
- package/lib/esm/resources/coupon_recipients.js +4 -0
- package/lib/esm/resources/coupons.d.ts +26 -1
- package/lib/esm/resources/coupons.js +16 -0
- package/lib/esm/resources/custom_promotion_rules.d.ts +61 -0
- package/lib/esm/resources/custom_promotion_rules.js +35 -0
- package/lib/esm/resources/customer_addresses.d.ts +5 -0
- package/lib/esm/resources/customer_addresses.js +4 -0
- package/lib/esm/resources/customer_groups.d.ts +3 -0
- package/lib/esm/resources/customer_groups.js +4 -0
- package/lib/esm/resources/customer_payment_sources.d.ts +18 -11
- package/lib/esm/resources/customer_payment_sources.js +8 -0
- package/lib/esm/resources/customer_subscriptions.d.ts +3 -0
- package/lib/esm/resources/customer_subscriptions.js +4 -0
- package/lib/esm/resources/customers.d.ts +9 -0
- package/lib/esm/resources/customers.js +4 -0
- package/lib/esm/resources/delivery_lead_times.d.ts +3 -0
- package/lib/esm/resources/delivery_lead_times.js +4 -0
- package/lib/esm/resources/external_gateways.d.ts +3 -0
- package/lib/esm/resources/external_gateways.js +4 -0
- package/lib/esm/resources/external_payments.d.ts +3 -0
- package/lib/esm/resources/external_payments.js +4 -0
- package/lib/esm/resources/external_promotions.d.ts +45 -6
- package/lib/esm/resources/external_promotions.js +24 -0
- package/lib/esm/resources/external_tax_calculators.d.ts +3 -0
- package/lib/esm/resources/external_tax_calculators.js +4 -0
- package/lib/esm/resources/fixed_amount_promotions.d.ts +45 -6
- package/lib/esm/resources/fixed_amount_promotions.js +24 -0
- package/lib/esm/resources/fixed_price_promotions.d.ts +37 -9
- package/lib/esm/resources/fixed_price_promotions.js +18 -2
- package/lib/esm/resources/free_gift_promotions.d.ts +37 -9
- package/lib/esm/resources/free_gift_promotions.js +18 -2
- package/lib/esm/resources/free_shipping_promotions.d.ts +42 -6
- package/lib/esm/resources/free_shipping_promotions.js +20 -0
- package/lib/esm/resources/gift_card_recipients.d.ts +3 -0
- package/lib/esm/resources/gift_card_recipients.js +4 -0
- package/lib/esm/resources/gift_cards.d.ts +11 -0
- package/lib/esm/resources/gift_cards.js +8 -0
- package/lib/esm/resources/imports.d.ts +1 -3
- package/lib/esm/resources/in_stock_subscriptions.d.ts +3 -0
- package/lib/esm/resources/in_stock_subscriptions.js +4 -0
- package/lib/esm/resources/inventory_models.d.ts +12 -0
- package/lib/esm/resources/inventory_models.js +4 -0
- package/lib/esm/resources/inventory_return_locations.d.ts +3 -0
- package/lib/esm/resources/inventory_return_locations.js +4 -0
- package/lib/esm/resources/inventory_stock_locations.d.ts +3 -0
- package/lib/esm/resources/inventory_stock_locations.js +4 -0
- package/lib/esm/resources/klarna_gateways.d.ts +3 -0
- package/lib/esm/resources/klarna_gateways.js +4 -0
- package/lib/esm/resources/klarna_payments.d.ts +3 -0
- package/lib/esm/resources/klarna_payments.js +4 -0
- package/lib/esm/resources/line_item_options.d.ts +11 -0
- package/lib/esm/resources/line_item_options.js +8 -0
- package/lib/esm/resources/line_items.d.ts +30 -0
- package/lib/esm/resources/line_items.js +16 -0
- package/lib/esm/resources/manual_gateways.d.ts +3 -0
- package/lib/esm/resources/manual_gateways.js +4 -0
- package/lib/esm/resources/manual_tax_calculators.d.ts +3 -0
- package/lib/esm/resources/manual_tax_calculators.js +4 -0
- package/lib/esm/resources/markets.d.ts +8 -0
- package/lib/esm/resources/markets.js +4 -0
- package/lib/esm/resources/merchants.d.ts +3 -0
- package/lib/esm/resources/merchants.js +4 -0
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +13 -3
- package/lib/esm/resources/order_amount_promotion_rules.js +4 -0
- package/lib/esm/resources/order_subscription_items.d.ts +7 -0
- package/lib/esm/resources/order_subscription_items.js +4 -0
- package/lib/esm/resources/order_subscriptions.d.ts +4 -0
- package/lib/esm/resources/order_subscriptions.js +4 -0
- package/lib/esm/resources/order_validation_rules.d.ts +3 -0
- package/lib/esm/resources/order_validation_rules.js +4 -0
- package/lib/esm/resources/orders.d.ts +50 -6
- package/lib/esm/resources/orders.js +32 -0
- package/lib/esm/resources/organization.d.ts +4 -4
- package/lib/esm/resources/packages.d.ts +3 -0
- package/lib/esm/resources/packages.js +4 -0
- package/lib/esm/resources/parcel_line_items.d.ts +4 -1
- package/lib/esm/resources/parcel_line_items.js +4 -0
- package/lib/esm/resources/parcels.d.ts +9 -3
- package/lib/esm/resources/parcels.js +4 -0
- package/lib/esm/resources/payment_gateways.d.ts +3 -0
- package/lib/esm/resources/payment_gateways.js +4 -0
- package/lib/esm/resources/payment_methods.d.ts +9 -1
- package/lib/esm/resources/payment_methods.js +4 -0
- package/lib/esm/resources/payment_options.d.ts +43 -0
- package/lib/esm/resources/payment_options.js +39 -0
- package/lib/esm/resources/paypal_gateways.d.ts +3 -0
- package/lib/esm/resources/paypal_gateways.js +4 -0
- package/lib/esm/resources/paypal_payments.d.ts +3 -0
- package/lib/esm/resources/paypal_payments.js +4 -0
- package/lib/esm/resources/percentage_discount_promotions.d.ts +37 -9
- package/lib/esm/resources/percentage_discount_promotions.js +18 -2
- package/lib/esm/resources/price_frequency_tiers.d.ts +3 -0
- package/lib/esm/resources/price_frequency_tiers.js +4 -0
- package/lib/esm/resources/price_lists.d.ts +6 -0
- package/lib/esm/resources/price_lists.js +4 -0
- package/lib/esm/resources/price_tiers.d.ts +3 -0
- package/lib/esm/resources/price_tiers.js +4 -0
- package/lib/esm/resources/price_volume_tiers.d.ts +3 -0
- package/lib/esm/resources/price_volume_tiers.js +4 -0
- package/lib/esm/resources/prices.d.ts +4 -1
- package/lib/esm/resources/prices.js +4 -0
- package/lib/esm/resources/promotion_rules.d.ts +5 -1
- package/lib/esm/resources/promotion_rules.js +4 -0
- package/lib/esm/resources/promotions.d.ts +18 -0
- package/lib/esm/resources/promotions.js +20 -0
- package/lib/esm/resources/refunds.d.ts +9 -3
- package/lib/esm/resources/refunds.js +10 -2
- package/lib/esm/resources/reserved_stocks.d.ts +27 -0
- package/lib/esm/resources/reserved_stocks.js +34 -0
- package/lib/esm/resources/return_line_items.d.ts +2 -1
- package/lib/esm/resources/returns.d.ts +11 -0
- package/lib/esm/resources/returns.js +8 -0
- package/lib/esm/resources/satispay_gateways.d.ts +6 -0
- package/lib/esm/resources/satispay_gateways.js +4 -0
- package/lib/esm/resources/satispay_payments.d.ts +11 -3
- package/lib/esm/resources/satispay_payments.js +4 -0
- package/lib/esm/resources/shipments.d.ts +49 -2
- package/lib/esm/resources/shipments.js +18 -0
- package/lib/esm/resources/shipping_categories.d.ts +6 -0
- package/lib/esm/resources/shipping_categories.js +4 -0
- package/lib/esm/resources/shipping_method_tiers.d.ts +3 -0
- package/lib/esm/resources/shipping_method_tiers.js +4 -0
- package/lib/esm/resources/shipping_methods.d.ts +11 -0
- package/lib/esm/resources/shipping_methods.js +4 -0
- package/lib/esm/resources/shipping_weight_tiers.d.ts +3 -0
- package/lib/esm/resources/shipping_weight_tiers.js +4 -0
- package/lib/esm/resources/shipping_zones.d.ts +3 -0
- package/lib/esm/resources/shipping_zones.js +4 -0
- package/lib/esm/resources/sku_list_items.d.ts +3 -0
- package/lib/esm/resources/sku_list_items.js +4 -0
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +10 -3
- package/lib/esm/resources/sku_list_promotion_rules.js +4 -0
- package/lib/esm/resources/sku_lists.d.ts +3 -0
- package/lib/esm/resources/sku_lists.js +4 -0
- package/lib/esm/resources/sku_options.d.ts +14 -0
- package/lib/esm/resources/sku_options.js +12 -0
- package/lib/esm/resources/skus.d.ts +17 -0
- package/lib/esm/resources/skus.js +16 -0
- package/lib/esm/resources/stock_items.d.ts +9 -0
- package/lib/esm/resources/stock_items.js +12 -0
- package/lib/esm/resources/stock_line_items.d.ts +42 -2
- package/lib/esm/resources/stock_line_items.js +17 -0
- package/lib/esm/resources/stock_locations.d.ts +6 -0
- package/lib/esm/resources/stock_locations.js +4 -0
- package/lib/esm/resources/stock_reservations.d.ts +49 -0
- package/lib/esm/resources/stock_reservations.js +51 -0
- package/lib/esm/resources/stock_transfers.d.ts +5 -0
- package/lib/esm/resources/stock_transfers.js +4 -0
- package/lib/esm/resources/stripe_gateways.d.ts +3 -0
- package/lib/esm/resources/stripe_gateways.js +4 -0
- package/lib/esm/resources/stripe_payments.d.ts +12 -0
- package/lib/esm/resources/stripe_payments.js +4 -0
- package/lib/esm/resources/tags.d.ts +27 -0
- package/lib/esm/resources/tags.js +31 -0
- package/lib/esm/resources/tax_calculators.d.ts +3 -0
- package/lib/esm/resources/tax_calculators.js +4 -0
- package/lib/esm/resources/tax_categories.d.ts +3 -0
- package/lib/esm/resources/tax_categories.js +4 -0
- package/lib/esm/resources/tax_rules.d.ts +3 -0
- package/lib/esm/resources/tax_rules.js +4 -0
- package/lib/esm/resources/taxjar_accounts.d.ts +3 -0
- package/lib/esm/resources/taxjar_accounts.js +4 -0
- package/lib/esm/resources/transactions.d.ts +9 -0
- package/lib/esm/resources/transactions.js +12 -0
- package/lib/esm/resources/versions.d.ts +22 -0
- package/lib/esm/resources/versions.js +22 -0
- package/lib/esm/resources/voids.d.ts +9 -3
- package/lib/esm/resources/voids.js +10 -2
- package/lib/esm/resources/webhooks.d.ts +8 -0
- package/lib/esm/resources/webhooks.js +4 -0
- package/lib/esm/resources/wire_transfers.d.ts +3 -0
- package/lib/esm/resources/wire_transfers.js +4 -0
- package/lib/esm/util.d.ts +1 -0
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -25
- package/lib/cjs/micro.d.ts +0 -4
- package/lib/cjs/micro.js +0 -13
- package/lib/esm/micro.d.ts +0 -4
- package/lib/esm/micro.js +0 -7
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order } from './orders';
|
4
4
|
import type { PaymentGateway } from './payment_gateways';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type PaypalPaymentRel = ResourceRel & {
|
6
7
|
type: typeof PaypalPayments.TYPE;
|
7
8
|
};
|
@@ -24,6 +25,7 @@ interface PaypalPayment extends Resource {
|
|
24
25
|
payment_instrument?: object;
|
25
26
|
order?: Order;
|
26
27
|
payment_gateway?: PaymentGateway;
|
28
|
+
versions?: Version[];
|
27
29
|
}
|
28
30
|
interface PaypalPaymentCreate extends ResourceCreate {
|
29
31
|
return_url: string;
|
@@ -44,6 +46,7 @@ declare class PaypalPayments extends ApiResource {
|
|
44
46
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
45
47
|
order(paypalPaymentId: string | PaypalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
46
48
|
payment_gateway(paypalPaymentId: string | PaypalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
49
|
+
versions(paypalPaymentId: string | PaypalPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
47
50
|
isPaypalPayment(resource: any): resource is PaypalPayment;
|
48
51
|
relationship(id: string | ResourceId | null): PaypalPaymentRel;
|
49
52
|
type(): string;
|
@@ -24,6 +24,10 @@ class PaypalPayments extends ApiResource {
|
|
24
24
|
const _paypalPaymentId = paypalPaymentId.id || paypalPaymentId;
|
25
25
|
return this.resources.fetch({ type: 'payment_gateways' }, `paypal_payments/${_paypalPaymentId}/payment_gateway`, params, options);
|
26
26
|
}
|
27
|
+
async versions(paypalPaymentId, params, options) {
|
28
|
+
const _paypalPaymentId = paypalPaymentId.id || paypalPaymentId;
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `paypal_payments/${_paypalPaymentId}/versions`, params, options);
|
30
|
+
}
|
27
31
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
32
|
isPaypalPayment(resource) {
|
29
33
|
return resource.type && (resource.type === PaypalPayments.TYPE);
|
@@ -5,9 +5,13 @@ import type { PromotionRule } from './promotion_rules';
|
|
5
5
|
import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
6
6
|
import type { SkuListPromotionRule } from './sku_list_promotion_rules';
|
7
7
|
import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
8
|
+
import type { CustomPromotionRule } from './custom_promotion_rules';
|
9
|
+
import type { SkuList } from './sku_lists';
|
10
|
+
import type { Coupon } from './coupons';
|
8
11
|
import type { Attachment } from './attachments';
|
9
12
|
import type { Event } from './events';
|
10
|
-
import type {
|
13
|
+
import type { Tag } from './tags';
|
14
|
+
import type { Version } from './versions';
|
11
15
|
import type { Sku } from './skus';
|
12
16
|
type PercentageDiscountPromotionRel = ResourceRel & {
|
13
17
|
type: typeof PercentageDiscountPromotions.TYPE;
|
@@ -15,9 +19,6 @@ type PercentageDiscountPromotionRel = ResourceRel & {
|
|
15
19
|
type MarketRel = ResourceRel & {
|
16
20
|
type: 'markets';
|
17
21
|
};
|
18
|
-
type PromotionRuleRel = ResourceRel & {
|
19
|
-
type: 'promotion_rules';
|
20
|
-
};
|
21
22
|
type OrderAmountPromotionRuleRel = ResourceRel & {
|
22
23
|
type: 'order_amount_promotion_rules';
|
23
24
|
};
|
@@ -27,55 +28,78 @@ type SkuListPromotionRuleRel = ResourceRel & {
|
|
27
28
|
type CouponCodesPromotionRuleRel = ResourceRel & {
|
28
29
|
type: 'coupon_codes_promotion_rules';
|
29
30
|
};
|
31
|
+
type CustomPromotionRuleRel = ResourceRel & {
|
32
|
+
type: 'custom_promotion_rules';
|
33
|
+
};
|
30
34
|
type SkuListRel = ResourceRel & {
|
31
35
|
type: 'sku_lists';
|
32
36
|
};
|
37
|
+
type TagRel = ResourceRel & {
|
38
|
+
type: 'tags';
|
39
|
+
};
|
33
40
|
interface PercentageDiscountPromotion extends Resource {
|
34
41
|
name?: string;
|
35
42
|
currency_code?: string;
|
43
|
+
exclusive?: boolean;
|
44
|
+
priority?: number;
|
36
45
|
starts_at?: string;
|
37
46
|
expires_at?: string;
|
38
47
|
total_usage_limit?: number;
|
39
48
|
total_usage_count?: number;
|
40
49
|
active?: boolean;
|
50
|
+
disabled_at?: string;
|
41
51
|
percentage?: number;
|
42
52
|
market?: Market;
|
43
53
|
promotion_rules?: PromotionRule[];
|
44
54
|
order_amount_promotion_rule?: OrderAmountPromotionRule;
|
45
55
|
sku_list_promotion_rule?: SkuListPromotionRule;
|
46
56
|
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
57
|
+
custom_promotion_rule?: CustomPromotionRule;
|
58
|
+
sku_list?: SkuList;
|
59
|
+
coupons?: Coupon[];
|
47
60
|
attachments?: Attachment[];
|
48
61
|
events?: Event[];
|
49
|
-
|
62
|
+
tags?: Tag[];
|
63
|
+
versions?: Version[];
|
50
64
|
skus?: Sku[];
|
51
65
|
}
|
52
66
|
interface PercentageDiscountPromotionCreate extends ResourceCreate {
|
53
67
|
name: string;
|
54
68
|
currency_code?: string;
|
69
|
+
exclusive?: boolean;
|
70
|
+
priority?: number;
|
55
71
|
starts_at: string;
|
56
72
|
expires_at: string;
|
57
|
-
total_usage_limit
|
73
|
+
total_usage_limit?: number;
|
74
|
+
_disable?: boolean;
|
75
|
+
_enable?: boolean;
|
58
76
|
percentage: number;
|
59
77
|
market?: MarketRel;
|
60
|
-
promotion_rules?: PromotionRuleRel[];
|
61
78
|
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
62
79
|
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
63
80
|
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
81
|
+
custom_promotion_rule?: CustomPromotionRuleRel;
|
64
82
|
sku_list?: SkuListRel;
|
83
|
+
tags?: TagRel[];
|
65
84
|
}
|
66
85
|
interface PercentageDiscountPromotionUpdate extends ResourceUpdate {
|
67
86
|
name?: string;
|
68
87
|
currency_code?: string;
|
88
|
+
exclusive?: boolean;
|
89
|
+
priority?: number;
|
69
90
|
starts_at?: string;
|
70
91
|
expires_at?: string;
|
71
92
|
total_usage_limit?: number;
|
93
|
+
_disable?: boolean;
|
94
|
+
_enable?: boolean;
|
72
95
|
percentage?: number;
|
73
96
|
market?: MarketRel;
|
74
|
-
promotion_rules?: PromotionRuleRel[];
|
75
97
|
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
76
98
|
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
77
99
|
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
100
|
+
custom_promotion_rule?: CustomPromotionRuleRel;
|
78
101
|
sku_list?: SkuListRel;
|
102
|
+
tags?: TagRel[];
|
79
103
|
}
|
80
104
|
declare class PercentageDiscountPromotions extends ApiResource {
|
81
105
|
static readonly TYPE: 'percentage_discount_promotions';
|
@@ -88,9 +112,13 @@ declare class PercentageDiscountPromotions extends ApiResource {
|
|
88
112
|
order_amount_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
89
113
|
sku_list_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
90
114
|
coupon_codes_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
115
|
+
custom_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
|
116
|
+
sku_list(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
117
|
+
coupons(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
91
118
|
attachments(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
92
119
|
events(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
93
|
-
|
120
|
+
tags(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
121
|
+
versions(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
94
122
|
skus(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
95
123
|
isPercentageDiscountPromotion(resource: any): resource is PercentageDiscountPromotion;
|
96
124
|
relationship(id: string | ResourceId | null): PercentageDiscountPromotionRel;
|
@@ -32,6 +32,18 @@ class PercentageDiscountPromotions extends ApiResource {
|
|
32
32
|
const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
|
33
33
|
return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/coupon_codes_promotion_rule`, params, options);
|
34
34
|
}
|
35
|
+
async custom_promotion_rule(percentageDiscountPromotionId, params, options) {
|
36
|
+
const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
|
37
|
+
return this.resources.fetch({ type: 'custom_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/custom_promotion_rule`, params, options);
|
38
|
+
}
|
39
|
+
async sku_list(percentageDiscountPromotionId, params, options) {
|
40
|
+
const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
|
41
|
+
return this.resources.fetch({ type: 'sku_lists' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/sku_list`, params, options);
|
42
|
+
}
|
43
|
+
async coupons(percentageDiscountPromotionId, params, options) {
|
44
|
+
const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
|
45
|
+
return this.resources.fetch({ type: 'coupons' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/coupons`, params, options);
|
46
|
+
}
|
35
47
|
async attachments(percentageDiscountPromotionId, params, options) {
|
36
48
|
const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
|
37
49
|
return this.resources.fetch({ type: 'attachments' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/attachments`, params, options);
|
@@ -40,9 +52,13 @@ class PercentageDiscountPromotions extends ApiResource {
|
|
40
52
|
const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
|
41
53
|
return this.resources.fetch({ type: 'events' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/events`, params, options);
|
42
54
|
}
|
43
|
-
async
|
55
|
+
async tags(percentageDiscountPromotionId, params, options) {
|
44
56
|
const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
|
45
|
-
return this.resources.fetch({ type: '
|
57
|
+
return this.resources.fetch({ type: 'tags' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/tags`, params, options);
|
58
|
+
}
|
59
|
+
async versions(percentageDiscountPromotionId, params, options) {
|
60
|
+
const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
|
61
|
+
return this.resources.fetch({ type: 'versions' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/versions`, params, options);
|
46
62
|
}
|
47
63
|
async skus(percentageDiscountPromotionId, params, options) {
|
48
64
|
const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Price } from './prices';
|
4
4
|
import type { Attachment } from './attachments';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
import type { Event } from './events';
|
6
7
|
type PriceFrequencyTierRel = ResourceRel & {
|
7
8
|
type: typeof PriceFrequencyTiers.TYPE;
|
@@ -17,6 +18,7 @@ interface PriceFrequencyTier extends Resource {
|
|
17
18
|
formatted_price_amount?: string;
|
18
19
|
price?: Price;
|
19
20
|
attachments?: Attachment[];
|
21
|
+
versions?: Version[];
|
20
22
|
events?: Event[];
|
21
23
|
}
|
22
24
|
interface PriceFrequencyTierCreate extends ResourceCreate {
|
@@ -40,6 +42,7 @@ declare class PriceFrequencyTiers extends ApiResource {
|
|
40
42
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
41
43
|
price(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Price>;
|
42
44
|
attachments(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
45
|
+
versions(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
43
46
|
events(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
44
47
|
isPriceFrequencyTier(resource: any): resource is PriceFrequencyTier;
|
45
48
|
relationship(id: string | ResourceId | null): PriceFrequencyTierRel;
|
@@ -24,6 +24,10 @@ class PriceFrequencyTiers extends ApiResource {
|
|
24
24
|
const _priceFrequencyTierId = priceFrequencyTierId.id || priceFrequencyTierId;
|
25
25
|
return this.resources.fetch({ type: 'attachments' }, `price_frequency_tiers/${_priceFrequencyTierId}/attachments`, params, options);
|
26
26
|
}
|
27
|
+
async versions(priceFrequencyTierId, params, options) {
|
28
|
+
const _priceFrequencyTierId = priceFrequencyTierId.id || priceFrequencyTierId;
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `price_frequency_tiers/${_priceFrequencyTierId}/versions`, params, options);
|
30
|
+
}
|
27
31
|
async events(priceFrequencyTierId, params, options) {
|
28
32
|
const _priceFrequencyTierId = priceFrequencyTierId.id || priceFrequencyTierId;
|
29
33
|
return this.resources.fetch({ type: 'events' }, `price_frequency_tiers/${_priceFrequencyTierId}/events`, params, options);
|
@@ -2,23 +2,28 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Price } from './prices';
|
4
4
|
import type { Attachment } from './attachments';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type PriceListRel = ResourceRel & {
|
6
7
|
type: typeof PriceLists.TYPE;
|
7
8
|
};
|
8
9
|
interface PriceList extends Resource {
|
9
10
|
name?: string;
|
11
|
+
code?: string;
|
10
12
|
currency_code?: string;
|
11
13
|
tax_included?: boolean;
|
12
14
|
prices?: Price[];
|
13
15
|
attachments?: Attachment[];
|
16
|
+
versions?: Version[];
|
14
17
|
}
|
15
18
|
interface PriceListCreate extends ResourceCreate {
|
16
19
|
name: string;
|
20
|
+
code?: string;
|
17
21
|
currency_code: string;
|
18
22
|
tax_included?: boolean;
|
19
23
|
}
|
20
24
|
interface PriceListUpdate extends ResourceUpdate {
|
21
25
|
name?: string;
|
26
|
+
code?: string;
|
22
27
|
currency_code?: string;
|
23
28
|
tax_included?: boolean;
|
24
29
|
}
|
@@ -31,6 +36,7 @@ declare class PriceLists extends ApiResource {
|
|
31
36
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
32
37
|
prices(priceListId: string | PriceList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Price>>;
|
33
38
|
attachments(priceListId: string | PriceList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
39
|
+
versions(priceListId: string | PriceList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
34
40
|
isPriceList(resource: any): resource is PriceList;
|
35
41
|
relationship(id: string | ResourceId | null): PriceListRel;
|
36
42
|
type(): string;
|
@@ -24,6 +24,10 @@ class PriceLists extends ApiResource {
|
|
24
24
|
const _priceListId = priceListId.id || priceListId;
|
25
25
|
return this.resources.fetch({ type: 'attachments' }, `price_lists/${_priceListId}/attachments`, params, options);
|
26
26
|
}
|
27
|
+
async versions(priceListId, params, options) {
|
28
|
+
const _priceListId = priceListId.id || priceListId;
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `price_lists/${_priceListId}/versions`, params, options);
|
30
|
+
}
|
27
31
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
32
|
isPriceList(resource) {
|
29
33
|
return resource.type && (resource.type === PriceLists.TYPE);
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListRe
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Price } from './prices';
|
4
4
|
import type { Attachment } from './attachments';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type PriceTierRel = ResourceRel & {
|
6
7
|
type: typeof PriceTiers.TYPE;
|
7
8
|
};
|
@@ -13,6 +14,7 @@ interface PriceTier extends Resource {
|
|
13
14
|
formatted_price_amount?: string;
|
14
15
|
price?: Price;
|
15
16
|
attachments?: Attachment[];
|
17
|
+
versions?: Version[];
|
16
18
|
}
|
17
19
|
declare class PriceTiers extends ApiResource {
|
18
20
|
static readonly TYPE: 'price_tiers';
|
@@ -20,6 +22,7 @@ declare class PriceTiers extends ApiResource {
|
|
20
22
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceTier>;
|
21
23
|
price(priceTierId: string | PriceTier, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Price>;
|
22
24
|
attachments(priceTierId: string | PriceTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
25
|
+
versions(priceTierId: string | PriceTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
23
26
|
isPriceTier(resource: any): resource is PriceTier;
|
24
27
|
relationship(id: string | ResourceId | null): PriceTierRel;
|
25
28
|
type(): string;
|
@@ -15,6 +15,10 @@ class PriceTiers extends ApiResource {
|
|
15
15
|
const _priceTierId = priceTierId.id || priceTierId;
|
16
16
|
return this.resources.fetch({ type: 'attachments' }, `price_tiers/${_priceTierId}/attachments`, params, options);
|
17
17
|
}
|
18
|
+
async versions(priceTierId, params, options) {
|
19
|
+
const _priceTierId = priceTierId.id || priceTierId;
|
20
|
+
return this.resources.fetch({ type: 'versions' }, `price_tiers/${_priceTierId}/versions`, params, options);
|
21
|
+
}
|
18
22
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
19
23
|
isPriceTier(resource) {
|
20
24
|
return resource.type && (resource.type === PriceTiers.TYPE);
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Price } from './prices';
|
4
4
|
import type { Attachment } from './attachments';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
import type { Event } from './events';
|
6
7
|
type PriceVolumeTierRel = ResourceRel & {
|
7
8
|
type: typeof PriceVolumeTiers.TYPE;
|
@@ -17,6 +18,7 @@ interface PriceVolumeTier extends Resource {
|
|
17
18
|
formatted_price_amount?: string;
|
18
19
|
price?: Price;
|
19
20
|
attachments?: Attachment[];
|
21
|
+
versions?: Version[];
|
20
22
|
events?: Event[];
|
21
23
|
}
|
22
24
|
interface PriceVolumeTierCreate extends ResourceCreate {
|
@@ -40,6 +42,7 @@ declare class PriceVolumeTiers extends ApiResource {
|
|
40
42
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
41
43
|
price(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Price>;
|
42
44
|
attachments(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
45
|
+
versions(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
43
46
|
events(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
44
47
|
isPriceVolumeTier(resource: any): resource is PriceVolumeTier;
|
45
48
|
relationship(id: string | ResourceId | null): PriceVolumeTierRel;
|
@@ -24,6 +24,10 @@ class PriceVolumeTiers extends ApiResource {
|
|
24
24
|
const _priceVolumeTierId = priceVolumeTierId.id || priceVolumeTierId;
|
25
25
|
return this.resources.fetch({ type: 'attachments' }, `price_volume_tiers/${_priceVolumeTierId}/attachments`, params, options);
|
26
26
|
}
|
27
|
+
async versions(priceVolumeTierId, params, options) {
|
28
|
+
const _priceVolumeTierId = priceVolumeTierId.id || priceVolumeTierId;
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `price_volume_tiers/${_priceVolumeTierId}/versions`, params, options);
|
30
|
+
}
|
27
31
|
async events(priceVolumeTierId, params, options) {
|
28
32
|
const _priceVolumeTierId = priceVolumeTierId.id || priceVolumeTierId;
|
29
33
|
return this.resources.fetch({ type: 'events' }, `price_volume_tiers/${_priceVolumeTierId}/events`, params, options);
|
@@ -6,6 +6,7 @@ import type { PriceTier } from './price_tiers';
|
|
6
6
|
import type { PriceVolumeTier } from './price_volume_tiers';
|
7
7
|
import type { PriceFrequencyTier } from './price_frequency_tiers';
|
8
8
|
import type { Attachment } from './attachments';
|
9
|
+
import type { Version } from './versions';
|
9
10
|
type PriceRel = ResourceRel & {
|
10
11
|
type: typeof Prices.TYPE;
|
11
12
|
};
|
@@ -33,11 +34,12 @@ interface Price extends Resource {
|
|
33
34
|
price_volume_tiers?: PriceVolumeTier[];
|
34
35
|
price_frequency_tiers?: PriceFrequencyTier[];
|
35
36
|
attachments?: Attachment[];
|
37
|
+
versions?: Version[];
|
36
38
|
}
|
37
39
|
interface PriceCreate extends ResourceCreate {
|
38
40
|
sku_code?: string;
|
39
41
|
amount_cents: number;
|
40
|
-
compare_at_amount_cents
|
42
|
+
compare_at_amount_cents?: number;
|
41
43
|
price_list: PriceListRel;
|
42
44
|
sku: SkuRel;
|
43
45
|
price_tiers?: PriceTierRel[];
|
@@ -63,6 +65,7 @@ declare class Prices extends ApiResource {
|
|
63
65
|
price_volume_tiers(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PriceVolumeTier>>;
|
64
66
|
price_frequency_tiers(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PriceFrequencyTier>>;
|
65
67
|
attachments(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
68
|
+
versions(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
66
69
|
isPrice(resource: any): resource is Price;
|
67
70
|
relationship(id: string | ResourceId | null): PriceRel;
|
68
71
|
type(): string;
|
@@ -40,6 +40,10 @@ class Prices extends ApiResource {
|
|
40
40
|
const _priceId = priceId.id || priceId;
|
41
41
|
return this.resources.fetch({ type: 'attachments' }, `prices/${_priceId}/attachments`, params, options);
|
42
42
|
}
|
43
|
+
async versions(priceId, params, options) {
|
44
|
+
const _priceId = priceId.id || priceId;
|
45
|
+
return this.resources.fetch({ type: 'versions' }, `prices/${_priceId}/versions`, params, options);
|
46
|
+
}
|
43
47
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
44
48
|
isPrice(resource) {
|
45
49
|
return resource.type && (resource.type === Prices.TYPE);
|
@@ -2,20 +2,24 @@ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListRe
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { PercentageDiscountPromotion } from './percentage_discount_promotions';
|
4
4
|
import type { FreeShippingPromotion } from './free_shipping_promotions';
|
5
|
+
import type { BuyXPayYPromotion } from './buy_x_pay_y_promotions';
|
5
6
|
import type { FreeGiftPromotion } from './free_gift_promotions';
|
6
7
|
import type { FixedPricePromotion } from './fixed_price_promotions';
|
7
8
|
import type { ExternalPromotion } from './external_promotions';
|
8
9
|
import type { FixedAmountPromotion } from './fixed_amount_promotions';
|
10
|
+
import type { Version } from './versions';
|
9
11
|
type PromotionRuleRel = ResourceRel & {
|
10
12
|
type: typeof PromotionRules.TYPE;
|
11
13
|
};
|
12
14
|
interface PromotionRule extends Resource {
|
13
|
-
promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion;
|
15
|
+
promotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion;
|
16
|
+
versions?: Version[];
|
14
17
|
}
|
15
18
|
declare class PromotionRules extends ApiResource {
|
16
19
|
static readonly TYPE: 'promotion_rules';
|
17
20
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PromotionRule>>;
|
18
21
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PromotionRule>;
|
22
|
+
versions(promotionRuleId: string | PromotionRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
19
23
|
isPromotionRule(resource: any): resource is PromotionRule;
|
20
24
|
relationship(id: string | ResourceId | null): PromotionRuleRel;
|
21
25
|
type(): string;
|
@@ -7,6 +7,10 @@ class PromotionRules extends ApiResource {
|
|
7
7
|
async retrieve(id, params, options) {
|
8
8
|
return this.resources.retrieve({ type: PromotionRules.TYPE, id }, params, options);
|
9
9
|
}
|
10
|
+
async versions(promotionRuleId, params, options) {
|
11
|
+
const _promotionRuleId = promotionRuleId.id || promotionRuleId;
|
12
|
+
return this.resources.fetch({ type: 'versions' }, `promotion_rules/${_promotionRuleId}/versions`, params, options);
|
13
|
+
}
|
10
14
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
11
15
|
isPromotionRule(resource) {
|
12
16
|
return resource.type && (resource.type === PromotionRules.TYPE);
|
@@ -5,26 +5,39 @@ import type { PromotionRule } from './promotion_rules';
|
|
5
5
|
import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
6
6
|
import type { SkuListPromotionRule } from './sku_list_promotion_rules';
|
7
7
|
import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
8
|
+
import type { CustomPromotionRule } from './custom_promotion_rules';
|
9
|
+
import type { SkuList } from './sku_lists';
|
10
|
+
import type { Coupon } from './coupons';
|
8
11
|
import type { Attachment } from './attachments';
|
9
12
|
import type { Event } from './events';
|
13
|
+
import type { Tag } from './tags';
|
14
|
+
import type { Version } from './versions';
|
10
15
|
type PromotionRel = ResourceRel & {
|
11
16
|
type: typeof Promotions.TYPE;
|
12
17
|
};
|
13
18
|
interface Promotion extends Resource {
|
14
19
|
name?: string;
|
15
20
|
currency_code?: string;
|
21
|
+
exclusive?: boolean;
|
22
|
+
priority?: number;
|
16
23
|
starts_at?: string;
|
17
24
|
expires_at?: string;
|
18
25
|
total_usage_limit?: number;
|
19
26
|
total_usage_count?: number;
|
20
27
|
active?: boolean;
|
28
|
+
disabled_at?: string;
|
21
29
|
market?: Market;
|
22
30
|
promotion_rules?: PromotionRule[];
|
23
31
|
order_amount_promotion_rule?: OrderAmountPromotionRule;
|
24
32
|
sku_list_promotion_rule?: SkuListPromotionRule;
|
25
33
|
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
34
|
+
custom_promotion_rule?: CustomPromotionRule;
|
35
|
+
sku_list?: SkuList;
|
36
|
+
coupons?: Coupon[];
|
26
37
|
attachments?: Attachment[];
|
27
38
|
events?: Event[];
|
39
|
+
tags?: Tag[];
|
40
|
+
versions?: Version[];
|
28
41
|
}
|
29
42
|
declare class Promotions extends ApiResource {
|
30
43
|
static readonly TYPE: 'promotions';
|
@@ -34,8 +47,13 @@ declare class Promotions extends ApiResource {
|
|
34
47
|
order_amount_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
35
48
|
sku_list_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
36
49
|
coupon_codes_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
50
|
+
custom_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
|
51
|
+
sku_list(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
52
|
+
coupons(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
37
53
|
attachments(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
38
54
|
events(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
55
|
+
tags(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
56
|
+
versions(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
39
57
|
isPromotion(resource: any): resource is Promotion;
|
40
58
|
relationship(id: string | ResourceId | null): PromotionRel;
|
41
59
|
type(): string;
|
@@ -23,6 +23,18 @@ class Promotions extends ApiResource {
|
|
23
23
|
const _promotionId = promotionId.id || promotionId;
|
24
24
|
return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `promotions/${_promotionId}/coupon_codes_promotion_rule`, params, options);
|
25
25
|
}
|
26
|
+
async custom_promotion_rule(promotionId, params, options) {
|
27
|
+
const _promotionId = promotionId.id || promotionId;
|
28
|
+
return this.resources.fetch({ type: 'custom_promotion_rules' }, `promotions/${_promotionId}/custom_promotion_rule`, params, options);
|
29
|
+
}
|
30
|
+
async sku_list(promotionId, params, options) {
|
31
|
+
const _promotionId = promotionId.id || promotionId;
|
32
|
+
return this.resources.fetch({ type: 'sku_lists' }, `promotions/${_promotionId}/sku_list`, params, options);
|
33
|
+
}
|
34
|
+
async coupons(promotionId, params, options) {
|
35
|
+
const _promotionId = promotionId.id || promotionId;
|
36
|
+
return this.resources.fetch({ type: 'coupons' }, `promotions/${_promotionId}/coupons`, params, options);
|
37
|
+
}
|
26
38
|
async attachments(promotionId, params, options) {
|
27
39
|
const _promotionId = promotionId.id || promotionId;
|
28
40
|
return this.resources.fetch({ type: 'attachments' }, `promotions/${_promotionId}/attachments`, params, options);
|
@@ -31,6 +43,14 @@ class Promotions extends ApiResource {
|
|
31
43
|
const _promotionId = promotionId.id || promotionId;
|
32
44
|
return this.resources.fetch({ type: 'events' }, `promotions/${_promotionId}/events`, params, options);
|
33
45
|
}
|
46
|
+
async tags(promotionId, params, options) {
|
47
|
+
const _promotionId = promotionId.id || promotionId;
|
48
|
+
return this.resources.fetch({ type: 'tags' }, `promotions/${_promotionId}/tags`, params, options);
|
49
|
+
}
|
50
|
+
async versions(promotionId, params, options) {
|
51
|
+
const _promotionId = promotionId.id || promotionId;
|
52
|
+
return this.resources.fetch({ type: 'versions' }, `promotions/${_promotionId}/versions`, params, options);
|
53
|
+
}
|
34
54
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
35
55
|
isPromotion(resource) {
|
36
56
|
return resource.type && (resource.type === Promotions.TYPE);
|
@@ -1,8 +1,10 @@
|
|
1
1
|
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order } from './orders';
|
4
|
-
import type {
|
4
|
+
import type { Attachment } from './attachments';
|
5
5
|
import type { Event } from './events';
|
6
|
+
import type { Version } from './versions';
|
7
|
+
import type { Capture } from './captures';
|
6
8
|
type RefundRel = ResourceRel & {
|
7
9
|
type: typeof Refunds.TYPE;
|
8
10
|
};
|
@@ -19,16 +21,20 @@ interface Refund extends Resource {
|
|
19
21
|
token?: string;
|
20
22
|
gateway_transaction_id?: string;
|
21
23
|
order?: Order;
|
22
|
-
|
24
|
+
attachments?: Attachment[];
|
23
25
|
events?: Event[];
|
26
|
+
versions?: Version[];
|
27
|
+
reference_capture?: Capture;
|
24
28
|
}
|
25
29
|
declare class Refunds extends ApiResource {
|
26
30
|
static readonly TYPE: 'refunds';
|
27
31
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Refund>>;
|
28
32
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Refund>;
|
29
33
|
order(refundId: string | Refund, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
30
|
-
|
34
|
+
attachments(refundId: string | Refund, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
31
35
|
events(refundId: string | Refund, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
36
|
+
versions(refundId: string | Refund, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
37
|
+
reference_capture(refundId: string | Refund, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Capture>;
|
32
38
|
isRefund(resource: any): resource is Refund;
|
33
39
|
relationship(id: string | ResourceId | null): RefundRel;
|
34
40
|
type(): string;
|
@@ -11,14 +11,22 @@ class Refunds extends ApiResource {
|
|
11
11
|
const _refundId = refundId.id || refundId;
|
12
12
|
return this.resources.fetch({ type: 'orders' }, `refunds/${_refundId}/order`, params, options);
|
13
13
|
}
|
14
|
-
async
|
14
|
+
async attachments(refundId, params, options) {
|
15
15
|
const _refundId = refundId.id || refundId;
|
16
|
-
return this.resources.fetch({ type: '
|
16
|
+
return this.resources.fetch({ type: 'attachments' }, `refunds/${_refundId}/attachments`, params, options);
|
17
17
|
}
|
18
18
|
async events(refundId, params, options) {
|
19
19
|
const _refundId = refundId.id || refundId;
|
20
20
|
return this.resources.fetch({ type: 'events' }, `refunds/${_refundId}/events`, params, options);
|
21
21
|
}
|
22
|
+
async versions(refundId, params, options) {
|
23
|
+
const _refundId = refundId.id || refundId;
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `refunds/${_refundId}/versions`, params, options);
|
25
|
+
}
|
26
|
+
async reference_capture(refundId, params, options) {
|
27
|
+
const _refundId = refundId.id || refundId;
|
28
|
+
return this.resources.fetch({ type: 'captures' }, `refunds/${_refundId}/reference_capture`, params, options);
|
29
|
+
}
|
22
30
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
23
31
|
isRefund(resource) {
|
24
32
|
return resource.type && (resource.type === Refunds.TYPE);
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { StockItem } from './stock_items';
|
4
|
+
import type { Sku } from './skus';
|
5
|
+
import type { StockReservation } from './stock_reservations';
|
6
|
+
type ReservedStockRel = ResourceRel & {
|
7
|
+
type: typeof ReservedStocks.TYPE;
|
8
|
+
};
|
9
|
+
interface ReservedStock extends Resource {
|
10
|
+
quantity?: number;
|
11
|
+
stock_item?: StockItem;
|
12
|
+
sku?: Sku;
|
13
|
+
stock_reservations?: StockReservation[];
|
14
|
+
}
|
15
|
+
declare class ReservedStocks extends ApiResource {
|
16
|
+
static readonly TYPE: 'reserved_stocks';
|
17
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ReservedStock>>;
|
18
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ReservedStock>;
|
19
|
+
stock_item(reservedStockId: string | ReservedStock, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
|
20
|
+
sku(reservedStockId: string | ReservedStock, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
21
|
+
stock_reservations(reservedStockId: string | ReservedStock, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockReservation>>;
|
22
|
+
isReservedStock(resource: any): resource is ReservedStock;
|
23
|
+
relationship(id: string | ResourceId | null): ReservedStockRel;
|
24
|
+
type(): string;
|
25
|
+
}
|
26
|
+
export default ReservedStocks;
|
27
|
+
export { ReservedStock };
|