@commercelayer/sdk 4.22.0 → 4.23.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 +109 -1
- package/lib/cjs/api.js +343 -1
- package/lib/cjs/client.d.ts +31 -1
- package/lib/cjs/client.js +123 -1
- package/lib/cjs/commercelayer.d.ts +133 -1
- package/lib/cjs/commercelayer.js +224 -1
- package/lib/cjs/common.d.ts +4 -1
- package/lib/cjs/common.js +14 -1
- package/lib/cjs/config.d.ts +11 -1
- package/lib/cjs/config.js +13 -1
- package/lib/cjs/debug.d.ts +3 -1
- package/lib/cjs/debug.js +42 -1
- package/lib/cjs/error.d.ts +28 -1
- package/lib/cjs/error.js +43 -1
- package/lib/cjs/index.d.ts +7 -1
- package/lib/cjs/index.js +29 -1
- package/lib/cjs/interceptor.d.ts +21 -1
- package/lib/cjs/interceptor.js +2 -1
- package/lib/cjs/jsonapi.d.ts +5 -1
- package/lib/cjs/jsonapi.js +82 -1
- package/lib/cjs/model.d.ts +107 -1
- package/lib/cjs/model.js +3 -1
- package/lib/cjs/query.d.ts +23 -1
- package/lib/cjs/query.js +51 -1
- package/lib/cjs/resource.d.ts +77 -1
- package/lib/cjs/resource.js +145 -1
- package/lib/cjs/resources/addresses.d.ts +88 -1
- package/lib/cjs/resources/addresses.js +37 -1
- package/lib/cjs/resources/adjustments.d.ts +35 -1
- package/lib/cjs/resources/adjustments.js +33 -1
- package/lib/cjs/resources/adyen_gateways.d.ts +56 -1
- package/lib/cjs/resources/adyen_gateways.js +41 -1
- package/lib/cjs/resources/adyen_payments.d.ts +45 -1
- package/lib/cjs/resources/adyen_payments.js +41 -1
- package/lib/cjs/resources/application.d.ts +21 -1
- package/lib/cjs/resources/application.js +21 -1
- package/lib/cjs/resources/attachments.d.ts +156 -1
- package/lib/cjs/resources/attachments.js +33 -1
- package/lib/cjs/resources/authorizations.d.ts +60 -1
- package/lib/cjs/resources/authorizations.js +43 -1
- package/lib/cjs/resources/avalara_accounts.d.ts +55 -1
- package/lib/cjs/resources/avalara_accounts.js +45 -1
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +35 -1
- package/lib/cjs/resources/billing_info_validation_rules.js +41 -1
- package/lib/cjs/resources/bing_geocoders.d.ts +35 -1
- package/lib/cjs/resources/bing_geocoders.js +41 -1
- package/lib/cjs/resources/braintree_gateways.d.ts +56 -1
- package/lib/cjs/resources/braintree_gateways.js +41 -1
- package/lib/cjs/resources/braintree_payments.d.ts +47 -1
- package/lib/cjs/resources/braintree_payments.js +41 -1
- package/lib/cjs/resources/bundles.d.ts +76 -1
- package/lib/cjs/resources/bundles.js +49 -1
- package/lib/cjs/resources/captures.d.ts +51 -1
- package/lib/cjs/resources/captures.js +43 -1
- package/lib/cjs/resources/carrier_accounts.d.ts +26 -1
- package/lib/cjs/resources/carrier_accounts.js +32 -1
- package/lib/cjs/resources/checkout_com_gateways.d.ts +45 -1
- package/lib/cjs/resources/checkout_com_gateways.js +41 -1
- package/lib/cjs/resources/checkout_com_payments.d.ts +58 -1
- package/lib/cjs/resources/checkout_com_payments.js +41 -1
- package/lib/cjs/resources/cleanups.d.ts +36 -1
- package/lib/cjs/resources/cleanups.js +34 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +59 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +37 -1
- package/lib/cjs/resources/coupon_recipients.d.ts +44 -1
- package/lib/cjs/resources/coupon_recipients.js +41 -1
- package/lib/cjs/resources/coupons.d.ts +45 -1
- package/lib/cjs/resources/coupons.js +37 -1
- package/lib/cjs/resources/customer_addresses.d.ts +44 -1
- package/lib/cjs/resources/customer_addresses.js +45 -1
- package/lib/cjs/resources/customer_groups.d.ts +36 -1
- package/lib/cjs/resources/customer_groups.js +45 -1
- package/lib/cjs/resources/customer_password_resets.d.ts +36 -1
- package/lib/cjs/resources/customer_password_resets.js +41 -1
- package/lib/cjs/resources/customer_payment_sources.d.ts +70 -1
- package/lib/cjs/resources/customer_payment_sources.js +37 -1
- package/lib/cjs/resources/customer_subscriptions.d.ts +31 -1
- package/lib/cjs/resources/customer_subscriptions.js +41 -1
- package/lib/cjs/resources/customers.d.ts +66 -1
- package/lib/cjs/resources/customers.js +73 -1
- package/lib/cjs/resources/delivery_lead_times.d.ts +51 -1
- package/lib/cjs/resources/delivery_lead_times.js +45 -1
- package/lib/cjs/resources/event_callbacks.d.ts +24 -1
- package/lib/cjs/resources/event_callbacks.js +28 -1
- package/lib/cjs/resources/events.d.ts +24 -1
- package/lib/cjs/resources/events.js +32 -1
- package/lib/cjs/resources/exports.d.ts +40 -1
- package/lib/cjs/resources/exports.js +34 -1
- package/lib/cjs/resources/external_gateways.d.ts +49 -1
- package/lib/cjs/resources/external_gateways.js +41 -1
- package/lib/cjs/resources/external_payments.d.ts +43 -1
- package/lib/cjs/resources/external_payments.js +45 -1
- package/lib/cjs/resources/external_promotions.d.ts +90 -1
- package/lib/cjs/resources/external_promotions.js +57 -1
- package/lib/cjs/resources/external_tax_calculators.d.ts +37 -1
- package/lib/cjs/resources/external_tax_calculators.js +41 -1
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +91 -1
- package/lib/cjs/resources/fixed_amount_promotions.js +57 -1
- package/lib/cjs/resources/fixed_price_promotions.d.ts +102 -1
- package/lib/cjs/resources/fixed_price_promotions.js +65 -1
- package/lib/cjs/resources/free_gift_promotions.d.ts +100 -1
- package/lib/cjs/resources/free_gift_promotions.js +65 -1
- package/lib/cjs/resources/free_shipping_promotions.d.ts +83 -1
- package/lib/cjs/resources/free_shipping_promotions.js +53 -1
- package/lib/cjs/resources/geocoders.d.ts +24 -1
- package/lib/cjs/resources/geocoders.js +32 -1
- package/lib/cjs/resources/gift_card_recipients.d.ts +44 -1
- package/lib/cjs/resources/gift_card_recipients.js +41 -1
- package/lib/cjs/resources/gift_cards.d.ts +85 -1
- package/lib/cjs/resources/gift_cards.js +49 -1
- package/lib/cjs/resources/google_geocoders.d.ts +35 -1
- package/lib/cjs/resources/google_geocoders.js +41 -1
- package/lib/cjs/resources/imports.d.ts +45 -1
- package/lib/cjs/resources/imports.js +34 -1
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +62 -1
- package/lib/cjs/resources/in_stock_subscriptions.js +49 -1
- package/lib/cjs/resources/inventory_models.d.ts +42 -1
- package/lib/cjs/resources/inventory_models.js +45 -1
- package/lib/cjs/resources/inventory_return_locations.d.ts +43 -1
- package/lib/cjs/resources/inventory_return_locations.js +41 -1
- package/lib/cjs/resources/inventory_stock_locations.d.ts +46 -1
- package/lib/cjs/resources/inventory_stock_locations.js +41 -1
- package/lib/cjs/resources/klarna_gateways.d.ts +44 -1
- package/lib/cjs/resources/klarna_gateways.js +41 -1
- package/lib/cjs/resources/klarna_payments.d.ts +45 -1
- package/lib/cjs/resources/klarna_payments.js +41 -1
- package/lib/cjs/resources/line_item_options.d.ts +57 -1
- package/lib/cjs/resources/line_item_options.js +41 -1
- package/lib/cjs/resources/line_items.d.ts +126 -1
- package/lib/cjs/resources/line_items.js +49 -1
- package/lib/cjs/resources/manual_gateways.d.ts +33 -1
- package/lib/cjs/resources/manual_gateways.js +37 -1
- package/lib/cjs/resources/manual_tax_calculators.d.ts +41 -1
- package/lib/cjs/resources/manual_tax_calculators.js +45 -1
- package/lib/cjs/resources/markets.d.ts +88 -1
- package/lib/cjs/resources/markets.js +57 -1
- package/lib/cjs/resources/merchants.d.ts +38 -1
- package/lib/cjs/resources/merchants.js +41 -1
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +56 -1
- package/lib/cjs/resources/order_amount_promotion_rules.js +33 -1
- package/lib/cjs/resources/order_copies.d.ts +48 -1
- package/lib/cjs/resources/order_copies.js +46 -1
- package/lib/cjs/resources/order_subscriptions.d.ts +70 -1
- package/lib/cjs/resources/order_subscriptions.js +57 -1
- package/lib/cjs/resources/order_validation_rules.d.ts +23 -1
- package/lib/cjs/resources/order_validation_rules.js +32 -1
- package/lib/cjs/resources/orders.d.ts +288 -1
- package/lib/cjs/resources/orders.js +113 -1
- package/lib/cjs/resources/organization.d.ts +32 -1
- package/lib/cjs/resources/organization.js +21 -1
- package/lib/cjs/resources/packages.d.ts +56 -1
- package/lib/cjs/resources/packages.js +45 -1
- package/lib/cjs/resources/parcel_line_items.d.ts +51 -1
- package/lib/cjs/resources/parcel_line_items.js +41 -1
- package/lib/cjs/resources/parcels.d.ts +119 -1
- package/lib/cjs/resources/parcels.js +53 -1
- package/lib/cjs/resources/payment_gateways.d.ts +21 -1
- package/lib/cjs/resources/payment_gateways.js +28 -1
- package/lib/cjs/resources/payment_methods.d.ts +61 -1
- package/lib/cjs/resources/payment_methods.js +45 -1
- package/lib/cjs/resources/paypal_gateways.d.ts +37 -1
- package/lib/cjs/resources/paypal_gateways.js +41 -1
- package/lib/cjs/resources/paypal_payments.d.ts +51 -1
- package/lib/cjs/resources/paypal_payments.js +41 -1
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +100 -1
- package/lib/cjs/resources/percentage_discount_promotions.js +65 -1
- package/lib/cjs/resources/price_lists.d.ts +39 -1
- package/lib/cjs/resources/price_lists.js +41 -1
- package/lib/cjs/resources/price_tiers.d.ts +28 -1
- package/lib/cjs/resources/price_tiers.js +32 -1
- package/lib/cjs/resources/price_volume_tiers.d.ts +46 -1
- package/lib/cjs/resources/price_volume_tiers.js +41 -1
- package/lib/cjs/resources/prices.d.ts +68 -1
- package/lib/cjs/resources/prices.js +53 -1
- package/lib/cjs/resources/promotion_rules.d.ts +24 -1
- package/lib/cjs/resources/promotion_rules.js +24 -1
- package/lib/cjs/resources/promotions.d.ts +41 -1
- package/lib/cjs/resources/promotions.js +44 -1
- package/lib/cjs/resources/refunds.d.ts +37 -1
- package/lib/cjs/resources/refunds.js +36 -1
- package/lib/cjs/resources/return_line_items.d.ts +49 -1
- package/lib/cjs/resources/return_line_items.js +41 -1
- package/lib/cjs/resources/returns.d.ts +75 -1
- package/lib/cjs/resources/returns.js +65 -1
- package/lib/cjs/resources/shipments.d.ts +93 -1
- package/lib/cjs/resources/shipments.js +83 -1
- package/lib/cjs/resources/shipping_categories.d.ts +33 -1
- package/lib/cjs/resources/shipping_categories.js +41 -1
- package/lib/cjs/resources/shipping_method_tiers.d.ts +28 -1
- package/lib/cjs/resources/shipping_method_tiers.js +32 -1
- package/lib/cjs/resources/shipping_methods.d.ts +107 -1
- package/lib/cjs/resources/shipping_methods.js +65 -1
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +46 -1
- package/lib/cjs/resources/shipping_weight_tiers.js +41 -1
- package/lib/cjs/resources/shipping_zones.d.ts +48 -1
- package/lib/cjs/resources/shipping_zones.js +37 -1
- package/lib/cjs/resources/sku_list_items.d.ts +47 -1
- package/lib/cjs/resources/sku_list_items.js +41 -1
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +68 -1
- package/lib/cjs/resources/sku_list_promotion_rules.js +41 -1
- package/lib/cjs/resources/sku_lists.d.ts +60 -1
- package/lib/cjs/resources/sku_lists.js +53 -1
- package/lib/cjs/resources/sku_options.d.ts +56 -1
- package/lib/cjs/resources/sku_options.js +41 -1
- package/lib/cjs/resources/skus.d.ts +78 -1
- package/lib/cjs/resources/skus.js +57 -1
- package/lib/cjs/resources/stock_items.d.ts +49 -1
- package/lib/cjs/resources/stock_items.js +45 -1
- package/lib/cjs/resources/stock_line_items.d.ts +29 -1
- package/lib/cjs/resources/stock_line_items.js +36 -1
- package/lib/cjs/resources/stock_locations.d.ts +57 -1
- package/lib/cjs/resources/stock_locations.js +57 -1
- package/lib/cjs/resources/stock_transfers.d.ts +74 -1
- package/lib/cjs/resources/stock_transfers.js +57 -1
- package/lib/cjs/resources/stripe_gateways.d.ts +41 -1
- package/lib/cjs/resources/stripe_gateways.js +41 -1
- package/lib/cjs/resources/stripe_payments.d.ts +46 -1
- package/lib/cjs/resources/stripe_payments.js +41 -1
- package/lib/cjs/resources/tax_calculators.d.ts +24 -1
- package/lib/cjs/resources/tax_calculators.js +32 -1
- package/lib/cjs/resources/tax_categories.d.ts +59 -1
- package/lib/cjs/resources/tax_categories.js +41 -1
- package/lib/cjs/resources/tax_rules.d.ts +69 -1
- package/lib/cjs/resources/tax_rules.js +37 -1
- package/lib/cjs/resources/taxjar_accounts.d.ts +43 -1
- package/lib/cjs/resources/taxjar_accounts.js +45 -1
- package/lib/cjs/resources/transactions.d.ts +31 -1
- package/lib/cjs/resources/transactions.js +28 -1
- package/lib/cjs/resources/voids.d.ts +37 -1
- package/lib/cjs/resources/voids.js +36 -1
- package/lib/cjs/resources/webhooks.d.ts +43 -1
- package/lib/cjs/resources/webhooks.js +37 -1
- package/lib/cjs/resources/wire_transfers.d.ts +32 -1
- package/lib/cjs/resources/wire_transfers.js +37 -1
- package/lib/cjs/static.d.ts +8 -1
- package/lib/cjs/static.js +47 -1
- package/lib/cjs/util.d.ts +6 -1
- package/lib/cjs/util.js +15 -1
- package/lib/esm/api.d.ts +109 -1
- package/lib/esm/api.js +231 -1
- package/lib/esm/client.d.ts +31 -1
- package/lib/esm/client.js +118 -1
- package/lib/esm/commercelayer.d.ts +133 -1
- package/lib/esm/commercelayer.js +195 -1
- package/lib/esm/common.d.ts +4 -1
- package/lib/esm/common.js +10 -1
- package/lib/esm/config.d.ts +11 -1
- package/lib/esm/config.js +11 -1
- package/lib/esm/debug.d.ts +3 -1
- package/lib/esm/debug.js +40 -1
- package/lib/esm/error.d.ts +28 -1
- package/lib/esm/error.js +38 -1
- package/lib/esm/index.d.ts +7 -1
- package/lib/esm/index.js +6 -1
- package/lib/esm/interceptor.d.ts +21 -1
- package/lib/esm/interceptor.js +1 -1
- package/lib/esm/jsonapi.d.ts +5 -1
- package/lib/esm/jsonapi.js +75 -1
- package/lib/esm/model.d.ts +107 -1
- package/lib/esm/model.js +2 -1
- package/lib/esm/query.d.ts +23 -1
- package/lib/esm/query.js +45 -1
- package/lib/esm/resource.d.ts +77 -1
- package/lib/esm/resource.js +139 -1
- package/lib/esm/resources/addresses.d.ts +88 -1
- package/lib/esm/resources/addresses.js +35 -1
- package/lib/esm/resources/adjustments.d.ts +35 -1
- package/lib/esm/resources/adjustments.js +31 -1
- package/lib/esm/resources/adyen_gateways.d.ts +56 -1
- package/lib/esm/resources/adyen_gateways.js +39 -1
- package/lib/esm/resources/adyen_payments.d.ts +45 -1
- package/lib/esm/resources/adyen_payments.js +39 -1
- package/lib/esm/resources/application.d.ts +21 -1
- package/lib/esm/resources/application.js +19 -1
- package/lib/esm/resources/attachments.d.ts +156 -1
- package/lib/esm/resources/attachments.js +31 -1
- package/lib/esm/resources/authorizations.d.ts +60 -1
- package/lib/esm/resources/authorizations.js +41 -1
- package/lib/esm/resources/avalara_accounts.d.ts +55 -1
- package/lib/esm/resources/avalara_accounts.js +43 -1
- package/lib/esm/resources/billing_info_validation_rules.d.ts +35 -1
- package/lib/esm/resources/billing_info_validation_rules.js +39 -1
- package/lib/esm/resources/bing_geocoders.d.ts +35 -1
- package/lib/esm/resources/bing_geocoders.js +39 -1
- package/lib/esm/resources/braintree_gateways.d.ts +56 -1
- package/lib/esm/resources/braintree_gateways.js +39 -1
- package/lib/esm/resources/braintree_payments.d.ts +47 -1
- package/lib/esm/resources/braintree_payments.js +39 -1
- package/lib/esm/resources/bundles.d.ts +76 -1
- package/lib/esm/resources/bundles.js +47 -1
- package/lib/esm/resources/captures.d.ts +51 -1
- package/lib/esm/resources/captures.js +41 -1
- package/lib/esm/resources/carrier_accounts.d.ts +26 -1
- package/lib/esm/resources/carrier_accounts.js +30 -1
- package/lib/esm/resources/checkout_com_gateways.d.ts +45 -1
- package/lib/esm/resources/checkout_com_gateways.js +39 -1
- package/lib/esm/resources/checkout_com_payments.d.ts +58 -1
- package/lib/esm/resources/checkout_com_payments.js +39 -1
- package/lib/esm/resources/cleanups.d.ts +36 -1
- package/lib/esm/resources/cleanups.js +32 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +59 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.js +35 -1
- package/lib/esm/resources/coupon_recipients.d.ts +44 -1
- package/lib/esm/resources/coupon_recipients.js +39 -1
- package/lib/esm/resources/coupons.d.ts +45 -1
- package/lib/esm/resources/coupons.js +35 -1
- package/lib/esm/resources/customer_addresses.d.ts +44 -1
- package/lib/esm/resources/customer_addresses.js +43 -1
- package/lib/esm/resources/customer_groups.d.ts +36 -1
- package/lib/esm/resources/customer_groups.js +43 -1
- package/lib/esm/resources/customer_password_resets.d.ts +36 -1
- package/lib/esm/resources/customer_password_resets.js +39 -1
- package/lib/esm/resources/customer_payment_sources.d.ts +70 -1
- package/lib/esm/resources/customer_payment_sources.js +35 -1
- package/lib/esm/resources/customer_subscriptions.d.ts +31 -1
- package/lib/esm/resources/customer_subscriptions.js +39 -1
- package/lib/esm/resources/customers.d.ts +66 -1
- package/lib/esm/resources/customers.js +71 -1
- package/lib/esm/resources/delivery_lead_times.d.ts +51 -1
- package/lib/esm/resources/delivery_lead_times.js +43 -1
- package/lib/esm/resources/event_callbacks.d.ts +24 -1
- package/lib/esm/resources/event_callbacks.js +26 -1
- package/lib/esm/resources/events.d.ts +24 -1
- package/lib/esm/resources/events.js +30 -1
- package/lib/esm/resources/exports.d.ts +40 -1
- package/lib/esm/resources/exports.js +32 -1
- package/lib/esm/resources/external_gateways.d.ts +49 -1
- package/lib/esm/resources/external_gateways.js +39 -1
- package/lib/esm/resources/external_payments.d.ts +43 -1
- package/lib/esm/resources/external_payments.js +43 -1
- package/lib/esm/resources/external_promotions.d.ts +90 -1
- package/lib/esm/resources/external_promotions.js +55 -1
- package/lib/esm/resources/external_tax_calculators.d.ts +37 -1
- package/lib/esm/resources/external_tax_calculators.js +39 -1
- package/lib/esm/resources/fixed_amount_promotions.d.ts +91 -1
- package/lib/esm/resources/fixed_amount_promotions.js +55 -1
- package/lib/esm/resources/fixed_price_promotions.d.ts +102 -1
- package/lib/esm/resources/fixed_price_promotions.js +63 -1
- package/lib/esm/resources/free_gift_promotions.d.ts +100 -1
- package/lib/esm/resources/free_gift_promotions.js +63 -1
- package/lib/esm/resources/free_shipping_promotions.d.ts +83 -1
- package/lib/esm/resources/free_shipping_promotions.js +51 -1
- package/lib/esm/resources/geocoders.d.ts +24 -1
- package/lib/esm/resources/geocoders.js +30 -1
- package/lib/esm/resources/gift_card_recipients.d.ts +44 -1
- package/lib/esm/resources/gift_card_recipients.js +39 -1
- package/lib/esm/resources/gift_cards.d.ts +85 -1
- package/lib/esm/resources/gift_cards.js +47 -1
- package/lib/esm/resources/google_geocoders.d.ts +35 -1
- package/lib/esm/resources/google_geocoders.js +39 -1
- package/lib/esm/resources/imports.d.ts +45 -1
- package/lib/esm/resources/imports.js +32 -1
- package/lib/esm/resources/in_stock_subscriptions.d.ts +62 -1
- package/lib/esm/resources/in_stock_subscriptions.js +47 -1
- package/lib/esm/resources/inventory_models.d.ts +42 -1
- package/lib/esm/resources/inventory_models.js +43 -1
- package/lib/esm/resources/inventory_return_locations.d.ts +43 -1
- package/lib/esm/resources/inventory_return_locations.js +39 -1
- package/lib/esm/resources/inventory_stock_locations.d.ts +46 -1
- package/lib/esm/resources/inventory_stock_locations.js +39 -1
- package/lib/esm/resources/klarna_gateways.d.ts +44 -1
- package/lib/esm/resources/klarna_gateways.js +39 -1
- package/lib/esm/resources/klarna_payments.d.ts +45 -1
- package/lib/esm/resources/klarna_payments.js +39 -1
- package/lib/esm/resources/line_item_options.d.ts +57 -1
- package/lib/esm/resources/line_item_options.js +39 -1
- package/lib/esm/resources/line_items.d.ts +126 -1
- package/lib/esm/resources/line_items.js +47 -1
- package/lib/esm/resources/manual_gateways.d.ts +33 -1
- package/lib/esm/resources/manual_gateways.js +35 -1
- package/lib/esm/resources/manual_tax_calculators.d.ts +41 -1
- package/lib/esm/resources/manual_tax_calculators.js +43 -1
- package/lib/esm/resources/markets.d.ts +88 -1
- package/lib/esm/resources/markets.js +55 -1
- package/lib/esm/resources/merchants.d.ts +38 -1
- package/lib/esm/resources/merchants.js +39 -1
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +56 -1
- package/lib/esm/resources/order_amount_promotion_rules.js +31 -1
- package/lib/esm/resources/order_copies.d.ts +48 -1
- package/lib/esm/resources/order_copies.js +44 -1
- package/lib/esm/resources/order_subscriptions.d.ts +70 -1
- package/lib/esm/resources/order_subscriptions.js +55 -1
- package/lib/esm/resources/order_validation_rules.d.ts +23 -1
- package/lib/esm/resources/order_validation_rules.js +30 -1
- package/lib/esm/resources/orders.d.ts +288 -1
- package/lib/esm/resources/orders.js +111 -1
- package/lib/esm/resources/organization.d.ts +32 -1
- package/lib/esm/resources/organization.js +19 -1
- package/lib/esm/resources/packages.d.ts +56 -1
- package/lib/esm/resources/packages.js +43 -1
- package/lib/esm/resources/parcel_line_items.d.ts +51 -1
- package/lib/esm/resources/parcel_line_items.js +39 -1
- package/lib/esm/resources/parcels.d.ts +119 -1
- package/lib/esm/resources/parcels.js +51 -1
- package/lib/esm/resources/payment_gateways.d.ts +21 -1
- package/lib/esm/resources/payment_gateways.js +26 -1
- package/lib/esm/resources/payment_methods.d.ts +61 -1
- package/lib/esm/resources/payment_methods.js +43 -1
- package/lib/esm/resources/paypal_gateways.d.ts +37 -1
- package/lib/esm/resources/paypal_gateways.js +39 -1
- package/lib/esm/resources/paypal_payments.d.ts +51 -1
- package/lib/esm/resources/paypal_payments.js +39 -1
- package/lib/esm/resources/percentage_discount_promotions.d.ts +100 -1
- package/lib/esm/resources/percentage_discount_promotions.js +63 -1
- package/lib/esm/resources/price_lists.d.ts +39 -1
- package/lib/esm/resources/price_lists.js +39 -1
- package/lib/esm/resources/price_tiers.d.ts +28 -1
- package/lib/esm/resources/price_tiers.js +30 -1
- package/lib/esm/resources/price_volume_tiers.d.ts +46 -1
- package/lib/esm/resources/price_volume_tiers.js +39 -1
- package/lib/esm/resources/prices.d.ts +68 -1
- package/lib/esm/resources/prices.js +51 -1
- package/lib/esm/resources/promotion_rules.d.ts +24 -1
- package/lib/esm/resources/promotion_rules.js +22 -1
- package/lib/esm/resources/promotions.d.ts +41 -1
- package/lib/esm/resources/promotions.js +42 -1
- package/lib/esm/resources/refunds.d.ts +37 -1
- package/lib/esm/resources/refunds.js +34 -1
- package/lib/esm/resources/return_line_items.d.ts +49 -1
- package/lib/esm/resources/return_line_items.js +39 -1
- package/lib/esm/resources/returns.d.ts +75 -1
- package/lib/esm/resources/returns.js +63 -1
- package/lib/esm/resources/shipments.d.ts +93 -1
- package/lib/esm/resources/shipments.js +81 -1
- package/lib/esm/resources/shipping_categories.d.ts +33 -1
- package/lib/esm/resources/shipping_categories.js +39 -1
- package/lib/esm/resources/shipping_method_tiers.d.ts +28 -1
- package/lib/esm/resources/shipping_method_tiers.js +30 -1
- package/lib/esm/resources/shipping_methods.d.ts +107 -1
- package/lib/esm/resources/shipping_methods.js +63 -1
- package/lib/esm/resources/shipping_weight_tiers.d.ts +46 -1
- package/lib/esm/resources/shipping_weight_tiers.js +39 -1
- package/lib/esm/resources/shipping_zones.d.ts +48 -1
- package/lib/esm/resources/shipping_zones.js +35 -1
- package/lib/esm/resources/sku_list_items.d.ts +47 -1
- package/lib/esm/resources/sku_list_items.js +39 -1
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +68 -1
- package/lib/esm/resources/sku_list_promotion_rules.js +39 -1
- package/lib/esm/resources/sku_lists.d.ts +60 -1
- package/lib/esm/resources/sku_lists.js +51 -1
- package/lib/esm/resources/sku_options.d.ts +56 -1
- package/lib/esm/resources/sku_options.js +39 -1
- package/lib/esm/resources/skus.d.ts +78 -1
- package/lib/esm/resources/skus.js +55 -1
- package/lib/esm/resources/stock_items.d.ts +49 -1
- package/lib/esm/resources/stock_items.js +43 -1
- package/lib/esm/resources/stock_line_items.d.ts +29 -1
- package/lib/esm/resources/stock_line_items.js +34 -1
- package/lib/esm/resources/stock_locations.d.ts +57 -1
- package/lib/esm/resources/stock_locations.js +55 -1
- package/lib/esm/resources/stock_transfers.d.ts +74 -1
- package/lib/esm/resources/stock_transfers.js +55 -1
- package/lib/esm/resources/stripe_gateways.d.ts +41 -1
- package/lib/esm/resources/stripe_gateways.js +39 -1
- package/lib/esm/resources/stripe_payments.d.ts +46 -1
- package/lib/esm/resources/stripe_payments.js +39 -1
- package/lib/esm/resources/tax_calculators.d.ts +24 -1
- package/lib/esm/resources/tax_calculators.js +30 -1
- package/lib/esm/resources/tax_categories.d.ts +59 -1
- package/lib/esm/resources/tax_categories.js +39 -1
- package/lib/esm/resources/tax_rules.d.ts +69 -1
- package/lib/esm/resources/tax_rules.js +35 -1
- package/lib/esm/resources/taxjar_accounts.d.ts +43 -1
- package/lib/esm/resources/taxjar_accounts.js +43 -1
- package/lib/esm/resources/transactions.d.ts +31 -1
- package/lib/esm/resources/transactions.js +26 -1
- package/lib/esm/resources/voids.d.ts +37 -1
- package/lib/esm/resources/voids.js +34 -1
- package/lib/esm/resources/webhooks.d.ts +43 -1
- package/lib/esm/resources/webhooks.js +35 -1
- package/lib/esm/resources/wire_transfers.d.ts +32 -1
- package/lib/esm/resources/wire_transfers.js +35 -1
- package/lib/esm/static.d.ts +8 -1
- package/lib/esm/static.js +18 -1
- package/lib/esm/util.d.ts +6 -1
- package/lib/esm/util.js +11 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -15
@@ -1 +1,44 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { PaymentMethod } from './payment_methods';
|
4
|
+
import type { KlarnaPayment } from './klarna_payments';
|
5
|
+
type KlarnaGatewayRel = ResourceRel & {
|
6
|
+
type: typeof KlarnaGateways.TYPE;
|
7
|
+
};
|
8
|
+
type KlarnaPaymentRel = ResourceRel & {
|
9
|
+
type: 'klarna_payments';
|
10
|
+
};
|
11
|
+
interface KlarnaGateway extends Resource {
|
12
|
+
name?: string;
|
13
|
+
payment_methods?: PaymentMethod[];
|
14
|
+
klarna_payments?: KlarnaPayment[];
|
15
|
+
}
|
16
|
+
interface KlarnaGatewayCreate extends ResourceCreate {
|
17
|
+
name: string;
|
18
|
+
country_code: string;
|
19
|
+
api_key: string;
|
20
|
+
api_secret: string;
|
21
|
+
klarna_payments?: KlarnaPaymentRel[];
|
22
|
+
}
|
23
|
+
interface KlarnaGatewayUpdate extends ResourceUpdate {
|
24
|
+
name?: string;
|
25
|
+
country_code?: string;
|
26
|
+
api_key?: string;
|
27
|
+
api_secret?: string;
|
28
|
+
klarna_payments?: KlarnaPaymentRel[];
|
29
|
+
}
|
30
|
+
declare class KlarnaGateways extends ApiResource {
|
31
|
+
static readonly TYPE: 'klarna_gateways';
|
32
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<KlarnaGateway>>;
|
33
|
+
create(resource: KlarnaGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaGateway>;
|
34
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaGateway>;
|
35
|
+
update(resource: KlarnaGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaGateway>;
|
36
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
37
|
+
payment_methods(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
38
|
+
klarna_payments(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<KlarnaPayment>>;
|
39
|
+
isKlarnaGateway(resource: any): resource is KlarnaGateway;
|
40
|
+
relationship(id: string | ResourceId | null): KlarnaGatewayRel;
|
41
|
+
type(): string;
|
42
|
+
}
|
43
|
+
export default KlarnaGateways;
|
44
|
+
export { KlarnaGateway, KlarnaGatewayCreate, KlarnaGatewayUpdate };
|
@@ -1 +1,39 @@
|
|
1
|
-
import{ApiResource
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
class KlarnaGateways extends ApiResource {
|
3
|
+
// static readonly PATH = 'klarna_gateways'
|
4
|
+
async list(params, options) {
|
5
|
+
return this.resources.list({ type: KlarnaGateways.TYPE }, params, options);
|
6
|
+
}
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: KlarnaGateways.TYPE }), params, options);
|
9
|
+
}
|
10
|
+
async retrieve(id, params, options) {
|
11
|
+
return this.resources.retrieve({ type: KlarnaGateways.TYPE, id }, params, options);
|
12
|
+
}
|
13
|
+
async update(resource, params, options) {
|
14
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: KlarnaGateways.TYPE }), params, options);
|
15
|
+
}
|
16
|
+
async delete(id, options) {
|
17
|
+
await this.resources.delete({ type: KlarnaGateways.TYPE, id }, options);
|
18
|
+
}
|
19
|
+
async payment_methods(klarnaGatewayId, params, options) {
|
20
|
+
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
21
|
+
return this.resources.fetch({ type: 'payment_methods' }, `klarna_gateways/${_klarnaGatewayId}/payment_methods`, params, options);
|
22
|
+
}
|
23
|
+
async klarna_payments(klarnaGatewayId, params, options) {
|
24
|
+
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
25
|
+
return this.resources.fetch({ type: 'klarna_payments' }, `klarna_gateways/${_klarnaGatewayId}/klarna_payments`, params, options);
|
26
|
+
}
|
27
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
|
+
isKlarnaGateway(resource) {
|
29
|
+
return resource.type && (resource.type === KlarnaGateways.TYPE);
|
30
|
+
}
|
31
|
+
relationship(id) {
|
32
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: KlarnaGateways.TYPE } : { id: id.id, type: KlarnaGateways.TYPE };
|
33
|
+
}
|
34
|
+
type() {
|
35
|
+
return KlarnaGateways.TYPE;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
KlarnaGateways.TYPE = 'klarna_gateways';
|
39
|
+
export default KlarnaGateways;
|
@@ -1 +1,45 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { Order } from './orders';
|
4
|
+
import type { PaymentGateway } from './payment_gateways';
|
5
|
+
type KlarnaPaymentRel = ResourceRel & {
|
6
|
+
type: typeof KlarnaPayments.TYPE;
|
7
|
+
};
|
8
|
+
type OrderRel = ResourceRel & {
|
9
|
+
type: 'orders';
|
10
|
+
};
|
11
|
+
interface KlarnaPayment extends Resource {
|
12
|
+
session_id?: string;
|
13
|
+
client_token?: string;
|
14
|
+
payment_methods?: object[];
|
15
|
+
auth_token?: string;
|
16
|
+
mismatched_amounts?: boolean;
|
17
|
+
intent_amount_cents?: number;
|
18
|
+
intent_amount_float?: number;
|
19
|
+
formatted_intent_amount?: string;
|
20
|
+
order?: Order;
|
21
|
+
payment_gateway?: PaymentGateway;
|
22
|
+
}
|
23
|
+
interface KlarnaPaymentCreate extends ResourceCreate {
|
24
|
+
order: OrderRel;
|
25
|
+
}
|
26
|
+
interface KlarnaPaymentUpdate extends ResourceUpdate {
|
27
|
+
auth_token?: string;
|
28
|
+
_update?: boolean;
|
29
|
+
order?: OrderRel;
|
30
|
+
}
|
31
|
+
declare class KlarnaPayments extends ApiResource {
|
32
|
+
static readonly TYPE: 'klarna_payments';
|
33
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<KlarnaPayment>>;
|
34
|
+
create(resource: KlarnaPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaPayment>;
|
35
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaPayment>;
|
36
|
+
update(resource: KlarnaPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaPayment>;
|
37
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
38
|
+
order(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
39
|
+
payment_gateway(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
40
|
+
isKlarnaPayment(resource: any): resource is KlarnaPayment;
|
41
|
+
relationship(id: string | ResourceId | null): KlarnaPaymentRel;
|
42
|
+
type(): string;
|
43
|
+
}
|
44
|
+
export default KlarnaPayments;
|
45
|
+
export { KlarnaPayment, KlarnaPaymentCreate, KlarnaPaymentUpdate };
|
@@ -1 +1,39 @@
|
|
1
|
-
import{ApiResource
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
class KlarnaPayments extends ApiResource {
|
3
|
+
// static readonly PATH = 'klarna_payments'
|
4
|
+
async list(params, options) {
|
5
|
+
return this.resources.list({ type: KlarnaPayments.TYPE }, params, options);
|
6
|
+
}
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: KlarnaPayments.TYPE }), params, options);
|
9
|
+
}
|
10
|
+
async retrieve(id, params, options) {
|
11
|
+
return this.resources.retrieve({ type: KlarnaPayments.TYPE, id }, params, options);
|
12
|
+
}
|
13
|
+
async update(resource, params, options) {
|
14
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: KlarnaPayments.TYPE }), params, options);
|
15
|
+
}
|
16
|
+
async delete(id, options) {
|
17
|
+
await this.resources.delete({ type: KlarnaPayments.TYPE, id }, options);
|
18
|
+
}
|
19
|
+
async order(klarnaPaymentId, params, options) {
|
20
|
+
const _klarnaPaymentId = klarnaPaymentId.id || klarnaPaymentId;
|
21
|
+
return this.resources.fetch({ type: 'orders' }, `klarna_payments/${_klarnaPaymentId}/order`, params, options);
|
22
|
+
}
|
23
|
+
async payment_gateway(klarnaPaymentId, params, options) {
|
24
|
+
const _klarnaPaymentId = klarnaPaymentId.id || klarnaPaymentId;
|
25
|
+
return this.resources.fetch({ type: 'payment_gateways' }, `klarna_payments/${_klarnaPaymentId}/payment_gateway`, params, options);
|
26
|
+
}
|
27
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
|
+
isKlarnaPayment(resource) {
|
29
|
+
return resource.type && (resource.type === KlarnaPayments.TYPE);
|
30
|
+
}
|
31
|
+
relationship(id) {
|
32
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: KlarnaPayments.TYPE } : { id: id.id, type: KlarnaPayments.TYPE };
|
33
|
+
}
|
34
|
+
type() {
|
35
|
+
return KlarnaPayments.TYPE;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
KlarnaPayments.TYPE = 'klarna_payments';
|
39
|
+
export default KlarnaPayments;
|
@@ -1 +1,57 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { LineItem } from './line_items';
|
4
|
+
import type { SkuOption } from './sku_options';
|
5
|
+
type LineItemOptionRel = ResourceRel & {
|
6
|
+
type: typeof LineItemOptions.TYPE;
|
7
|
+
};
|
8
|
+
type LineItemRel = ResourceRel & {
|
9
|
+
type: 'line_items';
|
10
|
+
};
|
11
|
+
type SkuOptionRel = ResourceRel & {
|
12
|
+
type: 'sku_options';
|
13
|
+
};
|
14
|
+
interface LineItemOption extends Resource {
|
15
|
+
name?: string;
|
16
|
+
quantity?: number;
|
17
|
+
currency_code?: string;
|
18
|
+
unit_amount_cents?: number;
|
19
|
+
unit_amount_float?: number;
|
20
|
+
formatted_unit_amount?: string;
|
21
|
+
total_amount_cents?: number;
|
22
|
+
total_amount_float?: number;
|
23
|
+
formatted_total_amount?: string;
|
24
|
+
delay_hours?: number;
|
25
|
+
delay_days?: number;
|
26
|
+
options?: object;
|
27
|
+
line_item?: LineItem;
|
28
|
+
sku_option?: SkuOption;
|
29
|
+
}
|
30
|
+
interface LineItemOptionCreate extends ResourceCreate {
|
31
|
+
name?: string;
|
32
|
+
quantity: number;
|
33
|
+
options: object;
|
34
|
+
line_item: LineItemRel;
|
35
|
+
sku_option: SkuOptionRel;
|
36
|
+
}
|
37
|
+
interface LineItemOptionUpdate extends ResourceUpdate {
|
38
|
+
name?: string;
|
39
|
+
quantity?: number;
|
40
|
+
options?: object;
|
41
|
+
sku_option?: SkuOptionRel;
|
42
|
+
}
|
43
|
+
declare class LineItemOptions extends ApiResource {
|
44
|
+
static readonly TYPE: 'line_item_options';
|
45
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>>;
|
46
|
+
create(resource: LineItemOptionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItemOption>;
|
47
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItemOption>;
|
48
|
+
update(resource: LineItemOptionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItemOption>;
|
49
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
50
|
+
line_item(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
51
|
+
sku_option(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuOption>;
|
52
|
+
isLineItemOption(resource: any): resource is LineItemOption;
|
53
|
+
relationship(id: string | ResourceId | null): LineItemOptionRel;
|
54
|
+
type(): string;
|
55
|
+
}
|
56
|
+
export default LineItemOptions;
|
57
|
+
export { LineItemOption, LineItemOptionCreate, LineItemOptionUpdate };
|
@@ -1 +1,39 @@
|
|
1
|
-
import{ApiResource
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
class LineItemOptions extends ApiResource {
|
3
|
+
// static readonly PATH = 'line_item_options'
|
4
|
+
async list(params, options) {
|
5
|
+
return this.resources.list({ type: LineItemOptions.TYPE }, params, options);
|
6
|
+
}
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: LineItemOptions.TYPE }), params, options);
|
9
|
+
}
|
10
|
+
async retrieve(id, params, options) {
|
11
|
+
return this.resources.retrieve({ type: LineItemOptions.TYPE, id }, params, options);
|
12
|
+
}
|
13
|
+
async update(resource, params, options) {
|
14
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: LineItemOptions.TYPE }), params, options);
|
15
|
+
}
|
16
|
+
async delete(id, options) {
|
17
|
+
await this.resources.delete({ type: LineItemOptions.TYPE, id }, options);
|
18
|
+
}
|
19
|
+
async line_item(lineItemOptionId, params, options) {
|
20
|
+
const _lineItemOptionId = lineItemOptionId.id || lineItemOptionId;
|
21
|
+
return this.resources.fetch({ type: 'line_items' }, `line_item_options/${_lineItemOptionId}/line_item`, params, options);
|
22
|
+
}
|
23
|
+
async sku_option(lineItemOptionId, params, options) {
|
24
|
+
const _lineItemOptionId = lineItemOptionId.id || lineItemOptionId;
|
25
|
+
return this.resources.fetch({ type: 'sku_options' }, `line_item_options/${_lineItemOptionId}/sku_option`, params, options);
|
26
|
+
}
|
27
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
28
|
+
isLineItemOption(resource) {
|
29
|
+
return resource.type && (resource.type === LineItemOptions.TYPE);
|
30
|
+
}
|
31
|
+
relationship(id) {
|
32
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: LineItemOptions.TYPE } : { id: id.id, type: LineItemOptions.TYPE };
|
33
|
+
}
|
34
|
+
type() {
|
35
|
+
return LineItemOptions.TYPE;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
LineItemOptions.TYPE = 'line_item_options';
|
39
|
+
export default LineItemOptions;
|
@@ -1 +1,126 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { Order } from './orders';
|
4
|
+
import type { Adjustment } from './adjustments';
|
5
|
+
import type { Bundle } from './bundles';
|
6
|
+
import type { ExternalPromotion } from './external_promotions';
|
7
|
+
import type { FixedAmountPromotion } from './fixed_amount_promotions';
|
8
|
+
import type { FreeShippingPromotion } from './free_shipping_promotions';
|
9
|
+
import type { GiftCard } from './gift_cards';
|
10
|
+
import type { PaymentMethod } from './payment_methods';
|
11
|
+
import type { PercentageDiscountPromotion } from './percentage_discount_promotions';
|
12
|
+
import type { Shipment } from './shipments';
|
13
|
+
import type { Sku } from './skus';
|
14
|
+
import type { LineItemOption } from './line_item_options';
|
15
|
+
import type { StockLineItem } from './stock_line_items';
|
16
|
+
import type { StockTransfer } from './stock_transfers';
|
17
|
+
type LineItemRel = ResourceRel & {
|
18
|
+
type: typeof LineItems.TYPE;
|
19
|
+
};
|
20
|
+
type OrderRel = ResourceRel & {
|
21
|
+
type: 'orders';
|
22
|
+
};
|
23
|
+
type AdjustmentRel = ResourceRel & {
|
24
|
+
type: 'adjustments';
|
25
|
+
};
|
26
|
+
type BundleRel = ResourceRel & {
|
27
|
+
type: 'bundles';
|
28
|
+
};
|
29
|
+
type ExternalPromotionRel = ResourceRel & {
|
30
|
+
type: 'external_promotions';
|
31
|
+
};
|
32
|
+
type FixedAmountPromotionRel = ResourceRel & {
|
33
|
+
type: 'fixed_amount_promotions';
|
34
|
+
};
|
35
|
+
type FreeShippingPromotionRel = ResourceRel & {
|
36
|
+
type: 'free_shipping_promotions';
|
37
|
+
};
|
38
|
+
type GiftCardRel = ResourceRel & {
|
39
|
+
type: 'gift_cards';
|
40
|
+
};
|
41
|
+
type PaymentMethodRel = ResourceRel & {
|
42
|
+
type: 'payment_methods';
|
43
|
+
};
|
44
|
+
type PercentageDiscountPromotionRel = ResourceRel & {
|
45
|
+
type: 'percentage_discount_promotions';
|
46
|
+
};
|
47
|
+
type ShipmentRel = ResourceRel & {
|
48
|
+
type: 'shipments';
|
49
|
+
};
|
50
|
+
type SkuRel = ResourceRel & {
|
51
|
+
type: 'skus';
|
52
|
+
};
|
53
|
+
interface LineItem extends Resource {
|
54
|
+
sku_code?: string;
|
55
|
+
bundle_code?: string;
|
56
|
+
quantity?: number;
|
57
|
+
currency_code?: string;
|
58
|
+
unit_amount_cents?: number;
|
59
|
+
unit_amount_float?: number;
|
60
|
+
formatted_unit_amount?: string;
|
61
|
+
options_amount_cents?: number;
|
62
|
+
options_amount_float?: number;
|
63
|
+
formatted_options_amount?: string;
|
64
|
+
discount_cents?: number;
|
65
|
+
discount_float?: number;
|
66
|
+
formatted_discount?: string;
|
67
|
+
total_amount_cents?: number;
|
68
|
+
total_amount_float?: number;
|
69
|
+
formatted_total_amount?: string;
|
70
|
+
tax_amount_cents?: number;
|
71
|
+
tax_amount_float?: number;
|
72
|
+
formatted_tax_amount?: string;
|
73
|
+
name?: string;
|
74
|
+
image_url?: string;
|
75
|
+
discount_breakdown?: object;
|
76
|
+
tax_rate?: number;
|
77
|
+
tax_breakdown?: object;
|
78
|
+
item_type?: string;
|
79
|
+
order?: Order;
|
80
|
+
item?: Adjustment | Bundle | ExternalPromotion | FixedAmountPromotion | FreeShippingPromotion | GiftCard | PaymentMethod | PercentageDiscountPromotion | Shipment | Sku;
|
81
|
+
line_item_options?: LineItemOption[];
|
82
|
+
/**
|
83
|
+
* @deprecated This field should not be used as it may be removed in the future without notice
|
84
|
+
*/
|
85
|
+
shipment_line_items?: object[];
|
86
|
+
stock_line_items?: StockLineItem[];
|
87
|
+
stock_transfers?: StockTransfer[];
|
88
|
+
}
|
89
|
+
interface LineItemCreate extends ResourceCreate {
|
90
|
+
sku_code?: string;
|
91
|
+
bundle_code?: string;
|
92
|
+
quantity: number;
|
93
|
+
_external_price?: boolean;
|
94
|
+
_update_quantity?: boolean;
|
95
|
+
unit_amount_cents?: number;
|
96
|
+
name?: string;
|
97
|
+
image_url?: string;
|
98
|
+
item_type?: string;
|
99
|
+
order: OrderRel;
|
100
|
+
item?: AdjustmentRel | BundleRel | ExternalPromotionRel | FixedAmountPromotionRel | FreeShippingPromotionRel | GiftCardRel | PaymentMethodRel | PercentageDiscountPromotionRel | ShipmentRel | SkuRel;
|
101
|
+
}
|
102
|
+
interface LineItemUpdate extends ResourceUpdate {
|
103
|
+
sku_code?: string;
|
104
|
+
bundle_code?: string;
|
105
|
+
quantity?: number;
|
106
|
+
_external_price?: boolean;
|
107
|
+
name?: string;
|
108
|
+
image_url?: string;
|
109
|
+
}
|
110
|
+
declare class LineItems extends ApiResource {
|
111
|
+
static readonly TYPE: 'line_items';
|
112
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItem>>;
|
113
|
+
create(resource: LineItemCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
114
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
115
|
+
update(resource: LineItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
116
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
117
|
+
order(lineItemId: string | LineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
118
|
+
line_item_options(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>>;
|
119
|
+
stock_line_items(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
|
120
|
+
stock_transfers(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
|
121
|
+
isLineItem(resource: any): resource is LineItem;
|
122
|
+
relationship(id: string | ResourceId | null): LineItemRel;
|
123
|
+
type(): string;
|
124
|
+
}
|
125
|
+
export default LineItems;
|
126
|
+
export { LineItem, LineItemCreate, LineItemUpdate };
|
@@ -1 +1,47 @@
|
|
1
|
-
import{ApiResource
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
class LineItems extends ApiResource {
|
3
|
+
// static readonly PATH = 'line_items'
|
4
|
+
async list(params, options) {
|
5
|
+
return this.resources.list({ type: LineItems.TYPE }, params, options);
|
6
|
+
}
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: LineItems.TYPE }), params, options);
|
9
|
+
}
|
10
|
+
async retrieve(id, params, options) {
|
11
|
+
return this.resources.retrieve({ type: LineItems.TYPE, id }, params, options);
|
12
|
+
}
|
13
|
+
async update(resource, params, options) {
|
14
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: LineItems.TYPE }), params, options);
|
15
|
+
}
|
16
|
+
async delete(id, options) {
|
17
|
+
await this.resources.delete({ type: LineItems.TYPE, id }, options);
|
18
|
+
}
|
19
|
+
async order(lineItemId, params, options) {
|
20
|
+
const _lineItemId = lineItemId.id || lineItemId;
|
21
|
+
return this.resources.fetch({ type: 'orders' }, `line_items/${_lineItemId}/order`, params, options);
|
22
|
+
}
|
23
|
+
async line_item_options(lineItemId, params, options) {
|
24
|
+
const _lineItemId = lineItemId.id || lineItemId;
|
25
|
+
return this.resources.fetch({ type: 'line_item_options' }, `line_items/${_lineItemId}/line_item_options`, params, options);
|
26
|
+
}
|
27
|
+
async stock_line_items(lineItemId, params, options) {
|
28
|
+
const _lineItemId = lineItemId.id || lineItemId;
|
29
|
+
return this.resources.fetch({ type: 'stock_line_items' }, `line_items/${_lineItemId}/stock_line_items`, params, options);
|
30
|
+
}
|
31
|
+
async stock_transfers(lineItemId, params, options) {
|
32
|
+
const _lineItemId = lineItemId.id || lineItemId;
|
33
|
+
return this.resources.fetch({ type: 'stock_transfers' }, `line_items/${_lineItemId}/stock_transfers`, params, options);
|
34
|
+
}
|
35
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
36
|
+
isLineItem(resource) {
|
37
|
+
return resource.type && (resource.type === LineItems.TYPE);
|
38
|
+
}
|
39
|
+
relationship(id) {
|
40
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: LineItems.TYPE } : { id: id.id, type: LineItems.TYPE };
|
41
|
+
}
|
42
|
+
type() {
|
43
|
+
return LineItems.TYPE;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
LineItems.TYPE = 'line_items';
|
47
|
+
export default LineItems;
|
@@ -1 +1,33 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { PaymentMethod } from './payment_methods';
|
4
|
+
type ManualGatewayRel = ResourceRel & {
|
5
|
+
type: typeof ManualGateways.TYPE;
|
6
|
+
};
|
7
|
+
interface ManualGateway extends Resource {
|
8
|
+
name?: string;
|
9
|
+
require_capture?: boolean;
|
10
|
+
payment_methods?: PaymentMethod[];
|
11
|
+
}
|
12
|
+
interface ManualGatewayCreate extends ResourceCreate {
|
13
|
+
name: string;
|
14
|
+
require_capture?: boolean;
|
15
|
+
}
|
16
|
+
interface ManualGatewayUpdate extends ResourceUpdate {
|
17
|
+
name?: string;
|
18
|
+
require_capture?: boolean;
|
19
|
+
}
|
20
|
+
declare class ManualGateways extends ApiResource {
|
21
|
+
static readonly TYPE: 'manual_gateways';
|
22
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ManualGateway>>;
|
23
|
+
create(resource: ManualGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualGateway>;
|
24
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualGateway>;
|
25
|
+
update(resource: ManualGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualGateway>;
|
26
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
27
|
+
payment_methods(manualGatewayId: string | ManualGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
28
|
+
isManualGateway(resource: any): resource is ManualGateway;
|
29
|
+
relationship(id: string | ResourceId | null): ManualGatewayRel;
|
30
|
+
type(): string;
|
31
|
+
}
|
32
|
+
export default ManualGateways;
|
33
|
+
export { ManualGateway, ManualGatewayCreate, ManualGatewayUpdate };
|
@@ -1 +1,35 @@
|
|
1
|
-
import{ApiResource
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
class ManualGateways extends ApiResource {
|
3
|
+
// static readonly PATH = 'manual_gateways'
|
4
|
+
async list(params, options) {
|
5
|
+
return this.resources.list({ type: ManualGateways.TYPE }, params, options);
|
6
|
+
}
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ManualGateways.TYPE }), params, options);
|
9
|
+
}
|
10
|
+
async retrieve(id, params, options) {
|
11
|
+
return this.resources.retrieve({ type: ManualGateways.TYPE, id }, params, options);
|
12
|
+
}
|
13
|
+
async update(resource, params, options) {
|
14
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ManualGateways.TYPE }), params, options);
|
15
|
+
}
|
16
|
+
async delete(id, options) {
|
17
|
+
await this.resources.delete({ type: ManualGateways.TYPE, id }, options);
|
18
|
+
}
|
19
|
+
async payment_methods(manualGatewayId, params, options) {
|
20
|
+
const _manualGatewayId = manualGatewayId.id || manualGatewayId;
|
21
|
+
return this.resources.fetch({ type: 'payment_methods' }, `manual_gateways/${_manualGatewayId}/payment_methods`, params, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isManualGateway(resource) {
|
25
|
+
return resource.type && (resource.type === ManualGateways.TYPE);
|
26
|
+
}
|
27
|
+
relationship(id) {
|
28
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: ManualGateways.TYPE } : { id: id.id, type: ManualGateways.TYPE };
|
29
|
+
}
|
30
|
+
type() {
|
31
|
+
return ManualGateways.TYPE;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
ManualGateways.TYPE = 'manual_gateways';
|
35
|
+
export default ManualGateways;
|
@@ -1 +1,41 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { Market } from './markets';
|
4
|
+
import type { Attachment } from './attachments';
|
5
|
+
import type { TaxRule } from './tax_rules';
|
6
|
+
type ManualTaxCalculatorRel = ResourceRel & {
|
7
|
+
type: typeof ManualTaxCalculators.TYPE;
|
8
|
+
};
|
9
|
+
type TaxRuleRel = ResourceRel & {
|
10
|
+
type: 'tax_rules';
|
11
|
+
};
|
12
|
+
interface ManualTaxCalculator extends Resource {
|
13
|
+
name?: string;
|
14
|
+
markets?: Market[];
|
15
|
+
attachments?: Attachment[];
|
16
|
+
tax_rules?: TaxRule[];
|
17
|
+
}
|
18
|
+
interface ManualTaxCalculatorCreate extends ResourceCreate {
|
19
|
+
name: string;
|
20
|
+
tax_rules?: TaxRuleRel[];
|
21
|
+
}
|
22
|
+
interface ManualTaxCalculatorUpdate extends ResourceUpdate {
|
23
|
+
name?: string;
|
24
|
+
tax_rules?: TaxRuleRel[];
|
25
|
+
}
|
26
|
+
declare class ManualTaxCalculators extends ApiResource {
|
27
|
+
static readonly TYPE: 'manual_tax_calculators';
|
28
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ManualTaxCalculator>>;
|
29
|
+
create(resource: ManualTaxCalculatorCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
30
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
31
|
+
update(resource: ManualTaxCalculatorUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
32
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
33
|
+
markets(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
34
|
+
attachments(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
35
|
+
tax_rules(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxRule>>;
|
36
|
+
isManualTaxCalculator(resource: any): resource is ManualTaxCalculator;
|
37
|
+
relationship(id: string | ResourceId | null): ManualTaxCalculatorRel;
|
38
|
+
type(): string;
|
39
|
+
}
|
40
|
+
export default ManualTaxCalculators;
|
41
|
+
export { ManualTaxCalculator, ManualTaxCalculatorCreate, ManualTaxCalculatorUpdate };
|