@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
@@ -15,6 +15,10 @@ class ExternalGateways extends resource_1.ApiResource {
|
|
15
15
|
const _externalGatewayId = externalGatewayId.id || externalGatewayId;
|
16
16
|
return this.resources.fetch({ type: 'payment_methods' }, `external_gateways/${_externalGatewayId}/payment_methods`, params, options);
|
17
17
|
}
|
18
|
+
async versions(externalGatewayId, params, options) {
|
19
|
+
const _externalGatewayId = externalGatewayId.id || externalGatewayId;
|
20
|
+
return this.resources.fetch({ type: 'versions' }, `external_gateways/${_externalGatewayId}/versions`, params, options);
|
21
|
+
}
|
18
22
|
async external_payments(externalGatewayId, params, options) {
|
19
23
|
const _externalGatewayId = externalGatewayId.id || externalGatewayId;
|
20
24
|
return this.resources.fetch({ type: 'external_payments' }, `external_gateways/${_externalGatewayId}/external_payments`, params, options);
|
@@ -1,9 +1,10 @@
|
|
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
6
|
import type { CustomerPaymentSource } from './customer_payment_sources';
|
7
|
+
import type { Version } from './versions';
|
7
8
|
type ExternalPaymentType = 'external_payments';
|
8
9
|
type ExternalPaymentRel = ResourceRel & {
|
9
10
|
type: ExternalPaymentType;
|
@@ -19,6 +20,7 @@ interface ExternalPayment extends Resource {
|
|
19
20
|
order?: Order | null;
|
20
21
|
payment_gateway?: PaymentGateway | null;
|
21
22
|
wallet?: CustomerPaymentSource | null;
|
23
|
+
versions?: Version[] | null;
|
22
24
|
}
|
23
25
|
interface ExternalPaymentCreate extends ResourceCreate {
|
24
26
|
payment_source_token: string;
|
@@ -37,6 +39,7 @@ declare class ExternalPayments extends ApiResource<ExternalPayment> {
|
|
37
39
|
order(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
38
40
|
payment_gateway(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
39
41
|
wallet(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPaymentSource>;
|
42
|
+
versions(externalPaymentId: string | ExternalPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
40
43
|
isExternalPayment(resource: any): resource is ExternalPayment;
|
41
44
|
relationship(id: string | ResourceId | null): ExternalPaymentRel;
|
42
45
|
type(): ExternalPaymentType;
|
@@ -23,6 +23,10 @@ class ExternalPayments extends resource_1.ApiResource {
|
|
23
23
|
const _externalPaymentId = externalPaymentId.id || externalPaymentId;
|
24
24
|
return this.resources.fetch({ type: 'customer_payment_sources' }, `external_payments/${_externalPaymentId}/wallet`, params, options);
|
25
25
|
}
|
26
|
+
async versions(externalPaymentId, params, options) {
|
27
|
+
const _externalPaymentId = externalPaymentId.id || externalPaymentId;
|
28
|
+
return this.resources.fetch({ type: 'versions' }, `external_payments/${_externalPaymentId}/versions`, params, options);
|
29
|
+
}
|
26
30
|
isExternalPayment(resource) {
|
27
31
|
return resource.type && (resource.type === ExternalPayments.TYPE);
|
28
32
|
}
|
@@ -10,6 +10,7 @@ import type { SkuList } from './sku_lists';
|
|
10
10
|
import type { Attachment } from './attachments';
|
11
11
|
import type { Event } from './events';
|
12
12
|
import type { Tag, TagType } from './tags';
|
13
|
+
import type { Version } from './versions';
|
13
14
|
type ExternalPromotionType = 'external_promotions';
|
14
15
|
type ExternalPromotionRel = ResourceRel & {
|
15
16
|
type: ExternalPromotionType;
|
@@ -52,6 +53,7 @@ interface ExternalPromotion extends Resource {
|
|
52
53
|
attachments?: Attachment[] | null;
|
53
54
|
events?: Event[] | null;
|
54
55
|
tags?: Tag[] | null;
|
56
|
+
versions?: Version[] | null;
|
55
57
|
}
|
56
58
|
interface ExternalPromotionCreate extends ResourceCreate {
|
57
59
|
name: string;
|
@@ -94,6 +96,7 @@ declare class ExternalPromotions extends ApiResource<ExternalPromotion> {
|
|
94
96
|
attachments(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
95
97
|
events(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
96
98
|
tags(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
99
|
+
versions(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
97
100
|
isExternalPromotion(resource: any): resource is ExternalPromotion;
|
98
101
|
relationship(id: string | ResourceId | null): ExternalPromotionRel;
|
99
102
|
type(): ExternalPromotionType;
|
@@ -43,6 +43,10 @@ class ExternalPromotions extends resource_1.ApiResource {
|
|
43
43
|
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
44
44
|
return this.resources.fetch({ type: 'tags' }, `external_promotions/${_externalPromotionId}/tags`, params, options);
|
45
45
|
}
|
46
|
+
async versions(externalPromotionId, params, options) {
|
47
|
+
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
48
|
+
return this.resources.fetch({ type: 'versions' }, `external_promotions/${_externalPromotionId}/versions`, params, options);
|
49
|
+
}
|
46
50
|
isExternalPromotion(resource) {
|
47
51
|
return resource.type && (resource.type === ExternalPromotions.TYPE);
|
48
52
|
}
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesCon
|
|
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 ExternalTaxCalculatorType = 'external_tax_calculators';
|
7
8
|
type ExternalTaxCalculatorRel = ResourceRel & {
|
8
9
|
type: ExternalTaxCalculatorType;
|
@@ -14,6 +15,7 @@ interface ExternalTaxCalculator extends Resource {
|
|
14
15
|
shared_secret: string;
|
15
16
|
markets?: Market[] | null;
|
16
17
|
attachments?: Attachment[] | null;
|
18
|
+
versions?: Version[] | null;
|
17
19
|
}
|
18
20
|
interface ExternalTaxCalculatorCreate extends ResourceCreate {
|
19
21
|
name: string;
|
@@ -30,6 +32,7 @@ declare class ExternalTaxCalculators extends ApiResource<ExternalTaxCalculator>
|
|
30
32
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
31
33
|
markets(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
32
34
|
attachments(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
35
|
+
versions(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
33
36
|
isExternalTaxCalculator(resource: any): resource is ExternalTaxCalculator;
|
34
37
|
relationship(id: string | ResourceId | null): ExternalTaxCalculatorRel;
|
35
38
|
type(): ExternalTaxCalculatorType;
|
@@ -19,6 +19,10 @@ class ExternalTaxCalculators extends resource_1.ApiResource {
|
|
19
19
|
const _externalTaxCalculatorId = externalTaxCalculatorId.id || externalTaxCalculatorId;
|
20
20
|
return this.resources.fetch({ type: 'attachments' }, `external_tax_calculators/${_externalTaxCalculatorId}/attachments`, params, options);
|
21
21
|
}
|
22
|
+
async versions(externalTaxCalculatorId, params, options) {
|
23
|
+
const _externalTaxCalculatorId = externalTaxCalculatorId.id || externalTaxCalculatorId;
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `external_tax_calculators/${_externalTaxCalculatorId}/versions`, params, options);
|
25
|
+
}
|
22
26
|
isExternalTaxCalculator(resource) {
|
23
27
|
return resource.type && (resource.type === ExternalTaxCalculators.TYPE);
|
24
28
|
}
|
@@ -10,6 +10,7 @@ import type { SkuList } from './sku_lists';
|
|
10
10
|
import type { Attachment } from './attachments';
|
11
11
|
import type { Event } from './events';
|
12
12
|
import type { Tag, TagType } from './tags';
|
13
|
+
import type { Version } from './versions';
|
13
14
|
type FixedAmountPromotionType = 'fixed_amount_promotions';
|
14
15
|
type FixedAmountPromotionRel = ResourceRel & {
|
15
16
|
type: FixedAmountPromotionType;
|
@@ -53,6 +54,7 @@ interface FixedAmountPromotion extends Resource {
|
|
53
54
|
attachments?: Attachment[] | null;
|
54
55
|
events?: Event[] | null;
|
55
56
|
tags?: Tag[] | null;
|
57
|
+
versions?: Version[] | null;
|
56
58
|
}
|
57
59
|
interface FixedAmountPromotionCreate extends ResourceCreate {
|
58
60
|
name: string;
|
@@ -95,6 +97,7 @@ declare class FixedAmountPromotions extends ApiResource<FixedAmountPromotion> {
|
|
95
97
|
attachments(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
96
98
|
events(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
97
99
|
tags(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
100
|
+
versions(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
98
101
|
isFixedAmountPromotion(resource: any): resource is FixedAmountPromotion;
|
99
102
|
relationship(id: string | ResourceId | null): FixedAmountPromotionRel;
|
100
103
|
type(): FixedAmountPromotionType;
|
@@ -43,6 +43,10 @@ class FixedAmountPromotions extends resource_1.ApiResource {
|
|
43
43
|
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
44
44
|
return this.resources.fetch({ type: 'tags' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/tags`, params, options);
|
45
45
|
}
|
46
|
+
async versions(fixedAmountPromotionId, params, options) {
|
47
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
48
|
+
return this.resources.fetch({ type: 'versions' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/versions`, params, options);
|
49
|
+
}
|
46
50
|
isFixedAmountPromotion(resource) {
|
47
51
|
return resource.type && (resource.type === FixedAmountPromotions.TYPE);
|
48
52
|
}
|
@@ -10,6 +10,7 @@ import type { SkuList, SkuListType } from './sku_lists';
|
|
10
10
|
import type { Attachment } from './attachments';
|
11
11
|
import type { Event } from './events';
|
12
12
|
import type { Tag, TagType } from './tags';
|
13
|
+
import type { Version } from './versions';
|
13
14
|
import type { Sku } from './skus';
|
14
15
|
type FixedPricePromotionType = 'fixed_price_promotions';
|
15
16
|
type FixedPricePromotionRel = ResourceRel & {
|
@@ -57,6 +58,7 @@ interface FixedPricePromotion extends Resource {
|
|
57
58
|
attachments?: Attachment[] | null;
|
58
59
|
events?: Event[] | null;
|
59
60
|
tags?: Tag[] | null;
|
61
|
+
versions?: Version[] | null;
|
60
62
|
skus?: Sku[] | null;
|
61
63
|
}
|
62
64
|
interface FixedPricePromotionCreate extends ResourceCreate {
|
@@ -102,6 +104,7 @@ declare class FixedPricePromotions extends ApiResource<FixedPricePromotion> {
|
|
102
104
|
attachments(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
103
105
|
events(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
104
106
|
tags(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
107
|
+
versions(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
105
108
|
skus(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
106
109
|
isFixedPricePromotion(resource: any): resource is FixedPricePromotion;
|
107
110
|
relationship(id: string | ResourceId | null): FixedPricePromotionRel;
|
@@ -43,6 +43,10 @@ class FixedPricePromotions extends resource_1.ApiResource {
|
|
43
43
|
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
44
44
|
return this.resources.fetch({ type: 'tags' }, `fixed_price_promotions/${_fixedPricePromotionId}/tags`, params, options);
|
45
45
|
}
|
46
|
+
async versions(fixedPricePromotionId, params, options) {
|
47
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
48
|
+
return this.resources.fetch({ type: 'versions' }, `fixed_price_promotions/${_fixedPricePromotionId}/versions`, params, options);
|
49
|
+
}
|
46
50
|
async skus(fixedPricePromotionId, params, options) {
|
47
51
|
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
48
52
|
return this.resources.fetch({ type: 'skus' }, `fixed_price_promotions/${_fixedPricePromotionId}/skus`, params, options);
|
@@ -10,6 +10,7 @@ import type { SkuList, SkuListType } from './sku_lists';
|
|
10
10
|
import type { Attachment } from './attachments';
|
11
11
|
import type { Event } from './events';
|
12
12
|
import type { Tag, TagType } from './tags';
|
13
|
+
import type { Version } from './versions';
|
13
14
|
import type { Sku } from './skus';
|
14
15
|
type FreeGiftPromotionType = 'free_gift_promotions';
|
15
16
|
type FreeGiftPromotionRel = ResourceRel & {
|
@@ -55,6 +56,7 @@ interface FreeGiftPromotion extends Resource {
|
|
55
56
|
attachments?: Attachment[] | null;
|
56
57
|
events?: Event[] | null;
|
57
58
|
tags?: Tag[] | null;
|
59
|
+
versions?: Version[] | null;
|
58
60
|
skus?: Sku[] | null;
|
59
61
|
}
|
60
62
|
interface FreeGiftPromotionCreate extends ResourceCreate {
|
@@ -100,6 +102,7 @@ declare class FreeGiftPromotions extends ApiResource<FreeGiftPromotion> {
|
|
100
102
|
attachments(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
101
103
|
events(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
102
104
|
tags(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
105
|
+
versions(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
103
106
|
skus(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
104
107
|
isFreeGiftPromotion(resource: any): resource is FreeGiftPromotion;
|
105
108
|
relationship(id: string | ResourceId | null): FreeGiftPromotionRel;
|
@@ -43,6 +43,10 @@ class FreeGiftPromotions extends resource_1.ApiResource {
|
|
43
43
|
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
44
44
|
return this.resources.fetch({ type: 'tags' }, `free_gift_promotions/${_freeGiftPromotionId}/tags`, params, options);
|
45
45
|
}
|
46
|
+
async versions(freeGiftPromotionId, params, options) {
|
47
|
+
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
48
|
+
return this.resources.fetch({ type: 'versions' }, `free_gift_promotions/${_freeGiftPromotionId}/versions`, params, options);
|
49
|
+
}
|
46
50
|
async skus(freeGiftPromotionId, params, options) {
|
47
51
|
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
48
52
|
return this.resources.fetch({ type: 'skus' }, `free_gift_promotions/${_freeGiftPromotionId}/skus`, params, options);
|
@@ -10,6 +10,7 @@ import type { SkuList } from './sku_lists';
|
|
10
10
|
import type { Attachment } from './attachments';
|
11
11
|
import type { Event } from './events';
|
12
12
|
import type { Tag, TagType } from './tags';
|
13
|
+
import type { Version } from './versions';
|
13
14
|
type FreeShippingPromotionType = 'free_shipping_promotions';
|
14
15
|
type FreeShippingPromotionRel = ResourceRel & {
|
15
16
|
type: FreeShippingPromotionType;
|
@@ -50,6 +51,7 @@ interface FreeShippingPromotion extends Resource {
|
|
50
51
|
attachments?: Attachment[] | null;
|
51
52
|
events?: Event[] | null;
|
52
53
|
tags?: Tag[] | null;
|
54
|
+
versions?: Version[] | null;
|
53
55
|
}
|
54
56
|
interface FreeShippingPromotionCreate extends ResourceCreate {
|
55
57
|
name: string;
|
@@ -90,6 +92,7 @@ declare class FreeShippingPromotions extends ApiResource<FreeShippingPromotion>
|
|
90
92
|
attachments(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
91
93
|
events(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
92
94
|
tags(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
95
|
+
versions(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
93
96
|
isFreeShippingPromotion(resource: any): resource is FreeShippingPromotion;
|
94
97
|
relationship(id: string | ResourceId | null): FreeShippingPromotionRel;
|
95
98
|
type(): FreeShippingPromotionType;
|
@@ -43,6 +43,10 @@ class FreeShippingPromotions extends resource_1.ApiResource {
|
|
43
43
|
const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
|
44
44
|
return this.resources.fetch({ type: 'tags' }, `free_shipping_promotions/${_freeShippingPromotionId}/tags`, params, options);
|
45
45
|
}
|
46
|
+
async versions(freeShippingPromotionId, params, options) {
|
47
|
+
const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
|
48
|
+
return this.resources.fetch({ type: 'versions' }, `free_shipping_promotions/${_freeShippingPromotionId}/versions`, params, options);
|
49
|
+
}
|
46
50
|
isFreeShippingPromotion(resource) {
|
47
51
|
return resource.type && (resource.type === FreeShippingPromotions.TYPE);
|
48
52
|
}
|
@@ -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 GiftCardRecipientType = 'gift_card_recipients';
|
7
8
|
type GiftCardRecipientRel = ResourceRel & {
|
8
9
|
type: GiftCardRecipientType;
|
@@ -17,6 +18,7 @@ interface GiftCardRecipient 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 GiftCardRecipientCreate extends ResourceCreate {
|
22
24
|
email: string;
|
@@ -37,6 +39,7 @@ declare class GiftCardRecipients extends ApiResource<GiftCardRecipient> {
|
|
37
39
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
38
40
|
customer(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
39
41
|
attachments(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
42
|
+
versions(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
40
43
|
isGiftCardRecipient(resource: any): resource is GiftCardRecipient;
|
41
44
|
relationship(id: string | ResourceId | null): GiftCardRecipientRel;
|
42
45
|
type(): GiftCardRecipientType;
|
@@ -19,6 +19,10 @@ class GiftCardRecipients extends resource_1.ApiResource {
|
|
19
19
|
const _giftCardRecipientId = giftCardRecipientId.id || giftCardRecipientId;
|
20
20
|
return this.resources.fetch({ type: 'attachments' }, `gift_card_recipients/${_giftCardRecipientId}/attachments`, params, options);
|
21
21
|
}
|
22
|
+
async versions(giftCardRecipientId, params, options) {
|
23
|
+
const _giftCardRecipientId = giftCardRecipientId.id || giftCardRecipientId;
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `gift_card_recipients/${_giftCardRecipientId}/versions`, params, options);
|
25
|
+
}
|
22
26
|
isGiftCardRecipient(resource) {
|
23
27
|
return resource.type && (resource.type === GiftCardRecipients.TYPE);
|
24
28
|
}
|
@@ -6,6 +6,7 @@ import type { GiftCardRecipient, GiftCardRecipientType } from './gift_card_recip
|
|
6
6
|
import type { Attachment } from './attachments';
|
7
7
|
import type { Event } from './events';
|
8
8
|
import type { Tag, TagType } from './tags';
|
9
|
+
import type { Version } from './versions';
|
9
10
|
type GiftCardType = 'gift_cards';
|
10
11
|
type GiftCardRel = ResourceRel & {
|
11
12
|
type: GiftCardType;
|
@@ -44,6 +45,7 @@ interface GiftCard extends Resource {
|
|
44
45
|
attachments?: Attachment[] | null;
|
45
46
|
events?: Event[] | null;
|
46
47
|
tags?: Tag[] | null;
|
48
|
+
versions?: Version[] | null;
|
47
49
|
}
|
48
50
|
interface GiftCardCreate extends ResourceCreate {
|
49
51
|
code?: string | null;
|
@@ -86,6 +88,7 @@ declare class GiftCards extends ApiResource<GiftCard> {
|
|
86
88
|
attachments(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
87
89
|
events(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
88
90
|
tags(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
91
|
+
versions(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
89
92
|
_purchase(id: string | GiftCard, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GiftCard>;
|
90
93
|
_activate(id: string | GiftCard, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GiftCard>;
|
91
94
|
_deactivate(id: string | GiftCard, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GiftCard>;
|
@@ -31,6 +31,10 @@ class GiftCards extends resource_1.ApiResource {
|
|
31
31
|
const _giftCardId = giftCardId.id || giftCardId;
|
32
32
|
return this.resources.fetch({ type: 'tags' }, `gift_cards/${_giftCardId}/tags`, params, options);
|
33
33
|
}
|
34
|
+
async versions(giftCardId, params, options) {
|
35
|
+
const _giftCardId = giftCardId.id || giftCardId;
|
36
|
+
return this.resources.fetch({ type: 'versions' }, `gift_cards/${_giftCardId}/versions`, params, options);
|
37
|
+
}
|
34
38
|
async _purchase(id, params, options) {
|
35
39
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: GiftCards.TYPE, _purchase: true }, params, options);
|
36
40
|
}
|
@@ -5,6 +5,7 @@ import type { Market, MarketType } from './markets';
|
|
5
5
|
import type { Customer, CustomerType } from './customers';
|
6
6
|
import type { Sku, SkuType } from './skus';
|
7
7
|
import type { Event } from './events';
|
8
|
+
import type { Version } from './versions';
|
8
9
|
type InStockSubscriptionType = 'in_stock_subscriptions';
|
9
10
|
type InStockSubscriptionRel = ResourceRel & {
|
10
11
|
type: InStockSubscriptionType;
|
@@ -28,6 +29,7 @@ interface InStockSubscription extends Resource {
|
|
28
29
|
customer?: Customer | null;
|
29
30
|
sku?: Sku | null;
|
30
31
|
events?: Event[] | null;
|
32
|
+
versions?: Version[] | null;
|
31
33
|
}
|
32
34
|
interface InStockSubscriptionCreate extends ResourceCreate {
|
33
35
|
customer_email?: string | null;
|
@@ -55,6 +57,7 @@ declare class InStockSubscriptions extends ApiResource<InStockSubscription> {
|
|
55
57
|
customer(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
56
58
|
sku(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
57
59
|
events(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
60
|
+
versions(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
58
61
|
_activate(id: string | InStockSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InStockSubscription>;
|
59
62
|
_deactivate(id: string | InStockSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InStockSubscription>;
|
60
63
|
isInStockSubscription(resource: any): resource is InStockSubscription;
|
@@ -27,6 +27,10 @@ class InStockSubscriptions extends resource_1.ApiResource {
|
|
27
27
|
const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
|
28
28
|
return this.resources.fetch({ type: 'events' }, `in_stock_subscriptions/${_inStockSubscriptionId}/events`, params, options);
|
29
29
|
}
|
30
|
+
async versions(inStockSubscriptionId, params, options) {
|
31
|
+
const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
|
32
|
+
return this.resources.fetch({ type: 'versions' }, `in_stock_subscriptions/${_inStockSubscriptionId}/versions`, params, options);
|
33
|
+
}
|
30
34
|
async _activate(id, params, options) {
|
31
35
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: InStockSubscriptions.TYPE, _activate: true }, params, options);
|
32
36
|
}
|
@@ -4,6 +4,7 @@ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
|
4
4
|
import type { InventoryStockLocation } from './inventory_stock_locations';
|
5
5
|
import type { InventoryReturnLocation } from './inventory_return_locations';
|
6
6
|
import type { Attachment } from './attachments';
|
7
|
+
import type { Version } from './versions';
|
7
8
|
type InventoryModelType = 'inventory_models';
|
8
9
|
type InventoryModelRel = ResourceRel & {
|
9
10
|
type: InventoryModelType;
|
@@ -17,6 +18,7 @@ interface InventoryModel extends Resource {
|
|
17
18
|
inventory_stock_locations?: InventoryStockLocation[] | null;
|
18
19
|
inventory_return_locations?: InventoryReturnLocation[] | null;
|
19
20
|
attachments?: Attachment[] | null;
|
21
|
+
versions?: Version[] | null;
|
20
22
|
}
|
21
23
|
interface InventoryModelCreate extends ResourceCreate {
|
22
24
|
name: string;
|
@@ -38,6 +40,7 @@ declare class InventoryModels extends ApiResource<InventoryModel> {
|
|
38
40
|
inventory_stock_locations(inventoryModelId: string | InventoryModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryStockLocation>>;
|
39
41
|
inventory_return_locations(inventoryModelId: string | InventoryModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryReturnLocation>>;
|
40
42
|
attachments(inventoryModelId: string | InventoryModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
43
|
+
versions(inventoryModelId: string | InventoryModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
41
44
|
isInventoryModel(resource: any): resource is InventoryModel;
|
42
45
|
relationship(id: string | ResourceId | null): InventoryModelRel;
|
43
46
|
type(): InventoryModelType;
|
@@ -23,6 +23,10 @@ class InventoryModels extends resource_1.ApiResource {
|
|
23
23
|
const _inventoryModelId = inventoryModelId.id || inventoryModelId;
|
24
24
|
return this.resources.fetch({ type: 'attachments' }, `inventory_models/${_inventoryModelId}/attachments`, params, options);
|
25
25
|
}
|
26
|
+
async versions(inventoryModelId, params, options) {
|
27
|
+
const _inventoryModelId = inventoryModelId.id || inventoryModelId;
|
28
|
+
return this.resources.fetch({ type: 'versions' }, `inventory_models/${_inventoryModelId}/versions`, params, options);
|
29
|
+
}
|
26
30
|
isInventoryModel(resource) {
|
27
31
|
return resource.type && (resource.type === InventoryModels.TYPE);
|
28
32
|
}
|
@@ -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 { StockLocation, StockLocationType } from './stock_locations';
|
5
5
|
import type { InventoryModel, InventoryModelType } from './inventory_models';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type InventoryReturnLocationType = 'inventory_return_locations';
|
7
8
|
type InventoryReturnLocationRel = ResourceRel & {
|
8
9
|
type: InventoryReturnLocationType;
|
@@ -18,6 +19,7 @@ interface InventoryReturnLocation extends Resource {
|
|
18
19
|
priority: number;
|
19
20
|
stock_location?: StockLocation | null;
|
20
21
|
inventory_model?: InventoryModel | null;
|
22
|
+
versions?: Version[] | null;
|
21
23
|
}
|
22
24
|
interface InventoryReturnLocationCreate extends ResourceCreate {
|
23
25
|
priority: number;
|
@@ -36,6 +38,7 @@ declare class InventoryReturnLocations extends ApiResource<InventoryReturnLocati
|
|
36
38
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
37
39
|
stock_location(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
38
40
|
inventory_model(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryModel>;
|
41
|
+
versions(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
39
42
|
isInventoryReturnLocation(resource: any): resource is InventoryReturnLocation;
|
40
43
|
relationship(id: string | ResourceId | null): InventoryReturnLocationRel;
|
41
44
|
type(): InventoryReturnLocationType;
|
@@ -19,6 +19,10 @@ class InventoryReturnLocations extends resource_1.ApiResource {
|
|
19
19
|
const _inventoryReturnLocationId = inventoryReturnLocationId.id || inventoryReturnLocationId;
|
20
20
|
return this.resources.fetch({ type: 'inventory_models' }, `inventory_return_locations/${_inventoryReturnLocationId}/inventory_model`, params, options);
|
21
21
|
}
|
22
|
+
async versions(inventoryReturnLocationId, params, options) {
|
23
|
+
const _inventoryReturnLocationId = inventoryReturnLocationId.id || inventoryReturnLocationId;
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `inventory_return_locations/${_inventoryReturnLocationId}/versions`, params, options);
|
25
|
+
}
|
22
26
|
isInventoryReturnLocation(resource) {
|
23
27
|
return resource.type && (resource.type === InventoryReturnLocations.TYPE);
|
24
28
|
}
|
@@ -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 { StockLocation, StockLocationType } from './stock_locations';
|
5
5
|
import type { InventoryModel, InventoryModelType } from './inventory_models';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type InventoryStockLocationType = 'inventory_stock_locations';
|
7
8
|
type InventoryStockLocationRel = ResourceRel & {
|
8
9
|
type: InventoryStockLocationType;
|
@@ -19,6 +20,7 @@ interface InventoryStockLocation extends Resource {
|
|
19
20
|
on_hold?: boolean | null;
|
20
21
|
stock_location?: StockLocation | null;
|
21
22
|
inventory_model?: InventoryModel | null;
|
23
|
+
versions?: Version[] | null;
|
22
24
|
}
|
23
25
|
interface InventoryStockLocationCreate extends ResourceCreate {
|
24
26
|
priority: number;
|
@@ -39,6 +41,7 @@ declare class InventoryStockLocations extends ApiResource<InventoryStockLocation
|
|
39
41
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
40
42
|
stock_location(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
41
43
|
inventory_model(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryModel>;
|
44
|
+
versions(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
42
45
|
isInventoryStockLocation(resource: any): resource is InventoryStockLocation;
|
43
46
|
relationship(id: string | ResourceId | null): InventoryStockLocationRel;
|
44
47
|
type(): InventoryStockLocationType;
|
@@ -19,6 +19,10 @@ class InventoryStockLocations extends resource_1.ApiResource {
|
|
19
19
|
const _inventoryStockLocationId = inventoryStockLocationId.id || inventoryStockLocationId;
|
20
20
|
return this.resources.fetch({ type: 'inventory_models' }, `inventory_stock_locations/${_inventoryStockLocationId}/inventory_model`, params, options);
|
21
21
|
}
|
22
|
+
async versions(inventoryStockLocationId, params, options) {
|
23
|
+
const _inventoryStockLocationId = inventoryStockLocationId.id || inventoryStockLocationId;
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `inventory_stock_locations/${_inventoryStockLocationId}/versions`, params, options);
|
25
|
+
}
|
22
26
|
isInventoryStockLocation(resource) {
|
23
27
|
return resource.type && (resource.type === InventoryStockLocations.TYPE);
|
24
28
|
}
|
@@ -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 { KlarnaPayment, KlarnaPaymentType } from './klarna_payments';
|
6
7
|
type KlarnaGatewayType = 'klarna_gateways';
|
7
8
|
type KlarnaGatewayRel = ResourceRel & {
|
@@ -14,6 +15,7 @@ interface KlarnaGateway extends Resource {
|
|
14
15
|
readonly type: KlarnaGatewayType;
|
15
16
|
name: string;
|
16
17
|
payment_methods?: PaymentMethod[] | null;
|
18
|
+
versions?: Version[] | null;
|
17
19
|
klarna_payments?: KlarnaPayment[] | null;
|
18
20
|
}
|
19
21
|
interface KlarnaGatewayCreate extends ResourceCreate {
|
@@ -36,6 +38,7 @@ declare class KlarnaGateways extends ApiResource<KlarnaGateway> {
|
|
36
38
|
update(resource: KlarnaGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaGateway>;
|
37
39
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
38
40
|
payment_methods(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
41
|
+
versions(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
39
42
|
klarna_payments(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<KlarnaPayment>>;
|
40
43
|
isKlarnaGateway(resource: any): resource is KlarnaGateway;
|
41
44
|
relationship(id: string | ResourceId | null): KlarnaGatewayRel;
|
@@ -15,6 +15,10 @@ class KlarnaGateways extends resource_1.ApiResource {
|
|
15
15
|
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
16
16
|
return this.resources.fetch({ type: 'payment_methods' }, `klarna_gateways/${_klarnaGatewayId}/payment_methods`, params, options);
|
17
17
|
}
|
18
|
+
async versions(klarnaGatewayId, params, options) {
|
19
|
+
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
20
|
+
return this.resources.fetch({ type: 'versions' }, `klarna_gateways/${_klarnaGatewayId}/versions`, params, options);
|
21
|
+
}
|
18
22
|
async klarna_payments(klarnaGatewayId, params, options) {
|
19
23
|
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
20
24
|
return this.resources.fetch({ type: 'klarna_payments' }, `klarna_gateways/${_klarnaGatewayId}/klarna_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 KlarnaPaymentType = 'klarna_payments';
|
7
8
|
type KlarnaPaymentRel = ResourceRel & {
|
8
9
|
type: KlarnaPaymentType;
|
@@ -23,6 +24,7 @@ interface KlarnaPayment extends Resource {
|
|
23
24
|
payment_instrument?: Record<string, any> | null;
|
24
25
|
order?: Order | null;
|
25
26
|
payment_gateway?: PaymentGateway | null;
|
27
|
+
versions?: Version[] | null;
|
26
28
|
}
|
27
29
|
interface KlarnaPaymentCreate extends ResourceCreate {
|
28
30
|
order: OrderRel;
|
@@ -39,6 +41,7 @@ declare class KlarnaPayments extends ApiResource<KlarnaPayment> {
|
|
39
41
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
40
42
|
order(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
41
43
|
payment_gateway(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
44
|
+
versions(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
42
45
|
_update(id: string | KlarnaPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaPayment>;
|
43
46
|
isKlarnaPayment(resource: any): resource is KlarnaPayment;
|
44
47
|
relationship(id: string | ResourceId | null): KlarnaPaymentRel;
|
@@ -19,6 +19,10 @@ class KlarnaPayments extends resource_1.ApiResource {
|
|
19
19
|
const _klarnaPaymentId = klarnaPaymentId.id || klarnaPaymentId;
|
20
20
|
return this.resources.fetch({ type: 'payment_gateways' }, `klarna_payments/${_klarnaPaymentId}/payment_gateway`, params, options);
|
21
21
|
}
|
22
|
+
async versions(klarnaPaymentId, params, options) {
|
23
|
+
const _klarnaPaymentId = klarnaPaymentId.id || klarnaPaymentId;
|
24
|
+
return this.resources.fetch({ type: 'versions' }, `klarna_payments/${_klarnaPaymentId}/versions`, params, options);
|
25
|
+
}
|
22
26
|
async _update(id, params, options) {
|
23
27
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: KlarnaPayments.TYPE, _update: true }, params, options);
|
24
28
|
}
|
@@ -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
|
type ManualGatewayType = 'manual_gateways';
|
6
7
|
type ManualGatewayRel = ResourceRel & {
|
7
8
|
type: ManualGatewayType;
|
@@ -10,6 +11,7 @@ interface ManualGateway extends Resource {
|
|
10
11
|
readonly type: ManualGatewayType;
|
11
12
|
name: string;
|
12
13
|
payment_methods?: PaymentMethod[] | null;
|
14
|
+
versions?: Version[] | null;
|
13
15
|
}
|
14
16
|
interface ManualGatewayCreate extends ResourceCreate {
|
15
17
|
name: string;
|
@@ -23,6 +25,7 @@ declare class ManualGateways extends ApiResource<ManualGateway> {
|
|
23
25
|
update(resource: ManualGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualGateway>;
|
24
26
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
25
27
|
payment_methods(manualGatewayId: string | ManualGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
28
|
+
versions(manualGatewayId: string | ManualGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
26
29
|
isManualGateway(resource: any): resource is ManualGateway;
|
27
30
|
relationship(id: string | ResourceId | null): ManualGatewayRel;
|
28
31
|
type(): ManualGatewayType;
|
@@ -15,6 +15,10 @@ class ManualGateways extends resource_1.ApiResource {
|
|
15
15
|
const _manualGatewayId = manualGatewayId.id || manualGatewayId;
|
16
16
|
return this.resources.fetch({ type: 'payment_methods' }, `manual_gateways/${_manualGatewayId}/payment_methods`, params, options);
|
17
17
|
}
|
18
|
+
async versions(manualGatewayId, params, options) {
|
19
|
+
const _manualGatewayId = manualGatewayId.id || manualGatewayId;
|
20
|
+
return this.resources.fetch({ type: 'versions' }, `manual_gateways/${_manualGatewayId}/versions`, params, options);
|
21
|
+
}
|
18
22
|
isManualGateway(resource) {
|
19
23
|
return resource.type && (resource.type === ManualGateways.TYPE);
|
20
24
|
}
|