@commercelayer/sdk 5.12.5 → 5.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +11 -2
- package/lib/cjs/api.js +4 -1
- package/lib/cjs/commercelayer.d.ts +4 -3
- package/lib/cjs/commercelayer.js +6 -1
- package/lib/cjs/config.js +3 -1
- package/lib/cjs/model.d.ts +1 -0
- package/lib/cjs/resource.d.ts +1 -1
- package/lib/cjs/resource.js +6 -0
- package/lib/cjs/resources/addresses.d.ts +3 -0
- package/lib/cjs/resources/addresses.js +4 -0
- package/lib/cjs/resources/adjustments.d.ts +5 -2
- package/lib/cjs/resources/adjustments.js +4 -0
- package/lib/cjs/resources/adyen_gateways.d.ts +3 -0
- package/lib/cjs/resources/adyen_gateways.js +4 -0
- package/lib/cjs/resources/adyen_payments.d.ts +5 -2
- package/lib/cjs/resources/adyen_payments.js +4 -0
- package/lib/cjs/resources/authorizations.d.ts +3 -0
- package/lib/cjs/resources/authorizations.js +4 -0
- package/lib/cjs/resources/avalara_accounts.d.ts +3 -0
- 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 +5 -2
- 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 +5 -2
- package/lib/cjs/resources/braintree_payments.js +4 -0
- package/lib/cjs/resources/bundles.d.ts +3 -0
- package/lib/cjs/resources/bundles.js +4 -0
- package/lib/cjs/resources/captures.d.ts +3 -0
- package/lib/cjs/resources/captures.js +4 -0
- 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 +5 -2
- 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 +3 -0
- 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 +3 -0
- package/lib/cjs/resources/coupons.js +4 -0
- package/lib/cjs/resources/customer_addresses.d.ts +3 -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 +8 -13
- package/lib/cjs/resources/customer_payment_sources.js +4 -0
- package/lib/cjs/resources/customer_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/customer_subscriptions.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 +5 -2
- package/lib/cjs/resources/external_payments.js +4 -0
- package/lib/cjs/resources/external_promotions.d.ts +3 -0
- package/lib/cjs/resources/external_promotions.js +4 -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 +3 -0
- package/lib/cjs/resources/fixed_amount_promotions.js +4 -0
- package/lib/cjs/resources/fixed_price_promotions.d.ts +3 -0
- package/lib/cjs/resources/fixed_price_promotions.js +4 -0
- package/lib/cjs/resources/free_gift_promotions.d.ts +3 -0
- package/lib/cjs/resources/free_gift_promotions.js +4 -0
- package/lib/cjs/resources/free_shipping_promotions.d.ts +3 -0
- package/lib/cjs/resources/free_shipping_promotions.js +4 -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 +3 -0
- package/lib/cjs/resources/gift_cards.js +4 -0
- 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 +3 -0
- package/lib/cjs/resources/inventory_models.js +4 -0
- package/lib/cjs/resources/inventory_return_locations.d.ts +5 -2
- package/lib/cjs/resources/inventory_return_locations.js +4 -0
- package/lib/cjs/resources/inventory_stock_locations.d.ts +5 -2
- 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 +5 -2
- package/lib/cjs/resources/klarna_payments.js +4 -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 +3 -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 +5 -2
- package/lib/cjs/resources/order_amount_promotion_rules.js +4 -0
- package/lib/cjs/resources/order_subscription_items.d.ts +3 -0
- package/lib/cjs/resources/order_subscription_items.js +4 -0
- package/lib/cjs/resources/order_subscriptions.d.ts +3 -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 +8 -2
- package/lib/cjs/resources/orders.js +4 -0
- 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 +5 -2
- package/lib/cjs/resources/parcel_line_items.js +4 -0
- package/lib/cjs/resources/parcels.d.ts +3 -0
- 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 +3 -0
- package/lib/cjs/resources/payment_methods.js +4 -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 +5 -2
- package/lib/cjs/resources/paypal_payments.js +4 -0
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +3 -0
- package/lib/cjs/resources/percentage_discount_promotions.js +4 -0
- 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 +3 -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 +3 -0
- 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 +3 -0
- package/lib/cjs/resources/promotions.js +4 -0
- package/lib/cjs/resources/refunds.d.ts +3 -0
- package/lib/cjs/resources/refunds.js +4 -0
- package/lib/cjs/resources/returns.d.ts +3 -0
- package/lib/cjs/resources/returns.js +4 -0
- package/lib/cjs/resources/satispay_gateways.d.ts +3 -0
- package/lib/cjs/resources/satispay_gateways.js +4 -0
- package/lib/cjs/resources/satispay_payments.d.ts +6 -2
- package/lib/cjs/resources/satispay_payments.js +4 -0
- package/lib/cjs/resources/shipments.d.ts +3 -0
- package/lib/cjs/resources/shipments.js +4 -0
- package/lib/cjs/resources/shipping_categories.d.ts +3 -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 +3 -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 +5 -2
- package/lib/cjs/resources/sku_list_items.js +4 -0
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +3 -0
- 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 +3 -0
- package/lib/cjs/resources/sku_options.js +4 -0
- package/lib/cjs/resources/skus.d.ts +3 -0
- package/lib/cjs/resources/skus.js +4 -0
- package/lib/cjs/resources/stock_items.d.ts +3 -0
- package/lib/cjs/resources/stock_items.js +4 -0
- package/lib/cjs/resources/stock_line_items.d.ts +5 -2
- package/lib/cjs/resources/stock_line_items.js +4 -0
- package/lib/cjs/resources/stock_locations.d.ts +3 -0
- package/lib/cjs/resources/stock_locations.js +4 -0
- package/lib/cjs/resources/stock_transfers.d.ts +3 -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 +8 -2
- package/lib/cjs/resources/stripe_payments.js +4 -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 +5 -2
- 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 +3 -0
- package/lib/cjs/resources/transactions.js +4 -0
- package/lib/cjs/resources/versions.d.ts +22 -0
- package/lib/cjs/resources/versions.js +16 -0
- package/lib/cjs/resources/voids.d.ts +3 -0
- package/lib/cjs/resources/voids.js +4 -0
- package/lib/cjs/resources/webhooks.d.ts +3 -0
- package/lib/cjs/resources/webhooks.js +4 -0
- package/lib/cjs/resources/wire_transfers.d.ts +5 -2
- package/lib/cjs/resources/wire_transfers.js +4 -0
- package/lib/cjs/util.d.ts +1 -1
- package/lib/esm/api.d.ts +11 -2
- package/lib/esm/api.js +2 -0
- package/lib/esm/commercelayer.d.ts +4 -3
- package/lib/esm/commercelayer.js +6 -1
- package/lib/esm/config.js +3 -1
- package/lib/esm/model.d.ts +1 -0
- package/lib/esm/resource.d.ts +1 -1
- package/lib/esm/resource.js +6 -0
- package/lib/esm/resources/addresses.d.ts +3 -0
- package/lib/esm/resources/addresses.js +4 -0
- package/lib/esm/resources/adjustments.d.ts +5 -2
- package/lib/esm/resources/adjustments.js +4 -0
- package/lib/esm/resources/adyen_gateways.d.ts +3 -0
- package/lib/esm/resources/adyen_gateways.js +4 -0
- package/lib/esm/resources/adyen_payments.d.ts +5 -2
- package/lib/esm/resources/adyen_payments.js +4 -0
- package/lib/esm/resources/authorizations.d.ts +3 -0
- package/lib/esm/resources/authorizations.js +4 -0
- package/lib/esm/resources/avalara_accounts.d.ts +3 -0
- 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 +5 -2
- 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 +5 -2
- package/lib/esm/resources/braintree_payments.js +4 -0
- package/lib/esm/resources/bundles.d.ts +3 -0
- package/lib/esm/resources/bundles.js +4 -0
- package/lib/esm/resources/captures.d.ts +3 -0
- package/lib/esm/resources/captures.js +4 -0
- 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 +5 -2
- 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 +3 -0
- 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 +3 -0
- package/lib/esm/resources/coupons.js +4 -0
- package/lib/esm/resources/customer_addresses.d.ts +3 -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 +8 -13
- package/lib/esm/resources/customer_payment_sources.js +4 -0
- package/lib/esm/resources/customer_subscriptions.d.ts +3 -0
- package/lib/esm/resources/customer_subscriptions.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 +5 -2
- package/lib/esm/resources/external_payments.js +4 -0
- package/lib/esm/resources/external_promotions.d.ts +3 -0
- package/lib/esm/resources/external_promotions.js +4 -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 +3 -0
- package/lib/esm/resources/fixed_amount_promotions.js +4 -0
- package/lib/esm/resources/fixed_price_promotions.d.ts +3 -0
- package/lib/esm/resources/fixed_price_promotions.js +4 -0
- package/lib/esm/resources/free_gift_promotions.d.ts +3 -0
- package/lib/esm/resources/free_gift_promotions.js +4 -0
- package/lib/esm/resources/free_shipping_promotions.d.ts +3 -0
- package/lib/esm/resources/free_shipping_promotions.js +4 -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 +3 -0
- package/lib/esm/resources/gift_cards.js +4 -0
- 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 +3 -0
- package/lib/esm/resources/inventory_models.js +4 -0
- package/lib/esm/resources/inventory_return_locations.d.ts +5 -2
- package/lib/esm/resources/inventory_return_locations.js +4 -0
- package/lib/esm/resources/inventory_stock_locations.d.ts +5 -2
- 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 +5 -2
- package/lib/esm/resources/klarna_payments.js +4 -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 +3 -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 +5 -2
- package/lib/esm/resources/order_amount_promotion_rules.js +4 -0
- package/lib/esm/resources/order_subscription_items.d.ts +3 -0
- package/lib/esm/resources/order_subscription_items.js +4 -0
- package/lib/esm/resources/order_subscriptions.d.ts +3 -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 +8 -2
- package/lib/esm/resources/orders.js +4 -0
- 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 +5 -2
- package/lib/esm/resources/parcel_line_items.js +4 -0
- package/lib/esm/resources/parcels.d.ts +3 -0
- 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 +3 -0
- package/lib/esm/resources/payment_methods.js +4 -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 +5 -2
- package/lib/esm/resources/paypal_payments.js +4 -0
- package/lib/esm/resources/percentage_discount_promotions.d.ts +3 -0
- package/lib/esm/resources/percentage_discount_promotions.js +4 -0
- 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 +3 -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 +3 -0
- 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 +3 -0
- package/lib/esm/resources/promotions.js +4 -0
- package/lib/esm/resources/refunds.d.ts +3 -0
- package/lib/esm/resources/refunds.js +4 -0
- package/lib/esm/resources/returns.d.ts +3 -0
- package/lib/esm/resources/returns.js +4 -0
- package/lib/esm/resources/satispay_gateways.d.ts +3 -0
- package/lib/esm/resources/satispay_gateways.js +4 -0
- package/lib/esm/resources/satispay_payments.d.ts +6 -2
- package/lib/esm/resources/satispay_payments.js +4 -0
- package/lib/esm/resources/shipments.d.ts +3 -0
- package/lib/esm/resources/shipments.js +4 -0
- package/lib/esm/resources/shipping_categories.d.ts +3 -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 +3 -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 +5 -2
- package/lib/esm/resources/sku_list_items.js +4 -0
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +3 -0
- 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 +3 -0
- package/lib/esm/resources/sku_options.js +4 -0
- package/lib/esm/resources/skus.d.ts +3 -0
- package/lib/esm/resources/skus.js +4 -0
- package/lib/esm/resources/stock_items.d.ts +3 -0
- package/lib/esm/resources/stock_items.js +4 -0
- package/lib/esm/resources/stock_line_items.d.ts +5 -2
- package/lib/esm/resources/stock_line_items.js +4 -0
- package/lib/esm/resources/stock_locations.d.ts +3 -0
- package/lib/esm/resources/stock_locations.js +4 -0
- package/lib/esm/resources/stock_transfers.d.ts +3 -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 +8 -2
- package/lib/esm/resources/stripe_payments.js +4 -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 +5 -2
- 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 +3 -0
- package/lib/esm/resources/transactions.js +4 -0
- package/lib/esm/resources/versions.d.ts +22 -0
- package/lib/esm/resources/versions.js +14 -0
- package/lib/esm/resources/voids.d.ts +3 -0
- package/lib/esm/resources/voids.js +4 -0
- package/lib/esm/resources/webhooks.d.ts +3 -0
- package/lib/esm/resources/webhooks.js +4 -0
- package/lib/esm/resources/wire_transfers.d.ts +5 -2
- package/lib/esm/resources/wire_transfers.js +4 -0
- package/lib/esm/util.d.ts +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
@@ -1,8 +1,9 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve } from '../query';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Order, OrderType } from './orders';
|
5
5
|
import type { PaymentGateway } from './payment_gateways';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type BraintreePaymentType = 'braintree_payments';
|
7
8
|
type BraintreePaymentRel = ResourceRel & {
|
8
9
|
type: BraintreePaymentType;
|
@@ -20,6 +21,7 @@ interface BraintreePayment extends Resource {
|
|
20
21
|
payment_instrument?: Record<string, any> | null;
|
21
22
|
order?: Order | null;
|
22
23
|
payment_gateway?: PaymentGateway | null;
|
24
|
+
versions?: Version[] | null;
|
23
25
|
}
|
24
26
|
interface BraintreePaymentCreate extends ResourceCreate {
|
25
27
|
payment_id?: string | null;
|
@@ -41,6 +43,7 @@ declare class BraintreePayments extends ApiResource<BraintreePayment> {
|
|
41
43
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
42
44
|
order(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
43
45
|
payment_gateway(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
46
|
+
versions(braintreePaymentId: string | BraintreePayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
44
47
|
isBraintreePayment(resource: any): resource is BraintreePayment;
|
45
48
|
relationship(id: string | ResourceId | null): BraintreePaymentRel;
|
46
49
|
type(): BraintreePaymentType;
|
@@ -19,6 +19,10 @@ class BraintreePayments extends resource_1.ApiResource {
|
|
19
19
|
const _braintreePaymentId = braintreePaymentId.id || braintreePaymentId;
|
20
20
|
return this.resources.fetch({ type: 'payment_gateways' }, `braintree_payments/${_braintreePaymentId}/payment_gateway`, params, options);
|
21
21
|
}
|
22
|
+
async versions(braintreePaymentId, params, options) {
|
23
|
+
const _braintreePaymentId = braintreePaymentId.id || braintreePaymentId;
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `braintree_payments/${_braintreePaymentId}/versions`, params, options);
|
25
|
+
}
|
22
26
|
isBraintreePayment(resource) {
|
23
27
|
return resource.type && (resource.type === BraintreePayments.TYPE);
|
24
28
|
}
|
@@ -7,6 +7,7 @@ import type { Sku } from './skus';
|
|
7
7
|
import type { Attachment } from './attachments';
|
8
8
|
import type { Event } from './events';
|
9
9
|
import type { Tag, TagType } from './tags';
|
10
|
+
import type { Version } from './versions';
|
10
11
|
type BundleType = 'bundles';
|
11
12
|
type BundleRel = ResourceRel & {
|
12
13
|
type: BundleType;
|
@@ -42,6 +43,7 @@ interface Bundle extends Resource {
|
|
42
43
|
attachments?: Attachment[] | null;
|
43
44
|
events?: Event[] | null;
|
44
45
|
tags?: Tag[] | null;
|
46
|
+
versions?: Version[] | null;
|
45
47
|
}
|
46
48
|
interface BundleCreate extends ResourceCreate {
|
47
49
|
code: string;
|
@@ -80,6 +82,7 @@ declare class Bundles extends ApiResource<Bundle> {
|
|
80
82
|
attachments(bundleId: string | Bundle, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
81
83
|
events(bundleId: string | Bundle, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
82
84
|
tags(bundleId: string | Bundle, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
85
|
+
versions(bundleId: string | Bundle, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
83
86
|
_compute_price_amount(id: string | Bundle, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Bundle>;
|
84
87
|
_compute_compare_at_amount(id: string | Bundle, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Bundle>;
|
85
88
|
isBundle(resource: any): resource is Bundle;
|
@@ -35,6 +35,10 @@ class Bundles extends resource_1.ApiResource {
|
|
35
35
|
const _bundleId = bundleId.id || bundleId;
|
36
36
|
return this.resources.fetch({ type: 'tags' }, `bundles/${_bundleId}/tags`, params, options);
|
37
37
|
}
|
38
|
+
async versions(bundleId, params, options) {
|
39
|
+
const _bundleId = bundleId.id || bundleId;
|
40
|
+
return this.resources.fetch({ type: 'versions' }, `bundles/${_bundleId}/versions`, params, options);
|
41
|
+
}
|
38
42
|
async _compute_price_amount(id, params, options) {
|
39
43
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Bundles.TYPE, _compute_price_amount: true }, params, options);
|
40
44
|
}
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel
|
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Order } from './orders';
|
5
5
|
import type { Attachment } from './attachments';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
import type { Authorization } from './authorizations';
|
7
8
|
import type { Refund } from './refunds';
|
8
9
|
import type { Event } from './events';
|
@@ -31,6 +32,7 @@ interface Capture extends Resource {
|
|
31
32
|
formatted_refund_balance?: string | null;
|
32
33
|
order?: Order | null;
|
33
34
|
attachments?: Attachment[] | null;
|
35
|
+
versions?: Version[] | null;
|
34
36
|
reference_authorization?: Authorization | null;
|
35
37
|
refunds?: Refund[] | null;
|
36
38
|
events?: Event[] | null;
|
@@ -44,6 +46,7 @@ declare class Captures extends ApiResource<Capture> {
|
|
44
46
|
update(resource: CaptureUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Capture>;
|
45
47
|
order(captureId: string | Capture, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
46
48
|
attachments(captureId: string | Capture, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
49
|
+
versions(captureId: string | Capture, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
47
50
|
reference_authorization(captureId: string | Capture, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
48
51
|
refunds(captureId: string | Capture, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Refund>>;
|
49
52
|
events(captureId: string | Capture, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
@@ -13,6 +13,10 @@ class Captures extends resource_1.ApiResource {
|
|
13
13
|
const _captureId = captureId.id || captureId;
|
14
14
|
return this.resources.fetch({ type: 'attachments' }, `captures/${_captureId}/attachments`, params, options);
|
15
15
|
}
|
16
|
+
async versions(captureId, params, options) {
|
17
|
+
const _captureId = captureId.id || captureId;
|
18
|
+
return this.resources.fetch({ type: 'versions' }, `captures/${_captureId}/versions`, params, options);
|
19
|
+
}
|
16
20
|
async reference_authorization(captureId, params, options) {
|
17
21
|
const _captureId = captureId.id || captureId;
|
18
22
|
return this.resources.fetch({ type: 'authorizations' }, `captures/${_captureId}/reference_authorization`, params, options);
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse }
|
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Market } from './markets';
|
5
5
|
import type { Attachment } from './attachments';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type CarrierAccountType = 'carrier_accounts';
|
7
8
|
type CarrierAccountRel = ResourceRel & {
|
8
9
|
type: CarrierAccountType;
|
@@ -14,11 +15,13 @@ interface CarrierAccount extends Resource {
|
|
14
15
|
easypost_id?: string | null;
|
15
16
|
market?: Market | null;
|
16
17
|
attachments?: Attachment[] | null;
|
18
|
+
versions?: Version[] | null;
|
17
19
|
}
|
18
20
|
declare class CarrierAccounts extends ApiResource<CarrierAccount> {
|
19
21
|
static readonly TYPE: CarrierAccountType;
|
20
22
|
market(carrierAccountId: string | CarrierAccount, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
21
23
|
attachments(carrierAccountId: string | CarrierAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
24
|
+
versions(carrierAccountId: string | CarrierAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
22
25
|
isCarrierAccount(resource: any): resource is CarrierAccount;
|
23
26
|
relationship(id: string | ResourceId | null): CarrierAccountRel;
|
24
27
|
type(): CarrierAccountType;
|
@@ -10,6 +10,10 @@ class CarrierAccounts extends resource_1.ApiResource {
|
|
10
10
|
const _carrierAccountId = carrierAccountId.id || carrierAccountId;
|
11
11
|
return this.resources.fetch({ type: 'attachments' }, `carrier_accounts/${_carrierAccountId}/attachments`, params, options);
|
12
12
|
}
|
13
|
+
async versions(carrierAccountId, params, options) {
|
14
|
+
const _carrierAccountId = carrierAccountId.id || carrierAccountId;
|
15
|
+
return this.resources.fetch({ type: 'versions' }, `carrier_accounts/${_carrierAccountId}/versions`, params, options);
|
16
|
+
}
|
13
17
|
isCarrierAccount(resource) {
|
14
18
|
return resource.type && (resource.type === CarrierAccounts.TYPE);
|
15
19
|
}
|
@@ -2,6 +2,7 @@ import { ApiResource } from '../resource';
|
|
2
2
|
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { PaymentMethod } from './payment_methods';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
import type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments';
|
6
7
|
type CheckoutComGatewayType = 'checkout_com_gateways';
|
7
8
|
type CheckoutComGatewayRel = ResourceRel & {
|
@@ -17,6 +18,7 @@ interface CheckoutComGateway extends Resource {
|
|
17
18
|
webhook_endpoint_secret?: string | null;
|
18
19
|
webhook_endpoint_url?: string | null;
|
19
20
|
payment_methods?: PaymentMethod[] | null;
|
21
|
+
versions?: Version[] | null;
|
20
22
|
checkout_com_payments?: CheckoutComPayment[] | null;
|
21
23
|
}
|
22
24
|
interface CheckoutComGatewayCreate extends ResourceCreate {
|
@@ -37,6 +39,7 @@ declare class CheckoutComGateways extends ApiResource<CheckoutComGateway> {
|
|
37
39
|
update(resource: CheckoutComGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CheckoutComGateway>;
|
38
40
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
39
41
|
payment_methods(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
42
|
+
versions(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
40
43
|
checkout_com_payments(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CheckoutComPayment>>;
|
41
44
|
isCheckoutComGateway(resource: any): resource is CheckoutComGateway;
|
42
45
|
relationship(id: string | ResourceId | null): CheckoutComGatewayRel;
|
@@ -15,6 +15,10 @@ class CheckoutComGateways extends resource_1.ApiResource {
|
|
15
15
|
const _checkoutComGatewayId = checkoutComGatewayId.id || checkoutComGatewayId;
|
16
16
|
return this.resources.fetch({ type: 'payment_methods' }, `checkout_com_gateways/${_checkoutComGatewayId}/payment_methods`, params, options);
|
17
17
|
}
|
18
|
+
async versions(checkoutComGatewayId, params, options) {
|
19
|
+
const _checkoutComGatewayId = checkoutComGatewayId.id || checkoutComGatewayId;
|
20
|
+
return this.resources.fetch({ type: 'versions' }, `checkout_com_gateways/${_checkoutComGatewayId}/versions`, params, options);
|
21
|
+
}
|
18
22
|
async checkout_com_payments(checkoutComGatewayId, params, options) {
|
19
23
|
const _checkoutComGatewayId = checkoutComGatewayId.id || checkoutComGatewayId;
|
20
24
|
return this.resources.fetch({ type: 'checkout_com_payments' }, `checkout_com_gateways/${_checkoutComGatewayId}/checkout_com_payments`, params, options);
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve } from '../query';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Order, OrderType } from './orders';
|
5
5
|
import type { PaymentGateway } from './payment_gateways';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type CheckoutComPaymentType = 'checkout_com_payments';
|
7
8
|
type CheckoutComPaymentRel = ResourceRel & {
|
8
9
|
type: CheckoutComPaymentType;
|
@@ -26,6 +27,7 @@ interface CheckoutComPayment extends Resource {
|
|
26
27
|
payment_instrument?: Record<string, any> | null;
|
27
28
|
order?: Order | null;
|
28
29
|
payment_gateway?: PaymentGateway | null;
|
30
|
+
versions?: Version[] | null;
|
29
31
|
}
|
30
32
|
interface CheckoutComPaymentCreate extends ResourceCreate {
|
31
33
|
payment_type: string;
|
@@ -52,6 +54,7 @@ declare class CheckoutComPayments extends ApiResource<CheckoutComPayment> {
|
|
52
54
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
53
55
|
order(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
54
56
|
payment_gateway(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
57
|
+
versions(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
55
58
|
_details(id: string | CheckoutComPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CheckoutComPayment>;
|
56
59
|
_refresh(id: string | CheckoutComPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CheckoutComPayment>;
|
57
60
|
isCheckoutComPayment(resource: any): resource is CheckoutComPayment;
|
@@ -19,6 +19,10 @@ class CheckoutComPayments extends resource_1.ApiResource {
|
|
19
19
|
const _checkoutComPaymentId = checkoutComPaymentId.id || checkoutComPaymentId;
|
20
20
|
return this.resources.fetch({ type: 'payment_gateways' }, `checkout_com_payments/${_checkoutComPaymentId}/payment_gateway`, params, options);
|
21
21
|
}
|
22
|
+
async versions(checkoutComPaymentId, params, options) {
|
23
|
+
const _checkoutComPaymentId = checkoutComPaymentId.id || checkoutComPaymentId;
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `checkout_com_payments/${_checkoutComPaymentId}/versions`, params, options);
|
25
|
+
}
|
22
26
|
async _details(id, params, options) {
|
23
27
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: CheckoutComPayments.TYPE, _details: true }, params, options);
|
24
28
|
}
|
@@ -2,6 +2,7 @@ import { ApiResource } from '../resource';
|
|
2
2
|
import type { Resource, ResourceCreate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Event } from './events';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type CleanupType = 'cleanups';
|
6
7
|
type CleanupRel = ResourceRel & {
|
7
8
|
type: CleanupType;
|
@@ -19,6 +20,7 @@ interface Cleanup extends Resource {
|
|
19
20
|
processed_count?: number | null;
|
20
21
|
errors_log?: Record<string, any> | null;
|
21
22
|
events?: Event[] | null;
|
23
|
+
versions?: Version[] | null;
|
22
24
|
}
|
23
25
|
interface CleanupCreate extends ResourceCreate {
|
24
26
|
resource_type: string;
|
@@ -29,6 +31,7 @@ declare class Cleanups extends ApiResource<Cleanup> {
|
|
29
31
|
create(resource: CleanupCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Cleanup>;
|
30
32
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
31
33
|
events(cleanupId: string | Cleanup, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
34
|
+
versions(cleanupId: string | Cleanup, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
32
35
|
isCleanup(resource: any): resource is Cleanup;
|
33
36
|
relationship(id: string | ResourceId | null): CleanupRel;
|
34
37
|
type(): CleanupType;
|
@@ -12,6 +12,10 @@ class Cleanups extends resource_1.ApiResource {
|
|
12
12
|
const _cleanupId = cleanupId.id || cleanupId;
|
13
13
|
return this.resources.fetch({ type: 'events' }, `cleanups/${_cleanupId}/events`, params, options);
|
14
14
|
}
|
15
|
+
async versions(cleanupId, params, options) {
|
16
|
+
const _cleanupId = cleanupId.id || cleanupId;
|
17
|
+
return this.resources.fetch({ type: 'versions' }, `cleanups/${_cleanupId}/versions`, params, options);
|
18
|
+
}
|
15
19
|
isCleanup(resource) {
|
16
20
|
return resource.type && (resource.type === Cleanups.TYPE);
|
17
21
|
}
|
@@ -7,6 +7,7 @@ import type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promo
|
|
7
7
|
import type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions';
|
8
8
|
import type { ExternalPromotion, ExternalPromotionType } from './external_promotions';
|
9
9
|
import type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions';
|
10
|
+
import type { Version } from './versions';
|
10
11
|
import type { Coupon, CouponType } from './coupons';
|
11
12
|
type CouponCodesPromotionRuleType = 'coupon_codes_promotion_rules';
|
12
13
|
type CouponCodesPromotionRuleRel = ResourceRel & {
|
@@ -36,6 +37,7 @@ type CouponRel = ResourceRel & {
|
|
36
37
|
interface CouponCodesPromotionRule extends Resource {
|
37
38
|
readonly type: CouponCodesPromotionRuleType;
|
38
39
|
promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null;
|
40
|
+
versions?: Version[] | null;
|
39
41
|
coupons?: Coupon[] | null;
|
40
42
|
}
|
41
43
|
interface CouponCodesPromotionRuleCreate extends ResourceCreate {
|
@@ -51,6 +53,7 @@ declare class CouponCodesPromotionRules extends ApiResource<CouponCodesPromotion
|
|
51
53
|
create(resource: CouponCodesPromotionRuleCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
52
54
|
update(resource: CouponCodesPromotionRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
53
55
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
56
|
+
versions(couponCodesPromotionRuleId: string | CouponCodesPromotionRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
54
57
|
coupons(couponCodesPromotionRuleId: string | CouponCodesPromotionRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
55
58
|
isCouponCodesPromotionRule(resource: any): resource is CouponCodesPromotionRule;
|
56
59
|
relationship(id: string | ResourceId | null): CouponCodesPromotionRuleRel;
|
@@ -11,6 +11,10 @@ class CouponCodesPromotionRules extends resource_1.ApiResource {
|
|
11
11
|
async delete(id, options) {
|
12
12
|
await this.resources.delete((typeof id === 'string') ? { id, type: CouponCodesPromotionRules.TYPE } : id, options);
|
13
13
|
}
|
14
|
+
async versions(couponCodesPromotionRuleId, params, options) {
|
15
|
+
const _couponCodesPromotionRuleId = couponCodesPromotionRuleId.id || couponCodesPromotionRuleId;
|
16
|
+
return this.resources.fetch({ type: 'versions' }, `coupon_codes_promotion_rules/${_couponCodesPromotionRuleId}/versions`, params, options);
|
17
|
+
}
|
14
18
|
async coupons(couponCodesPromotionRuleId, params, options) {
|
15
19
|
const _couponCodesPromotionRuleId = couponCodesPromotionRuleId.id || couponCodesPromotionRuleId;
|
16
20
|
return this.resources.fetch({ type: 'coupons' }, `coupon_codes_promotion_rules/${_couponCodesPromotionRuleId}/coupons`, params, options);
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesCon
|
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Customer, CustomerType } from './customers';
|
5
5
|
import type { Attachment } from './attachments';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type CouponRecipientType = 'coupon_recipients';
|
7
8
|
type CouponRecipientRel = ResourceRel & {
|
8
9
|
type: CouponRecipientType;
|
@@ -17,6 +18,7 @@ interface CouponRecipient extends Resource {
|
|
17
18
|
last_name?: string | null;
|
18
19
|
customer?: Customer | null;
|
19
20
|
attachments?: Attachment[] | null;
|
21
|
+
versions?: Version[] | null;
|
20
22
|
}
|
21
23
|
interface CouponRecipientCreate extends ResourceCreate {
|
22
24
|
email: string;
|
@@ -37,6 +39,7 @@ declare class CouponRecipients extends ApiResource<CouponRecipient> {
|
|
37
39
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
38
40
|
customer(couponRecipientId: string | CouponRecipient, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
39
41
|
attachments(couponRecipientId: string | CouponRecipient, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
42
|
+
versions(couponRecipientId: string | CouponRecipient, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
40
43
|
isCouponRecipient(resource: any): resource is CouponRecipient;
|
41
44
|
relationship(id: string | ResourceId | null): CouponRecipientRel;
|
42
45
|
type(): CouponRecipientType;
|
@@ -19,6 +19,10 @@ class CouponRecipients extends resource_1.ApiResource {
|
|
19
19
|
const _couponRecipientId = couponRecipientId.id || couponRecipientId;
|
20
20
|
return this.resources.fetch({ type: 'attachments' }, `coupon_recipients/${_couponRecipientId}/attachments`, params, options);
|
21
21
|
}
|
22
|
+
async versions(couponRecipientId, params, options) {
|
23
|
+
const _couponRecipientId = couponRecipientId.id || couponRecipientId;
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `coupon_recipients/${_couponRecipientId}/versions`, params, options);
|
25
|
+
}
|
22
26
|
isCouponRecipient(resource) {
|
23
27
|
return resource.type && (resource.type === CouponRecipients.TYPE);
|
24
28
|
}
|
@@ -5,6 +5,7 @@ import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './c
|
|
5
5
|
import type { CouponRecipient, CouponRecipientType } from './coupon_recipients';
|
6
6
|
import type { Event } from './events';
|
7
7
|
import type { Tag, TagType } from './tags';
|
8
|
+
import type { Version } from './versions';
|
8
9
|
type CouponType = 'coupons';
|
9
10
|
type CouponRel = ResourceRel & {
|
10
11
|
type: CouponType;
|
@@ -29,6 +30,7 @@ interface Coupon extends Resource {
|
|
29
30
|
coupon_recipient?: CouponRecipient | null;
|
30
31
|
events?: Event[] | null;
|
31
32
|
tags?: Tag[] | null;
|
33
|
+
versions?: Version[] | null;
|
32
34
|
}
|
33
35
|
interface CouponCreate extends ResourceCreate {
|
34
36
|
code: string;
|
@@ -57,6 +59,7 @@ declare class Coupons extends ApiResource<Coupon> {
|
|
57
59
|
coupon_recipient(couponId: string | Coupon, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponRecipient>;
|
58
60
|
events(couponId: string | Coupon, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
59
61
|
tags(couponId: string | Coupon, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
62
|
+
versions(couponId: string | Coupon, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
60
63
|
isCoupon(resource: any): resource is Coupon;
|
61
64
|
relationship(id: string | ResourceId | null): CouponRel;
|
62
65
|
type(): CouponType;
|
@@ -27,6 +27,10 @@ class Coupons extends resource_1.ApiResource {
|
|
27
27
|
const _couponId = couponId.id || couponId;
|
28
28
|
return this.resources.fetch({ type: 'tags' }, `coupons/${_couponId}/tags`, params, options);
|
29
29
|
}
|
30
|
+
async versions(couponId, params, options) {
|
31
|
+
const _couponId = couponId.id || couponId;
|
32
|
+
return this.resources.fetch({ type: 'versions' }, `coupons/${_couponId}/versions`, params, options);
|
33
|
+
}
|
30
34
|
isCoupon(resource) {
|
31
35
|
return resource.type && (resource.type === Coupons.TYPE);
|
32
36
|
}
|
@@ -4,6 +4,7 @@ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
|
4
4
|
import type { Customer, CustomerType } from './customers';
|
5
5
|
import type { Address, AddressType } from './addresses';
|
6
6
|
import type { Event } from './events';
|
7
|
+
import type { Version } from './versions';
|
7
8
|
type CustomerAddressType = 'customer_addresses';
|
8
9
|
type CustomerAddressRel = ResourceRel & {
|
9
10
|
type: CustomerAddressType;
|
@@ -21,6 +22,7 @@ interface CustomerAddress extends Resource {
|
|
21
22
|
customer?: Customer | null;
|
22
23
|
address?: Address | null;
|
23
24
|
events?: Event[] | null;
|
25
|
+
versions?: Version[] | null;
|
24
26
|
}
|
25
27
|
interface CustomerAddressCreate extends ResourceCreate {
|
26
28
|
customer_email: string;
|
@@ -39,6 +41,7 @@ declare class CustomerAddresses extends ApiResource<CustomerAddress> {
|
|
39
41
|
customer(customerAddressId: string | CustomerAddress, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
40
42
|
address(customerAddressId: string | CustomerAddress, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
41
43
|
events(customerAddressId: string | CustomerAddress, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
44
|
+
versions(customerAddressId: string | CustomerAddress, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
42
45
|
isCustomerAddress(resource: any): resource is CustomerAddress;
|
43
46
|
relationship(id: string | ResourceId | null): CustomerAddressRel;
|
44
47
|
type(): CustomerAddressType;
|
@@ -23,6 +23,10 @@ class CustomerAddresses extends resource_1.ApiResource {
|
|
23
23
|
const _customerAddressId = customerAddressId.id || customerAddressId;
|
24
24
|
return this.resources.fetch({ type: 'events' }, `customer_addresses/${_customerAddressId}/events`, params, options);
|
25
25
|
}
|
26
|
+
async versions(customerAddressId, params, options) {
|
27
|
+
const _customerAddressId = customerAddressId.id || customerAddressId;
|
28
|
+
return this.resources.fetch({ type: 'versions' }, `customer_addresses/${_customerAddressId}/versions`, params, options);
|
29
|
+
}
|
26
30
|
isCustomerAddress(resource) {
|
27
31
|
return resource.type && (resource.type === CustomerAddresses.TYPE);
|
28
32
|
}
|
@@ -4,6 +4,7 @@ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
|
4
4
|
import type { Customer } from './customers';
|
5
5
|
import type { Market } from './markets';
|
6
6
|
import type { Attachment } from './attachments';
|
7
|
+
import type { Version } from './versions';
|
7
8
|
type CustomerGroupType = 'customer_groups';
|
8
9
|
type CustomerGroupRel = ResourceRel & {
|
9
10
|
type: CustomerGroupType;
|
@@ -14,6 +15,7 @@ interface CustomerGroup extends Resource {
|
|
14
15
|
customers?: Customer[] | null;
|
15
16
|
markets?: Market[] | null;
|
16
17
|
attachments?: Attachment[] | null;
|
18
|
+
versions?: Version[] | null;
|
17
19
|
}
|
18
20
|
interface CustomerGroupCreate extends ResourceCreate {
|
19
21
|
name: string;
|
@@ -29,6 +31,7 @@ declare class CustomerGroups extends ApiResource<CustomerGroup> {
|
|
29
31
|
customers(customerGroupId: string | CustomerGroup, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Customer>>;
|
30
32
|
markets(customerGroupId: string | CustomerGroup, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
31
33
|
attachments(customerGroupId: string | CustomerGroup, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
34
|
+
versions(customerGroupId: string | CustomerGroup, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
32
35
|
isCustomerGroup(resource: any): resource is CustomerGroup;
|
33
36
|
relationship(id: string | ResourceId | null): CustomerGroupRel;
|
34
37
|
type(): CustomerGroupType;
|
@@ -23,6 +23,10 @@ class CustomerGroups extends resource_1.ApiResource {
|
|
23
23
|
const _customerGroupId = customerGroupId.id || customerGroupId;
|
24
24
|
return this.resources.fetch({ type: 'attachments' }, `customer_groups/${_customerGroupId}/attachments`, params, options);
|
25
25
|
}
|
26
|
+
async versions(customerGroupId, params, options) {
|
27
|
+
const _customerGroupId = customerGroupId.id || customerGroupId;
|
28
|
+
return this.resources.fetch({ type: 'versions' }, `customer_groups/${_customerGroupId}/versions`, params, options);
|
29
|
+
}
|
26
30
|
isCustomerGroup(resource) {
|
27
31
|
return resource.type && (resource.type === CustomerGroups.TYPE);
|
28
32
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve } from '../query';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Customer, CustomerType } from './customers';
|
5
5
|
import type { AdyenPayment, AdyenPaymentType } from './adyen_payments';
|
6
6
|
import type { AxervePayment, AxervePaymentType } from './axerve_payments';
|
@@ -8,10 +8,9 @@ import type { BraintreePayment, BraintreePaymentType } from './braintree_payment
|
|
8
8
|
import type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments';
|
9
9
|
import type { ExternalPayment, ExternalPaymentType } from './external_payments';
|
10
10
|
import type { KlarnaPayment, KlarnaPaymentType } from './klarna_payments';
|
11
|
-
import type { PaypalPayment, PaypalPaymentType } from './paypal_payments';
|
12
11
|
import type { SatispayPayment, SatispayPaymentType } from './satispay_payments';
|
13
12
|
import type { StripePayment, StripePaymentType } from './stripe_payments';
|
14
|
-
import type {
|
13
|
+
import type { Version } from './versions';
|
15
14
|
type CustomerPaymentSourceType = 'customer_payment_sources';
|
16
15
|
type CustomerPaymentSourceRel = ResourceRel & {
|
17
16
|
type: CustomerPaymentSourceType;
|
@@ -37,33 +36,28 @@ type ExternalPaymentRel = ResourceRel & {
|
|
37
36
|
type KlarnaPaymentRel = ResourceRel & {
|
38
37
|
type: KlarnaPaymentType;
|
39
38
|
};
|
40
|
-
type PaypalPaymentRel = ResourceRel & {
|
41
|
-
type: PaypalPaymentType;
|
42
|
-
};
|
43
39
|
type SatispayPaymentRel = ResourceRel & {
|
44
40
|
type: SatispayPaymentType;
|
45
41
|
};
|
46
42
|
type StripePaymentRel = ResourceRel & {
|
47
43
|
type: StripePaymentType;
|
48
44
|
};
|
49
|
-
type WireTransferRel = ResourceRel & {
|
50
|
-
type: WireTransferType;
|
51
|
-
};
|
52
45
|
interface CustomerPaymentSource extends Resource {
|
53
46
|
readonly type: CustomerPaymentSourceType;
|
54
47
|
name?: string | null;
|
55
48
|
customer_token?: string | null;
|
56
49
|
payment_source_token?: string | null;
|
57
50
|
customer?: Customer | null;
|
58
|
-
payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment |
|
51
|
+
payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | SatispayPayment | StripePayment | null;
|
52
|
+
versions?: Version[] | null;
|
59
53
|
}
|
60
54
|
interface CustomerPaymentSourceCreate extends ResourceCreate {
|
61
55
|
customer: CustomerRel;
|
62
|
-
payment_source: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel |
|
56
|
+
payment_source: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | SatispayPaymentRel | StripePaymentRel;
|
63
57
|
}
|
64
58
|
interface CustomerPaymentSourceUpdate extends ResourceUpdate {
|
65
59
|
customer?: CustomerRel | null;
|
66
|
-
payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel |
|
60
|
+
payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | SatispayPaymentRel | StripePaymentRel | null;
|
67
61
|
}
|
68
62
|
declare class CustomerPaymentSources extends ApiResource<CustomerPaymentSource> {
|
69
63
|
static readonly TYPE: CustomerPaymentSourceType;
|
@@ -71,6 +65,7 @@ declare class CustomerPaymentSources extends ApiResource<CustomerPaymentSource>
|
|
71
65
|
update(resource: CustomerPaymentSourceUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPaymentSource>;
|
72
66
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
73
67
|
customer(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
68
|
+
versions(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
74
69
|
isCustomerPaymentSource(resource: any): resource is CustomerPaymentSource;
|
75
70
|
relationship(id: string | ResourceId | null): CustomerPaymentSourceRel;
|
76
71
|
type(): CustomerPaymentSourceType;
|
@@ -15,6 +15,10 @@ class CustomerPaymentSources extends resource_1.ApiResource {
|
|
15
15
|
const _customerPaymentSourceId = customerPaymentSourceId.id || customerPaymentSourceId;
|
16
16
|
return this.resources.fetch({ type: 'customers' }, `customer_payment_sources/${_customerPaymentSourceId}/customer`, params, options);
|
17
17
|
}
|
18
|
+
async versions(customerPaymentSourceId, params, options) {
|
19
|
+
const _customerPaymentSourceId = customerPaymentSourceId.id || customerPaymentSourceId;
|
20
|
+
return this.resources.fetch({ type: 'versions' }, `customer_payment_sources/${_customerPaymentSourceId}/versions`, params, options);
|
21
|
+
}
|
18
22
|
isCustomerPaymentSource(resource) {
|
19
23
|
return resource.type && (resource.type === CustomerPaymentSources.TYPE);
|
20
24
|
}
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesCon
|
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Customer } from './customers';
|
5
5
|
import type { Event } from './events';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type CustomerSubscriptionType = 'customer_subscriptions';
|
7
8
|
type CustomerSubscriptionRel = ResourceRel & {
|
8
9
|
type: CustomerSubscriptionType;
|
@@ -12,6 +13,7 @@ interface CustomerSubscription extends Resource {
|
|
12
13
|
customer_email: string;
|
13
14
|
customer?: Customer | null;
|
14
15
|
events?: Event[] | null;
|
16
|
+
versions?: Version[] | null;
|
15
17
|
}
|
16
18
|
interface CustomerSubscriptionCreate extends ResourceCreate {
|
17
19
|
customer_email: string;
|
@@ -24,6 +26,7 @@ declare class CustomerSubscriptions extends ApiResource<CustomerSubscription> {
|
|
24
26
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
25
27
|
customer(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
26
28
|
events(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
29
|
+
versions(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
27
30
|
isCustomerSubscription(resource: any): resource is CustomerSubscription;
|
28
31
|
relationship(id: string | ResourceId | null): CustomerSubscriptionRel;
|
29
32
|
type(): CustomerSubscriptionType;
|
@@ -19,6 +19,10 @@ class CustomerSubscriptions extends resource_1.ApiResource {
|
|
19
19
|
const _customerSubscriptionId = customerSubscriptionId.id || customerSubscriptionId;
|
20
20
|
return this.resources.fetch({ type: 'events' }, `customer_subscriptions/${_customerSubscriptionId}/events`, params, options);
|
21
21
|
}
|
22
|
+
async versions(customerSubscriptionId, params, options) {
|
23
|
+
const _customerSubscriptionId = customerSubscriptionId.id || customerSubscriptionId;
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `customer_subscriptions/${_customerSubscriptionId}/versions`, params, options);
|
25
|
+
}
|
22
26
|
isCustomerSubscription(resource) {
|
23
27
|
return resource.type && (resource.type === CustomerSubscriptions.TYPE);
|
24
28
|
}
|
@@ -4,6 +4,7 @@ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
|
4
4
|
import type { StockLocation, StockLocationType } from './stock_locations';
|
5
5
|
import type { ShippingMethod, ShippingMethodType } from './shipping_methods';
|
6
6
|
import type { Attachment } from './attachments';
|
7
|
+
import type { Version } from './versions';
|
7
8
|
type DeliveryLeadTimeType = 'delivery_lead_times';
|
8
9
|
type DeliveryLeadTimeRel = ResourceRel & {
|
9
10
|
type: DeliveryLeadTimeType;
|
@@ -23,6 +24,7 @@ interface DeliveryLeadTime extends Resource {
|
|
23
24
|
stock_location?: StockLocation | null;
|
24
25
|
shipping_method?: ShippingMethod | null;
|
25
26
|
attachments?: Attachment[] | null;
|
27
|
+
versions?: Version[] | null;
|
26
28
|
}
|
27
29
|
interface DeliveryLeadTimeCreate extends ResourceCreate {
|
28
30
|
min_hours: number;
|
@@ -44,6 +46,7 @@ declare class DeliveryLeadTimes extends ApiResource<DeliveryLeadTime> {
|
|
44
46
|
stock_location(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
45
47
|
shipping_method(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
46
48
|
attachments(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
49
|
+
versions(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
47
50
|
isDeliveryLeadTime(resource: any): resource is DeliveryLeadTime;
|
48
51
|
relationship(id: string | ResourceId | null): DeliveryLeadTimeRel;
|
49
52
|
type(): DeliveryLeadTimeType;
|
@@ -23,6 +23,10 @@ class DeliveryLeadTimes extends resource_1.ApiResource {
|
|
23
23
|
const _deliveryLeadTimeId = deliveryLeadTimeId.id || deliveryLeadTimeId;
|
24
24
|
return this.resources.fetch({ type: 'attachments' }, `delivery_lead_times/${_deliveryLeadTimeId}/attachments`, params, options);
|
25
25
|
}
|
26
|
+
async versions(deliveryLeadTimeId, params, options) {
|
27
|
+
const _deliveryLeadTimeId = deliveryLeadTimeId.id || deliveryLeadTimeId;
|
28
|
+
return this.resources.fetch({ type: 'versions' }, `delivery_lead_times/${_deliveryLeadTimeId}/versions`, params, options);
|
29
|
+
}
|
26
30
|
isDeliveryLeadTime(resource) {
|
27
31
|
return resource.type && (resource.type === DeliveryLeadTimes.TYPE);
|
28
32
|
}
|
@@ -2,6 +2,7 @@ import { ApiResource } from '../resource';
|
|
2
2
|
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { PaymentMethod } from './payment_methods';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
import type { ExternalPayment } from './external_payments';
|
6
7
|
type ExternalGatewayType = 'external_gateways';
|
7
8
|
type ExternalGatewayRel = ResourceRel & {
|
@@ -17,6 +18,7 @@ interface ExternalGateway extends Resource {
|
|
17
18
|
refund_url?: string | null;
|
18
19
|
token_url?: string | null;
|
19
20
|
payment_methods?: PaymentMethod[] | null;
|
21
|
+
versions?: Version[] | null;
|
20
22
|
external_payments?: ExternalPayment[] | null;
|
21
23
|
}
|
22
24
|
interface ExternalGatewayCreate extends ResourceCreate {
|
@@ -41,6 +43,7 @@ declare class ExternalGateways extends ApiResource<ExternalGateway> {
|
|
41
43
|
update(resource: ExternalGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
|
42
44
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
43
45
|
payment_methods(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
46
|
+
versions(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
44
47
|
external_payments(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalPayment>>;
|
45
48
|
isExternalGateway(resource: any): resource is ExternalGateway;
|
46
49
|
relationship(id: string | ResourceId | null): ExternalGatewayRel;
|