@commercelayer/sdk 4.27.1 → 4.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +10 -3
- package/lib/cjs/api.js +25 -4
- package/lib/cjs/commercelayer.d.ts +9 -2
- package/lib/cjs/commercelayer.js +8 -1
- package/lib/cjs/model.d.ts +10 -3
- package/lib/cjs/resource.d.ts +7 -9
- package/lib/cjs/resources/addresses.d.ts +14 -0
- package/lib/cjs/resources/addresses.js +12 -0
- package/lib/cjs/resources/adjustments.d.ts +3 -0
- package/lib/cjs/resources/adjustments.js +4 -0
- package/lib/cjs/resources/adyen_gateways.d.ts +5 -2
- package/lib/cjs/resources/adyen_gateways.js +4 -0
- package/lib/cjs/resources/adyen_payments.d.ts +3 -0
- package/lib/cjs/resources/adyen_payments.js +4 -0
- package/lib/cjs/resources/authorizations.d.ts +9 -3
- package/lib/cjs/resources/authorizations.js +12 -4
- package/lib/cjs/resources/avalara_accounts.d.ts +9 -6
- package/lib/cjs/resources/avalara_accounts.js +4 -0
- package/lib/cjs/resources/axerve_gateways.d.ts +4 -0
- package/lib/cjs/resources/axerve_gateways.js +4 -0
- package/lib/cjs/resources/axerve_payments.d.ts +9 -0
- package/lib/cjs/resources/axerve_payments.js +4 -0
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +3 -0
- package/lib/cjs/resources/billing_info_validation_rules.js +4 -0
- package/lib/cjs/resources/braintree_gateways.d.ts +3 -0
- package/lib/cjs/resources/braintree_gateways.js +4 -0
- package/lib/cjs/resources/braintree_payments.d.ts +3 -0
- package/lib/cjs/resources/braintree_payments.js +4 -0
- package/lib/cjs/resources/bundles.d.ts +16 -2
- package/lib/cjs/resources/bundles.js +12 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +134 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +81 -0
- package/lib/cjs/resources/captures.d.ts +9 -3
- package/lib/cjs/resources/captures.js +12 -4
- package/lib/cjs/resources/carrier_accounts.d.ts +3 -0
- package/lib/cjs/resources/carrier_accounts.js +4 -0
- package/lib/cjs/resources/checkout_com_gateways.d.ts +3 -0
- package/lib/cjs/resources/checkout_com_gateways.js +4 -0
- package/lib/cjs/resources/checkout_com_payments.d.ts +3 -0
- package/lib/cjs/resources/checkout_com_payments.js +4 -0
- package/lib/cjs/resources/cleanups.d.ts +3 -0
- package/lib/cjs/resources/cleanups.js +4 -0
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +10 -3
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +4 -0
- package/lib/cjs/resources/coupon_recipients.d.ts +3 -0
- package/lib/cjs/resources/coupon_recipients.js +4 -0
- package/lib/cjs/resources/coupons.d.ts +26 -1
- package/lib/cjs/resources/coupons.js +16 -0
- package/lib/cjs/resources/custom_promotion_rules.d.ts +61 -0
- package/lib/cjs/resources/custom_promotion_rules.js +37 -0
- package/lib/cjs/resources/customer_addresses.d.ts +5 -0
- package/lib/cjs/resources/customer_addresses.js +4 -0
- package/lib/cjs/resources/customer_groups.d.ts +3 -0
- package/lib/cjs/resources/customer_groups.js +4 -0
- package/lib/cjs/resources/customer_payment_sources.d.ts +18 -11
- package/lib/cjs/resources/customer_payment_sources.js +8 -0
- package/lib/cjs/resources/customer_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/customer_subscriptions.js +4 -0
- package/lib/cjs/resources/customers.d.ts +9 -0
- package/lib/cjs/resources/customers.js +4 -0
- package/lib/cjs/resources/delivery_lead_times.d.ts +3 -0
- package/lib/cjs/resources/delivery_lead_times.js +4 -0
- package/lib/cjs/resources/external_gateways.d.ts +3 -0
- package/lib/cjs/resources/external_gateways.js +4 -0
- package/lib/cjs/resources/external_payments.d.ts +3 -0
- package/lib/cjs/resources/external_payments.js +4 -0
- package/lib/cjs/resources/external_promotions.d.ts +45 -6
- package/lib/cjs/resources/external_promotions.js +24 -0
- package/lib/cjs/resources/external_tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/external_tax_calculators.js +4 -0
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +45 -6
- package/lib/cjs/resources/fixed_amount_promotions.js +24 -0
- package/lib/cjs/resources/fixed_price_promotions.d.ts +37 -9
- package/lib/cjs/resources/fixed_price_promotions.js +18 -2
- package/lib/cjs/resources/free_gift_promotions.d.ts +37 -9
- package/lib/cjs/resources/free_gift_promotions.js +18 -2
- package/lib/cjs/resources/free_shipping_promotions.d.ts +42 -6
- package/lib/cjs/resources/free_shipping_promotions.js +20 -0
- package/lib/cjs/resources/gift_card_recipients.d.ts +3 -0
- package/lib/cjs/resources/gift_card_recipients.js +4 -0
- package/lib/cjs/resources/gift_cards.d.ts +11 -0
- package/lib/cjs/resources/gift_cards.js +8 -0
- package/lib/cjs/resources/imports.d.ts +1 -3
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +3 -0
- package/lib/cjs/resources/in_stock_subscriptions.js +4 -0
- package/lib/cjs/resources/inventory_models.d.ts +12 -0
- package/lib/cjs/resources/inventory_models.js +4 -0
- package/lib/cjs/resources/inventory_return_locations.d.ts +3 -0
- package/lib/cjs/resources/inventory_return_locations.js +4 -0
- package/lib/cjs/resources/inventory_stock_locations.d.ts +3 -0
- package/lib/cjs/resources/inventory_stock_locations.js +4 -0
- package/lib/cjs/resources/klarna_gateways.d.ts +3 -0
- package/lib/cjs/resources/klarna_gateways.js +4 -0
- package/lib/cjs/resources/klarna_payments.d.ts +3 -0
- package/lib/cjs/resources/klarna_payments.js +4 -0
- package/lib/cjs/resources/line_item_options.d.ts +11 -0
- package/lib/cjs/resources/line_item_options.js +8 -0
- package/lib/cjs/resources/line_items.d.ts +30 -0
- package/lib/cjs/resources/line_items.js +16 -0
- package/lib/cjs/resources/manual_gateways.d.ts +3 -0
- package/lib/cjs/resources/manual_gateways.js +4 -0
- package/lib/cjs/resources/manual_tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/manual_tax_calculators.js +4 -0
- package/lib/cjs/resources/markets.d.ts +8 -0
- package/lib/cjs/resources/markets.js +4 -0
- package/lib/cjs/resources/merchants.d.ts +3 -0
- package/lib/cjs/resources/merchants.js +4 -0
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +13 -3
- package/lib/cjs/resources/order_amount_promotion_rules.js +4 -0
- package/lib/cjs/resources/order_subscription_items.d.ts +7 -0
- package/lib/cjs/resources/order_subscription_items.js +4 -0
- package/lib/cjs/resources/order_subscriptions.d.ts +4 -0
- package/lib/cjs/resources/order_subscriptions.js +4 -0
- package/lib/cjs/resources/order_validation_rules.d.ts +3 -0
- package/lib/cjs/resources/order_validation_rules.js +4 -0
- package/lib/cjs/resources/orders.d.ts +50 -6
- package/lib/cjs/resources/orders.js +32 -0
- package/lib/cjs/resources/organization.d.ts +4 -4
- package/lib/cjs/resources/packages.d.ts +3 -0
- package/lib/cjs/resources/packages.js +4 -0
- package/lib/cjs/resources/parcel_line_items.d.ts +4 -1
- package/lib/cjs/resources/parcel_line_items.js +4 -0
- package/lib/cjs/resources/parcels.d.ts +9 -3
- package/lib/cjs/resources/parcels.js +4 -0
- package/lib/cjs/resources/payment_gateways.d.ts +3 -0
- package/lib/cjs/resources/payment_gateways.js +4 -0
- package/lib/cjs/resources/payment_methods.d.ts +9 -1
- package/lib/cjs/resources/payment_methods.js +4 -0
- package/lib/cjs/resources/payment_options.d.ts +43 -0
- package/lib/cjs/resources/payment_options.js +41 -0
- package/lib/cjs/resources/paypal_gateways.d.ts +3 -0
- package/lib/cjs/resources/paypal_gateways.js +4 -0
- package/lib/cjs/resources/paypal_payments.d.ts +3 -0
- package/lib/cjs/resources/paypal_payments.js +4 -0
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +37 -9
- package/lib/cjs/resources/percentage_discount_promotions.js +18 -2
- package/lib/cjs/resources/price_frequency_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_frequency_tiers.js +4 -0
- package/lib/cjs/resources/price_lists.d.ts +6 -0
- package/lib/cjs/resources/price_lists.js +4 -0
- package/lib/cjs/resources/price_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_tiers.js +4 -0
- package/lib/cjs/resources/price_volume_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_volume_tiers.js +4 -0
- package/lib/cjs/resources/prices.d.ts +4 -1
- package/lib/cjs/resources/prices.js +4 -0
- package/lib/cjs/resources/promotion_rules.d.ts +5 -1
- package/lib/cjs/resources/promotion_rules.js +4 -0
- package/lib/cjs/resources/promotions.d.ts +18 -0
- package/lib/cjs/resources/promotions.js +20 -0
- package/lib/cjs/resources/refunds.d.ts +9 -3
- package/lib/cjs/resources/refunds.js +10 -2
- package/lib/cjs/resources/reserved_stocks.d.ts +27 -0
- package/lib/cjs/resources/reserved_stocks.js +36 -0
- package/lib/cjs/resources/return_line_items.d.ts +2 -1
- package/lib/cjs/resources/returns.d.ts +11 -0
- package/lib/cjs/resources/returns.js +8 -0
- package/lib/cjs/resources/satispay_gateways.d.ts +6 -0
- package/lib/cjs/resources/satispay_gateways.js +4 -0
- package/lib/cjs/resources/satispay_payments.d.ts +11 -3
- package/lib/cjs/resources/satispay_payments.js +4 -0
- package/lib/cjs/resources/shipments.d.ts +49 -2
- package/lib/cjs/resources/shipments.js +18 -0
- package/lib/cjs/resources/shipping_categories.d.ts +6 -0
- package/lib/cjs/resources/shipping_categories.js +4 -0
- package/lib/cjs/resources/shipping_method_tiers.d.ts +3 -0
- package/lib/cjs/resources/shipping_method_tiers.js +4 -0
- package/lib/cjs/resources/shipping_methods.d.ts +11 -0
- package/lib/cjs/resources/shipping_methods.js +4 -0
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +3 -0
- package/lib/cjs/resources/shipping_weight_tiers.js +4 -0
- package/lib/cjs/resources/shipping_zones.d.ts +3 -0
- package/lib/cjs/resources/shipping_zones.js +4 -0
- package/lib/cjs/resources/sku_list_items.d.ts +3 -0
- package/lib/cjs/resources/sku_list_items.js +4 -0
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +10 -3
- package/lib/cjs/resources/sku_list_promotion_rules.js +4 -0
- package/lib/cjs/resources/sku_lists.d.ts +3 -0
- package/lib/cjs/resources/sku_lists.js +4 -0
- package/lib/cjs/resources/sku_options.d.ts +14 -0
- package/lib/cjs/resources/sku_options.js +12 -0
- package/lib/cjs/resources/skus.d.ts +17 -0
- package/lib/cjs/resources/skus.js +16 -0
- package/lib/cjs/resources/stock_items.d.ts +9 -0
- package/lib/cjs/resources/stock_items.js +12 -0
- package/lib/cjs/resources/stock_line_items.d.ts +42 -2
- package/lib/cjs/resources/stock_line_items.js +17 -0
- package/lib/cjs/resources/stock_locations.d.ts +6 -0
- package/lib/cjs/resources/stock_locations.js +4 -0
- package/lib/cjs/resources/stock_reservations.d.ts +49 -0
- package/lib/cjs/resources/stock_reservations.js +53 -0
- package/lib/cjs/resources/stock_transfers.d.ts +5 -0
- package/lib/cjs/resources/stock_transfers.js +4 -0
- package/lib/cjs/resources/stripe_gateways.d.ts +3 -0
- package/lib/cjs/resources/stripe_gateways.js +4 -0
- package/lib/cjs/resources/stripe_payments.d.ts +12 -0
- package/lib/cjs/resources/stripe_payments.js +4 -0
- package/lib/cjs/resources/tags.d.ts +27 -0
- package/lib/cjs/resources/tags.js +33 -0
- package/lib/cjs/resources/tax_calculators.d.ts +3 -0
- package/lib/cjs/resources/tax_calculators.js +4 -0
- package/lib/cjs/resources/tax_categories.d.ts +3 -0
- package/lib/cjs/resources/tax_categories.js +4 -0
- package/lib/cjs/resources/tax_rules.d.ts +3 -0
- package/lib/cjs/resources/tax_rules.js +4 -0
- package/lib/cjs/resources/taxjar_accounts.d.ts +3 -0
- package/lib/cjs/resources/taxjar_accounts.js +4 -0
- package/lib/cjs/resources/transactions.d.ts +9 -0
- package/lib/cjs/resources/transactions.js +12 -0
- package/lib/cjs/resources/versions.d.ts +22 -0
- package/lib/cjs/resources/versions.js +24 -0
- package/lib/cjs/resources/voids.d.ts +9 -3
- package/lib/cjs/resources/voids.js +10 -2
- package/lib/cjs/resources/webhooks.d.ts +8 -0
- package/lib/cjs/resources/webhooks.js +4 -0
- package/lib/cjs/resources/wire_transfers.d.ts +3 -0
- package/lib/cjs/resources/wire_transfers.js +4 -0
- package/lib/cjs/util.d.ts +1 -0
- package/lib/esm/api.d.ts +10 -3
- package/lib/esm/api.js +15 -1
- package/lib/esm/commercelayer.d.ts +9 -2
- package/lib/esm/commercelayer.js +8 -1
- package/lib/esm/model.d.ts +10 -3
- package/lib/esm/resource.d.ts +7 -9
- package/lib/esm/resources/addresses.d.ts +14 -0
- package/lib/esm/resources/addresses.js +12 -0
- package/lib/esm/resources/adjustments.d.ts +3 -0
- package/lib/esm/resources/adjustments.js +4 -0
- package/lib/esm/resources/adyen_gateways.d.ts +5 -2
- package/lib/esm/resources/adyen_gateways.js +4 -0
- package/lib/esm/resources/adyen_payments.d.ts +3 -0
- package/lib/esm/resources/adyen_payments.js +4 -0
- package/lib/esm/resources/authorizations.d.ts +9 -3
- package/lib/esm/resources/authorizations.js +12 -4
- package/lib/esm/resources/avalara_accounts.d.ts +9 -6
- package/lib/esm/resources/avalara_accounts.js +4 -0
- package/lib/esm/resources/axerve_gateways.d.ts +4 -0
- package/lib/esm/resources/axerve_gateways.js +4 -0
- package/lib/esm/resources/axerve_payments.d.ts +9 -0
- package/lib/esm/resources/axerve_payments.js +4 -0
- package/lib/esm/resources/billing_info_validation_rules.d.ts +3 -0
- package/lib/esm/resources/billing_info_validation_rules.js +4 -0
- package/lib/esm/resources/braintree_gateways.d.ts +3 -0
- package/lib/esm/resources/braintree_gateways.js +4 -0
- package/lib/esm/resources/braintree_payments.d.ts +3 -0
- package/lib/esm/resources/braintree_payments.js +4 -0
- package/lib/esm/resources/bundles.d.ts +16 -2
- package/lib/esm/resources/bundles.js +12 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +134 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.js +79 -0
- package/lib/esm/resources/captures.d.ts +9 -3
- package/lib/esm/resources/captures.js +12 -4
- package/lib/esm/resources/carrier_accounts.d.ts +3 -0
- package/lib/esm/resources/carrier_accounts.js +4 -0
- package/lib/esm/resources/checkout_com_gateways.d.ts +3 -0
- package/lib/esm/resources/checkout_com_gateways.js +4 -0
- package/lib/esm/resources/checkout_com_payments.d.ts +3 -0
- package/lib/esm/resources/checkout_com_payments.js +4 -0
- package/lib/esm/resources/cleanups.d.ts +3 -0
- package/lib/esm/resources/cleanups.js +4 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +10 -3
- package/lib/esm/resources/coupon_codes_promotion_rules.js +4 -0
- package/lib/esm/resources/coupon_recipients.d.ts +3 -0
- package/lib/esm/resources/coupon_recipients.js +4 -0
- package/lib/esm/resources/coupons.d.ts +26 -1
- package/lib/esm/resources/coupons.js +16 -0
- package/lib/esm/resources/custom_promotion_rules.d.ts +61 -0
- package/lib/esm/resources/custom_promotion_rules.js +35 -0
- package/lib/esm/resources/customer_addresses.d.ts +5 -0
- package/lib/esm/resources/customer_addresses.js +4 -0
- package/lib/esm/resources/customer_groups.d.ts +3 -0
- package/lib/esm/resources/customer_groups.js +4 -0
- package/lib/esm/resources/customer_payment_sources.d.ts +18 -11
- package/lib/esm/resources/customer_payment_sources.js +8 -0
- package/lib/esm/resources/customer_subscriptions.d.ts +3 -0
- package/lib/esm/resources/customer_subscriptions.js +4 -0
- package/lib/esm/resources/customers.d.ts +9 -0
- package/lib/esm/resources/customers.js +4 -0
- package/lib/esm/resources/delivery_lead_times.d.ts +3 -0
- package/lib/esm/resources/delivery_lead_times.js +4 -0
- package/lib/esm/resources/external_gateways.d.ts +3 -0
- package/lib/esm/resources/external_gateways.js +4 -0
- package/lib/esm/resources/external_payments.d.ts +3 -0
- package/lib/esm/resources/external_payments.js +4 -0
- package/lib/esm/resources/external_promotions.d.ts +45 -6
- package/lib/esm/resources/external_promotions.js +24 -0
- package/lib/esm/resources/external_tax_calculators.d.ts +3 -0
- package/lib/esm/resources/external_tax_calculators.js +4 -0
- package/lib/esm/resources/fixed_amount_promotions.d.ts +45 -6
- package/lib/esm/resources/fixed_amount_promotions.js +24 -0
- package/lib/esm/resources/fixed_price_promotions.d.ts +37 -9
- package/lib/esm/resources/fixed_price_promotions.js +18 -2
- package/lib/esm/resources/free_gift_promotions.d.ts +37 -9
- package/lib/esm/resources/free_gift_promotions.js +18 -2
- package/lib/esm/resources/free_shipping_promotions.d.ts +42 -6
- package/lib/esm/resources/free_shipping_promotions.js +20 -0
- package/lib/esm/resources/gift_card_recipients.d.ts +3 -0
- package/lib/esm/resources/gift_card_recipients.js +4 -0
- package/lib/esm/resources/gift_cards.d.ts +11 -0
- package/lib/esm/resources/gift_cards.js +8 -0
- package/lib/esm/resources/imports.d.ts +1 -3
- package/lib/esm/resources/in_stock_subscriptions.d.ts +3 -0
- package/lib/esm/resources/in_stock_subscriptions.js +4 -0
- package/lib/esm/resources/inventory_models.d.ts +12 -0
- package/lib/esm/resources/inventory_models.js +4 -0
- package/lib/esm/resources/inventory_return_locations.d.ts +3 -0
- package/lib/esm/resources/inventory_return_locations.js +4 -0
- package/lib/esm/resources/inventory_stock_locations.d.ts +3 -0
- package/lib/esm/resources/inventory_stock_locations.js +4 -0
- package/lib/esm/resources/klarna_gateways.d.ts +3 -0
- package/lib/esm/resources/klarna_gateways.js +4 -0
- package/lib/esm/resources/klarna_payments.d.ts +3 -0
- package/lib/esm/resources/klarna_payments.js +4 -0
- package/lib/esm/resources/line_item_options.d.ts +11 -0
- package/lib/esm/resources/line_item_options.js +8 -0
- package/lib/esm/resources/line_items.d.ts +30 -0
- package/lib/esm/resources/line_items.js +16 -0
- package/lib/esm/resources/manual_gateways.d.ts +3 -0
- package/lib/esm/resources/manual_gateways.js +4 -0
- package/lib/esm/resources/manual_tax_calculators.d.ts +3 -0
- package/lib/esm/resources/manual_tax_calculators.js +4 -0
- package/lib/esm/resources/markets.d.ts +8 -0
- package/lib/esm/resources/markets.js +4 -0
- package/lib/esm/resources/merchants.d.ts +3 -0
- package/lib/esm/resources/merchants.js +4 -0
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +13 -3
- package/lib/esm/resources/order_amount_promotion_rules.js +4 -0
- package/lib/esm/resources/order_subscription_items.d.ts +7 -0
- package/lib/esm/resources/order_subscription_items.js +4 -0
- package/lib/esm/resources/order_subscriptions.d.ts +4 -0
- package/lib/esm/resources/order_subscriptions.js +4 -0
- package/lib/esm/resources/order_validation_rules.d.ts +3 -0
- package/lib/esm/resources/order_validation_rules.js +4 -0
- package/lib/esm/resources/orders.d.ts +50 -6
- package/lib/esm/resources/orders.js +32 -0
- package/lib/esm/resources/organization.d.ts +4 -4
- package/lib/esm/resources/packages.d.ts +3 -0
- package/lib/esm/resources/packages.js +4 -0
- package/lib/esm/resources/parcel_line_items.d.ts +4 -1
- package/lib/esm/resources/parcel_line_items.js +4 -0
- package/lib/esm/resources/parcels.d.ts +9 -3
- package/lib/esm/resources/parcels.js +4 -0
- package/lib/esm/resources/payment_gateways.d.ts +3 -0
- package/lib/esm/resources/payment_gateways.js +4 -0
- package/lib/esm/resources/payment_methods.d.ts +9 -1
- package/lib/esm/resources/payment_methods.js +4 -0
- package/lib/esm/resources/payment_options.d.ts +43 -0
- package/lib/esm/resources/payment_options.js +39 -0
- package/lib/esm/resources/paypal_gateways.d.ts +3 -0
- package/lib/esm/resources/paypal_gateways.js +4 -0
- package/lib/esm/resources/paypal_payments.d.ts +3 -0
- package/lib/esm/resources/paypal_payments.js +4 -0
- package/lib/esm/resources/percentage_discount_promotions.d.ts +37 -9
- package/lib/esm/resources/percentage_discount_promotions.js +18 -2
- package/lib/esm/resources/price_frequency_tiers.d.ts +3 -0
- package/lib/esm/resources/price_frequency_tiers.js +4 -0
- package/lib/esm/resources/price_lists.d.ts +6 -0
- package/lib/esm/resources/price_lists.js +4 -0
- package/lib/esm/resources/price_tiers.d.ts +3 -0
- package/lib/esm/resources/price_tiers.js +4 -0
- package/lib/esm/resources/price_volume_tiers.d.ts +3 -0
- package/lib/esm/resources/price_volume_tiers.js +4 -0
- package/lib/esm/resources/prices.d.ts +4 -1
- package/lib/esm/resources/prices.js +4 -0
- package/lib/esm/resources/promotion_rules.d.ts +5 -1
- package/lib/esm/resources/promotion_rules.js +4 -0
- package/lib/esm/resources/promotions.d.ts +18 -0
- package/lib/esm/resources/promotions.js +20 -0
- package/lib/esm/resources/refunds.d.ts +9 -3
- package/lib/esm/resources/refunds.js +10 -2
- package/lib/esm/resources/reserved_stocks.d.ts +27 -0
- package/lib/esm/resources/reserved_stocks.js +34 -0
- package/lib/esm/resources/return_line_items.d.ts +2 -1
- package/lib/esm/resources/returns.d.ts +11 -0
- package/lib/esm/resources/returns.js +8 -0
- package/lib/esm/resources/satispay_gateways.d.ts +6 -0
- package/lib/esm/resources/satispay_gateways.js +4 -0
- package/lib/esm/resources/satispay_payments.d.ts +11 -3
- package/lib/esm/resources/satispay_payments.js +4 -0
- package/lib/esm/resources/shipments.d.ts +49 -2
- package/lib/esm/resources/shipments.js +18 -0
- package/lib/esm/resources/shipping_categories.d.ts +6 -0
- package/lib/esm/resources/shipping_categories.js +4 -0
- package/lib/esm/resources/shipping_method_tiers.d.ts +3 -0
- package/lib/esm/resources/shipping_method_tiers.js +4 -0
- package/lib/esm/resources/shipping_methods.d.ts +11 -0
- package/lib/esm/resources/shipping_methods.js +4 -0
- package/lib/esm/resources/shipping_weight_tiers.d.ts +3 -0
- package/lib/esm/resources/shipping_weight_tiers.js +4 -0
- package/lib/esm/resources/shipping_zones.d.ts +3 -0
- package/lib/esm/resources/shipping_zones.js +4 -0
- package/lib/esm/resources/sku_list_items.d.ts +3 -0
- package/lib/esm/resources/sku_list_items.js +4 -0
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +10 -3
- package/lib/esm/resources/sku_list_promotion_rules.js +4 -0
- package/lib/esm/resources/sku_lists.d.ts +3 -0
- package/lib/esm/resources/sku_lists.js +4 -0
- package/lib/esm/resources/sku_options.d.ts +14 -0
- package/lib/esm/resources/sku_options.js +12 -0
- package/lib/esm/resources/skus.d.ts +17 -0
- package/lib/esm/resources/skus.js +16 -0
- package/lib/esm/resources/stock_items.d.ts +9 -0
- package/lib/esm/resources/stock_items.js +12 -0
- package/lib/esm/resources/stock_line_items.d.ts +42 -2
- package/lib/esm/resources/stock_line_items.js +17 -0
- package/lib/esm/resources/stock_locations.d.ts +6 -0
- package/lib/esm/resources/stock_locations.js +4 -0
- package/lib/esm/resources/stock_reservations.d.ts +49 -0
- package/lib/esm/resources/stock_reservations.js +51 -0
- package/lib/esm/resources/stock_transfers.d.ts +5 -0
- package/lib/esm/resources/stock_transfers.js +4 -0
- package/lib/esm/resources/stripe_gateways.d.ts +3 -0
- package/lib/esm/resources/stripe_gateways.js +4 -0
- package/lib/esm/resources/stripe_payments.d.ts +12 -0
- package/lib/esm/resources/stripe_payments.js +4 -0
- package/lib/esm/resources/tags.d.ts +27 -0
- package/lib/esm/resources/tags.js +31 -0
- package/lib/esm/resources/tax_calculators.d.ts +3 -0
- package/lib/esm/resources/tax_calculators.js +4 -0
- package/lib/esm/resources/tax_categories.d.ts +3 -0
- package/lib/esm/resources/tax_categories.js +4 -0
- package/lib/esm/resources/tax_rules.d.ts +3 -0
- package/lib/esm/resources/tax_rules.js +4 -0
- package/lib/esm/resources/taxjar_accounts.d.ts +3 -0
- package/lib/esm/resources/taxjar_accounts.js +4 -0
- package/lib/esm/resources/transactions.d.ts +9 -0
- package/lib/esm/resources/transactions.js +12 -0
- package/lib/esm/resources/versions.d.ts +22 -0
- package/lib/esm/resources/versions.js +22 -0
- package/lib/esm/resources/voids.d.ts +9 -3
- package/lib/esm/resources/voids.js +10 -2
- package/lib/esm/resources/webhooks.d.ts +8 -0
- package/lib/esm/resources/webhooks.js +4 -0
- package/lib/esm/resources/wire_transfers.d.ts +3 -0
- package/lib/esm/resources/wire_transfers.js +4 -0
- package/lib/esm/util.d.ts +1 -0
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -25
- package/lib/cjs/micro.d.ts +0 -4
- package/lib/cjs/micro.js +0 -13
- package/lib/esm/micro.d.ts +0 -4
- package/lib/esm/micro.js +0 -7
@@ -32,6 +32,18 @@ class FreeGiftPromotions extends ApiResource {
|
|
32
32
|
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
33
33
|
return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `free_gift_promotions/${_freeGiftPromotionId}/coupon_codes_promotion_rule`, params, options);
|
34
34
|
}
|
35
|
+
async custom_promotion_rule(freeGiftPromotionId, params, options) {
|
36
|
+
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
37
|
+
return this.resources.fetch({ type: 'custom_promotion_rules' }, `free_gift_promotions/${_freeGiftPromotionId}/custom_promotion_rule`, params, options);
|
38
|
+
}
|
39
|
+
async sku_list(freeGiftPromotionId, params, options) {
|
40
|
+
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
41
|
+
return this.resources.fetch({ type: 'sku_lists' }, `free_gift_promotions/${_freeGiftPromotionId}/sku_list`, params, options);
|
42
|
+
}
|
43
|
+
async coupons(freeGiftPromotionId, params, options) {
|
44
|
+
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
45
|
+
return this.resources.fetch({ type: 'coupons' }, `free_gift_promotions/${_freeGiftPromotionId}/coupons`, params, options);
|
46
|
+
}
|
35
47
|
async attachments(freeGiftPromotionId, params, options) {
|
36
48
|
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
37
49
|
return this.resources.fetch({ type: 'attachments' }, `free_gift_promotions/${_freeGiftPromotionId}/attachments`, params, options);
|
@@ -40,9 +52,13 @@ class FreeGiftPromotions extends ApiResource {
|
|
40
52
|
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
41
53
|
return this.resources.fetch({ type: 'events' }, `free_gift_promotions/${_freeGiftPromotionId}/events`, params, options);
|
42
54
|
}
|
43
|
-
async
|
55
|
+
async tags(freeGiftPromotionId, params, options) {
|
44
56
|
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
45
|
-
return this.resources.fetch({ type: '
|
57
|
+
return this.resources.fetch({ type: 'tags' }, `free_gift_promotions/${_freeGiftPromotionId}/tags`, params, options);
|
58
|
+
}
|
59
|
+
async versions(freeGiftPromotionId, params, options) {
|
60
|
+
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
61
|
+
return this.resources.fetch({ type: 'versions' }, `free_gift_promotions/${_freeGiftPromotionId}/versions`, params, options);
|
46
62
|
}
|
47
63
|
async skus(freeGiftPromotionId, params, options) {
|
48
64
|
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
@@ -5,17 +5,19 @@ import type { PromotionRule } from './promotion_rules';
|
|
5
5
|
import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
6
6
|
import type { SkuListPromotionRule } from './sku_list_promotion_rules';
|
7
7
|
import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
8
|
+
import type { CustomPromotionRule } from './custom_promotion_rules';
|
9
|
+
import type { SkuList } from './sku_lists';
|
10
|
+
import type { Coupon } from './coupons';
|
8
11
|
import type { Attachment } from './attachments';
|
9
12
|
import type { Event } from './events';
|
13
|
+
import type { Tag } from './tags';
|
14
|
+
import type { Version } from './versions';
|
10
15
|
type FreeShippingPromotionRel = ResourceRel & {
|
11
16
|
type: typeof FreeShippingPromotions.TYPE;
|
12
17
|
};
|
13
18
|
type MarketRel = ResourceRel & {
|
14
19
|
type: 'markets';
|
15
20
|
};
|
16
|
-
type PromotionRuleRel = ResourceRel & {
|
17
|
-
type: 'promotion_rules';
|
18
|
-
};
|
19
21
|
type OrderAmountPromotionRuleRel = ResourceRel & {
|
20
22
|
type: 'order_amount_promotion_rules';
|
21
23
|
};
|
@@ -25,45 +27,74 @@ type SkuListPromotionRuleRel = ResourceRel & {
|
|
25
27
|
type CouponCodesPromotionRuleRel = ResourceRel & {
|
26
28
|
type: 'coupon_codes_promotion_rules';
|
27
29
|
};
|
30
|
+
type CustomPromotionRuleRel = ResourceRel & {
|
31
|
+
type: 'custom_promotion_rules';
|
32
|
+
};
|
33
|
+
type SkuListRel = ResourceRel & {
|
34
|
+
type: 'sku_lists';
|
35
|
+
};
|
36
|
+
type TagRel = ResourceRel & {
|
37
|
+
type: 'tags';
|
38
|
+
};
|
28
39
|
interface FreeShippingPromotion extends Resource {
|
29
40
|
name?: string;
|
30
41
|
currency_code?: string;
|
42
|
+
exclusive?: boolean;
|
43
|
+
priority?: number;
|
31
44
|
starts_at?: string;
|
32
45
|
expires_at?: string;
|
33
46
|
total_usage_limit?: number;
|
34
47
|
total_usage_count?: number;
|
35
48
|
active?: boolean;
|
49
|
+
disabled_at?: string;
|
36
50
|
market?: Market;
|
37
51
|
promotion_rules?: PromotionRule[];
|
38
52
|
order_amount_promotion_rule?: OrderAmountPromotionRule;
|
39
53
|
sku_list_promotion_rule?: SkuListPromotionRule;
|
40
54
|
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
55
|
+
custom_promotion_rule?: CustomPromotionRule;
|
56
|
+
sku_list?: SkuList;
|
57
|
+
coupons?: Coupon[];
|
41
58
|
attachments?: Attachment[];
|
42
59
|
events?: Event[];
|
60
|
+
tags?: Tag[];
|
61
|
+
versions?: Version[];
|
43
62
|
}
|
44
63
|
interface FreeShippingPromotionCreate extends ResourceCreate {
|
45
64
|
name: string;
|
46
65
|
currency_code?: string;
|
66
|
+
exclusive?: boolean;
|
67
|
+
priority?: number;
|
47
68
|
starts_at: string;
|
48
69
|
expires_at: string;
|
49
|
-
total_usage_limit
|
70
|
+
total_usage_limit?: number;
|
71
|
+
_disable?: boolean;
|
72
|
+
_enable?: boolean;
|
50
73
|
market?: MarketRel;
|
51
|
-
promotion_rules?: PromotionRuleRel[];
|
52
74
|
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
53
75
|
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
54
76
|
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
77
|
+
custom_promotion_rule?: CustomPromotionRuleRel;
|
78
|
+
sku_list?: SkuListRel;
|
79
|
+
tags?: TagRel[];
|
55
80
|
}
|
56
81
|
interface FreeShippingPromotionUpdate extends ResourceUpdate {
|
57
82
|
name?: string;
|
58
83
|
currency_code?: string;
|
84
|
+
exclusive?: boolean;
|
85
|
+
priority?: number;
|
59
86
|
starts_at?: string;
|
60
87
|
expires_at?: string;
|
61
88
|
total_usage_limit?: number;
|
89
|
+
_disable?: boolean;
|
90
|
+
_enable?: boolean;
|
62
91
|
market?: MarketRel;
|
63
|
-
promotion_rules?: PromotionRuleRel[];
|
64
92
|
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
65
93
|
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
66
94
|
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
95
|
+
custom_promotion_rule?: CustomPromotionRuleRel;
|
96
|
+
sku_list?: SkuListRel;
|
97
|
+
tags?: TagRel[];
|
67
98
|
}
|
68
99
|
declare class FreeShippingPromotions extends ApiResource {
|
69
100
|
static readonly TYPE: 'free_shipping_promotions';
|
@@ -76,8 +107,13 @@ declare class FreeShippingPromotions extends ApiResource {
|
|
76
107
|
order_amount_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
77
108
|
sku_list_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
78
109
|
coupon_codes_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
110
|
+
custom_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
|
111
|
+
sku_list(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
112
|
+
coupons(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
79
113
|
attachments(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
80
114
|
events(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
115
|
+
tags(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
116
|
+
versions(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
81
117
|
isFreeShippingPromotion(resource: any): resource is FreeShippingPromotion;
|
82
118
|
relationship(id: string | ResourceId | null): FreeShippingPromotionRel;
|
83
119
|
type(): string;
|
@@ -32,6 +32,18 @@ class FreeShippingPromotions extends ApiResource {
|
|
32
32
|
const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
|
33
33
|
return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupon_codes_promotion_rule`, params, options);
|
34
34
|
}
|
35
|
+
async custom_promotion_rule(freeShippingPromotionId, params, options) {
|
36
|
+
const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
|
37
|
+
return this.resources.fetch({ type: 'custom_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/custom_promotion_rule`, params, options);
|
38
|
+
}
|
39
|
+
async sku_list(freeShippingPromotionId, params, options) {
|
40
|
+
const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
|
41
|
+
return this.resources.fetch({ type: 'sku_lists' }, `free_shipping_promotions/${_freeShippingPromotionId}/sku_list`, params, options);
|
42
|
+
}
|
43
|
+
async coupons(freeShippingPromotionId, params, options) {
|
44
|
+
const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
|
45
|
+
return this.resources.fetch({ type: 'coupons' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupons`, params, options);
|
46
|
+
}
|
35
47
|
async attachments(freeShippingPromotionId, params, options) {
|
36
48
|
const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
|
37
49
|
return this.resources.fetch({ type: 'attachments' }, `free_shipping_promotions/${_freeShippingPromotionId}/attachments`, params, options);
|
@@ -40,6 +52,14 @@ class FreeShippingPromotions extends ApiResource {
|
|
40
52
|
const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
|
41
53
|
return this.resources.fetch({ type: 'events' }, `free_shipping_promotions/${_freeShippingPromotionId}/events`, params, options);
|
42
54
|
}
|
55
|
+
async tags(freeShippingPromotionId, params, options) {
|
56
|
+
const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
|
57
|
+
return this.resources.fetch({ type: 'tags' }, `free_shipping_promotions/${_freeShippingPromotionId}/tags`, params, options);
|
58
|
+
}
|
59
|
+
async versions(freeShippingPromotionId, params, options) {
|
60
|
+
const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
|
61
|
+
return this.resources.fetch({ type: 'versions' }, `free_shipping_promotions/${_freeShippingPromotionId}/versions`, params, options);
|
62
|
+
}
|
43
63
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
44
64
|
isFreeShippingPromotion(resource) {
|
45
65
|
return resource.type && (resource.type === FreeShippingPromotions.TYPE);
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Customer } from './customers';
|
4
4
|
import type { Attachment } from './attachments';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type GiftCardRecipientRel = ResourceRel & {
|
6
7
|
type: typeof GiftCardRecipients.TYPE;
|
7
8
|
};
|
@@ -14,6 +15,7 @@ interface GiftCardRecipient extends Resource {
|
|
14
15
|
last_name?: string;
|
15
16
|
customer?: Customer;
|
16
17
|
attachments?: Attachment[];
|
18
|
+
versions?: Version[];
|
17
19
|
}
|
18
20
|
interface GiftCardRecipientCreate extends ResourceCreate {
|
19
21
|
email: string;
|
@@ -36,6 +38,7 @@ declare class GiftCardRecipients extends ApiResource {
|
|
36
38
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
37
39
|
customer(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
38
40
|
attachments(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
41
|
+
versions(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
39
42
|
isGiftCardRecipient(resource: any): resource is GiftCardRecipient;
|
40
43
|
relationship(id: string | ResourceId | null): GiftCardRecipientRel;
|
41
44
|
type(): string;
|
@@ -24,6 +24,10 @@ class GiftCardRecipients extends ApiResource {
|
|
24
24
|
const _giftCardRecipientId = giftCardRecipientId.id || giftCardRecipientId;
|
25
25
|
return this.resources.fetch({ type: 'attachments' }, `gift_card_recipients/${_giftCardRecipientId}/attachments`, params, options);
|
26
26
|
}
|
27
|
+
async versions(giftCardRecipientId, params, options) {
|
28
|
+
const _giftCardRecipientId = giftCardRecipientId.id || giftCardRecipientId;
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `gift_card_recipients/${_giftCardRecipientId}/versions`, params, options);
|
30
|
+
}
|
27
31
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
32
|
isGiftCardRecipient(resource) {
|
29
33
|
return resource.type && (resource.type === GiftCardRecipients.TYPE);
|
@@ -4,6 +4,8 @@ import type { Market } from './markets';
|
|
4
4
|
import type { GiftCardRecipient } from './gift_card_recipients';
|
5
5
|
import type { Attachment } from './attachments';
|
6
6
|
import type { Event } from './events';
|
7
|
+
import type { Tag } from './tags';
|
8
|
+
import type { Version } from './versions';
|
7
9
|
type GiftCardRel = ResourceRel & {
|
8
10
|
type: typeof GiftCards.TYPE;
|
9
11
|
};
|
@@ -13,6 +15,9 @@ type MarketRel = ResourceRel & {
|
|
13
15
|
type GiftCardRecipientRel = ResourceRel & {
|
14
16
|
type: 'gift_card_recipients';
|
15
17
|
};
|
18
|
+
type TagRel = ResourceRel & {
|
19
|
+
type: 'tags';
|
20
|
+
};
|
16
21
|
interface GiftCard extends Resource {
|
17
22
|
status?: string;
|
18
23
|
code?: string;
|
@@ -36,6 +41,8 @@ interface GiftCard extends Resource {
|
|
36
41
|
gift_card_recipient?: GiftCardRecipient;
|
37
42
|
attachments?: Attachment[];
|
38
43
|
events?: Event[];
|
44
|
+
tags?: Tag[];
|
45
|
+
versions?: Version[];
|
39
46
|
}
|
40
47
|
interface GiftCardCreate extends ResourceCreate {
|
41
48
|
code?: string;
|
@@ -49,6 +56,7 @@ interface GiftCardCreate extends ResourceCreate {
|
|
49
56
|
recipient_email?: string;
|
50
57
|
market?: MarketRel;
|
51
58
|
gift_card_recipient?: GiftCardRecipientRel;
|
59
|
+
tags?: TagRel[];
|
52
60
|
}
|
53
61
|
interface GiftCardUpdate extends ResourceUpdate {
|
54
62
|
currency_code?: string;
|
@@ -65,6 +73,7 @@ interface GiftCardUpdate extends ResourceUpdate {
|
|
65
73
|
_balance_change_cents?: number;
|
66
74
|
market?: MarketRel;
|
67
75
|
gift_card_recipient?: GiftCardRecipientRel;
|
76
|
+
tags?: TagRel[];
|
68
77
|
}
|
69
78
|
declare class GiftCards extends ApiResource {
|
70
79
|
static readonly TYPE: 'gift_cards';
|
@@ -77,6 +86,8 @@ declare class GiftCards extends ApiResource {
|
|
77
86
|
gift_card_recipient(giftCardId: string | GiftCard, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GiftCardRecipient>;
|
78
87
|
attachments(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
79
88
|
events(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
89
|
+
tags(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
90
|
+
versions(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
80
91
|
isGiftCard(resource: any): resource is GiftCard;
|
81
92
|
relationship(id: string | ResourceId | null): GiftCardRel;
|
82
93
|
type(): string;
|
@@ -32,6 +32,14 @@ class GiftCards extends ApiResource {
|
|
32
32
|
const _giftCardId = giftCardId.id || giftCardId;
|
33
33
|
return this.resources.fetch({ type: 'events' }, `gift_cards/${_giftCardId}/events`, params, options);
|
34
34
|
}
|
35
|
+
async tags(giftCardId, params, options) {
|
36
|
+
const _giftCardId = giftCardId.id || giftCardId;
|
37
|
+
return this.resources.fetch({ type: 'tags' }, `gift_cards/${_giftCardId}/tags`, params, options);
|
38
|
+
}
|
39
|
+
async versions(giftCardId, params, options) {
|
40
|
+
const _giftCardId = giftCardId.id || giftCardId;
|
41
|
+
return this.resources.fetch({ type: 'versions' }, `gift_cards/${_giftCardId}/versions`, params, options);
|
42
|
+
}
|
35
43
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
36
44
|
isGiftCard(resource) {
|
37
45
|
return resource.type && (resource.type === GiftCards.TYPE);
|
@@ -6,6 +6,7 @@ type ImportRel = ResourceRel & {
|
|
6
6
|
};
|
7
7
|
interface Import extends Resource {
|
8
8
|
resource_type?: string;
|
9
|
+
format?: string;
|
9
10
|
parent_resource_id?: string;
|
10
11
|
status?: string;
|
11
12
|
started_at?: string;
|
@@ -15,11 +16,9 @@ interface Import extends Resource {
|
|
15
16
|
inputs_size?: number;
|
16
17
|
errors_count?: number;
|
17
18
|
warnings_count?: number;
|
18
|
-
destroyed_count?: number;
|
19
19
|
processed_count?: number;
|
20
20
|
errors_log?: object;
|
21
21
|
warnings_log?: object;
|
22
|
-
cleanup_records?: boolean;
|
23
22
|
attachment_url?: string;
|
24
23
|
events?: Event[];
|
25
24
|
}
|
@@ -28,7 +27,6 @@ interface ImportCreate extends ResourceCreate {
|
|
28
27
|
format?: string;
|
29
28
|
parent_resource_id?: string;
|
30
29
|
inputs: object[];
|
31
|
-
cleanup_records?: boolean;
|
32
30
|
}
|
33
31
|
declare class Imports extends ApiResource {
|
34
32
|
static readonly TYPE: 'imports';
|
@@ -4,6 +4,7 @@ import type { Market } from './markets';
|
|
4
4
|
import type { Customer } from './customers';
|
5
5
|
import type { Sku } from './skus';
|
6
6
|
import type { Event } from './events';
|
7
|
+
import type { Version } from './versions';
|
7
8
|
type InStockSubscriptionRel = ResourceRel & {
|
8
9
|
type: typeof InStockSubscriptions.TYPE;
|
9
10
|
};
|
@@ -25,6 +26,7 @@ interface InStockSubscription extends Resource {
|
|
25
26
|
customer?: Customer;
|
26
27
|
sku?: Sku;
|
27
28
|
events?: Event[];
|
29
|
+
versions?: Version[];
|
28
30
|
}
|
29
31
|
interface InStockSubscriptionCreate extends ResourceCreate {
|
30
32
|
customer_email?: string;
|
@@ -54,6 +56,7 @@ declare class InStockSubscriptions extends ApiResource {
|
|
54
56
|
customer(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
55
57
|
sku(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
56
58
|
events(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
59
|
+
versions(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
57
60
|
isInStockSubscription(resource: any): resource is InStockSubscription;
|
58
61
|
relationship(id: string | ResourceId | null): InStockSubscriptionRel;
|
59
62
|
type(): string;
|
@@ -32,6 +32,10 @@ class InStockSubscriptions extends ApiResource {
|
|
32
32
|
const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
|
33
33
|
return this.resources.fetch({ type: 'events' }, `in_stock_subscriptions/${_inStockSubscriptionId}/events`, params, options);
|
34
34
|
}
|
35
|
+
async versions(inStockSubscriptionId, params, options) {
|
36
|
+
const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
|
37
|
+
return this.resources.fetch({ type: 'versions' }, `in_stock_subscriptions/${_inStockSubscriptionId}/versions`, params, options);
|
38
|
+
}
|
35
39
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
36
40
|
isInStockSubscription(resource) {
|
37
41
|
return resource.type && (resource.type === InStockSubscriptions.TYPE);
|
@@ -3,6 +3,7 @@ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
3
|
import type { InventoryStockLocation } from './inventory_stock_locations';
|
4
4
|
import type { InventoryReturnLocation } from './inventory_return_locations';
|
5
5
|
import type { Attachment } from './attachments';
|
6
|
+
import type { Version } from './versions';
|
6
7
|
type InventoryModelRel = ResourceRel & {
|
7
8
|
type: typeof InventoryModels.TYPE;
|
8
9
|
};
|
@@ -10,19 +11,29 @@ interface InventoryModel extends Resource {
|
|
10
11
|
name?: string;
|
11
12
|
strategy?: string;
|
12
13
|
stock_locations_cutoff?: number;
|
14
|
+
stock_reservation_cutoff?: number;
|
15
|
+
put_stock_transfers_on_hold?: boolean;
|
16
|
+
manual_stock_decrement?: boolean;
|
13
17
|
inventory_stock_locations?: InventoryStockLocation[];
|
14
18
|
inventory_return_locations?: InventoryReturnLocation[];
|
15
19
|
attachments?: Attachment[];
|
20
|
+
versions?: Version[];
|
16
21
|
}
|
17
22
|
interface InventoryModelCreate extends ResourceCreate {
|
18
23
|
name: string;
|
19
24
|
strategy?: string;
|
20
25
|
stock_locations_cutoff?: number;
|
26
|
+
stock_reservation_cutoff?: number;
|
27
|
+
put_stock_transfers_on_hold?: boolean;
|
28
|
+
manual_stock_decrement?: boolean;
|
21
29
|
}
|
22
30
|
interface InventoryModelUpdate extends ResourceUpdate {
|
23
31
|
name?: string;
|
24
32
|
strategy?: string;
|
25
33
|
stock_locations_cutoff?: number;
|
34
|
+
stock_reservation_cutoff?: number;
|
35
|
+
put_stock_transfers_on_hold?: boolean;
|
36
|
+
manual_stock_decrement?: boolean;
|
26
37
|
}
|
27
38
|
declare class InventoryModels extends ApiResource {
|
28
39
|
static readonly TYPE: 'inventory_models';
|
@@ -34,6 +45,7 @@ declare class InventoryModels extends ApiResource {
|
|
34
45
|
inventory_stock_locations(inventoryModelId: string | InventoryModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryStockLocation>>;
|
35
46
|
inventory_return_locations(inventoryModelId: string | InventoryModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryReturnLocation>>;
|
36
47
|
attachments(inventoryModelId: string | InventoryModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
48
|
+
versions(inventoryModelId: string | InventoryModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
37
49
|
isInventoryModel(resource: any): resource is InventoryModel;
|
38
50
|
relationship(id: string | ResourceId | null): InventoryModelRel;
|
39
51
|
type(): string;
|
@@ -28,6 +28,10 @@ class InventoryModels extends ApiResource {
|
|
28
28
|
const _inventoryModelId = inventoryModelId.id || inventoryModelId;
|
29
29
|
return this.resources.fetch({ type: 'attachments' }, `inventory_models/${_inventoryModelId}/attachments`, params, options);
|
30
30
|
}
|
31
|
+
async versions(inventoryModelId, params, options) {
|
32
|
+
const _inventoryModelId = inventoryModelId.id || inventoryModelId;
|
33
|
+
return this.resources.fetch({ type: 'versions' }, `inventory_models/${_inventoryModelId}/versions`, params, options);
|
34
|
+
}
|
31
35
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
32
36
|
isInventoryModel(resource) {
|
33
37
|
return resource.type && (resource.type === InventoryModels.TYPE);
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { StockLocation } from './stock_locations';
|
4
4
|
import type { InventoryModel } from './inventory_models';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type InventoryReturnLocationRel = ResourceRel & {
|
6
7
|
type: typeof InventoryReturnLocations.TYPE;
|
7
8
|
};
|
@@ -15,6 +16,7 @@ interface InventoryReturnLocation extends Resource {
|
|
15
16
|
priority?: number;
|
16
17
|
stock_location?: StockLocation;
|
17
18
|
inventory_model?: InventoryModel;
|
19
|
+
versions?: Version[];
|
18
20
|
}
|
19
21
|
interface InventoryReturnLocationCreate extends ResourceCreate {
|
20
22
|
priority: number;
|
@@ -35,6 +37,7 @@ declare class InventoryReturnLocations extends ApiResource {
|
|
35
37
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
36
38
|
stock_location(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
37
39
|
inventory_model(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryModel>;
|
40
|
+
versions(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
38
41
|
isInventoryReturnLocation(resource: any): resource is InventoryReturnLocation;
|
39
42
|
relationship(id: string | ResourceId | null): InventoryReturnLocationRel;
|
40
43
|
type(): string;
|
@@ -24,6 +24,10 @@ class InventoryReturnLocations extends ApiResource {
|
|
24
24
|
const _inventoryReturnLocationId = inventoryReturnLocationId.id || inventoryReturnLocationId;
|
25
25
|
return this.resources.fetch({ type: 'inventory_models' }, `inventory_return_locations/${_inventoryReturnLocationId}/inventory_model`, params, options);
|
26
26
|
}
|
27
|
+
async versions(inventoryReturnLocationId, params, options) {
|
28
|
+
const _inventoryReturnLocationId = inventoryReturnLocationId.id || inventoryReturnLocationId;
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `inventory_return_locations/${_inventoryReturnLocationId}/versions`, params, options);
|
30
|
+
}
|
27
31
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
32
|
isInventoryReturnLocation(resource) {
|
29
33
|
return resource.type && (resource.type === InventoryReturnLocations.TYPE);
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { StockLocation } from './stock_locations';
|
4
4
|
import type { InventoryModel } from './inventory_models';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type InventoryStockLocationRel = ResourceRel & {
|
6
7
|
type: typeof InventoryStockLocations.TYPE;
|
7
8
|
};
|
@@ -16,6 +17,7 @@ interface InventoryStockLocation extends Resource {
|
|
16
17
|
on_hold?: boolean;
|
17
18
|
stock_location?: StockLocation;
|
18
19
|
inventory_model?: InventoryModel;
|
20
|
+
versions?: Version[];
|
19
21
|
}
|
20
22
|
interface InventoryStockLocationCreate extends ResourceCreate {
|
21
23
|
priority: number;
|
@@ -38,6 +40,7 @@ declare class InventoryStockLocations extends ApiResource {
|
|
38
40
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
39
41
|
stock_location(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
40
42
|
inventory_model(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryModel>;
|
43
|
+
versions(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
41
44
|
isInventoryStockLocation(resource: any): resource is InventoryStockLocation;
|
42
45
|
relationship(id: string | ResourceId | null): InventoryStockLocationRel;
|
43
46
|
type(): string;
|
@@ -24,6 +24,10 @@ class InventoryStockLocations extends ApiResource {
|
|
24
24
|
const _inventoryStockLocationId = inventoryStockLocationId.id || inventoryStockLocationId;
|
25
25
|
return this.resources.fetch({ type: 'inventory_models' }, `inventory_stock_locations/${_inventoryStockLocationId}/inventory_model`, params, options);
|
26
26
|
}
|
27
|
+
async versions(inventoryStockLocationId, params, options) {
|
28
|
+
const _inventoryStockLocationId = inventoryStockLocationId.id || inventoryStockLocationId;
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `inventory_stock_locations/${_inventoryStockLocationId}/versions`, params, options);
|
30
|
+
}
|
27
31
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
32
|
isInventoryStockLocation(resource) {
|
29
33
|
return resource.type && (resource.type === InventoryStockLocations.TYPE);
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { PaymentMethod } from './payment_methods';
|
4
|
+
import type { Version } from './versions';
|
4
5
|
import type { KlarnaPayment } from './klarna_payments';
|
5
6
|
type KlarnaGatewayRel = ResourceRel & {
|
6
7
|
type: typeof KlarnaGateways.TYPE;
|
@@ -11,6 +12,7 @@ type KlarnaPaymentRel = ResourceRel & {
|
|
11
12
|
interface KlarnaGateway extends Resource {
|
12
13
|
name?: string;
|
13
14
|
payment_methods?: PaymentMethod[];
|
15
|
+
versions?: Version[];
|
14
16
|
klarna_payments?: KlarnaPayment[];
|
15
17
|
}
|
16
18
|
interface KlarnaGatewayCreate extends ResourceCreate {
|
@@ -35,6 +37,7 @@ declare class KlarnaGateways extends ApiResource {
|
|
35
37
|
update(resource: KlarnaGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaGateway>;
|
36
38
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
37
39
|
payment_methods(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
40
|
+
versions(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
38
41
|
klarna_payments(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<KlarnaPayment>>;
|
39
42
|
isKlarnaGateway(resource: any): resource is KlarnaGateway;
|
40
43
|
relationship(id: string | ResourceId | null): KlarnaGatewayRel;
|
@@ -20,6 +20,10 @@ class KlarnaGateways extends ApiResource {
|
|
20
20
|
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
21
21
|
return this.resources.fetch({ type: 'payment_methods' }, `klarna_gateways/${_klarnaGatewayId}/payment_methods`, params, options);
|
22
22
|
}
|
23
|
+
async versions(klarnaGatewayId, params, options) {
|
24
|
+
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
25
|
+
return this.resources.fetch({ type: 'versions' }, `klarna_gateways/${_klarnaGatewayId}/versions`, params, options);
|
26
|
+
}
|
23
27
|
async klarna_payments(klarnaGatewayId, params, options) {
|
24
28
|
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
25
29
|
return this.resources.fetch({ type: 'klarna_payments' }, `klarna_gateways/${_klarnaGatewayId}/klarna_payments`, params, options);
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Order } from './orders';
|
4
4
|
import type { PaymentGateway } from './payment_gateways';
|
5
|
+
import type { Version } from './versions';
|
5
6
|
type KlarnaPaymentRel = ResourceRel & {
|
6
7
|
type: typeof KlarnaPayments.TYPE;
|
7
8
|
};
|
@@ -20,6 +21,7 @@ interface KlarnaPayment extends Resource {
|
|
20
21
|
payment_instrument?: object;
|
21
22
|
order?: Order;
|
22
23
|
payment_gateway?: PaymentGateway;
|
24
|
+
versions?: Version[];
|
23
25
|
}
|
24
26
|
interface KlarnaPaymentCreate extends ResourceCreate {
|
25
27
|
order: OrderRel;
|
@@ -38,6 +40,7 @@ declare class KlarnaPayments extends ApiResource {
|
|
38
40
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
39
41
|
order(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
40
42
|
payment_gateway(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
43
|
+
versions(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
41
44
|
isKlarnaPayment(resource: any): resource is KlarnaPayment;
|
42
45
|
relationship(id: string | ResourceId | null): KlarnaPaymentRel;
|
43
46
|
type(): string;
|
@@ -24,6 +24,10 @@ class KlarnaPayments extends ApiResource {
|
|
24
24
|
const _klarnaPaymentId = klarnaPaymentId.id || klarnaPaymentId;
|
25
25
|
return this.resources.fetch({ type: 'payment_gateways' }, `klarna_payments/${_klarnaPaymentId}/payment_gateway`, params, options);
|
26
26
|
}
|
27
|
+
async versions(klarnaPaymentId, params, options) {
|
28
|
+
const _klarnaPaymentId = klarnaPaymentId.id || klarnaPaymentId;
|
29
|
+
return this.resources.fetch({ type: 'versions' }, `klarna_payments/${_klarnaPaymentId}/versions`, params, options);
|
30
|
+
}
|
27
31
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
32
|
isKlarnaPayment(resource) {
|
29
33
|
return resource.type && (resource.type === KlarnaPayments.TYPE);
|
@@ -2,6 +2,8 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { LineItem } from './line_items';
|
4
4
|
import type { SkuOption } from './sku_options';
|
5
|
+
import type { Event } from './events';
|
6
|
+
import type { Tag } from './tags';
|
5
7
|
type LineItemOptionRel = ResourceRel & {
|
6
8
|
type: typeof LineItemOptions.TYPE;
|
7
9
|
};
|
@@ -11,6 +13,9 @@ type LineItemRel = ResourceRel & {
|
|
11
13
|
type SkuOptionRel = ResourceRel & {
|
12
14
|
type: 'sku_options';
|
13
15
|
};
|
16
|
+
type TagRel = ResourceRel & {
|
17
|
+
type: 'tags';
|
18
|
+
};
|
14
19
|
interface LineItemOption extends Resource {
|
15
20
|
name?: string;
|
16
21
|
quantity?: number;
|
@@ -26,6 +31,8 @@ interface LineItemOption extends Resource {
|
|
26
31
|
options?: object;
|
27
32
|
line_item?: LineItem;
|
28
33
|
sku_option?: SkuOption;
|
34
|
+
events?: Event[];
|
35
|
+
tags?: Tag[];
|
29
36
|
}
|
30
37
|
interface LineItemOptionCreate extends ResourceCreate {
|
31
38
|
name?: string;
|
@@ -33,12 +40,14 @@ interface LineItemOptionCreate extends ResourceCreate {
|
|
33
40
|
options: object;
|
34
41
|
line_item: LineItemRel;
|
35
42
|
sku_option: SkuOptionRel;
|
43
|
+
tags?: TagRel[];
|
36
44
|
}
|
37
45
|
interface LineItemOptionUpdate extends ResourceUpdate {
|
38
46
|
name?: string;
|
39
47
|
quantity?: number;
|
40
48
|
options?: object;
|
41
49
|
sku_option?: SkuOptionRel;
|
50
|
+
tags?: TagRel[];
|
42
51
|
}
|
43
52
|
declare class LineItemOptions extends ApiResource {
|
44
53
|
static readonly TYPE: 'line_item_options';
|
@@ -49,6 +58,8 @@ declare class LineItemOptions extends ApiResource {
|
|
49
58
|
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
50
59
|
line_item(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
51
60
|
sku_option(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuOption>;
|
61
|
+
events(lineItemOptionId: string | LineItemOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
62
|
+
tags(lineItemOptionId: string | LineItemOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
52
63
|
isLineItemOption(resource: any): resource is LineItemOption;
|
53
64
|
relationship(id: string | ResourceId | null): LineItemOptionRel;
|
54
65
|
type(): string;
|
@@ -24,6 +24,14 @@ class LineItemOptions extends ApiResource {
|
|
24
24
|
const _lineItemOptionId = lineItemOptionId.id || lineItemOptionId;
|
25
25
|
return this.resources.fetch({ type: 'sku_options' }, `line_item_options/${_lineItemOptionId}/sku_option`, params, options);
|
26
26
|
}
|
27
|
+
async events(lineItemOptionId, params, options) {
|
28
|
+
const _lineItemOptionId = lineItemOptionId.id || lineItemOptionId;
|
29
|
+
return this.resources.fetch({ type: 'events' }, `line_item_options/${_lineItemOptionId}/events`, params, options);
|
30
|
+
}
|
31
|
+
async tags(lineItemOptionId, params, options) {
|
32
|
+
const _lineItemOptionId = lineItemOptionId.id || lineItemOptionId;
|
33
|
+
return this.resources.fetch({ type: 'tags' }, `line_item_options/${_lineItemOptionId}/tags`, params, options);
|
34
|
+
}
|
27
35
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
36
|
isLineItemOption(resource) {
|
29
37
|
return resource.type && (resource.type === LineItemOptions.TYPE);
|