@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,26 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve } from '../query';
|
4
|
-
import type { Webhook } from './webhooks';
|
5
|
-
type EventCallbackType = 'event_callbacks';
|
6
|
-
type EventCallbackRel = ResourceRel & {
|
7
|
-
type: EventCallbackType;
|
8
|
-
};
|
9
|
-
interface EventCallback extends Resource {
|
10
|
-
readonly type: EventCallbackType;
|
11
|
-
callback_url: string;
|
12
|
-
payload?: Record<string, any> | null;
|
13
|
-
response_code?: string | null;
|
14
|
-
response_message?: string | null;
|
15
|
-
webhook?: Webhook | null;
|
16
|
-
}
|
17
|
-
declare class EventCallbacks extends ApiResource<EventCallback> {
|
18
|
-
static readonly TYPE: EventCallbackType;
|
19
|
-
webhook(eventCallbackId: string | EventCallback, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
20
|
-
isEventCallback(resource: any): resource is EventCallback;
|
21
|
-
relationship(id: string | ResourceId | null): EventCallbackRel;
|
22
|
-
relationshipToMany(...ids: string[]): EventCallbackRel[];
|
23
|
-
type(): EventCallbackType;
|
24
|
-
}
|
25
|
-
export default EventCallbacks;
|
26
|
-
export type { EventCallback, EventCallbackType };
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
class EventCallbacks extends ApiResource {
|
3
|
-
static TYPE = 'event_callbacks';
|
4
|
-
async webhook(eventCallbackId, params, options) {
|
5
|
-
const _eventCallbackId = eventCallbackId.id || eventCallbackId;
|
6
|
-
return this.resources.fetch({ type: 'webhooks' }, `event_callbacks/${_eventCallbackId}/webhook`, params, options);
|
7
|
-
}
|
8
|
-
isEventCallback(resource) {
|
9
|
-
return resource.type && (resource.type === EventCallbacks.TYPE);
|
10
|
-
}
|
11
|
-
relationship(id) {
|
12
|
-
return super.relationshipOneToOne(id);
|
13
|
-
}
|
14
|
-
relationshipToMany(...ids) {
|
15
|
-
return super.relationshipOneToMany(...ids);
|
16
|
-
}
|
17
|
-
type() {
|
18
|
-
return EventCallbacks.TYPE;
|
19
|
-
}
|
20
|
-
}
|
21
|
-
export default EventCallbacks;
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsList } from '../query';
|
4
|
-
import type { Webhook } from './webhooks';
|
5
|
-
import type { EventCallback } from './event_callbacks';
|
6
|
-
type EventType = 'events';
|
7
|
-
type EventRel = ResourceRel & {
|
8
|
-
type: EventType;
|
9
|
-
};
|
10
|
-
interface Event extends Resource {
|
11
|
-
readonly type: EventType;
|
12
|
-
name: string;
|
13
|
-
webhooks?: Webhook[] | null;
|
14
|
-
last_event_callbacks?: EventCallback[] | null;
|
15
|
-
}
|
16
|
-
declare class Events extends ApiResource<Event> {
|
17
|
-
static readonly TYPE: EventType;
|
18
|
-
webhooks(eventId: string | Event, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Webhook>>;
|
19
|
-
last_event_callbacks(eventId: string | Event, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
|
20
|
-
isEvent(resource: any): resource is Event;
|
21
|
-
relationship(id: string | ResourceId | null): EventRel;
|
22
|
-
relationshipToMany(...ids: string[]): EventRel[];
|
23
|
-
type(): EventType;
|
24
|
-
}
|
25
|
-
export default Events;
|
26
|
-
export type { Event, EventType };
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
class Events extends ApiResource {
|
3
|
-
static TYPE = 'events';
|
4
|
-
async webhooks(eventId, params, options) {
|
5
|
-
const _eventId = eventId.id || eventId;
|
6
|
-
return this.resources.fetch({ type: 'webhooks' }, `events/${_eventId}/webhooks`, params, options);
|
7
|
-
}
|
8
|
-
async last_event_callbacks(eventId, params, options) {
|
9
|
-
const _eventId = eventId.id || eventId;
|
10
|
-
return this.resources.fetch({ type: 'event_callbacks' }, `events/${_eventId}/last_event_callbacks`, params, options);
|
11
|
-
}
|
12
|
-
isEvent(resource) {
|
13
|
-
return resource.type && (resource.type === Events.TYPE);
|
14
|
-
}
|
15
|
-
relationship(id) {
|
16
|
-
return super.relationshipOneToOne(id);
|
17
|
-
}
|
18
|
-
relationshipToMany(...ids) {
|
19
|
-
return super.relationshipOneToMany(...ids);
|
20
|
-
}
|
21
|
-
type() {
|
22
|
-
return Events.TYPE;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
export default Events;
|
@@ -1,42 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
import type { Resource, ResourceCreate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { Event } from './events';
|
5
|
-
type ExportType = 'exports';
|
6
|
-
type ExportRel = ResourceRel & {
|
7
|
-
type: ExportType;
|
8
|
-
};
|
9
|
-
interface Export extends Resource {
|
10
|
-
readonly type: ExportType;
|
11
|
-
resource_type: string;
|
12
|
-
format?: string | null;
|
13
|
-
status: 'pending' | 'in_progress' | 'completed';
|
14
|
-
includes?: string[] | null;
|
15
|
-
filters?: Record<string, any> | null;
|
16
|
-
dry_data?: boolean | null;
|
17
|
-
started_at?: string | null;
|
18
|
-
completed_at?: string | null;
|
19
|
-
interrupted_at?: string | null;
|
20
|
-
records_count?: number | null;
|
21
|
-
attachment_url?: string | null;
|
22
|
-
events?: Event[] | null;
|
23
|
-
}
|
24
|
-
interface ExportCreate extends ResourceCreate {
|
25
|
-
resource_type: string;
|
26
|
-
format?: string | null;
|
27
|
-
includes?: string[] | null;
|
28
|
-
filters?: Record<string, any> | null;
|
29
|
-
dry_data?: boolean | null;
|
30
|
-
}
|
31
|
-
declare class Exports extends ApiResource<Export> {
|
32
|
-
static readonly TYPE: ExportType;
|
33
|
-
create(resource: ExportCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Export>;
|
34
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
35
|
-
events(exportId: string | Export, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
36
|
-
isExport(resource: any): resource is Export;
|
37
|
-
relationship(id: string | ResourceId | null): ExportRel;
|
38
|
-
relationshipToMany(...ids: string[]): ExportRel[];
|
39
|
-
type(): ExportType;
|
40
|
-
}
|
41
|
-
export default Exports;
|
42
|
-
export type { Export, ExportCreate, ExportType };
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
class Exports extends ApiResource {
|
3
|
-
static TYPE = 'exports';
|
4
|
-
async create(resource, params, options) {
|
5
|
-
return this.resources.create({ ...resource, type: Exports.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async delete(id, options) {
|
8
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: Exports.TYPE } : id, options);
|
9
|
-
}
|
10
|
-
async events(exportId, params, options) {
|
11
|
-
const _exportId = exportId.id || exportId;
|
12
|
-
return this.resources.fetch({ type: 'events' }, `exports/${_exportId}/events`, params, options);
|
13
|
-
}
|
14
|
-
isExport(resource) {
|
15
|
-
return resource.type && (resource.type === Exports.TYPE);
|
16
|
-
}
|
17
|
-
relationship(id) {
|
18
|
-
return super.relationshipOneToOne(id);
|
19
|
-
}
|
20
|
-
relationshipToMany(...ids) {
|
21
|
-
return super.relationshipOneToMany(...ids);
|
22
|
-
}
|
23
|
-
type() {
|
24
|
-
return Exports.TYPE;
|
25
|
-
}
|
26
|
-
}
|
27
|
-
export default Exports;
|
@@ -1,58 +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 { PaymentMethod } from './payment_methods';
|
5
|
-
import type { Version } from './versions';
|
6
|
-
import type { ExternalPayment } from './external_payments';
|
7
|
-
type ExternalGatewayType = 'external_gateways';
|
8
|
-
type ExternalGatewayRel = ResourceRel & {
|
9
|
-
type: ExternalGatewayType;
|
10
|
-
};
|
11
|
-
interface ExternalGateway extends Resource {
|
12
|
-
readonly type: ExternalGatewayType;
|
13
|
-
name: string;
|
14
|
-
authorize_url?: string | null;
|
15
|
-
capture_url?: string | null;
|
16
|
-
void_url?: string | null;
|
17
|
-
refund_url?: string | null;
|
18
|
-
token_url?: string | null;
|
19
|
-
circuit_state?: string | null;
|
20
|
-
circuit_failure_count?: number | null;
|
21
|
-
shared_secret: string;
|
22
|
-
payment_methods?: PaymentMethod[] | null;
|
23
|
-
versions?: Version[] | null;
|
24
|
-
external_payments?: ExternalPayment[] | null;
|
25
|
-
}
|
26
|
-
interface ExternalGatewayCreate extends ResourceCreate {
|
27
|
-
name: string;
|
28
|
-
authorize_url?: string | null;
|
29
|
-
capture_url?: string | null;
|
30
|
-
void_url?: string | null;
|
31
|
-
refund_url?: string | null;
|
32
|
-
token_url?: string | null;
|
33
|
-
}
|
34
|
-
interface ExternalGatewayUpdate extends ResourceUpdate {
|
35
|
-
name?: string | null;
|
36
|
-
authorize_url?: string | null;
|
37
|
-
capture_url?: string | null;
|
38
|
-
void_url?: string | null;
|
39
|
-
refund_url?: string | null;
|
40
|
-
token_url?: string | null;
|
41
|
-
_reset_circuit?: boolean | null;
|
42
|
-
}
|
43
|
-
declare class ExternalGateways extends ApiResource<ExternalGateway> {
|
44
|
-
static readonly TYPE: ExternalGatewayType;
|
45
|
-
create(resource: ExternalGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
|
46
|
-
update(resource: ExternalGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
|
47
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
48
|
-
payment_methods(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
49
|
-
versions(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
50
|
-
external_payments(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalPayment>>;
|
51
|
-
_reset_circuit(id: string | ExternalGateway, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
|
52
|
-
isExternalGateway(resource: any): resource is ExternalGateway;
|
53
|
-
relationship(id: string | ResourceId | null): ExternalGatewayRel;
|
54
|
-
relationshipToMany(...ids: string[]): ExternalGatewayRel[];
|
55
|
-
type(): ExternalGatewayType;
|
56
|
-
}
|
57
|
-
export default ExternalGateways;
|
58
|
-
export type { ExternalGateway, ExternalGatewayCreate, ExternalGatewayUpdate, ExternalGatewayType };
|
@@ -1,41 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
class ExternalGateways extends ApiResource {
|
3
|
-
static TYPE = 'external_gateways';
|
4
|
-
async create(resource, params, options) {
|
5
|
-
return this.resources.create({ ...resource, type: ExternalGateways.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async update(resource, params, options) {
|
8
|
-
return this.resources.update({ ...resource, type: ExternalGateways.TYPE }, params, options);
|
9
|
-
}
|
10
|
-
async delete(id, options) {
|
11
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: ExternalGateways.TYPE } : id, options);
|
12
|
-
}
|
13
|
-
async payment_methods(externalGatewayId, params, options) {
|
14
|
-
const _externalGatewayId = externalGatewayId.id || externalGatewayId;
|
15
|
-
return this.resources.fetch({ type: 'payment_methods' }, `external_gateways/${_externalGatewayId}/payment_methods`, params, options);
|
16
|
-
}
|
17
|
-
async versions(externalGatewayId, params, options) {
|
18
|
-
const _externalGatewayId = externalGatewayId.id || externalGatewayId;
|
19
|
-
return this.resources.fetch({ type: 'versions' }, `external_gateways/${_externalGatewayId}/versions`, params, options);
|
20
|
-
}
|
21
|
-
async external_payments(externalGatewayId, params, options) {
|
22
|
-
const _externalGatewayId = externalGatewayId.id || externalGatewayId;
|
23
|
-
return this.resources.fetch({ type: 'external_payments' }, `external_gateways/${_externalGatewayId}/external_payments`, params, options);
|
24
|
-
}
|
25
|
-
async _reset_circuit(id, params, options) {
|
26
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: ExternalGateways.TYPE, _reset_circuit: true }, params, options);
|
27
|
-
}
|
28
|
-
isExternalGateway(resource) {
|
29
|
-
return resource.type && (resource.type === ExternalGateways.TYPE);
|
30
|
-
}
|
31
|
-
relationship(id) {
|
32
|
-
return super.relationshipOneToOne(id);
|
33
|
-
}
|
34
|
-
relationshipToMany(...ids) {
|
35
|
-
return super.relationshipOneToMany(...ids);
|
36
|
-
}
|
37
|
-
type() {
|
38
|
-
return ExternalGateways.TYPE;
|
39
|
-
}
|
40
|
-
}
|
41
|
-
export default ExternalGateways;
|
@@ -1,49 +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 { Order, OrderType } from './orders';
|
5
|
-
import type { PaymentGateway } from './payment_gateways';
|
6
|
-
import type { CustomerPaymentSource } from './customer_payment_sources';
|
7
|
-
import type { Version } from './versions';
|
8
|
-
type ExternalPaymentType = 'external_payments';
|
9
|
-
type ExternalPaymentRel = ResourceRel & {
|
10
|
-
type: ExternalPaymentType;
|
11
|
-
};
|
12
|
-
type OrderRel = ResourceRel & {
|
13
|
-
type: OrderType;
|
14
|
-
};
|
15
|
-
interface ExternalPayment extends Resource {
|
16
|
-
readonly type: ExternalPaymentType;
|
17
|
-
payment_source_token: string;
|
18
|
-
options?: Record<string, any> | null;
|
19
|
-
payment_instrument?: Record<string, any> | null;
|
20
|
-
order?: Order | null;
|
21
|
-
payment_gateway?: PaymentGateway | null;
|
22
|
-
wallet?: CustomerPaymentSource | null;
|
23
|
-
versions?: Version[] | null;
|
24
|
-
}
|
25
|
-
interface ExternalPaymentCreate extends ResourceCreate {
|
26
|
-
payment_source_token: string;
|
27
|
-
options?: Record<string, any> | null;
|
28
|
-
order: OrderRel;
|
29
|
-
}
|
30
|
-
interface ExternalPaymentUpdate extends ResourceUpdate {
|
31
|
-
options?: Record<string, any> | null;
|
32
|
-
order?: OrderRel | null;
|
33
|
-
}
|
34
|
-
declare class ExternalPayments extends ApiResource<ExternalPayment> {
|
35
|
-
static readonly TYPE: ExternalPaymentType;
|
36
|
-
create(resource: ExternalPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPayment>;
|
37
|
-
update(resource: ExternalPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPayment>;
|
38
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
39
|
-
order(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
40
|
-
payment_gateway(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
41
|
-
wallet(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPaymentSource>;
|
42
|
-
versions(externalPaymentId: string | ExternalPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
43
|
-
isExternalPayment(resource: any): resource is ExternalPayment;
|
44
|
-
relationship(id: string | ResourceId | null): ExternalPaymentRel;
|
45
|
-
relationshipToMany(...ids: string[]): ExternalPaymentRel[];
|
46
|
-
type(): ExternalPaymentType;
|
47
|
-
}
|
48
|
-
export default ExternalPayments;
|
49
|
-
export type { ExternalPayment, ExternalPaymentCreate, ExternalPaymentUpdate, ExternalPaymentType };
|
@@ -1,42 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
class ExternalPayments extends ApiResource {
|
3
|
-
static TYPE = 'external_payments';
|
4
|
-
async create(resource, params, options) {
|
5
|
-
return this.resources.create({ ...resource, type: ExternalPayments.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async update(resource, params, options) {
|
8
|
-
return this.resources.update({ ...resource, type: ExternalPayments.TYPE }, params, options);
|
9
|
-
}
|
10
|
-
async delete(id, options) {
|
11
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: ExternalPayments.TYPE } : id, options);
|
12
|
-
}
|
13
|
-
async order(externalPaymentId, params, options) {
|
14
|
-
const _externalPaymentId = externalPaymentId.id || externalPaymentId;
|
15
|
-
return this.resources.fetch({ type: 'orders' }, `external_payments/${_externalPaymentId}/order`, params, options);
|
16
|
-
}
|
17
|
-
async payment_gateway(externalPaymentId, params, options) {
|
18
|
-
const _externalPaymentId = externalPaymentId.id || externalPaymentId;
|
19
|
-
return this.resources.fetch({ type: 'payment_gateways' }, `external_payments/${_externalPaymentId}/payment_gateway`, params, options);
|
20
|
-
}
|
21
|
-
async wallet(externalPaymentId, params, options) {
|
22
|
-
const _externalPaymentId = externalPaymentId.id || externalPaymentId;
|
23
|
-
return this.resources.fetch({ type: 'customer_payment_sources' }, `external_payments/${_externalPaymentId}/wallet`, params, options);
|
24
|
-
}
|
25
|
-
async versions(externalPaymentId, params, options) {
|
26
|
-
const _externalPaymentId = externalPaymentId.id || externalPaymentId;
|
27
|
-
return this.resources.fetch({ type: 'versions' }, `external_payments/${_externalPaymentId}/versions`, params, options);
|
28
|
-
}
|
29
|
-
isExternalPayment(resource) {
|
30
|
-
return resource.type && (resource.type === ExternalPayments.TYPE);
|
31
|
-
}
|
32
|
-
relationship(id) {
|
33
|
-
return super.relationshipOneToOne(id);
|
34
|
-
}
|
35
|
-
relationshipToMany(...ids) {
|
36
|
-
return super.relationshipOneToMany(...ids);
|
37
|
-
}
|
38
|
-
type() {
|
39
|
-
return ExternalPayments.TYPE;
|
40
|
-
}
|
41
|
-
}
|
42
|
-
export default ExternalPayments;
|
@@ -1,137 +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 { PromotionRule } from './promotion_rules';
|
6
|
-
import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
|
7
|
-
import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
|
8
|
-
import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
|
9
|
-
import type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules';
|
10
|
-
import type { SkuList, SkuListType } from './sku_lists';
|
11
|
-
import type { Coupon } from './coupons';
|
12
|
-
import type { Attachment } from './attachments';
|
13
|
-
import type { Event } from './events';
|
14
|
-
import type { Tag, TagType } from './tags';
|
15
|
-
import type { Version } from './versions';
|
16
|
-
import type { Sku } from './skus';
|
17
|
-
type ExternalPromotionType = 'external_promotions';
|
18
|
-
type ExternalPromotionRel = ResourceRel & {
|
19
|
-
type: ExternalPromotionType;
|
20
|
-
};
|
21
|
-
type MarketRel = ResourceRel & {
|
22
|
-
type: MarketType;
|
23
|
-
};
|
24
|
-
type OrderAmountPromotionRuleRel = ResourceRel & {
|
25
|
-
type: OrderAmountPromotionRuleType;
|
26
|
-
};
|
27
|
-
type SkuListPromotionRuleRel = ResourceRel & {
|
28
|
-
type: SkuListPromotionRuleType;
|
29
|
-
};
|
30
|
-
type CouponCodesPromotionRuleRel = ResourceRel & {
|
31
|
-
type: CouponCodesPromotionRuleType;
|
32
|
-
};
|
33
|
-
type CustomPromotionRuleRel = ResourceRel & {
|
34
|
-
type: CustomPromotionRuleType;
|
35
|
-
};
|
36
|
-
type SkuListRel = ResourceRel & {
|
37
|
-
type: SkuListType;
|
38
|
-
};
|
39
|
-
type TagRel = ResourceRel & {
|
40
|
-
type: TagType;
|
41
|
-
};
|
42
|
-
interface ExternalPromotion extends Resource {
|
43
|
-
readonly type: ExternalPromotionType;
|
44
|
-
name: string;
|
45
|
-
currency_code?: string | null;
|
46
|
-
exclusive?: boolean | null;
|
47
|
-
priority?: number | null;
|
48
|
-
starts_at: string;
|
49
|
-
expires_at: string;
|
50
|
-
total_usage_limit?: number | null;
|
51
|
-
total_usage_count?: number | null;
|
52
|
-
active?: boolean | null;
|
53
|
-
disabled_at?: string | null;
|
54
|
-
promotion_url: string;
|
55
|
-
circuit_state?: string | null;
|
56
|
-
circuit_failure_count?: number | null;
|
57
|
-
shared_secret: string;
|
58
|
-
market?: Market | null;
|
59
|
-
promotion_rules?: PromotionRule[] | null;
|
60
|
-
order_amount_promotion_rule?: OrderAmountPromotionRule | null;
|
61
|
-
sku_list_promotion_rule?: SkuListPromotionRule | null;
|
62
|
-
coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
|
63
|
-
custom_promotion_rule?: CustomPromotionRule | null;
|
64
|
-
sku_list?: SkuList | null;
|
65
|
-
coupons?: Coupon[] | null;
|
66
|
-
attachments?: Attachment[] | null;
|
67
|
-
events?: Event[] | null;
|
68
|
-
tags?: Tag[] | null;
|
69
|
-
versions?: Version[] | null;
|
70
|
-
skus?: Sku[] | null;
|
71
|
-
}
|
72
|
-
interface ExternalPromotionCreate extends ResourceCreate {
|
73
|
-
name: string;
|
74
|
-
currency_code?: string | null;
|
75
|
-
exclusive?: boolean | null;
|
76
|
-
priority?: number | null;
|
77
|
-
starts_at: string;
|
78
|
-
expires_at: string;
|
79
|
-
total_usage_limit?: number | null;
|
80
|
-
_disable?: boolean | null;
|
81
|
-
_enable?: boolean | null;
|
82
|
-
promotion_url: string;
|
83
|
-
market?: MarketRel | null;
|
84
|
-
order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
|
85
|
-
sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
|
86
|
-
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
|
87
|
-
custom_promotion_rule?: CustomPromotionRuleRel | null;
|
88
|
-
sku_list?: SkuListRel | null;
|
89
|
-
tags?: TagRel[] | null;
|
90
|
-
}
|
91
|
-
interface ExternalPromotionUpdate extends ResourceUpdate {
|
92
|
-
name?: string | null;
|
93
|
-
currency_code?: string | null;
|
94
|
-
exclusive?: boolean | null;
|
95
|
-
priority?: number | null;
|
96
|
-
starts_at?: string | null;
|
97
|
-
expires_at?: string | null;
|
98
|
-
total_usage_limit?: number | null;
|
99
|
-
_disable?: boolean | null;
|
100
|
-
_enable?: boolean | null;
|
101
|
-
promotion_url?: string | null;
|
102
|
-
_reset_circuit?: boolean | null;
|
103
|
-
market?: MarketRel | null;
|
104
|
-
order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
|
105
|
-
sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
|
106
|
-
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
|
107
|
-
custom_promotion_rule?: CustomPromotionRuleRel | null;
|
108
|
-
sku_list?: SkuListRel | null;
|
109
|
-
tags?: TagRel[] | null;
|
110
|
-
}
|
111
|
-
declare class ExternalPromotions extends ApiResource<ExternalPromotion> {
|
112
|
-
static readonly TYPE: ExternalPromotionType;
|
113
|
-
create(resource: ExternalPromotionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
114
|
-
update(resource: ExternalPromotionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
115
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
116
|
-
market(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
117
|
-
order_amount_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
|
118
|
-
sku_list_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
119
|
-
coupon_codes_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
120
|
-
custom_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
|
121
|
-
sku_list(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
122
|
-
coupons(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
123
|
-
attachments(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
124
|
-
events(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
125
|
-
tags(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
126
|
-
versions(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
127
|
-
skus(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
128
|
-
_disable(id: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
129
|
-
_enable(id: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
130
|
-
_reset_circuit(id: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
131
|
-
isExternalPromotion(resource: any): resource is ExternalPromotion;
|
132
|
-
relationship(id: string | ResourceId | null): ExternalPromotionRel;
|
133
|
-
relationshipToMany(...ids: string[]): ExternalPromotionRel[];
|
134
|
-
type(): ExternalPromotionType;
|
135
|
-
}
|
136
|
-
export default ExternalPromotions;
|
137
|
-
export type { ExternalPromotion, ExternalPromotionCreate, ExternalPromotionUpdate, ExternalPromotionType };
|
@@ -1,83 +0,0 @@
|
|
1
|
-
import { ApiResource } from '../resource';
|
2
|
-
class ExternalPromotions extends ApiResource {
|
3
|
-
static TYPE = 'external_promotions';
|
4
|
-
async create(resource, params, options) {
|
5
|
-
return this.resources.create({ ...resource, type: ExternalPromotions.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async update(resource, params, options) {
|
8
|
-
return this.resources.update({ ...resource, type: ExternalPromotions.TYPE }, params, options);
|
9
|
-
}
|
10
|
-
async delete(id, options) {
|
11
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: ExternalPromotions.TYPE } : id, options);
|
12
|
-
}
|
13
|
-
async market(externalPromotionId, params, options) {
|
14
|
-
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
15
|
-
return this.resources.fetch({ type: 'markets' }, `external_promotions/${_externalPromotionId}/market`, params, options);
|
16
|
-
}
|
17
|
-
async order_amount_promotion_rule(externalPromotionId, params, options) {
|
18
|
-
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
19
|
-
return this.resources.fetch({ type: 'order_amount_promotion_rules' }, `external_promotions/${_externalPromotionId}/order_amount_promotion_rule`, params, options);
|
20
|
-
}
|
21
|
-
async sku_list_promotion_rule(externalPromotionId, params, options) {
|
22
|
-
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
23
|
-
return this.resources.fetch({ type: 'sku_list_promotion_rules' }, `external_promotions/${_externalPromotionId}/sku_list_promotion_rule`, params, options);
|
24
|
-
}
|
25
|
-
async coupon_codes_promotion_rule(externalPromotionId, params, options) {
|
26
|
-
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
27
|
-
return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `external_promotions/${_externalPromotionId}/coupon_codes_promotion_rule`, params, options);
|
28
|
-
}
|
29
|
-
async custom_promotion_rule(externalPromotionId, params, options) {
|
30
|
-
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
31
|
-
return this.resources.fetch({ type: 'custom_promotion_rules' }, `external_promotions/${_externalPromotionId}/custom_promotion_rule`, params, options);
|
32
|
-
}
|
33
|
-
async sku_list(externalPromotionId, params, options) {
|
34
|
-
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
35
|
-
return this.resources.fetch({ type: 'sku_lists' }, `external_promotions/${_externalPromotionId}/sku_list`, params, options);
|
36
|
-
}
|
37
|
-
async coupons(externalPromotionId, params, options) {
|
38
|
-
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
39
|
-
return this.resources.fetch({ type: 'coupons' }, `external_promotions/${_externalPromotionId}/coupons`, params, options);
|
40
|
-
}
|
41
|
-
async attachments(externalPromotionId, params, options) {
|
42
|
-
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
43
|
-
return this.resources.fetch({ type: 'attachments' }, `external_promotions/${_externalPromotionId}/attachments`, params, options);
|
44
|
-
}
|
45
|
-
async events(externalPromotionId, params, options) {
|
46
|
-
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
47
|
-
return this.resources.fetch({ type: 'events' }, `external_promotions/${_externalPromotionId}/events`, params, options);
|
48
|
-
}
|
49
|
-
async tags(externalPromotionId, params, options) {
|
50
|
-
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
51
|
-
return this.resources.fetch({ type: 'tags' }, `external_promotions/${_externalPromotionId}/tags`, params, options);
|
52
|
-
}
|
53
|
-
async versions(externalPromotionId, params, options) {
|
54
|
-
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
55
|
-
return this.resources.fetch({ type: 'versions' }, `external_promotions/${_externalPromotionId}/versions`, params, options);
|
56
|
-
}
|
57
|
-
async skus(externalPromotionId, params, options) {
|
58
|
-
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
59
|
-
return this.resources.fetch({ type: 'skus' }, `external_promotions/${_externalPromotionId}/skus`, params, options);
|
60
|
-
}
|
61
|
-
async _disable(id, params, options) {
|
62
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: ExternalPromotions.TYPE, _disable: true }, params, options);
|
63
|
-
}
|
64
|
-
async _enable(id, params, options) {
|
65
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: ExternalPromotions.TYPE, _enable: true }, params, options);
|
66
|
-
}
|
67
|
-
async _reset_circuit(id, params, options) {
|
68
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: ExternalPromotions.TYPE, _reset_circuit: true }, params, options);
|
69
|
-
}
|
70
|
-
isExternalPromotion(resource) {
|
71
|
-
return resource.type && (resource.type === ExternalPromotions.TYPE);
|
72
|
-
}
|
73
|
-
relationship(id) {
|
74
|
-
return super.relationshipOneToOne(id);
|
75
|
-
}
|
76
|
-
relationshipToMany(...ids) {
|
77
|
-
return super.relationshipOneToMany(...ids);
|
78
|
-
}
|
79
|
-
type() {
|
80
|
-
return ExternalPromotions.TYPE;
|
81
|
-
}
|
82
|
-
}
|
83
|
-
export default ExternalPromotions;
|
@@ -1,46 +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 } from './markets';
|
5
|
-
import type { Attachment } from './attachments';
|
6
|
-
import type { Version } from './versions';
|
7
|
-
type ExternalTaxCalculatorType = 'external_tax_calculators';
|
8
|
-
type ExternalTaxCalculatorRel = ResourceRel & {
|
9
|
-
type: ExternalTaxCalculatorType;
|
10
|
-
};
|
11
|
-
interface ExternalTaxCalculator extends Resource {
|
12
|
-
readonly type: ExternalTaxCalculatorType;
|
13
|
-
name: string;
|
14
|
-
tax_calculator_url: string;
|
15
|
-
circuit_state?: string | null;
|
16
|
-
circuit_failure_count?: number | null;
|
17
|
-
shared_secret: string;
|
18
|
-
markets?: Market[] | null;
|
19
|
-
attachments?: Attachment[] | null;
|
20
|
-
versions?: Version[] | null;
|
21
|
-
}
|
22
|
-
interface ExternalTaxCalculatorCreate extends ResourceCreate {
|
23
|
-
name: string;
|
24
|
-
tax_calculator_url: string;
|
25
|
-
}
|
26
|
-
interface ExternalTaxCalculatorUpdate extends ResourceUpdate {
|
27
|
-
name?: string | null;
|
28
|
-
tax_calculator_url?: string | null;
|
29
|
-
_reset_circuit?: boolean | null;
|
30
|
-
}
|
31
|
-
declare class ExternalTaxCalculators extends ApiResource<ExternalTaxCalculator> {
|
32
|
-
static readonly TYPE: ExternalTaxCalculatorType;
|
33
|
-
create(resource: ExternalTaxCalculatorCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalTaxCalculator>;
|
34
|
-
update(resource: ExternalTaxCalculatorUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalTaxCalculator>;
|
35
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
36
|
-
markets(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
37
|
-
attachments(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
38
|
-
versions(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
39
|
-
_reset_circuit(id: string | ExternalTaxCalculator, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalTaxCalculator>;
|
40
|
-
isExternalTaxCalculator(resource: any): resource is ExternalTaxCalculator;
|
41
|
-
relationship(id: string | ResourceId | null): ExternalTaxCalculatorRel;
|
42
|
-
relationshipToMany(...ids: string[]): ExternalTaxCalculatorRel[];
|
43
|
-
type(): ExternalTaxCalculatorType;
|
44
|
-
}
|
45
|
-
export default ExternalTaxCalculators;
|
46
|
-
export type { ExternalTaxCalculator, ExternalTaxCalculatorCreate, ExternalTaxCalculatorUpdate, ExternalTaxCalculatorType };
|