@commercelayer/sdk 5.12.4 → 5.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +11 -2
- package/lib/cjs/api.js +4 -1
- package/lib/cjs/commercelayer.d.ts +4 -3
- package/lib/cjs/commercelayer.js +6 -1
- package/lib/cjs/config.js +3 -1
- package/lib/cjs/model.d.ts +1 -0
- package/lib/cjs/resource.d.ts +1 -1
- package/lib/cjs/resource.js +6 -0
- package/lib/cjs/resources/addresses.d.ts +3 -0
- package/lib/cjs/resources/addresses.js +4 -0
- package/lib/cjs/resources/adjustments.d.ts +5 -2
- package/lib/cjs/resources/adjustments.js +4 -0
- package/lib/cjs/resources/adyen_gateways.d.ts +3 -0
- package/lib/cjs/resources/adyen_gateways.js +4 -0
- package/lib/cjs/resources/adyen_payments.d.ts +5 -2
- package/lib/cjs/resources/adyen_payments.js +4 -0
- package/lib/cjs/resources/authorizations.d.ts +3 -0
- package/lib/cjs/resources/authorizations.js +4 -0
- package/lib/cjs/resources/avalara_accounts.d.ts +3 -0
- package/lib/cjs/resources/avalara_accounts.js +4 -0
- package/lib/cjs/resources/axerve_gateways.d.ts +4 -0
- package/lib/cjs/resources/axerve_gateways.js +4 -0
- package/lib/cjs/resources/axerve_payments.d.ts +5 -2
- package/lib/cjs/resources/axerve_payments.js +4 -0
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +3 -0
- package/lib/cjs/resources/billing_info_validation_rules.js +4 -0
- package/lib/cjs/resources/braintree_gateways.d.ts +3 -0
- package/lib/cjs/resources/braintree_gateways.js +4 -0
- package/lib/cjs/resources/braintree_payments.d.ts +5 -2
- package/lib/cjs/resources/braintree_payments.js +4 -0
- package/lib/cjs/resources/bundles.d.ts +3 -0
- package/lib/cjs/resources/bundles.js +4 -0
- package/lib/cjs/resources/captures.d.ts +3 -0
- package/lib/cjs/resources/captures.js +4 -0
- package/lib/cjs/resources/carrier_accounts.d.ts +3 -0
- package/lib/cjs/resources/carrier_accounts.js +4 -0
- package/lib/cjs/resources/checkout_com_gateways.d.ts +3 -0
- package/lib/cjs/resources/checkout_com_gateways.js +4 -0
- package/lib/cjs/resources/checkout_com_payments.d.ts +5 -2
- package/lib/cjs/resources/checkout_com_payments.js +4 -0
- package/lib/cjs/resources/cleanups.d.ts +3 -0
- package/lib/cjs/resources/cleanups.js +4 -0
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +3 -0
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +4 -0
- package/lib/cjs/resources/coupon_recipients.d.ts +3 -0
- package/lib/cjs/resources/coupon_recipients.js +4 -0
- package/lib/cjs/resources/coupons.d.ts +3 -0
- package/lib/cjs/resources/coupons.js +4 -0
- package/lib/cjs/resources/customer_addresses.d.ts +3 -0
- package/lib/cjs/resources/customer_addresses.js +4 -0
- package/lib/cjs/resources/customer_groups.d.ts +3 -0
- package/lib/cjs/resources/customer_groups.js +4 -0
- package/lib/cjs/resources/customer_payment_sources.d.ts +8 -13
- package/lib/cjs/resources/customer_payment_sources.js +4 -0
- package/lib/cjs/resources/customer_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/customer_subscriptions.js +4 -0
- package/lib/cjs/resources/delivery_lead_times.d.ts +3 -0
- package/lib/cjs/resources/delivery_lead_times.js +4 -0
- package/lib/cjs/resources/external_gateways.d.ts +3 -0
- package/lib/cjs/resources/external_gateways.js +4 -0
- package/lib/cjs/resources/external_payments.d.ts +5 -2
- package/lib/cjs/resources/external_payments.js +4 -0
- package/lib/cjs/resources/external_promotions.d.ts +3 -0
- package/lib/cjs/resources/external_promotions.js +4 -0
- package/lib/cjs/resources/external_tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/external_tax_calculators.js +4 -0
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +3 -0
- package/lib/cjs/resources/fixed_amount_promotions.js +4 -0
- package/lib/cjs/resources/fixed_price_promotions.d.ts +3 -0
- package/lib/cjs/resources/fixed_price_promotions.js +4 -0
- package/lib/cjs/resources/free_gift_promotions.d.ts +3 -0
- package/lib/cjs/resources/free_gift_promotions.js +4 -0
- package/lib/cjs/resources/free_shipping_promotions.d.ts +3 -0
- package/lib/cjs/resources/free_shipping_promotions.js +4 -0
- package/lib/cjs/resources/gift_card_recipients.d.ts +3 -0
- package/lib/cjs/resources/gift_card_recipients.js +4 -0
- package/lib/cjs/resources/gift_cards.d.ts +3 -0
- package/lib/cjs/resources/gift_cards.js +4 -0
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/in_stock_subscriptions.js +4 -0
- package/lib/cjs/resources/inventory_models.d.ts +3 -0
- package/lib/cjs/resources/inventory_models.js +4 -0
- package/lib/cjs/resources/inventory_return_locations.d.ts +5 -2
- package/lib/cjs/resources/inventory_return_locations.js +4 -0
- package/lib/cjs/resources/inventory_stock_locations.d.ts +5 -2
- package/lib/cjs/resources/inventory_stock_locations.js +4 -0
- package/lib/cjs/resources/klarna_gateways.d.ts +3 -0
- package/lib/cjs/resources/klarna_gateways.js +4 -0
- package/lib/cjs/resources/klarna_payments.d.ts +5 -2
- package/lib/cjs/resources/klarna_payments.js +4 -0
- package/lib/cjs/resources/manual_gateways.d.ts +3 -0
- package/lib/cjs/resources/manual_gateways.js +4 -0
- package/lib/cjs/resources/manual_tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/manual_tax_calculators.js +4 -0
- package/lib/cjs/resources/markets.d.ts +3 -0
- package/lib/cjs/resources/markets.js +4 -0
- package/lib/cjs/resources/merchants.d.ts +3 -0
- package/lib/cjs/resources/merchants.js +4 -0
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +5 -2
- package/lib/cjs/resources/order_amount_promotion_rules.js +4 -0
- package/lib/cjs/resources/order_subscription_items.d.ts +3 -0
- package/lib/cjs/resources/order_subscription_items.js +4 -0
- package/lib/cjs/resources/order_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/order_subscriptions.js +4 -0
- package/lib/cjs/resources/order_validation_rules.d.ts +3 -0
- package/lib/cjs/resources/order_validation_rules.js +4 -0
- package/lib/cjs/resources/orders.d.ts +8 -2
- package/lib/cjs/resources/orders.js +4 -0
- package/lib/cjs/resources/packages.d.ts +3 -0
- package/lib/cjs/resources/packages.js +4 -0
- package/lib/cjs/resources/parcel_line_items.d.ts +5 -2
- package/lib/cjs/resources/parcel_line_items.js +4 -0
- package/lib/cjs/resources/parcels.d.ts +3 -0
- package/lib/cjs/resources/parcels.js +4 -0
- package/lib/cjs/resources/payment_gateways.d.ts +3 -0
- package/lib/cjs/resources/payment_gateways.js +4 -0
- package/lib/cjs/resources/payment_methods.d.ts +3 -0
- package/lib/cjs/resources/payment_methods.js +4 -0
- package/lib/cjs/resources/paypal_gateways.d.ts +3 -0
- package/lib/cjs/resources/paypal_gateways.js +4 -0
- package/lib/cjs/resources/paypal_payments.d.ts +5 -2
- package/lib/cjs/resources/paypal_payments.js +4 -0
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +3 -0
- package/lib/cjs/resources/percentage_discount_promotions.js +4 -0
- package/lib/cjs/resources/price_frequency_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_frequency_tiers.js +4 -0
- package/lib/cjs/resources/price_lists.d.ts +3 -0
- package/lib/cjs/resources/price_lists.js +4 -0
- package/lib/cjs/resources/price_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_tiers.js +4 -0
- package/lib/cjs/resources/price_volume_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_volume_tiers.js +4 -0
- package/lib/cjs/resources/prices.d.ts +3 -0
- package/lib/cjs/resources/prices.js +4 -0
- package/lib/cjs/resources/promotion_rules.d.ts +5 -1
- package/lib/cjs/resources/promotion_rules.js +4 -0
- package/lib/cjs/resources/promotions.d.ts +3 -0
- package/lib/cjs/resources/promotions.js +4 -0
- package/lib/cjs/resources/refunds.d.ts +3 -0
- package/lib/cjs/resources/refunds.js +4 -0
- package/lib/cjs/resources/returns.d.ts +3 -0
- package/lib/cjs/resources/returns.js +4 -0
- package/lib/cjs/resources/satispay_gateways.d.ts +3 -0
- package/lib/cjs/resources/satispay_gateways.js +4 -0
- package/lib/cjs/resources/satispay_payments.d.ts +6 -2
- package/lib/cjs/resources/satispay_payments.js +4 -0
- package/lib/cjs/resources/shipments.d.ts +3 -0
- package/lib/cjs/resources/shipments.js +4 -0
- package/lib/cjs/resources/shipping_categories.d.ts +3 -0
- package/lib/cjs/resources/shipping_categories.js +4 -0
- package/lib/cjs/resources/shipping_method_tiers.d.ts +3 -0
- package/lib/cjs/resources/shipping_method_tiers.js +4 -0
- package/lib/cjs/resources/shipping_methods.d.ts +3 -0
- package/lib/cjs/resources/shipping_methods.js +4 -0
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +3 -0
- package/lib/cjs/resources/shipping_weight_tiers.js +4 -0
- package/lib/cjs/resources/shipping_zones.d.ts +3 -0
- package/lib/cjs/resources/shipping_zones.js +4 -0
- package/lib/cjs/resources/sku_list_items.d.ts +5 -2
- package/lib/cjs/resources/sku_list_items.js +4 -0
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +3 -0
- package/lib/cjs/resources/sku_list_promotion_rules.js +4 -0
- package/lib/cjs/resources/sku_lists.d.ts +3 -0
- package/lib/cjs/resources/sku_lists.js +4 -0
- package/lib/cjs/resources/sku_options.d.ts +3 -0
- package/lib/cjs/resources/sku_options.js +4 -0
- package/lib/cjs/resources/skus.d.ts +3 -0
- package/lib/cjs/resources/skus.js +4 -0
- package/lib/cjs/resources/stock_items.d.ts +3 -0
- package/lib/cjs/resources/stock_items.js +4 -0
- package/lib/cjs/resources/stock_line_items.d.ts +5 -2
- package/lib/cjs/resources/stock_line_items.js +4 -0
- package/lib/cjs/resources/stock_locations.d.ts +3 -0
- package/lib/cjs/resources/stock_locations.js +4 -0
- package/lib/cjs/resources/stock_transfers.d.ts +3 -0
- package/lib/cjs/resources/stock_transfers.js +4 -0
- package/lib/cjs/resources/stripe_gateways.d.ts +3 -0
- package/lib/cjs/resources/stripe_gateways.js +4 -0
- package/lib/cjs/resources/stripe_payments.d.ts +8 -2
- package/lib/cjs/resources/stripe_payments.js +4 -0
- package/lib/cjs/resources/tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/tax_calculators.js +4 -0
- package/lib/cjs/resources/tax_categories.d.ts +3 -0
- package/lib/cjs/resources/tax_categories.js +4 -0
- package/lib/cjs/resources/tax_rules.d.ts +5 -2
- package/lib/cjs/resources/tax_rules.js +4 -0
- package/lib/cjs/resources/taxjar_accounts.d.ts +3 -0
- package/lib/cjs/resources/taxjar_accounts.js +4 -0
- package/lib/cjs/resources/transactions.d.ts +3 -0
- package/lib/cjs/resources/transactions.js +4 -0
- package/lib/cjs/resources/versions.d.ts +22 -0
- package/lib/cjs/resources/versions.js +16 -0
- package/lib/cjs/resources/voids.d.ts +3 -0
- package/lib/cjs/resources/voids.js +4 -0
- package/lib/cjs/resources/webhooks.d.ts +3 -0
- package/lib/cjs/resources/webhooks.js +4 -0
- package/lib/cjs/resources/wire_transfers.d.ts +5 -2
- package/lib/cjs/resources/wire_transfers.js +4 -0
- package/lib/cjs/util.d.ts +1 -1
- package/lib/esm/api.d.ts +11 -2
- package/lib/esm/api.js +2 -0
- package/lib/esm/commercelayer.d.ts +4 -3
- package/lib/esm/commercelayer.js +6 -1
- package/lib/esm/config.js +3 -1
- package/lib/esm/model.d.ts +1 -0
- package/lib/esm/resource.d.ts +1 -1
- package/lib/esm/resource.js +6 -0
- package/lib/esm/resources/addresses.d.ts +3 -0
- package/lib/esm/resources/addresses.js +4 -0
- package/lib/esm/resources/adjustments.d.ts +5 -2
- package/lib/esm/resources/adjustments.js +4 -0
- package/lib/esm/resources/adyen_gateways.d.ts +3 -0
- package/lib/esm/resources/adyen_gateways.js +4 -0
- package/lib/esm/resources/adyen_payments.d.ts +5 -2
- package/lib/esm/resources/adyen_payments.js +4 -0
- package/lib/esm/resources/authorizations.d.ts +3 -0
- package/lib/esm/resources/authorizations.js +4 -0
- package/lib/esm/resources/avalara_accounts.d.ts +3 -0
- package/lib/esm/resources/avalara_accounts.js +4 -0
- package/lib/esm/resources/axerve_gateways.d.ts +4 -0
- package/lib/esm/resources/axerve_gateways.js +4 -0
- package/lib/esm/resources/axerve_payments.d.ts +5 -2
- package/lib/esm/resources/axerve_payments.js +4 -0
- package/lib/esm/resources/billing_info_validation_rules.d.ts +3 -0
- package/lib/esm/resources/billing_info_validation_rules.js +4 -0
- package/lib/esm/resources/braintree_gateways.d.ts +3 -0
- package/lib/esm/resources/braintree_gateways.js +4 -0
- package/lib/esm/resources/braintree_payments.d.ts +5 -2
- package/lib/esm/resources/braintree_payments.js +4 -0
- package/lib/esm/resources/bundles.d.ts +3 -0
- package/lib/esm/resources/bundles.js +4 -0
- package/lib/esm/resources/captures.d.ts +3 -0
- package/lib/esm/resources/captures.js +4 -0
- package/lib/esm/resources/carrier_accounts.d.ts +3 -0
- package/lib/esm/resources/carrier_accounts.js +4 -0
- package/lib/esm/resources/checkout_com_gateways.d.ts +3 -0
- package/lib/esm/resources/checkout_com_gateways.js +4 -0
- package/lib/esm/resources/checkout_com_payments.d.ts +5 -2
- package/lib/esm/resources/checkout_com_payments.js +4 -0
- package/lib/esm/resources/cleanups.d.ts +3 -0
- package/lib/esm/resources/cleanups.js +4 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +3 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.js +4 -0
- package/lib/esm/resources/coupon_recipients.d.ts +3 -0
- package/lib/esm/resources/coupon_recipients.js +4 -0
- package/lib/esm/resources/coupons.d.ts +3 -0
- package/lib/esm/resources/coupons.js +4 -0
- package/lib/esm/resources/customer_addresses.d.ts +3 -0
- package/lib/esm/resources/customer_addresses.js +4 -0
- package/lib/esm/resources/customer_groups.d.ts +3 -0
- package/lib/esm/resources/customer_groups.js +4 -0
- package/lib/esm/resources/customer_payment_sources.d.ts +8 -13
- package/lib/esm/resources/customer_payment_sources.js +4 -0
- package/lib/esm/resources/customer_subscriptions.d.ts +3 -0
- package/lib/esm/resources/customer_subscriptions.js +4 -0
- package/lib/esm/resources/delivery_lead_times.d.ts +3 -0
- package/lib/esm/resources/delivery_lead_times.js +4 -0
- package/lib/esm/resources/external_gateways.d.ts +3 -0
- package/lib/esm/resources/external_gateways.js +4 -0
- package/lib/esm/resources/external_payments.d.ts +5 -2
- package/lib/esm/resources/external_payments.js +4 -0
- package/lib/esm/resources/external_promotions.d.ts +3 -0
- package/lib/esm/resources/external_promotions.js +4 -0
- package/lib/esm/resources/external_tax_calculators.d.ts +3 -0
- package/lib/esm/resources/external_tax_calculators.js +4 -0
- package/lib/esm/resources/fixed_amount_promotions.d.ts +3 -0
- package/lib/esm/resources/fixed_amount_promotions.js +4 -0
- package/lib/esm/resources/fixed_price_promotions.d.ts +3 -0
- package/lib/esm/resources/fixed_price_promotions.js +4 -0
- package/lib/esm/resources/free_gift_promotions.d.ts +3 -0
- package/lib/esm/resources/free_gift_promotions.js +4 -0
- package/lib/esm/resources/free_shipping_promotions.d.ts +3 -0
- package/lib/esm/resources/free_shipping_promotions.js +4 -0
- package/lib/esm/resources/gift_card_recipients.d.ts +3 -0
- package/lib/esm/resources/gift_card_recipients.js +4 -0
- package/lib/esm/resources/gift_cards.d.ts +3 -0
- package/lib/esm/resources/gift_cards.js +4 -0
- package/lib/esm/resources/in_stock_subscriptions.d.ts +3 -0
- package/lib/esm/resources/in_stock_subscriptions.js +4 -0
- package/lib/esm/resources/inventory_models.d.ts +3 -0
- package/lib/esm/resources/inventory_models.js +4 -0
- package/lib/esm/resources/inventory_return_locations.d.ts +5 -2
- package/lib/esm/resources/inventory_return_locations.js +4 -0
- package/lib/esm/resources/inventory_stock_locations.d.ts +5 -2
- package/lib/esm/resources/inventory_stock_locations.js +4 -0
- package/lib/esm/resources/klarna_gateways.d.ts +3 -0
- package/lib/esm/resources/klarna_gateways.js +4 -0
- package/lib/esm/resources/klarna_payments.d.ts +5 -2
- package/lib/esm/resources/klarna_payments.js +4 -0
- package/lib/esm/resources/manual_gateways.d.ts +3 -0
- package/lib/esm/resources/manual_gateways.js +4 -0
- package/lib/esm/resources/manual_tax_calculators.d.ts +3 -0
- package/lib/esm/resources/manual_tax_calculators.js +4 -0
- package/lib/esm/resources/markets.d.ts +3 -0
- package/lib/esm/resources/markets.js +4 -0
- package/lib/esm/resources/merchants.d.ts +3 -0
- package/lib/esm/resources/merchants.js +4 -0
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +5 -2
- package/lib/esm/resources/order_amount_promotion_rules.js +4 -0
- package/lib/esm/resources/order_subscription_items.d.ts +3 -0
- package/lib/esm/resources/order_subscription_items.js +4 -0
- package/lib/esm/resources/order_subscriptions.d.ts +3 -0
- package/lib/esm/resources/order_subscriptions.js +4 -0
- package/lib/esm/resources/order_validation_rules.d.ts +3 -0
- package/lib/esm/resources/order_validation_rules.js +4 -0
- package/lib/esm/resources/orders.d.ts +8 -2
- package/lib/esm/resources/orders.js +4 -0
- package/lib/esm/resources/packages.d.ts +3 -0
- package/lib/esm/resources/packages.js +4 -0
- package/lib/esm/resources/parcel_line_items.d.ts +5 -2
- package/lib/esm/resources/parcel_line_items.js +4 -0
- package/lib/esm/resources/parcels.d.ts +3 -0
- package/lib/esm/resources/parcels.js +4 -0
- package/lib/esm/resources/payment_gateways.d.ts +3 -0
- package/lib/esm/resources/payment_gateways.js +4 -0
- package/lib/esm/resources/payment_methods.d.ts +3 -0
- package/lib/esm/resources/payment_methods.js +4 -0
- package/lib/esm/resources/paypal_gateways.d.ts +3 -0
- package/lib/esm/resources/paypal_gateways.js +4 -0
- package/lib/esm/resources/paypal_payments.d.ts +5 -2
- package/lib/esm/resources/paypal_payments.js +4 -0
- package/lib/esm/resources/percentage_discount_promotions.d.ts +3 -0
- package/lib/esm/resources/percentage_discount_promotions.js +4 -0
- package/lib/esm/resources/price_frequency_tiers.d.ts +3 -0
- package/lib/esm/resources/price_frequency_tiers.js +4 -0
- package/lib/esm/resources/price_lists.d.ts +3 -0
- package/lib/esm/resources/price_lists.js +4 -0
- package/lib/esm/resources/price_tiers.d.ts +3 -0
- package/lib/esm/resources/price_tiers.js +4 -0
- package/lib/esm/resources/price_volume_tiers.d.ts +3 -0
- package/lib/esm/resources/price_volume_tiers.js +4 -0
- package/lib/esm/resources/prices.d.ts +3 -0
- package/lib/esm/resources/prices.js +4 -0
- package/lib/esm/resources/promotion_rules.d.ts +5 -1
- package/lib/esm/resources/promotion_rules.js +4 -0
- package/lib/esm/resources/promotions.d.ts +3 -0
- package/lib/esm/resources/promotions.js +4 -0
- package/lib/esm/resources/refunds.d.ts +3 -0
- package/lib/esm/resources/refunds.js +4 -0
- package/lib/esm/resources/returns.d.ts +3 -0
- package/lib/esm/resources/returns.js +4 -0
- package/lib/esm/resources/satispay_gateways.d.ts +3 -0
- package/lib/esm/resources/satispay_gateways.js +4 -0
- package/lib/esm/resources/satispay_payments.d.ts +6 -2
- package/lib/esm/resources/satispay_payments.js +4 -0
- package/lib/esm/resources/shipments.d.ts +3 -0
- package/lib/esm/resources/shipments.js +4 -0
- package/lib/esm/resources/shipping_categories.d.ts +3 -0
- package/lib/esm/resources/shipping_categories.js +4 -0
- package/lib/esm/resources/shipping_method_tiers.d.ts +3 -0
- package/lib/esm/resources/shipping_method_tiers.js +4 -0
- package/lib/esm/resources/shipping_methods.d.ts +3 -0
- package/lib/esm/resources/shipping_methods.js +4 -0
- package/lib/esm/resources/shipping_weight_tiers.d.ts +3 -0
- package/lib/esm/resources/shipping_weight_tiers.js +4 -0
- package/lib/esm/resources/shipping_zones.d.ts +3 -0
- package/lib/esm/resources/shipping_zones.js +4 -0
- package/lib/esm/resources/sku_list_items.d.ts +5 -2
- package/lib/esm/resources/sku_list_items.js +4 -0
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +3 -0
- package/lib/esm/resources/sku_list_promotion_rules.js +4 -0
- package/lib/esm/resources/sku_lists.d.ts +3 -0
- package/lib/esm/resources/sku_lists.js +4 -0
- package/lib/esm/resources/sku_options.d.ts +3 -0
- package/lib/esm/resources/sku_options.js +4 -0
- package/lib/esm/resources/skus.d.ts +3 -0
- package/lib/esm/resources/skus.js +4 -0
- package/lib/esm/resources/stock_items.d.ts +3 -0
- package/lib/esm/resources/stock_items.js +4 -0
- package/lib/esm/resources/stock_line_items.d.ts +5 -2
- package/lib/esm/resources/stock_line_items.js +4 -0
- package/lib/esm/resources/stock_locations.d.ts +3 -0
- package/lib/esm/resources/stock_locations.js +4 -0
- package/lib/esm/resources/stock_transfers.d.ts +3 -0
- package/lib/esm/resources/stock_transfers.js +4 -0
- package/lib/esm/resources/stripe_gateways.d.ts +3 -0
- package/lib/esm/resources/stripe_gateways.js +4 -0
- package/lib/esm/resources/stripe_payments.d.ts +8 -2
- package/lib/esm/resources/stripe_payments.js +4 -0
- package/lib/esm/resources/tax_calculators.d.ts +3 -0
- package/lib/esm/resources/tax_calculators.js +4 -0
- package/lib/esm/resources/tax_categories.d.ts +3 -0
- package/lib/esm/resources/tax_categories.js +4 -0
- package/lib/esm/resources/tax_rules.d.ts +5 -2
- package/lib/esm/resources/tax_rules.js +4 -0
- package/lib/esm/resources/taxjar_accounts.d.ts +3 -0
- package/lib/esm/resources/taxjar_accounts.js +4 -0
- package/lib/esm/resources/transactions.d.ts +3 -0
- package/lib/esm/resources/transactions.js +4 -0
- package/lib/esm/resources/versions.d.ts +22 -0
- package/lib/esm/resources/versions.js +14 -0
- package/lib/esm/resources/voids.d.ts +3 -0
- package/lib/esm/resources/voids.js +4 -0
- package/lib/esm/resources/webhooks.d.ts +3 -0
- package/lib/esm/resources/webhooks.js +4 -0
- package/lib/esm/resources/wire_transfers.d.ts +5 -2
- package/lib/esm/resources/wire_transfers.js +4 -0
- package/lib/esm/util.d.ts +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
@@ -1,8 +1,9 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve } from '../query';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { StockLocation, StockLocationType } from './stock_locations';
|
5
5
|
import type { InventoryModel, InventoryModelType } from './inventory_models';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type InventoryReturnLocationType = 'inventory_return_locations';
|
7
8
|
type InventoryReturnLocationRel = ResourceRel & {
|
8
9
|
type: InventoryReturnLocationType;
|
@@ -18,6 +19,7 @@ interface InventoryReturnLocation extends Resource {
|
|
18
19
|
priority: number;
|
19
20
|
stock_location?: StockLocation | null;
|
20
21
|
inventory_model?: InventoryModel | null;
|
22
|
+
versions?: Version[] | null;
|
21
23
|
}
|
22
24
|
interface InventoryReturnLocationCreate extends ResourceCreate {
|
23
25
|
priority: number;
|
@@ -36,6 +38,7 @@ declare class InventoryReturnLocations extends ApiResource<InventoryReturnLocati
|
|
36
38
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
37
39
|
stock_location(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
38
40
|
inventory_model(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryModel>;
|
41
|
+
versions(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
39
42
|
isInventoryReturnLocation(resource: any): resource is InventoryReturnLocation;
|
40
43
|
relationship(id: string | ResourceId | null): InventoryReturnLocationRel;
|
41
44
|
type(): InventoryReturnLocationType;
|
@@ -17,6 +17,10 @@ class InventoryReturnLocations extends ApiResource {
|
|
17
17
|
const _inventoryReturnLocationId = inventoryReturnLocationId.id || inventoryReturnLocationId;
|
18
18
|
return this.resources.fetch({ type: 'inventory_models' }, `inventory_return_locations/${_inventoryReturnLocationId}/inventory_model`, params, options);
|
19
19
|
}
|
20
|
+
async versions(inventoryReturnLocationId, params, options) {
|
21
|
+
const _inventoryReturnLocationId = inventoryReturnLocationId.id || inventoryReturnLocationId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `inventory_return_locations/${_inventoryReturnLocationId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
isInventoryReturnLocation(resource) {
|
21
25
|
return resource.type && (resource.type === InventoryReturnLocations.TYPE);
|
22
26
|
}
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve } from '../query';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { StockLocation, StockLocationType } from './stock_locations';
|
5
5
|
import type { InventoryModel, InventoryModelType } from './inventory_models';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type InventoryStockLocationType = 'inventory_stock_locations';
|
7
8
|
type InventoryStockLocationRel = ResourceRel & {
|
8
9
|
type: InventoryStockLocationType;
|
@@ -19,6 +20,7 @@ interface InventoryStockLocation extends Resource {
|
|
19
20
|
on_hold?: boolean | null;
|
20
21
|
stock_location?: StockLocation | null;
|
21
22
|
inventory_model?: InventoryModel | null;
|
23
|
+
versions?: Version[] | null;
|
22
24
|
}
|
23
25
|
interface InventoryStockLocationCreate extends ResourceCreate {
|
24
26
|
priority: number;
|
@@ -39,6 +41,7 @@ declare class InventoryStockLocations extends ApiResource<InventoryStockLocation
|
|
39
41
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
40
42
|
stock_location(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
41
43
|
inventory_model(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryModel>;
|
44
|
+
versions(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
42
45
|
isInventoryStockLocation(resource: any): resource is InventoryStockLocation;
|
43
46
|
relationship(id: string | ResourceId | null): InventoryStockLocationRel;
|
44
47
|
type(): InventoryStockLocationType;
|
@@ -17,6 +17,10 @@ class InventoryStockLocations extends ApiResource {
|
|
17
17
|
const _inventoryStockLocationId = inventoryStockLocationId.id || inventoryStockLocationId;
|
18
18
|
return this.resources.fetch({ type: 'inventory_models' }, `inventory_stock_locations/${_inventoryStockLocationId}/inventory_model`, params, options);
|
19
19
|
}
|
20
|
+
async versions(inventoryStockLocationId, params, options) {
|
21
|
+
const _inventoryStockLocationId = inventoryStockLocationId.id || inventoryStockLocationId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `inventory_stock_locations/${_inventoryStockLocationId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
isInventoryStockLocation(resource) {
|
21
25
|
return resource.type && (resource.type === InventoryStockLocations.TYPE);
|
22
26
|
}
|
@@ -2,6 +2,7 @@ import { ApiResource } from '../resource';
|
|
2
2
|
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { PaymentMethod } from './payment_methods';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
import type { KlarnaPayment, KlarnaPaymentType } from './klarna_payments';
|
6
7
|
type KlarnaGatewayType = 'klarna_gateways';
|
7
8
|
type KlarnaGatewayRel = ResourceRel & {
|
@@ -14,6 +15,7 @@ interface KlarnaGateway extends Resource {
|
|
14
15
|
readonly type: KlarnaGatewayType;
|
15
16
|
name: string;
|
16
17
|
payment_methods?: PaymentMethod[] | null;
|
18
|
+
versions?: Version[] | null;
|
17
19
|
klarna_payments?: KlarnaPayment[] | null;
|
18
20
|
}
|
19
21
|
interface KlarnaGatewayCreate extends ResourceCreate {
|
@@ -36,6 +38,7 @@ declare class KlarnaGateways extends ApiResource<KlarnaGateway> {
|
|
36
38
|
update(resource: KlarnaGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaGateway>;
|
37
39
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
38
40
|
payment_methods(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
41
|
+
versions(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
39
42
|
klarna_payments(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<KlarnaPayment>>;
|
40
43
|
isKlarnaGateway(resource: any): resource is KlarnaGateway;
|
41
44
|
relationship(id: string | ResourceId | null): KlarnaGatewayRel;
|
@@ -13,6 +13,10 @@ class KlarnaGateways extends ApiResource {
|
|
13
13
|
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
14
14
|
return this.resources.fetch({ type: 'payment_methods' }, `klarna_gateways/${_klarnaGatewayId}/payment_methods`, params, options);
|
15
15
|
}
|
16
|
+
async versions(klarnaGatewayId, params, options) {
|
17
|
+
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
18
|
+
return this.resources.fetch({ type: 'versions' }, `klarna_gateways/${_klarnaGatewayId}/versions`, params, options);
|
19
|
+
}
|
16
20
|
async klarna_payments(klarnaGatewayId, params, options) {
|
17
21
|
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
18
22
|
return this.resources.fetch({ type: 'klarna_payments' }, `klarna_gateways/${_klarnaGatewayId}/klarna_payments`, params, options);
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve } from '../query';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Order, OrderType } from './orders';
|
5
5
|
import type { PaymentGateway } from './payment_gateways';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type KlarnaPaymentType = 'klarna_payments';
|
7
8
|
type KlarnaPaymentRel = ResourceRel & {
|
8
9
|
type: KlarnaPaymentType;
|
@@ -23,6 +24,7 @@ interface KlarnaPayment extends Resource {
|
|
23
24
|
payment_instrument?: Record<string, any> | null;
|
24
25
|
order?: Order | null;
|
25
26
|
payment_gateway?: PaymentGateway | null;
|
27
|
+
versions?: Version[] | null;
|
26
28
|
}
|
27
29
|
interface KlarnaPaymentCreate extends ResourceCreate {
|
28
30
|
order: OrderRel;
|
@@ -39,6 +41,7 @@ declare class KlarnaPayments extends ApiResource<KlarnaPayment> {
|
|
39
41
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
40
42
|
order(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
41
43
|
payment_gateway(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
44
|
+
versions(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
42
45
|
_update(id: string | KlarnaPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaPayment>;
|
43
46
|
isKlarnaPayment(resource: any): resource is KlarnaPayment;
|
44
47
|
relationship(id: string | ResourceId | null): KlarnaPaymentRel;
|
@@ -17,6 +17,10 @@ class KlarnaPayments extends ApiResource {
|
|
17
17
|
const _klarnaPaymentId = klarnaPaymentId.id || klarnaPaymentId;
|
18
18
|
return this.resources.fetch({ type: 'payment_gateways' }, `klarna_payments/${_klarnaPaymentId}/payment_gateway`, params, options);
|
19
19
|
}
|
20
|
+
async versions(klarnaPaymentId, params, options) {
|
21
|
+
const _klarnaPaymentId = klarnaPaymentId.id || klarnaPaymentId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `klarna_payments/${_klarnaPaymentId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
async _update(id, params, options) {
|
21
25
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: KlarnaPayments.TYPE, _update: true }, params, options);
|
22
26
|
}
|
@@ -2,6 +2,7 @@ import { ApiResource } from '../resource';
|
|
2
2
|
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { PaymentMethod } from './payment_methods';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type ManualGatewayType = 'manual_gateways';
|
6
7
|
type ManualGatewayRel = ResourceRel & {
|
7
8
|
type: ManualGatewayType;
|
@@ -10,6 +11,7 @@ interface ManualGateway extends Resource {
|
|
10
11
|
readonly type: ManualGatewayType;
|
11
12
|
name: string;
|
12
13
|
payment_methods?: PaymentMethod[] | null;
|
14
|
+
versions?: Version[] | null;
|
13
15
|
}
|
14
16
|
interface ManualGatewayCreate extends ResourceCreate {
|
15
17
|
name: string;
|
@@ -23,6 +25,7 @@ declare class ManualGateways extends ApiResource<ManualGateway> {
|
|
23
25
|
update(resource: ManualGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualGateway>;
|
24
26
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
25
27
|
payment_methods(manualGatewayId: string | ManualGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
28
|
+
versions(manualGatewayId: string | ManualGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
26
29
|
isManualGateway(resource: any): resource is ManualGateway;
|
27
30
|
relationship(id: string | ResourceId | null): ManualGatewayRel;
|
28
31
|
type(): ManualGatewayType;
|
@@ -13,6 +13,10 @@ class ManualGateways extends ApiResource {
|
|
13
13
|
const _manualGatewayId = manualGatewayId.id || manualGatewayId;
|
14
14
|
return this.resources.fetch({ type: 'payment_methods' }, `manual_gateways/${_manualGatewayId}/payment_methods`, params, options);
|
15
15
|
}
|
16
|
+
async versions(manualGatewayId, params, options) {
|
17
|
+
const _manualGatewayId = manualGatewayId.id || manualGatewayId;
|
18
|
+
return this.resources.fetch({ type: 'versions' }, `manual_gateways/${_manualGatewayId}/versions`, params, options);
|
19
|
+
}
|
16
20
|
isManualGateway(resource) {
|
17
21
|
return resource.type && (resource.type === ManualGateways.TYPE);
|
18
22
|
}
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesCon
|
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Market } from './markets';
|
5
5
|
import type { Attachment } from './attachments';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
import type { TaxRule, TaxRuleType } from './tax_rules';
|
7
8
|
type ManualTaxCalculatorType = 'manual_tax_calculators';
|
8
9
|
type ManualTaxCalculatorRel = ResourceRel & {
|
@@ -16,6 +17,7 @@ interface ManualTaxCalculator extends Resource {
|
|
16
17
|
name: string;
|
17
18
|
markets?: Market[] | null;
|
18
19
|
attachments?: Attachment[] | null;
|
20
|
+
versions?: Version[] | null;
|
19
21
|
tax_rules?: TaxRule[] | null;
|
20
22
|
}
|
21
23
|
interface ManualTaxCalculatorCreate extends ResourceCreate {
|
@@ -33,6 +35,7 @@ declare class ManualTaxCalculators extends ApiResource<ManualTaxCalculator> {
|
|
33
35
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
34
36
|
markets(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
35
37
|
attachments(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
38
|
+
versions(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
36
39
|
tax_rules(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxRule>>;
|
37
40
|
isManualTaxCalculator(resource: any): resource is ManualTaxCalculator;
|
38
41
|
relationship(id: string | ResourceId | null): ManualTaxCalculatorRel;
|
@@ -17,6 +17,10 @@ class ManualTaxCalculators extends ApiResource {
|
|
17
17
|
const _manualTaxCalculatorId = manualTaxCalculatorId.id || manualTaxCalculatorId;
|
18
18
|
return this.resources.fetch({ type: 'attachments' }, `manual_tax_calculators/${_manualTaxCalculatorId}/attachments`, params, options);
|
19
19
|
}
|
20
|
+
async versions(manualTaxCalculatorId, params, options) {
|
21
|
+
const _manualTaxCalculatorId = manualTaxCalculatorId.id || manualTaxCalculatorId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `manual_tax_calculators/${_manualTaxCalculatorId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
async tax_rules(manualTaxCalculatorId, params, options) {
|
21
25
|
const _manualTaxCalculatorId = manualTaxCalculatorId.id || manualTaxCalculatorId;
|
22
26
|
return this.resources.fetch({ type: 'tax_rules' }, `manual_tax_calculators/${_manualTaxCalculatorId}/tax_rules`, params, options);
|
@@ -8,6 +8,7 @@ import type { SubscriptionModel, SubscriptionModelType } from './subscription_mo
|
|
8
8
|
import type { TaxCalculator, TaxCalculatorType } from './tax_calculators';
|
9
9
|
import type { CustomerGroup, CustomerGroupType } from './customer_groups';
|
10
10
|
import type { Attachment } from './attachments';
|
11
|
+
import type { Version } from './versions';
|
11
12
|
type MarketType = 'markets';
|
12
13
|
type MarketRel = ResourceRel & {
|
13
14
|
type: MarketType;
|
@@ -48,6 +49,7 @@ interface Market extends Resource {
|
|
48
49
|
tax_calculator?: TaxCalculator | null;
|
49
50
|
customer_group?: CustomerGroup | null;
|
50
51
|
attachments?: Attachment[] | null;
|
52
|
+
versions?: Version[] | null;
|
51
53
|
}
|
52
54
|
interface MarketCreate extends ResourceCreate {
|
53
55
|
name: string;
|
@@ -89,6 +91,7 @@ declare class Markets extends ApiResource<Market> {
|
|
89
91
|
tax_calculator(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCalculator>;
|
90
92
|
customer_group(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerGroup>;
|
91
93
|
attachments(marketId: string | Market, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
94
|
+
versions(marketId: string | Market, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
92
95
|
_disable(id: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
93
96
|
_enable(id: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
94
97
|
isMarket(resource: any): resource is Market;
|
@@ -37,6 +37,10 @@ class Markets extends ApiResource {
|
|
37
37
|
const _marketId = marketId.id || marketId;
|
38
38
|
return this.resources.fetch({ type: 'attachments' }, `markets/${_marketId}/attachments`, params, options);
|
39
39
|
}
|
40
|
+
async versions(marketId, params, options) {
|
41
|
+
const _marketId = marketId.id || marketId;
|
42
|
+
return this.resources.fetch({ type: 'versions' }, `markets/${_marketId}/versions`, params, options);
|
43
|
+
}
|
40
44
|
async _disable(id, params, options) {
|
41
45
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Markets.TYPE, _disable: true }, params, options);
|
42
46
|
}
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesCon
|
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Address, AddressType } from './addresses';
|
5
5
|
import type { Attachment } from './attachments';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type MerchantType = 'merchants';
|
7
8
|
type MerchantRel = ResourceRel & {
|
8
9
|
type: MerchantType;
|
@@ -15,6 +16,7 @@ interface Merchant extends Resource {
|
|
15
16
|
name: string;
|
16
17
|
address?: Address | null;
|
17
18
|
attachments?: Attachment[] | null;
|
19
|
+
versions?: Version[] | null;
|
18
20
|
}
|
19
21
|
interface MerchantCreate extends ResourceCreate {
|
20
22
|
name: string;
|
@@ -31,6 +33,7 @@ declare class Merchants extends ApiResource<Merchant> {
|
|
31
33
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
32
34
|
address(merchantId: string | Merchant, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
33
35
|
attachments(merchantId: string | Merchant, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
36
|
+
versions(merchantId: string | Merchant, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
34
37
|
isMerchant(resource: any): resource is Merchant;
|
35
38
|
relationship(id: string | ResourceId | null): MerchantRel;
|
36
39
|
type(): MerchantType;
|
@@ -17,6 +17,10 @@ class Merchants extends ApiResource {
|
|
17
17
|
const _merchantId = merchantId.id || merchantId;
|
18
18
|
return this.resources.fetch({ type: 'attachments' }, `merchants/${_merchantId}/attachments`, params, options);
|
19
19
|
}
|
20
|
+
async versions(merchantId, params, options) {
|
21
|
+
const _merchantId = merchantId.id || merchantId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `merchants/${_merchantId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
isMerchant(resource) {
|
21
25
|
return resource.type && (resource.type === Merchants.TYPE);
|
22
26
|
}
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve } from '../query';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions';
|
5
5
|
import type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions';
|
6
6
|
import type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions';
|
7
7
|
import type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions';
|
8
8
|
import type { ExternalPromotion, ExternalPromotionType } from './external_promotions';
|
9
9
|
import type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions';
|
10
|
+
import type { Version } from './versions';
|
10
11
|
type OrderAmountPromotionRuleType = 'order_amount_promotion_rules';
|
11
12
|
type OrderAmountPromotionRuleRel = ResourceRel & {
|
12
13
|
type: OrderAmountPromotionRuleType;
|
@@ -36,6 +37,7 @@ interface OrderAmountPromotionRule extends Resource {
|
|
36
37
|
formatted_order_amount?: string | null;
|
37
38
|
use_subtotal?: boolean | null;
|
38
39
|
promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null;
|
40
|
+
versions?: Version[] | null;
|
39
41
|
}
|
40
42
|
interface OrderAmountPromotionRuleCreate extends ResourceCreate {
|
41
43
|
order_amount_cents?: number | null;
|
@@ -52,6 +54,7 @@ declare class OrderAmountPromotionRules extends ApiResource<OrderAmountPromotion
|
|
52
54
|
create(resource: OrderAmountPromotionRuleCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
53
55
|
update(resource: OrderAmountPromotionRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
54
56
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
57
|
+
versions(orderAmountPromotionRuleId: string | OrderAmountPromotionRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
55
58
|
isOrderAmountPromotionRule(resource: any): resource is OrderAmountPromotionRule;
|
56
59
|
relationship(id: string | ResourceId | null): OrderAmountPromotionRuleRel;
|
57
60
|
type(): OrderAmountPromotionRuleType;
|
@@ -9,6 +9,10 @@ class OrderAmountPromotionRules extends ApiResource {
|
|
9
9
|
async delete(id, options) {
|
10
10
|
await this.resources.delete((typeof id === 'string') ? { id, type: OrderAmountPromotionRules.TYPE } : id, options);
|
11
11
|
}
|
12
|
+
async versions(orderAmountPromotionRuleId, params, options) {
|
13
|
+
const _orderAmountPromotionRuleId = orderAmountPromotionRuleId.id || orderAmountPromotionRuleId;
|
14
|
+
return this.resources.fetch({ type: 'versions' }, `order_amount_promotion_rules/${_orderAmountPromotionRuleId}/versions`, params, options);
|
15
|
+
}
|
12
16
|
isOrderAmountPromotionRule(resource) {
|
13
17
|
return resource.type && (resource.type === OrderAmountPromotionRules.TYPE);
|
14
18
|
}
|
@@ -5,6 +5,7 @@ import type { OrderSubscription, OrderSubscriptionType } from './order_subscript
|
|
5
5
|
import type { Adjustment, AdjustmentType } from './adjustments';
|
6
6
|
import type { Bundle, BundleType } from './bundles';
|
7
7
|
import type { Sku, SkuType } from './skus';
|
8
|
+
import type { LineItem } from './line_items';
|
8
9
|
type OrderSubscriptionItemType = 'order_subscription_items';
|
9
10
|
type OrderSubscriptionItemRel = ResourceRel & {
|
10
11
|
type: OrderSubscriptionItemType;
|
@@ -32,6 +33,7 @@ interface OrderSubscriptionItem extends Resource {
|
|
32
33
|
formatted_total_amount?: string | null;
|
33
34
|
order_subscription?: OrderSubscription | null;
|
34
35
|
item?: Adjustment | Bundle | Sku | null;
|
36
|
+
source_line_item?: LineItem | null;
|
35
37
|
}
|
36
38
|
interface OrderSubscriptionItemCreate extends ResourceCreate {
|
37
39
|
sku_code?: string | null;
|
@@ -53,6 +55,7 @@ declare class OrderSubscriptionItems extends ApiResource<OrderSubscriptionItem>
|
|
53
55
|
update(resource: OrderSubscriptionItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscriptionItem>;
|
54
56
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
55
57
|
order_subscription(orderSubscriptionItemId: string | OrderSubscriptionItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
|
58
|
+
source_line_item(orderSubscriptionItemId: string | OrderSubscriptionItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
56
59
|
isOrderSubscriptionItem(resource: any): resource is OrderSubscriptionItem;
|
57
60
|
relationship(id: string | ResourceId | null): OrderSubscriptionItemRel;
|
58
61
|
type(): OrderSubscriptionItemType;
|
@@ -13,6 +13,10 @@ class OrderSubscriptionItems extends ApiResource {
|
|
13
13
|
const _orderSubscriptionItemId = orderSubscriptionItemId.id || orderSubscriptionItemId;
|
14
14
|
return this.resources.fetch({ type: 'order_subscriptions' }, `order_subscription_items/${_orderSubscriptionItemId}/order_subscription`, params, options);
|
15
15
|
}
|
16
|
+
async source_line_item(orderSubscriptionItemId, params, options) {
|
17
|
+
const _orderSubscriptionItemId = orderSubscriptionItemId.id || orderSubscriptionItemId;
|
18
|
+
return this.resources.fetch({ type: 'line_items' }, `order_subscription_items/${_orderSubscriptionItemId}/source_line_item`, params, options);
|
19
|
+
}
|
16
20
|
isOrderSubscriptionItem(resource) {
|
17
21
|
return resource.type && (resource.type === OrderSubscriptionItems.TYPE);
|
18
22
|
}
|
@@ -10,6 +10,7 @@ import type { OrderSubscriptionItem } from './order_subscription_items';
|
|
10
10
|
import type { OrderFactory } from './order_factories';
|
11
11
|
import type { RecurringOrderCopy } from './recurring_order_copies';
|
12
12
|
import type { Event } from './events';
|
13
|
+
import type { Version } from './versions';
|
13
14
|
type OrderSubscriptionType = 'order_subscriptions';
|
14
15
|
type OrderSubscriptionRel = ResourceRel & {
|
15
16
|
type: OrderSubscriptionType;
|
@@ -51,6 +52,7 @@ interface OrderSubscription extends Resource {
|
|
51
52
|
recurring_order_copies?: RecurringOrderCopy[] | null;
|
52
53
|
orders?: Order[] | null;
|
53
54
|
events?: Event[] | null;
|
55
|
+
versions?: Version[] | null;
|
54
56
|
}
|
55
57
|
interface OrderSubscriptionCreate extends ResourceCreate {
|
56
58
|
frequency: string;
|
@@ -85,6 +87,7 @@ declare class OrderSubscriptions extends ApiResource<OrderSubscription> {
|
|
85
87
|
recurring_order_copies(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<RecurringOrderCopy>>;
|
86
88
|
orders(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Order>>;
|
87
89
|
events(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
90
|
+
versions(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
88
91
|
_activate(id: string | OrderSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
|
89
92
|
_deactivate(id: string | OrderSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
|
90
93
|
_cancel(id: string | OrderSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
|
@@ -49,6 +49,10 @@ class OrderSubscriptions extends ApiResource {
|
|
49
49
|
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
50
50
|
return this.resources.fetch({ type: 'events' }, `order_subscriptions/${_orderSubscriptionId}/events`, params, options);
|
51
51
|
}
|
52
|
+
async versions(orderSubscriptionId, params, options) {
|
53
|
+
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
54
|
+
return this.resources.fetch({ type: 'versions' }, `order_subscriptions/${_orderSubscriptionId}/versions`, params, options);
|
55
|
+
}
|
52
56
|
async _activate(id, params, options) {
|
53
57
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: OrderSubscriptions.TYPE, _activate: true }, params, options);
|
54
58
|
}
|
@@ -3,6 +3,7 @@ import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse }
|
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Market } from './markets';
|
5
5
|
import type { Attachment } from './attachments';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type OrderValidationRuleType = 'order_validation_rules';
|
7
8
|
type OrderValidationRuleRel = ResourceRel & {
|
8
9
|
type: OrderValidationRuleType;
|
@@ -11,11 +12,13 @@ interface OrderValidationRule extends Resource {
|
|
11
12
|
readonly type: OrderValidationRuleType;
|
12
13
|
market?: Market | null;
|
13
14
|
attachments?: Attachment[] | null;
|
15
|
+
versions?: Version[] | null;
|
14
16
|
}
|
15
17
|
declare class OrderValidationRules extends ApiResource<OrderValidationRule> {
|
16
18
|
static readonly TYPE: OrderValidationRuleType;
|
17
19
|
market(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
18
20
|
attachments(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
21
|
+
versions(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
19
22
|
isOrderValidationRule(resource: any): resource is OrderValidationRule;
|
20
23
|
relationship(id: string | ResourceId | null): OrderValidationRuleRel;
|
21
24
|
type(): OrderValidationRuleType;
|
@@ -8,6 +8,10 @@ class OrderValidationRules extends ApiResource {
|
|
8
8
|
const _orderValidationRuleId = orderValidationRuleId.id || orderValidationRuleId;
|
9
9
|
return this.resources.fetch({ type: 'attachments' }, `order_validation_rules/${_orderValidationRuleId}/attachments`, params, options);
|
10
10
|
}
|
11
|
+
async versions(orderValidationRuleId, params, options) {
|
12
|
+
const _orderValidationRuleId = orderValidationRuleId.id || orderValidationRuleId;
|
13
|
+
return this.resources.fetch({ type: 'versions' }, `order_validation_rules/${_orderValidationRuleId}/versions`, params, options);
|
14
|
+
}
|
11
15
|
isOrderValidationRule(resource) {
|
12
16
|
return resource.type && (resource.type === OrderValidationRules.TYPE);
|
13
17
|
}
|
@@ -21,8 +21,8 @@ import type { WireTransfer, WireTransferType } from './wire_transfers';
|
|
21
21
|
import type { LineItem } from './line_items';
|
22
22
|
import type { Shipment } from './shipments';
|
23
23
|
import type { Authorization } from './authorizations';
|
24
|
-
import type { Void } from './voids';
|
25
24
|
import type { Capture } from './captures';
|
25
|
+
import type { Void } from './voids';
|
26
26
|
import type { Refund } from './refunds';
|
27
27
|
import type { Return } from './returns';
|
28
28
|
import type { OrderSubscription } from './order_subscriptions';
|
@@ -32,6 +32,7 @@ import type { RecurringOrderCopy } from './recurring_order_copies';
|
|
32
32
|
import type { Attachment } from './attachments';
|
33
33
|
import type { Event } from './events';
|
34
34
|
import type { Tag, TagType } from './tags';
|
35
|
+
import type { Version } from './versions';
|
35
36
|
type OrderType = 'orders';
|
36
37
|
type OrderRel = ResourceRel & {
|
37
38
|
type: OrderType;
|
@@ -161,6 +162,9 @@ interface Order extends Resource {
|
|
161
162
|
duty_amount_cents?: number | null;
|
162
163
|
duty_amount_float?: number | null;
|
163
164
|
formatted_duty_amount?: string | null;
|
165
|
+
place_total_amount_cents?: number | null;
|
166
|
+
place_total_amount_float?: number | null;
|
167
|
+
formatted_place_total_amount?: string | null;
|
164
168
|
skus_count?: number | null;
|
165
169
|
line_item_options_count?: number | null;
|
166
170
|
shipments_count?: number | null;
|
@@ -194,7 +198,7 @@ interface Order extends Resource {
|
|
194
198
|
payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null;
|
195
199
|
line_items?: LineItem[] | null;
|
196
200
|
shipments?: Shipment[] | null;
|
197
|
-
transactions?: Array<Authorization |
|
201
|
+
transactions?: Array<Authorization | Capture | Void | Refund> | null;
|
198
202
|
authorizations?: Authorization[] | null;
|
199
203
|
captures?: Capture[] | null;
|
200
204
|
voids?: Void[] | null;
|
@@ -207,6 +211,7 @@ interface Order extends Resource {
|
|
207
211
|
attachments?: Attachment[] | null;
|
208
212
|
events?: Event[] | null;
|
209
213
|
tags?: Tag[] | null;
|
214
|
+
versions?: Version[] | null;
|
210
215
|
}
|
211
216
|
interface OrderCreate extends ResourceCreate {
|
212
217
|
autorefresh?: boolean | null;
|
@@ -305,6 +310,7 @@ declare class Orders extends ApiResource<Order> {
|
|
305
310
|
attachments(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
306
311
|
events(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
307
312
|
tags(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
313
|
+
versions(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
308
314
|
_archive(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
309
315
|
_unarchive(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
310
316
|
_place(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
@@ -101,6 +101,10 @@ class Orders extends ApiResource {
|
|
101
101
|
const _orderId = orderId.id || orderId;
|
102
102
|
return this.resources.fetch({ type: 'tags' }, `orders/${_orderId}/tags`, params, options);
|
103
103
|
}
|
104
|
+
async versions(orderId, params, options) {
|
105
|
+
const _orderId = orderId.id || orderId;
|
106
|
+
return this.resources.fetch({ type: 'versions' }, `orders/${_orderId}/versions`, params, options);
|
107
|
+
}
|
104
108
|
async _archive(id, params, options) {
|
105
109
|
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Orders.TYPE, _archive: true }, params, options);
|
106
110
|
}
|
@@ -4,6 +4,7 @@ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
|
4
4
|
import type { StockLocation, StockLocationType } from './stock_locations';
|
5
5
|
import type { Parcel } from './parcels';
|
6
6
|
import type { Attachment } from './attachments';
|
7
|
+
import type { Version } from './versions';
|
7
8
|
type PackageType = 'packages';
|
8
9
|
type PackageRel = ResourceRel & {
|
9
10
|
type: PackageType;
|
@@ -22,6 +23,7 @@ interface Package extends Resource {
|
|
22
23
|
stock_location?: StockLocation | null;
|
23
24
|
parcels?: Parcel[] | null;
|
24
25
|
attachments?: Attachment[] | null;
|
26
|
+
versions?: Version[] | null;
|
25
27
|
}
|
26
28
|
interface PackageCreate extends ResourceCreate {
|
27
29
|
name: string;
|
@@ -49,6 +51,7 @@ declare class Packages extends ApiResource<Package> {
|
|
49
51
|
stock_location(packageId: string | Package, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
50
52
|
parcels(packageId: string | Package, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Parcel>>;
|
51
53
|
attachments(packageId: string | Package, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
54
|
+
versions(packageId: string | Package, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
52
55
|
isPackage(resource: any): resource is Package;
|
53
56
|
relationship(id: string | ResourceId | null): PackageRel;
|
54
57
|
type(): PackageType;
|
@@ -21,6 +21,10 @@ class Packages extends ApiResource {
|
|
21
21
|
const _packageId = packageId.id || packageId;
|
22
22
|
return this.resources.fetch({ type: 'attachments' }, `packages/${_packageId}/attachments`, params, options);
|
23
23
|
}
|
24
|
+
async versions(packageId, params, options) {
|
25
|
+
const _packageId = packageId.id || packageId;
|
26
|
+
return this.resources.fetch({ type: 'versions' }, `packages/${_packageId}/versions`, params, options);
|
27
|
+
}
|
24
28
|
isPackage(resource) {
|
25
29
|
return resource.type && (resource.type === Packages.TYPE);
|
26
30
|
}
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve } from '../query';
|
2
|
+
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
+
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Parcel, ParcelType } from './parcels';
|
5
5
|
import type { StockLineItem, StockLineItemType } from './stock_line_items';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type ParcelLineItemType = 'parcel_line_items';
|
7
8
|
type ParcelLineItemRel = ResourceRel & {
|
8
9
|
type: ParcelLineItemType;
|
@@ -26,6 +27,7 @@ interface ParcelLineItem extends Resource {
|
|
26
27
|
* @deprecated This field should not be used as it may be removed in the future without notice
|
27
28
|
*/
|
28
29
|
shipment_line_item?: object;
|
30
|
+
versions?: Version[] | null;
|
29
31
|
}
|
30
32
|
interface ParcelLineItemCreate extends ResourceCreate {
|
31
33
|
quantity: number;
|
@@ -44,6 +46,7 @@ declare class ParcelLineItems extends ApiResource<ParcelLineItem> {
|
|
44
46
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
45
47
|
parcel(parcelLineItemId: string | ParcelLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Parcel>;
|
46
48
|
stock_line_item(parcelLineItemId: string | ParcelLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLineItem>;
|
49
|
+
versions(parcelLineItemId: string | ParcelLineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
47
50
|
isParcelLineItem(resource: any): resource is ParcelLineItem;
|
48
51
|
relationship(id: string | ResourceId | null): ParcelLineItemRel;
|
49
52
|
type(): ParcelLineItemType;
|
@@ -17,6 +17,10 @@ class ParcelLineItems extends ApiResource {
|
|
17
17
|
const _parcelLineItemId = parcelLineItemId.id || parcelLineItemId;
|
18
18
|
return this.resources.fetch({ type: 'stock_line_items' }, `parcel_line_items/${_parcelLineItemId}/stock_line_item`, params, options);
|
19
19
|
}
|
20
|
+
async versions(parcelLineItemId, params, options) {
|
21
|
+
const _parcelLineItemId = parcelLineItemId.id || parcelLineItemId;
|
22
|
+
return this.resources.fetch({ type: 'versions' }, `parcel_line_items/${_parcelLineItemId}/versions`, params, options);
|
23
|
+
}
|
20
24
|
isParcelLineItem(resource) {
|
21
25
|
return resource.type && (resource.type === ParcelLineItems.TYPE);
|
22
26
|
}
|
@@ -6,6 +6,7 @@ import type { Package, PackageType } from './packages';
|
|
6
6
|
import type { ParcelLineItem } from './parcel_line_items';
|
7
7
|
import type { Attachment } from './attachments';
|
8
8
|
import type { Event } from './events';
|
9
|
+
import type { Version } from './versions';
|
9
10
|
type ParcelType = 'parcels';
|
10
11
|
type ParcelRel = ResourceRel & {
|
11
12
|
type: ParcelType;
|
@@ -48,6 +49,7 @@ interface Parcel extends Resource {
|
|
48
49
|
parcel_line_items?: ParcelLineItem[] | null;
|
49
50
|
attachments?: Attachment[] | null;
|
50
51
|
events?: Event[] | null;
|
52
|
+
versions?: Version[] | null;
|
51
53
|
}
|
52
54
|
interface ParcelCreate extends ResourceCreate {
|
53
55
|
weight: number;
|
@@ -115,6 +117,7 @@ declare class Parcels extends ApiResource<Parcel> {
|
|
115
117
|
parcel_line_items(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ParcelLineItem>>;
|
116
118
|
attachments(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
117
119
|
events(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
120
|
+
versions(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
118
121
|
isParcel(resource: any): resource is Parcel;
|
119
122
|
relationship(id: string | ResourceId | null): ParcelRel;
|
120
123
|
type(): ParcelType;
|