@commercelayer/sdk 6.0.0-alfa.8 → 6.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.mts +7644 -0
- package/lib/index.d.ts +7644 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +2 -0
- package/lib/index.mjs.map +1 -0
- package/package.json +9 -15
- package/lib/cjs/api.d.ts +0 -161
- package/lib/cjs/api.js +0 -377
- package/lib/cjs/client.d.ts +0 -31
- package/lib/cjs/client.js +0 -120
- package/lib/cjs/commercelayer.d.ts +0 -154
- package/lib/cjs/commercelayer.js +0 -365
- package/lib/cjs/common.d.ts +0 -5
- package/lib/cjs/common.js +0 -12
- package/lib/cjs/config.d.ts +0 -15
- package/lib/cjs/config.js +0 -17
- package/lib/cjs/debug.d.ts +0 -3
- package/lib/cjs/debug.js +0 -17
- package/lib/cjs/error.d.ts +0 -30
- package/lib/cjs/error.js +0 -78
- package/lib/cjs/fetch.d.ts +0 -13
- package/lib/cjs/fetch.js +0 -67
- package/lib/cjs/index.d.ts +0 -7
- package/lib/cjs/index.js +0 -11
- package/lib/cjs/interceptor.d.ts +0 -37
- package/lib/cjs/interceptor.js +0 -2
- package/lib/cjs/jsonapi.d.ts +0 -6
- package/lib/cjs/jsonapi.js +0 -92
- package/lib/cjs/model.d.ts +0 -121
- package/lib/cjs/model.js +0 -2
- package/lib/cjs/query.d.ts +0 -18
- package/lib/cjs/query.js +0 -70
- package/lib/cjs/resource.d.ts +0 -86
- package/lib/cjs/resource.js +0 -172
- package/lib/cjs/resources/addresses.d.ts +0 -104
- package/lib/cjs/resources/addresses.js +0 -44
- package/lib/cjs/resources/adjustments.d.ts +0 -43
- package/lib/cjs/resources/adjustments.js +0 -32
- package/lib/cjs/resources/adyen_gateways.d.ts +0 -61
- package/lib/cjs/resources/adyen_gateways.js +0 -40
- package/lib/cjs/resources/adyen_payments.d.ts +0 -52
- package/lib/cjs/resources/adyen_payments.js +0 -43
- package/lib/cjs/resources/application.d.ts +0 -23
- package/lib/cjs/resources/application.js +0 -19
- package/lib/cjs/resources/attachments.d.ts +0 -158
- package/lib/cjs/resources/attachments.js +0 -28
- package/lib/cjs/resources/authorizations.d.ts +0 -71
- package/lib/cjs/resources/authorizations.js +0 -55
- package/lib/cjs/resources/avalara_accounts.d.ts +0 -60
- package/lib/cjs/resources/avalara_accounts.js +0 -44
- package/lib/cjs/resources/axerve_gateways.d.ts +0 -49
- package/lib/cjs/resources/axerve_gateways.js +0 -40
- package/lib/cjs/resources/axerve_payments.d.ts +0 -58
- package/lib/cjs/resources/axerve_payments.js +0 -43
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +0 -40
- package/lib/cjs/resources/billing_info_validation_rules.js +0 -40
- package/lib/cjs/resources/bing_geocoders.d.ts +0 -37
- package/lib/cjs/resources/bing_geocoders.js +0 -36
- package/lib/cjs/resources/braintree_gateways.d.ts +0 -61
- package/lib/cjs/resources/braintree_gateways.js +0 -40
- package/lib/cjs/resources/braintree_payments.d.ts +0 -53
- package/lib/cjs/resources/braintree_payments.js +0 -40
- package/lib/cjs/resources/bundles.d.ts +0 -94
- package/lib/cjs/resources/bundles.js +0 -62
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +0 -138
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +0 -82
- package/lib/cjs/resources/captures.d.ts +0 -61
- package/lib/cjs/resources/captures.js +0 -52
- package/lib/cjs/resources/carrier_accounts.d.ts +0 -31
- package/lib/cjs/resources/carrier_accounts.js +0 -31
- package/lib/cjs/resources/checkout_com_gateways.d.ts +0 -50
- package/lib/cjs/resources/checkout_com_gateways.js +0 -40
- package/lib/cjs/resources/checkout_com_payments.d.ts +0 -66
- package/lib/cjs/resources/checkout_com_payments.js +0 -46
- package/lib/cjs/resources/cleanups.d.ts +0 -41
- package/lib/cjs/resources/cleanups.js +0 -33
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +0 -68
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +0 -36
- package/lib/cjs/resources/coupon_recipients.d.ts +0 -49
- package/lib/cjs/resources/coupon_recipients.js +0 -40
- package/lib/cjs/resources/coupons.d.ts +0 -72
- package/lib/cjs/resources/coupons.js +0 -48
- package/lib/cjs/resources/custom_promotion_rules.d.ts +0 -63
- package/lib/cjs/resources/custom_promotion_rules.js +0 -32
- package/lib/cjs/resources/customer_addresses.d.ts +0 -51
- package/lib/cjs/resources/customer_addresses.js +0 -44
- package/lib/cjs/resources/customer_groups.d.ts +0 -41
- package/lib/cjs/resources/customer_groups.js +0 -44
- package/lib/cjs/resources/customer_password_resets.d.ts +0 -39
- package/lib/cjs/resources/customer_password_resets.js +0 -39
- package/lib/cjs/resources/customer_payment_sources.d.ts +0 -87
- package/lib/cjs/resources/customer_payment_sources.js +0 -40
- package/lib/cjs/resources/customer_subscriptions.d.ts +0 -36
- package/lib/cjs/resources/customer_subscriptions.js +0 -40
- package/lib/cjs/resources/customers.d.ts +0 -77
- package/lib/cjs/resources/customers.js +0 -72
- package/lib/cjs/resources/delivery_lead_times.d.ts +0 -56
- package/lib/cjs/resources/delivery_lead_times.js +0 -44
- package/lib/cjs/resources/event_callbacks.d.ts +0 -26
- package/lib/cjs/resources/event_callbacks.js +0 -23
- package/lib/cjs/resources/events.d.ts +0 -26
- package/lib/cjs/resources/events.js +0 -27
- package/lib/cjs/resources/exports.d.ts +0 -42
- package/lib/cjs/resources/exports.js +0 -29
- package/lib/cjs/resources/external_gateways.d.ts +0 -58
- package/lib/cjs/resources/external_gateways.js +0 -43
- package/lib/cjs/resources/external_payments.d.ts +0 -49
- package/lib/cjs/resources/external_payments.js +0 -44
- package/lib/cjs/resources/external_promotions.d.ts +0 -137
- package/lib/cjs/resources/external_promotions.js +0 -85
- package/lib/cjs/resources/external_tax_calculators.d.ts +0 -46
- package/lib/cjs/resources/external_tax_calculators.js +0 -43
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +0 -134
- package/lib/cjs/resources/fixed_amount_promotions.js +0 -82
- package/lib/cjs/resources/fixed_price_promotions.d.ts +0 -134
- package/lib/cjs/resources/fixed_price_promotions.js +0 -82
- package/lib/cjs/resources/free_gift_promotions.d.ts +0 -132
- package/lib/cjs/resources/free_gift_promotions.js +0 -82
- package/lib/cjs/resources/free_shipping_promotions.d.ts +0 -126
- package/lib/cjs/resources/free_shipping_promotions.js +0 -78
- package/lib/cjs/resources/geocoders.d.ts +0 -26
- package/lib/cjs/resources/geocoders.js +0 -27
- package/lib/cjs/resources/gift_card_recipients.d.ts +0 -49
- package/lib/cjs/resources/gift_card_recipients.js +0 -40
- package/lib/cjs/resources/gift_cards.d.ts +0 -105
- package/lib/cjs/resources/gift_cards.js +0 -64
- package/lib/cjs/resources/google_geocoders.d.ts +0 -37
- package/lib/cjs/resources/google_geocoders.js +0 -36
- package/lib/cjs/resources/imports.d.ts +0 -45
- package/lib/cjs/resources/imports.js +0 -29
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +0 -69
- package/lib/cjs/resources/in_stock_subscriptions.js +0 -54
- package/lib/cjs/resources/inventory_models.d.ts +0 -56
- package/lib/cjs/resources/inventory_models.js +0 -44
- package/lib/cjs/resources/inventory_return_locations.d.ts +0 -48
- package/lib/cjs/resources/inventory_return_locations.js +0 -40
- package/lib/cjs/resources/inventory_stock_locations.d.ts +0 -51
- package/lib/cjs/resources/inventory_stock_locations.js +0 -40
- package/lib/cjs/resources/klarna_gateways.d.ts +0 -49
- package/lib/cjs/resources/klarna_gateways.js +0 -40
- package/lib/cjs/resources/klarna_payments.d.ts +0 -52
- package/lib/cjs/resources/klarna_payments.js +0 -43
- package/lib/cjs/resources/line_item_options.d.ts +0 -70
- package/lib/cjs/resources/line_item_options.js +0 -44
- package/lib/cjs/resources/line_items.d.ts +0 -171
- package/lib/cjs/resources/line_items.js +0 -69
- package/lib/cjs/resources/manual_gateways.d.ts +0 -35
- package/lib/cjs/resources/manual_gateways.js +0 -36
- package/lib/cjs/resources/manual_tax_calculators.d.ts +0 -46
- package/lib/cjs/resources/manual_tax_calculators.js +0 -44
- package/lib/cjs/resources/markets.d.ts +0 -108
- package/lib/cjs/resources/markets.js +0 -66
- package/lib/cjs/resources/merchants.d.ts +0 -43
- package/lib/cjs/resources/merchants.js +0 -40
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +0 -68
- package/lib/cjs/resources/order_amount_promotion_rules.js +0 -32
- package/lib/cjs/resources/order_copies.d.ts +0 -52
- package/lib/cjs/resources/order_copies.js +0 -44
- package/lib/cjs/resources/order_factories.d.ts +0 -35
- package/lib/cjs/resources/order_factories.js +0 -31
- package/lib/cjs/resources/order_subscription_items.d.ts +0 -69
- package/lib/cjs/resources/order_subscription_items.js +0 -36
- package/lib/cjs/resources/order_subscriptions.d.ts +0 -97
- package/lib/cjs/resources/order_subscriptions.js +0 -81
- package/lib/cjs/resources/order_validation_rules.d.ts +0 -28
- package/lib/cjs/resources/order_validation_rules.js +0 -31
- package/lib/cjs/resources/orders.d.ts +0 -390
- package/lib/cjs/resources/orders.js +0 -239
- package/lib/cjs/resources/organization.d.ts +0 -35
- package/lib/cjs/resources/organization.js +0 -19
- package/lib/cjs/resources/packages.d.ts +0 -61
- package/lib/cjs/resources/packages.js +0 -44
- package/lib/cjs/resources/parcel_line_items.d.ts +0 -48
- package/lib/cjs/resources/parcel_line_items.js +0 -40
- package/lib/cjs/resources/parcels.d.ts +0 -127
- package/lib/cjs/resources/parcels.js +0 -52
- package/lib/cjs/resources/payment_gateways.d.ts +0 -26
- package/lib/cjs/resources/payment_gateways.js +0 -27
- package/lib/cjs/resources/payment_methods.d.ts +0 -84
- package/lib/cjs/resources/payment_methods.js +0 -50
- package/lib/cjs/resources/payment_options.d.ts +0 -45
- package/lib/cjs/resources/payment_options.js +0 -36
- package/lib/cjs/resources/paypal_gateways.d.ts +0 -42
- package/lib/cjs/resources/paypal_gateways.js +0 -40
- package/lib/cjs/resources/paypal_payments.d.ts +0 -57
- package/lib/cjs/resources/paypal_payments.js +0 -40
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +0 -132
- package/lib/cjs/resources/percentage_discount_promotions.js +0 -82
- package/lib/cjs/resources/price_frequency_tiers.d.ts +0 -54
- package/lib/cjs/resources/price_frequency_tiers.js +0 -44
- package/lib/cjs/resources/price_lists.d.ts +0 -47
- package/lib/cjs/resources/price_lists.js +0 -40
- package/lib/cjs/resources/price_tiers.d.ts +0 -33
- package/lib/cjs/resources/price_tiers.js +0 -31
- package/lib/cjs/resources/price_volume_tiers.d.ts +0 -54
- package/lib/cjs/resources/price_volume_tiers.js +0 -44
- package/lib/cjs/resources/prices.d.ts +0 -76
- package/lib/cjs/resources/prices.js +0 -56
- package/lib/cjs/resources/promotion_rules.d.ts +0 -30
- package/lib/cjs/resources/promotion_rules.js +0 -23
- package/lib/cjs/resources/promotions.d.ts +0 -64
- package/lib/cjs/resources/promotions.js +0 -63
- package/lib/cjs/resources/recurring_order_copies.d.ts +0 -54
- package/lib/cjs/resources/recurring_order_copies.js +0 -44
- package/lib/cjs/resources/refunds.d.ts +0 -45
- package/lib/cjs/resources/refunds.js +0 -39
- package/lib/cjs/resources/reserved_stocks.d.ts +0 -29
- package/lib/cjs/resources/reserved_stocks.js +0 -31
- package/lib/cjs/resources/resource_errors.d.ts +0 -23
- package/lib/cjs/resources/resource_errors.js +0 -19
- package/lib/cjs/resources/return_line_items.d.ts +0 -53
- package/lib/cjs/resources/return_line_items.js +0 -39
- package/lib/cjs/resources/returns.d.ts +0 -97
- package/lib/cjs/resources/returns.js +0 -95
- package/lib/cjs/resources/satispay_gateways.d.ts +0 -47
- package/lib/cjs/resources/satispay_gateways.js +0 -40
- package/lib/cjs/resources/satispay_payments.d.ts +0 -54
- package/lib/cjs/resources/satispay_payments.js +0 -43
- package/lib/cjs/resources/shipments.d.ts +0 -152
- package/lib/cjs/resources/shipments.js +0 -133
- package/lib/cjs/resources/shipping_categories.d.ts +0 -41
- package/lib/cjs/resources/shipping_categories.js +0 -40
- package/lib/cjs/resources/shipping_method_tiers.d.ts +0 -33
- package/lib/cjs/resources/shipping_method_tiers.js +0 -31
- package/lib/cjs/resources/shipping_methods.d.ts +0 -126
- package/lib/cjs/resources/shipping_methods.js +0 -73
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +0 -51
- package/lib/cjs/resources/shipping_weight_tiers.js +0 -40
- package/lib/cjs/resources/shipping_zones.d.ts +0 -53
- package/lib/cjs/resources/shipping_zones.js +0 -36
- package/lib/cjs/resources/sku_list_items.d.ts +0 -52
- package/lib/cjs/resources/sku_list_items.js +0 -40
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +0 -77
- package/lib/cjs/resources/sku_list_promotion_rules.js +0 -40
- package/lib/cjs/resources/sku_lists.d.ts +0 -65
- package/lib/cjs/resources/sku_lists.js +0 -52
- package/lib/cjs/resources/sku_options.d.ts +0 -72
- package/lib/cjs/resources/sku_options.js +0 -48
- package/lib/cjs/resources/skus.d.ts +0 -97
- package/lib/cjs/resources/skus.js +0 -68
- package/lib/cjs/resources/stock_items.d.ts +0 -60
- package/lib/cjs/resources/stock_items.js +0 -52
- package/lib/cjs/resources/stock_line_items.d.ts +0 -74
- package/lib/cjs/resources/stock_line_items.js +0 -57
- package/lib/cjs/resources/stock_locations.d.ts +0 -65
- package/lib/cjs/resources/stock_locations.js +0 -56
- package/lib/cjs/resources/stock_reservations.d.ts +0 -52
- package/lib/cjs/resources/stock_reservations.js +0 -51
- package/lib/cjs/resources/stock_transfers.d.ts +0 -87
- package/lib/cjs/resources/stock_transfers.js +0 -74
- package/lib/cjs/resources/stripe_gateways.d.ts +0 -46
- package/lib/cjs/resources/stripe_gateways.js +0 -40
- package/lib/cjs/resources/stripe_payments.d.ts +0 -63
- package/lib/cjs/resources/stripe_payments.js +0 -46
- package/lib/cjs/resources/subscription_models.d.ts +0 -50
- package/lib/cjs/resources/subscription_models.js +0 -40
- package/lib/cjs/resources/tags.d.ts +0 -29
- package/lib/cjs/resources/tags.js +0 -28
- package/lib/cjs/resources/tax_calculators.d.ts +0 -29
- package/lib/cjs/resources/tax_calculators.js +0 -31
- package/lib/cjs/resources/tax_categories.d.ts +0 -64
- package/lib/cjs/resources/tax_categories.js +0 -40
- package/lib/cjs/resources/tax_rules.d.ts +0 -74
- package/lib/cjs/resources/tax_rules.js +0 -36
- package/lib/cjs/resources/taxjar_accounts.d.ts +0 -48
- package/lib/cjs/resources/taxjar_accounts.js +0 -44
- package/lib/cjs/resources/transactions.d.ts +0 -42
- package/lib/cjs/resources/transactions.js +0 -35
- package/lib/cjs/resources/versions.d.ts +0 -23
- package/lib/cjs/resources/versions.js +0 -19
- package/lib/cjs/resources/voids.d.ts +0 -45
- package/lib/cjs/resources/voids.js +0 -39
- package/lib/cjs/resources/webhooks.d.ts +0 -56
- package/lib/cjs/resources/webhooks.js +0 -45
- package/lib/cjs/resources/wire_transfers.d.ts +0 -38
- package/lib/cjs/resources/wire_transfers.js +0 -36
- package/lib/cjs/static.d.ts +0 -12
- package/lib/cjs/static.js +0 -50
- package/lib/cjs/util.d.ts +0 -9
- package/lib/cjs/util.js +0 -15
- package/lib/esm/api.d.ts +0 -161
- package/lib/esm/api.js +0 -248
- package/lib/esm/client.d.ts +0 -31
- package/lib/esm/client.js +0 -102
- package/lib/esm/commercelayer.d.ts +0 -154
- package/lib/esm/commercelayer.js +0 -323
- package/lib/esm/common.d.ts +0 -5
- package/lib/esm/common.js +0 -8
- package/lib/esm/config.d.ts +0 -15
- package/lib/esm/config.js +0 -15
- package/lib/esm/debug.d.ts +0 -3
- package/lib/esm/debug.js +0 -15
- package/lib/esm/error.d.ts +0 -30
- package/lib/esm/error.js +0 -78
- package/lib/esm/fetch.d.ts +0 -13
- package/lib/esm/fetch.js +0 -46
- package/lib/esm/index.d.ts +0 -7
- package/lib/esm/index.js +0 -2
- package/lib/esm/interceptor.d.ts +0 -37
- package/lib/esm/interceptor.js +0 -1
- package/lib/esm/jsonapi.d.ts +0 -6
- package/lib/esm/jsonapi.js +0 -85
- package/lib/esm/model.d.ts +0 -121
- package/lib/esm/model.js +0 -1
- package/lib/esm/query.d.ts +0 -18
- package/lib/esm/query.js +0 -62
- package/lib/esm/resource.d.ts +0 -86
- package/lib/esm/resource.js +0 -155
- package/lib/esm/resources/addresses.d.ts +0 -104
- package/lib/esm/resources/addresses.js +0 -42
- package/lib/esm/resources/adjustments.d.ts +0 -43
- package/lib/esm/resources/adjustments.js +0 -30
- package/lib/esm/resources/adyen_gateways.d.ts +0 -61
- package/lib/esm/resources/adyen_gateways.js +0 -38
- package/lib/esm/resources/adyen_payments.d.ts +0 -52
- package/lib/esm/resources/adyen_payments.js +0 -41
- package/lib/esm/resources/application.d.ts +0 -23
- package/lib/esm/resources/application.js +0 -17
- package/lib/esm/resources/attachments.d.ts +0 -158
- package/lib/esm/resources/attachments.js +0 -26
- package/lib/esm/resources/authorizations.d.ts +0 -71
- package/lib/esm/resources/authorizations.js +0 -53
- package/lib/esm/resources/avalara_accounts.d.ts +0 -60
- package/lib/esm/resources/avalara_accounts.js +0 -42
- package/lib/esm/resources/axerve_gateways.d.ts +0 -49
- package/lib/esm/resources/axerve_gateways.js +0 -38
- package/lib/esm/resources/axerve_payments.d.ts +0 -58
- package/lib/esm/resources/axerve_payments.js +0 -41
- package/lib/esm/resources/billing_info_validation_rules.d.ts +0 -40
- package/lib/esm/resources/billing_info_validation_rules.js +0 -38
- package/lib/esm/resources/bing_geocoders.d.ts +0 -37
- package/lib/esm/resources/bing_geocoders.js +0 -34
- package/lib/esm/resources/braintree_gateways.d.ts +0 -61
- package/lib/esm/resources/braintree_gateways.js +0 -38
- package/lib/esm/resources/braintree_payments.d.ts +0 -53
- package/lib/esm/resources/braintree_payments.js +0 -38
- package/lib/esm/resources/bundles.d.ts +0 -94
- package/lib/esm/resources/bundles.js +0 -60
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +0 -138
- package/lib/esm/resources/buy_x_pay_y_promotions.js +0 -80
- package/lib/esm/resources/captures.d.ts +0 -61
- package/lib/esm/resources/captures.js +0 -50
- package/lib/esm/resources/carrier_accounts.d.ts +0 -31
- package/lib/esm/resources/carrier_accounts.js +0 -29
- package/lib/esm/resources/checkout_com_gateways.d.ts +0 -50
- package/lib/esm/resources/checkout_com_gateways.js +0 -38
- package/lib/esm/resources/checkout_com_payments.d.ts +0 -66
- package/lib/esm/resources/checkout_com_payments.js +0 -44
- package/lib/esm/resources/cleanups.d.ts +0 -41
- package/lib/esm/resources/cleanups.js +0 -31
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +0 -68
- package/lib/esm/resources/coupon_codes_promotion_rules.js +0 -34
- package/lib/esm/resources/coupon_recipients.d.ts +0 -49
- package/lib/esm/resources/coupon_recipients.js +0 -38
- package/lib/esm/resources/coupons.d.ts +0 -72
- package/lib/esm/resources/coupons.js +0 -46
- package/lib/esm/resources/custom_promotion_rules.d.ts +0 -63
- package/lib/esm/resources/custom_promotion_rules.js +0 -30
- package/lib/esm/resources/customer_addresses.d.ts +0 -51
- package/lib/esm/resources/customer_addresses.js +0 -42
- package/lib/esm/resources/customer_groups.d.ts +0 -41
- package/lib/esm/resources/customer_groups.js +0 -42
- package/lib/esm/resources/customer_password_resets.d.ts +0 -39
- package/lib/esm/resources/customer_password_resets.js +0 -37
- package/lib/esm/resources/customer_payment_sources.d.ts +0 -87
- package/lib/esm/resources/customer_payment_sources.js +0 -38
- package/lib/esm/resources/customer_subscriptions.d.ts +0 -36
- package/lib/esm/resources/customer_subscriptions.js +0 -38
- package/lib/esm/resources/customers.d.ts +0 -77
- package/lib/esm/resources/customers.js +0 -70
- package/lib/esm/resources/delivery_lead_times.d.ts +0 -56
- package/lib/esm/resources/delivery_lead_times.js +0 -42
- package/lib/esm/resources/event_callbacks.d.ts +0 -26
- package/lib/esm/resources/event_callbacks.js +0 -21
- package/lib/esm/resources/events.d.ts +0 -26
- package/lib/esm/resources/events.js +0 -25
- package/lib/esm/resources/exports.d.ts +0 -42
- package/lib/esm/resources/exports.js +0 -27
- package/lib/esm/resources/external_gateways.d.ts +0 -58
- package/lib/esm/resources/external_gateways.js +0 -41
- package/lib/esm/resources/external_payments.d.ts +0 -49
- package/lib/esm/resources/external_payments.js +0 -42
- package/lib/esm/resources/external_promotions.d.ts +0 -137
- package/lib/esm/resources/external_promotions.js +0 -83
- package/lib/esm/resources/external_tax_calculators.d.ts +0 -46
- package/lib/esm/resources/external_tax_calculators.js +0 -41
- package/lib/esm/resources/fixed_amount_promotions.d.ts +0 -134
- package/lib/esm/resources/fixed_amount_promotions.js +0 -80
- package/lib/esm/resources/fixed_price_promotions.d.ts +0 -134
- package/lib/esm/resources/fixed_price_promotions.js +0 -80
- package/lib/esm/resources/free_gift_promotions.d.ts +0 -132
- package/lib/esm/resources/free_gift_promotions.js +0 -80
- package/lib/esm/resources/free_shipping_promotions.d.ts +0 -126
- package/lib/esm/resources/free_shipping_promotions.js +0 -76
- package/lib/esm/resources/geocoders.d.ts +0 -26
- package/lib/esm/resources/geocoders.js +0 -25
- package/lib/esm/resources/gift_card_recipients.d.ts +0 -49
- package/lib/esm/resources/gift_card_recipients.js +0 -38
- package/lib/esm/resources/gift_cards.d.ts +0 -105
- package/lib/esm/resources/gift_cards.js +0 -62
- package/lib/esm/resources/google_geocoders.d.ts +0 -37
- package/lib/esm/resources/google_geocoders.js +0 -34
- package/lib/esm/resources/imports.d.ts +0 -45
- package/lib/esm/resources/imports.js +0 -27
- package/lib/esm/resources/in_stock_subscriptions.d.ts +0 -69
- package/lib/esm/resources/in_stock_subscriptions.js +0 -52
- package/lib/esm/resources/inventory_models.d.ts +0 -56
- package/lib/esm/resources/inventory_models.js +0 -42
- package/lib/esm/resources/inventory_return_locations.d.ts +0 -48
- package/lib/esm/resources/inventory_return_locations.js +0 -38
- package/lib/esm/resources/inventory_stock_locations.d.ts +0 -51
- package/lib/esm/resources/inventory_stock_locations.js +0 -38
- package/lib/esm/resources/klarna_gateways.d.ts +0 -49
- package/lib/esm/resources/klarna_gateways.js +0 -38
- package/lib/esm/resources/klarna_payments.d.ts +0 -52
- package/lib/esm/resources/klarna_payments.js +0 -41
- package/lib/esm/resources/line_item_options.d.ts +0 -70
- package/lib/esm/resources/line_item_options.js +0 -42
- package/lib/esm/resources/line_items.d.ts +0 -171
- package/lib/esm/resources/line_items.js +0 -67
- package/lib/esm/resources/manual_gateways.d.ts +0 -35
- package/lib/esm/resources/manual_gateways.js +0 -34
- package/lib/esm/resources/manual_tax_calculators.d.ts +0 -46
- package/lib/esm/resources/manual_tax_calculators.js +0 -42
- package/lib/esm/resources/markets.d.ts +0 -108
- package/lib/esm/resources/markets.js +0 -64
- package/lib/esm/resources/merchants.d.ts +0 -43
- package/lib/esm/resources/merchants.js +0 -38
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +0 -68
- package/lib/esm/resources/order_amount_promotion_rules.js +0 -30
- package/lib/esm/resources/order_copies.d.ts +0 -52
- package/lib/esm/resources/order_copies.js +0 -42
- package/lib/esm/resources/order_factories.d.ts +0 -35
- package/lib/esm/resources/order_factories.js +0 -29
- package/lib/esm/resources/order_subscription_items.d.ts +0 -69
- package/lib/esm/resources/order_subscription_items.js +0 -34
- package/lib/esm/resources/order_subscriptions.d.ts +0 -97
- package/lib/esm/resources/order_subscriptions.js +0 -79
- package/lib/esm/resources/order_validation_rules.d.ts +0 -28
- package/lib/esm/resources/order_validation_rules.js +0 -29
- package/lib/esm/resources/orders.d.ts +0 -390
- package/lib/esm/resources/orders.js +0 -237
- package/lib/esm/resources/organization.d.ts +0 -35
- package/lib/esm/resources/organization.js +0 -17
- package/lib/esm/resources/packages.d.ts +0 -61
- package/lib/esm/resources/packages.js +0 -42
- package/lib/esm/resources/parcel_line_items.d.ts +0 -48
- package/lib/esm/resources/parcel_line_items.js +0 -38
- package/lib/esm/resources/parcels.d.ts +0 -127
- package/lib/esm/resources/parcels.js +0 -50
- package/lib/esm/resources/payment_gateways.d.ts +0 -26
- package/lib/esm/resources/payment_gateways.js +0 -25
- package/lib/esm/resources/payment_methods.d.ts +0 -84
- package/lib/esm/resources/payment_methods.js +0 -48
- package/lib/esm/resources/payment_options.d.ts +0 -45
- package/lib/esm/resources/payment_options.js +0 -34
- package/lib/esm/resources/paypal_gateways.d.ts +0 -42
- package/lib/esm/resources/paypal_gateways.js +0 -38
- package/lib/esm/resources/paypal_payments.d.ts +0 -57
- package/lib/esm/resources/paypal_payments.js +0 -38
- package/lib/esm/resources/percentage_discount_promotions.d.ts +0 -132
- package/lib/esm/resources/percentage_discount_promotions.js +0 -80
- package/lib/esm/resources/price_frequency_tiers.d.ts +0 -54
- package/lib/esm/resources/price_frequency_tiers.js +0 -42
- package/lib/esm/resources/price_lists.d.ts +0 -47
- package/lib/esm/resources/price_lists.js +0 -38
- package/lib/esm/resources/price_tiers.d.ts +0 -33
- package/lib/esm/resources/price_tiers.js +0 -29
- package/lib/esm/resources/price_volume_tiers.d.ts +0 -54
- package/lib/esm/resources/price_volume_tiers.js +0 -42
- package/lib/esm/resources/prices.d.ts +0 -76
- package/lib/esm/resources/prices.js +0 -54
- package/lib/esm/resources/promotion_rules.d.ts +0 -30
- package/lib/esm/resources/promotion_rules.js +0 -21
- package/lib/esm/resources/promotions.d.ts +0 -64
- package/lib/esm/resources/promotions.js +0 -61
- package/lib/esm/resources/recurring_order_copies.d.ts +0 -54
- package/lib/esm/resources/recurring_order_copies.js +0 -42
- package/lib/esm/resources/refunds.d.ts +0 -45
- package/lib/esm/resources/refunds.js +0 -37
- package/lib/esm/resources/reserved_stocks.d.ts +0 -29
- package/lib/esm/resources/reserved_stocks.js +0 -29
- package/lib/esm/resources/resource_errors.d.ts +0 -23
- package/lib/esm/resources/resource_errors.js +0 -17
- package/lib/esm/resources/return_line_items.d.ts +0 -53
- package/lib/esm/resources/return_line_items.js +0 -37
- package/lib/esm/resources/returns.d.ts +0 -97
- package/lib/esm/resources/returns.js +0 -93
- package/lib/esm/resources/satispay_gateways.d.ts +0 -47
- package/lib/esm/resources/satispay_gateways.js +0 -38
- package/lib/esm/resources/satispay_payments.d.ts +0 -54
- package/lib/esm/resources/satispay_payments.js +0 -41
- package/lib/esm/resources/shipments.d.ts +0 -152
- package/lib/esm/resources/shipments.js +0 -131
- package/lib/esm/resources/shipping_categories.d.ts +0 -41
- package/lib/esm/resources/shipping_categories.js +0 -38
- package/lib/esm/resources/shipping_method_tiers.d.ts +0 -33
- package/lib/esm/resources/shipping_method_tiers.js +0 -29
- package/lib/esm/resources/shipping_methods.d.ts +0 -126
- package/lib/esm/resources/shipping_methods.js +0 -71
- package/lib/esm/resources/shipping_weight_tiers.d.ts +0 -51
- package/lib/esm/resources/shipping_weight_tiers.js +0 -38
- package/lib/esm/resources/shipping_zones.d.ts +0 -53
- package/lib/esm/resources/shipping_zones.js +0 -34
- package/lib/esm/resources/sku_list_items.d.ts +0 -52
- package/lib/esm/resources/sku_list_items.js +0 -38
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +0 -77
- package/lib/esm/resources/sku_list_promotion_rules.js +0 -38
- package/lib/esm/resources/sku_lists.d.ts +0 -65
- package/lib/esm/resources/sku_lists.js +0 -50
- package/lib/esm/resources/sku_options.d.ts +0 -72
- package/lib/esm/resources/sku_options.js +0 -46
- package/lib/esm/resources/skus.d.ts +0 -97
- package/lib/esm/resources/skus.js +0 -66
- package/lib/esm/resources/stock_items.d.ts +0 -60
- package/lib/esm/resources/stock_items.js +0 -50
- package/lib/esm/resources/stock_line_items.d.ts +0 -74
- package/lib/esm/resources/stock_line_items.js +0 -55
- package/lib/esm/resources/stock_locations.d.ts +0 -65
- package/lib/esm/resources/stock_locations.js +0 -54
- package/lib/esm/resources/stock_reservations.d.ts +0 -52
- package/lib/esm/resources/stock_reservations.js +0 -49
- package/lib/esm/resources/stock_transfers.d.ts +0 -87
- package/lib/esm/resources/stock_transfers.js +0 -72
- package/lib/esm/resources/stripe_gateways.d.ts +0 -46
- package/lib/esm/resources/stripe_gateways.js +0 -38
- package/lib/esm/resources/stripe_payments.d.ts +0 -63
- package/lib/esm/resources/stripe_payments.js +0 -44
- package/lib/esm/resources/subscription_models.d.ts +0 -50
- package/lib/esm/resources/subscription_models.js +0 -38
- package/lib/esm/resources/tags.d.ts +0 -29
- package/lib/esm/resources/tags.js +0 -26
- package/lib/esm/resources/tax_calculators.d.ts +0 -29
- package/lib/esm/resources/tax_calculators.js +0 -29
- package/lib/esm/resources/tax_categories.d.ts +0 -64
- package/lib/esm/resources/tax_categories.js +0 -38
- package/lib/esm/resources/tax_rules.d.ts +0 -74
- package/lib/esm/resources/tax_rules.js +0 -34
- package/lib/esm/resources/taxjar_accounts.d.ts +0 -48
- package/lib/esm/resources/taxjar_accounts.js +0 -42
- package/lib/esm/resources/transactions.d.ts +0 -42
- package/lib/esm/resources/transactions.js +0 -33
- package/lib/esm/resources/versions.d.ts +0 -23
- package/lib/esm/resources/versions.js +0 -17
- package/lib/esm/resources/voids.d.ts +0 -45
- package/lib/esm/resources/voids.js +0 -37
- package/lib/esm/resources/webhooks.d.ts +0 -56
- package/lib/esm/resources/webhooks.js +0 -43
- package/lib/esm/resources/wire_transfers.d.ts +0 -38
- package/lib/esm/resources/wire_transfers.js +0 -34
- package/lib/esm/static.d.ts +0 -12
- package/lib/esm/static.js +0 -24
- package/lib/esm/util.d.ts +0 -9
- package/lib/esm/util.js +0 -11
- package/lib/tsconfig.esm.tsbuildinfo +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
@@ -1,33 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { ShippingMethod } from './shipping_methods';
|
5
|
-
import type { Attachment } from './attachments';
|
6
|
-
import type { Version } from './versions';
|
7
|
-
type ShippingMethodTierType = 'shipping_method_tiers';
|
8
|
-
type ShippingMethodTierRel = ResourceRel & {
|
9
|
-
type: ShippingMethodTierType;
|
10
|
-
};
|
11
|
-
interface ShippingMethodTier extends Resource {
|
12
|
-
readonly type: ShippingMethodTierType;
|
13
|
-
name: string;
|
14
|
-
up_to?: number | null;
|
15
|
-
price_amount_cents: number;
|
16
|
-
price_amount_float?: number | null;
|
17
|
-
formatted_price_amount?: string | null;
|
18
|
-
shipping_method?: ShippingMethod | null;
|
19
|
-
attachments?: Attachment[] | null;
|
20
|
-
versions?: Version[] | null;
|
21
|
-
}
|
22
|
-
declare class ShippingMethodTiers extends ApiResource<ShippingMethodTier> {
|
23
|
-
static readonly TYPE: ShippingMethodTierType;
|
24
|
-
shipping_method(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
25
|
-
attachments(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
26
|
-
versions(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
27
|
-
isShippingMethodTier(resource: any): resource is ShippingMethodTier;
|
28
|
-
relationship(id: string | ResourceId | null): ShippingMethodTierRel;
|
29
|
-
relationshipToMany(...ids: string[]): ShippingMethodTierRel[];
|
30
|
-
type(): ShippingMethodTierType;
|
31
|
-
}
|
32
|
-
export default ShippingMethodTiers;
|
33
|
-
export type { ShippingMethodTier, ShippingMethodTierType };
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
class ShippingMethodTiers extends ApiResource {
|
3
|
-
static TYPE = 'shipping_method_tiers';
|
4
|
-
async shipping_method(shippingMethodTierId, params, options) {
|
5
|
-
const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
|
6
|
-
return this.resources.fetch({ type: 'shipping_methods' }, `shipping_method_tiers/${_shippingMethodTierId}/shipping_method`, params, options);
|
7
|
-
}
|
8
|
-
async attachments(shippingMethodTierId, params, options) {
|
9
|
-
const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
|
10
|
-
return this.resources.fetch({ type: 'attachments' }, `shipping_method_tiers/${_shippingMethodTierId}/attachments`, params, options);
|
11
|
-
}
|
12
|
-
async versions(shippingMethodTierId, params, options) {
|
13
|
-
const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
|
14
|
-
return this.resources.fetch({ type: 'versions' }, `shipping_method_tiers/${_shippingMethodTierId}/versions`, params, options);
|
15
|
-
}
|
16
|
-
isShippingMethodTier(resource) {
|
17
|
-
return resource.type && (resource.type === ShippingMethodTiers.TYPE);
|
18
|
-
}
|
19
|
-
relationship(id) {
|
20
|
-
return super.relationshipOneToOne(id);
|
21
|
-
}
|
22
|
-
relationshipToMany(...ids) {
|
23
|
-
return super.relationshipOneToMany(...ids);
|
24
|
-
}
|
25
|
-
type() {
|
26
|
-
return ShippingMethodTiers.TYPE;
|
27
|
-
}
|
28
|
-
}
|
29
|
-
export default ShippingMethodTiers;
|
@@ -1,126 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { Market, MarketType } from './markets';
|
5
|
-
import type { ShippingZone, ShippingZoneType } from './shipping_zones';
|
6
|
-
import type { ShippingCategory, ShippingCategoryType } from './shipping_categories';
|
7
|
-
import type { StockLocation, StockLocationType } from './stock_locations';
|
8
|
-
import type { DeliveryLeadTime } from './delivery_lead_times';
|
9
|
-
import type { ShippingMethodTier, ShippingMethodTierType } from './shipping_method_tiers';
|
10
|
-
import type { ShippingWeightTier } from './shipping_weight_tiers';
|
11
|
-
import type { Attachment } from './attachments';
|
12
|
-
import type { Version } from './versions';
|
13
|
-
type ShippingMethodType = 'shipping_methods';
|
14
|
-
type ShippingMethodRel = ResourceRel & {
|
15
|
-
type: ShippingMethodType;
|
16
|
-
};
|
17
|
-
type MarketRel = ResourceRel & {
|
18
|
-
type: MarketType;
|
19
|
-
};
|
20
|
-
type ShippingZoneRel = ResourceRel & {
|
21
|
-
type: ShippingZoneType;
|
22
|
-
};
|
23
|
-
type ShippingCategoryRel = ResourceRel & {
|
24
|
-
type: ShippingCategoryType;
|
25
|
-
};
|
26
|
-
type StockLocationRel = ResourceRel & {
|
27
|
-
type: StockLocationType;
|
28
|
-
};
|
29
|
-
type ShippingMethodTierRel = ResourceRel & {
|
30
|
-
type: ShippingMethodTierType;
|
31
|
-
};
|
32
|
-
interface ShippingMethod extends Resource {
|
33
|
-
readonly type: ShippingMethodType;
|
34
|
-
name: string;
|
35
|
-
scheme?: string | null;
|
36
|
-
currency_code?: string | null;
|
37
|
-
external_prices_url?: string | null;
|
38
|
-
price_amount_cents: number;
|
39
|
-
price_amount_float?: number | null;
|
40
|
-
formatted_price_amount?: string | null;
|
41
|
-
free_over_amount_cents?: number | null;
|
42
|
-
free_over_amount_float?: number | null;
|
43
|
-
formatted_free_over_amount?: string | null;
|
44
|
-
use_subtotal?: boolean | null;
|
45
|
-
price_amount_for_shipment_cents?: number | null;
|
46
|
-
price_amount_for_shipment_float?: number | null;
|
47
|
-
formatted_price_amount_for_shipment?: string | null;
|
48
|
-
min_weight?: number | null;
|
49
|
-
max_weight?: number | null;
|
50
|
-
unit_of_weight?: string | null;
|
51
|
-
disabled_at?: string | null;
|
52
|
-
circuit_state?: string | null;
|
53
|
-
circuit_failure_count?: number | null;
|
54
|
-
market?: Market | null;
|
55
|
-
shipping_zone?: ShippingZone | null;
|
56
|
-
shipping_category?: ShippingCategory | null;
|
57
|
-
stock_location?: StockLocation | null;
|
58
|
-
delivery_lead_time_for_shipment?: DeliveryLeadTime | null;
|
59
|
-
shipping_method_tiers?: ShippingMethodTier[] | null;
|
60
|
-
shipping_weight_tiers?: ShippingWeightTier[] | null;
|
61
|
-
attachments?: Attachment[] | null;
|
62
|
-
versions?: Version[] | null;
|
63
|
-
}
|
64
|
-
interface ShippingMethodCreate extends ResourceCreate {
|
65
|
-
name: string;
|
66
|
-
scheme?: string | null;
|
67
|
-
currency_code?: string | null;
|
68
|
-
external_prices_url?: string | null;
|
69
|
-
price_amount_cents: number;
|
70
|
-
free_over_amount_cents?: number | null;
|
71
|
-
use_subtotal?: boolean | null;
|
72
|
-
min_weight?: number | null;
|
73
|
-
max_weight?: number | null;
|
74
|
-
unit_of_weight?: string | null;
|
75
|
-
_disable?: boolean | null;
|
76
|
-
_enable?: boolean | null;
|
77
|
-
market?: MarketRel | null;
|
78
|
-
shipping_zone?: ShippingZoneRel | null;
|
79
|
-
shipping_category?: ShippingCategoryRel | null;
|
80
|
-
stock_location?: StockLocationRel | null;
|
81
|
-
shipping_method_tiers?: ShippingMethodTierRel[] | null;
|
82
|
-
}
|
83
|
-
interface ShippingMethodUpdate extends ResourceUpdate {
|
84
|
-
name?: string | null;
|
85
|
-
scheme?: string | null;
|
86
|
-
currency_code?: string | null;
|
87
|
-
external_prices_url?: string | null;
|
88
|
-
price_amount_cents?: number | null;
|
89
|
-
free_over_amount_cents?: number | null;
|
90
|
-
use_subtotal?: boolean | null;
|
91
|
-
min_weight?: number | null;
|
92
|
-
max_weight?: number | null;
|
93
|
-
unit_of_weight?: string | null;
|
94
|
-
_disable?: boolean | null;
|
95
|
-
_enable?: boolean | null;
|
96
|
-
_reset_circuit?: boolean | null;
|
97
|
-
market?: MarketRel | null;
|
98
|
-
shipping_zone?: ShippingZoneRel | null;
|
99
|
-
shipping_category?: ShippingCategoryRel | null;
|
100
|
-
stock_location?: StockLocationRel | null;
|
101
|
-
shipping_method_tiers?: ShippingMethodTierRel[] | null;
|
102
|
-
}
|
103
|
-
declare class ShippingMethods extends ApiResource<ShippingMethod> {
|
104
|
-
static readonly TYPE: ShippingMethodType;
|
105
|
-
create(resource: ShippingMethodCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
106
|
-
update(resource: ShippingMethodUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
107
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
108
|
-
market(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
109
|
-
shipping_zone(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
|
110
|
-
shipping_category(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
|
111
|
-
stock_location(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
112
|
-
delivery_lead_time_for_shipment(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
|
113
|
-
shipping_method_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingMethodTier>>;
|
114
|
-
shipping_weight_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingWeightTier>>;
|
115
|
-
attachments(shippingMethodId: string | ShippingMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
116
|
-
versions(shippingMethodId: string | ShippingMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
117
|
-
_disable(id: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
118
|
-
_enable(id: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
119
|
-
_reset_circuit(id: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
120
|
-
isShippingMethod(resource: any): resource is ShippingMethod;
|
121
|
-
relationship(id: string | ResourceId | null): ShippingMethodRel;
|
122
|
-
relationshipToMany(...ids: string[]): ShippingMethodRel[];
|
123
|
-
type(): ShippingMethodType;
|
124
|
-
}
|
125
|
-
export default ShippingMethods;
|
126
|
-
export type { ShippingMethod, ShippingMethodCreate, ShippingMethodUpdate, ShippingMethodType };
|
@@ -1,71 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
class ShippingMethods extends ApiResource {
|
3
|
-
static TYPE = 'shipping_methods';
|
4
|
-
async create(resource, params, options) {
|
5
|
-
return this.resources.create({ ...resource, type: ShippingMethods.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async update(resource, params, options) {
|
8
|
-
return this.resources.update({ ...resource, type: ShippingMethods.TYPE }, params, options);
|
9
|
-
}
|
10
|
-
async delete(id, options) {
|
11
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: ShippingMethods.TYPE } : id, options);
|
12
|
-
}
|
13
|
-
async market(shippingMethodId, params, options) {
|
14
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
15
|
-
return this.resources.fetch({ type: 'markets' }, `shipping_methods/${_shippingMethodId}/market`, params, options);
|
16
|
-
}
|
17
|
-
async shipping_zone(shippingMethodId, params, options) {
|
18
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
19
|
-
return this.resources.fetch({ type: 'shipping_zones' }, `shipping_methods/${_shippingMethodId}/shipping_zone`, params, options);
|
20
|
-
}
|
21
|
-
async shipping_category(shippingMethodId, params, options) {
|
22
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
23
|
-
return this.resources.fetch({ type: 'shipping_categories' }, `shipping_methods/${_shippingMethodId}/shipping_category`, params, options);
|
24
|
-
}
|
25
|
-
async stock_location(shippingMethodId, params, options) {
|
26
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
27
|
-
return this.resources.fetch({ type: 'stock_locations' }, `shipping_methods/${_shippingMethodId}/stock_location`, params, options);
|
28
|
-
}
|
29
|
-
async delivery_lead_time_for_shipment(shippingMethodId, params, options) {
|
30
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
31
|
-
return this.resources.fetch({ type: 'delivery_lead_times' }, `shipping_methods/${_shippingMethodId}/delivery_lead_time_for_shipment`, params, options);
|
32
|
-
}
|
33
|
-
async shipping_method_tiers(shippingMethodId, params, options) {
|
34
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
35
|
-
return this.resources.fetch({ type: 'shipping_method_tiers' }, `shipping_methods/${_shippingMethodId}/shipping_method_tiers`, params, options);
|
36
|
-
}
|
37
|
-
async shipping_weight_tiers(shippingMethodId, params, options) {
|
38
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
39
|
-
return this.resources.fetch({ type: 'shipping_weight_tiers' }, `shipping_methods/${_shippingMethodId}/shipping_weight_tiers`, params, options);
|
40
|
-
}
|
41
|
-
async attachments(shippingMethodId, params, options) {
|
42
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
43
|
-
return this.resources.fetch({ type: 'attachments' }, `shipping_methods/${_shippingMethodId}/attachments`, params, options);
|
44
|
-
}
|
45
|
-
async versions(shippingMethodId, params, options) {
|
46
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
47
|
-
return this.resources.fetch({ type: 'versions' }, `shipping_methods/${_shippingMethodId}/versions`, params, options);
|
48
|
-
}
|
49
|
-
async _disable(id, params, options) {
|
50
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: ShippingMethods.TYPE, _disable: true }, params, options);
|
51
|
-
}
|
52
|
-
async _enable(id, params, options) {
|
53
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: ShippingMethods.TYPE, _enable: true }, params, options);
|
54
|
-
}
|
55
|
-
async _reset_circuit(id, params, options) {
|
56
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: ShippingMethods.TYPE, _reset_circuit: true }, params, options);
|
57
|
-
}
|
58
|
-
isShippingMethod(resource) {
|
59
|
-
return resource.type && (resource.type === ShippingMethods.TYPE);
|
60
|
-
}
|
61
|
-
relationship(id) {
|
62
|
-
return super.relationshipOneToOne(id);
|
63
|
-
}
|
64
|
-
relationshipToMany(...ids) {
|
65
|
-
return super.relationshipOneToMany(...ids);
|
66
|
-
}
|
67
|
-
type() {
|
68
|
-
return ShippingMethods.TYPE;
|
69
|
-
}
|
70
|
-
}
|
71
|
-
export default ShippingMethods;
|
@@ -1,51 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { ShippingMethod, ShippingMethodType } from './shipping_methods';
|
5
|
-
import type { Attachment } from './attachments';
|
6
|
-
import type { Version } from './versions';
|
7
|
-
type ShippingWeightTierType = 'shipping_weight_tiers';
|
8
|
-
type ShippingWeightTierRel = ResourceRel & {
|
9
|
-
type: ShippingWeightTierType;
|
10
|
-
};
|
11
|
-
type ShippingMethodRel = ResourceRel & {
|
12
|
-
type: ShippingMethodType;
|
13
|
-
};
|
14
|
-
interface ShippingWeightTier extends Resource {
|
15
|
-
readonly type: ShippingWeightTierType;
|
16
|
-
name: string;
|
17
|
-
up_to?: number | null;
|
18
|
-
price_amount_cents: number;
|
19
|
-
price_amount_float?: number | null;
|
20
|
-
formatted_price_amount?: string | null;
|
21
|
-
shipping_method?: ShippingMethod | null;
|
22
|
-
attachments?: Attachment[] | null;
|
23
|
-
versions?: Version[] | null;
|
24
|
-
}
|
25
|
-
interface ShippingWeightTierCreate extends ResourceCreate {
|
26
|
-
name: string;
|
27
|
-
up_to?: number | null;
|
28
|
-
price_amount_cents: number;
|
29
|
-
shipping_method: ShippingMethodRel;
|
30
|
-
}
|
31
|
-
interface ShippingWeightTierUpdate extends ResourceUpdate {
|
32
|
-
name?: string | null;
|
33
|
-
up_to?: number | null;
|
34
|
-
price_amount_cents?: number | null;
|
35
|
-
shipping_method?: ShippingMethodRel | null;
|
36
|
-
}
|
37
|
-
declare class ShippingWeightTiers extends ApiResource<ShippingWeightTier> {
|
38
|
-
static readonly TYPE: ShippingWeightTierType;
|
39
|
-
create(resource: ShippingWeightTierCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingWeightTier>;
|
40
|
-
update(resource: ShippingWeightTierUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingWeightTier>;
|
41
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
42
|
-
shipping_method(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
43
|
-
attachments(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
44
|
-
versions(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
45
|
-
isShippingWeightTier(resource: any): resource is ShippingWeightTier;
|
46
|
-
relationship(id: string | ResourceId | null): ShippingWeightTierRel;
|
47
|
-
relationshipToMany(...ids: string[]): ShippingWeightTierRel[];
|
48
|
-
type(): ShippingWeightTierType;
|
49
|
-
}
|
50
|
-
export default ShippingWeightTiers;
|
51
|
-
export type { ShippingWeightTier, ShippingWeightTierCreate, ShippingWeightTierUpdate, ShippingWeightTierType };
|
@@ -1,38 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
class ShippingWeightTiers extends ApiResource {
|
3
|
-
static TYPE = 'shipping_weight_tiers';
|
4
|
-
async create(resource, params, options) {
|
5
|
-
return this.resources.create({ ...resource, type: ShippingWeightTiers.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async update(resource, params, options) {
|
8
|
-
return this.resources.update({ ...resource, type: ShippingWeightTiers.TYPE }, params, options);
|
9
|
-
}
|
10
|
-
async delete(id, options) {
|
11
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: ShippingWeightTiers.TYPE } : id, options);
|
12
|
-
}
|
13
|
-
async shipping_method(shippingWeightTierId, params, options) {
|
14
|
-
const _shippingWeightTierId = shippingWeightTierId.id || shippingWeightTierId;
|
15
|
-
return this.resources.fetch({ type: 'shipping_methods' }, `shipping_weight_tiers/${_shippingWeightTierId}/shipping_method`, params, options);
|
16
|
-
}
|
17
|
-
async attachments(shippingWeightTierId, params, options) {
|
18
|
-
const _shippingWeightTierId = shippingWeightTierId.id || shippingWeightTierId;
|
19
|
-
return this.resources.fetch({ type: 'attachments' }, `shipping_weight_tiers/${_shippingWeightTierId}/attachments`, params, options);
|
20
|
-
}
|
21
|
-
async versions(shippingWeightTierId, params, options) {
|
22
|
-
const _shippingWeightTierId = shippingWeightTierId.id || shippingWeightTierId;
|
23
|
-
return this.resources.fetch({ type: 'versions' }, `shipping_weight_tiers/${_shippingWeightTierId}/versions`, params, options);
|
24
|
-
}
|
25
|
-
isShippingWeightTier(resource) {
|
26
|
-
return resource.type && (resource.type === ShippingWeightTiers.TYPE);
|
27
|
-
}
|
28
|
-
relationship(id) {
|
29
|
-
return super.relationshipOneToOne(id);
|
30
|
-
}
|
31
|
-
relationshipToMany(...ids) {
|
32
|
-
return super.relationshipOneToMany(...ids);
|
33
|
-
}
|
34
|
-
type() {
|
35
|
-
return ShippingWeightTiers.TYPE;
|
36
|
-
}
|
37
|
-
}
|
38
|
-
export default ShippingWeightTiers;
|
@@ -1,53 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { Attachment } from './attachments';
|
5
|
-
import type { Version } from './versions';
|
6
|
-
type ShippingZoneType = 'shipping_zones';
|
7
|
-
type ShippingZoneRel = ResourceRel & {
|
8
|
-
type: ShippingZoneType;
|
9
|
-
};
|
10
|
-
interface ShippingZone extends Resource {
|
11
|
-
readonly type: ShippingZoneType;
|
12
|
-
name: string;
|
13
|
-
country_code_regex?: string | null;
|
14
|
-
not_country_code_regex?: string | null;
|
15
|
-
state_code_regex?: string | null;
|
16
|
-
not_state_code_regex?: string | null;
|
17
|
-
zip_code_regex?: string | null;
|
18
|
-
not_zip_code_regex?: string | null;
|
19
|
-
attachments?: Attachment[] | null;
|
20
|
-
versions?: Version[] | null;
|
21
|
-
}
|
22
|
-
interface ShippingZoneCreate extends ResourceCreate {
|
23
|
-
name: string;
|
24
|
-
country_code_regex?: string | null;
|
25
|
-
not_country_code_regex?: string | null;
|
26
|
-
state_code_regex?: string | null;
|
27
|
-
not_state_code_regex?: string | null;
|
28
|
-
zip_code_regex?: string | null;
|
29
|
-
not_zip_code_regex?: string | null;
|
30
|
-
}
|
31
|
-
interface ShippingZoneUpdate extends ResourceUpdate {
|
32
|
-
name?: string | null;
|
33
|
-
country_code_regex?: string | null;
|
34
|
-
not_country_code_regex?: string | null;
|
35
|
-
state_code_regex?: string | null;
|
36
|
-
not_state_code_regex?: string | null;
|
37
|
-
zip_code_regex?: string | null;
|
38
|
-
not_zip_code_regex?: string | null;
|
39
|
-
}
|
40
|
-
declare class ShippingZones extends ApiResource<ShippingZone> {
|
41
|
-
static readonly TYPE: ShippingZoneType;
|
42
|
-
create(resource: ShippingZoneCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
|
43
|
-
update(resource: ShippingZoneUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
|
44
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
45
|
-
attachments(shippingZoneId: string | ShippingZone, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
46
|
-
versions(shippingZoneId: string | ShippingZone, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
47
|
-
isShippingZone(resource: any): resource is ShippingZone;
|
48
|
-
relationship(id: string | ResourceId | null): ShippingZoneRel;
|
49
|
-
relationshipToMany(...ids: string[]): ShippingZoneRel[];
|
50
|
-
type(): ShippingZoneType;
|
51
|
-
}
|
52
|
-
export default ShippingZones;
|
53
|
-
export type { ShippingZone, ShippingZoneCreate, ShippingZoneUpdate, ShippingZoneType };
|
@@ -1,34 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
class ShippingZones extends ApiResource {
|
3
|
-
static TYPE = 'shipping_zones';
|
4
|
-
async create(resource, params, options) {
|
5
|
-
return this.resources.create({ ...resource, type: ShippingZones.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async update(resource, params, options) {
|
8
|
-
return this.resources.update({ ...resource, type: ShippingZones.TYPE }, params, options);
|
9
|
-
}
|
10
|
-
async delete(id, options) {
|
11
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: ShippingZones.TYPE } : id, options);
|
12
|
-
}
|
13
|
-
async attachments(shippingZoneId, params, options) {
|
14
|
-
const _shippingZoneId = shippingZoneId.id || shippingZoneId;
|
15
|
-
return this.resources.fetch({ type: 'attachments' }, `shipping_zones/${_shippingZoneId}/attachments`, params, options);
|
16
|
-
}
|
17
|
-
async versions(shippingZoneId, params, options) {
|
18
|
-
const _shippingZoneId = shippingZoneId.id || shippingZoneId;
|
19
|
-
return this.resources.fetch({ type: 'versions' }, `shipping_zones/${_shippingZoneId}/versions`, params, options);
|
20
|
-
}
|
21
|
-
isShippingZone(resource) {
|
22
|
-
return resource.type && (resource.type === ShippingZones.TYPE);
|
23
|
-
}
|
24
|
-
relationship(id) {
|
25
|
-
return super.relationshipOneToOne(id);
|
26
|
-
}
|
27
|
-
relationshipToMany(...ids) {
|
28
|
-
return super.relationshipOneToMany(...ids);
|
29
|
-
}
|
30
|
-
type() {
|
31
|
-
return ShippingZones.TYPE;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
export default ShippingZones;
|
@@ -1,52 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { SkuList, SkuListType } from './sku_lists';
|
5
|
-
import type { Sku, SkuType } from './skus';
|
6
|
-
import type { Version } from './versions';
|
7
|
-
type SkuListItemType = 'sku_list_items';
|
8
|
-
type SkuListItemRel = ResourceRel & {
|
9
|
-
type: SkuListItemType;
|
10
|
-
};
|
11
|
-
type SkuListRel = ResourceRel & {
|
12
|
-
type: SkuListType;
|
13
|
-
};
|
14
|
-
type SkuRel = ResourceRel & {
|
15
|
-
type: SkuType;
|
16
|
-
};
|
17
|
-
interface SkuListItem extends Resource {
|
18
|
-
readonly type: SkuListItemType;
|
19
|
-
position?: number | null;
|
20
|
-
sku_code?: string | null;
|
21
|
-
quantity?: number | null;
|
22
|
-
sku_list?: SkuList | null;
|
23
|
-
sku?: Sku | null;
|
24
|
-
versions?: Version[] | null;
|
25
|
-
}
|
26
|
-
interface SkuListItemCreate extends ResourceCreate {
|
27
|
-
position?: number | null;
|
28
|
-
sku_code?: string | null;
|
29
|
-
quantity?: number | null;
|
30
|
-
sku_list: SkuListRel;
|
31
|
-
sku: SkuRel;
|
32
|
-
}
|
33
|
-
interface SkuListItemUpdate extends ResourceUpdate {
|
34
|
-
position?: number | null;
|
35
|
-
sku_code?: string | null;
|
36
|
-
quantity?: number | null;
|
37
|
-
}
|
38
|
-
declare class SkuListItems extends ApiResource<SkuListItem> {
|
39
|
-
static readonly TYPE: SkuListItemType;
|
40
|
-
create(resource: SkuListItemCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListItem>;
|
41
|
-
update(resource: SkuListItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListItem>;
|
42
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
43
|
-
sku_list(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
44
|
-
sku(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
45
|
-
versions(skuListItemId: string | SkuListItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
46
|
-
isSkuListItem(resource: any): resource is SkuListItem;
|
47
|
-
relationship(id: string | ResourceId | null): SkuListItemRel;
|
48
|
-
relationshipToMany(...ids: string[]): SkuListItemRel[];
|
49
|
-
type(): SkuListItemType;
|
50
|
-
}
|
51
|
-
export default SkuListItems;
|
52
|
-
export type { SkuListItem, SkuListItemCreate, SkuListItemUpdate, SkuListItemType };
|
@@ -1,38 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
class SkuListItems extends ApiResource {
|
3
|
-
static TYPE = 'sku_list_items';
|
4
|
-
async create(resource, params, options) {
|
5
|
-
return this.resources.create({ ...resource, type: SkuListItems.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async update(resource, params, options) {
|
8
|
-
return this.resources.update({ ...resource, type: SkuListItems.TYPE }, params, options);
|
9
|
-
}
|
10
|
-
async delete(id, options) {
|
11
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: SkuListItems.TYPE } : id, options);
|
12
|
-
}
|
13
|
-
async sku_list(skuListItemId, params, options) {
|
14
|
-
const _skuListItemId = skuListItemId.id || skuListItemId;
|
15
|
-
return this.resources.fetch({ type: 'sku_lists' }, `sku_list_items/${_skuListItemId}/sku_list`, params, options);
|
16
|
-
}
|
17
|
-
async sku(skuListItemId, params, options) {
|
18
|
-
const _skuListItemId = skuListItemId.id || skuListItemId;
|
19
|
-
return this.resources.fetch({ type: 'skus' }, `sku_list_items/${_skuListItemId}/sku`, params, options);
|
20
|
-
}
|
21
|
-
async versions(skuListItemId, params, options) {
|
22
|
-
const _skuListItemId = skuListItemId.id || skuListItemId;
|
23
|
-
return this.resources.fetch({ type: 'versions' }, `sku_list_items/${_skuListItemId}/versions`, params, options);
|
24
|
-
}
|
25
|
-
isSkuListItem(resource) {
|
26
|
-
return resource.type && (resource.type === SkuListItems.TYPE);
|
27
|
-
}
|
28
|
-
relationship(id) {
|
29
|
-
return super.relationshipOneToOne(id);
|
30
|
-
}
|
31
|
-
relationshipToMany(...ids) {
|
32
|
-
return super.relationshipOneToMany(...ids);
|
33
|
-
}
|
34
|
-
type() {
|
35
|
-
return SkuListItems.TYPE;
|
36
|
-
}
|
37
|
-
}
|
38
|
-
export default SkuListItems;
|
@@ -1,77 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions';
|
5
|
-
import type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions';
|
6
|
-
import type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions';
|
7
|
-
import type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions';
|
8
|
-
import type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions';
|
9
|
-
import type { ExternalPromotion, ExternalPromotionType } from './external_promotions';
|
10
|
-
import type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions';
|
11
|
-
import type { Version } from './versions';
|
12
|
-
import type { SkuList, SkuListType } from './sku_lists';
|
13
|
-
import type { Sku } from './skus';
|
14
|
-
type SkuListPromotionRuleType = 'sku_list_promotion_rules';
|
15
|
-
type SkuListPromotionRuleRel = ResourceRel & {
|
16
|
-
type: SkuListPromotionRuleType;
|
17
|
-
};
|
18
|
-
type PercentageDiscountPromotionRel = ResourceRel & {
|
19
|
-
type: PercentageDiscountPromotionType;
|
20
|
-
};
|
21
|
-
type FreeShippingPromotionRel = ResourceRel & {
|
22
|
-
type: FreeShippingPromotionType;
|
23
|
-
};
|
24
|
-
type BuyXPayYPromotionRel = ResourceRel & {
|
25
|
-
type: BuyXPayYPromotionType;
|
26
|
-
};
|
27
|
-
type FreeGiftPromotionRel = ResourceRel & {
|
28
|
-
type: FreeGiftPromotionType;
|
29
|
-
};
|
30
|
-
type FixedPricePromotionRel = ResourceRel & {
|
31
|
-
type: FixedPricePromotionType;
|
32
|
-
};
|
33
|
-
type ExternalPromotionRel = ResourceRel & {
|
34
|
-
type: ExternalPromotionType;
|
35
|
-
};
|
36
|
-
type FixedAmountPromotionRel = ResourceRel & {
|
37
|
-
type: FixedAmountPromotionType;
|
38
|
-
};
|
39
|
-
type SkuListRel = ResourceRel & {
|
40
|
-
type: SkuListType;
|
41
|
-
};
|
42
|
-
interface SkuListPromotionRule extends Resource {
|
43
|
-
readonly type: SkuListPromotionRuleType;
|
44
|
-
all_skus?: boolean | null;
|
45
|
-
min_quantity?: number | null;
|
46
|
-
promotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null;
|
47
|
-
versions?: Version[] | null;
|
48
|
-
sku_list?: SkuList | null;
|
49
|
-
skus?: Sku[] | null;
|
50
|
-
}
|
51
|
-
interface SkuListPromotionRuleCreate extends ResourceCreate {
|
52
|
-
all_skus?: boolean | null;
|
53
|
-
min_quantity?: number | null;
|
54
|
-
promotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
|
55
|
-
sku_list?: SkuListRel | null;
|
56
|
-
}
|
57
|
-
interface SkuListPromotionRuleUpdate extends ResourceUpdate {
|
58
|
-
all_skus?: boolean | null;
|
59
|
-
min_quantity?: number | null;
|
60
|
-
promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | null;
|
61
|
-
sku_list?: SkuListRel | null;
|
62
|
-
}
|
63
|
-
declare class SkuListPromotionRules extends ApiResource<SkuListPromotionRule> {
|
64
|
-
static readonly TYPE: SkuListPromotionRuleType;
|
65
|
-
create(resource: SkuListPromotionRuleCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
66
|
-
update(resource: SkuListPromotionRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
67
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
68
|
-
versions(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
69
|
-
sku_list(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
70
|
-
skus(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
71
|
-
isSkuListPromotionRule(resource: any): resource is SkuListPromotionRule;
|
72
|
-
relationship(id: string | ResourceId | null): SkuListPromotionRuleRel;
|
73
|
-
relationshipToMany(...ids: string[]): SkuListPromotionRuleRel[];
|
74
|
-
type(): SkuListPromotionRuleType;
|
75
|
-
}
|
76
|
-
export default SkuListPromotionRules;
|
77
|
-
export type { SkuListPromotionRule, SkuListPromotionRuleCreate, SkuListPromotionRuleUpdate, SkuListPromotionRuleType };
|
@@ -1,38 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
class SkuListPromotionRules extends ApiResource {
|
3
|
-
static TYPE = 'sku_list_promotion_rules';
|
4
|
-
async create(resource, params, options) {
|
5
|
-
return this.resources.create({ ...resource, type: SkuListPromotionRules.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async update(resource, params, options) {
|
8
|
-
return this.resources.update({ ...resource, type: SkuListPromotionRules.TYPE }, params, options);
|
9
|
-
}
|
10
|
-
async delete(id, options) {
|
11
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: SkuListPromotionRules.TYPE } : id, options);
|
12
|
-
}
|
13
|
-
async versions(skuListPromotionRuleId, params, options) {
|
14
|
-
const _skuListPromotionRuleId = skuListPromotionRuleId.id || skuListPromotionRuleId;
|
15
|
-
return this.resources.fetch({ type: 'versions' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/versions`, params, options);
|
16
|
-
}
|
17
|
-
async sku_list(skuListPromotionRuleId, params, options) {
|
18
|
-
const _skuListPromotionRuleId = skuListPromotionRuleId.id || skuListPromotionRuleId;
|
19
|
-
return this.resources.fetch({ type: 'sku_lists' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/sku_list`, params, options);
|
20
|
-
}
|
21
|
-
async skus(skuListPromotionRuleId, params, options) {
|
22
|
-
const _skuListPromotionRuleId = skuListPromotionRuleId.id || skuListPromotionRuleId;
|
23
|
-
return this.resources.fetch({ type: 'skus' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/skus`, params, options);
|
24
|
-
}
|
25
|
-
isSkuListPromotionRule(resource) {
|
26
|
-
return resource.type && (resource.type === SkuListPromotionRules.TYPE);
|
27
|
-
}
|
28
|
-
relationship(id) {
|
29
|
-
return super.relationshipOneToOne(id);
|
30
|
-
}
|
31
|
-
relationshipToMany(...ids) {
|
32
|
-
return super.relationshipOneToMany(...ids);
|
33
|
-
}
|
34
|
-
type() {
|
35
|
-
return SkuListPromotionRules.TYPE;
|
36
|
-
}
|
37
|
-
}
|
38
|
-
export default SkuListPromotionRules;
|