@commercelayer/sdk 5.12.4 → 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
@@ -17,6 +17,10 @@ class AvalaraAccounts extends ApiResource {
|
|
17
17
|
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
18
18
|
return this.resources.fetch({ type: 'attachments' }, `avalara_accounts/${_avalaraAccountId}/attachments`, params, options);
|
19
19
|
}
|
20
|
+
async versions(avalaraAccountId, params, options) {
|
21
|
+
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `avalara_accounts/${_avalaraAccountId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
async tax_categories(avalaraAccountId, params, options) {
|
21
25
|
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
22
26
|
return this.resources.fetch({ type: 'tax_categories' }, `avalara_accounts/${_avalaraAccountId}/tax_categories`, params, options);
|
@@ -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 { AxervePayment, AxervePaymentType } from './axerve_payments';
|
6
7
|
type AxerveGatewayType = 'axerve_gateways';
|
7
8
|
type AxerveGatewayRel = ResourceRel & {
|
@@ -14,7 +15,9 @@ interface AxerveGateway extends Resource {
|
|
14
15
|
readonly type: AxerveGatewayType;
|
15
16
|
name: string;
|
16
17
|
login: string;
|
18
|
+
webhook_endpoint_url?: string | null;
|
17
19
|
payment_methods?: PaymentMethod[] | null;
|
20
|
+
versions?: Version[] | null;
|
18
21
|
axerve_payments?: AxervePayment[] | null;
|
19
22
|
}
|
20
23
|
interface AxerveGatewayCreate extends ResourceCreate {
|
@@ -35,6 +38,7 @@ declare class AxerveGateways extends ApiResource<AxerveGateway> {
|
|
35
38
|
update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxerveGateway>;
|
36
39
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
37
40
|
payment_methods(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
41
|
+
versions(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
38
42
|
axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>>;
|
39
43
|
isAxerveGateway(resource: any): resource is AxerveGateway;
|
40
44
|
relationship(id: string | ResourceId | null): AxerveGatewayRel;
|
@@ -13,6 +13,10 @@ class AxerveGateways extends ApiResource {
|
|
13
13
|
const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId;
|
14
14
|
return this.resources.fetch({ type: 'payment_methods' }, `axerve_gateways/${_axerveGatewayId}/payment_methods`, params, options);
|
15
15
|
}
|
16
|
+
async versions(axerveGatewayId, params, options) {
|
17
|
+
const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId;
|
18
|
+
return this.resources.fetch({ type: 'versions' }, `axerve_gateways/${_axerveGatewayId}/versions`, params, options);
|
19
|
+
}
|
16
20
|
async axerve_payments(axerveGatewayId, params, options) {
|
17
21
|
const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId;
|
18
22
|
return this.resources.fetch({ type: 'axerve_payments' }, `axerve_gateways/${_axerveGatewayId}/axerve_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 AxervePaymentType = 'axerve_payments';
|
7
8
|
type AxervePaymentRel = ResourceRel & {
|
8
9
|
type: AxervePaymentType;
|
@@ -22,6 +23,7 @@ interface AxervePayment extends Resource {
|
|
22
23
|
payment_instrument?: Record<string, any> | null;
|
23
24
|
order?: Order | null;
|
24
25
|
payment_gateway?: PaymentGateway | null;
|
26
|
+
versions?: Version[] | null;
|
25
27
|
}
|
26
28
|
interface AxervePaymentCreate extends ResourceCreate {
|
27
29
|
return_url: string;
|
@@ -39,6 +41,7 @@ declare class AxervePayments extends ApiResource<AxervePayment> {
|
|
39
41
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
40
42
|
order(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
41
43
|
payment_gateway(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
44
|
+
versions(axervePaymentId: string | AxervePayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
42
45
|
_update(id: string | AxervePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxervePayment>;
|
43
46
|
isAxervePayment(resource: any): resource is AxervePayment;
|
44
47
|
relationship(id: string | ResourceId | null): AxervePaymentRel;
|
@@ -17,6 +17,10 @@ class AxervePayments extends ApiResource {
|
|
17
17
|
const _axervePaymentId = axervePaymentId.id || axervePaymentId;
|
18
18
|
return this.resources.fetch({ type: 'payment_gateways' }, `axerve_payments/${_axervePaymentId}/payment_gateway`, params, options);
|
19
19
|
}
|
20
|
+
async versions(axervePaymentId, params, options) {
|
21
|
+
const _axervePaymentId = axervePaymentId.id || axervePaymentId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `axerve_payments/${_axervePaymentId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
async _update(id, params, options) {
|
21
25
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: AxervePayments.TYPE, _update: true }, params, options);
|
22
26
|
}
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesCon
|
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Market, MarketType } from './markets';
|
5
5
|
import type { Attachment } from './attachments';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type BillingInfoValidationRuleType = 'billing_info_validation_rules';
|
7
8
|
type BillingInfoValidationRuleRel = ResourceRel & {
|
8
9
|
type: BillingInfoValidationRuleType;
|
@@ -14,6 +15,7 @@ interface BillingInfoValidationRule extends Resource {
|
|
14
15
|
readonly type: BillingInfoValidationRuleType;
|
15
16
|
market?: Market | null;
|
16
17
|
attachments?: Attachment[] | null;
|
18
|
+
versions?: Version[] | null;
|
17
19
|
}
|
18
20
|
interface BillingInfoValidationRuleCreate extends ResourceCreate {
|
19
21
|
market: MarketRel;
|
@@ -28,6 +30,7 @@ declare class BillingInfoValidationRules extends ApiResource<BillingInfoValidati
|
|
28
30
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
29
31
|
market(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
30
32
|
attachments(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
33
|
+
versions(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
31
34
|
isBillingInfoValidationRule(resource: any): resource is BillingInfoValidationRule;
|
32
35
|
relationship(id: string | ResourceId | null): BillingInfoValidationRuleRel;
|
33
36
|
type(): BillingInfoValidationRuleType;
|
@@ -17,6 +17,10 @@ class BillingInfoValidationRules extends ApiResource {
|
|
17
17
|
const _billingInfoValidationRuleId = billingInfoValidationRuleId.id || billingInfoValidationRuleId;
|
18
18
|
return this.resources.fetch({ type: 'attachments' }, `billing_info_validation_rules/${_billingInfoValidationRuleId}/attachments`, params, options);
|
19
19
|
}
|
20
|
+
async versions(billingInfoValidationRuleId, params, options) {
|
21
|
+
const _billingInfoValidationRuleId = billingInfoValidationRuleId.id || billingInfoValidationRuleId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `billing_info_validation_rules/${_billingInfoValidationRuleId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
isBillingInfoValidationRule(resource) {
|
21
25
|
return resource.type && (resource.type === BillingInfoValidationRules.TYPE);
|
22
26
|
}
|
@@ -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 { BraintreePayment, BraintreePaymentType } from './braintree_payments';
|
6
7
|
type BraintreeGatewayType = 'braintree_gateways';
|
7
8
|
type BraintreeGatewayRel = ResourceRel & {
|
@@ -18,6 +19,7 @@ interface BraintreeGateway extends Resource {
|
|
18
19
|
descriptor_url?: string | null;
|
19
20
|
webhook_endpoint_url?: string | null;
|
20
21
|
payment_methods?: PaymentMethod[] | null;
|
22
|
+
versions?: Version[] | null;
|
21
23
|
braintree_payments?: BraintreePayment[] | null;
|
22
24
|
}
|
23
25
|
interface BraintreeGatewayCreate extends ResourceCreate {
|
@@ -48,6 +50,7 @@ declare class BraintreeGateways extends ApiResource<BraintreeGateway> {
|
|
48
50
|
update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
|
49
51
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
50
52
|
payment_methods(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
53
|
+
versions(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
51
54
|
braintree_payments(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>>;
|
52
55
|
isBraintreeGateway(resource: any): resource is BraintreeGateway;
|
53
56
|
relationship(id: string | ResourceId | null): BraintreeGatewayRel;
|
@@ -13,6 +13,10 @@ class BraintreeGateways extends ApiResource {
|
|
13
13
|
const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
|
14
14
|
return this.resources.fetch({ type: 'payment_methods' }, `braintree_gateways/${_braintreeGatewayId}/payment_methods`, params, options);
|
15
15
|
}
|
16
|
+
async versions(braintreeGatewayId, params, options) {
|
17
|
+
const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
|
18
|
+
return this.resources.fetch({ type: 'versions' }, `braintree_gateways/${_braintreeGatewayId}/versions`, params, options);
|
19
|
+
}
|
16
20
|
async braintree_payments(braintreeGatewayId, params, options) {
|
17
21
|
const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
|
18
22
|
return this.resources.fetch({ type: 'braintree_payments' }, `braintree_gateways/${_braintreeGatewayId}/braintree_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 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;
|
@@ -17,6 +17,10 @@ class BraintreePayments extends ApiResource {
|
|
17
17
|
const _braintreePaymentId = braintreePaymentId.id || braintreePaymentId;
|
18
18
|
return this.resources.fetch({ type: 'payment_gateways' }, `braintree_payments/${_braintreePaymentId}/payment_gateway`, params, options);
|
19
19
|
}
|
20
|
+
async versions(braintreePaymentId, params, options) {
|
21
|
+
const _braintreePaymentId = braintreePaymentId.id || braintreePaymentId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `braintree_payments/${_braintreePaymentId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
isBraintreePayment(resource) {
|
21
25
|
return resource.type && (resource.type === BraintreePayments.TYPE);
|
22
26
|
}
|
@@ -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;
|
@@ -33,6 +33,10 @@ class Bundles extends ApiResource {
|
|
33
33
|
const _bundleId = bundleId.id || bundleId;
|
34
34
|
return this.resources.fetch({ type: 'tags' }, `bundles/${_bundleId}/tags`, params, options);
|
35
35
|
}
|
36
|
+
async versions(bundleId, params, options) {
|
37
|
+
const _bundleId = bundleId.id || bundleId;
|
38
|
+
return this.resources.fetch({ type: 'versions' }, `bundles/${_bundleId}/versions`, params, options);
|
39
|
+
}
|
36
40
|
async _compute_price_amount(id, params, options) {
|
37
41
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Bundles.TYPE, _compute_price_amount: true }, params, options);
|
38
42
|
}
|
@@ -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>>;
|
@@ -11,6 +11,10 @@ class Captures extends ApiResource {
|
|
11
11
|
const _captureId = captureId.id || captureId;
|
12
12
|
return this.resources.fetch({ type: 'attachments' }, `captures/${_captureId}/attachments`, params, options);
|
13
13
|
}
|
14
|
+
async versions(captureId, params, options) {
|
15
|
+
const _captureId = captureId.id || captureId;
|
16
|
+
return this.resources.fetch({ type: 'versions' }, `captures/${_captureId}/versions`, params, options);
|
17
|
+
}
|
14
18
|
async reference_authorization(captureId, params, options) {
|
15
19
|
const _captureId = captureId.id || captureId;
|
16
20
|
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;
|
@@ -8,6 +8,10 @@ class CarrierAccounts extends ApiResource {
|
|
8
8
|
const _carrierAccountId = carrierAccountId.id || carrierAccountId;
|
9
9
|
return this.resources.fetch({ type: 'attachments' }, `carrier_accounts/${_carrierAccountId}/attachments`, params, options);
|
10
10
|
}
|
11
|
+
async versions(carrierAccountId, params, options) {
|
12
|
+
const _carrierAccountId = carrierAccountId.id || carrierAccountId;
|
13
|
+
return this.resources.fetch({ type: 'versions' }, `carrier_accounts/${_carrierAccountId}/versions`, params, options);
|
14
|
+
}
|
11
15
|
isCarrierAccount(resource) {
|
12
16
|
return resource.type && (resource.type === CarrierAccounts.TYPE);
|
13
17
|
}
|
@@ -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;
|
@@ -13,6 +13,10 @@ class CheckoutComGateways extends ApiResource {
|
|
13
13
|
const _checkoutComGatewayId = checkoutComGatewayId.id || checkoutComGatewayId;
|
14
14
|
return this.resources.fetch({ type: 'payment_methods' }, `checkout_com_gateways/${_checkoutComGatewayId}/payment_methods`, params, options);
|
15
15
|
}
|
16
|
+
async versions(checkoutComGatewayId, params, options) {
|
17
|
+
const _checkoutComGatewayId = checkoutComGatewayId.id || checkoutComGatewayId;
|
18
|
+
return this.resources.fetch({ type: 'versions' }, `checkout_com_gateways/${_checkoutComGatewayId}/versions`, params, options);
|
19
|
+
}
|
16
20
|
async checkout_com_payments(checkoutComGatewayId, params, options) {
|
17
21
|
const _checkoutComGatewayId = checkoutComGatewayId.id || checkoutComGatewayId;
|
18
22
|
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;
|
@@ -17,6 +17,10 @@ class CheckoutComPayments extends ApiResource {
|
|
17
17
|
const _checkoutComPaymentId = checkoutComPaymentId.id || checkoutComPaymentId;
|
18
18
|
return this.resources.fetch({ type: 'payment_gateways' }, `checkout_com_payments/${_checkoutComPaymentId}/payment_gateway`, params, options);
|
19
19
|
}
|
20
|
+
async versions(checkoutComPaymentId, params, options) {
|
21
|
+
const _checkoutComPaymentId = checkoutComPaymentId.id || checkoutComPaymentId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `checkout_com_payments/${_checkoutComPaymentId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
async _details(id, params, options) {
|
21
25
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: CheckoutComPayments.TYPE, _details: true }, params, options);
|
22
26
|
}
|
@@ -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;
|
@@ -10,6 +10,10 @@ class Cleanups extends ApiResource {
|
|
10
10
|
const _cleanupId = cleanupId.id || cleanupId;
|
11
11
|
return this.resources.fetch({ type: 'events' }, `cleanups/${_cleanupId}/events`, params, options);
|
12
12
|
}
|
13
|
+
async versions(cleanupId, params, options) {
|
14
|
+
const _cleanupId = cleanupId.id || cleanupId;
|
15
|
+
return this.resources.fetch({ type: 'versions' }, `cleanups/${_cleanupId}/versions`, params, options);
|
16
|
+
}
|
13
17
|
isCleanup(resource) {
|
14
18
|
return resource.type && (resource.type === Cleanups.TYPE);
|
15
19
|
}
|
@@ -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;
|
@@ -9,6 +9,10 @@ class CouponCodesPromotionRules extends ApiResource {
|
|
9
9
|
async delete(id, options) {
|
10
10
|
await this.resources.delete((typeof id === 'string') ? { id, type: CouponCodesPromotionRules.TYPE } : id, options);
|
11
11
|
}
|
12
|
+
async versions(couponCodesPromotionRuleId, params, options) {
|
13
|
+
const _couponCodesPromotionRuleId = couponCodesPromotionRuleId.id || couponCodesPromotionRuleId;
|
14
|
+
return this.resources.fetch({ type: 'versions' }, `coupon_codes_promotion_rules/${_couponCodesPromotionRuleId}/versions`, params, options);
|
15
|
+
}
|
12
16
|
async coupons(couponCodesPromotionRuleId, params, options) {
|
13
17
|
const _couponCodesPromotionRuleId = couponCodesPromotionRuleId.id || couponCodesPromotionRuleId;
|
14
18
|
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;
|
@@ -17,6 +17,10 @@ class CouponRecipients extends ApiResource {
|
|
17
17
|
const _couponRecipientId = couponRecipientId.id || couponRecipientId;
|
18
18
|
return this.resources.fetch({ type: 'attachments' }, `coupon_recipients/${_couponRecipientId}/attachments`, params, options);
|
19
19
|
}
|
20
|
+
async versions(couponRecipientId, params, options) {
|
21
|
+
const _couponRecipientId = couponRecipientId.id || couponRecipientId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `coupon_recipients/${_couponRecipientId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
isCouponRecipient(resource) {
|
21
25
|
return resource.type && (resource.type === CouponRecipients.TYPE);
|
22
26
|
}
|
@@ -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;
|
@@ -25,6 +25,10 @@ class Coupons extends ApiResource {
|
|
25
25
|
const _couponId = couponId.id || couponId;
|
26
26
|
return this.resources.fetch({ type: 'tags' }, `coupons/${_couponId}/tags`, params, options);
|
27
27
|
}
|
28
|
+
async versions(couponId, params, options) {
|
29
|
+
const _couponId = couponId.id || couponId;
|
30
|
+
return this.resources.fetch({ type: 'versions' }, `coupons/${_couponId}/versions`, params, options);
|
31
|
+
}
|
28
32
|
isCoupon(resource) {
|
29
33
|
return resource.type && (resource.type === Coupons.TYPE);
|
30
34
|
}
|
@@ -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;
|
@@ -21,6 +21,10 @@ class CustomerAddresses extends ApiResource {
|
|
21
21
|
const _customerAddressId = customerAddressId.id || customerAddressId;
|
22
22
|
return this.resources.fetch({ type: 'events' }, `customer_addresses/${_customerAddressId}/events`, params, options);
|
23
23
|
}
|
24
|
+
async versions(customerAddressId, params, options) {
|
25
|
+
const _customerAddressId = customerAddressId.id || customerAddressId;
|
26
|
+
return this.resources.fetch({ type: 'versions' }, `customer_addresses/${_customerAddressId}/versions`, params, options);
|
27
|
+
}
|
24
28
|
isCustomerAddress(resource) {
|
25
29
|
return resource.type && (resource.type === CustomerAddresses.TYPE);
|
26
30
|
}
|
@@ -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;
|
@@ -21,6 +21,10 @@ class CustomerGroups extends ApiResource {
|
|
21
21
|
const _customerGroupId = customerGroupId.id || customerGroupId;
|
22
22
|
return this.resources.fetch({ type: 'attachments' }, `customer_groups/${_customerGroupId}/attachments`, params, options);
|
23
23
|
}
|
24
|
+
async versions(customerGroupId, params, options) {
|
25
|
+
const _customerGroupId = customerGroupId.id || customerGroupId;
|
26
|
+
return this.resources.fetch({ type: 'versions' }, `customer_groups/${_customerGroupId}/versions`, params, options);
|
27
|
+
}
|
24
28
|
isCustomerGroup(resource) {
|
25
29
|
return resource.type && (resource.type === CustomerGroups.TYPE);
|
26
30
|
}
|