@commercelayer/sdk 5.37.0 → 5.38.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 -164
- package/lib/cjs/api.js +1 -387
- package/lib/cjs/client.d.ts +1 -39
- package/lib/cjs/client.js +1 -154
- package/lib/cjs/commercelayer.d.ts +1 -153
- package/lib/cjs/commercelayer.js +1 -253
- package/lib/cjs/common.d.ts +1 -5
- package/lib/cjs/common.js +1 -23
- package/lib/cjs/config.d.ts +1 -15
- package/lib/cjs/config.js +1 -19
- package/lib/cjs/debug.d.ts +1 -3
- package/lib/cjs/debug.js +1 -38
- package/lib/cjs/error.d.ts +1 -31
- package/lib/cjs/error.js +1 -77
- package/lib/cjs/index.d.ts +1 -7
- package/lib/cjs/index.js +1 -13
- package/lib/cjs/interceptor.d.ts +1 -25
- package/lib/cjs/interceptor.js +1 -2
- package/lib/cjs/jsonapi.d.ts +1 -6
- package/lib/cjs/jsonapi.js +1 -94
- package/lib/cjs/model.d.ts +1 -124
- package/lib/cjs/model.js +1 -3
- package/lib/cjs/query.d.ts +1 -17
- package/lib/cjs/query.js +1 -69
- package/lib/cjs/resource.d.ts +1 -89
- package/lib/cjs/resource.js +1 -198
- package/lib/cjs/resources/addresses.d.ts +1 -103
- package/lib/cjs/resources/addresses.js +1 -41
- package/lib/cjs/resources/adjustments.d.ts +1 -42
- package/lib/cjs/resources/adjustments.js +1 -29
- package/lib/cjs/resources/adyen_gateways.d.ts +1 -60
- package/lib/cjs/resources/adyen_gateways.js +1 -37
- package/lib/cjs/resources/adyen_payments.d.ts +1 -51
- package/lib/cjs/resources/adyen_payments.js +1 -40
- package/lib/cjs/resources/application.d.ts +1 -22
- package/lib/cjs/resources/application.js +1 -16
- package/lib/cjs/resources/attachments.d.ts +1 -157
- package/lib/cjs/resources/attachments.js +1 -25
- package/lib/cjs/resources/authorizations.d.ts +1 -70
- package/lib/cjs/resources/authorizations.js +1 -52
- package/lib/cjs/resources/avalara_accounts.d.ts +1 -59
- package/lib/cjs/resources/avalara_accounts.js +1 -41
- package/lib/cjs/resources/axerve_gateways.d.ts +1 -48
- package/lib/cjs/resources/axerve_gateways.js +1 -37
- package/lib/cjs/resources/axerve_payments.d.ts +1 -54
- package/lib/cjs/resources/axerve_payments.js +1 -40
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -39
- package/lib/cjs/resources/billing_info_validation_rules.js +1 -37
- package/lib/cjs/resources/bing_geocoders.d.ts +1 -36
- package/lib/cjs/resources/bing_geocoders.js +1 -33
- package/lib/cjs/resources/braintree_gateways.d.ts +1 -60
- package/lib/cjs/resources/braintree_gateways.js +1 -37
- package/lib/cjs/resources/braintree_payments.d.ts +1 -52
- package/lib/cjs/resources/braintree_payments.js +1 -37
- package/lib/cjs/resources/bundles.d.ts +1 -93
- package/lib/cjs/resources/bundles.js +1 -59
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +1 -137
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +1 -79
- package/lib/cjs/resources/captures.d.ts +1 -60
- package/lib/cjs/resources/captures.js +1 -49
- package/lib/cjs/resources/carrier_accounts.d.ts +1 -30
- package/lib/cjs/resources/carrier_accounts.js +1 -28
- package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -49
- package/lib/cjs/resources/checkout_com_gateways.js +1 -37
- package/lib/cjs/resources/checkout_com_payments.d.ts +1 -65
- package/lib/cjs/resources/checkout_com_payments.js +1 -43
- package/lib/cjs/resources/cleanups.d.ts +1 -40
- package/lib/cjs/resources/cleanups.js +1 -30
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -67
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -33
- package/lib/cjs/resources/coupon_recipients.d.ts +1 -48
- package/lib/cjs/resources/coupon_recipients.js +1 -37
- package/lib/cjs/resources/coupons.d.ts +1 -71
- package/lib/cjs/resources/coupons.js +1 -45
- package/lib/cjs/resources/custom_promotion_rules.d.ts +1 -62
- package/lib/cjs/resources/custom_promotion_rules.js +1 -29
- package/lib/cjs/resources/customer_addresses.d.ts +1 -50
- package/lib/cjs/resources/customer_addresses.js +1 -41
- package/lib/cjs/resources/customer_groups.d.ts +1 -40
- package/lib/cjs/resources/customer_groups.js +1 -41
- package/lib/cjs/resources/customer_password_resets.d.ts +1 -38
- package/lib/cjs/resources/customer_password_resets.js +1 -36
- package/lib/cjs/resources/customer_payment_sources.d.ts +1 -86
- package/lib/cjs/resources/customer_payment_sources.js +1 -37
- package/lib/cjs/resources/customer_subscriptions.d.ts +1 -35
- package/lib/cjs/resources/customer_subscriptions.js +1 -37
- package/lib/cjs/resources/customers.d.ts +1 -76
- package/lib/cjs/resources/customers.js +1 -69
- package/lib/cjs/resources/delivery_lead_times.d.ts +1 -55
- package/lib/cjs/resources/delivery_lead_times.js +1 -41
- package/lib/cjs/resources/event_callbacks.d.ts +1 -25
- package/lib/cjs/resources/event_callbacks.js +1 -20
- package/lib/cjs/resources/events.d.ts +1 -25
- package/lib/cjs/resources/events.js +1 -24
- package/lib/cjs/resources/exports.d.ts +1 -41
- package/lib/cjs/resources/exports.js +1 -26
- package/lib/cjs/resources/external_gateways.d.ts +1 -57
- package/lib/cjs/resources/external_gateways.js +1 -40
- package/lib/cjs/resources/external_payments.d.ts +1 -48
- package/lib/cjs/resources/external_payments.js +1 -41
- package/lib/cjs/resources/external_promotions.d.ts +1 -136
- package/lib/cjs/resources/external_promotions.js +1 -82
- package/lib/cjs/resources/external_tax_calculators.d.ts +1 -45
- package/lib/cjs/resources/external_tax_calculators.js +1 -40
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -133
- package/lib/cjs/resources/fixed_amount_promotions.js +1 -79
- package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -133
- package/lib/cjs/resources/fixed_price_promotions.js +1 -79
- package/lib/cjs/resources/free_gift_promotions.d.ts +1 -131
- package/lib/cjs/resources/free_gift_promotions.js +1 -79
- package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -125
- package/lib/cjs/resources/free_shipping_promotions.js +1 -75
- package/lib/cjs/resources/geocoders.d.ts +1 -25
- package/lib/cjs/resources/geocoders.js +1 -24
- package/lib/cjs/resources/gift_card_recipients.d.ts +1 -48
- package/lib/cjs/resources/gift_card_recipients.js +1 -37
- package/lib/cjs/resources/gift_cards.d.ts +1 -104
- package/lib/cjs/resources/gift_cards.js +1 -61
- package/lib/cjs/resources/google_geocoders.d.ts +1 -36
- package/lib/cjs/resources/google_geocoders.js +1 -33
- package/lib/cjs/resources/imports.d.ts +1 -44
- package/lib/cjs/resources/imports.js +1 -26
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -68
- package/lib/cjs/resources/in_stock_subscriptions.js +1 -51
- package/lib/cjs/resources/inventory_models.d.ts +1 -55
- package/lib/cjs/resources/inventory_models.js +1 -41
- package/lib/cjs/resources/inventory_return_locations.d.ts +1 -47
- package/lib/cjs/resources/inventory_return_locations.js +1 -37
- package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -50
- package/lib/cjs/resources/inventory_stock_locations.js +1 -37
- package/lib/cjs/resources/klarna_gateways.d.ts +1 -48
- package/lib/cjs/resources/klarna_gateways.js +1 -37
- package/lib/cjs/resources/klarna_payments.d.ts +1 -48
- package/lib/cjs/resources/klarna_payments.js +1 -40
- package/lib/cjs/resources/line_item_options.d.ts +1 -69
- package/lib/cjs/resources/line_item_options.js +1 -41
- package/lib/cjs/resources/line_items.d.ts +1 -170
- package/lib/cjs/resources/line_items.js +1 -66
- package/lib/cjs/resources/manual_gateways.d.ts +1 -34
- package/lib/cjs/resources/manual_gateways.js +1 -33
- package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -45
- package/lib/cjs/resources/manual_tax_calculators.js +1 -41
- package/lib/cjs/resources/markets.d.ts +1 -107
- package/lib/cjs/resources/markets.js +1 -63
- package/lib/cjs/resources/merchants.d.ts +1 -42
- package/lib/cjs/resources/merchants.js +1 -37
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -67
- package/lib/cjs/resources/order_amount_promotion_rules.js +1 -29
- package/lib/cjs/resources/order_copies.d.ts +1 -51
- package/lib/cjs/resources/order_copies.js +1 -41
- package/lib/cjs/resources/order_factories.d.ts +1 -34
- package/lib/cjs/resources/order_factories.js +1 -28
- package/lib/cjs/resources/order_subscription_items.d.ts +1 -72
- package/lib/cjs/resources/order_subscription_items.js +1 -33
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -98
- package/lib/cjs/resources/order_subscriptions.js +1 -78
- package/lib/cjs/resources/order_validation_rules.d.ts +1 -27
- package/lib/cjs/resources/order_validation_rules.js +1 -28
- package/lib/cjs/resources/orders.d.ts +1 -389
- package/lib/cjs/resources/orders.js +1 -236
- package/lib/cjs/resources/organization.d.ts +1 -34
- package/lib/cjs/resources/organization.js +1 -16
- package/lib/cjs/resources/packages.d.ts +1 -60
- package/lib/cjs/resources/packages.js +1 -41
- package/lib/cjs/resources/parcel_line_items.d.ts +1 -47
- package/lib/cjs/resources/parcel_line_items.js +1 -37
- package/lib/cjs/resources/parcels.d.ts +1 -126
- package/lib/cjs/resources/parcels.js +1 -49
- package/lib/cjs/resources/payment_gateways.d.ts +1 -25
- package/lib/cjs/resources/payment_gateways.js +1 -24
- package/lib/cjs/resources/payment_methods.d.ts +1 -83
- package/lib/cjs/resources/payment_methods.js +1 -47
- package/lib/cjs/resources/payment_options.d.ts +1 -44
- package/lib/cjs/resources/payment_options.js +1 -33
- package/lib/cjs/resources/paypal_gateways.d.ts +1 -41
- package/lib/cjs/resources/paypal_gateways.js +1 -37
- package/lib/cjs/resources/paypal_payments.d.ts +1 -53
- package/lib/cjs/resources/paypal_payments.js +1 -37
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -131
- package/lib/cjs/resources/percentage_discount_promotions.js +1 -79
- package/lib/cjs/resources/price_frequency_tiers.d.ts +1 -53
- package/lib/cjs/resources/price_frequency_tiers.js +1 -41
- package/lib/cjs/resources/price_lists.d.ts +1 -46
- package/lib/cjs/resources/price_lists.js +1 -37
- package/lib/cjs/resources/price_tiers.d.ts +1 -32
- package/lib/cjs/resources/price_tiers.js +1 -28
- package/lib/cjs/resources/price_volume_tiers.d.ts +1 -53
- package/lib/cjs/resources/price_volume_tiers.js +1 -41
- package/lib/cjs/resources/prices.d.ts +1 -84
- package/lib/cjs/resources/prices.js +1 -65
- package/lib/cjs/resources/promotion_rules.d.ts +1 -29
- package/lib/cjs/resources/promotion_rules.js +1 -20
- package/lib/cjs/resources/promotions.d.ts +1 -63
- package/lib/cjs/resources/promotions.js +1 -60
- package/lib/cjs/resources/recurring_order_copies.d.ts +1 -53
- package/lib/cjs/resources/recurring_order_copies.js +1 -41
- package/lib/cjs/resources/refunds.d.ts +1 -44
- package/lib/cjs/resources/refunds.js +1 -36
- package/lib/cjs/resources/reserved_stocks.d.ts +1 -28
- package/lib/cjs/resources/reserved_stocks.js +1 -28
- package/lib/cjs/resources/resource_errors.d.ts +1 -22
- package/lib/cjs/resources/resource_errors.js +1 -16
- package/lib/cjs/resources/return_line_items.d.ts +1 -52
- package/lib/cjs/resources/return_line_items.js +1 -36
- package/lib/cjs/resources/returns.d.ts +1 -96
- package/lib/cjs/resources/returns.js +1 -92
- package/lib/cjs/resources/satispay_gateways.d.ts +1 -46
- package/lib/cjs/resources/satispay_gateways.js +1 -37
- package/lib/cjs/resources/satispay_payments.d.ts +1 -50
- package/lib/cjs/resources/satispay_payments.js +1 -40
- package/lib/cjs/resources/shipments.d.ts +1 -151
- package/lib/cjs/resources/shipments.js +1 -130
- package/lib/cjs/resources/shipping_categories.d.ts +1 -40
- package/lib/cjs/resources/shipping_categories.js +1 -37
- package/lib/cjs/resources/shipping_method_tiers.d.ts +1 -32
- package/lib/cjs/resources/shipping_method_tiers.js +1 -28
- package/lib/cjs/resources/shipping_methods.d.ts +1 -125
- package/lib/cjs/resources/shipping_methods.js +1 -70
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +1 -50
- package/lib/cjs/resources/shipping_weight_tiers.js +1 -37
- package/lib/cjs/resources/shipping_zones.d.ts +1 -52
- package/lib/cjs/resources/shipping_zones.js +1 -33
- package/lib/cjs/resources/sku_list_items.d.ts +1 -51
- package/lib/cjs/resources/sku_list_items.js +1 -37
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -76
- package/lib/cjs/resources/sku_list_promotion_rules.js +1 -37
- package/lib/cjs/resources/sku_lists.d.ts +1 -64
- package/lib/cjs/resources/sku_lists.js +1 -49
- package/lib/cjs/resources/sku_options.d.ts +1 -71
- package/lib/cjs/resources/sku_options.js +1 -45
- package/lib/cjs/resources/skus.d.ts +1 -96
- package/lib/cjs/resources/skus.js +1 -65
- package/lib/cjs/resources/stock_items.d.ts +1 -61
- package/lib/cjs/resources/stock_items.js +1 -52
- package/lib/cjs/resources/stock_line_items.d.ts +1 -73
- package/lib/cjs/resources/stock_line_items.js +1 -54
- package/lib/cjs/resources/stock_locations.d.ts +1 -64
- package/lib/cjs/resources/stock_locations.js +1 -53
- package/lib/cjs/resources/stock_reservations.d.ts +1 -51
- package/lib/cjs/resources/stock_reservations.js +1 -48
- package/lib/cjs/resources/stock_transfers.d.ts +1 -86
- package/lib/cjs/resources/stock_transfers.js +1 -71
- package/lib/cjs/resources/stripe_gateways.d.ts +1 -45
- package/lib/cjs/resources/stripe_gateways.js +1 -37
- package/lib/cjs/resources/stripe_payments.d.ts +1 -59
- package/lib/cjs/resources/stripe_payments.js +1 -43
- package/lib/cjs/resources/subscription_models.d.ts +1 -49
- package/lib/cjs/resources/subscription_models.js +1 -37
- package/lib/cjs/resources/tags.d.ts +1 -28
- package/lib/cjs/resources/tags.js +1 -25
- package/lib/cjs/resources/tax_calculators.d.ts +1 -28
- package/lib/cjs/resources/tax_calculators.js +1 -28
- package/lib/cjs/resources/tax_categories.d.ts +1 -63
- package/lib/cjs/resources/tax_categories.js +1 -37
- package/lib/cjs/resources/tax_rules.d.ts +1 -73
- package/lib/cjs/resources/tax_rules.js +1 -33
- package/lib/cjs/resources/taxjar_accounts.d.ts +1 -47
- package/lib/cjs/resources/taxjar_accounts.js +1 -41
- package/lib/cjs/resources/transactions.d.ts +1 -41
- package/lib/cjs/resources/transactions.js +1 -32
- package/lib/cjs/resources/versions.d.ts +1 -22
- package/lib/cjs/resources/versions.js +1 -16
- package/lib/cjs/resources/voids.d.ts +1 -44
- package/lib/cjs/resources/voids.js +1 -36
- package/lib/cjs/resources/webhooks.d.ts +1 -55
- package/lib/cjs/resources/webhooks.js +1 -42
- package/lib/cjs/resources/wire_transfers.d.ts +1 -37
- package/lib/cjs/resources/wire_transfers.js +1 -33
- package/lib/cjs/static.d.ts +1 -12
- package/lib/cjs/static.js +1 -51
- package/lib/cjs/util.d.ts +1 -4
- package/lib/cjs/util.js +1 -16
- package/lib/esm/api.d.ts +1 -164
- package/lib/esm/api.js +1 -258
- package/lib/esm/client.d.ts +1 -39
- package/lib/esm/client.js +1 -149
- package/lib/esm/commercelayer.d.ts +1 -153
- package/lib/esm/commercelayer.js +1 -224
- package/lib/esm/common.d.ts +1 -5
- package/lib/esm/common.js +1 -19
- package/lib/esm/config.d.ts +1 -15
- package/lib/esm/config.js +1 -17
- package/lib/esm/debug.d.ts +1 -3
- package/lib/esm/debug.js +1 -36
- package/lib/esm/error.d.ts +1 -31
- package/lib/esm/error.js +1 -69
- package/lib/esm/index.d.ts +1 -7
- package/lib/esm/index.js +1 -4
- package/lib/esm/interceptor.d.ts +1 -25
- package/lib/esm/interceptor.js +1 -1
- package/lib/esm/jsonapi.d.ts +1 -6
- package/lib/esm/jsonapi.js +1 -87
- package/lib/esm/model.d.ts +1 -124
- package/lib/esm/model.js +1 -2
- package/lib/esm/query.d.ts +1 -17
- package/lib/esm/query.js +1 -62
- package/lib/esm/resource.d.ts +1 -89
- package/lib/esm/resource.js +1 -191
- package/lib/esm/resources/addresses.d.ts +1 -103
- package/lib/esm/resources/addresses.js +1 -39
- package/lib/esm/resources/adjustments.d.ts +1 -42
- package/lib/esm/resources/adjustments.js +1 -27
- package/lib/esm/resources/adyen_gateways.d.ts +1 -60
- package/lib/esm/resources/adyen_gateways.js +1 -35
- package/lib/esm/resources/adyen_payments.d.ts +1 -51
- package/lib/esm/resources/adyen_payments.js +1 -38
- package/lib/esm/resources/application.d.ts +1 -22
- package/lib/esm/resources/application.js +1 -14
- package/lib/esm/resources/attachments.d.ts +1 -157
- package/lib/esm/resources/attachments.js +1 -23
- package/lib/esm/resources/authorizations.d.ts +1 -70
- package/lib/esm/resources/authorizations.js +1 -50
- package/lib/esm/resources/avalara_accounts.d.ts +1 -59
- package/lib/esm/resources/avalara_accounts.js +1 -39
- package/lib/esm/resources/axerve_gateways.d.ts +1 -48
- package/lib/esm/resources/axerve_gateways.js +1 -35
- package/lib/esm/resources/axerve_payments.d.ts +1 -54
- package/lib/esm/resources/axerve_payments.js +1 -38
- package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -39
- package/lib/esm/resources/billing_info_validation_rules.js +1 -35
- package/lib/esm/resources/bing_geocoders.d.ts +1 -36
- package/lib/esm/resources/bing_geocoders.js +1 -31
- package/lib/esm/resources/braintree_gateways.d.ts +1 -60
- package/lib/esm/resources/braintree_gateways.js +1 -35
- package/lib/esm/resources/braintree_payments.d.ts +1 -52
- package/lib/esm/resources/braintree_payments.js +1 -35
- package/lib/esm/resources/bundles.d.ts +1 -93
- package/lib/esm/resources/bundles.js +1 -57
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +1 -137
- package/lib/esm/resources/buy_x_pay_y_promotions.js +1 -77
- package/lib/esm/resources/captures.d.ts +1 -60
- package/lib/esm/resources/captures.js +1 -47
- package/lib/esm/resources/carrier_accounts.d.ts +1 -30
- package/lib/esm/resources/carrier_accounts.js +1 -26
- package/lib/esm/resources/checkout_com_gateways.d.ts +1 -49
- package/lib/esm/resources/checkout_com_gateways.js +1 -35
- package/lib/esm/resources/checkout_com_payments.d.ts +1 -65
- package/lib/esm/resources/checkout_com_payments.js +1 -41
- package/lib/esm/resources/cleanups.d.ts +1 -40
- package/lib/esm/resources/cleanups.js +1 -28
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -67
- package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -31
- package/lib/esm/resources/coupon_recipients.d.ts +1 -48
- package/lib/esm/resources/coupon_recipients.js +1 -35
- package/lib/esm/resources/coupons.d.ts +1 -71
- package/lib/esm/resources/coupons.js +1 -43
- package/lib/esm/resources/custom_promotion_rules.d.ts +1 -62
- package/lib/esm/resources/custom_promotion_rules.js +1 -27
- package/lib/esm/resources/customer_addresses.d.ts +1 -50
- package/lib/esm/resources/customer_addresses.js +1 -39
- package/lib/esm/resources/customer_groups.d.ts +1 -40
- package/lib/esm/resources/customer_groups.js +1 -39
- package/lib/esm/resources/customer_password_resets.d.ts +1 -38
- package/lib/esm/resources/customer_password_resets.js +1 -34
- package/lib/esm/resources/customer_payment_sources.d.ts +1 -86
- package/lib/esm/resources/customer_payment_sources.js +1 -35
- package/lib/esm/resources/customer_subscriptions.d.ts +1 -35
- package/lib/esm/resources/customer_subscriptions.js +1 -35
- package/lib/esm/resources/customers.d.ts +1 -76
- package/lib/esm/resources/customers.js +1 -67
- package/lib/esm/resources/delivery_lead_times.d.ts +1 -55
- package/lib/esm/resources/delivery_lead_times.js +1 -39
- package/lib/esm/resources/event_callbacks.d.ts +1 -25
- package/lib/esm/resources/event_callbacks.js +1 -18
- package/lib/esm/resources/events.d.ts +1 -25
- package/lib/esm/resources/events.js +1 -22
- package/lib/esm/resources/exports.d.ts +1 -41
- package/lib/esm/resources/exports.js +1 -24
- package/lib/esm/resources/external_gateways.d.ts +1 -57
- package/lib/esm/resources/external_gateways.js +1 -38
- package/lib/esm/resources/external_payments.d.ts +1 -48
- package/lib/esm/resources/external_payments.js +1 -39
- package/lib/esm/resources/external_promotions.d.ts +1 -136
- package/lib/esm/resources/external_promotions.js +1 -80
- package/lib/esm/resources/external_tax_calculators.d.ts +1 -45
- package/lib/esm/resources/external_tax_calculators.js +1 -38
- package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -133
- package/lib/esm/resources/fixed_amount_promotions.js +1 -77
- package/lib/esm/resources/fixed_price_promotions.d.ts +1 -133
- package/lib/esm/resources/fixed_price_promotions.js +1 -77
- package/lib/esm/resources/free_gift_promotions.d.ts +1 -131
- package/lib/esm/resources/free_gift_promotions.js +1 -77
- package/lib/esm/resources/free_shipping_promotions.d.ts +1 -125
- package/lib/esm/resources/free_shipping_promotions.js +1 -73
- package/lib/esm/resources/geocoders.d.ts +1 -25
- package/lib/esm/resources/geocoders.js +1 -22
- package/lib/esm/resources/gift_card_recipients.d.ts +1 -48
- package/lib/esm/resources/gift_card_recipients.js +1 -35
- package/lib/esm/resources/gift_cards.d.ts +1 -104
- package/lib/esm/resources/gift_cards.js +1 -59
- package/lib/esm/resources/google_geocoders.d.ts +1 -36
- package/lib/esm/resources/google_geocoders.js +1 -31
- package/lib/esm/resources/imports.d.ts +1 -44
- package/lib/esm/resources/imports.js +1 -24
- package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -68
- package/lib/esm/resources/in_stock_subscriptions.js +1 -49
- package/lib/esm/resources/inventory_models.d.ts +1 -55
- package/lib/esm/resources/inventory_models.js +1 -39
- package/lib/esm/resources/inventory_return_locations.d.ts +1 -47
- package/lib/esm/resources/inventory_return_locations.js +1 -35
- package/lib/esm/resources/inventory_stock_locations.d.ts +1 -50
- package/lib/esm/resources/inventory_stock_locations.js +1 -35
- package/lib/esm/resources/klarna_gateways.d.ts +1 -48
- package/lib/esm/resources/klarna_gateways.js +1 -35
- package/lib/esm/resources/klarna_payments.d.ts +1 -48
- package/lib/esm/resources/klarna_payments.js +1 -38
- package/lib/esm/resources/line_item_options.d.ts +1 -69
- package/lib/esm/resources/line_item_options.js +1 -39
- package/lib/esm/resources/line_items.d.ts +1 -170
- package/lib/esm/resources/line_items.js +1 -64
- package/lib/esm/resources/manual_gateways.d.ts +1 -34
- package/lib/esm/resources/manual_gateways.js +1 -31
- package/lib/esm/resources/manual_tax_calculators.d.ts +1 -45
- package/lib/esm/resources/manual_tax_calculators.js +1 -39
- package/lib/esm/resources/markets.d.ts +1 -107
- package/lib/esm/resources/markets.js +1 -61
- package/lib/esm/resources/merchants.d.ts +1 -42
- package/lib/esm/resources/merchants.js +1 -35
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -67
- package/lib/esm/resources/order_amount_promotion_rules.js +1 -27
- package/lib/esm/resources/order_copies.d.ts +1 -51
- package/lib/esm/resources/order_copies.js +1 -39
- package/lib/esm/resources/order_factories.d.ts +1 -34
- package/lib/esm/resources/order_factories.js +1 -26
- package/lib/esm/resources/order_subscription_items.d.ts +1 -72
- package/lib/esm/resources/order_subscription_items.js +1 -31
- package/lib/esm/resources/order_subscriptions.d.ts +1 -98
- package/lib/esm/resources/order_subscriptions.js +1 -76
- package/lib/esm/resources/order_validation_rules.d.ts +1 -27
- package/lib/esm/resources/order_validation_rules.js +1 -26
- package/lib/esm/resources/orders.d.ts +1 -389
- package/lib/esm/resources/orders.js +1 -234
- package/lib/esm/resources/organization.d.ts +1 -34
- package/lib/esm/resources/organization.js +1 -14
- package/lib/esm/resources/packages.d.ts +1 -60
- package/lib/esm/resources/packages.js +1 -39
- package/lib/esm/resources/parcel_line_items.d.ts +1 -47
- package/lib/esm/resources/parcel_line_items.js +1 -35
- package/lib/esm/resources/parcels.d.ts +1 -126
- package/lib/esm/resources/parcels.js +1 -47
- package/lib/esm/resources/payment_gateways.d.ts +1 -25
- package/lib/esm/resources/payment_gateways.js +1 -22
- package/lib/esm/resources/payment_methods.d.ts +1 -83
- package/lib/esm/resources/payment_methods.js +1 -45
- package/lib/esm/resources/payment_options.d.ts +1 -44
- package/lib/esm/resources/payment_options.js +1 -31
- package/lib/esm/resources/paypal_gateways.d.ts +1 -41
- package/lib/esm/resources/paypal_gateways.js +1 -35
- package/lib/esm/resources/paypal_payments.d.ts +1 -53
- package/lib/esm/resources/paypal_payments.js +1 -35
- package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -131
- package/lib/esm/resources/percentage_discount_promotions.js +1 -77
- package/lib/esm/resources/price_frequency_tiers.d.ts +1 -53
- package/lib/esm/resources/price_frequency_tiers.js +1 -39
- package/lib/esm/resources/price_lists.d.ts +1 -46
- package/lib/esm/resources/price_lists.js +1 -35
- package/lib/esm/resources/price_tiers.d.ts +1 -32
- package/lib/esm/resources/price_tiers.js +1 -26
- package/lib/esm/resources/price_volume_tiers.d.ts +1 -53
- package/lib/esm/resources/price_volume_tiers.js +1 -39
- package/lib/esm/resources/prices.d.ts +1 -84
- package/lib/esm/resources/prices.js +1 -63
- package/lib/esm/resources/promotion_rules.d.ts +1 -29
- package/lib/esm/resources/promotion_rules.js +1 -18
- package/lib/esm/resources/promotions.d.ts +1 -63
- package/lib/esm/resources/promotions.js +1 -58
- package/lib/esm/resources/recurring_order_copies.d.ts +1 -53
- package/lib/esm/resources/recurring_order_copies.js +1 -39
- package/lib/esm/resources/refunds.d.ts +1 -44
- package/lib/esm/resources/refunds.js +1 -34
- package/lib/esm/resources/reserved_stocks.d.ts +1 -28
- package/lib/esm/resources/reserved_stocks.js +1 -26
- package/lib/esm/resources/resource_errors.d.ts +1 -22
- package/lib/esm/resources/resource_errors.js +1 -14
- package/lib/esm/resources/return_line_items.d.ts +1 -52
- package/lib/esm/resources/return_line_items.js +1 -34
- package/lib/esm/resources/returns.d.ts +1 -96
- package/lib/esm/resources/returns.js +1 -90
- package/lib/esm/resources/satispay_gateways.d.ts +1 -46
- package/lib/esm/resources/satispay_gateways.js +1 -35
- package/lib/esm/resources/satispay_payments.d.ts +1 -50
- package/lib/esm/resources/satispay_payments.js +1 -38
- package/lib/esm/resources/shipments.d.ts +1 -151
- package/lib/esm/resources/shipments.js +1 -128
- package/lib/esm/resources/shipping_categories.d.ts +1 -40
- package/lib/esm/resources/shipping_categories.js +1 -35
- package/lib/esm/resources/shipping_method_tiers.d.ts +1 -32
- package/lib/esm/resources/shipping_method_tiers.js +1 -26
- package/lib/esm/resources/shipping_methods.d.ts +1 -125
- package/lib/esm/resources/shipping_methods.js +1 -68
- package/lib/esm/resources/shipping_weight_tiers.d.ts +1 -50
- package/lib/esm/resources/shipping_weight_tiers.js +1 -35
- package/lib/esm/resources/shipping_zones.d.ts +1 -52
- package/lib/esm/resources/shipping_zones.js +1 -31
- package/lib/esm/resources/sku_list_items.d.ts +1 -51
- package/lib/esm/resources/sku_list_items.js +1 -35
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -76
- package/lib/esm/resources/sku_list_promotion_rules.js +1 -35
- package/lib/esm/resources/sku_lists.d.ts +1 -64
- package/lib/esm/resources/sku_lists.js +1 -47
- package/lib/esm/resources/sku_options.d.ts +1 -71
- package/lib/esm/resources/sku_options.js +1 -43
- package/lib/esm/resources/skus.d.ts +1 -96
- package/lib/esm/resources/skus.js +1 -63
- package/lib/esm/resources/stock_items.d.ts +1 -61
- package/lib/esm/resources/stock_items.js +1 -50
- package/lib/esm/resources/stock_line_items.d.ts +1 -73
- package/lib/esm/resources/stock_line_items.js +1 -52
- package/lib/esm/resources/stock_locations.d.ts +1 -64
- package/lib/esm/resources/stock_locations.js +1 -51
- package/lib/esm/resources/stock_reservations.d.ts +1 -51
- package/lib/esm/resources/stock_reservations.js +1 -46
- package/lib/esm/resources/stock_transfers.d.ts +1 -86
- package/lib/esm/resources/stock_transfers.js +1 -69
- package/lib/esm/resources/stripe_gateways.d.ts +1 -45
- package/lib/esm/resources/stripe_gateways.js +1 -35
- package/lib/esm/resources/stripe_payments.d.ts +1 -59
- package/lib/esm/resources/stripe_payments.js +1 -41
- package/lib/esm/resources/subscription_models.d.ts +1 -49
- package/lib/esm/resources/subscription_models.js +1 -35
- package/lib/esm/resources/tags.d.ts +1 -28
- package/lib/esm/resources/tags.js +1 -23
- package/lib/esm/resources/tax_calculators.d.ts +1 -28
- package/lib/esm/resources/tax_calculators.js +1 -26
- package/lib/esm/resources/tax_categories.d.ts +1 -63
- package/lib/esm/resources/tax_categories.js +1 -35
- package/lib/esm/resources/tax_rules.d.ts +1 -73
- package/lib/esm/resources/tax_rules.js +1 -31
- package/lib/esm/resources/taxjar_accounts.d.ts +1 -47
- package/lib/esm/resources/taxjar_accounts.js +1 -39
- package/lib/esm/resources/transactions.d.ts +1 -41
- package/lib/esm/resources/transactions.js +1 -30
- package/lib/esm/resources/versions.d.ts +1 -22
- package/lib/esm/resources/versions.js +1 -14
- package/lib/esm/resources/voids.d.ts +1 -44
- package/lib/esm/resources/voids.js +1 -34
- package/lib/esm/resources/webhooks.d.ts +1 -55
- package/lib/esm/resources/webhooks.js +1 -40
- package/lib/esm/resources/wire_transfers.d.ts +1 -37
- package/lib/esm/resources/wire_transfers.js +1 -31
- package/lib/esm/static.d.ts +1 -12
- package/lib/esm/static.js +1 -25
- package/lib/esm/util.d.ts +1 -4
- package/lib/esm/util.js +1 -37
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
@@ -1,70 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class ShippingMethods extends resource_1.ApiResource {
|
5
|
-
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type: ShippingMethods.TYPE }, params, options);
|
7
|
-
}
|
8
|
-
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type: ShippingMethods.TYPE }, params, options);
|
10
|
-
}
|
11
|
-
async delete(id, options) {
|
12
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: ShippingMethods.TYPE } : id, options);
|
13
|
-
}
|
14
|
-
async market(shippingMethodId, params, options) {
|
15
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
16
|
-
return this.resources.fetch({ type: 'markets' }, `shipping_methods/${_shippingMethodId}/market`, params, options);
|
17
|
-
}
|
18
|
-
async shipping_zone(shippingMethodId, params, options) {
|
19
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
20
|
-
return this.resources.fetch({ type: 'shipping_zones' }, `shipping_methods/${_shippingMethodId}/shipping_zone`, params, options);
|
21
|
-
}
|
22
|
-
async shipping_category(shippingMethodId, params, options) {
|
23
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
24
|
-
return this.resources.fetch({ type: 'shipping_categories' }, `shipping_methods/${_shippingMethodId}/shipping_category`, params, options);
|
25
|
-
}
|
26
|
-
async stock_location(shippingMethodId, params, options) {
|
27
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
28
|
-
return this.resources.fetch({ type: 'stock_locations' }, `shipping_methods/${_shippingMethodId}/stock_location`, params, options);
|
29
|
-
}
|
30
|
-
async delivery_lead_time_for_shipment(shippingMethodId, params, options) {
|
31
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
32
|
-
return this.resources.fetch({ type: 'delivery_lead_times' }, `shipping_methods/${_shippingMethodId}/delivery_lead_time_for_shipment`, params, options);
|
33
|
-
}
|
34
|
-
async shipping_method_tiers(shippingMethodId, params, options) {
|
35
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
36
|
-
return this.resources.fetch({ type: 'shipping_method_tiers' }, `shipping_methods/${_shippingMethodId}/shipping_method_tiers`, params, options);
|
37
|
-
}
|
38
|
-
async shipping_weight_tiers(shippingMethodId, params, options) {
|
39
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
40
|
-
return this.resources.fetch({ type: 'shipping_weight_tiers' }, `shipping_methods/${_shippingMethodId}/shipping_weight_tiers`, params, options);
|
41
|
-
}
|
42
|
-
async attachments(shippingMethodId, params, options) {
|
43
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
44
|
-
return this.resources.fetch({ type: 'attachments' }, `shipping_methods/${_shippingMethodId}/attachments`, params, options);
|
45
|
-
}
|
46
|
-
async versions(shippingMethodId, params, options) {
|
47
|
-
const _shippingMethodId = shippingMethodId.id || shippingMethodId;
|
48
|
-
return this.resources.fetch({ type: 'versions' }, `shipping_methods/${_shippingMethodId}/versions`, params, options);
|
49
|
-
}
|
50
|
-
async _disable(id, params, options) {
|
51
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: ShippingMethods.TYPE, _disable: true }, params, options);
|
52
|
-
}
|
53
|
-
async _enable(id, params, options) {
|
54
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: ShippingMethods.TYPE, _enable: true }, params, options);
|
55
|
-
}
|
56
|
-
async _reset_circuit(id, params, options) {
|
57
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: ShippingMethods.TYPE, _reset_circuit: true }, params, options);
|
58
|
-
}
|
59
|
-
isShippingMethod(resource) {
|
60
|
-
return resource.type && (resource.type === ShippingMethods.TYPE);
|
61
|
-
}
|
62
|
-
relationship(id) {
|
63
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: ShippingMethods.TYPE } : { id: id.id, type: ShippingMethods.TYPE };
|
64
|
-
}
|
65
|
-
type() {
|
66
|
-
return ShippingMethods.TYPE;
|
67
|
-
}
|
68
|
-
}
|
69
|
-
ShippingMethods.TYPE = 'shipping_methods';
|
70
|
-
exports.default = ShippingMethods;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingMethods extends resource_1.ApiResource{async create(e,t,s){return this.resources.create({...e,type:ShippingMethods.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:ShippingMethods.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ShippingMethods.TYPE}:e,t)}async market(e,t,s){const r=e.id||e;return this.resources.fetch({type:"markets"},`shipping_methods/${r}/market`,t,s)}async shipping_zone(e,t,s){const r=e.id||e;return this.resources.fetch({type:"shipping_zones"},`shipping_methods/${r}/shipping_zone`,t,s)}async shipping_category(e,t,s){const r=e.id||e;return this.resources.fetch({type:"shipping_categories"},`shipping_methods/${r}/shipping_category`,t,s)}async stock_location(e,t,s){const r=e.id||e;return this.resources.fetch({type:"stock_locations"},`shipping_methods/${r}/stock_location`,t,s)}async delivery_lead_time_for_shipment(e,t,s){const r=e.id||e;return this.resources.fetch({type:"delivery_lead_times"},`shipping_methods/${r}/delivery_lead_time_for_shipment`,t,s)}async shipping_method_tiers(e,t,s){const r=e.id||e;return this.resources.fetch({type:"shipping_method_tiers"},`shipping_methods/${r}/shipping_method_tiers`,t,s)}async shipping_weight_tiers(e,t,s){const r=e.id||e;return this.resources.fetch({type:"shipping_weight_tiers"},`shipping_methods/${r}/shipping_weight_tiers`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_methods/${r}/attachments`,t,s)}async versions(e,t,s){const r=e.id||e;return this.resources.fetch({type:"versions"},`shipping_methods/${r}/versions`,t,s)}async _disable(e,t,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:ShippingMethods.TYPE,_disable:!0},t,s)}async _enable(e,t,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:ShippingMethods.TYPE,_enable:!0},t,s)}async _reset_circuit(e,t,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:ShippingMethods.TYPE,_reset_circuit:!0},t,s)}isShippingMethod(e){return e.type&&e.type===ShippingMethods.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:ShippingMethods.TYPE}:{id:e.id,type:ShippingMethods.TYPE}}type(){return ShippingMethods.TYPE}}ShippingMethods.TYPE="shipping_methods",exports.default=ShippingMethods;
|
@@ -1,50 +1 @@
|
|
1
|
-
import {
|
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
|
-
type(): ShippingWeightTierType;
|
48
|
-
}
|
49
|
-
export default ShippingWeightTiers;
|
50
|
-
export type { ShippingWeightTier, ShippingWeightTierCreate, ShippingWeightTierUpdate, ShippingWeightTierType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{ShippingMethod,ShippingMethodType}from'./shipping_methods';import type{Attachment}from'./attachments';import type{Version}from'./versions';type ShippingWeightTierType='shipping_weight_tiers';type ShippingWeightTierRel=ResourceRel&{type:ShippingWeightTierType;};type ShippingMethodRel=ResourceRel&{type:ShippingMethodType;};interface ShippingWeightTier extends Resource{readonly type:ShippingWeightTierType;name:string;up_to?:number|null;price_amount_cents:number;price_amount_float?:number|null;formatted_price_amount?:string|null;shipping_method?:ShippingMethod|null;attachments?:Attachment[]|null;versions?:Version[]|null;}interface ShippingWeightTierCreate extends ResourceCreate{name:string;up_to?:number|null;price_amount_cents:number;shipping_method:ShippingMethodRel;}interface ShippingWeightTierUpdate extends ResourceUpdate{name?:string|null;up_to?:number|null;price_amount_cents?:number|null;shipping_method?:ShippingMethodRel|null;}declare class ShippingWeightTiers extends ApiResource<ShippingWeightTier>{static readonly TYPE:ShippingWeightTierType;create(resource:ShippingWeightTierCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingWeightTier>;update(resource:ShippingWeightTierUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingWeightTier>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;shipping_method(shippingWeightTierId:string|ShippingWeightTier,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;attachments(shippingWeightTierId:string|ShippingWeightTier,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(shippingWeightTierId:string|ShippingWeightTier,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isShippingWeightTier(resource:any):resource is ShippingWeightTier;relationship(id:string|ResourceId|null):ShippingWeightTierRel;type():ShippingWeightTierType;}export default ShippingWeightTiers;export type{ShippingWeightTier,ShippingWeightTierCreate,ShippingWeightTierUpdate,ShippingWeightTierType};
|
@@ -1,37 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class ShippingWeightTiers extends resource_1.ApiResource {
|
5
|
-
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type: ShippingWeightTiers.TYPE }, params, options);
|
7
|
-
}
|
8
|
-
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type: ShippingWeightTiers.TYPE }, params, options);
|
10
|
-
}
|
11
|
-
async delete(id, options) {
|
12
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: ShippingWeightTiers.TYPE } : id, options);
|
13
|
-
}
|
14
|
-
async shipping_method(shippingWeightTierId, params, options) {
|
15
|
-
const _shippingWeightTierId = shippingWeightTierId.id || shippingWeightTierId;
|
16
|
-
return this.resources.fetch({ type: 'shipping_methods' }, `shipping_weight_tiers/${_shippingWeightTierId}/shipping_method`, params, options);
|
17
|
-
}
|
18
|
-
async attachments(shippingWeightTierId, params, options) {
|
19
|
-
const _shippingWeightTierId = shippingWeightTierId.id || shippingWeightTierId;
|
20
|
-
return this.resources.fetch({ type: 'attachments' }, `shipping_weight_tiers/${_shippingWeightTierId}/attachments`, params, options);
|
21
|
-
}
|
22
|
-
async versions(shippingWeightTierId, params, options) {
|
23
|
-
const _shippingWeightTierId = shippingWeightTierId.id || shippingWeightTierId;
|
24
|
-
return this.resources.fetch({ type: 'versions' }, `shipping_weight_tiers/${_shippingWeightTierId}/versions`, params, options);
|
25
|
-
}
|
26
|
-
isShippingWeightTier(resource) {
|
27
|
-
return resource.type && (resource.type === ShippingWeightTiers.TYPE);
|
28
|
-
}
|
29
|
-
relationship(id) {
|
30
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: ShippingWeightTiers.TYPE } : { id: id.id, type: ShippingWeightTiers.TYPE };
|
31
|
-
}
|
32
|
-
type() {
|
33
|
-
return ShippingWeightTiers.TYPE;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
ShippingWeightTiers.TYPE = 'shipping_weight_tiers';
|
37
|
-
exports.default = ShippingWeightTiers;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingWeightTiers extends resource_1.ApiResource{async create(e,t,s){return this.resources.create({...e,type:ShippingWeightTiers.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:ShippingWeightTiers.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ShippingWeightTiers.TYPE}:e,t)}async shipping_method(e,t,s){const r=e.id||e;return this.resources.fetch({type:"shipping_methods"},`shipping_weight_tiers/${r}/shipping_method`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_weight_tiers/${r}/attachments`,t,s)}async versions(e,t,s){const r=e.id||e;return this.resources.fetch({type:"versions"},`shipping_weight_tiers/${r}/versions`,t,s)}isShippingWeightTier(e){return e.type&&e.type===ShippingWeightTiers.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:ShippingWeightTiers.TYPE}:{id:e.id,type:ShippingWeightTiers.TYPE}}type(){return ShippingWeightTiers.TYPE}}ShippingWeightTiers.TYPE="shipping_weight_tiers",exports.default=ShippingWeightTiers;
|
@@ -1,52 +1 @@
|
|
1
|
-
import {
|
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
|
-
type(): ShippingZoneType;
|
50
|
-
}
|
51
|
-
export default ShippingZones;
|
52
|
-
export type { ShippingZone, ShippingZoneCreate, ShippingZoneUpdate, ShippingZoneType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Attachment}from'./attachments';import type{Version}from'./versions';type ShippingZoneType='shipping_zones';type ShippingZoneRel=ResourceRel&{type:ShippingZoneType;};interface ShippingZone extends Resource{readonly type:ShippingZoneType;name:string;country_code_regex?:string|null;not_country_code_regex?:string|null;state_code_regex?:string|null;not_state_code_regex?:string|null;zip_code_regex?:string|null;not_zip_code_regex?:string|null;attachments?:Attachment[]|null;versions?:Version[]|null;}interface ShippingZoneCreate extends ResourceCreate{name:string;country_code_regex?:string|null;not_country_code_regex?:string|null;state_code_regex?:string|null;not_state_code_regex?:string|null;zip_code_regex?:string|null;not_zip_code_regex?:string|null;}interface ShippingZoneUpdate extends ResourceUpdate{name?:string|null;country_code_regex?:string|null;not_country_code_regex?:string|null;state_code_regex?:string|null;not_state_code_regex?:string|null;zip_code_regex?:string|null;not_zip_code_regex?:string|null;}declare class ShippingZones extends ApiResource<ShippingZone>{static readonly TYPE:ShippingZoneType;create(resource:ShippingZoneCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingZone>;update(resource:ShippingZoneUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingZone>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;attachments(shippingZoneId:string|ShippingZone,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(shippingZoneId:string|ShippingZone,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isShippingZone(resource:any):resource is ShippingZone;relationship(id:string|ResourceId|null):ShippingZoneRel;type():ShippingZoneType;}export default ShippingZones;export type{ShippingZone,ShippingZoneCreate,ShippingZoneUpdate,ShippingZoneType};
|
@@ -1,33 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class ShippingZones extends resource_1.ApiResource {
|
5
|
-
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type: ShippingZones.TYPE }, params, options);
|
7
|
-
}
|
8
|
-
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type: ShippingZones.TYPE }, params, options);
|
10
|
-
}
|
11
|
-
async delete(id, options) {
|
12
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: ShippingZones.TYPE } : id, options);
|
13
|
-
}
|
14
|
-
async attachments(shippingZoneId, params, options) {
|
15
|
-
const _shippingZoneId = shippingZoneId.id || shippingZoneId;
|
16
|
-
return this.resources.fetch({ type: 'attachments' }, `shipping_zones/${_shippingZoneId}/attachments`, params, options);
|
17
|
-
}
|
18
|
-
async versions(shippingZoneId, params, options) {
|
19
|
-
const _shippingZoneId = shippingZoneId.id || shippingZoneId;
|
20
|
-
return this.resources.fetch({ type: 'versions' }, `shipping_zones/${_shippingZoneId}/versions`, params, options);
|
21
|
-
}
|
22
|
-
isShippingZone(resource) {
|
23
|
-
return resource.type && (resource.type === ShippingZones.TYPE);
|
24
|
-
}
|
25
|
-
relationship(id) {
|
26
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: ShippingZones.TYPE } : { id: id.id, type: ShippingZones.TYPE };
|
27
|
-
}
|
28
|
-
type() {
|
29
|
-
return ShippingZones.TYPE;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
ShippingZones.TYPE = 'shipping_zones';
|
33
|
-
exports.default = ShippingZones;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingZones extends resource_1.ApiResource{async create(e,t,s){return this.resources.create({...e,type:ShippingZones.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:ShippingZones.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:ShippingZones.TYPE}:e,t)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_zones/${r}/attachments`,t,s)}async versions(e,t,s){const r=e.id||e;return this.resources.fetch({type:"versions"},`shipping_zones/${r}/versions`,t,s)}isShippingZone(e){return e.type&&e.type===ShippingZones.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:ShippingZones.TYPE}:{id:e.id,type:ShippingZones.TYPE}}type(){return ShippingZones.TYPE}}ShippingZones.TYPE="shipping_zones",exports.default=ShippingZones;
|
@@ -1,51 +1 @@
|
|
1
|
-
import {
|
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
|
-
type(): SkuListItemType;
|
49
|
-
}
|
50
|
-
export default SkuListItems;
|
51
|
-
export type { SkuListItem, SkuListItemCreate, SkuListItemUpdate, SkuListItemType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{SkuList,SkuListType}from'./sku_lists';import type{Sku,SkuType}from'./skus';import type{Version}from'./versions';type SkuListItemType='sku_list_items';type SkuListItemRel=ResourceRel&{type:SkuListItemType;};type SkuListRel=ResourceRel&{type:SkuListType;};type SkuRel=ResourceRel&{type:SkuType;};interface SkuListItem extends Resource{readonly type:SkuListItemType;position?:number|null;sku_code?:string|null;quantity?:number|null;sku_list?:SkuList|null;sku?:Sku|null;versions?:Version[]|null;}interface SkuListItemCreate extends ResourceCreate{position?:number|null;sku_code?:string|null;quantity?:number|null;sku_list:SkuListRel;sku:SkuRel;}interface SkuListItemUpdate extends ResourceUpdate{position?:number|null;sku_code?:string|null;quantity?:number|null;}declare class SkuListItems extends ApiResource<SkuListItem>{static readonly TYPE:SkuListItemType;create(resource:SkuListItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListItem>;update(resource:SkuListItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListItem>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;sku_list(skuListItemId:string|SkuListItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;sku(skuListItemId:string|SkuListItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;versions(skuListItemId:string|SkuListItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isSkuListItem(resource:any):resource is SkuListItem;relationship(id:string|ResourceId|null):SkuListItemRel;type():SkuListItemType;}export default SkuListItems;export type{SkuListItem,SkuListItemCreate,SkuListItemUpdate,SkuListItemType};
|
@@ -1,37 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class SkuListItems extends resource_1.ApiResource {
|
5
|
-
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type: SkuListItems.TYPE }, params, options);
|
7
|
-
}
|
8
|
-
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type: SkuListItems.TYPE }, params, options);
|
10
|
-
}
|
11
|
-
async delete(id, options) {
|
12
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: SkuListItems.TYPE } : id, options);
|
13
|
-
}
|
14
|
-
async sku_list(skuListItemId, params, options) {
|
15
|
-
const _skuListItemId = skuListItemId.id || skuListItemId;
|
16
|
-
return this.resources.fetch({ type: 'sku_lists' }, `sku_list_items/${_skuListItemId}/sku_list`, params, options);
|
17
|
-
}
|
18
|
-
async sku(skuListItemId, params, options) {
|
19
|
-
const _skuListItemId = skuListItemId.id || skuListItemId;
|
20
|
-
return this.resources.fetch({ type: 'skus' }, `sku_list_items/${_skuListItemId}/sku`, params, options);
|
21
|
-
}
|
22
|
-
async versions(skuListItemId, params, options) {
|
23
|
-
const _skuListItemId = skuListItemId.id || skuListItemId;
|
24
|
-
return this.resources.fetch({ type: 'versions' }, `sku_list_items/${_skuListItemId}/versions`, params, options);
|
25
|
-
}
|
26
|
-
isSkuListItem(resource) {
|
27
|
-
return resource.type && (resource.type === SkuListItems.TYPE);
|
28
|
-
}
|
29
|
-
relationship(id) {
|
30
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: SkuListItems.TYPE } : { id: id.id, type: SkuListItems.TYPE };
|
31
|
-
}
|
32
|
-
type() {
|
33
|
-
return SkuListItems.TYPE;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
SkuListItems.TYPE = 'sku_list_items';
|
37
|
-
exports.default = SkuListItems;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuListItems extends resource_1.ApiResource{async create(e,s,t){return this.resources.create({...e,type:SkuListItems.TYPE},s,t)}async update(e,s,t){return this.resources.update({...e,type:SkuListItems.TYPE},s,t)}async delete(e,s){await this.resources.delete(typeof e=="string"?{id:e,type:SkuListItems.TYPE}:e,s)}async sku_list(e,s,t){const r=e.id||e;return this.resources.fetch({type:"sku_lists"},`sku_list_items/${r}/sku_list`,s,t)}async sku(e,s,t){const r=e.id||e;return this.resources.fetch({type:"skus"},`sku_list_items/${r}/sku`,s,t)}async versions(e,s,t){const r=e.id||e;return this.resources.fetch({type:"versions"},`sku_list_items/${r}/versions`,s,t)}isSkuListItem(e){return e.type&&e.type===SkuListItems.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuListItems.TYPE}:{id:e.id,type:SkuListItems.TYPE}}type(){return SkuListItems.TYPE}}SkuListItems.TYPE="sku_list_items",exports.default=SkuListItems;
|
@@ -1,76 +1 @@
|
|
1
|
-
import {
|
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
|
-
type(): SkuListPromotionRuleType;
|
74
|
-
}
|
75
|
-
export default SkuListPromotionRules;
|
76
|
-
export type { SkuListPromotionRule, SkuListPromotionRuleCreate, SkuListPromotionRuleUpdate, SkuListPromotionRuleType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{PercentageDiscountPromotion,PercentageDiscountPromotionType}from'./percentage_discount_promotions';import type{FreeShippingPromotion,FreeShippingPromotionType}from'./free_shipping_promotions';import type{BuyXPayYPromotion,BuyXPayYPromotionType}from'./buy_x_pay_y_promotions';import type{FreeGiftPromotion,FreeGiftPromotionType}from'./free_gift_promotions';import type{FixedPricePromotion,FixedPricePromotionType}from'./fixed_price_promotions';import type{ExternalPromotion,ExternalPromotionType}from'./external_promotions';import type{FixedAmountPromotion,FixedAmountPromotionType}from'./fixed_amount_promotions';import type{Version}from'./versions';import type{SkuList,SkuListType}from'./sku_lists';import type{Sku}from'./skus';type SkuListPromotionRuleType='sku_list_promotion_rules';type SkuListPromotionRuleRel=ResourceRel&{type:SkuListPromotionRuleType;};type PercentageDiscountPromotionRel=ResourceRel&{type:PercentageDiscountPromotionType;};type FreeShippingPromotionRel=ResourceRel&{type:FreeShippingPromotionType;};type BuyXPayYPromotionRel=ResourceRel&{type:BuyXPayYPromotionType;};type FreeGiftPromotionRel=ResourceRel&{type:FreeGiftPromotionType;};type FixedPricePromotionRel=ResourceRel&{type:FixedPricePromotionType;};type ExternalPromotionRel=ResourceRel&{type:ExternalPromotionType;};type FixedAmountPromotionRel=ResourceRel&{type:FixedAmountPromotionType;};type SkuListRel=ResourceRel&{type:SkuListType;};interface SkuListPromotionRule extends Resource{readonly type:SkuListPromotionRuleType;all_skus?:boolean|null;min_quantity?:number|null;promotion?:PercentageDiscountPromotion|FreeShippingPromotion|BuyXPayYPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion|FixedAmountPromotion|null;versions?:Version[]|null;sku_list?:SkuList|null;skus?:Sku[]|null;}interface SkuListPromotionRuleCreate extends ResourceCreate{all_skus?:boolean|null;min_quantity?:number|null;promotion:PercentageDiscountPromotionRel|FreeShippingPromotionRel|BuyXPayYPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel|FixedAmountPromotionRel;sku_list?:SkuListRel|null;}interface SkuListPromotionRuleUpdate extends ResourceUpdate{all_skus?:boolean|null;min_quantity?:number|null;promotion?:PercentageDiscountPromotionRel|FreeShippingPromotionRel|BuyXPayYPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel|FixedAmountPromotionRel|null;sku_list?:SkuListRel|null;}declare class SkuListPromotionRules extends ApiResource<SkuListPromotionRule>{static readonly TYPE:SkuListPromotionRuleType;create(resource:SkuListPromotionRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;update(resource:SkuListPromotionRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;versions(skuListPromotionRuleId:string|SkuListPromotionRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;sku_list(skuListPromotionRuleId:string|SkuListPromotionRule,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;skus(skuListPromotionRuleId:string|SkuListPromotionRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;isSkuListPromotionRule(resource:any):resource is SkuListPromotionRule;relationship(id:string|ResourceId|null):SkuListPromotionRuleRel;type():SkuListPromotionRuleType;}export default SkuListPromotionRules;export type{SkuListPromotionRule,SkuListPromotionRuleCreate,SkuListPromotionRuleUpdate,SkuListPromotionRuleType};
|
@@ -1,37 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class SkuListPromotionRules extends resource_1.ApiResource {
|
5
|
-
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type: SkuListPromotionRules.TYPE }, params, options);
|
7
|
-
}
|
8
|
-
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type: SkuListPromotionRules.TYPE }, params, options);
|
10
|
-
}
|
11
|
-
async delete(id, options) {
|
12
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: SkuListPromotionRules.TYPE } : id, options);
|
13
|
-
}
|
14
|
-
async versions(skuListPromotionRuleId, params, options) {
|
15
|
-
const _skuListPromotionRuleId = skuListPromotionRuleId.id || skuListPromotionRuleId;
|
16
|
-
return this.resources.fetch({ type: 'versions' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/versions`, params, options);
|
17
|
-
}
|
18
|
-
async sku_list(skuListPromotionRuleId, params, options) {
|
19
|
-
const _skuListPromotionRuleId = skuListPromotionRuleId.id || skuListPromotionRuleId;
|
20
|
-
return this.resources.fetch({ type: 'sku_lists' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/sku_list`, params, options);
|
21
|
-
}
|
22
|
-
async skus(skuListPromotionRuleId, params, options) {
|
23
|
-
const _skuListPromotionRuleId = skuListPromotionRuleId.id || skuListPromotionRuleId;
|
24
|
-
return this.resources.fetch({ type: 'skus' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/skus`, params, options);
|
25
|
-
}
|
26
|
-
isSkuListPromotionRule(resource) {
|
27
|
-
return resource.type && (resource.type === SkuListPromotionRules.TYPE);
|
28
|
-
}
|
29
|
-
relationship(id) {
|
30
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: SkuListPromotionRules.TYPE } : { id: id.id, type: SkuListPromotionRules.TYPE };
|
31
|
-
}
|
32
|
-
type() {
|
33
|
-
return SkuListPromotionRules.TYPE;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
SkuListPromotionRules.TYPE = 'sku_list_promotion_rules';
|
37
|
-
exports.default = SkuListPromotionRules;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuListPromotionRules extends resource_1.ApiResource{async create(e,s,t){return this.resources.create({...e,type:SkuListPromotionRules.TYPE},s,t)}async update(e,s,t){return this.resources.update({...e,type:SkuListPromotionRules.TYPE},s,t)}async delete(e,s){await this.resources.delete(typeof e=="string"?{id:e,type:SkuListPromotionRules.TYPE}:e,s)}async versions(e,s,t){const r=e.id||e;return this.resources.fetch({type:"versions"},`sku_list_promotion_rules/${r}/versions`,s,t)}async sku_list(e,s,t){const r=e.id||e;return this.resources.fetch({type:"sku_lists"},`sku_list_promotion_rules/${r}/sku_list`,s,t)}async skus(e,s,t){const r=e.id||e;return this.resources.fetch({type:"skus"},`sku_list_promotion_rules/${r}/skus`,s,t)}isSkuListPromotionRule(e){return e.type&&e.type===SkuListPromotionRules.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuListPromotionRules.TYPE}:{id:e.id,type:SkuListPromotionRules.TYPE}}type(){return SkuListPromotionRules.TYPE}}SkuListPromotionRules.TYPE="sku_list_promotion_rules",exports.default=SkuListPromotionRules;
|
@@ -1,64 +1 @@
|
|
1
|
-
import {
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { Customer, CustomerType } from './customers';
|
5
|
-
import type { Sku } from './skus';
|
6
|
-
import type { SkuListItem } from './sku_list_items';
|
7
|
-
import type { Bundle } from './bundles';
|
8
|
-
import type { Attachment } from './attachments';
|
9
|
-
import type { Version } from './versions';
|
10
|
-
type SkuListType = 'sku_lists';
|
11
|
-
type SkuListRel = ResourceRel & {
|
12
|
-
type: SkuListType;
|
13
|
-
};
|
14
|
-
type CustomerRel = ResourceRel & {
|
15
|
-
type: CustomerType;
|
16
|
-
};
|
17
|
-
interface SkuList extends Resource {
|
18
|
-
readonly type: SkuListType;
|
19
|
-
name: string;
|
20
|
-
slug: string;
|
21
|
-
description?: string | null;
|
22
|
-
image_url?: string | null;
|
23
|
-
manual?: boolean | null;
|
24
|
-
sku_code_regex?: string | null;
|
25
|
-
customer?: Customer | null;
|
26
|
-
skus?: Sku[] | null;
|
27
|
-
sku_list_items?: SkuListItem[] | null;
|
28
|
-
bundles?: Bundle[] | null;
|
29
|
-
attachments?: Attachment[] | null;
|
30
|
-
versions?: Version[] | null;
|
31
|
-
}
|
32
|
-
interface SkuListCreate extends ResourceCreate {
|
33
|
-
name: string;
|
34
|
-
description?: string | null;
|
35
|
-
image_url?: string | null;
|
36
|
-
manual?: boolean | null;
|
37
|
-
sku_code_regex?: string | null;
|
38
|
-
customer?: CustomerRel | null;
|
39
|
-
}
|
40
|
-
interface SkuListUpdate extends ResourceUpdate {
|
41
|
-
name?: string | null;
|
42
|
-
description?: string | null;
|
43
|
-
image_url?: string | null;
|
44
|
-
manual?: boolean | null;
|
45
|
-
sku_code_regex?: string | null;
|
46
|
-
customer?: CustomerRel | null;
|
47
|
-
}
|
48
|
-
declare class SkuLists extends ApiResource<SkuList> {
|
49
|
-
static readonly TYPE: SkuListType;
|
50
|
-
create(resource: SkuListCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
51
|
-
update(resource: SkuListUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
52
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
53
|
-
customer(skuListId: string | SkuList, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
54
|
-
skus(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
55
|
-
sku_list_items(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuListItem>>;
|
56
|
-
bundles(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Bundle>>;
|
57
|
-
attachments(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
58
|
-
versions(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
59
|
-
isSkuList(resource: any): resource is SkuList;
|
60
|
-
relationship(id: string | ResourceId | null): SkuListRel;
|
61
|
-
type(): SkuListType;
|
62
|
-
}
|
63
|
-
export default SkuLists;
|
64
|
-
export type { SkuList, SkuListCreate, SkuListUpdate, SkuListType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Customer,CustomerType}from'./customers';import type{Sku}from'./skus';import type{SkuListItem}from'./sku_list_items';import type{Bundle}from'./bundles';import type{Attachment}from'./attachments';import type{Version}from'./versions';type SkuListType='sku_lists';type SkuListRel=ResourceRel&{type:SkuListType;};type CustomerRel=ResourceRel&{type:CustomerType;};interface SkuList extends Resource{readonly type:SkuListType;name:string;slug:string;description?:string|null;image_url?:string|null;manual?:boolean|null;sku_code_regex?:string|null;customer?:Customer|null;skus?:Sku[]|null;sku_list_items?:SkuListItem[]|null;bundles?:Bundle[]|null;attachments?:Attachment[]|null;versions?:Version[]|null;}interface SkuListCreate extends ResourceCreate{name:string;description?:string|null;image_url?:string|null;manual?:boolean|null;sku_code_regex?:string|null;customer?:CustomerRel|null;}interface SkuListUpdate extends ResourceUpdate{name?:string|null;description?:string|null;image_url?:string|null;manual?:boolean|null;sku_code_regex?:string|null;customer?:CustomerRel|null;}declare class SkuLists extends ApiResource<SkuList>{static readonly TYPE:SkuListType;create(resource:SkuListCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;update(resource:SkuListUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;customer(skuListId:string|SkuList,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;skus(skuListId:string|SkuList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;sku_list_items(skuListId:string|SkuList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuListItem>>;bundles(skuListId:string|SkuList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Bundle>>;attachments(skuListId:string|SkuList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(skuListId:string|SkuList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isSkuList(resource:any):resource is SkuList;relationship(id:string|ResourceId|null):SkuListRel;type():SkuListType;}export default SkuLists;export type{SkuList,SkuListCreate,SkuListUpdate,SkuListType};
|
@@ -1,49 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class SkuLists extends resource_1.ApiResource {
|
5
|
-
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type: SkuLists.TYPE }, params, options);
|
7
|
-
}
|
8
|
-
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type: SkuLists.TYPE }, params, options);
|
10
|
-
}
|
11
|
-
async delete(id, options) {
|
12
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: SkuLists.TYPE } : id, options);
|
13
|
-
}
|
14
|
-
async customer(skuListId, params, options) {
|
15
|
-
const _skuListId = skuListId.id || skuListId;
|
16
|
-
return this.resources.fetch({ type: 'customers' }, `sku_lists/${_skuListId}/customer`, params, options);
|
17
|
-
}
|
18
|
-
async skus(skuListId, params, options) {
|
19
|
-
const _skuListId = skuListId.id || skuListId;
|
20
|
-
return this.resources.fetch({ type: 'skus' }, `sku_lists/${_skuListId}/skus`, params, options);
|
21
|
-
}
|
22
|
-
async sku_list_items(skuListId, params, options) {
|
23
|
-
const _skuListId = skuListId.id || skuListId;
|
24
|
-
return this.resources.fetch({ type: 'sku_list_items' }, `sku_lists/${_skuListId}/sku_list_items`, params, options);
|
25
|
-
}
|
26
|
-
async bundles(skuListId, params, options) {
|
27
|
-
const _skuListId = skuListId.id || skuListId;
|
28
|
-
return this.resources.fetch({ type: 'bundles' }, `sku_lists/${_skuListId}/bundles`, params, options);
|
29
|
-
}
|
30
|
-
async attachments(skuListId, params, options) {
|
31
|
-
const _skuListId = skuListId.id || skuListId;
|
32
|
-
return this.resources.fetch({ type: 'attachments' }, `sku_lists/${_skuListId}/attachments`, params, options);
|
33
|
-
}
|
34
|
-
async versions(skuListId, params, options) {
|
35
|
-
const _skuListId = skuListId.id || skuListId;
|
36
|
-
return this.resources.fetch({ type: 'versions' }, `sku_lists/${_skuListId}/versions`, params, options);
|
37
|
-
}
|
38
|
-
isSkuList(resource) {
|
39
|
-
return resource.type && (resource.type === SkuLists.TYPE);
|
40
|
-
}
|
41
|
-
relationship(id) {
|
42
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: SkuLists.TYPE } : { id: id.id, type: SkuLists.TYPE };
|
43
|
-
}
|
44
|
-
type() {
|
45
|
-
return SkuLists.TYPE;
|
46
|
-
}
|
47
|
-
}
|
48
|
-
SkuLists.TYPE = 'sku_lists';
|
49
|
-
exports.default = SkuLists;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuLists extends resource_1.ApiResource{async create(e,s,t){return this.resources.create({...e,type:SkuLists.TYPE},s,t)}async update(e,s,t){return this.resources.update({...e,type:SkuLists.TYPE},s,t)}async delete(e,s){await this.resources.delete(typeof e=="string"?{id:e,type:SkuLists.TYPE}:e,s)}async customer(e,s,t){const r=e.id||e;return this.resources.fetch({type:"customers"},`sku_lists/${r}/customer`,s,t)}async skus(e,s,t){const r=e.id||e;return this.resources.fetch({type:"skus"},`sku_lists/${r}/skus`,s,t)}async sku_list_items(e,s,t){const r=e.id||e;return this.resources.fetch({type:"sku_list_items"},`sku_lists/${r}/sku_list_items`,s,t)}async bundles(e,s,t){const r=e.id||e;return this.resources.fetch({type:"bundles"},`sku_lists/${r}/bundles`,s,t)}async attachments(e,s,t){const r=e.id||e;return this.resources.fetch({type:"attachments"},`sku_lists/${r}/attachments`,s,t)}async versions(e,s,t){const r=e.id||e;return this.resources.fetch({type:"versions"},`sku_lists/${r}/versions`,s,t)}isSkuList(e){return e.type&&e.type===SkuLists.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuLists.TYPE}:{id:e.id,type:SkuLists.TYPE}}type(){return SkuLists.TYPE}}SkuLists.TYPE="sku_lists",exports.default=SkuLists;
|