@commercelayer/sdk 4.27.1 → 4.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +10 -3
- package/lib/cjs/api.js +25 -4
- package/lib/cjs/commercelayer.d.ts +9 -2
- package/lib/cjs/commercelayer.js +8 -1
- package/lib/cjs/model.d.ts +10 -3
- package/lib/cjs/resource.d.ts +7 -9
- package/lib/cjs/resources/addresses.d.ts +14 -0
- package/lib/cjs/resources/addresses.js +12 -0
- package/lib/cjs/resources/adjustments.d.ts +3 -0
- package/lib/cjs/resources/adjustments.js +4 -0
- package/lib/cjs/resources/adyen_gateways.d.ts +5 -2
- package/lib/cjs/resources/adyen_gateways.js +4 -0
- package/lib/cjs/resources/adyen_payments.d.ts +3 -0
- package/lib/cjs/resources/adyen_payments.js +4 -0
- package/lib/cjs/resources/authorizations.d.ts +9 -3
- package/lib/cjs/resources/authorizations.js +12 -4
- package/lib/cjs/resources/avalara_accounts.d.ts +9 -6
- package/lib/cjs/resources/avalara_accounts.js +4 -0
- package/lib/cjs/resources/axerve_gateways.d.ts +4 -0
- package/lib/cjs/resources/axerve_gateways.js +4 -0
- package/lib/cjs/resources/axerve_payments.d.ts +9 -0
- package/lib/cjs/resources/axerve_payments.js +4 -0
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +3 -0
- package/lib/cjs/resources/billing_info_validation_rules.js +4 -0
- package/lib/cjs/resources/braintree_gateways.d.ts +3 -0
- package/lib/cjs/resources/braintree_gateways.js +4 -0
- package/lib/cjs/resources/braintree_payments.d.ts +3 -0
- package/lib/cjs/resources/braintree_payments.js +4 -0
- package/lib/cjs/resources/bundles.d.ts +16 -2
- package/lib/cjs/resources/bundles.js +12 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +134 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +81 -0
- package/lib/cjs/resources/captures.d.ts +9 -3
- package/lib/cjs/resources/captures.js +12 -4
- package/lib/cjs/resources/carrier_accounts.d.ts +3 -0
- package/lib/cjs/resources/carrier_accounts.js +4 -0
- package/lib/cjs/resources/checkout_com_gateways.d.ts +3 -0
- package/lib/cjs/resources/checkout_com_gateways.js +4 -0
- package/lib/cjs/resources/checkout_com_payments.d.ts +3 -0
- package/lib/cjs/resources/checkout_com_payments.js +4 -0
- package/lib/cjs/resources/cleanups.d.ts +3 -0
- package/lib/cjs/resources/cleanups.js +4 -0
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +10 -3
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +4 -0
- package/lib/cjs/resources/coupon_recipients.d.ts +3 -0
- package/lib/cjs/resources/coupon_recipients.js +4 -0
- package/lib/cjs/resources/coupons.d.ts +26 -1
- package/lib/cjs/resources/coupons.js +16 -0
- package/lib/cjs/resources/custom_promotion_rules.d.ts +61 -0
- package/lib/cjs/resources/custom_promotion_rules.js +37 -0
- package/lib/cjs/resources/customer_addresses.d.ts +5 -0
- package/lib/cjs/resources/customer_addresses.js +4 -0
- package/lib/cjs/resources/customer_groups.d.ts +3 -0
- package/lib/cjs/resources/customer_groups.js +4 -0
- package/lib/cjs/resources/customer_payment_sources.d.ts +18 -11
- package/lib/cjs/resources/customer_payment_sources.js +8 -0
- package/lib/cjs/resources/customer_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/customer_subscriptions.js +4 -0
- package/lib/cjs/resources/customers.d.ts +9 -0
- package/lib/cjs/resources/customers.js +4 -0
- package/lib/cjs/resources/delivery_lead_times.d.ts +3 -0
- package/lib/cjs/resources/delivery_lead_times.js +4 -0
- package/lib/cjs/resources/external_gateways.d.ts +3 -0
- package/lib/cjs/resources/external_gateways.js +4 -0
- package/lib/cjs/resources/external_payments.d.ts +3 -0
- package/lib/cjs/resources/external_payments.js +4 -0
- package/lib/cjs/resources/external_promotions.d.ts +45 -6
- package/lib/cjs/resources/external_promotions.js +24 -0
- package/lib/cjs/resources/external_tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/external_tax_calculators.js +4 -0
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +45 -6
- package/lib/cjs/resources/fixed_amount_promotions.js +24 -0
- package/lib/cjs/resources/fixed_price_promotions.d.ts +37 -9
- package/lib/cjs/resources/fixed_price_promotions.js +18 -2
- package/lib/cjs/resources/free_gift_promotions.d.ts +37 -9
- package/lib/cjs/resources/free_gift_promotions.js +18 -2
- package/lib/cjs/resources/free_shipping_promotions.d.ts +42 -6
- package/lib/cjs/resources/free_shipping_promotions.js +20 -0
- package/lib/cjs/resources/gift_card_recipients.d.ts +3 -0
- package/lib/cjs/resources/gift_card_recipients.js +4 -0
- package/lib/cjs/resources/gift_cards.d.ts +11 -0
- package/lib/cjs/resources/gift_cards.js +8 -0
- package/lib/cjs/resources/imports.d.ts +1 -3
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/in_stock_subscriptions.js +4 -0
- package/lib/cjs/resources/inventory_models.d.ts +12 -0
- package/lib/cjs/resources/inventory_models.js +4 -0
- package/lib/cjs/resources/inventory_return_locations.d.ts +3 -0
- package/lib/cjs/resources/inventory_return_locations.js +4 -0
- package/lib/cjs/resources/inventory_stock_locations.d.ts +3 -0
- package/lib/cjs/resources/inventory_stock_locations.js +4 -0
- package/lib/cjs/resources/klarna_gateways.d.ts +3 -0
- package/lib/cjs/resources/klarna_gateways.js +4 -0
- package/lib/cjs/resources/klarna_payments.d.ts +3 -0
- package/lib/cjs/resources/klarna_payments.js +4 -0
- package/lib/cjs/resources/line_item_options.d.ts +11 -0
- package/lib/cjs/resources/line_item_options.js +8 -0
- package/lib/cjs/resources/line_items.d.ts +30 -0
- package/lib/cjs/resources/line_items.js +16 -0
- package/lib/cjs/resources/manual_gateways.d.ts +3 -0
- package/lib/cjs/resources/manual_gateways.js +4 -0
- package/lib/cjs/resources/manual_tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/manual_tax_calculators.js +4 -0
- package/lib/cjs/resources/markets.d.ts +8 -0
- package/lib/cjs/resources/markets.js +4 -0
- package/lib/cjs/resources/merchants.d.ts +3 -0
- package/lib/cjs/resources/merchants.js +4 -0
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +13 -3
- package/lib/cjs/resources/order_amount_promotion_rules.js +4 -0
- package/lib/cjs/resources/order_subscription_items.d.ts +7 -0
- package/lib/cjs/resources/order_subscription_items.js +4 -0
- package/lib/cjs/resources/order_subscriptions.d.ts +4 -0
- package/lib/cjs/resources/order_subscriptions.js +4 -0
- package/lib/cjs/resources/order_validation_rules.d.ts +3 -0
- package/lib/cjs/resources/order_validation_rules.js +4 -0
- package/lib/cjs/resources/orders.d.ts +50 -6
- package/lib/cjs/resources/orders.js +32 -0
- package/lib/cjs/resources/organization.d.ts +4 -4
- package/lib/cjs/resources/packages.d.ts +3 -0
- package/lib/cjs/resources/packages.js +4 -0
- package/lib/cjs/resources/parcel_line_items.d.ts +4 -1
- package/lib/cjs/resources/parcel_line_items.js +4 -0
- package/lib/cjs/resources/parcels.d.ts +9 -3
- package/lib/cjs/resources/parcels.js +4 -0
- package/lib/cjs/resources/payment_gateways.d.ts +3 -0
- package/lib/cjs/resources/payment_gateways.js +4 -0
- package/lib/cjs/resources/payment_methods.d.ts +9 -1
- package/lib/cjs/resources/payment_methods.js +4 -0
- package/lib/cjs/resources/payment_options.d.ts +43 -0
- package/lib/cjs/resources/payment_options.js +41 -0
- package/lib/cjs/resources/paypal_gateways.d.ts +3 -0
- package/lib/cjs/resources/paypal_gateways.js +4 -0
- package/lib/cjs/resources/paypal_payments.d.ts +3 -0
- package/lib/cjs/resources/paypal_payments.js +4 -0
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +37 -9
- package/lib/cjs/resources/percentage_discount_promotions.js +18 -2
- package/lib/cjs/resources/price_frequency_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_frequency_tiers.js +4 -0
- package/lib/cjs/resources/price_lists.d.ts +6 -0
- package/lib/cjs/resources/price_lists.js +4 -0
- package/lib/cjs/resources/price_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_tiers.js +4 -0
- package/lib/cjs/resources/price_volume_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_volume_tiers.js +4 -0
- package/lib/cjs/resources/prices.d.ts +4 -1
- package/lib/cjs/resources/prices.js +4 -0
- package/lib/cjs/resources/promotion_rules.d.ts +5 -1
- package/lib/cjs/resources/promotion_rules.js +4 -0
- package/lib/cjs/resources/promotions.d.ts +18 -0
- package/lib/cjs/resources/promotions.js +20 -0
- package/lib/cjs/resources/refunds.d.ts +9 -3
- package/lib/cjs/resources/refunds.js +10 -2
- package/lib/cjs/resources/reserved_stocks.d.ts +27 -0
- package/lib/cjs/resources/reserved_stocks.js +36 -0
- package/lib/cjs/resources/return_line_items.d.ts +2 -1
- package/lib/cjs/resources/returns.d.ts +11 -0
- package/lib/cjs/resources/returns.js +8 -0
- package/lib/cjs/resources/satispay_gateways.d.ts +6 -0
- package/lib/cjs/resources/satispay_gateways.js +4 -0
- package/lib/cjs/resources/satispay_payments.d.ts +11 -3
- package/lib/cjs/resources/satispay_payments.js +4 -0
- package/lib/cjs/resources/shipments.d.ts +49 -2
- package/lib/cjs/resources/shipments.js +18 -0
- package/lib/cjs/resources/shipping_categories.d.ts +6 -0
- package/lib/cjs/resources/shipping_categories.js +4 -0
- package/lib/cjs/resources/shipping_method_tiers.d.ts +3 -0
- package/lib/cjs/resources/shipping_method_tiers.js +4 -0
- package/lib/cjs/resources/shipping_methods.d.ts +11 -0
- package/lib/cjs/resources/shipping_methods.js +4 -0
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +3 -0
- package/lib/cjs/resources/shipping_weight_tiers.js +4 -0
- package/lib/cjs/resources/shipping_zones.d.ts +3 -0
- package/lib/cjs/resources/shipping_zones.js +4 -0
- package/lib/cjs/resources/sku_list_items.d.ts +3 -0
- package/lib/cjs/resources/sku_list_items.js +4 -0
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +10 -3
- package/lib/cjs/resources/sku_list_promotion_rules.js +4 -0
- package/lib/cjs/resources/sku_lists.d.ts +3 -0
- package/lib/cjs/resources/sku_lists.js +4 -0
- package/lib/cjs/resources/sku_options.d.ts +14 -0
- package/lib/cjs/resources/sku_options.js +12 -0
- package/lib/cjs/resources/skus.d.ts +17 -0
- package/lib/cjs/resources/skus.js +16 -0
- package/lib/cjs/resources/stock_items.d.ts +9 -0
- package/lib/cjs/resources/stock_items.js +12 -0
- package/lib/cjs/resources/stock_line_items.d.ts +42 -2
- package/lib/cjs/resources/stock_line_items.js +17 -0
- package/lib/cjs/resources/stock_locations.d.ts +6 -0
- package/lib/cjs/resources/stock_locations.js +4 -0
- package/lib/cjs/resources/stock_reservations.d.ts +49 -0
- package/lib/cjs/resources/stock_reservations.js +53 -0
- package/lib/cjs/resources/stock_transfers.d.ts +5 -0
- package/lib/cjs/resources/stock_transfers.js +4 -0
- package/lib/cjs/resources/stripe_gateways.d.ts +3 -0
- package/lib/cjs/resources/stripe_gateways.js +4 -0
- package/lib/cjs/resources/stripe_payments.d.ts +12 -0
- package/lib/cjs/resources/stripe_payments.js +4 -0
- package/lib/cjs/resources/tags.d.ts +27 -0
- package/lib/cjs/resources/tags.js +33 -0
- package/lib/cjs/resources/tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/tax_calculators.js +4 -0
- package/lib/cjs/resources/tax_categories.d.ts +3 -0
- package/lib/cjs/resources/tax_categories.js +4 -0
- package/lib/cjs/resources/tax_rules.d.ts +3 -0
- package/lib/cjs/resources/tax_rules.js +4 -0
- package/lib/cjs/resources/taxjar_accounts.d.ts +3 -0
- package/lib/cjs/resources/taxjar_accounts.js +4 -0
- package/lib/cjs/resources/transactions.d.ts +9 -0
- package/lib/cjs/resources/transactions.js +12 -0
- package/lib/cjs/resources/versions.d.ts +22 -0
- package/lib/cjs/resources/versions.js +24 -0
- package/lib/cjs/resources/voids.d.ts +9 -3
- package/lib/cjs/resources/voids.js +10 -2
- package/lib/cjs/resources/webhooks.d.ts +8 -0
- package/lib/cjs/resources/webhooks.js +4 -0
- package/lib/cjs/resources/wire_transfers.d.ts +3 -0
- package/lib/cjs/resources/wire_transfers.js +4 -0
- package/lib/cjs/util.d.ts +1 -0
- package/lib/esm/api.d.ts +10 -3
- package/lib/esm/api.js +15 -1
- package/lib/esm/commercelayer.d.ts +9 -2
- package/lib/esm/commercelayer.js +8 -1
- package/lib/esm/model.d.ts +10 -3
- package/lib/esm/resource.d.ts +7 -9
- package/lib/esm/resources/addresses.d.ts +14 -0
- package/lib/esm/resources/addresses.js +12 -0
- package/lib/esm/resources/adjustments.d.ts +3 -0
- package/lib/esm/resources/adjustments.js +4 -0
- package/lib/esm/resources/adyen_gateways.d.ts +5 -2
- package/lib/esm/resources/adyen_gateways.js +4 -0
- package/lib/esm/resources/adyen_payments.d.ts +3 -0
- package/lib/esm/resources/adyen_payments.js +4 -0
- package/lib/esm/resources/authorizations.d.ts +9 -3
- package/lib/esm/resources/authorizations.js +12 -4
- package/lib/esm/resources/avalara_accounts.d.ts +9 -6
- package/lib/esm/resources/avalara_accounts.js +4 -0
- package/lib/esm/resources/axerve_gateways.d.ts +4 -0
- package/lib/esm/resources/axerve_gateways.js +4 -0
- package/lib/esm/resources/axerve_payments.d.ts +9 -0
- package/lib/esm/resources/axerve_payments.js +4 -0
- package/lib/esm/resources/billing_info_validation_rules.d.ts +3 -0
- package/lib/esm/resources/billing_info_validation_rules.js +4 -0
- package/lib/esm/resources/braintree_gateways.d.ts +3 -0
- package/lib/esm/resources/braintree_gateways.js +4 -0
- package/lib/esm/resources/braintree_payments.d.ts +3 -0
- package/lib/esm/resources/braintree_payments.js +4 -0
- package/lib/esm/resources/bundles.d.ts +16 -2
- package/lib/esm/resources/bundles.js +12 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +134 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.js +79 -0
- package/lib/esm/resources/captures.d.ts +9 -3
- package/lib/esm/resources/captures.js +12 -4
- package/lib/esm/resources/carrier_accounts.d.ts +3 -0
- package/lib/esm/resources/carrier_accounts.js +4 -0
- package/lib/esm/resources/checkout_com_gateways.d.ts +3 -0
- package/lib/esm/resources/checkout_com_gateways.js +4 -0
- package/lib/esm/resources/checkout_com_payments.d.ts +3 -0
- package/lib/esm/resources/checkout_com_payments.js +4 -0
- package/lib/esm/resources/cleanups.d.ts +3 -0
- package/lib/esm/resources/cleanups.js +4 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +10 -3
- package/lib/esm/resources/coupon_codes_promotion_rules.js +4 -0
- package/lib/esm/resources/coupon_recipients.d.ts +3 -0
- package/lib/esm/resources/coupon_recipients.js +4 -0
- package/lib/esm/resources/coupons.d.ts +26 -1
- package/lib/esm/resources/coupons.js +16 -0
- package/lib/esm/resources/custom_promotion_rules.d.ts +61 -0
- package/lib/esm/resources/custom_promotion_rules.js +35 -0
- package/lib/esm/resources/customer_addresses.d.ts +5 -0
- package/lib/esm/resources/customer_addresses.js +4 -0
- package/lib/esm/resources/customer_groups.d.ts +3 -0
- package/lib/esm/resources/customer_groups.js +4 -0
- package/lib/esm/resources/customer_payment_sources.d.ts +18 -11
- package/lib/esm/resources/customer_payment_sources.js +8 -0
- package/lib/esm/resources/customer_subscriptions.d.ts +3 -0
- package/lib/esm/resources/customer_subscriptions.js +4 -0
- package/lib/esm/resources/customers.d.ts +9 -0
- package/lib/esm/resources/customers.js +4 -0
- package/lib/esm/resources/delivery_lead_times.d.ts +3 -0
- package/lib/esm/resources/delivery_lead_times.js +4 -0
- package/lib/esm/resources/external_gateways.d.ts +3 -0
- package/lib/esm/resources/external_gateways.js +4 -0
- package/lib/esm/resources/external_payments.d.ts +3 -0
- package/lib/esm/resources/external_payments.js +4 -0
- package/lib/esm/resources/external_promotions.d.ts +45 -6
- package/lib/esm/resources/external_promotions.js +24 -0
- package/lib/esm/resources/external_tax_calculators.d.ts +3 -0
- package/lib/esm/resources/external_tax_calculators.js +4 -0
- package/lib/esm/resources/fixed_amount_promotions.d.ts +45 -6
- package/lib/esm/resources/fixed_amount_promotions.js +24 -0
- package/lib/esm/resources/fixed_price_promotions.d.ts +37 -9
- package/lib/esm/resources/fixed_price_promotions.js +18 -2
- package/lib/esm/resources/free_gift_promotions.d.ts +37 -9
- package/lib/esm/resources/free_gift_promotions.js +18 -2
- package/lib/esm/resources/free_shipping_promotions.d.ts +42 -6
- package/lib/esm/resources/free_shipping_promotions.js +20 -0
- package/lib/esm/resources/gift_card_recipients.d.ts +3 -0
- package/lib/esm/resources/gift_card_recipients.js +4 -0
- package/lib/esm/resources/gift_cards.d.ts +11 -0
- package/lib/esm/resources/gift_cards.js +8 -0
- package/lib/esm/resources/imports.d.ts +1 -3
- package/lib/esm/resources/in_stock_subscriptions.d.ts +3 -0
- package/lib/esm/resources/in_stock_subscriptions.js +4 -0
- package/lib/esm/resources/inventory_models.d.ts +12 -0
- package/lib/esm/resources/inventory_models.js +4 -0
- package/lib/esm/resources/inventory_return_locations.d.ts +3 -0
- package/lib/esm/resources/inventory_return_locations.js +4 -0
- package/lib/esm/resources/inventory_stock_locations.d.ts +3 -0
- package/lib/esm/resources/inventory_stock_locations.js +4 -0
- package/lib/esm/resources/klarna_gateways.d.ts +3 -0
- package/lib/esm/resources/klarna_gateways.js +4 -0
- package/lib/esm/resources/klarna_payments.d.ts +3 -0
- package/lib/esm/resources/klarna_payments.js +4 -0
- package/lib/esm/resources/line_item_options.d.ts +11 -0
- package/lib/esm/resources/line_item_options.js +8 -0
- package/lib/esm/resources/line_items.d.ts +30 -0
- package/lib/esm/resources/line_items.js +16 -0
- package/lib/esm/resources/manual_gateways.d.ts +3 -0
- package/lib/esm/resources/manual_gateways.js +4 -0
- package/lib/esm/resources/manual_tax_calculators.d.ts +3 -0
- package/lib/esm/resources/manual_tax_calculators.js +4 -0
- package/lib/esm/resources/markets.d.ts +8 -0
- package/lib/esm/resources/markets.js +4 -0
- package/lib/esm/resources/merchants.d.ts +3 -0
- package/lib/esm/resources/merchants.js +4 -0
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +13 -3
- package/lib/esm/resources/order_amount_promotion_rules.js +4 -0
- package/lib/esm/resources/order_subscription_items.d.ts +7 -0
- package/lib/esm/resources/order_subscription_items.js +4 -0
- package/lib/esm/resources/order_subscriptions.d.ts +4 -0
- package/lib/esm/resources/order_subscriptions.js +4 -0
- package/lib/esm/resources/order_validation_rules.d.ts +3 -0
- package/lib/esm/resources/order_validation_rules.js +4 -0
- package/lib/esm/resources/orders.d.ts +50 -6
- package/lib/esm/resources/orders.js +32 -0
- package/lib/esm/resources/organization.d.ts +4 -4
- package/lib/esm/resources/packages.d.ts +3 -0
- package/lib/esm/resources/packages.js +4 -0
- package/lib/esm/resources/parcel_line_items.d.ts +4 -1
- package/lib/esm/resources/parcel_line_items.js +4 -0
- package/lib/esm/resources/parcels.d.ts +9 -3
- package/lib/esm/resources/parcels.js +4 -0
- package/lib/esm/resources/payment_gateways.d.ts +3 -0
- package/lib/esm/resources/payment_gateways.js +4 -0
- package/lib/esm/resources/payment_methods.d.ts +9 -1
- package/lib/esm/resources/payment_methods.js +4 -0
- package/lib/esm/resources/payment_options.d.ts +43 -0
- package/lib/esm/resources/payment_options.js +39 -0
- package/lib/esm/resources/paypal_gateways.d.ts +3 -0
- package/lib/esm/resources/paypal_gateways.js +4 -0
- package/lib/esm/resources/paypal_payments.d.ts +3 -0
- package/lib/esm/resources/paypal_payments.js +4 -0
- package/lib/esm/resources/percentage_discount_promotions.d.ts +37 -9
- package/lib/esm/resources/percentage_discount_promotions.js +18 -2
- package/lib/esm/resources/price_frequency_tiers.d.ts +3 -0
- package/lib/esm/resources/price_frequency_tiers.js +4 -0
- package/lib/esm/resources/price_lists.d.ts +6 -0
- package/lib/esm/resources/price_lists.js +4 -0
- package/lib/esm/resources/price_tiers.d.ts +3 -0
- package/lib/esm/resources/price_tiers.js +4 -0
- package/lib/esm/resources/price_volume_tiers.d.ts +3 -0
- package/lib/esm/resources/price_volume_tiers.js +4 -0
- package/lib/esm/resources/prices.d.ts +4 -1
- package/lib/esm/resources/prices.js +4 -0
- package/lib/esm/resources/promotion_rules.d.ts +5 -1
- package/lib/esm/resources/promotion_rules.js +4 -0
- package/lib/esm/resources/promotions.d.ts +18 -0
- package/lib/esm/resources/promotions.js +20 -0
- package/lib/esm/resources/refunds.d.ts +9 -3
- package/lib/esm/resources/refunds.js +10 -2
- package/lib/esm/resources/reserved_stocks.d.ts +27 -0
- package/lib/esm/resources/reserved_stocks.js +34 -0
- package/lib/esm/resources/return_line_items.d.ts +2 -1
- package/lib/esm/resources/returns.d.ts +11 -0
- package/lib/esm/resources/returns.js +8 -0
- package/lib/esm/resources/satispay_gateways.d.ts +6 -0
- package/lib/esm/resources/satispay_gateways.js +4 -0
- package/lib/esm/resources/satispay_payments.d.ts +11 -3
- package/lib/esm/resources/satispay_payments.js +4 -0
- package/lib/esm/resources/shipments.d.ts +49 -2
- package/lib/esm/resources/shipments.js +18 -0
- package/lib/esm/resources/shipping_categories.d.ts +6 -0
- package/lib/esm/resources/shipping_categories.js +4 -0
- package/lib/esm/resources/shipping_method_tiers.d.ts +3 -0
- package/lib/esm/resources/shipping_method_tiers.js +4 -0
- package/lib/esm/resources/shipping_methods.d.ts +11 -0
- package/lib/esm/resources/shipping_methods.js +4 -0
- package/lib/esm/resources/shipping_weight_tiers.d.ts +3 -0
- package/lib/esm/resources/shipping_weight_tiers.js +4 -0
- package/lib/esm/resources/shipping_zones.d.ts +3 -0
- package/lib/esm/resources/shipping_zones.js +4 -0
- package/lib/esm/resources/sku_list_items.d.ts +3 -0
- package/lib/esm/resources/sku_list_items.js +4 -0
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +10 -3
- package/lib/esm/resources/sku_list_promotion_rules.js +4 -0
- package/lib/esm/resources/sku_lists.d.ts +3 -0
- package/lib/esm/resources/sku_lists.js +4 -0
- package/lib/esm/resources/sku_options.d.ts +14 -0
- package/lib/esm/resources/sku_options.js +12 -0
- package/lib/esm/resources/skus.d.ts +17 -0
- package/lib/esm/resources/skus.js +16 -0
- package/lib/esm/resources/stock_items.d.ts +9 -0
- package/lib/esm/resources/stock_items.js +12 -0
- package/lib/esm/resources/stock_line_items.d.ts +42 -2
- package/lib/esm/resources/stock_line_items.js +17 -0
- package/lib/esm/resources/stock_locations.d.ts +6 -0
- package/lib/esm/resources/stock_locations.js +4 -0
- package/lib/esm/resources/stock_reservations.d.ts +49 -0
- package/lib/esm/resources/stock_reservations.js +51 -0
- package/lib/esm/resources/stock_transfers.d.ts +5 -0
- package/lib/esm/resources/stock_transfers.js +4 -0
- package/lib/esm/resources/stripe_gateways.d.ts +3 -0
- package/lib/esm/resources/stripe_gateways.js +4 -0
- package/lib/esm/resources/stripe_payments.d.ts +12 -0
- package/lib/esm/resources/stripe_payments.js +4 -0
- package/lib/esm/resources/tags.d.ts +27 -0
- package/lib/esm/resources/tags.js +31 -0
- package/lib/esm/resources/tax_calculators.d.ts +3 -0
- package/lib/esm/resources/tax_calculators.js +4 -0
- package/lib/esm/resources/tax_categories.d.ts +3 -0
- package/lib/esm/resources/tax_categories.js +4 -0
- package/lib/esm/resources/tax_rules.d.ts +3 -0
- package/lib/esm/resources/tax_rules.js +4 -0
- package/lib/esm/resources/taxjar_accounts.d.ts +3 -0
- package/lib/esm/resources/taxjar_accounts.js +4 -0
- package/lib/esm/resources/transactions.d.ts +9 -0
- package/lib/esm/resources/transactions.js +12 -0
- package/lib/esm/resources/versions.d.ts +22 -0
- package/lib/esm/resources/versions.js +22 -0
- package/lib/esm/resources/voids.d.ts +9 -3
- package/lib/esm/resources/voids.js +10 -2
- package/lib/esm/resources/webhooks.d.ts +8 -0
- package/lib/esm/resources/webhooks.js +4 -0
- package/lib/esm/resources/wire_transfers.d.ts +3 -0
- package/lib/esm/resources/wire_transfers.js +4 -0
- package/lib/esm/util.d.ts +1 -0
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -25
- package/lib/cjs/micro.d.ts +0 -4
- package/lib/cjs/micro.js +0 -13
- package/lib/esm/micro.d.ts +0 -4
- package/lib/esm/micro.js +0 -7
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order } from './orders';
|
4
4
|
import type { PaymentGateway } from './payment_gateways';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type AdyenPaymentRel = ResourceRel & {
|
6
7
|
type: typeof AdyenPayments.TYPE;
|
7
8
|
};
|
@@ -18,6 +19,7 @@ interface AdyenPayment extends Resource {
|
|
18
19
|
payment_instrument?: object;
|
19
20
|
order?: Order;
|
20
21
|
payment_gateway?: PaymentGateway;
|
22
|
+
versions?: Version[];
|
21
23
|
}
|
22
24
|
interface AdyenPaymentCreate extends ResourceCreate {
|
23
25
|
order: OrderRel;
|
@@ -38,6 +40,7 @@ declare class AdyenPayments extends ApiResource {
|
|
38
40
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
39
41
|
order(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
40
42
|
payment_gateway(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
43
|
+
versions(adyenPaymentId: string | AdyenPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
41
44
|
isAdyenPayment(resource: any): resource is AdyenPayment;
|
42
45
|
relationship(id: string | ResourceId | null): AdyenPaymentRel;
|
43
46
|
type(): string;
|
@@ -26,6 +26,10 @@ class AdyenPayments extends resource_1.ApiResource {
|
|
26
26
|
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
27
27
|
return this.resources.fetch({ type: 'payment_gateways' }, `adyen_payments/${_adyenPaymentId}/payment_gateway`, params, options);
|
28
28
|
}
|
29
|
+
async versions(adyenPaymentId, params, options) {
|
30
|
+
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
31
|
+
return this.resources.fetch({ type: 'versions' }, `adyen_payments/${_adyenPaymentId}/versions`, params, options);
|
32
|
+
}
|
29
33
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
30
34
|
isAdyenPayment(resource) {
|
31
35
|
return resource.type && (resource.type === AdyenPayments.TYPE);
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order } from './orders';
|
4
|
+
import type { Attachment } from './attachments';
|
5
|
+
import type { Event } from './events';
|
6
|
+
import type { Version } from './versions';
|
4
7
|
import type { Capture } from './captures';
|
5
8
|
import type { Void } from './voids';
|
6
|
-
import type { Event } from './events';
|
7
9
|
type AuthorizationRel = ResourceRel & {
|
8
10
|
type: typeof Authorizations.TYPE;
|
9
11
|
};
|
@@ -34,9 +36,11 @@ interface Authorization extends Resource {
|
|
34
36
|
void_balance_float?: number;
|
35
37
|
formatted_void_balance?: string;
|
36
38
|
order?: Order;
|
39
|
+
attachments?: Attachment[];
|
40
|
+
events?: Event[];
|
41
|
+
versions?: Version[];
|
37
42
|
captures?: Capture[];
|
38
43
|
voids?: Void[];
|
39
|
-
events?: Event[];
|
40
44
|
}
|
41
45
|
interface AuthorizationUpdate extends ResourceUpdate {
|
42
46
|
_capture?: boolean;
|
@@ -49,9 +53,11 @@ declare class Authorizations extends ApiResource {
|
|
49
53
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
50
54
|
update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
51
55
|
order(authorizationId: string | Authorization, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
56
|
+
attachments(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
57
|
+
events(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
58
|
+
versions(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
52
59
|
captures(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
|
53
60
|
voids(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
|
54
|
-
events(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
55
61
|
isAuthorization(resource: any): resource is Authorization;
|
56
62
|
relationship(id: string | ResourceId | null): AuthorizationRel;
|
57
63
|
type(): string;
|
@@ -16,6 +16,18 @@ class Authorizations extends resource_1.ApiResource {
|
|
16
16
|
const _authorizationId = authorizationId.id || authorizationId;
|
17
17
|
return this.resources.fetch({ type: 'orders' }, `authorizations/${_authorizationId}/order`, params, options);
|
18
18
|
}
|
19
|
+
async attachments(authorizationId, params, options) {
|
20
|
+
const _authorizationId = authorizationId.id || authorizationId;
|
21
|
+
return this.resources.fetch({ type: 'attachments' }, `authorizations/${_authorizationId}/attachments`, params, options);
|
22
|
+
}
|
23
|
+
async events(authorizationId, params, options) {
|
24
|
+
const _authorizationId = authorizationId.id || authorizationId;
|
25
|
+
return this.resources.fetch({ type: 'events' }, `authorizations/${_authorizationId}/events`, params, options);
|
26
|
+
}
|
27
|
+
async versions(authorizationId, params, options) {
|
28
|
+
const _authorizationId = authorizationId.id || authorizationId;
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `authorizations/${_authorizationId}/versions`, params, options);
|
30
|
+
}
|
19
31
|
async captures(authorizationId, params, options) {
|
20
32
|
const _authorizationId = authorizationId.id || authorizationId;
|
21
33
|
return this.resources.fetch({ type: 'captures' }, `authorizations/${_authorizationId}/captures`, params, options);
|
@@ -24,10 +36,6 @@ class Authorizations extends resource_1.ApiResource {
|
|
24
36
|
const _authorizationId = authorizationId.id || authorizationId;
|
25
37
|
return this.resources.fetch({ type: 'voids' }, `authorizations/${_authorizationId}/voids`, params, options);
|
26
38
|
}
|
27
|
-
async events(authorizationId, params, options) {
|
28
|
-
const _authorizationId = authorizationId.id || authorizationId;
|
29
|
-
return this.resources.fetch({ type: 'events' }, `authorizations/${_authorizationId}/events`, params, options);
|
30
|
-
}
|
31
39
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
32
40
|
isAuthorization(resource) {
|
33
41
|
return resource.type && (resource.type === Authorizations.TYPE);
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Market } from './markets';
|
4
4
|
import type { Attachment } from './attachments';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
import type { TaxCategory } from './tax_categories';
|
6
7
|
type AvalaraAccountRel = ResourceRel & {
|
7
8
|
type: typeof AvalaraAccounts.TYPE;
|
@@ -13,10 +14,11 @@ interface AvalaraAccount extends Resource {
|
|
13
14
|
name?: string;
|
14
15
|
username?: string;
|
15
16
|
company_code?: string;
|
16
|
-
commit_invoice?:
|
17
|
-
ddp?:
|
17
|
+
commit_invoice?: boolean;
|
18
|
+
ddp?: boolean;
|
18
19
|
markets?: Market[];
|
19
20
|
attachments?: Attachment[];
|
21
|
+
versions?: Version[];
|
20
22
|
tax_categories?: TaxCategory[];
|
21
23
|
}
|
22
24
|
interface AvalaraAccountCreate extends ResourceCreate {
|
@@ -24,8 +26,8 @@ interface AvalaraAccountCreate extends ResourceCreate {
|
|
24
26
|
username: string;
|
25
27
|
password: string;
|
26
28
|
company_code: string;
|
27
|
-
commit_invoice?:
|
28
|
-
ddp?:
|
29
|
+
commit_invoice?: boolean;
|
30
|
+
ddp?: boolean;
|
29
31
|
tax_categories?: TaxCategoryRel[];
|
30
32
|
}
|
31
33
|
interface AvalaraAccountUpdate extends ResourceUpdate {
|
@@ -33,8 +35,8 @@ interface AvalaraAccountUpdate extends ResourceUpdate {
|
|
33
35
|
username?: string;
|
34
36
|
password?: string;
|
35
37
|
company_code?: string;
|
36
|
-
commit_invoice?:
|
37
|
-
ddp?:
|
38
|
+
commit_invoice?: boolean;
|
39
|
+
ddp?: boolean;
|
38
40
|
tax_categories?: TaxCategoryRel[];
|
39
41
|
}
|
40
42
|
declare class AvalaraAccounts extends ApiResource {
|
@@ -46,6 +48,7 @@ declare class AvalaraAccounts extends ApiResource {
|
|
46
48
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
47
49
|
markets(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
48
50
|
attachments(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
51
|
+
versions(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
49
52
|
tax_categories(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
50
53
|
isAvalaraAccount(resource: any): resource is AvalaraAccount;
|
51
54
|
relationship(id: string | ResourceId | null): AvalaraAccountRel;
|
@@ -26,6 +26,10 @@ class AvalaraAccounts extends resource_1.ApiResource {
|
|
26
26
|
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
27
27
|
return this.resources.fetch({ type: 'attachments' }, `avalara_accounts/${_avalaraAccountId}/attachments`, params, options);
|
28
28
|
}
|
29
|
+
async versions(avalaraAccountId, params, options) {
|
30
|
+
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
31
|
+
return this.resources.fetch({ type: 'versions' }, `avalara_accounts/${_avalaraAccountId}/versions`, params, options);
|
32
|
+
}
|
29
33
|
async tax_categories(avalaraAccountId, params, options) {
|
30
34
|
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
31
35
|
return this.resources.fetch({ type: 'tax_categories' }, `avalara_accounts/${_avalaraAccountId}/tax_categories`, params, options);
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { PaymentMethod } from './payment_methods';
|
4
|
+
import type { Version } from './versions';
|
4
5
|
import type { AxervePayment } from './axerve_payments';
|
5
6
|
type AxerveGatewayRel = ResourceRel & {
|
6
7
|
type: typeof AxerveGateways.TYPE;
|
@@ -11,7 +12,9 @@ type AxervePaymentRel = ResourceRel & {
|
|
11
12
|
interface AxerveGateway extends Resource {
|
12
13
|
name?: string;
|
13
14
|
login?: string;
|
15
|
+
webhook_endpoint_url?: string;
|
14
16
|
payment_methods?: PaymentMethod[];
|
17
|
+
versions?: Version[];
|
15
18
|
axerve_payments?: AxervePayment[];
|
16
19
|
}
|
17
20
|
interface AxerveGatewayCreate extends ResourceCreate {
|
@@ -34,6 +37,7 @@ declare class AxerveGateways extends ApiResource {
|
|
34
37
|
update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxerveGateway>;
|
35
38
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
36
39
|
payment_methods(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
40
|
+
versions(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
37
41
|
axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>>;
|
38
42
|
isAxerveGateway(resource: any): resource is AxerveGateway;
|
39
43
|
relationship(id: string | ResourceId | null): AxerveGatewayRel;
|
@@ -22,6 +22,10 @@ class AxerveGateways extends resource_1.ApiResource {
|
|
22
22
|
const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId;
|
23
23
|
return this.resources.fetch({ type: 'payment_methods' }, `axerve_gateways/${_axerveGatewayId}/payment_methods`, params, options);
|
24
24
|
}
|
25
|
+
async versions(axerveGatewayId, params, options) {
|
26
|
+
const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId;
|
27
|
+
return this.resources.fetch({ type: 'versions' }, `axerve_gateways/${_axerveGatewayId}/versions`, params, options);
|
28
|
+
}
|
25
29
|
async axerve_payments(axerveGatewayId, params, options) {
|
26
30
|
const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId;
|
27
31
|
return this.resources.fetch({ type: 'axerve_payments' }, `axerve_gateways/${_axerveGatewayId}/axerve_payments`, params, options);
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order } from './orders';
|
4
4
|
import type { PaymentGateway } from './payment_gateways';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type AxervePaymentRel = ResourceRel & {
|
6
7
|
type: typeof AxervePayments.TYPE;
|
7
8
|
};
|
@@ -12,6 +13,9 @@ interface AxervePayment extends Resource {
|
|
12
13
|
login?: string;
|
13
14
|
return_url?: string;
|
14
15
|
payment_request_data?: object;
|
16
|
+
client_ip?: string;
|
17
|
+
buyer_details?: object;
|
18
|
+
request_token?: boolean;
|
15
19
|
mismatched_amounts?: boolean;
|
16
20
|
intent_amount_cents?: number;
|
17
21
|
intent_amount_float?: number;
|
@@ -19,9 +23,13 @@ interface AxervePayment extends Resource {
|
|
19
23
|
payment_instrument?: object;
|
20
24
|
order?: Order;
|
21
25
|
payment_gateway?: PaymentGateway;
|
26
|
+
versions?: Version[];
|
22
27
|
}
|
23
28
|
interface AxervePaymentCreate extends ResourceCreate {
|
24
29
|
return_url: string;
|
30
|
+
client_ip?: string;
|
31
|
+
buyer_details?: object;
|
32
|
+
request_token?: boolean;
|
25
33
|
order: OrderRel;
|
26
34
|
}
|
27
35
|
interface AxervePaymentUpdate extends ResourceUpdate {
|
@@ -38,6 +46,7 @@ declare class AxervePayments extends ApiResource {
|
|
38
46
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
39
47
|
order(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
40
48
|
payment_gateway(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
49
|
+
versions(axervePaymentId: string | AxervePayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
41
50
|
isAxervePayment(resource: any): resource is AxervePayment;
|
42
51
|
relationship(id: string | ResourceId | null): AxervePaymentRel;
|
43
52
|
type(): string;
|
@@ -26,6 +26,10 @@ class AxervePayments extends resource_1.ApiResource {
|
|
26
26
|
const _axervePaymentId = axervePaymentId.id || axervePaymentId;
|
27
27
|
return this.resources.fetch({ type: 'payment_gateways' }, `axerve_payments/${_axervePaymentId}/payment_gateway`, params, options);
|
28
28
|
}
|
29
|
+
async versions(axervePaymentId, params, options) {
|
30
|
+
const _axervePaymentId = axervePaymentId.id || axervePaymentId;
|
31
|
+
return this.resources.fetch({ type: 'versions' }, `axerve_payments/${_axervePaymentId}/versions`, params, options);
|
32
|
+
}
|
29
33
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
30
34
|
isAxervePayment(resource) {
|
31
35
|
return resource.type && (resource.type === AxervePayments.TYPE);
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Market } from './markets';
|
4
4
|
import type { Attachment } from './attachments';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type BillingInfoValidationRuleRel = ResourceRel & {
|
6
7
|
type: typeof BillingInfoValidationRules.TYPE;
|
7
8
|
};
|
@@ -11,6 +12,7 @@ type MarketRel = ResourceRel & {
|
|
11
12
|
interface BillingInfoValidationRule extends Resource {
|
12
13
|
market?: Market;
|
13
14
|
attachments?: Attachment[];
|
15
|
+
versions?: Version[];
|
14
16
|
}
|
15
17
|
interface BillingInfoValidationRuleCreate extends ResourceCreate {
|
16
18
|
market: MarketRel;
|
@@ -27,6 +29,7 @@ declare class BillingInfoValidationRules extends ApiResource {
|
|
27
29
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
28
30
|
market(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
29
31
|
attachments(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
32
|
+
versions(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
30
33
|
isBillingInfoValidationRule(resource: any): resource is BillingInfoValidationRule;
|
31
34
|
relationship(id: string | ResourceId | null): BillingInfoValidationRuleRel;
|
32
35
|
type(): string;
|
@@ -26,6 +26,10 @@ class BillingInfoValidationRules extends resource_1.ApiResource {
|
|
26
26
|
const _billingInfoValidationRuleId = billingInfoValidationRuleId.id || billingInfoValidationRuleId;
|
27
27
|
return this.resources.fetch({ type: 'attachments' }, `billing_info_validation_rules/${_billingInfoValidationRuleId}/attachments`, params, options);
|
28
28
|
}
|
29
|
+
async versions(billingInfoValidationRuleId, params, options) {
|
30
|
+
const _billingInfoValidationRuleId = billingInfoValidationRuleId.id || billingInfoValidationRuleId;
|
31
|
+
return this.resources.fetch({ type: 'versions' }, `billing_info_validation_rules/${_billingInfoValidationRuleId}/versions`, params, options);
|
32
|
+
}
|
29
33
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
30
34
|
isBillingInfoValidationRule(resource) {
|
31
35
|
return resource.type && (resource.type === BillingInfoValidationRules.TYPE);
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { PaymentMethod } from './payment_methods';
|
4
|
+
import type { Version } from './versions';
|
4
5
|
import type { BraintreePayment } from './braintree_payments';
|
5
6
|
type BraintreeGatewayRel = ResourceRel & {
|
6
7
|
type: typeof BraintreeGateways.TYPE;
|
@@ -15,6 +16,7 @@ interface BraintreeGateway extends Resource {
|
|
15
16
|
descriptor_url?: string;
|
16
17
|
webhook_endpoint_url?: string;
|
17
18
|
payment_methods?: PaymentMethod[];
|
19
|
+
versions?: Version[];
|
18
20
|
braintree_payments?: BraintreePayment[];
|
19
21
|
}
|
20
22
|
interface BraintreeGatewayCreate extends ResourceCreate {
|
@@ -47,6 +49,7 @@ declare class BraintreeGateways extends ApiResource {
|
|
47
49
|
update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
|
48
50
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
49
51
|
payment_methods(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
52
|
+
versions(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
50
53
|
braintree_payments(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>>;
|
51
54
|
isBraintreeGateway(resource: any): resource is BraintreeGateway;
|
52
55
|
relationship(id: string | ResourceId | null): BraintreeGatewayRel;
|
@@ -22,6 +22,10 @@ class BraintreeGateways extends resource_1.ApiResource {
|
|
22
22
|
const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
|
23
23
|
return this.resources.fetch({ type: 'payment_methods' }, `braintree_gateways/${_braintreeGatewayId}/payment_methods`, params, options);
|
24
24
|
}
|
25
|
+
async versions(braintreeGatewayId, params, options) {
|
26
|
+
const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
|
27
|
+
return this.resources.fetch({ type: 'versions' }, `braintree_gateways/${_braintreeGatewayId}/versions`, params, options);
|
28
|
+
}
|
25
29
|
async braintree_payments(braintreeGatewayId, params, options) {
|
26
30
|
const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
|
27
31
|
return this.resources.fetch({ type: 'braintree_payments' }, `braintree_gateways/${_braintreeGatewayId}/braintree_payments`, params, options);
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order } from './orders';
|
4
4
|
import type { PaymentGateway } from './payment_gateways';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type BraintreePaymentRel = ResourceRel & {
|
6
7
|
type: typeof BraintreePayments.TYPE;
|
7
8
|
};
|
@@ -17,6 +18,7 @@ interface BraintreePayment extends Resource {
|
|
17
18
|
payment_instrument?: object;
|
18
19
|
order?: Order;
|
19
20
|
payment_gateway?: PaymentGateway;
|
21
|
+
versions?: Version[];
|
20
22
|
}
|
21
23
|
interface BraintreePaymentCreate extends ResourceCreate {
|
22
24
|
payment_id?: string;
|
@@ -40,6 +42,7 @@ declare class BraintreePayments extends ApiResource {
|
|
40
42
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
41
43
|
order(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
42
44
|
payment_gateway(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
45
|
+
versions(braintreePaymentId: string | BraintreePayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
43
46
|
isBraintreePayment(resource: any): resource is BraintreePayment;
|
44
47
|
relationship(id: string | ResourceId | null): BraintreePaymentRel;
|
45
48
|
type(): string;
|
@@ -26,6 +26,10 @@ class BraintreePayments extends resource_1.ApiResource {
|
|
26
26
|
const _braintreePaymentId = braintreePaymentId.id || braintreePaymentId;
|
27
27
|
return this.resources.fetch({ type: 'payment_gateways' }, `braintree_payments/${_braintreePaymentId}/payment_gateway`, params, options);
|
28
28
|
}
|
29
|
+
async versions(braintreePaymentId, params, options) {
|
30
|
+
const _braintreePaymentId = braintreePaymentId.id || braintreePaymentId;
|
31
|
+
return this.resources.fetch({ type: 'versions' }, `braintree_payments/${_braintreePaymentId}/versions`, params, options);
|
32
|
+
}
|
29
33
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
30
34
|
isBraintreePayment(resource) {
|
31
35
|
return resource.type && (resource.type === BraintreePayments.TYPE);
|
@@ -4,6 +4,9 @@ import type { Market } from './markets';
|
|
4
4
|
import type { SkuList } from './sku_lists';
|
5
5
|
import type { Sku } from './skus';
|
6
6
|
import type { Attachment } from './attachments';
|
7
|
+
import type { Event } from './events';
|
8
|
+
import type { Tag } from './tags';
|
9
|
+
import type { Version } from './versions';
|
7
10
|
type BundleRel = ResourceRel & {
|
8
11
|
type: typeof Bundles.TYPE;
|
9
12
|
};
|
@@ -13,6 +16,9 @@ type MarketRel = ResourceRel & {
|
|
13
16
|
type SkuListRel = ResourceRel & {
|
14
17
|
type: 'sku_lists';
|
15
18
|
};
|
19
|
+
type TagRel = ResourceRel & {
|
20
|
+
type: 'tags';
|
21
|
+
};
|
16
22
|
interface Bundle extends Resource {
|
17
23
|
code?: string;
|
18
24
|
name?: string;
|
@@ -32,6 +38,9 @@ interface Bundle extends Resource {
|
|
32
38
|
sku_list?: SkuList;
|
33
39
|
skus?: Sku[];
|
34
40
|
attachments?: Attachment[];
|
41
|
+
events?: Event[];
|
42
|
+
tags?: Tag[];
|
43
|
+
versions?: Version[];
|
35
44
|
}
|
36
45
|
interface BundleCreate extends ResourceCreate {
|
37
46
|
code: string;
|
@@ -39,12 +48,13 @@ interface BundleCreate extends ResourceCreate {
|
|
39
48
|
currency_code?: string;
|
40
49
|
description?: string;
|
41
50
|
image_url?: string;
|
42
|
-
price_amount_cents
|
43
|
-
compare_at_amount_cents
|
51
|
+
price_amount_cents?: number;
|
52
|
+
compare_at_amount_cents?: number;
|
44
53
|
_compute_price_amount?: boolean;
|
45
54
|
_compute_compare_at_amount?: boolean;
|
46
55
|
market?: MarketRel;
|
47
56
|
sku_list: SkuListRel;
|
57
|
+
tags?: TagRel[];
|
48
58
|
}
|
49
59
|
interface BundleUpdate extends ResourceUpdate {
|
50
60
|
code?: string;
|
@@ -56,6 +66,7 @@ interface BundleUpdate extends ResourceUpdate {
|
|
56
66
|
compare_at_amount_cents?: number;
|
57
67
|
_compute_price_amount?: boolean;
|
58
68
|
_compute_compare_at_amount?: boolean;
|
69
|
+
tags?: TagRel[];
|
59
70
|
}
|
60
71
|
declare class Bundles extends ApiResource {
|
61
72
|
static readonly TYPE: 'bundles';
|
@@ -68,6 +79,9 @@ declare class Bundles extends ApiResource {
|
|
68
79
|
sku_list(bundleId: string | Bundle, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
69
80
|
skus(bundleId: string | Bundle, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
70
81
|
attachments(bundleId: string | Bundle, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
82
|
+
events(bundleId: string | Bundle, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
83
|
+
tags(bundleId: string | Bundle, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
84
|
+
versions(bundleId: string | Bundle, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
71
85
|
isBundle(resource: any): resource is Bundle;
|
72
86
|
relationship(id: string | ResourceId | null): BundleRel;
|
73
87
|
type(): string;
|
@@ -34,6 +34,18 @@ class Bundles extends resource_1.ApiResource {
|
|
34
34
|
const _bundleId = bundleId.id || bundleId;
|
35
35
|
return this.resources.fetch({ type: 'attachments' }, `bundles/${_bundleId}/attachments`, params, options);
|
36
36
|
}
|
37
|
+
async events(bundleId, params, options) {
|
38
|
+
const _bundleId = bundleId.id || bundleId;
|
39
|
+
return this.resources.fetch({ type: 'events' }, `bundles/${_bundleId}/events`, params, options);
|
40
|
+
}
|
41
|
+
async tags(bundleId, params, options) {
|
42
|
+
const _bundleId = bundleId.id || bundleId;
|
43
|
+
return this.resources.fetch({ type: 'tags' }, `bundles/${_bundleId}/tags`, params, options);
|
44
|
+
}
|
45
|
+
async versions(bundleId, params, options) {
|
46
|
+
const _bundleId = bundleId.id || bundleId;
|
47
|
+
return this.resources.fetch({ type: 'versions' }, `bundles/${_bundleId}/versions`, params, options);
|
48
|
+
}
|
37
49
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
38
50
|
isBundle(resource) {
|
39
51
|
return resource.type && (resource.type === Bundles.TYPE);
|
@@ -0,0 +1,134 @@
|
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { Market } from './markets';
|
4
|
+
import type { PromotionRule } from './promotion_rules';
|
5
|
+
import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
6
|
+
import type { SkuListPromotionRule } from './sku_list_promotion_rules';
|
7
|
+
import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
8
|
+
import type { CustomPromotionRule } from './custom_promotion_rules';
|
9
|
+
import type { SkuList } from './sku_lists';
|
10
|
+
import type { Coupon } from './coupons';
|
11
|
+
import type { Attachment } from './attachments';
|
12
|
+
import type { Event } from './events';
|
13
|
+
import type { Tag } from './tags';
|
14
|
+
import type { Version } from './versions';
|
15
|
+
import type { Sku } from './skus';
|
16
|
+
type BuyXPayYPromotionRel = ResourceRel & {
|
17
|
+
type: typeof BuyXPayYPromotions.TYPE;
|
18
|
+
};
|
19
|
+
type MarketRel = ResourceRel & {
|
20
|
+
type: 'markets';
|
21
|
+
};
|
22
|
+
type OrderAmountPromotionRuleRel = ResourceRel & {
|
23
|
+
type: 'order_amount_promotion_rules';
|
24
|
+
};
|
25
|
+
type SkuListPromotionRuleRel = ResourceRel & {
|
26
|
+
type: 'sku_list_promotion_rules';
|
27
|
+
};
|
28
|
+
type CouponCodesPromotionRuleRel = ResourceRel & {
|
29
|
+
type: 'coupon_codes_promotion_rules';
|
30
|
+
};
|
31
|
+
type CustomPromotionRuleRel = ResourceRel & {
|
32
|
+
type: 'custom_promotion_rules';
|
33
|
+
};
|
34
|
+
type SkuListRel = ResourceRel & {
|
35
|
+
type: 'sku_lists';
|
36
|
+
};
|
37
|
+
type TagRel = ResourceRel & {
|
38
|
+
type: 'tags';
|
39
|
+
};
|
40
|
+
interface BuyXPayYPromotion extends Resource {
|
41
|
+
name?: string;
|
42
|
+
currency_code?: string;
|
43
|
+
exclusive?: boolean;
|
44
|
+
priority?: number;
|
45
|
+
starts_at?: string;
|
46
|
+
expires_at?: string;
|
47
|
+
total_usage_limit?: number;
|
48
|
+
total_usage_count?: number;
|
49
|
+
active?: boolean;
|
50
|
+
disabled_at?: string;
|
51
|
+
x?: number;
|
52
|
+
y?: number;
|
53
|
+
cheapest_free?: boolean;
|
54
|
+
market?: Market;
|
55
|
+
promotion_rules?: PromotionRule[];
|
56
|
+
order_amount_promotion_rule?: OrderAmountPromotionRule;
|
57
|
+
sku_list_promotion_rule?: SkuListPromotionRule;
|
58
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
59
|
+
custom_promotion_rule?: CustomPromotionRule;
|
60
|
+
sku_list?: SkuList;
|
61
|
+
coupons?: Coupon[];
|
62
|
+
attachments?: Attachment[];
|
63
|
+
events?: Event[];
|
64
|
+
tags?: Tag[];
|
65
|
+
versions?: Version[];
|
66
|
+
skus?: Sku[];
|
67
|
+
}
|
68
|
+
interface BuyXPayYPromotionCreate extends ResourceCreate {
|
69
|
+
name: string;
|
70
|
+
currency_code?: string;
|
71
|
+
exclusive?: boolean;
|
72
|
+
priority?: number;
|
73
|
+
starts_at: string;
|
74
|
+
expires_at: string;
|
75
|
+
total_usage_limit?: number;
|
76
|
+
_disable?: boolean;
|
77
|
+
_enable?: boolean;
|
78
|
+
x: number;
|
79
|
+
y: number;
|
80
|
+
cheapest_free?: boolean;
|
81
|
+
market?: MarketRel;
|
82
|
+
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
83
|
+
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
84
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
85
|
+
custom_promotion_rule?: CustomPromotionRuleRel;
|
86
|
+
sku_list: SkuListRel;
|
87
|
+
tags?: TagRel[];
|
88
|
+
}
|
89
|
+
interface BuyXPayYPromotionUpdate extends ResourceUpdate {
|
90
|
+
name?: string;
|
91
|
+
currency_code?: string;
|
92
|
+
exclusive?: boolean;
|
93
|
+
priority?: number;
|
94
|
+
starts_at?: string;
|
95
|
+
expires_at?: string;
|
96
|
+
total_usage_limit?: number;
|
97
|
+
_disable?: boolean;
|
98
|
+
_enable?: boolean;
|
99
|
+
x?: number;
|
100
|
+
y?: number;
|
101
|
+
cheapest_free?: boolean;
|
102
|
+
market?: MarketRel;
|
103
|
+
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
104
|
+
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
105
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
106
|
+
custom_promotion_rule?: CustomPromotionRuleRel;
|
107
|
+
sku_list?: SkuListRel;
|
108
|
+
tags?: TagRel[];
|
109
|
+
}
|
110
|
+
declare class BuyXPayYPromotions extends ApiResource {
|
111
|
+
static readonly TYPE: 'buy_x_pay_y_promotions';
|
112
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BuyXPayYPromotion>>;
|
113
|
+
create(resource: BuyXPayYPromotionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BuyXPayYPromotion>;
|
114
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BuyXPayYPromotion>;
|
115
|
+
update(resource: BuyXPayYPromotionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BuyXPayYPromotion>;
|
116
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
117
|
+
market(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
118
|
+
order_amount_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
119
|
+
sku_list_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
120
|
+
coupon_codes_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
121
|
+
custom_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
|
122
|
+
sku_list(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
123
|
+
coupons(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
124
|
+
attachments(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
125
|
+
events(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
126
|
+
tags(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
127
|
+
versions(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
128
|
+
skus(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
129
|
+
isBuyXPayYPromotion(resource: any): resource is BuyXPayYPromotion;
|
130
|
+
relationship(id: string | ResourceId | null): BuyXPayYPromotionRel;
|
131
|
+
type(): string;
|
132
|
+
}
|
133
|
+
export default BuyXPayYPromotions;
|
134
|
+
export { BuyXPayYPromotion, BuyXPayYPromotionCreate, BuyXPayYPromotionUpdate };
|