@commercelayer/sdk 4.3.0 → 4.5.0-beta.2
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/README.md +24 -13
- package/lib/cjs/client.js +1 -1
- package/lib/cjs/commercelayer.d.ts +2 -2
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/common.js +1 -1
- package/lib/cjs/debug.d.ts +1 -1
- package/lib/cjs/debug.js +1 -1
- package/lib/cjs/jsonapi.js +1 -1
- package/lib/cjs/query.js +1 -1
- package/lib/cjs/resource.d.ts +2 -0
- package/lib/cjs/resource.js +1 -1
- package/lib/cjs/resources/addresses.d.ts +1 -0
- package/lib/cjs/resources/addresses.js +1 -1
- package/lib/cjs/resources/adyen_gateways.d.ts +2 -0
- package/lib/cjs/resources/adyen_gateways.js +1 -1
- package/lib/cjs/resources/adyen_payments.d.ts +2 -0
- package/lib/cjs/resources/adyen_payments.js +1 -1
- package/lib/cjs/resources/authorizations.d.ts +3 -0
- package/lib/cjs/resources/authorizations.js +1 -1
- package/lib/cjs/resources/avalara_accounts.d.ts +3 -0
- package/lib/cjs/resources/avalara_accounts.js +1 -1
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -0
- package/lib/cjs/resources/billing_info_validation_rules.js +1 -1
- package/lib/cjs/resources/bing_geocoders.d.ts +2 -0
- package/lib/cjs/resources/bing_geocoders.js +1 -1
- package/lib/cjs/resources/braintree_gateways.d.ts +2 -0
- package/lib/cjs/resources/braintree_gateways.js +1 -1
- package/lib/cjs/resources/braintree_payments.d.ts +2 -0
- package/lib/cjs/resources/braintree_payments.js +1 -1
- package/lib/cjs/resources/bundles.d.ts +4 -0
- package/lib/cjs/resources/bundles.js +1 -1
- package/lib/cjs/resources/captures.d.ts +3 -0
- package/lib/cjs/resources/captures.js +1 -1
- package/lib/cjs/resources/carrier_accounts.d.ts +2 -0
- package/lib/cjs/resources/carrier_accounts.js +1 -1
- package/lib/cjs/resources/checkout_com_gateways.d.ts +2 -0
- package/lib/cjs/resources/checkout_com_gateways.js +1 -1
- package/lib/cjs/resources/checkout_com_payments.d.ts +2 -0
- package/lib/cjs/resources/checkout_com_payments.js +1 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -0
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -1
- package/lib/cjs/resources/coupon_recipients.d.ts +2 -0
- package/lib/cjs/resources/coupon_recipients.js +1 -1
- package/lib/cjs/resources/coupons.d.ts +1 -0
- package/lib/cjs/resources/coupons.js +1 -1
- package/lib/cjs/resources/customer_addresses.d.ts +2 -0
- package/lib/cjs/resources/customer_addresses.js +1 -1
- package/lib/cjs/resources/customer_groups.d.ts +3 -0
- package/lib/cjs/resources/customer_groups.js +1 -1
- package/lib/cjs/resources/customer_password_resets.d.ts +1 -0
- package/lib/cjs/resources/customer_password_resets.js +1 -1
- package/lib/cjs/resources/customer_payment_sources.d.ts +1 -0
- package/lib/cjs/resources/customer_payment_sources.js +1 -1
- package/lib/cjs/resources/customer_subscriptions.d.ts +1 -0
- package/lib/cjs/resources/customer_subscriptions.js +1 -1
- package/lib/cjs/resources/customers.d.ts +8 -0
- package/lib/cjs/resources/customers.js +1 -1
- package/lib/cjs/resources/delivery_lead_times.d.ts +3 -0
- package/lib/cjs/resources/delivery_lead_times.js +1 -1
- package/lib/cjs/resources/event_callbacks.d.ts +1 -0
- package/lib/cjs/resources/event_callbacks.js +1 -1
- package/lib/cjs/resources/external_gateways.d.ts +2 -0
- package/lib/cjs/resources/external_gateways.js +1 -1
- package/lib/cjs/resources/external_payments.d.ts +3 -0
- package/lib/cjs/resources/external_payments.js +1 -1
- package/lib/cjs/resources/external_promotions.d.ts +5 -0
- package/lib/cjs/resources/external_promotions.js +1 -1
- package/lib/cjs/resources/external_tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/external_tax_calculators.js +1 -1
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +5 -0
- package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
- package/lib/cjs/resources/fixed_price_promotions.d.ts +7 -0
- package/lib/cjs/resources/fixed_price_promotions.js +1 -1
- package/lib/cjs/resources/free_gift_promotions.d.ts +7 -0
- package/lib/cjs/resources/free_gift_promotions.js +1 -1
- package/lib/cjs/resources/free_shipping_promotions.d.ts +5 -0
- package/lib/cjs/resources/free_shipping_promotions.js +1 -1
- package/lib/cjs/resources/geocoders.d.ts +2 -0
- package/lib/cjs/resources/geocoders.js +1 -1
- package/lib/cjs/resources/gift_card_recipients.d.ts +2 -0
- package/lib/cjs/resources/gift_card_recipients.js +1 -1
- package/lib/cjs/resources/gift_cards.d.ts +3 -0
- package/lib/cjs/resources/gift_cards.js +1 -1
- package/lib/cjs/resources/google_geocoders.d.ts +2 -0
- package/lib/cjs/resources/google_geocoders.js +1 -1
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/in_stock_subscriptions.js +1 -1
- package/lib/cjs/resources/inventory_models.d.ts +3 -0
- package/lib/cjs/resources/inventory_models.js +1 -1
- package/lib/cjs/resources/inventory_return_locations.d.ts +2 -0
- package/lib/cjs/resources/inventory_return_locations.js +1 -1
- package/lib/cjs/resources/inventory_stock_locations.d.ts +2 -0
- package/lib/cjs/resources/inventory_stock_locations.js +1 -1
- package/lib/cjs/resources/klarna_gateways.d.ts +2 -0
- package/lib/cjs/resources/klarna_gateways.js +1 -1
- package/lib/cjs/resources/klarna_payments.d.ts +2 -0
- package/lib/cjs/resources/klarna_payments.js +1 -1
- package/lib/cjs/resources/line_item_options.d.ts +2 -0
- package/lib/cjs/resources/line_item_options.js +1 -1
- package/lib/cjs/resources/line_items.d.ts +4 -0
- package/lib/cjs/resources/line_items.js +1 -1
- package/lib/cjs/resources/manual_gateways.d.ts +1 -0
- package/lib/cjs/resources/manual_gateways.js +1 -1
- package/lib/cjs/resources/manual_tax_calculators.d.ts +4 -0
- package/lib/cjs/resources/manual_tax_calculators.js +1 -1
- package/lib/cjs/resources/markets.d.ts +6 -0
- package/lib/cjs/resources/markets.js +1 -1
- package/lib/cjs/resources/merchants.d.ts +2 -0
- package/lib/cjs/resources/merchants.js +1 -1
- package/lib/cjs/resources/order_copies.d.ts +3 -0
- package/lib/cjs/resources/order_copies.js +1 -1
- package/lib/cjs/resources/order_subscriptions.d.ts +5 -0
- package/lib/cjs/resources/order_subscriptions.js +1 -1
- package/lib/cjs/resources/order_validation_rules.d.ts +1 -0
- package/lib/cjs/resources/order_validation_rules.js +1 -1
- package/lib/cjs/resources/orders.d.ts +16 -0
- package/lib/cjs/resources/orders.js +1 -1
- package/lib/cjs/resources/packages.d.ts +3 -0
- package/lib/cjs/resources/packages.js +1 -1
- package/lib/cjs/resources/parcel_line_items.d.ts +2 -0
- package/lib/cjs/resources/parcel_line_items.js +1 -1
- package/lib/cjs/resources/parcels.d.ts +4 -0
- package/lib/cjs/resources/parcels.js +1 -1
- package/lib/cjs/resources/payment_gateways.d.ts +1 -0
- package/lib/cjs/resources/payment_gateways.js +1 -1
- package/lib/cjs/resources/payment_methods.d.ts +3 -0
- package/lib/cjs/resources/payment_methods.js +1 -1
- package/lib/cjs/resources/paypal_gateways.d.ts +2 -0
- package/lib/cjs/resources/paypal_gateways.js +1 -1
- package/lib/cjs/resources/paypal_payments.d.ts +2 -0
- package/lib/cjs/resources/paypal_payments.js +1 -1
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +7 -0
- package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
- package/lib/cjs/resources/price_lists.d.ts +2 -0
- package/lib/cjs/resources/price_lists.js +1 -1
- package/lib/cjs/resources/prices.d.ts +3 -0
- package/lib/cjs/resources/prices.js +1 -1
- package/lib/cjs/resources/promotions.d.ts +5 -0
- package/lib/cjs/resources/promotions.js +1 -1
- package/lib/cjs/resources/refunds.d.ts +2 -0
- package/lib/cjs/resources/refunds.js +1 -1
- package/lib/cjs/resources/return_line_items.d.ts +2 -0
- package/lib/cjs/resources/return_line_items.js +1 -1
- package/lib/cjs/resources/returns.d.ts +7 -0
- package/lib/cjs/resources/returns.js +1 -1
- package/lib/cjs/resources/shipments.d.ts +13 -0
- package/lib/cjs/resources/shipments.js +1 -1
- package/lib/cjs/resources/shipping_categories.d.ts +2 -0
- package/lib/cjs/resources/shipping_categories.js +1 -1
- package/lib/cjs/resources/shipping_methods.d.ts +5 -0
- package/lib/cjs/resources/shipping_methods.js +1 -1
- package/lib/cjs/resources/shipping_zones.d.ts +1 -0
- package/lib/cjs/resources/shipping_zones.js +1 -1
- package/lib/cjs/resources/sku_list_items.d.ts +2 -0
- package/lib/cjs/resources/sku_list_items.js +1 -1
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +2 -0
- package/lib/cjs/resources/sku_list_promotion_rules.js +1 -1
- package/lib/cjs/resources/sku_lists.d.ts +3 -0
- package/lib/cjs/resources/sku_lists.js +1 -1
- package/lib/cjs/resources/sku_options.d.ts +2 -0
- package/lib/cjs/resources/sku_options.js +1 -1
- package/lib/cjs/resources/skus.d.ts +6 -0
- package/lib/cjs/resources/skus.js +1 -1
- package/lib/cjs/resources/stock_items.d.ts +3 -0
- package/lib/cjs/resources/stock_items.js +1 -1
- package/lib/cjs/resources/stock_line_items.d.ts +3 -0
- package/lib/cjs/resources/stock_line_items.js +1 -1
- package/lib/cjs/resources/stock_locations.d.ts +6 -0
- package/lib/cjs/resources/stock_locations.js +1 -1
- package/lib/cjs/resources/stock_transfers.d.ts +5 -0
- package/lib/cjs/resources/stock_transfers.js +1 -1
- package/lib/cjs/resources/stripe_gateways.d.ts +2 -0
- package/lib/cjs/resources/stripe_gateways.js +1 -1
- package/lib/cjs/resources/stripe_payments.d.ts +2 -0
- package/lib/cjs/resources/stripe_payments.js +1 -1
- package/lib/cjs/resources/tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/tax_calculators.js +1 -1
- package/lib/cjs/resources/tax_categories.d.ts +2 -0
- package/lib/cjs/resources/tax_categories.js +1 -1
- package/lib/cjs/resources/tax_rules.d.ts +1 -0
- package/lib/cjs/resources/tax_rules.js +1 -1
- package/lib/cjs/resources/taxjar_accounts.d.ts +3 -0
- package/lib/cjs/resources/taxjar_accounts.js +1 -1
- package/lib/cjs/resources/transactions.d.ts +1 -0
- package/lib/cjs/resources/transactions.js +1 -1
- package/lib/cjs/resources/voids.d.ts +2 -0
- package/lib/cjs/resources/voids.js +1 -1
- package/lib/cjs/resources/webhooks.d.ts +1 -0
- package/lib/cjs/resources/webhooks.js +1 -1
- package/lib/cjs/resources/wire_transfers.d.ts +1 -0
- package/lib/cjs/resources/wire_transfers.js +1 -1
- package/lib/esm/client.js +1 -1
- package/lib/esm/commercelayer.d.ts +2 -2
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/common.js +1 -1
- package/lib/esm/debug.d.ts +1 -1
- package/lib/esm/debug.js +1 -1
- package/lib/esm/jsonapi.js +1 -1
- package/lib/esm/query.js +1 -1
- package/lib/esm/resource.d.ts +2 -0
- package/lib/esm/resource.js +1 -1
- package/lib/esm/resources/addresses.d.ts +1 -0
- package/lib/esm/resources/addresses.js +1 -1
- package/lib/esm/resources/adyen_gateways.d.ts +2 -0
- package/lib/esm/resources/adyen_gateways.js +1 -1
- package/lib/esm/resources/adyen_payments.d.ts +2 -0
- package/lib/esm/resources/adyen_payments.js +1 -1
- package/lib/esm/resources/authorizations.d.ts +3 -0
- package/lib/esm/resources/authorizations.js +1 -1
- package/lib/esm/resources/avalara_accounts.d.ts +3 -0
- package/lib/esm/resources/avalara_accounts.js +1 -1
- package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -0
- package/lib/esm/resources/billing_info_validation_rules.js +1 -1
- package/lib/esm/resources/bing_geocoders.d.ts +2 -0
- package/lib/esm/resources/bing_geocoders.js +1 -1
- package/lib/esm/resources/braintree_gateways.d.ts +2 -0
- package/lib/esm/resources/braintree_gateways.js +1 -1
- package/lib/esm/resources/braintree_payments.d.ts +2 -0
- package/lib/esm/resources/braintree_payments.js +1 -1
- package/lib/esm/resources/bundles.d.ts +4 -0
- package/lib/esm/resources/bundles.js +1 -1
- package/lib/esm/resources/captures.d.ts +3 -0
- package/lib/esm/resources/captures.js +1 -1
- package/lib/esm/resources/carrier_accounts.d.ts +2 -0
- package/lib/esm/resources/carrier_accounts.js +1 -1
- package/lib/esm/resources/checkout_com_gateways.d.ts +2 -0
- package/lib/esm/resources/checkout_com_gateways.js +1 -1
- package/lib/esm/resources/checkout_com_payments.d.ts +2 -0
- package/lib/esm/resources/checkout_com_payments.js +1 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
- package/lib/esm/resources/coupon_recipients.d.ts +2 -0
- package/lib/esm/resources/coupon_recipients.js +1 -1
- package/lib/esm/resources/coupons.d.ts +1 -0
- package/lib/esm/resources/coupons.js +1 -1
- package/lib/esm/resources/customer_addresses.d.ts +2 -0
- package/lib/esm/resources/customer_addresses.js +1 -1
- package/lib/esm/resources/customer_groups.d.ts +3 -0
- package/lib/esm/resources/customer_groups.js +1 -1
- package/lib/esm/resources/customer_password_resets.d.ts +1 -0
- package/lib/esm/resources/customer_password_resets.js +1 -1
- package/lib/esm/resources/customer_payment_sources.d.ts +1 -0
- package/lib/esm/resources/customer_payment_sources.js +1 -1
- package/lib/esm/resources/customer_subscriptions.d.ts +1 -0
- package/lib/esm/resources/customer_subscriptions.js +1 -1
- package/lib/esm/resources/customers.d.ts +8 -0
- package/lib/esm/resources/customers.js +1 -1
- package/lib/esm/resources/delivery_lead_times.d.ts +3 -0
- package/lib/esm/resources/delivery_lead_times.js +1 -1
- package/lib/esm/resources/event_callbacks.d.ts +1 -0
- package/lib/esm/resources/event_callbacks.js +1 -1
- package/lib/esm/resources/external_gateways.d.ts +2 -0
- package/lib/esm/resources/external_gateways.js +1 -1
- package/lib/esm/resources/external_payments.d.ts +3 -0
- package/lib/esm/resources/external_payments.js +1 -1
- package/lib/esm/resources/external_promotions.d.ts +5 -0
- package/lib/esm/resources/external_promotions.js +1 -1
- package/lib/esm/resources/external_tax_calculators.d.ts +3 -0
- package/lib/esm/resources/external_tax_calculators.js +1 -1
- package/lib/esm/resources/fixed_amount_promotions.d.ts +5 -0
- package/lib/esm/resources/fixed_amount_promotions.js +1 -1
- package/lib/esm/resources/fixed_price_promotions.d.ts +7 -0
- package/lib/esm/resources/fixed_price_promotions.js +1 -1
- package/lib/esm/resources/free_gift_promotions.d.ts +7 -0
- package/lib/esm/resources/free_gift_promotions.js +1 -1
- package/lib/esm/resources/free_shipping_promotions.d.ts +5 -0
- package/lib/esm/resources/free_shipping_promotions.js +1 -1
- package/lib/esm/resources/geocoders.d.ts +2 -0
- package/lib/esm/resources/geocoders.js +1 -1
- package/lib/esm/resources/gift_card_recipients.d.ts +2 -0
- package/lib/esm/resources/gift_card_recipients.js +1 -1
- package/lib/esm/resources/gift_cards.d.ts +3 -0
- package/lib/esm/resources/gift_cards.js +1 -1
- package/lib/esm/resources/google_geocoders.d.ts +2 -0
- package/lib/esm/resources/google_geocoders.js +1 -1
- package/lib/esm/resources/in_stock_subscriptions.d.ts +3 -0
- package/lib/esm/resources/in_stock_subscriptions.js +1 -1
- package/lib/esm/resources/inventory_models.d.ts +3 -0
- package/lib/esm/resources/inventory_models.js +1 -1
- package/lib/esm/resources/inventory_return_locations.d.ts +2 -0
- package/lib/esm/resources/inventory_return_locations.js +1 -1
- package/lib/esm/resources/inventory_stock_locations.d.ts +2 -0
- package/lib/esm/resources/inventory_stock_locations.js +1 -1
- package/lib/esm/resources/klarna_gateways.d.ts +2 -0
- package/lib/esm/resources/klarna_gateways.js +1 -1
- package/lib/esm/resources/klarna_payments.d.ts +2 -0
- package/lib/esm/resources/klarna_payments.js +1 -1
- package/lib/esm/resources/line_item_options.d.ts +2 -0
- package/lib/esm/resources/line_item_options.js +1 -1
- package/lib/esm/resources/line_items.d.ts +4 -0
- package/lib/esm/resources/line_items.js +1 -1
- package/lib/esm/resources/manual_gateways.d.ts +1 -0
- package/lib/esm/resources/manual_gateways.js +1 -1
- package/lib/esm/resources/manual_tax_calculators.d.ts +4 -0
- package/lib/esm/resources/manual_tax_calculators.js +1 -1
- package/lib/esm/resources/markets.d.ts +6 -0
- package/lib/esm/resources/markets.js +1 -1
- package/lib/esm/resources/merchants.d.ts +2 -0
- package/lib/esm/resources/merchants.js +1 -1
- package/lib/esm/resources/order_copies.d.ts +3 -0
- package/lib/esm/resources/order_copies.js +1 -1
- package/lib/esm/resources/order_subscriptions.d.ts +5 -0
- package/lib/esm/resources/order_subscriptions.js +1 -1
- package/lib/esm/resources/order_validation_rules.d.ts +1 -0
- package/lib/esm/resources/order_validation_rules.js +1 -1
- package/lib/esm/resources/orders.d.ts +16 -0
- package/lib/esm/resources/orders.js +1 -1
- package/lib/esm/resources/packages.d.ts +3 -0
- package/lib/esm/resources/packages.js +1 -1
- package/lib/esm/resources/parcel_line_items.d.ts +2 -0
- package/lib/esm/resources/parcel_line_items.js +1 -1
- package/lib/esm/resources/parcels.d.ts +4 -0
- package/lib/esm/resources/parcels.js +1 -1
- package/lib/esm/resources/payment_gateways.d.ts +1 -0
- package/lib/esm/resources/payment_gateways.js +1 -1
- package/lib/esm/resources/payment_methods.d.ts +3 -0
- package/lib/esm/resources/payment_methods.js +1 -1
- package/lib/esm/resources/paypal_gateways.d.ts +2 -0
- package/lib/esm/resources/paypal_gateways.js +1 -1
- package/lib/esm/resources/paypal_payments.d.ts +2 -0
- package/lib/esm/resources/paypal_payments.js +1 -1
- package/lib/esm/resources/percentage_discount_promotions.d.ts +7 -0
- package/lib/esm/resources/percentage_discount_promotions.js +1 -1
- package/lib/esm/resources/price_lists.d.ts +2 -0
- package/lib/esm/resources/price_lists.js +1 -1
- package/lib/esm/resources/prices.d.ts +3 -0
- package/lib/esm/resources/prices.js +1 -1
- package/lib/esm/resources/promotions.d.ts +5 -0
- package/lib/esm/resources/promotions.js +1 -1
- package/lib/esm/resources/refunds.d.ts +2 -0
- package/lib/esm/resources/refunds.js +1 -1
- package/lib/esm/resources/return_line_items.d.ts +2 -0
- package/lib/esm/resources/return_line_items.js +1 -1
- package/lib/esm/resources/returns.d.ts +7 -0
- package/lib/esm/resources/returns.js +1 -1
- package/lib/esm/resources/shipments.d.ts +13 -0
- package/lib/esm/resources/shipments.js +1 -1
- package/lib/esm/resources/shipping_categories.d.ts +2 -0
- package/lib/esm/resources/shipping_categories.js +1 -1
- package/lib/esm/resources/shipping_methods.d.ts +5 -0
- package/lib/esm/resources/shipping_methods.js +1 -1
- package/lib/esm/resources/shipping_zones.d.ts +1 -0
- package/lib/esm/resources/shipping_zones.js +1 -1
- package/lib/esm/resources/sku_list_items.d.ts +2 -0
- package/lib/esm/resources/sku_list_items.js +1 -1
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +2 -0
- package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
- package/lib/esm/resources/sku_lists.d.ts +3 -0
- package/lib/esm/resources/sku_lists.js +1 -1
- package/lib/esm/resources/sku_options.d.ts +2 -0
- package/lib/esm/resources/sku_options.js +1 -1
- package/lib/esm/resources/skus.d.ts +6 -0
- package/lib/esm/resources/skus.js +1 -1
- package/lib/esm/resources/stock_items.d.ts +3 -0
- package/lib/esm/resources/stock_items.js +1 -1
- package/lib/esm/resources/stock_line_items.d.ts +3 -0
- package/lib/esm/resources/stock_line_items.js +1 -1
- package/lib/esm/resources/stock_locations.d.ts +6 -0
- package/lib/esm/resources/stock_locations.js +1 -1
- package/lib/esm/resources/stock_transfers.d.ts +5 -0
- package/lib/esm/resources/stock_transfers.js +1 -1
- package/lib/esm/resources/stripe_gateways.d.ts +2 -0
- package/lib/esm/resources/stripe_gateways.js +1 -1
- package/lib/esm/resources/stripe_payments.d.ts +2 -0
- package/lib/esm/resources/stripe_payments.js +1 -1
- package/lib/esm/resources/tax_calculators.d.ts +3 -0
- package/lib/esm/resources/tax_calculators.js +1 -1
- package/lib/esm/resources/tax_categories.d.ts +2 -0
- package/lib/esm/resources/tax_categories.js +1 -1
- package/lib/esm/resources/tax_rules.d.ts +1 -0
- package/lib/esm/resources/tax_rules.js +1 -1
- package/lib/esm/resources/taxjar_accounts.d.ts +3 -0
- package/lib/esm/resources/taxjar_accounts.js +1 -1
- package/lib/esm/resources/transactions.d.ts +1 -0
- package/lib/esm/resources/transactions.js +1 -1
- package/lib/esm/resources/voids.d.ts +2 -0
- package/lib/esm/resources/voids.js +1 -1
- package/lib/esm/resources/webhooks.d.ts +1 -0
- package/lib/esm/resources/webhooks.js +1 -1
- package/lib/esm/resources/wire_transfers.d.ts +1 -0
- package/lib/esm/resources/wire_transfers.js +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
package/lib/esm/query.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import n from"./debug";const
|
1
|
+
import n from"./debug";const a=n("query"),o=e=>e.filters||e.pageNumber||e.pageSize||e.sort,g=(e,r)=>{a("generate query string params: %O, %O",e,r);const i={};return e&&(e.include&&(i.include=e.include.join(",")),e.fields&&(Array.isArray(e.fields)&&(e.fields={[r.type]:e.fields}),Object.entries(e.fields).forEach(([s,t])=>{i[`fields[${s}]`]=t.join(",")})),o(e)&&(e.sort&&(Array.isArray(e.sort)?i.sort=e.sort.join(","):i.sort=Object.entries(e.sort).map(([s,t])=>`${t==="desc"?"-":""}${s}`).join(",")),e.pageNumber&&(i["page[number]"]=String(e.pageNumber)),e.pageSize&&(i["page[size]"]=String(e.pageSize)),e.filters&&Object.entries(e.filters).forEach(([s,t])=>{i[`filter[q][${s}]`]=String(t)})),a("query string params: %O",i)),i};export{g as generateQueryStringParams};
|
package/lib/esm/resource.d.ts
CHANGED
@@ -2,6 +2,7 @@ import { ApiClientInitConfig } from './client';
|
|
2
2
|
import { QueryParamsRetrieve, QueryParamsList } from './query';
|
3
3
|
import { ResourceTypeLock } from './api';
|
4
4
|
import { InterceptorManager } from './interceptor';
|
5
|
+
import { QueryParams } from '.';
|
5
6
|
declare type ResourceNull = {
|
6
7
|
id: null;
|
7
8
|
} & ResourceType;
|
@@ -62,6 +63,7 @@ declare class ResourceAdapter {
|
|
62
63
|
create<C extends ResourceCreate, R extends Resource>(resource: C & ResourceType, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
|
63
64
|
update<U extends ResourceUpdate, R extends Resource>(resource: U & ResourceId, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
|
64
65
|
delete(resource: ResourceId, options?: ResourcesConfig): Promise<void>;
|
66
|
+
fetch<R extends Resource>(resource: ResourceType, path: string, params?: QueryParams, options?: ResourcesConfig): Promise<R | ListResponse<R>>;
|
65
67
|
}
|
66
68
|
declare abstract class ApiResource {
|
67
69
|
static readonly TYPE: ResourceTypeLock;
|
package/lib/esm/resource.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var
|
1
|
+
var y=this&&this.__classPrivateFieldSet||function(r,e,s,t,a){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!a:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?a.call(r,s):a?a.value=s:e.set(r,s),s},c=this&&this.__classPrivateFieldGet||function(r,e,s,t){if(s==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!t:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?t:s==="a"?t.call(r):t?t.value:e.get(r)},o,f;import j from"./client";import{denormalize as d,normalize as b}from"./jsonapi";import{generateQueryStringParams as p}from"./query";import v from"./config";import P from"./debug";const l=P("resource");class O extends Array{constructor(e,s){super(...s||[]);this.meta=e}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(e){return this.length&&e>=0?this[e]:void 0}}class C{constructor(e){o.set(this,void 0),f.set(this,{}),y(this,o,j.create(e),"f"),this.localConfig(e)}get interceptors(){return c(this,o,"f").interceptors}localConfig(e){}config(e){l("config %o",e),this.localConfig(e),c(this,o,"f").config(e)}async singleton(e,s,t){l("singleton: %o, %O, %O",e,s||{},t||{});const a=p(s,e);(t==null?void 0:t.params)&&Object.assign(a,t==null?void 0:t.params);const i=await c(this,o,"f").request("get",`${e.type}`,void 0,Object.assign(Object.assign({},t),{params:a}));return d(i)}async retrieve(e,s,t){l("retrieve: %o, %O, %O",e,s||{},t||{});const a=p(s,e);(t==null?void 0:t.params)&&Object.assign(a,t==null?void 0:t.params);const i=await c(this,o,"f").request("get",`${e.type}/${e.id}`,void 0,Object.assign(Object.assign({},t),{params:a}));return d(i)}async list(e,s,t){var a,i;l("list: %o, %O, %O",e,s||{},t||{});const n=p(s,e);(t==null?void 0:t.params)&&Object.assign(n,t==null?void 0:t.params);const u=await c(this,o,"f").request("get",`${e.type}`,void 0,Object.assign(Object.assign({},t),{params:n})),g=d(u),m={pageCount:Number((a=u.meta)===null||a===void 0?void 0:a.page_count),recordCount:Number((i=u.meta)===null||i===void 0?void 0:i.record_count),currentPage:(s==null?void 0:s.pageNumber)||v.default.pageNumber,recordsPerPage:(s==null?void 0:s.pageSize)||v.default.pageSize};return new O(m,g)}async create(e,s,t){l("create: %o, %O, %O",e,s||{},t||{});const a=p(s,e);(t==null?void 0:t.params)&&Object.assign(a,t==null?void 0:t.params);const i=b(e),n=await c(this,o,"f").request("post",e.type,i,Object.assign(Object.assign({},t),{params:a}));return d(n)}async update(e,s,t){l("update: %o, %O, %O",e,s||{},t||{});const a=p(s,e);(t==null?void 0:t.params)&&Object.assign(a,t==null?void 0:t.params);const i=b(e),n=await c(this,o,"f").request("patch",`${e.type}/${e.id}`,i,Object.assign(Object.assign({},t),{params:a}));return d(n)}async delete(e,s){l("delete: %o, %O",e,s||{}),await c(this,o,"f").request("delete",`${e.type}/${e.id}`,void 0,s)}async fetch(e,s,t,a){var i,n;l("fetch: %o, %O, %O",s,t||{},a||{});const u=p(t,e);(a==null?void 0:a.params)&&Object.assign(u,a==null?void 0:a.params);const g=await c(this,o,"f").request("get",s,void 0,Object.assign(Object.assign({},a),{params:u})),m=d(g);if(Array.isArray(m)){const h=t,w={pageCount:Number((i=g.meta)===null||i===void 0?void 0:i.page_count),recordCount:Number((n=g.meta)===null||n===void 0?void 0:n.record_count),currentPage:(h==null?void 0:h.pageNumber)||v.default.pageNumber,recordsPerPage:(h==null?void 0:h.pageSize)||v.default.pageSize};return new O(w,m)}else return m}}o=new WeakMap,f=new WeakMap;class _{constructor(e){l("new resource instance: %s",this.type()),this.resources=e}}export default C;export{_ as ApiResource};
|
@@ -79,6 +79,7 @@ declare class Addresses extends ApiResource {
|
|
79
79
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
80
80
|
update(resource: AddressUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
81
81
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
82
|
+
geocoder(addressId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Geocoder>;
|
82
83
|
isAddress(resource: any): resource is Address;
|
83
84
|
relationship(id: string | ResourceId | null): AddressRel;
|
84
85
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isAddress(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="addresses";export default t;
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}async geocoder(e,r,s){return this.resources.fetch({type:"geocoders"},`addresses/${e}/geocoder`,r,s)}isAddress(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="addresses";export default t;
|
@@ -37,6 +37,8 @@ declare class AdyenGateways extends ApiResource {
|
|
37
37
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
|
38
38
|
update(resource: AdyenGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
|
39
39
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
40
|
+
payment_methods(adyenGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
41
|
+
adyen_payments(adyenGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>>;
|
40
42
|
isAdyenGateway(resource: any): resource is AdyenGateway;
|
41
43
|
relationship(id: string | ResourceId | null): AdyenGatewayRel;
|
42
44
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async payment_methods(e,t,r){return this.resources.fetch({type:"payment_methods"},`adyen_gateways/${e}/payment_methods`,t,r)}async adyen_payments(e,t,r){return this.resources.fetch({type:"adyen_payments"},`adyen_gateways/${e}/adyen_payments`,t,r)}isAdyenGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="adyen_gateways";export default s;
|
@@ -34,6 +34,8 @@ declare class AdyenPayments extends ApiResource {
|
|
34
34
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
|
35
35
|
update(resource: AdyenPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
|
36
36
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
37
|
+
order(adyenPaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
38
|
+
payment_gateway(adyenPaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
37
39
|
isAdyenPayment(resource: any): resource is AdyenPayment;
|
38
40
|
relationship(id: string | ResourceId | null): AdyenPaymentRel;
|
39
41
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class r extends a{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){return this.resources.fetch({type:"orders"},`adyen_payments/${e}/order`,t,s)}async payment_gateway(e,t,s){return this.resources.fetch({type:"payment_gateways"},`adyen_payments/${e}/payment_gateway`,t,s)}isAdyenPayment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="adyen_payments";export default r;
|
@@ -46,6 +46,9 @@ declare class Authorizations extends ApiResource {
|
|
46
46
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Authorization>>;
|
47
47
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
48
48
|
update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
49
|
+
order(authorizationId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
50
|
+
captures(authorizationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
|
51
|
+
voids(authorizationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
|
49
52
|
isAuthorization(resource: any): resource is Authorization;
|
50
53
|
relationship(id: string | ResourceId | null): AuthorizationRel;
|
51
54
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async order(e,r,s){return this.resources.fetch({type:"orders"},`authorizations/${e}/order`,r,s)}async captures(e,r,s){return this.resources.fetch({type:"captures"},`authorizations/${e}/captures`,r,s)}async voids(e,r,s){return this.resources.fetch({type:"voids"},`authorizations/${e}/voids`,r,s)}isAuthorization(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="authorizations";export default t;
|
@@ -41,6 +41,9 @@ declare class AvalaraAccounts extends ApiResource {
|
|
41
41
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
|
42
42
|
update(resource: AvalaraAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
|
43
43
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
44
|
+
tax_categories(avalaraAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
45
|
+
markets(avalaraAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
46
|
+
attachments(avalaraAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
44
47
|
isAvalaraAccount(resource: any): resource is AvalaraAccount;
|
45
48
|
relationship(id: string | ResourceId | null): AvalaraAccountRel;
|
46
49
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as a}from"../resource";class
|
1
|
+
import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async tax_categories(e,t,r){return this.resources.fetch({type:"tax_categories"},`avalara_accounts/${e}/tax_categories`,t,r)}async markets(e,t,r){return this.resources.fetch({type:"markets"},`avalara_accounts/${e}/markets`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`avalara_accounts/${e}/attachments`,t,r)}isAvalaraAccount(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="avalara_accounts";export default s;
|
@@ -23,6 +23,7 @@ declare class BillingInfoValidationRules extends ApiResource {
|
|
23
23
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BillingInfoValidationRule>;
|
24
24
|
update(resource: BillingInfoValidationRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BillingInfoValidationRule>;
|
25
25
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
26
|
+
market(billingInfoValidationRuleId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
26
27
|
isBillingInfoValidationRule(resource: any): resource is BillingInfoValidationRule;
|
27
28
|
relationship(id: string | ResourceId | null): BillingInfoValidationRuleRel;
|
28
29
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}async market(e,r,s){return this.resources.fetch({type:"markets"},`billing_info_validation_rules/${e}/market`,r,s)}isBillingInfoValidationRule(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="billing_info_validation_rules";export default t;
|
@@ -25,6 +25,8 @@ declare class BingGeocoders extends ApiResource {
|
|
25
25
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BingGeocoder>;
|
26
26
|
update(resource: BingGeocoderUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BingGeocoder>;
|
27
27
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
28
|
+
addresses(bingGeocoderId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Address>>;
|
29
|
+
attachments(bingGeocoderId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
28
30
|
isBingGeocoder(resource: any): resource is BingGeocoder;
|
29
31
|
relationship(id: string | ResourceId | null): BingGeocoderRel;
|
30
32
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async addresses(e,t,r){return this.resources.fetch({type:"addresses"},`bing_geocoders/${e}/addresses`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`bing_geocoders/${e}/attachments`,t,r)}isBingGeocoder(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="bing_geocoders";export default s;
|
@@ -46,6 +46,8 @@ declare class BraintreeGateways extends ApiResource {
|
|
46
46
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
|
47
47
|
update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
|
48
48
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
49
|
+
payment_methods(braintreeGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
50
|
+
braintree_payments(braintreeGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>>;
|
49
51
|
isBraintreeGateway(resource: any): resource is BraintreeGateway;
|
50
52
|
relationship(id: string | ResourceId | null): BraintreeGatewayRel;
|
51
53
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async payment_methods(e,t,r){return this.resources.fetch({type:"payment_methods"},`braintree_gateways/${e}/payment_methods`,t,r)}async braintree_payments(e,t,r){return this.resources.fetch({type:"braintree_payments"},`braintree_gateways/${e}/braintree_payments`,t,r)}isBraintreeGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="braintree_gateways";export default s;
|
@@ -37,6 +37,8 @@ declare class BraintreePayments extends ApiResource {
|
|
37
37
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreePayment>;
|
38
38
|
update(resource: BraintreePaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreePayment>;
|
39
39
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
40
|
+
order(braintreePaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
41
|
+
payment_gateway(braintreePaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
40
42
|
isBraintreePayment(resource: any): resource is BraintreePayment;
|
41
43
|
relationship(id: string | ResourceId | null): BraintreePaymentRel;
|
42
44
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async order(e,t,r){return this.resources.fetch({type:"orders"},`braintree_payments/${e}/order`,t,r)}async payment_gateway(e,t,r){return this.resources.fetch({type:"payment_gateways"},`braintree_payments/${e}/payment_gateway`,t,r)}isBraintreePayment(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="braintree_payments";export default s;
|
@@ -62,6 +62,10 @@ declare class Bundles extends ApiResource {
|
|
62
62
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Bundle>;
|
63
63
|
update(resource: BundleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Bundle>;
|
64
64
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
65
|
+
market(bundleId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
66
|
+
sku_list(bundleId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
67
|
+
skus(bundleId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
68
|
+
attachments(bundleId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
65
69
|
isBundle(resource: any): resource is Bundle;
|
66
70
|
relationship(id: string | ResourceId | null): BundleRel;
|
67
71
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as n}from"../resource";class r extends n{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}async market(e,s,t){return this.resources.fetch({type:"markets"},`bundles/${e}/market`,s,t)}async sku_list(e,s,t){return this.resources.fetch({type:"sku_lists"},`bundles/${e}/sku_list`,s,t)}async skus(e,s,t){return this.resources.fetch({type:"skus"},`bundles/${e}/skus`,s,t)}async attachments(e,s,t){return this.resources.fetch({type:"attachments"},`bundles/${e}/attachments`,s,t)}isBundle(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="bundles";export default r;
|
@@ -37,6 +37,9 @@ declare class Captures extends ApiResource {
|
|
37
37
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
|
38
38
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Capture>;
|
39
39
|
update(resource: CaptureUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Capture>;
|
40
|
+
order(captureId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
41
|
+
reference_authorization(captureId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
42
|
+
refunds(captureId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Refund>>;
|
40
43
|
isCapture(resource: any): resource is Capture;
|
41
44
|
relationship(id: string | ResourceId | null): CaptureRel;
|
42
45
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as u}from"../resource";class t extends u{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async order(e,r,s){return this.resources.fetch({type:"orders"},`captures/${e}/order`,r,s)}async reference_authorization(e,r,s){return this.resources.fetch({type:"authorizations"},`captures/${e}/reference_authorization`,r,s)}async refunds(e,r,s){return this.resources.fetch({type:"refunds"},`captures/${e}/refunds`,r,s)}isCapture(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="captures";export default t;
|
@@ -16,6 +16,8 @@ declare class CarrierAccounts extends ApiResource {
|
|
16
16
|
static readonly TYPE: 'carrier_accounts';
|
17
17
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>>;
|
18
18
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CarrierAccount>;
|
19
|
+
market(carrierAccountId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
20
|
+
attachments(carrierAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
19
21
|
isCarrierAccount(resource: any): resource is CarrierAccount;
|
20
22
|
relationship(id: string | ResourceId | null): CarrierAccountRel;
|
21
23
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as c}from"../resource";class e extends c{async list(t,r){return this.resources.list({type:e.TYPE},t,r)}async retrieve(t,r,s){return this.resources.retrieve({type:e.TYPE,id:t},r,s)}async market(t,r,s){return this.resources.fetch({type:"markets"},`carrier_accounts/${t}/market`,r,s)}async attachments(t,r,s){return this.resources.fetch({type:"attachments"},`carrier_accounts/${t}/attachments`,r,s)}isCarrierAccount(t){return t.type&&t.type===e.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:e.TYPE}:{id:t.id,type:e.TYPE}}type(){return e.TYPE}}e.TYPE="carrier_accounts";export default e;
|
@@ -35,6 +35,8 @@ declare class CheckoutComGateways extends ApiResource {
|
|
35
35
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CheckoutComGateway>;
|
36
36
|
update(resource: CheckoutComGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CheckoutComGateway>;
|
37
37
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
38
|
+
payment_methods(checkoutComGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
39
|
+
checkout_com_payments(checkoutComGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CheckoutComPayment>>;
|
38
40
|
isCheckoutComGateway(resource: any): resource is CheckoutComGateway;
|
39
41
|
relationship(id: string | ResourceId | null): CheckoutComGatewayRel;
|
40
42
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as c}from"../resource";class s extends c{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async payment_methods(e,t,r){return this.resources.fetch({type:"payment_methods"},`checkout_com_gateways/${e}/payment_methods`,t,r)}async checkout_com_payments(e,t,r){return this.resources.fetch({type:"checkout_com_payments"},`checkout_com_gateways/${e}/checkout_com_payments`,t,r)}isCheckoutComGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="checkout_com_gateways";export default s;
|
@@ -40,6 +40,8 @@ declare class CheckoutComPayments extends ApiResource {
|
|
40
40
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CheckoutComPayment>;
|
41
41
|
update(resource: CheckoutComPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CheckoutComPayment>;
|
42
42
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
43
|
+
order(checkoutComPaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
44
|
+
payment_gateway(checkoutComPaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
43
45
|
isCheckoutComPayment(resource: any): resource is CheckoutComPayment;
|
44
46
|
relationship(id: string | ResourceId | null): CheckoutComPaymentRel;
|
45
47
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class r extends a{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){return this.resources.fetch({type:"orders"},`checkout_com_payments/${e}/order`,t,s)}async payment_gateway(e,t,s){return this.resources.fetch({type:"payment_gateways"},`checkout_com_payments/${e}/payment_gateway`,t,s)}isCheckoutComPayment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="checkout_com_payments";export default r;
|
@@ -50,6 +50,7 @@ declare class CouponCodesPromotionRules extends ApiResource {
|
|
50
50
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
51
51
|
update(resource: CouponCodesPromotionRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
52
52
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
53
|
+
coupons(couponCodesPromotionRuleId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
53
54
|
isCouponCodesPromotionRule(resource: any): resource is CouponCodesPromotionRule;
|
54
55
|
relationship(id: string | ResourceId | null): CouponCodesPromotionRuleRel;
|
55
56
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as o}from"../resource";class t extends o{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}async coupons(e,r,s){return this.resources.fetch({type:"coupons"},`coupon_codes_promotion_rules/${e}/coupons`,r,s)}isCouponCodesPromotionRule(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="coupon_codes_promotion_rules";export default t;
|
@@ -34,6 +34,8 @@ declare class CouponRecipients extends ApiResource {
|
|
34
34
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponRecipient>;
|
35
35
|
update(resource: CouponRecipientUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponRecipient>;
|
36
36
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
37
|
+
customer(couponRecipientId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
38
|
+
attachments(couponRecipientId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
37
39
|
isCouponRecipient(resource: any): resource is CouponRecipient;
|
38
40
|
relationship(id: string | ResourceId | null): CouponRecipientRel;
|
39
41
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as c}from"../resource";class r extends c{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async customer(e,t,s){return this.resources.fetch({type:"customers"},`coupon_recipients/${e}/customer`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`coupon_recipients/${e}/attachments`,t,s)}isCouponRecipient(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="coupon_recipients";export default r;
|
@@ -36,6 +36,7 @@ declare class Coupons extends ApiResource {
|
|
36
36
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Coupon>;
|
37
37
|
update(resource: CouponUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Coupon>;
|
38
38
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
39
|
+
promotion_rule(couponId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
39
40
|
isCoupon(resource: any): resource is Coupon;
|
40
41
|
relationship(id: string | ResourceId | null): CouponRel;
|
41
42
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as o}from"../resource";class t extends o{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}async promotion_rule(e,s,r){return this.resources.fetch({type:"coupon_codes_promotion_rules"},`coupons/${e}/promotion_rule`,s,r)}isCoupon(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="coupons";export default t;
|
@@ -31,6 +31,8 @@ declare class CustomerAddresses extends ApiResource {
|
|
31
31
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerAddress>;
|
32
32
|
update(resource: CustomerAddressUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerAddress>;
|
33
33
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
34
|
+
customer(customerAddressId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
35
|
+
address(customerAddressId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
34
36
|
isCustomerAddress(resource: any): resource is CustomerAddress;
|
35
37
|
relationship(id: string | ResourceId | null): CustomerAddressRel;
|
36
38
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as c}from"../resource";class r extends c{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}async customer(e,s,t){return this.resources.fetch({type:"customers"},`customer_addresses/${e}/customer`,s,t)}async address(e,s,t){return this.resources.fetch({type:"addresses"},`customer_addresses/${e}/address`,s,t)}isCustomerAddress(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="customer_addresses";export default r;
|
@@ -25,6 +25,9 @@ declare class CustomerGroups extends ApiResource {
|
|
25
25
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerGroup>;
|
26
26
|
update(resource: CustomerGroupUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerGroup>;
|
27
27
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
28
|
+
customers(customerGroupId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Customer>>;
|
29
|
+
markets(customerGroupId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
30
|
+
attachments(customerGroupId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
28
31
|
isCustomerGroup(resource: any): resource is CustomerGroup;
|
29
32
|
relationship(id: string | ResourceId | null): CustomerGroupRel;
|
30
33
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as c}from"../resource";class s extends c{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async customers(e,t,r){return this.resources.fetch({type:"customers"},`customer_groups/${e}/customers`,t,r)}async markets(e,t,r){return this.resources.fetch({type:"markets"},`customer_groups/${e}/markets`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`customer_groups/${e}/attachments`,t,r)}isCustomerGroup(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="customer_groups";export default s;
|
@@ -24,6 +24,7 @@ declare class CustomerPasswordResets extends ApiResource {
|
|
24
24
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPasswordReset>;
|
25
25
|
update(resource: CustomerPasswordResetUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPasswordReset>;
|
26
26
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
27
|
+
customer(customerPasswordResetId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
27
28
|
isCustomerPasswordReset(resource: any): resource is CustomerPasswordReset;
|
28
29
|
relationship(id: string | ResourceId | null): CustomerPasswordResetRel;
|
29
30
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as c}from"../resource";class t extends c{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}async customer(e,s,r){return this.resources.fetch({type:"customers"},`customer_password_resets/${e}/customer`,s,r)}isCustomerPasswordReset(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="customer_password_resets";export default t;
|
@@ -61,6 +61,7 @@ declare class CustomerPaymentSources extends ApiResource {
|
|
61
61
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPaymentSource>;
|
62
62
|
update(resource: CustomerPaymentSourceUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPaymentSource>;
|
63
63
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
64
|
+
customer(customerPaymentSourceId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
64
65
|
isCustomerPaymentSource(resource: any): resource is CustomerPaymentSource;
|
65
66
|
relationship(id: string | ResourceId | null): CustomerPaymentSourceRel;
|
66
67
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as c}from"../resource";class t extends c{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}async customer(e,r,s){return this.resources.fetch({type:"customers"},`customer_payment_sources/${e}/customer`,r,s)}isCustomerPaymentSource(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="customer_payment_sources";export default t;
|
@@ -19,6 +19,7 @@ declare class CustomerSubscriptions extends ApiResource {
|
|
19
19
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerSubscription>;
|
20
20
|
update(resource: CustomerSubscriptionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerSubscription>;
|
21
21
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
22
|
+
customer(customerSubscriptionId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
22
23
|
isCustomerSubscription(resource: any): resource is CustomerSubscription;
|
23
24
|
relationship(id: string | ResourceId | null): CustomerSubscriptionRel;
|
24
25
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isCustomerSubscription(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="customer_subscriptions";export default t;
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}async customer(e,r,s){return this.resources.fetch({type:"customers"},`customer_subscriptions/${e}/customer`,r,s)}isCustomerSubscription(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="customer_subscriptions";export default t;
|
@@ -44,6 +44,14 @@ declare class Customers extends ApiResource {
|
|
44
44
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
45
45
|
update(resource: CustomerUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
46
46
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
47
|
+
customer_group(customerId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerGroup>;
|
48
|
+
customer_addresses(customerId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CustomerAddress>>;
|
49
|
+
customer_payment_sources(customerId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CustomerPaymentSource>>;
|
50
|
+
customer_subscriptions(customerId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CustomerSubscription>>;
|
51
|
+
orders(customerId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Order>>;
|
52
|
+
order_subscriptions(customerId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>>;
|
53
|
+
returns(customerId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Return>>;
|
54
|
+
attachments(customerId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
47
55
|
isCustomer(resource: any): resource is Customer;
|
48
56
|
relationship(id: string | ResourceId | null): CustomerRel;
|
49
57
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as c}from"../resource";class t extends c{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}async customer_group(e,s,r){return this.resources.fetch({type:"customer_groups"},`customers/${e}/customer_group`,s,r)}async customer_addresses(e,s,r){return this.resources.fetch({type:"customer_addresses"},`customers/${e}/customer_addresses`,s,r)}async customer_payment_sources(e,s,r){return this.resources.fetch({type:"customer_payment_sources"},`customers/${e}/customer_payment_sources`,s,r)}async customer_subscriptions(e,s,r){return this.resources.fetch({type:"customer_subscriptions"},`customers/${e}/customer_subscriptions`,s,r)}async orders(e,s,r){return this.resources.fetch({type:"orders"},`customers/${e}/orders`,s,r)}async order_subscriptions(e,s,r){return this.resources.fetch({type:"order_subscriptions"},`customers/${e}/order_subscriptions`,s,r)}async returns(e,s,r){return this.resources.fetch({type:"returns"},`customers/${e}/returns`,s,r)}async attachments(e,s,r){return this.resources.fetch({type:"attachments"},`customers/${e}/attachments`,s,r)}isCustomer(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="customers";export default t;
|
@@ -40,6 +40,9 @@ declare class DeliveryLeadTimes extends ApiResource {
|
|
40
40
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
|
41
41
|
update(resource: DeliveryLeadTimeUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
|
42
42
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
43
|
+
stock_location(deliveryLeadTimeId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
44
|
+
shipping_method(deliveryLeadTimeId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
45
|
+
attachments(deliveryLeadTimeId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
43
46
|
isDeliveryLeadTime(resource: any): resource is DeliveryLeadTime;
|
44
47
|
relationship(id: string | ResourceId | null): DeliveryLeadTimeRel;
|
45
48
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class s extends i{async list(e,
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async stock_location(e,t,r){return this.resources.fetch({type:"stock_locations"},`delivery_lead_times/${e}/stock_location`,t,r)}async shipping_method(e,t,r){return this.resources.fetch({type:"shipping_methods"},`delivery_lead_times/${e}/shipping_method`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`delivery_lead_times/${e}/attachments`,t,r)}isDeliveryLeadTime(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="delivery_lead_times";export default s;
|
@@ -15,6 +15,7 @@ declare class EventCallbacks extends ApiResource {
|
|
15
15
|
static readonly TYPE: 'event_callbacks';
|
16
16
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
|
17
17
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<EventCallback>;
|
18
|
+
webhook(eventCallbackId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
18
19
|
isEventCallback(resource: any): resource is EventCallback;
|
19
20
|
relationship(id: string | ResourceId | null): EventCallbackRel;
|
20
21
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async webhook(e,s,r){return this.resources.fetch({type:"webhooks"},`event_callbacks/${e}/webhook`,s,r)}isEventCallback(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="event_callbacks";export default t;
|
@@ -39,6 +39,8 @@ declare class ExternalGateways extends ApiResource {
|
|
39
39
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
|
40
40
|
update(resource: ExternalGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
|
41
41
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
42
|
+
payment_methods(externalGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
43
|
+
external_payments(externalGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalPayment>>;
|
42
44
|
isExternalGateway(resource: any): resource is ExternalGateway;
|
43
45
|
relationship(id: string | ResourceId | null): ExternalGatewayRel;
|
44
46
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as r}from"../resource";class s extends r{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,a){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,a)}async retrieve(e,t,a){return this.resources.retrieve({type:s.TYPE,id:e},t,a)}async update(e,t,a){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,a)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async payment_methods(e,t,a){return this.resources.fetch({type:"payment_methods"},`external_gateways/${e}/payment_methods`,t,a)}async external_payments(e,t,a){return this.resources.fetch({type:"external_payments"},`external_gateways/${e}/external_payments`,t,a)}isExternalGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="external_gateways";export default s;
|
@@ -32,6 +32,9 @@ declare class ExternalPayments extends ApiResource {
|
|
32
32
|
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPayment>;
|
33
33
|
update(resource: ExternalPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPayment>;
|
34
34
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
35
|
+
order(externalPaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
36
|
+
payment_gateway(externalPaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
37
|
+
wallet(externalPaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPaymentSource>;
|
35
38
|
isExternalPayment(resource: any): resource is ExternalPayment;
|
36
39
|
relationship(id: string | ResourceId | null): ExternalPaymentRel;
|
37
40
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class r extends a{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){return this.resources.fetch({type:"orders"},`external_payments/${e}/order`,t,s)}async payment_gateway(e,t,s){return this.resources.fetch({type:"payment_gateways"},`external_payments/${e}/payment_gateway`,t,s)}async wallet(e,t,s){return this.resources.fetch({type:"customer_payment_sources"},`external_payments/${e}/wallet`,t,s)}isExternalPayment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="external_payments";export default r;
|