@commercelayer/sdk 4.47.0 → 4.49.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 +1 -126
- package/lib/cjs/api.js +1 -394
- package/lib/cjs/client.d.ts +1 -31
- package/lib/cjs/client.js +1 -123
- package/lib/cjs/commercelayer.d.ts +1 -152
- package/lib/cjs/commercelayer.js +1 -243
- package/lib/cjs/common.d.ts +1 -4
- package/lib/cjs/common.js +1 -14
- package/lib/cjs/config.d.ts +1 -11
- package/lib/cjs/config.js +1 -13
- package/lib/cjs/debug.d.ts +1 -3
- package/lib/cjs/debug.js +1 -42
- package/lib/cjs/error.d.ts +1 -28
- package/lib/cjs/error.js +1 -43
- package/lib/cjs/index.d.ts +1 -7
- package/lib/cjs/index.js +1 -29
- package/lib/cjs/interceptor.d.ts +1 -21
- package/lib/cjs/interceptor.js +1 -2
- package/lib/cjs/jsonapi.d.ts +1 -5
- package/lib/cjs/jsonapi.js +1 -82
- package/lib/cjs/model.d.ts +1 -124
- package/lib/cjs/model.js +1 -3
- package/lib/cjs/query.d.ts +1 -23
- package/lib/cjs/query.js +1 -51
- package/lib/cjs/resource.d.ts +1 -75
- package/lib/cjs/resource.js +1 -145
- package/lib/cjs/resources/addresses.d.ts +1 -102
- package/lib/cjs/resources/addresses.js +1 -49
- package/lib/cjs/resources/adjustments.d.ts +1 -41
- package/lib/cjs/resources/adjustments.js +1 -37
- package/lib/cjs/resources/adyen_gateways.d.ts +1 -59
- package/lib/cjs/resources/adyen_gateways.js +1 -45
- package/lib/cjs/resources/adyen_payments.d.ts +1 -49
- package/lib/cjs/resources/adyen_payments.js +1 -45
- package/lib/cjs/resources/application.d.ts +1 -21
- package/lib/cjs/resources/application.js +1 -21
- package/lib/cjs/resources/attachments.d.ts +1 -156
- package/lib/cjs/resources/attachments.js +1 -33
- package/lib/cjs/resources/authorizations.d.ts +1 -66
- package/lib/cjs/resources/authorizations.js +1 -51
- package/lib/cjs/resources/avalara_accounts.d.ts +1 -58
- package/lib/cjs/resources/avalara_accounts.js +1 -49
- package/lib/cjs/resources/axerve_gateways.d.ts +1 -47
- package/lib/cjs/resources/axerve_gateways.js +1 -45
- package/lib/cjs/resources/axerve_payments.d.ts +1 -55
- package/lib/cjs/resources/axerve_payments.js +1 -45
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -38
- package/lib/cjs/resources/billing_info_validation_rules.js +1 -45
- package/lib/cjs/resources/bing_geocoders.d.ts +1 -35
- package/lib/cjs/resources/bing_geocoders.js +1 -41
- package/lib/cjs/resources/braintree_gateways.d.ts +1 -59
- package/lib/cjs/resources/braintree_gateways.js +1 -45
- package/lib/cjs/resources/braintree_payments.d.ts +1 -51
- package/lib/cjs/resources/braintree_payments.js +1 -45
- package/lib/cjs/resources/bundles.d.ts +1 -90
- package/lib/cjs/resources/bundles.js +1 -61
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +1 -134
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +1 -81
- package/lib/cjs/resources/captures.d.ts +1 -57
- package/lib/cjs/resources/captures.js +1 -51
- package/lib/cjs/resources/carrier_accounts.d.ts +1 -29
- package/lib/cjs/resources/carrier_accounts.js +1 -36
- package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -48
- package/lib/cjs/resources/checkout_com_gateways.js +1 -45
- package/lib/cjs/resources/checkout_com_payments.d.ts +1 -62
- package/lib/cjs/resources/checkout_com_payments.js +1 -45
- package/lib/cjs/resources/cleanups.d.ts +1 -39
- package/lib/cjs/resources/cleanups.js +1 -38
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -66
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -41
- package/lib/cjs/resources/coupon_recipients.d.ts +1 -47
- package/lib/cjs/resources/coupon_recipients.js +1 -45
- package/lib/cjs/resources/coupons.d.ts +1 -70
- package/lib/cjs/resources/coupons.js +1 -53
- package/lib/cjs/resources/custom_promotion_rules.d.ts +1 -61
- package/lib/cjs/resources/custom_promotion_rules.js +1 -37
- package/lib/cjs/resources/customer_addresses.d.ts +1 -49
- package/lib/cjs/resources/customer_addresses.js +1 -49
- package/lib/cjs/resources/customer_groups.d.ts +1 -39
- package/lib/cjs/resources/customer_groups.js +1 -49
- package/lib/cjs/resources/customer_password_resets.d.ts +1 -36
- package/lib/cjs/resources/customer_password_resets.js +1 -41
- package/lib/cjs/resources/customer_payment_sources.d.ts +1 -85
- package/lib/cjs/resources/customer_payment_sources.js +1 -45
- package/lib/cjs/resources/customer_subscriptions.d.ts +1 -34
- package/lib/cjs/resources/customer_subscriptions.js +1 -45
- package/lib/cjs/resources/customers.d.ts +1 -75
- package/lib/cjs/resources/customers.js +1 -77
- package/lib/cjs/resources/delivery_lead_times.d.ts +1 -54
- package/lib/cjs/resources/delivery_lead_times.js +1 -49
- package/lib/cjs/resources/event_callbacks.d.ts +1 -24
- package/lib/cjs/resources/event_callbacks.js +1 -28
- package/lib/cjs/resources/events.d.ts +1 -24
- package/lib/cjs/resources/events.js +1 -32
- package/lib/cjs/resources/exports.d.ts +1 -40
- package/lib/cjs/resources/exports.js +1 -34
- package/lib/cjs/resources/external_gateways.d.ts +1 -55
- package/lib/cjs/resources/external_gateways.js +1 -45
- package/lib/cjs/resources/external_payments.d.ts +1 -47
- package/lib/cjs/resources/external_payments.js +1 -49
- package/lib/cjs/resources/external_promotions.d.ts +1 -132
- package/lib/cjs/resources/external_promotions.js +1 -81
- package/lib/cjs/resources/external_tax_calculators.d.ts +1 -43
- package/lib/cjs/resources/external_tax_calculators.js +1 -45
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -130
- package/lib/cjs/resources/fixed_amount_promotions.js +1 -81
- package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -130
- package/lib/cjs/resources/fixed_price_promotions.js +1 -81
- package/lib/cjs/resources/free_gift_promotions.d.ts +1 -128
- package/lib/cjs/resources/free_gift_promotions.js +1 -81
- package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -122
- package/lib/cjs/resources/free_shipping_promotions.js +1 -77
- package/lib/cjs/resources/geocoders.d.ts +1 -24
- package/lib/cjs/resources/geocoders.js +1 -32
- package/lib/cjs/resources/gift_card_recipients.d.ts +1 -47
- package/lib/cjs/resources/gift_card_recipients.js +1 -45
- package/lib/cjs/resources/gift_cards.d.ts +1 -99
- package/lib/cjs/resources/gift_cards.js +1 -57
- package/lib/cjs/resources/google_geocoders.d.ts +1 -35
- package/lib/cjs/resources/google_geocoders.js +1 -41
- package/lib/cjs/resources/imports.d.ts +1 -43
- package/lib/cjs/resources/imports.js +1 -34
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -65
- package/lib/cjs/resources/in_stock_subscriptions.js +1 -53
- package/lib/cjs/resources/inventory_models.d.ts +1 -54
- package/lib/cjs/resources/inventory_models.js +1 -49
- package/lib/cjs/resources/inventory_return_locations.d.ts +1 -46
- package/lib/cjs/resources/inventory_return_locations.js +1 -45
- package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -49
- package/lib/cjs/resources/inventory_stock_locations.js +1 -45
- package/lib/cjs/resources/klarna_gateways.d.ts +1 -47
- package/lib/cjs/resources/klarna_gateways.js +1 -45
- package/lib/cjs/resources/klarna_payments.d.ts +1 -49
- package/lib/cjs/resources/klarna_payments.js +1 -45
- package/lib/cjs/resources/line_item_options.d.ts +1 -68
- package/lib/cjs/resources/line_item_options.js +1 -49
- package/lib/cjs/resources/line_items.d.ts +1 -166
- package/lib/cjs/resources/line_items.js +1 -65
- package/lib/cjs/resources/manual_gateways.d.ts +1 -33
- package/lib/cjs/resources/manual_gateways.js +1 -41
- package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -44
- package/lib/cjs/resources/manual_tax_calculators.js +1 -49
- package/lib/cjs/resources/markets.d.ts +1 -104
- package/lib/cjs/resources/markets.js +1 -65
- package/lib/cjs/resources/merchants.d.ts +1 -41
- package/lib/cjs/resources/merchants.js +1 -45
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -66
- package/lib/cjs/resources/order_amount_promotion_rules.js +1 -37
- package/lib/cjs/resources/order_copies.d.ts +1 -50
- package/lib/cjs/resources/order_copies.js +1 -49
- package/lib/cjs/resources/order_factories.d.ts +1 -33
- package/lib/cjs/resources/order_factories.js +1 -36
- package/lib/cjs/resources/order_subscription_items.d.ts +1 -67
- package/lib/cjs/resources/order_subscription_items.js +1 -41
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -92
- package/lib/cjs/resources/order_subscriptions.js +1 -77
- package/lib/cjs/resources/order_validation_rules.d.ts +1 -26
- package/lib/cjs/resources/order_validation_rules.js +1 -36
- package/lib/cjs/resources/orders.d.ts +1 -359
- package/lib/cjs/resources/orders.js +1 -157
- package/lib/cjs/resources/organization.d.ts +1 -33
- package/lib/cjs/resources/organization.js +1 -21
- package/lib/cjs/resources/packages.d.ts +1 -59
- package/lib/cjs/resources/packages.js +1 -49
- package/lib/cjs/resources/parcel_line_items.d.ts +1 -46
- package/lib/cjs/resources/parcel_line_items.js +1 -45
- package/lib/cjs/resources/parcels.d.ts +1 -125
- package/lib/cjs/resources/parcels.js +1 -57
- package/lib/cjs/resources/payment_gateways.d.ts +1 -24
- package/lib/cjs/resources/payment_gateways.js +1 -32
- package/lib/cjs/resources/payment_methods.d.ts +1 -80
- package/lib/cjs/resources/payment_methods.js +1 -49
- package/lib/cjs/resources/payment_options.d.ts +1 -43
- package/lib/cjs/resources/payment_options.js +1 -41
- package/lib/cjs/resources/paypal_gateways.d.ts +1 -40
- package/lib/cjs/resources/paypal_gateways.js +1 -45
- package/lib/cjs/resources/paypal_payments.d.ts +1 -55
- package/lib/cjs/resources/paypal_payments.js +1 -45
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -128
- package/lib/cjs/resources/percentage_discount_promotions.js +1 -81
- package/lib/cjs/resources/price_frequency_tiers.d.ts +1 -52
- package/lib/cjs/resources/price_frequency_tiers.js +1 -49
- package/lib/cjs/resources/price_lists.d.ts +1 -45
- package/lib/cjs/resources/price_lists.js +1 -45
- package/lib/cjs/resources/price_tiers.d.ts +1 -31
- package/lib/cjs/resources/price_tiers.js +1 -36
- package/lib/cjs/resources/price_volume_tiers.d.ts +1 -52
- package/lib/cjs/resources/price_volume_tiers.js +1 -49
- package/lib/cjs/resources/prices.d.ts +1 -74
- package/lib/cjs/resources/prices.js +1 -61
- package/lib/cjs/resources/promotion_rules.d.ts +1 -28
- package/lib/cjs/resources/promotion_rules.js +1 -28
- package/lib/cjs/resources/promotions.d.ts +1 -62
- package/lib/cjs/resources/promotions.js +1 -68
- package/lib/cjs/resources/recurring_order_copies.d.ts +1 -52
- package/lib/cjs/resources/recurring_order_copies.js +1 -49
- package/lib/cjs/resources/refunds.d.ts +1 -43
- package/lib/cjs/resources/refunds.js +1 -44
- package/lib/cjs/resources/reserved_stocks.d.ts +1 -27
- package/lib/cjs/resources/reserved_stocks.js +1 -36
- package/lib/cjs/resources/resource_errors.d.ts +1 -22
- package/lib/cjs/resources/resource_errors.js +1 -24
- package/lib/cjs/resources/return_line_items.d.ts +1 -50
- package/lib/cjs/resources/return_line_items.js +1 -41
- package/lib/cjs/resources/returns.d.ts +1 -86
- package/lib/cjs/resources/returns.js +1 -73
- package/lib/cjs/resources/satispay_gateways.d.ts +1 -45
- package/lib/cjs/resources/satispay_gateways.js +1 -45
- package/lib/cjs/resources/satispay_payments.d.ts +1 -51
- package/lib/cjs/resources/satispay_payments.js +1 -45
- package/lib/cjs/resources/shipments.d.ts +1 -139
- package/lib/cjs/resources/shipments.js +1 -105
- package/lib/cjs/resources/shipping_categories.d.ts +1 -39
- package/lib/cjs/resources/shipping_categories.js +1 -45
- package/lib/cjs/resources/shipping_method_tiers.d.ts +1 -31
- package/lib/cjs/resources/shipping_method_tiers.js +1 -36
- package/lib/cjs/resources/shipping_methods.d.ts +1 -121
- package/lib/cjs/resources/shipping_methods.js +1 -69
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +1 -49
- package/lib/cjs/resources/shipping_weight_tiers.js +1 -45
- package/lib/cjs/resources/shipping_zones.d.ts +1 -51
- package/lib/cjs/resources/shipping_zones.js +1 -41
- package/lib/cjs/resources/sku_list_items.d.ts +1 -50
- package/lib/cjs/resources/sku_list_items.js +1 -45
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -75
- package/lib/cjs/resources/sku_list_promotion_rules.js +1 -45
- package/lib/cjs/resources/sku_lists.d.ts +1 -63
- package/lib/cjs/resources/sku_lists.js +1 -57
- package/lib/cjs/resources/sku_options.d.ts +1 -70
- package/lib/cjs/resources/sku_options.js +1 -53
- package/lib/cjs/resources/skus.d.ts +1 -95
- package/lib/cjs/resources/skus.js +1 -73
- package/lib/cjs/resources/stock_items.d.ts +1 -58
- package/lib/cjs/resources/stock_items.js +1 -57
- package/lib/cjs/resources/stock_line_items.d.ts +1 -69
- package/lib/cjs/resources/stock_line_items.js +1 -53
- package/lib/cjs/resources/stock_locations.d.ts +1 -63
- package/lib/cjs/resources/stock_locations.js +1 -61
- package/lib/cjs/resources/stock_reservations.d.ts +1 -49
- package/lib/cjs/resources/stock_reservations.js +1 -53
- package/lib/cjs/resources/stock_transfers.d.ts +1 -79
- package/lib/cjs/resources/stock_transfers.js +1 -61
- package/lib/cjs/resources/stripe_gateways.d.ts +1 -44
- package/lib/cjs/resources/stripe_gateways.js +1 -45
- package/lib/cjs/resources/stripe_payments.d.ts +1 -59
- package/lib/cjs/resources/stripe_payments.js +1 -45
- package/lib/cjs/resources/subscription_models.d.ts +1 -48
- package/lib/cjs/resources/subscription_models.js +1 -45
- package/lib/cjs/resources/tags.d.ts +1 -27
- package/lib/cjs/resources/tags.js +1 -33
- package/lib/cjs/resources/tax_calculators.d.ts +1 -27
- package/lib/cjs/resources/tax_calculators.js +1 -36
- package/lib/cjs/resources/tax_categories.d.ts +1 -62
- package/lib/cjs/resources/tax_categories.js +1 -45
- package/lib/cjs/resources/tax_rules.d.ts +1 -72
- package/lib/cjs/resources/tax_rules.js +1 -41
- package/lib/cjs/resources/taxjar_accounts.d.ts +1 -46
- package/lib/cjs/resources/taxjar_accounts.js +1 -49
- package/lib/cjs/resources/transactions.d.ts +1 -40
- package/lib/cjs/resources/transactions.js +1 -40
- package/lib/cjs/resources/versions.d.ts +1 -22
- package/lib/cjs/resources/versions.js +1 -24
- package/lib/cjs/resources/voids.d.ts +1 -43
- package/lib/cjs/resources/voids.js +1 -44
- package/lib/cjs/resources/webhooks.d.ts +1 -51
- package/lib/cjs/resources/webhooks.js +1 -41
- package/lib/cjs/resources/wire_transfers.d.ts +1 -36
- package/lib/cjs/resources/wire_transfers.js +1 -41
- package/lib/cjs/static.d.ts +1 -9
- package/lib/cjs/static.js +1 -45
- package/lib/cjs/util.d.ts +1 -6
- package/lib/cjs/util.js +1 -15
- package/lib/esm/api.d.ts +1 -126
- package/lib/esm/api.js +1 -265
- package/lib/esm/client.d.ts +1 -31
- package/lib/esm/client.js +1 -118
- package/lib/esm/commercelayer.d.ts +1 -152
- package/lib/esm/commercelayer.js +1 -214
- package/lib/esm/common.d.ts +1 -4
- package/lib/esm/common.js +1 -10
- package/lib/esm/config.d.ts +1 -11
- package/lib/esm/config.js +1 -11
- package/lib/esm/debug.d.ts +1 -3
- package/lib/esm/debug.js +1 -40
- package/lib/esm/error.d.ts +1 -28
- package/lib/esm/error.js +1 -38
- package/lib/esm/index.d.ts +1 -7
- package/lib/esm/index.js +1 -6
- package/lib/esm/interceptor.d.ts +1 -21
- package/lib/esm/interceptor.js +1 -1
- package/lib/esm/jsonapi.d.ts +1 -5
- package/lib/esm/jsonapi.js +1 -75
- package/lib/esm/model.d.ts +1 -124
- package/lib/esm/model.js +1 -2
- package/lib/esm/query.d.ts +1 -23
- package/lib/esm/query.js +1 -45
- package/lib/esm/resource.d.ts +1 -75
- package/lib/esm/resource.js +1 -139
- package/lib/esm/resources/addresses.d.ts +1 -102
- package/lib/esm/resources/addresses.js +1 -47
- package/lib/esm/resources/adjustments.d.ts +1 -41
- package/lib/esm/resources/adjustments.js +1 -35
- package/lib/esm/resources/adyen_gateways.d.ts +1 -59
- package/lib/esm/resources/adyen_gateways.js +1 -43
- package/lib/esm/resources/adyen_payments.d.ts +1 -49
- package/lib/esm/resources/adyen_payments.js +1 -43
- package/lib/esm/resources/application.d.ts +1 -21
- package/lib/esm/resources/application.js +1 -19
- package/lib/esm/resources/attachments.d.ts +1 -156
- package/lib/esm/resources/attachments.js +1 -31
- package/lib/esm/resources/authorizations.d.ts +1 -66
- package/lib/esm/resources/authorizations.js +1 -49
- package/lib/esm/resources/avalara_accounts.d.ts +1 -58
- package/lib/esm/resources/avalara_accounts.js +1 -47
- package/lib/esm/resources/axerve_gateways.d.ts +1 -47
- package/lib/esm/resources/axerve_gateways.js +1 -43
- package/lib/esm/resources/axerve_payments.d.ts +1 -55
- package/lib/esm/resources/axerve_payments.js +1 -43
- package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -38
- package/lib/esm/resources/billing_info_validation_rules.js +1 -43
- package/lib/esm/resources/bing_geocoders.d.ts +1 -35
- package/lib/esm/resources/bing_geocoders.js +1 -39
- package/lib/esm/resources/braintree_gateways.d.ts +1 -59
- package/lib/esm/resources/braintree_gateways.js +1 -43
- package/lib/esm/resources/braintree_payments.d.ts +1 -51
- package/lib/esm/resources/braintree_payments.js +1 -43
- package/lib/esm/resources/bundles.d.ts +1 -90
- package/lib/esm/resources/bundles.js +1 -59
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +1 -134
- package/lib/esm/resources/buy_x_pay_y_promotions.js +1 -79
- package/lib/esm/resources/captures.d.ts +1 -57
- package/lib/esm/resources/captures.js +1 -49
- package/lib/esm/resources/carrier_accounts.d.ts +1 -29
- package/lib/esm/resources/carrier_accounts.js +1 -34
- package/lib/esm/resources/checkout_com_gateways.d.ts +1 -48
- package/lib/esm/resources/checkout_com_gateways.js +1 -43
- package/lib/esm/resources/checkout_com_payments.d.ts +1 -62
- package/lib/esm/resources/checkout_com_payments.js +1 -43
- package/lib/esm/resources/cleanups.d.ts +1 -39
- package/lib/esm/resources/cleanups.js +1 -36
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -66
- package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -39
- package/lib/esm/resources/coupon_recipients.d.ts +1 -47
- package/lib/esm/resources/coupon_recipients.js +1 -43
- package/lib/esm/resources/coupons.d.ts +1 -70
- package/lib/esm/resources/coupons.js +1 -51
- package/lib/esm/resources/custom_promotion_rules.d.ts +1 -61
- package/lib/esm/resources/custom_promotion_rules.js +1 -35
- package/lib/esm/resources/customer_addresses.d.ts +1 -49
- package/lib/esm/resources/customer_addresses.js +1 -47
- package/lib/esm/resources/customer_groups.d.ts +1 -39
- package/lib/esm/resources/customer_groups.js +1 -47
- package/lib/esm/resources/customer_password_resets.d.ts +1 -36
- package/lib/esm/resources/customer_password_resets.js +1 -39
- package/lib/esm/resources/customer_payment_sources.d.ts +1 -85
- package/lib/esm/resources/customer_payment_sources.js +1 -43
- package/lib/esm/resources/customer_subscriptions.d.ts +1 -34
- package/lib/esm/resources/customer_subscriptions.js +1 -43
- package/lib/esm/resources/customers.d.ts +1 -75
- package/lib/esm/resources/customers.js +1 -75
- package/lib/esm/resources/delivery_lead_times.d.ts +1 -54
- package/lib/esm/resources/delivery_lead_times.js +1 -47
- package/lib/esm/resources/event_callbacks.d.ts +1 -24
- package/lib/esm/resources/event_callbacks.js +1 -26
- package/lib/esm/resources/events.d.ts +1 -24
- package/lib/esm/resources/events.js +1 -30
- package/lib/esm/resources/exports.d.ts +1 -40
- package/lib/esm/resources/exports.js +1 -32
- package/lib/esm/resources/external_gateways.d.ts +1 -55
- package/lib/esm/resources/external_gateways.js +1 -43
- package/lib/esm/resources/external_payments.d.ts +1 -47
- package/lib/esm/resources/external_payments.js +1 -47
- package/lib/esm/resources/external_promotions.d.ts +1 -132
- package/lib/esm/resources/external_promotions.js +1 -79
- package/lib/esm/resources/external_tax_calculators.d.ts +1 -43
- package/lib/esm/resources/external_tax_calculators.js +1 -43
- package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -130
- package/lib/esm/resources/fixed_amount_promotions.js +1 -79
- package/lib/esm/resources/fixed_price_promotions.d.ts +1 -130
- package/lib/esm/resources/fixed_price_promotions.js +1 -79
- package/lib/esm/resources/free_gift_promotions.d.ts +1 -128
- package/lib/esm/resources/free_gift_promotions.js +1 -79
- package/lib/esm/resources/free_shipping_promotions.d.ts +1 -122
- package/lib/esm/resources/free_shipping_promotions.js +1 -75
- package/lib/esm/resources/geocoders.d.ts +1 -24
- package/lib/esm/resources/geocoders.js +1 -30
- package/lib/esm/resources/gift_card_recipients.d.ts +1 -47
- package/lib/esm/resources/gift_card_recipients.js +1 -43
- package/lib/esm/resources/gift_cards.d.ts +1 -99
- package/lib/esm/resources/gift_cards.js +1 -55
- package/lib/esm/resources/google_geocoders.d.ts +1 -35
- package/lib/esm/resources/google_geocoders.js +1 -39
- package/lib/esm/resources/imports.d.ts +1 -43
- package/lib/esm/resources/imports.js +1 -32
- package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -65
- package/lib/esm/resources/in_stock_subscriptions.js +1 -51
- package/lib/esm/resources/inventory_models.d.ts +1 -54
- package/lib/esm/resources/inventory_models.js +1 -47
- package/lib/esm/resources/inventory_return_locations.d.ts +1 -46
- package/lib/esm/resources/inventory_return_locations.js +1 -43
- package/lib/esm/resources/inventory_stock_locations.d.ts +1 -49
- package/lib/esm/resources/inventory_stock_locations.js +1 -43
- package/lib/esm/resources/klarna_gateways.d.ts +1 -47
- package/lib/esm/resources/klarna_gateways.js +1 -43
- package/lib/esm/resources/klarna_payments.d.ts +1 -49
- package/lib/esm/resources/klarna_payments.js +1 -43
- package/lib/esm/resources/line_item_options.d.ts +1 -68
- package/lib/esm/resources/line_item_options.js +1 -47
- package/lib/esm/resources/line_items.d.ts +1 -166
- package/lib/esm/resources/line_items.js +1 -63
- package/lib/esm/resources/manual_gateways.d.ts +1 -33
- package/lib/esm/resources/manual_gateways.js +1 -39
- package/lib/esm/resources/manual_tax_calculators.d.ts +1 -44
- package/lib/esm/resources/manual_tax_calculators.js +1 -47
- package/lib/esm/resources/markets.d.ts +1 -104
- package/lib/esm/resources/markets.js +1 -63
- package/lib/esm/resources/merchants.d.ts +1 -41
- package/lib/esm/resources/merchants.js +1 -43
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -66
- package/lib/esm/resources/order_amount_promotion_rules.js +1 -35
- package/lib/esm/resources/order_copies.d.ts +1 -50
- package/lib/esm/resources/order_copies.js +1 -47
- package/lib/esm/resources/order_factories.d.ts +1 -33
- package/lib/esm/resources/order_factories.js +1 -34
- package/lib/esm/resources/order_subscription_items.d.ts +1 -67
- package/lib/esm/resources/order_subscription_items.js +1 -39
- package/lib/esm/resources/order_subscriptions.d.ts +1 -92
- package/lib/esm/resources/order_subscriptions.js +1 -75
- package/lib/esm/resources/order_validation_rules.d.ts +1 -26
- package/lib/esm/resources/order_validation_rules.js +1 -34
- package/lib/esm/resources/orders.d.ts +1 -359
- package/lib/esm/resources/orders.js +1 -155
- package/lib/esm/resources/organization.d.ts +1 -33
- package/lib/esm/resources/organization.js +1 -19
- package/lib/esm/resources/packages.d.ts +1 -59
- package/lib/esm/resources/packages.js +1 -47
- package/lib/esm/resources/parcel_line_items.d.ts +1 -46
- package/lib/esm/resources/parcel_line_items.js +1 -43
- package/lib/esm/resources/parcels.d.ts +1 -125
- package/lib/esm/resources/parcels.js +1 -55
- package/lib/esm/resources/payment_gateways.d.ts +1 -24
- package/lib/esm/resources/payment_gateways.js +1 -30
- package/lib/esm/resources/payment_methods.d.ts +1 -80
- package/lib/esm/resources/payment_methods.js +1 -47
- package/lib/esm/resources/payment_options.d.ts +1 -43
- package/lib/esm/resources/payment_options.js +1 -39
- package/lib/esm/resources/paypal_gateways.d.ts +1 -40
- package/lib/esm/resources/paypal_gateways.js +1 -43
- package/lib/esm/resources/paypal_payments.d.ts +1 -55
- package/lib/esm/resources/paypal_payments.js +1 -43
- package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -128
- package/lib/esm/resources/percentage_discount_promotions.js +1 -79
- package/lib/esm/resources/price_frequency_tiers.d.ts +1 -52
- package/lib/esm/resources/price_frequency_tiers.js +1 -47
- package/lib/esm/resources/price_lists.d.ts +1 -45
- package/lib/esm/resources/price_lists.js +1 -43
- package/lib/esm/resources/price_tiers.d.ts +1 -31
- package/lib/esm/resources/price_tiers.js +1 -34
- package/lib/esm/resources/price_volume_tiers.d.ts +1 -52
- package/lib/esm/resources/price_volume_tiers.js +1 -47
- package/lib/esm/resources/prices.d.ts +1 -74
- package/lib/esm/resources/prices.js +1 -59
- package/lib/esm/resources/promotion_rules.d.ts +1 -28
- package/lib/esm/resources/promotion_rules.js +1 -26
- package/lib/esm/resources/promotions.d.ts +1 -62
- package/lib/esm/resources/promotions.js +1 -66
- package/lib/esm/resources/recurring_order_copies.d.ts +1 -52
- package/lib/esm/resources/recurring_order_copies.js +1 -47
- package/lib/esm/resources/refunds.d.ts +1 -43
- package/lib/esm/resources/refunds.js +1 -42
- package/lib/esm/resources/reserved_stocks.d.ts +1 -27
- package/lib/esm/resources/reserved_stocks.js +1 -34
- package/lib/esm/resources/resource_errors.d.ts +1 -22
- package/lib/esm/resources/resource_errors.js +1 -22
- package/lib/esm/resources/return_line_items.d.ts +1 -50
- package/lib/esm/resources/return_line_items.js +1 -39
- package/lib/esm/resources/returns.d.ts +1 -86
- package/lib/esm/resources/returns.js +1 -71
- package/lib/esm/resources/satispay_gateways.d.ts +1 -45
- package/lib/esm/resources/satispay_gateways.js +1 -43
- package/lib/esm/resources/satispay_payments.d.ts +1 -51
- package/lib/esm/resources/satispay_payments.js +1 -43
- package/lib/esm/resources/shipments.d.ts +1 -139
- package/lib/esm/resources/shipments.js +1 -103
- package/lib/esm/resources/shipping_categories.d.ts +1 -39
- package/lib/esm/resources/shipping_categories.js +1 -43
- package/lib/esm/resources/shipping_method_tiers.d.ts +1 -31
- package/lib/esm/resources/shipping_method_tiers.js +1 -34
- package/lib/esm/resources/shipping_methods.d.ts +1 -121
- package/lib/esm/resources/shipping_methods.js +1 -67
- package/lib/esm/resources/shipping_weight_tiers.d.ts +1 -49
- package/lib/esm/resources/shipping_weight_tiers.js +1 -43
- package/lib/esm/resources/shipping_zones.d.ts +1 -51
- package/lib/esm/resources/shipping_zones.js +1 -39
- package/lib/esm/resources/sku_list_items.d.ts +1 -50
- package/lib/esm/resources/sku_list_items.js +1 -43
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -75
- package/lib/esm/resources/sku_list_promotion_rules.js +1 -43
- package/lib/esm/resources/sku_lists.d.ts +1 -63
- package/lib/esm/resources/sku_lists.js +1 -55
- package/lib/esm/resources/sku_options.d.ts +1 -70
- package/lib/esm/resources/sku_options.js +1 -51
- package/lib/esm/resources/skus.d.ts +1 -95
- package/lib/esm/resources/skus.js +1 -71
- package/lib/esm/resources/stock_items.d.ts +1 -58
- package/lib/esm/resources/stock_items.js +1 -55
- package/lib/esm/resources/stock_line_items.d.ts +1 -69
- package/lib/esm/resources/stock_line_items.js +1 -51
- package/lib/esm/resources/stock_locations.d.ts +1 -63
- package/lib/esm/resources/stock_locations.js +1 -59
- package/lib/esm/resources/stock_reservations.d.ts +1 -49
- package/lib/esm/resources/stock_reservations.js +1 -51
- package/lib/esm/resources/stock_transfers.d.ts +1 -79
- package/lib/esm/resources/stock_transfers.js +1 -59
- package/lib/esm/resources/stripe_gateways.d.ts +1 -44
- package/lib/esm/resources/stripe_gateways.js +1 -43
- package/lib/esm/resources/stripe_payments.d.ts +1 -59
- package/lib/esm/resources/stripe_payments.js +1 -43
- package/lib/esm/resources/subscription_models.d.ts +1 -48
- package/lib/esm/resources/subscription_models.js +1 -43
- package/lib/esm/resources/tags.d.ts +1 -27
- package/lib/esm/resources/tags.js +1 -31
- package/lib/esm/resources/tax_calculators.d.ts +1 -27
- package/lib/esm/resources/tax_calculators.js +1 -34
- package/lib/esm/resources/tax_categories.d.ts +1 -62
- package/lib/esm/resources/tax_categories.js +1 -43
- package/lib/esm/resources/tax_rules.d.ts +1 -72
- package/lib/esm/resources/tax_rules.js +1 -39
- package/lib/esm/resources/taxjar_accounts.d.ts +1 -46
- package/lib/esm/resources/taxjar_accounts.js +1 -47
- package/lib/esm/resources/transactions.d.ts +1 -40
- package/lib/esm/resources/transactions.js +1 -38
- package/lib/esm/resources/versions.d.ts +1 -22
- package/lib/esm/resources/versions.js +1 -22
- package/lib/esm/resources/voids.d.ts +1 -43
- package/lib/esm/resources/voids.js +1 -42
- package/lib/esm/resources/webhooks.d.ts +1 -51
- package/lib/esm/resources/webhooks.js +1 -39
- package/lib/esm/resources/wire_transfers.d.ts +1 -36
- package/lib/esm/resources/wire_transfers.js +1 -39
- package/lib/esm/static.d.ts +1 -9
- package/lib/esm/static.js +1 -19
- package/lib/esm/util.d.ts +1 -6
- package/lib/esm/util.js +1 -11
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
@@ -1,51 +1 @@
|
|
1
|
-
import
|
2
|
-
class StockLineItems extends ApiResource {
|
3
|
-
// static readonly PATH = 'stock_line_items'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: StockLineItems.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async create(resource, params, options) {
|
8
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: StockLineItems.TYPE }), params, options);
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: StockLineItems.TYPE, id }, params, options);
|
12
|
-
}
|
13
|
-
async update(resource, params, options) {
|
14
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: StockLineItems.TYPE }), params, options);
|
15
|
-
}
|
16
|
-
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: StockLineItems.TYPE, id }, options);
|
18
|
-
}
|
19
|
-
async shipment(stockLineItemId, params, options) {
|
20
|
-
const _stockLineItemId = stockLineItemId.id || stockLineItemId;
|
21
|
-
return this.resources.fetch({ type: 'shipments' }, `stock_line_items/${_stockLineItemId}/shipment`, params, options);
|
22
|
-
}
|
23
|
-
async line_item(stockLineItemId, params, options) {
|
24
|
-
const _stockLineItemId = stockLineItemId.id || stockLineItemId;
|
25
|
-
return this.resources.fetch({ type: 'line_items' }, `stock_line_items/${_stockLineItemId}/line_item`, params, options);
|
26
|
-
}
|
27
|
-
async stock_item(stockLineItemId, params, options) {
|
28
|
-
const _stockLineItemId = stockLineItemId.id || stockLineItemId;
|
29
|
-
return this.resources.fetch({ type: 'stock_items' }, `stock_line_items/${_stockLineItemId}/stock_item`, params, options);
|
30
|
-
}
|
31
|
-
async sku(stockLineItemId, params, options) {
|
32
|
-
const _stockLineItemId = stockLineItemId.id || stockLineItemId;
|
33
|
-
return this.resources.fetch({ type: 'skus' }, `stock_line_items/${_stockLineItemId}/sku`, params, options);
|
34
|
-
}
|
35
|
-
async versions(stockLineItemId, params, options) {
|
36
|
-
const _stockLineItemId = stockLineItemId.id || stockLineItemId;
|
37
|
-
return this.resources.fetch({ type: 'versions' }, `stock_line_items/${_stockLineItemId}/versions`, params, options);
|
38
|
-
}
|
39
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
40
|
-
isStockLineItem(resource) {
|
41
|
-
return resource.type && (resource.type === StockLineItems.TYPE);
|
42
|
-
}
|
43
|
-
relationship(id) {
|
44
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: StockLineItems.TYPE } : { id: id.id, type: StockLineItems.TYPE };
|
45
|
-
}
|
46
|
-
type() {
|
47
|
-
return StockLineItems.TYPE;
|
48
|
-
}
|
49
|
-
}
|
50
|
-
StockLineItems.TYPE = 'stock_line_items';
|
51
|
-
export default StockLineItems;
|
1
|
+
import{ApiResource as n}from"../resource";class r extends n{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}async shipment(e,s,t){const i=e.id||e;return this.resources.fetch({type:"shipments"},`stock_line_items/${i}/shipment`,s,t)}async line_item(e,s,t){const i=e.id||e;return this.resources.fetch({type:"line_items"},`stock_line_items/${i}/line_item`,s,t)}async stock_item(e,s,t){const i=e.id||e;return this.resources.fetch({type:"stock_items"},`stock_line_items/${i}/stock_item`,s,t)}async sku(e,s,t){const i=e.id||e;return this.resources.fetch({type:"skus"},`stock_line_items/${i}/sku`,s,t)}async versions(e,s,t){const i=e.id||e;return this.resources.fetch({type:"versions"},`stock_line_items/${i}/versions`,s,t)}isStockLineItem(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="stock_line_items";export default r;
|
@@ -1,63 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Address } from './addresses';
|
4
|
-
import type { InventoryStockLocation } from './inventory_stock_locations';
|
5
|
-
import type { InventoryReturnLocation } from './inventory_return_locations';
|
6
|
-
import type { StockItem } from './stock_items';
|
7
|
-
import type { StockTransfer } from './stock_transfers';
|
8
|
-
import type { Attachment } from './attachments';
|
9
|
-
import type { Version } from './versions';
|
10
|
-
type StockLocationRel = ResourceRel & {
|
11
|
-
type: typeof StockLocations.TYPE;
|
12
|
-
};
|
13
|
-
type AddressRel = ResourceRel & {
|
14
|
-
type: 'addresses';
|
15
|
-
};
|
16
|
-
interface StockLocation extends Resource {
|
17
|
-
number?: number;
|
18
|
-
name?: string;
|
19
|
-
code?: string;
|
20
|
-
label_format?: string;
|
21
|
-
suppress_etd?: boolean;
|
22
|
-
address?: Address;
|
23
|
-
inventory_stock_locations?: InventoryStockLocation[];
|
24
|
-
inventory_return_locations?: InventoryReturnLocation[];
|
25
|
-
stock_items?: StockItem[];
|
26
|
-
stock_transfers?: StockTransfer[];
|
27
|
-
attachments?: Attachment[];
|
28
|
-
versions?: Version[];
|
29
|
-
}
|
30
|
-
interface StockLocationCreate extends ResourceCreate {
|
31
|
-
name: string;
|
32
|
-
code?: string;
|
33
|
-
label_format?: string;
|
34
|
-
suppress_etd?: boolean;
|
35
|
-
address: AddressRel;
|
36
|
-
}
|
37
|
-
interface StockLocationUpdate extends ResourceUpdate {
|
38
|
-
name?: string;
|
39
|
-
code?: string;
|
40
|
-
label_format?: string;
|
41
|
-
suppress_etd?: boolean;
|
42
|
-
address?: AddressRel;
|
43
|
-
}
|
44
|
-
declare class StockLocations extends ApiResource {
|
45
|
-
static readonly TYPE: 'stock_locations';
|
46
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLocation>>;
|
47
|
-
create(resource: StockLocationCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
48
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
49
|
-
update(resource: StockLocationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
50
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
51
|
-
address(stockLocationId: string | StockLocation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
52
|
-
inventory_stock_locations(stockLocationId: string | StockLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryStockLocation>>;
|
53
|
-
inventory_return_locations(stockLocationId: string | StockLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryReturnLocation>>;
|
54
|
-
stock_items(stockLocationId: string | StockLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockItem>>;
|
55
|
-
stock_transfers(stockLocationId: string | StockLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
|
56
|
-
attachments(stockLocationId: string | StockLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
57
|
-
versions(stockLocationId: string | StockLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
58
|
-
isStockLocation(resource: any): resource is StockLocation;
|
59
|
-
relationship(id: string | ResourceId | null): StockLocationRel;
|
60
|
-
type(): string;
|
61
|
-
}
|
62
|
-
export default StockLocations;
|
63
|
-
export { StockLocation, StockLocationCreate, StockLocationUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Address}from'./addresses';import type{InventoryStockLocation}from'./inventory_stock_locations';import type{InventoryReturnLocation}from'./inventory_return_locations';import type{StockItem}from'./stock_items';import type{StockTransfer}from'./stock_transfers';import type{Attachment}from'./attachments';import type{Version}from'./versions';type StockLocationRel=ResourceRel&{type:typeof StockLocations.TYPE;};type AddressRel=ResourceRel&{type:'addresses';};interface StockLocation extends Resource{number?:number;name?:string;code?:string;label_format?:string;suppress_etd?:boolean;address?:Address;inventory_stock_locations?:InventoryStockLocation[];inventory_return_locations?:InventoryReturnLocation[];stock_items?:StockItem[];stock_transfers?:StockTransfer[];attachments?:Attachment[];versions?:Version[];}interface StockLocationCreate extends ResourceCreate{name:string;code?:string;label_format?:string;suppress_etd?:boolean;address:AddressRel;}interface StockLocationUpdate extends ResourceUpdate{name?:string;code?:string;label_format?:string;suppress_etd?:boolean;address?:AddressRel;}declare class StockLocations extends ApiResource{static readonly TYPE:'stock_locations';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLocation>>;create(resource:StockLocationCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;update(resource:StockLocationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;delete(id:string,options?:ResourcesConfig):Promise<void>;address(stockLocationId:string|StockLocation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;inventory_stock_locations(stockLocationId:string|StockLocation,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<InventoryStockLocation>>;inventory_return_locations(stockLocationId:string|StockLocation,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<InventoryReturnLocation>>;stock_items(stockLocationId:string|StockLocation,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockItem>>;stock_transfers(stockLocationId:string|StockLocation,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;attachments(stockLocationId:string|StockLocation,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(stockLocationId:string|StockLocation,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isStockLocation(resource:any):resource is StockLocation;relationship(id:string|ResourceId|null):StockLocationRel;type():string;}export default StockLocations;export{StockLocation,StockLocationCreate,StockLocationUpdate};
|
@@ -1,59 +1 @@
|
|
1
|
-
import
|
2
|
-
class StockLocations extends ApiResource {
|
3
|
-
// static readonly PATH = 'stock_locations'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: StockLocations.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async create(resource, params, options) {
|
8
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: StockLocations.TYPE }), params, options);
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: StockLocations.TYPE, id }, params, options);
|
12
|
-
}
|
13
|
-
async update(resource, params, options) {
|
14
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: StockLocations.TYPE }), params, options);
|
15
|
-
}
|
16
|
-
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: StockLocations.TYPE, id }, options);
|
18
|
-
}
|
19
|
-
async address(stockLocationId, params, options) {
|
20
|
-
const _stockLocationId = stockLocationId.id || stockLocationId;
|
21
|
-
return this.resources.fetch({ type: 'addresses' }, `stock_locations/${_stockLocationId}/address`, params, options);
|
22
|
-
}
|
23
|
-
async inventory_stock_locations(stockLocationId, params, options) {
|
24
|
-
const _stockLocationId = stockLocationId.id || stockLocationId;
|
25
|
-
return this.resources.fetch({ type: 'inventory_stock_locations' }, `stock_locations/${_stockLocationId}/inventory_stock_locations`, params, options);
|
26
|
-
}
|
27
|
-
async inventory_return_locations(stockLocationId, params, options) {
|
28
|
-
const _stockLocationId = stockLocationId.id || stockLocationId;
|
29
|
-
return this.resources.fetch({ type: 'inventory_return_locations' }, `stock_locations/${_stockLocationId}/inventory_return_locations`, params, options);
|
30
|
-
}
|
31
|
-
async stock_items(stockLocationId, params, options) {
|
32
|
-
const _stockLocationId = stockLocationId.id || stockLocationId;
|
33
|
-
return this.resources.fetch({ type: 'stock_items' }, `stock_locations/${_stockLocationId}/stock_items`, params, options);
|
34
|
-
}
|
35
|
-
async stock_transfers(stockLocationId, params, options) {
|
36
|
-
const _stockLocationId = stockLocationId.id || stockLocationId;
|
37
|
-
return this.resources.fetch({ type: 'stock_transfers' }, `stock_locations/${_stockLocationId}/stock_transfers`, params, options);
|
38
|
-
}
|
39
|
-
async attachments(stockLocationId, params, options) {
|
40
|
-
const _stockLocationId = stockLocationId.id || stockLocationId;
|
41
|
-
return this.resources.fetch({ type: 'attachments' }, `stock_locations/${_stockLocationId}/attachments`, params, options);
|
42
|
-
}
|
43
|
-
async versions(stockLocationId, params, options) {
|
44
|
-
const _stockLocationId = stockLocationId.id || stockLocationId;
|
45
|
-
return this.resources.fetch({ type: 'versions' }, `stock_locations/${_stockLocationId}/versions`, params, options);
|
46
|
-
}
|
47
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
48
|
-
isStockLocation(resource) {
|
49
|
-
return resource.type && (resource.type === StockLocations.TYPE);
|
50
|
-
}
|
51
|
-
relationship(id) {
|
52
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: StockLocations.TYPE } : { id: id.id, type: StockLocations.TYPE };
|
53
|
-
}
|
54
|
-
type() {
|
55
|
-
return StockLocations.TYPE;
|
56
|
-
}
|
57
|
-
}
|
58
|
-
StockLocations.TYPE = 'stock_locations';
|
59
|
-
export default StockLocations;
|
1
|
+
import{ApiResource as c}from"../resource";class n extends c{async list(t,s){return this.resources.list({type:n.TYPE},t,s)}async create(t,s,e){return this.resources.create(Object.assign(Object.assign({},t),{type:n.TYPE}),s,e)}async retrieve(t,s,e){return this.resources.retrieve({type:n.TYPE,id:t},s,e)}async update(t,s,e){return this.resources.update(Object.assign(Object.assign({},t),{type:n.TYPE}),s,e)}async delete(t,s){await this.resources.delete({type:n.TYPE,id:t},s)}async address(t,s,e){const r=t.id||t;return this.resources.fetch({type:"addresses"},`stock_locations/${r}/address`,s,e)}async inventory_stock_locations(t,s,e){const r=t.id||t;return this.resources.fetch({type:"inventory_stock_locations"},`stock_locations/${r}/inventory_stock_locations`,s,e)}async inventory_return_locations(t,s,e){const r=t.id||t;return this.resources.fetch({type:"inventory_return_locations"},`stock_locations/${r}/inventory_return_locations`,s,e)}async stock_items(t,s,e){const r=t.id||t;return this.resources.fetch({type:"stock_items"},`stock_locations/${r}/stock_items`,s,e)}async stock_transfers(t,s,e){const r=t.id||t;return this.resources.fetch({type:"stock_transfers"},`stock_locations/${r}/stock_transfers`,s,e)}async attachments(t,s,e){const r=t.id||t;return this.resources.fetch({type:"attachments"},`stock_locations/${r}/attachments`,s,e)}async versions(t,s,e){const r=t.id||t;return this.resources.fetch({type:"versions"},`stock_locations/${r}/versions`,s,e)}isStockLocation(t){return t.type&&t.type===n.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:n.TYPE}:{id:t.id,type:n.TYPE}}type(){return n.TYPE}}n.TYPE="stock_locations";export default n;
|
@@ -1,49 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { LineItem } from './line_items';
|
4
|
-
import type { Order } from './orders';
|
5
|
-
import type { StockItem } from './stock_items';
|
6
|
-
import type { ReservedStock } from './reserved_stocks';
|
7
|
-
import type { Sku } from './skus';
|
8
|
-
type StockReservationRel = ResourceRel & {
|
9
|
-
type: typeof StockReservations.TYPE;
|
10
|
-
};
|
11
|
-
type StockItemRel = ResourceRel & {
|
12
|
-
type: 'stock_items';
|
13
|
-
};
|
14
|
-
interface StockReservation extends Resource {
|
15
|
-
status?: string;
|
16
|
-
quantity?: number;
|
17
|
-
expires_at?: string;
|
18
|
-
line_item?: LineItem;
|
19
|
-
order?: Order;
|
20
|
-
stock_item?: StockItem;
|
21
|
-
reserved_stock?: ReservedStock;
|
22
|
-
sku?: Sku;
|
23
|
-
}
|
24
|
-
interface StockReservationCreate extends ResourceCreate {
|
25
|
-
quantity: number;
|
26
|
-
stock_item: StockItemRel;
|
27
|
-
}
|
28
|
-
interface StockReservationUpdate extends ResourceUpdate {
|
29
|
-
quantity?: number;
|
30
|
-
_pending?: boolean;
|
31
|
-
}
|
32
|
-
declare class StockReservations extends ApiResource {
|
33
|
-
static readonly TYPE: 'stock_reservations';
|
34
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockReservation>>;
|
35
|
-
create(resource: StockReservationCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockReservation>;
|
36
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockReservation>;
|
37
|
-
update(resource: StockReservationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockReservation>;
|
38
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
39
|
-
line_item(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
40
|
-
order(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
41
|
-
stock_item(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
|
42
|
-
reserved_stock(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ReservedStock>;
|
43
|
-
sku(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
44
|
-
isStockReservation(resource: any): resource is StockReservation;
|
45
|
-
relationship(id: string | ResourceId | null): StockReservationRel;
|
46
|
-
type(): string;
|
47
|
-
}
|
48
|
-
export default StockReservations;
|
49
|
-
export { StockReservation, StockReservationCreate, StockReservationUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{LineItem}from'./line_items';import type{Order}from'./orders';import type{StockItem}from'./stock_items';import type{ReservedStock}from'./reserved_stocks';import type{Sku}from'./skus';type StockReservationRel=ResourceRel&{type:typeof StockReservations.TYPE;};type StockItemRel=ResourceRel&{type:'stock_items';};interface StockReservation extends Resource{status?:string;quantity?:number;expires_at?:string;line_item?:LineItem;order?:Order;stock_item?:StockItem;reserved_stock?:ReservedStock;sku?:Sku;}interface StockReservationCreate extends ResourceCreate{quantity:number;stock_item:StockItemRel;}interface StockReservationUpdate extends ResourceUpdate{quantity?:number;_pending?:boolean;}declare class StockReservations extends ApiResource{static readonly TYPE:'stock_reservations';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockReservation>>;create(resource:StockReservationCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockReservation>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockReservation>;update(resource:StockReservationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockReservation>;delete(id:string,options?:ResourcesConfig):Promise<void>;line_item(stockReservationId:string|StockReservation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;order(stockReservationId:string|StockReservation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;stock_item(stockReservationId:string|StockReservation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockItem>;reserved_stock(stockReservationId:string|StockReservation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReservedStock>;sku(stockReservationId:string|StockReservation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;isStockReservation(resource:any):resource is StockReservation;relationship(id:string|ResourceId|null):StockReservationRel;type():string;}export default StockReservations;export{StockReservation,StockReservationCreate,StockReservationUpdate};
|
@@ -1,51 +1 @@
|
|
1
|
-
import
|
2
|
-
class StockReservations extends ApiResource {
|
3
|
-
// static readonly PATH = 'stock_reservations'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: StockReservations.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async create(resource, params, options) {
|
8
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: StockReservations.TYPE }), params, options);
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: StockReservations.TYPE, id }, params, options);
|
12
|
-
}
|
13
|
-
async update(resource, params, options) {
|
14
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: StockReservations.TYPE }), params, options);
|
15
|
-
}
|
16
|
-
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: StockReservations.TYPE, id }, options);
|
18
|
-
}
|
19
|
-
async line_item(stockReservationId, params, options) {
|
20
|
-
const _stockReservationId = stockReservationId.id || stockReservationId;
|
21
|
-
return this.resources.fetch({ type: 'line_items' }, `stock_reservations/${_stockReservationId}/line_item`, params, options);
|
22
|
-
}
|
23
|
-
async order(stockReservationId, params, options) {
|
24
|
-
const _stockReservationId = stockReservationId.id || stockReservationId;
|
25
|
-
return this.resources.fetch({ type: 'orders' }, `stock_reservations/${_stockReservationId}/order`, params, options);
|
26
|
-
}
|
27
|
-
async stock_item(stockReservationId, params, options) {
|
28
|
-
const _stockReservationId = stockReservationId.id || stockReservationId;
|
29
|
-
return this.resources.fetch({ type: 'stock_items' }, `stock_reservations/${_stockReservationId}/stock_item`, params, options);
|
30
|
-
}
|
31
|
-
async reserved_stock(stockReservationId, params, options) {
|
32
|
-
const _stockReservationId = stockReservationId.id || stockReservationId;
|
33
|
-
return this.resources.fetch({ type: 'reserved_stocks' }, `stock_reservations/${_stockReservationId}/reserved_stock`, params, options);
|
34
|
-
}
|
35
|
-
async sku(stockReservationId, params, options) {
|
36
|
-
const _stockReservationId = stockReservationId.id || stockReservationId;
|
37
|
-
return this.resources.fetch({ type: 'skus' }, `stock_reservations/${_stockReservationId}/sku`, params, options);
|
38
|
-
}
|
39
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
40
|
-
isStockReservation(resource) {
|
41
|
-
return resource.type && (resource.type === StockReservations.TYPE);
|
42
|
-
}
|
43
|
-
relationship(id) {
|
44
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: StockReservations.TYPE } : { id: id.id, type: StockReservations.TYPE };
|
45
|
-
}
|
46
|
-
type() {
|
47
|
-
return StockReservations.TYPE;
|
48
|
-
}
|
49
|
-
}
|
50
|
-
StockReservations.TYPE = 'stock_reservations';
|
51
|
-
export default StockReservations;
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}async line_item(e,s,t){const c=e.id||e;return this.resources.fetch({type:"line_items"},`stock_reservations/${c}/line_item`,s,t)}async order(e,s,t){const c=e.id||e;return this.resources.fetch({type:"orders"},`stock_reservations/${c}/order`,s,t)}async stock_item(e,s,t){const c=e.id||e;return this.resources.fetch({type:"stock_items"},`stock_reservations/${c}/stock_item`,s,t)}async reserved_stock(e,s,t){const c=e.id||e;return this.resources.fetch({type:"reserved_stocks"},`stock_reservations/${c}/reserved_stock`,s,t)}async sku(e,s,t){const c=e.id||e;return this.resources.fetch({type:"skus"},`stock_reservations/${c}/sku`,s,t)}isStockReservation(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="stock_reservations";export default r;
|
@@ -1,79 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Sku } from './skus';
|
4
|
-
import type { StockLocation } from './stock_locations';
|
5
|
-
import type { Shipment } from './shipments';
|
6
|
-
import type { LineItem } from './line_items';
|
7
|
-
import type { Event } from './events';
|
8
|
-
import type { Version } from './versions';
|
9
|
-
type StockTransferRel = ResourceRel & {
|
10
|
-
type: typeof StockTransfers.TYPE;
|
11
|
-
};
|
12
|
-
type SkuRel = ResourceRel & {
|
13
|
-
type: 'skus';
|
14
|
-
};
|
15
|
-
type StockLocationRel = ResourceRel & {
|
16
|
-
type: 'stock_locations';
|
17
|
-
};
|
18
|
-
type ShipmentRel = ResourceRel & {
|
19
|
-
type: 'shipments';
|
20
|
-
};
|
21
|
-
type LineItemRel = ResourceRel & {
|
22
|
-
type: 'line_items';
|
23
|
-
};
|
24
|
-
interface StockTransfer extends Resource {
|
25
|
-
number?: string;
|
26
|
-
sku_code?: string;
|
27
|
-
status?: string;
|
28
|
-
quantity?: number;
|
29
|
-
completed_at?: string;
|
30
|
-
cancelled_at?: string;
|
31
|
-
sku?: Sku;
|
32
|
-
origin_stock_location?: StockLocation;
|
33
|
-
destination_stock_location?: StockLocation;
|
34
|
-
shipment?: Shipment;
|
35
|
-
line_item?: LineItem;
|
36
|
-
events?: Event[];
|
37
|
-
versions?: Version[];
|
38
|
-
}
|
39
|
-
interface StockTransferCreate extends ResourceCreate {
|
40
|
-
sku_code?: string;
|
41
|
-
quantity: number;
|
42
|
-
sku: SkuRel;
|
43
|
-
origin_stock_location: StockLocationRel;
|
44
|
-
destination_stock_location: StockLocationRel;
|
45
|
-
shipment?: ShipmentRel;
|
46
|
-
line_item?: LineItemRel;
|
47
|
-
}
|
48
|
-
interface StockTransferUpdate extends ResourceUpdate {
|
49
|
-
sku_code?: string;
|
50
|
-
_upcoming?: boolean;
|
51
|
-
_on_hold?: boolean;
|
52
|
-
_picking?: boolean;
|
53
|
-
_in_transit?: boolean;
|
54
|
-
_complete?: boolean;
|
55
|
-
_cancel?: boolean;
|
56
|
-
sku?: SkuRel;
|
57
|
-
origin_stock_location?: StockLocationRel;
|
58
|
-
destination_stock_location?: StockLocationRel;
|
59
|
-
}
|
60
|
-
declare class StockTransfers extends ApiResource {
|
61
|
-
static readonly TYPE: 'stock_transfers';
|
62
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
|
63
|
-
create(resource: StockTransferCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
|
64
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
|
65
|
-
update(resource: StockTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
|
66
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
67
|
-
sku(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
68
|
-
origin_stock_location(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
69
|
-
destination_stock_location(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
70
|
-
shipment(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
71
|
-
line_item(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
72
|
-
events(stockTransferId: string | StockTransfer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
73
|
-
versions(stockTransferId: string | StockTransfer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
74
|
-
isStockTransfer(resource: any): resource is StockTransfer;
|
75
|
-
relationship(id: string | ResourceId | null): StockTransferRel;
|
76
|
-
type(): string;
|
77
|
-
}
|
78
|
-
export default StockTransfers;
|
79
|
-
export { StockTransfer, StockTransferCreate, StockTransferUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Sku}from'./skus';import type{StockLocation}from'./stock_locations';import type{Shipment}from'./shipments';import type{LineItem}from'./line_items';import type{Event}from'./events';import type{Version}from'./versions';type StockTransferRel=ResourceRel&{type:typeof StockTransfers.TYPE;};type SkuRel=ResourceRel&{type:'skus';};type StockLocationRel=ResourceRel&{type:'stock_locations';};type ShipmentRel=ResourceRel&{type:'shipments';};type LineItemRel=ResourceRel&{type:'line_items';};interface StockTransfer extends Resource{number?:string;sku_code?:string;status?:string;quantity?:number;completed_at?:string;cancelled_at?:string;sku?:Sku;origin_stock_location?:StockLocation;destination_stock_location?:StockLocation;shipment?:Shipment;line_item?:LineItem;events?:Event[];versions?:Version[];}interface StockTransferCreate extends ResourceCreate{sku_code?:string;quantity:number;sku:SkuRel;origin_stock_location:StockLocationRel;destination_stock_location:StockLocationRel;shipment?:ShipmentRel;line_item?:LineItemRel;}interface StockTransferUpdate extends ResourceUpdate{sku_code?:string;_upcoming?:boolean;_on_hold?:boolean;_picking?:boolean;_in_transit?:boolean;_complete?:boolean;_cancel?:boolean;sku?:SkuRel;origin_stock_location?:StockLocationRel;destination_stock_location?:StockLocationRel;}declare class StockTransfers extends ApiResource{static readonly TYPE:'stock_transfers';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;create(resource:StockTransferCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;update(resource:StockTransferUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;delete(id:string,options?:ResourcesConfig):Promise<void>;sku(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;origin_stock_location(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;destination_stock_location(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;shipment(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;line_item(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;events(stockTransferId:string|StockTransfer,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;versions(stockTransferId:string|StockTransfer,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isStockTransfer(resource:any):resource is StockTransfer;relationship(id:string|ResourceId|null):StockTransferRel;type():string;}export default StockTransfers;export{StockTransfer,StockTransferCreate,StockTransferUpdate};
|
@@ -1,59 +1 @@
|
|
1
|
-
import
|
2
|
-
class StockTransfers extends ApiResource {
|
3
|
-
// static readonly PATH = 'stock_transfers'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: StockTransfers.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async create(resource, params, options) {
|
8
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: StockTransfers.TYPE }), params, options);
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: StockTransfers.TYPE, id }, params, options);
|
12
|
-
}
|
13
|
-
async update(resource, params, options) {
|
14
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: StockTransfers.TYPE }), params, options);
|
15
|
-
}
|
16
|
-
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: StockTransfers.TYPE, id }, options);
|
18
|
-
}
|
19
|
-
async sku(stockTransferId, params, options) {
|
20
|
-
const _stockTransferId = stockTransferId.id || stockTransferId;
|
21
|
-
return this.resources.fetch({ type: 'skus' }, `stock_transfers/${_stockTransferId}/sku`, params, options);
|
22
|
-
}
|
23
|
-
async origin_stock_location(stockTransferId, params, options) {
|
24
|
-
const _stockTransferId = stockTransferId.id || stockTransferId;
|
25
|
-
return this.resources.fetch({ type: 'stock_locations' }, `stock_transfers/${_stockTransferId}/origin_stock_location`, params, options);
|
26
|
-
}
|
27
|
-
async destination_stock_location(stockTransferId, params, options) {
|
28
|
-
const _stockTransferId = stockTransferId.id || stockTransferId;
|
29
|
-
return this.resources.fetch({ type: 'stock_locations' }, `stock_transfers/${_stockTransferId}/destination_stock_location`, params, options);
|
30
|
-
}
|
31
|
-
async shipment(stockTransferId, params, options) {
|
32
|
-
const _stockTransferId = stockTransferId.id || stockTransferId;
|
33
|
-
return this.resources.fetch({ type: 'shipments' }, `stock_transfers/${_stockTransferId}/shipment`, params, options);
|
34
|
-
}
|
35
|
-
async line_item(stockTransferId, params, options) {
|
36
|
-
const _stockTransferId = stockTransferId.id || stockTransferId;
|
37
|
-
return this.resources.fetch({ type: 'line_items' }, `stock_transfers/${_stockTransferId}/line_item`, params, options);
|
38
|
-
}
|
39
|
-
async events(stockTransferId, params, options) {
|
40
|
-
const _stockTransferId = stockTransferId.id || stockTransferId;
|
41
|
-
return this.resources.fetch({ type: 'events' }, `stock_transfers/${_stockTransferId}/events`, params, options);
|
42
|
-
}
|
43
|
-
async versions(stockTransferId, params, options) {
|
44
|
-
const _stockTransferId = stockTransferId.id || stockTransferId;
|
45
|
-
return this.resources.fetch({ type: 'versions' }, `stock_transfers/${_stockTransferId}/versions`, params, options);
|
46
|
-
}
|
47
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
48
|
-
isStockTransfer(resource) {
|
49
|
-
return resource.type && (resource.type === StockTransfers.TYPE);
|
50
|
-
}
|
51
|
-
relationship(id) {
|
52
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: StockTransfers.TYPE } : { id: id.id, type: StockTransfers.TYPE };
|
53
|
-
}
|
54
|
-
type() {
|
55
|
-
return StockTransfers.TYPE;
|
56
|
-
}
|
57
|
-
}
|
58
|
-
StockTransfers.TYPE = 'stock_transfers';
|
59
|
-
export default StockTransfers;
|
1
|
+
import{ApiResource as i}from"../resource";class n extends i{async list(t,e){return this.resources.list({type:n.TYPE},t,e)}async create(t,e,s){return this.resources.create(Object.assign(Object.assign({},t),{type:n.TYPE}),e,s)}async retrieve(t,e,s){return this.resources.retrieve({type:n.TYPE,id:t},e,s)}async update(t,e,s){return this.resources.update(Object.assign(Object.assign({},t),{type:n.TYPE}),e,s)}async delete(t,e){await this.resources.delete({type:n.TYPE,id:t},e)}async sku(t,e,s){const r=t.id||t;return this.resources.fetch({type:"skus"},`stock_transfers/${r}/sku`,e,s)}async origin_stock_location(t,e,s){const r=t.id||t;return this.resources.fetch({type:"stock_locations"},`stock_transfers/${r}/origin_stock_location`,e,s)}async destination_stock_location(t,e,s){const r=t.id||t;return this.resources.fetch({type:"stock_locations"},`stock_transfers/${r}/destination_stock_location`,e,s)}async shipment(t,e,s){const r=t.id||t;return this.resources.fetch({type:"shipments"},`stock_transfers/${r}/shipment`,e,s)}async line_item(t,e,s){const r=t.id||t;return this.resources.fetch({type:"line_items"},`stock_transfers/${r}/line_item`,e,s)}async events(t,e,s){const r=t.id||t;return this.resources.fetch({type:"events"},`stock_transfers/${r}/events`,e,s)}async versions(t,e,s){const r=t.id||t;return this.resources.fetch({type:"versions"},`stock_transfers/${r}/versions`,e,s)}isStockTransfer(t){return t.type&&t.type===n.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:n.TYPE}:{id:t.id,type:n.TYPE}}type(){return n.TYPE}}n.TYPE="stock_transfers";export default n;
|
@@ -1,44 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { PaymentMethod } from './payment_methods';
|
4
|
-
import type { Version } from './versions';
|
5
|
-
import type { StripePayment } from './stripe_payments';
|
6
|
-
type StripeGatewayRel = ResourceRel & {
|
7
|
-
type: typeof StripeGateways.TYPE;
|
8
|
-
};
|
9
|
-
interface StripeGateway extends Resource {
|
10
|
-
name?: string;
|
11
|
-
auto_payments?: boolean;
|
12
|
-
webhook_endpoint_id?: string;
|
13
|
-
webhook_endpoint_secret?: string;
|
14
|
-
webhook_endpoint_url?: string;
|
15
|
-
payment_methods?: PaymentMethod[];
|
16
|
-
versions?: Version[];
|
17
|
-
stripe_payments?: StripePayment[];
|
18
|
-
}
|
19
|
-
interface StripeGatewayCreate extends ResourceCreate {
|
20
|
-
name: string;
|
21
|
-
login: string;
|
22
|
-
publishable_key?: string;
|
23
|
-
auto_payments?: boolean;
|
24
|
-
}
|
25
|
-
interface StripeGatewayUpdate extends ResourceUpdate {
|
26
|
-
name?: string;
|
27
|
-
auto_payments?: boolean;
|
28
|
-
}
|
29
|
-
declare class StripeGateways extends ApiResource {
|
30
|
-
static readonly TYPE: 'stripe_gateways';
|
31
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StripeGateway>>;
|
32
|
-
create(resource: StripeGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripeGateway>;
|
33
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripeGateway>;
|
34
|
-
update(resource: StripeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripeGateway>;
|
35
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
36
|
-
payment_methods(stripeGatewayId: string | StripeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
37
|
-
versions(stripeGatewayId: string | StripeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
38
|
-
stripe_payments(stripeGatewayId: string | StripeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StripePayment>>;
|
39
|
-
isStripeGateway(resource: any): resource is StripeGateway;
|
40
|
-
relationship(id: string | ResourceId | null): StripeGatewayRel;
|
41
|
-
type(): string;
|
42
|
-
}
|
43
|
-
export default StripeGateways;
|
44
|
-
export { StripeGateway, StripeGatewayCreate, StripeGatewayUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{Version}from'./versions';import type{StripePayment}from'./stripe_payments';type StripeGatewayRel=ResourceRel&{type:typeof StripeGateways.TYPE;};interface StripeGateway extends Resource{name?:string;auto_payments?:boolean;webhook_endpoint_id?:string;webhook_endpoint_secret?:string;webhook_endpoint_url?:string;payment_methods?:PaymentMethod[];versions?:Version[];stripe_payments?:StripePayment[];}interface StripeGatewayCreate extends ResourceCreate{name:string;login:string;publishable_key?:string;auto_payments?:boolean;}interface StripeGatewayUpdate extends ResourceUpdate{name?:string;auto_payments?:boolean;}declare class StripeGateways extends ApiResource{static readonly TYPE:'stripe_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StripeGateway>>;create(resource:StripeGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripeGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripeGateway>;update(resource:StripeGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripeGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(stripeGatewayId:string|StripeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;versions(stripeGatewayId:string|StripeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;stripe_payments(stripeGatewayId:string|StripeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StripePayment>>;isStripeGateway(resource:any):resource is StripeGateway;relationship(id:string|ResourceId|null):StripeGatewayRel;type():string;}export default StripeGateways;export{StripeGateway,StripeGatewayCreate,StripeGatewayUpdate};
|
@@ -1,43 +1 @@
|
|
1
|
-
import
|
2
|
-
class StripeGateways extends ApiResource {
|
3
|
-
// static readonly PATH = 'stripe_gateways'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: StripeGateways.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async create(resource, params, options) {
|
8
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: StripeGateways.TYPE }), params, options);
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: StripeGateways.TYPE, id }, params, options);
|
12
|
-
}
|
13
|
-
async update(resource, params, options) {
|
14
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: StripeGateways.TYPE }), params, options);
|
15
|
-
}
|
16
|
-
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: StripeGateways.TYPE, id }, options);
|
18
|
-
}
|
19
|
-
async payment_methods(stripeGatewayId, params, options) {
|
20
|
-
const _stripeGatewayId = stripeGatewayId.id || stripeGatewayId;
|
21
|
-
return this.resources.fetch({ type: 'payment_methods' }, `stripe_gateways/${_stripeGatewayId}/payment_methods`, params, options);
|
22
|
-
}
|
23
|
-
async versions(stripeGatewayId, params, options) {
|
24
|
-
const _stripeGatewayId = stripeGatewayId.id || stripeGatewayId;
|
25
|
-
return this.resources.fetch({ type: 'versions' }, `stripe_gateways/${_stripeGatewayId}/versions`, params, options);
|
26
|
-
}
|
27
|
-
async stripe_payments(stripeGatewayId, params, options) {
|
28
|
-
const _stripeGatewayId = stripeGatewayId.id || stripeGatewayId;
|
29
|
-
return this.resources.fetch({ type: 'stripe_payments' }, `stripe_gateways/${_stripeGatewayId}/stripe_payments`, params, options);
|
30
|
-
}
|
31
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
32
|
-
isStripeGateway(resource) {
|
33
|
-
return resource.type && (resource.type === StripeGateways.TYPE);
|
34
|
-
}
|
35
|
-
relationship(id) {
|
36
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: StripeGateways.TYPE } : { id: id.id, type: StripeGateways.TYPE };
|
37
|
-
}
|
38
|
-
type() {
|
39
|
-
return StripeGateways.TYPE;
|
40
|
-
}
|
41
|
-
}
|
42
|
-
StripeGateways.TYPE = 'stripe_gateways';
|
43
|
-
export default StripeGateways;
|
1
|
+
import{ApiResource as c}from"../resource";class t extends c{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}async payment_methods(e,s,r){const n=e.id||e;return this.resources.fetch({type:"payment_methods"},`stripe_gateways/${n}/payment_methods`,s,r)}async versions(e,s,r){const n=e.id||e;return this.resources.fetch({type:"versions"},`stripe_gateways/${n}/versions`,s,r)}async stripe_payments(e,s,r){const n=e.id||e;return this.resources.fetch({type:"stripe_payments"},`stripe_gateways/${n}/stripe_payments`,s,r)}isStripeGateway(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="stripe_gateways";export default t;
|
@@ -1,59 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Order } from './orders';
|
4
|
-
import type { PaymentGateway } from './payment_gateways';
|
5
|
-
import type { Version } from './versions';
|
6
|
-
type StripePaymentRel = ResourceRel & {
|
7
|
-
type: typeof StripePayments.TYPE;
|
8
|
-
};
|
9
|
-
type OrderRel = ResourceRel & {
|
10
|
-
type: 'orders';
|
11
|
-
};
|
12
|
-
interface StripePayment extends Resource {
|
13
|
-
stripe_id?: string;
|
14
|
-
client_secret?: string;
|
15
|
-
publishable_key?: string;
|
16
|
-
options?: object;
|
17
|
-
payment_method?: object;
|
18
|
-
mismatched_amounts?: boolean;
|
19
|
-
intent_amount_cents?: number;
|
20
|
-
intent_amount_float?: number;
|
21
|
-
formatted_intent_amount?: string;
|
22
|
-
return_url?: string;
|
23
|
-
receipt_email?: string;
|
24
|
-
payment_instrument?: object;
|
25
|
-
order?: Order;
|
26
|
-
payment_gateway?: PaymentGateway;
|
27
|
-
versions?: Version[];
|
28
|
-
}
|
29
|
-
interface StripePaymentCreate extends ResourceCreate {
|
30
|
-
stripe_id?: string;
|
31
|
-
client_secret?: string;
|
32
|
-
options?: object;
|
33
|
-
return_url?: string;
|
34
|
-
receipt_email?: string;
|
35
|
-
order: OrderRel;
|
36
|
-
}
|
37
|
-
interface StripePaymentUpdate extends ResourceUpdate {
|
38
|
-
options?: object;
|
39
|
-
return_url?: string;
|
40
|
-
_update?: boolean;
|
41
|
-
_refresh?: boolean;
|
42
|
-
order?: OrderRel;
|
43
|
-
}
|
44
|
-
declare class StripePayments extends ApiResource {
|
45
|
-
static readonly TYPE: 'stripe_payments';
|
46
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StripePayment>>;
|
47
|
-
create(resource: StripePaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
|
48
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
|
49
|
-
update(resource: StripePaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
|
50
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
51
|
-
order(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
52
|
-
payment_gateway(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
53
|
-
versions(stripePaymentId: string | StripePayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
54
|
-
isStripePayment(resource: any): resource is StripePayment;
|
55
|
-
relationship(id: string | ResourceId | null): StripePaymentRel;
|
56
|
-
type(): string;
|
57
|
-
}
|
58
|
-
export default StripePayments;
|
59
|
-
export { StripePayment, StripePaymentCreate, StripePaymentUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';import type{Version}from'./versions';type StripePaymentRel=ResourceRel&{type:typeof StripePayments.TYPE;};type OrderRel=ResourceRel&{type:'orders';};interface StripePayment extends Resource{stripe_id?:string;client_secret?:string;publishable_key?:string;options?:object;payment_method?:object;mismatched_amounts?:boolean;return_url?:string;receipt_email?:string;payment_instrument?:object;order?:Order;payment_gateway?:PaymentGateway;versions?:Version[];}interface StripePaymentCreate extends ResourceCreate{stripe_id?:string;client_secret?:string;options?:object;return_url?:string;receipt_email?:string;order:OrderRel;}interface StripePaymentUpdate extends ResourceUpdate{options?:object;return_url?:string;_update?:boolean;_refresh?:boolean;order?:OrderRel;}declare class StripePayments extends ApiResource{static readonly TYPE:'stripe_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StripePayment>>;create(resource:StripePaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripePayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripePayment>;update(resource:StripePaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripePayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(stripePaymentId:string|StripePayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(stripePaymentId:string|StripePayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;versions(stripePaymentId:string|StripePayment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isStripePayment(resource:any):resource is StripePayment;relationship(id:string|ResourceId|null):StripePaymentRel;type():string;}export default StripePayments;export{StripePayment,StripePaymentCreate,StripePaymentUpdate};
|