@commercelayer/sdk 4.48.0 → 4.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +1 -126
- package/lib/cjs/api.js +1 -394
- package/lib/cjs/client.d.ts +1 -31
- package/lib/cjs/client.js +1 -123
- package/lib/cjs/commercelayer.d.ts +1 -152
- package/lib/cjs/commercelayer.js +1 -243
- package/lib/cjs/common.d.ts +1 -4
- package/lib/cjs/common.js +1 -14
- package/lib/cjs/config.d.ts +1 -11
- package/lib/cjs/config.js +1 -13
- package/lib/cjs/debug.d.ts +1 -3
- package/lib/cjs/debug.js +1 -42
- package/lib/cjs/error.d.ts +1 -28
- package/lib/cjs/error.js +1 -43
- package/lib/cjs/index.d.ts +1 -7
- package/lib/cjs/index.js +1 -29
- package/lib/cjs/interceptor.d.ts +1 -21
- package/lib/cjs/interceptor.js +1 -2
- package/lib/cjs/jsonapi.d.ts +1 -5
- package/lib/cjs/jsonapi.js +1 -82
- package/lib/cjs/model.d.ts +1 -124
- package/lib/cjs/model.js +1 -3
- package/lib/cjs/query.d.ts +1 -23
- package/lib/cjs/query.js +1 -51
- package/lib/cjs/resource.d.ts +1 -75
- package/lib/cjs/resource.js +1 -145
- package/lib/cjs/resources/addresses.d.ts +1 -102
- package/lib/cjs/resources/addresses.js +1 -49
- package/lib/cjs/resources/adjustments.d.ts +1 -41
- package/lib/cjs/resources/adjustments.js +1 -37
- package/lib/cjs/resources/adyen_gateways.d.ts +1 -59
- package/lib/cjs/resources/adyen_gateways.js +1 -45
- package/lib/cjs/resources/adyen_payments.d.ts +1 -49
- package/lib/cjs/resources/adyen_payments.js +1 -45
- package/lib/cjs/resources/application.d.ts +1 -21
- package/lib/cjs/resources/application.js +1 -21
- package/lib/cjs/resources/attachments.d.ts +1 -156
- package/lib/cjs/resources/attachments.js +1 -33
- package/lib/cjs/resources/authorizations.d.ts +1 -66
- package/lib/cjs/resources/authorizations.js +1 -51
- package/lib/cjs/resources/avalara_accounts.d.ts +1 -58
- package/lib/cjs/resources/avalara_accounts.js +1 -49
- package/lib/cjs/resources/axerve_gateways.d.ts +1 -47
- package/lib/cjs/resources/axerve_gateways.js +1 -45
- package/lib/cjs/resources/axerve_payments.d.ts +1 -52
- package/lib/cjs/resources/axerve_payments.js +1 -45
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -38
- package/lib/cjs/resources/billing_info_validation_rules.js +1 -45
- package/lib/cjs/resources/bing_geocoders.d.ts +1 -35
- package/lib/cjs/resources/bing_geocoders.js +1 -41
- package/lib/cjs/resources/braintree_gateways.d.ts +1 -59
- package/lib/cjs/resources/braintree_gateways.js +1 -45
- package/lib/cjs/resources/braintree_payments.d.ts +1 -51
- package/lib/cjs/resources/braintree_payments.js +1 -45
- package/lib/cjs/resources/bundles.d.ts +1 -90
- package/lib/cjs/resources/bundles.js +1 -61
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +1 -134
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +1 -81
- package/lib/cjs/resources/captures.d.ts +1 -57
- package/lib/cjs/resources/captures.js +1 -51
- package/lib/cjs/resources/carrier_accounts.d.ts +1 -29
- package/lib/cjs/resources/carrier_accounts.js +1 -36
- package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -48
- package/lib/cjs/resources/checkout_com_gateways.js +1 -45
- package/lib/cjs/resources/checkout_com_payments.d.ts +1 -62
- package/lib/cjs/resources/checkout_com_payments.js +1 -45
- package/lib/cjs/resources/cleanups.d.ts +1 -39
- package/lib/cjs/resources/cleanups.js +1 -38
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -66
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -41
- package/lib/cjs/resources/coupon_recipients.d.ts +1 -47
- package/lib/cjs/resources/coupon_recipients.js +1 -45
- package/lib/cjs/resources/coupons.d.ts +1 -70
- package/lib/cjs/resources/coupons.js +1 -53
- package/lib/cjs/resources/custom_promotion_rules.d.ts +1 -61
- package/lib/cjs/resources/custom_promotion_rules.js +1 -37
- package/lib/cjs/resources/customer_addresses.d.ts +1 -49
- package/lib/cjs/resources/customer_addresses.js +1 -49
- package/lib/cjs/resources/customer_groups.d.ts +1 -39
- package/lib/cjs/resources/customer_groups.js +1 -49
- package/lib/cjs/resources/customer_password_resets.d.ts +1 -36
- package/lib/cjs/resources/customer_password_resets.js +1 -41
- package/lib/cjs/resources/customer_payment_sources.d.ts +1 -85
- package/lib/cjs/resources/customer_payment_sources.js +1 -45
- package/lib/cjs/resources/customer_subscriptions.d.ts +1 -34
- package/lib/cjs/resources/customer_subscriptions.js +1 -45
- package/lib/cjs/resources/customers.d.ts +1 -75
- package/lib/cjs/resources/customers.js +1 -77
- package/lib/cjs/resources/delivery_lead_times.d.ts +1 -54
- package/lib/cjs/resources/delivery_lead_times.js +1 -49
- package/lib/cjs/resources/event_callbacks.d.ts +1 -24
- package/lib/cjs/resources/event_callbacks.js +1 -28
- package/lib/cjs/resources/events.d.ts +1 -24
- package/lib/cjs/resources/events.js +1 -32
- package/lib/cjs/resources/exports.d.ts +1 -40
- package/lib/cjs/resources/exports.js +1 -34
- package/lib/cjs/resources/external_gateways.d.ts +1 -55
- package/lib/cjs/resources/external_gateways.js +1 -45
- package/lib/cjs/resources/external_payments.d.ts +1 -47
- package/lib/cjs/resources/external_payments.js +1 -49
- package/lib/cjs/resources/external_promotions.d.ts +1 -132
- package/lib/cjs/resources/external_promotions.js +1 -81
- package/lib/cjs/resources/external_tax_calculators.d.ts +1 -43
- package/lib/cjs/resources/external_tax_calculators.js +1 -45
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -130
- package/lib/cjs/resources/fixed_amount_promotions.js +1 -81
- package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -130
- package/lib/cjs/resources/fixed_price_promotions.js +1 -81
- package/lib/cjs/resources/free_gift_promotions.d.ts +1 -128
- package/lib/cjs/resources/free_gift_promotions.js +1 -81
- package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -122
- package/lib/cjs/resources/free_shipping_promotions.js +1 -77
- package/lib/cjs/resources/geocoders.d.ts +1 -24
- package/lib/cjs/resources/geocoders.js +1 -32
- package/lib/cjs/resources/gift_card_recipients.d.ts +1 -47
- package/lib/cjs/resources/gift_card_recipients.js +1 -45
- package/lib/cjs/resources/gift_cards.d.ts +1 -99
- package/lib/cjs/resources/gift_cards.js +1 -57
- package/lib/cjs/resources/google_geocoders.d.ts +1 -35
- package/lib/cjs/resources/google_geocoders.js +1 -41
- package/lib/cjs/resources/imports.d.ts +1 -43
- package/lib/cjs/resources/imports.js +1 -34
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -65
- package/lib/cjs/resources/in_stock_subscriptions.js +1 -53
- package/lib/cjs/resources/inventory_models.d.ts +1 -54
- package/lib/cjs/resources/inventory_models.js +1 -49
- package/lib/cjs/resources/inventory_return_locations.d.ts +1 -46
- package/lib/cjs/resources/inventory_return_locations.js +1 -45
- package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -49
- package/lib/cjs/resources/inventory_stock_locations.js +1 -45
- package/lib/cjs/resources/klarna_gateways.d.ts +1 -47
- package/lib/cjs/resources/klarna_gateways.js +1 -45
- package/lib/cjs/resources/klarna_payments.d.ts +1 -46
- package/lib/cjs/resources/klarna_payments.js +1 -45
- package/lib/cjs/resources/line_item_options.d.ts +1 -68
- package/lib/cjs/resources/line_item_options.js +1 -49
- package/lib/cjs/resources/line_items.d.ts +1 -166
- package/lib/cjs/resources/line_items.js +1 -65
- package/lib/cjs/resources/manual_gateways.d.ts +1 -33
- package/lib/cjs/resources/manual_gateways.js +1 -41
- package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -44
- package/lib/cjs/resources/manual_tax_calculators.js +1 -49
- package/lib/cjs/resources/markets.d.ts +1 -104
- package/lib/cjs/resources/markets.js +1 -65
- package/lib/cjs/resources/merchants.d.ts +1 -41
- package/lib/cjs/resources/merchants.js +1 -45
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -66
- package/lib/cjs/resources/order_amount_promotion_rules.js +1 -37
- package/lib/cjs/resources/order_copies.d.ts +1 -50
- package/lib/cjs/resources/order_copies.js +1 -49
- package/lib/cjs/resources/order_factories.d.ts +1 -33
- package/lib/cjs/resources/order_factories.js +1 -36
- package/lib/cjs/resources/order_subscription_items.d.ts +1 -71
- package/lib/cjs/resources/order_subscription_items.js +1 -41
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -94
- package/lib/cjs/resources/order_subscriptions.js +1 -77
- package/lib/cjs/resources/order_validation_rules.d.ts +1 -26
- package/lib/cjs/resources/order_validation_rules.js +1 -36
- package/lib/cjs/resources/orders.d.ts +1 -359
- package/lib/cjs/resources/orders.js +1 -157
- package/lib/cjs/resources/organization.d.ts +1 -33
- package/lib/cjs/resources/organization.js +1 -21
- package/lib/cjs/resources/packages.d.ts +1 -59
- package/lib/cjs/resources/packages.js +1 -49
- package/lib/cjs/resources/parcel_line_items.d.ts +1 -46
- package/lib/cjs/resources/parcel_line_items.js +1 -45
- package/lib/cjs/resources/parcels.d.ts +1 -125
- package/lib/cjs/resources/parcels.js +1 -57
- package/lib/cjs/resources/payment_gateways.d.ts +1 -24
- package/lib/cjs/resources/payment_gateways.js +1 -32
- package/lib/cjs/resources/payment_methods.d.ts +1 -80
- package/lib/cjs/resources/payment_methods.js +1 -49
- package/lib/cjs/resources/payment_options.d.ts +1 -43
- package/lib/cjs/resources/payment_options.js +1 -41
- package/lib/cjs/resources/paypal_gateways.d.ts +1 -40
- package/lib/cjs/resources/paypal_gateways.js +1 -45
- package/lib/cjs/resources/paypal_payments.d.ts +1 -52
- package/lib/cjs/resources/paypal_payments.js +1 -45
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -128
- package/lib/cjs/resources/percentage_discount_promotions.js +1 -81
- package/lib/cjs/resources/price_frequency_tiers.d.ts +1 -52
- package/lib/cjs/resources/price_frequency_tiers.js +1 -49
- package/lib/cjs/resources/price_lists.d.ts +1 -45
- package/lib/cjs/resources/price_lists.js +1 -45
- package/lib/cjs/resources/price_tiers.d.ts +1 -31
- package/lib/cjs/resources/price_tiers.js +1 -36
- package/lib/cjs/resources/price_volume_tiers.d.ts +1 -52
- package/lib/cjs/resources/price_volume_tiers.js +1 -49
- package/lib/cjs/resources/prices.d.ts +1 -83
- package/lib/cjs/resources/prices.js +1 -73
- package/lib/cjs/resources/promotion_rules.d.ts +1 -28
- package/lib/cjs/resources/promotion_rules.js +1 -28
- package/lib/cjs/resources/promotions.d.ts +1 -62
- package/lib/cjs/resources/promotions.js +1 -68
- package/lib/cjs/resources/recurring_order_copies.d.ts +1 -52
- package/lib/cjs/resources/recurring_order_copies.js +1 -49
- package/lib/cjs/resources/refunds.d.ts +1 -43
- package/lib/cjs/resources/refunds.js +1 -44
- package/lib/cjs/resources/reserved_stocks.d.ts +1 -27
- package/lib/cjs/resources/reserved_stocks.js +1 -36
- package/lib/cjs/resources/resource_errors.d.ts +1 -22
- package/lib/cjs/resources/resource_errors.js +1 -24
- package/lib/cjs/resources/return_line_items.d.ts +1 -50
- package/lib/cjs/resources/return_line_items.js +1 -41
- package/lib/cjs/resources/returns.d.ts +1 -86
- package/lib/cjs/resources/returns.js +1 -73
- package/lib/cjs/resources/satispay_gateways.d.ts +1 -45
- package/lib/cjs/resources/satispay_gateways.js +1 -45
- package/lib/cjs/resources/satispay_payments.d.ts +1 -48
- package/lib/cjs/resources/satispay_payments.js +1 -45
- package/lib/cjs/resources/shipments.d.ts +1 -139
- package/lib/cjs/resources/shipments.js +1 -105
- package/lib/cjs/resources/shipping_categories.d.ts +1 -39
- package/lib/cjs/resources/shipping_categories.js +1 -45
- package/lib/cjs/resources/shipping_method_tiers.d.ts +1 -31
- package/lib/cjs/resources/shipping_method_tiers.js +1 -36
- package/lib/cjs/resources/shipping_methods.d.ts +1 -121
- package/lib/cjs/resources/shipping_methods.js +1 -69
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +1 -49
- package/lib/cjs/resources/shipping_weight_tiers.js +1 -45
- package/lib/cjs/resources/shipping_zones.d.ts +1 -51
- package/lib/cjs/resources/shipping_zones.js +1 -41
- package/lib/cjs/resources/sku_list_items.d.ts +1 -50
- package/lib/cjs/resources/sku_list_items.js +1 -45
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -75
- package/lib/cjs/resources/sku_list_promotion_rules.js +1 -45
- package/lib/cjs/resources/sku_lists.d.ts +1 -63
- package/lib/cjs/resources/sku_lists.js +1 -57
- package/lib/cjs/resources/sku_options.d.ts +1 -70
- package/lib/cjs/resources/sku_options.js +1 -53
- package/lib/cjs/resources/skus.d.ts +1 -95
- package/lib/cjs/resources/skus.js +1 -73
- package/lib/cjs/resources/stock_items.d.ts +1 -59
- package/lib/cjs/resources/stock_items.js +1 -57
- package/lib/cjs/resources/stock_line_items.d.ts +1 -69
- package/lib/cjs/resources/stock_line_items.js +1 -53
- package/lib/cjs/resources/stock_locations.d.ts +1 -63
- package/lib/cjs/resources/stock_locations.js +1 -61
- package/lib/cjs/resources/stock_reservations.d.ts +1 -49
- package/lib/cjs/resources/stock_reservations.js +1 -53
- package/lib/cjs/resources/stock_transfers.d.ts +1 -79
- package/lib/cjs/resources/stock_transfers.js +1 -61
- package/lib/cjs/resources/stripe_gateways.d.ts +1 -44
- package/lib/cjs/resources/stripe_gateways.js +1 -45
- package/lib/cjs/resources/stripe_payments.d.ts +1 -56
- package/lib/cjs/resources/stripe_payments.js +1 -45
- package/lib/cjs/resources/subscription_models.d.ts +1 -48
- package/lib/cjs/resources/subscription_models.js +1 -45
- package/lib/cjs/resources/tags.d.ts +1 -27
- package/lib/cjs/resources/tags.js +1 -33
- package/lib/cjs/resources/tax_calculators.d.ts +1 -27
- package/lib/cjs/resources/tax_calculators.js +1 -36
- package/lib/cjs/resources/tax_categories.d.ts +1 -62
- package/lib/cjs/resources/tax_categories.js +1 -45
- package/lib/cjs/resources/tax_rules.d.ts +1 -72
- package/lib/cjs/resources/tax_rules.js +1 -41
- package/lib/cjs/resources/taxjar_accounts.d.ts +1 -46
- package/lib/cjs/resources/taxjar_accounts.js +1 -49
- package/lib/cjs/resources/transactions.d.ts +1 -40
- package/lib/cjs/resources/transactions.js +1 -40
- package/lib/cjs/resources/versions.d.ts +1 -22
- package/lib/cjs/resources/versions.js +1 -24
- package/lib/cjs/resources/voids.d.ts +1 -43
- package/lib/cjs/resources/voids.js +1 -44
- package/lib/cjs/resources/webhooks.d.ts +1 -51
- package/lib/cjs/resources/webhooks.js +1 -41
- package/lib/cjs/resources/wire_transfers.d.ts +1 -36
- package/lib/cjs/resources/wire_transfers.js +1 -41
- package/lib/cjs/static.d.ts +1 -9
- package/lib/cjs/static.js +1 -45
- package/lib/cjs/util.d.ts +1 -6
- package/lib/cjs/util.js +1 -15
- package/lib/esm/api.d.ts +1 -126
- package/lib/esm/api.js +1 -265
- package/lib/esm/client.d.ts +1 -31
- package/lib/esm/client.js +1 -118
- package/lib/esm/commercelayer.d.ts +1 -152
- package/lib/esm/commercelayer.js +1 -214
- package/lib/esm/common.d.ts +1 -4
- package/lib/esm/common.js +1 -10
- package/lib/esm/config.d.ts +1 -11
- package/lib/esm/config.js +1 -11
- package/lib/esm/debug.d.ts +1 -3
- package/lib/esm/debug.js +1 -40
- package/lib/esm/error.d.ts +1 -28
- package/lib/esm/error.js +1 -38
- package/lib/esm/index.d.ts +1 -7
- package/lib/esm/index.js +1 -6
- package/lib/esm/interceptor.d.ts +1 -21
- package/lib/esm/interceptor.js +1 -1
- package/lib/esm/jsonapi.d.ts +1 -5
- package/lib/esm/jsonapi.js +1 -75
- package/lib/esm/model.d.ts +1 -124
- package/lib/esm/model.js +1 -2
- package/lib/esm/query.d.ts +1 -23
- package/lib/esm/query.js +1 -45
- package/lib/esm/resource.d.ts +1 -75
- package/lib/esm/resource.js +1 -139
- package/lib/esm/resources/addresses.d.ts +1 -102
- package/lib/esm/resources/addresses.js +1 -47
- package/lib/esm/resources/adjustments.d.ts +1 -41
- package/lib/esm/resources/adjustments.js +1 -35
- package/lib/esm/resources/adyen_gateways.d.ts +1 -59
- package/lib/esm/resources/adyen_gateways.js +1 -43
- package/lib/esm/resources/adyen_payments.d.ts +1 -49
- package/lib/esm/resources/adyen_payments.js +1 -43
- package/lib/esm/resources/application.d.ts +1 -21
- package/lib/esm/resources/application.js +1 -19
- package/lib/esm/resources/attachments.d.ts +1 -156
- package/lib/esm/resources/attachments.js +1 -31
- package/lib/esm/resources/authorizations.d.ts +1 -66
- package/lib/esm/resources/authorizations.js +1 -49
- package/lib/esm/resources/avalara_accounts.d.ts +1 -58
- package/lib/esm/resources/avalara_accounts.js +1 -47
- package/lib/esm/resources/axerve_gateways.d.ts +1 -47
- package/lib/esm/resources/axerve_gateways.js +1 -43
- package/lib/esm/resources/axerve_payments.d.ts +1 -52
- package/lib/esm/resources/axerve_payments.js +1 -43
- package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -38
- package/lib/esm/resources/billing_info_validation_rules.js +1 -43
- package/lib/esm/resources/bing_geocoders.d.ts +1 -35
- package/lib/esm/resources/bing_geocoders.js +1 -39
- package/lib/esm/resources/braintree_gateways.d.ts +1 -59
- package/lib/esm/resources/braintree_gateways.js +1 -43
- package/lib/esm/resources/braintree_payments.d.ts +1 -51
- package/lib/esm/resources/braintree_payments.js +1 -43
- package/lib/esm/resources/bundles.d.ts +1 -90
- package/lib/esm/resources/bundles.js +1 -59
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +1 -134
- package/lib/esm/resources/buy_x_pay_y_promotions.js +1 -79
- package/lib/esm/resources/captures.d.ts +1 -57
- package/lib/esm/resources/captures.js +1 -49
- package/lib/esm/resources/carrier_accounts.d.ts +1 -29
- package/lib/esm/resources/carrier_accounts.js +1 -34
- package/lib/esm/resources/checkout_com_gateways.d.ts +1 -48
- package/lib/esm/resources/checkout_com_gateways.js +1 -43
- package/lib/esm/resources/checkout_com_payments.d.ts +1 -62
- package/lib/esm/resources/checkout_com_payments.js +1 -43
- package/lib/esm/resources/cleanups.d.ts +1 -39
- package/lib/esm/resources/cleanups.js +1 -36
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -66
- package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -39
- package/lib/esm/resources/coupon_recipients.d.ts +1 -47
- package/lib/esm/resources/coupon_recipients.js +1 -43
- package/lib/esm/resources/coupons.d.ts +1 -70
- package/lib/esm/resources/coupons.js +1 -51
- package/lib/esm/resources/custom_promotion_rules.d.ts +1 -61
- package/lib/esm/resources/custom_promotion_rules.js +1 -35
- package/lib/esm/resources/customer_addresses.d.ts +1 -49
- package/lib/esm/resources/customer_addresses.js +1 -47
- package/lib/esm/resources/customer_groups.d.ts +1 -39
- package/lib/esm/resources/customer_groups.js +1 -47
- package/lib/esm/resources/customer_password_resets.d.ts +1 -36
- package/lib/esm/resources/customer_password_resets.js +1 -39
- package/lib/esm/resources/customer_payment_sources.d.ts +1 -85
- package/lib/esm/resources/customer_payment_sources.js +1 -43
- package/lib/esm/resources/customer_subscriptions.d.ts +1 -34
- package/lib/esm/resources/customer_subscriptions.js +1 -43
- package/lib/esm/resources/customers.d.ts +1 -75
- package/lib/esm/resources/customers.js +1 -75
- package/lib/esm/resources/delivery_lead_times.d.ts +1 -54
- package/lib/esm/resources/delivery_lead_times.js +1 -47
- package/lib/esm/resources/event_callbacks.d.ts +1 -24
- package/lib/esm/resources/event_callbacks.js +1 -26
- package/lib/esm/resources/events.d.ts +1 -24
- package/lib/esm/resources/events.js +1 -30
- package/lib/esm/resources/exports.d.ts +1 -40
- package/lib/esm/resources/exports.js +1 -32
- package/lib/esm/resources/external_gateways.d.ts +1 -55
- package/lib/esm/resources/external_gateways.js +1 -43
- package/lib/esm/resources/external_payments.d.ts +1 -47
- package/lib/esm/resources/external_payments.js +1 -47
- package/lib/esm/resources/external_promotions.d.ts +1 -132
- package/lib/esm/resources/external_promotions.js +1 -79
- package/lib/esm/resources/external_tax_calculators.d.ts +1 -43
- package/lib/esm/resources/external_tax_calculators.js +1 -43
- package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -130
- package/lib/esm/resources/fixed_amount_promotions.js +1 -79
- package/lib/esm/resources/fixed_price_promotions.d.ts +1 -130
- package/lib/esm/resources/fixed_price_promotions.js +1 -79
- package/lib/esm/resources/free_gift_promotions.d.ts +1 -128
- package/lib/esm/resources/free_gift_promotions.js +1 -79
- package/lib/esm/resources/free_shipping_promotions.d.ts +1 -122
- package/lib/esm/resources/free_shipping_promotions.js +1 -75
- package/lib/esm/resources/geocoders.d.ts +1 -24
- package/lib/esm/resources/geocoders.js +1 -30
- package/lib/esm/resources/gift_card_recipients.d.ts +1 -47
- package/lib/esm/resources/gift_card_recipients.js +1 -43
- package/lib/esm/resources/gift_cards.d.ts +1 -99
- package/lib/esm/resources/gift_cards.js +1 -55
- package/lib/esm/resources/google_geocoders.d.ts +1 -35
- package/lib/esm/resources/google_geocoders.js +1 -39
- package/lib/esm/resources/imports.d.ts +1 -43
- package/lib/esm/resources/imports.js +1 -32
- package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -65
- package/lib/esm/resources/in_stock_subscriptions.js +1 -51
- package/lib/esm/resources/inventory_models.d.ts +1 -54
- package/lib/esm/resources/inventory_models.js +1 -47
- package/lib/esm/resources/inventory_return_locations.d.ts +1 -46
- package/lib/esm/resources/inventory_return_locations.js +1 -43
- package/lib/esm/resources/inventory_stock_locations.d.ts +1 -49
- package/lib/esm/resources/inventory_stock_locations.js +1 -43
- package/lib/esm/resources/klarna_gateways.d.ts +1 -47
- package/lib/esm/resources/klarna_gateways.js +1 -43
- package/lib/esm/resources/klarna_payments.d.ts +1 -46
- package/lib/esm/resources/klarna_payments.js +1 -43
- package/lib/esm/resources/line_item_options.d.ts +1 -68
- package/lib/esm/resources/line_item_options.js +1 -47
- package/lib/esm/resources/line_items.d.ts +1 -166
- package/lib/esm/resources/line_items.js +1 -63
- package/lib/esm/resources/manual_gateways.d.ts +1 -33
- package/lib/esm/resources/manual_gateways.js +1 -39
- package/lib/esm/resources/manual_tax_calculators.d.ts +1 -44
- package/lib/esm/resources/manual_tax_calculators.js +1 -47
- package/lib/esm/resources/markets.d.ts +1 -104
- package/lib/esm/resources/markets.js +1 -63
- package/lib/esm/resources/merchants.d.ts +1 -41
- package/lib/esm/resources/merchants.js +1 -43
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -66
- package/lib/esm/resources/order_amount_promotion_rules.js +1 -35
- package/lib/esm/resources/order_copies.d.ts +1 -50
- package/lib/esm/resources/order_copies.js +1 -47
- package/lib/esm/resources/order_factories.d.ts +1 -33
- package/lib/esm/resources/order_factories.js +1 -34
- package/lib/esm/resources/order_subscription_items.d.ts +1 -71
- package/lib/esm/resources/order_subscription_items.js +1 -39
- package/lib/esm/resources/order_subscriptions.d.ts +1 -94
- package/lib/esm/resources/order_subscriptions.js +1 -75
- package/lib/esm/resources/order_validation_rules.d.ts +1 -26
- package/lib/esm/resources/order_validation_rules.js +1 -34
- package/lib/esm/resources/orders.d.ts +1 -359
- package/lib/esm/resources/orders.js +1 -155
- package/lib/esm/resources/organization.d.ts +1 -33
- package/lib/esm/resources/organization.js +1 -19
- package/lib/esm/resources/packages.d.ts +1 -59
- package/lib/esm/resources/packages.js +1 -47
- package/lib/esm/resources/parcel_line_items.d.ts +1 -46
- package/lib/esm/resources/parcel_line_items.js +1 -43
- package/lib/esm/resources/parcels.d.ts +1 -125
- package/lib/esm/resources/parcels.js +1 -55
- package/lib/esm/resources/payment_gateways.d.ts +1 -24
- package/lib/esm/resources/payment_gateways.js +1 -30
- package/lib/esm/resources/payment_methods.d.ts +1 -80
- package/lib/esm/resources/payment_methods.js +1 -47
- package/lib/esm/resources/payment_options.d.ts +1 -43
- package/lib/esm/resources/payment_options.js +1 -39
- package/lib/esm/resources/paypal_gateways.d.ts +1 -40
- package/lib/esm/resources/paypal_gateways.js +1 -43
- package/lib/esm/resources/paypal_payments.d.ts +1 -52
- package/lib/esm/resources/paypal_payments.js +1 -43
- package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -128
- package/lib/esm/resources/percentage_discount_promotions.js +1 -79
- package/lib/esm/resources/price_frequency_tiers.d.ts +1 -52
- package/lib/esm/resources/price_frequency_tiers.js +1 -47
- package/lib/esm/resources/price_lists.d.ts +1 -45
- package/lib/esm/resources/price_lists.js +1 -43
- package/lib/esm/resources/price_tiers.d.ts +1 -31
- package/lib/esm/resources/price_tiers.js +1 -34
- package/lib/esm/resources/price_volume_tiers.d.ts +1 -52
- package/lib/esm/resources/price_volume_tiers.js +1 -47
- package/lib/esm/resources/prices.d.ts +1 -83
- package/lib/esm/resources/prices.js +1 -71
- package/lib/esm/resources/promotion_rules.d.ts +1 -28
- package/lib/esm/resources/promotion_rules.js +1 -26
- package/lib/esm/resources/promotions.d.ts +1 -62
- package/lib/esm/resources/promotions.js +1 -66
- package/lib/esm/resources/recurring_order_copies.d.ts +1 -52
- package/lib/esm/resources/recurring_order_copies.js +1 -47
- package/lib/esm/resources/refunds.d.ts +1 -43
- package/lib/esm/resources/refunds.js +1 -42
- package/lib/esm/resources/reserved_stocks.d.ts +1 -27
- package/lib/esm/resources/reserved_stocks.js +1 -34
- package/lib/esm/resources/resource_errors.d.ts +1 -22
- package/lib/esm/resources/resource_errors.js +1 -22
- package/lib/esm/resources/return_line_items.d.ts +1 -50
- package/lib/esm/resources/return_line_items.js +1 -39
- package/lib/esm/resources/returns.d.ts +1 -86
- package/lib/esm/resources/returns.js +1 -71
- package/lib/esm/resources/satispay_gateways.d.ts +1 -45
- package/lib/esm/resources/satispay_gateways.js +1 -43
- package/lib/esm/resources/satispay_payments.d.ts +1 -48
- package/lib/esm/resources/satispay_payments.js +1 -43
- package/lib/esm/resources/shipments.d.ts +1 -139
- package/lib/esm/resources/shipments.js +1 -103
- package/lib/esm/resources/shipping_categories.d.ts +1 -39
- package/lib/esm/resources/shipping_categories.js +1 -43
- package/lib/esm/resources/shipping_method_tiers.d.ts +1 -31
- package/lib/esm/resources/shipping_method_tiers.js +1 -34
- package/lib/esm/resources/shipping_methods.d.ts +1 -121
- package/lib/esm/resources/shipping_methods.js +1 -67
- package/lib/esm/resources/shipping_weight_tiers.d.ts +1 -49
- package/lib/esm/resources/shipping_weight_tiers.js +1 -43
- package/lib/esm/resources/shipping_zones.d.ts +1 -51
- package/lib/esm/resources/shipping_zones.js +1 -39
- package/lib/esm/resources/sku_list_items.d.ts +1 -50
- package/lib/esm/resources/sku_list_items.js +1 -43
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -75
- package/lib/esm/resources/sku_list_promotion_rules.js +1 -43
- package/lib/esm/resources/sku_lists.d.ts +1 -63
- package/lib/esm/resources/sku_lists.js +1 -55
- package/lib/esm/resources/sku_options.d.ts +1 -70
- package/lib/esm/resources/sku_options.js +1 -51
- package/lib/esm/resources/skus.d.ts +1 -95
- package/lib/esm/resources/skus.js +1 -71
- package/lib/esm/resources/stock_items.d.ts +1 -59
- package/lib/esm/resources/stock_items.js +1 -55
- package/lib/esm/resources/stock_line_items.d.ts +1 -69
- package/lib/esm/resources/stock_line_items.js +1 -51
- package/lib/esm/resources/stock_locations.d.ts +1 -63
- package/lib/esm/resources/stock_locations.js +1 -59
- package/lib/esm/resources/stock_reservations.d.ts +1 -49
- package/lib/esm/resources/stock_reservations.js +1 -51
- package/lib/esm/resources/stock_transfers.d.ts +1 -79
- package/lib/esm/resources/stock_transfers.js +1 -59
- package/lib/esm/resources/stripe_gateways.d.ts +1 -44
- package/lib/esm/resources/stripe_gateways.js +1 -43
- package/lib/esm/resources/stripe_payments.d.ts +1 -56
- package/lib/esm/resources/stripe_payments.js +1 -43
- package/lib/esm/resources/subscription_models.d.ts +1 -48
- package/lib/esm/resources/subscription_models.js +1 -43
- package/lib/esm/resources/tags.d.ts +1 -27
- package/lib/esm/resources/tags.js +1 -31
- package/lib/esm/resources/tax_calculators.d.ts +1 -27
- package/lib/esm/resources/tax_calculators.js +1 -34
- package/lib/esm/resources/tax_categories.d.ts +1 -62
- package/lib/esm/resources/tax_categories.js +1 -43
- package/lib/esm/resources/tax_rules.d.ts +1 -72
- package/lib/esm/resources/tax_rules.js +1 -39
- package/lib/esm/resources/taxjar_accounts.d.ts +1 -46
- package/lib/esm/resources/taxjar_accounts.js +1 -47
- package/lib/esm/resources/transactions.d.ts +1 -40
- package/lib/esm/resources/transactions.js +1 -38
- package/lib/esm/resources/versions.d.ts +1 -22
- package/lib/esm/resources/versions.js +1 -22
- package/lib/esm/resources/voids.d.ts +1 -43
- package/lib/esm/resources/voids.js +1 -42
- package/lib/esm/resources/webhooks.d.ts +1 -51
- package/lib/esm/resources/webhooks.js +1 -39
- package/lib/esm/resources/wire_transfers.d.ts +1 -36
- package/lib/esm/resources/wire_transfers.js +1 -39
- package/lib/esm/static.d.ts +1 -9
- package/lib/esm/static.js +1 -19
- package/lib/esm/util.d.ts +1 -6
- package/lib/esm/util.js +1 -11
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -1,71 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { OrderSubscription } from './order_subscriptions';
|
4
|
-
import type { Adjustment } from './adjustments';
|
5
|
-
import type { Bundle } from './bundles';
|
6
|
-
import type { Sku } from './skus';
|
7
|
-
import type { LineItem } from './line_items';
|
8
|
-
type OrderSubscriptionItemRel = ResourceRel & {
|
9
|
-
type: typeof OrderSubscriptionItems.TYPE;
|
10
|
-
};
|
11
|
-
type OrderSubscriptionRel = ResourceRel & {
|
12
|
-
type: 'order_subscriptions';
|
13
|
-
};
|
14
|
-
type AdjustmentRel = ResourceRel & {
|
15
|
-
type: 'adjustments';
|
16
|
-
};
|
17
|
-
type BundleRel = ResourceRel & {
|
18
|
-
type: 'bundles';
|
19
|
-
};
|
20
|
-
type SkuRel = ResourceRel & {
|
21
|
-
type: 'skus';
|
22
|
-
};
|
23
|
-
interface OrderSubscriptionItem extends Resource {
|
24
|
-
sku_code?: string;
|
25
|
-
bundle_code?: string;
|
26
|
-
quantity?: number;
|
27
|
-
unit_amount_cents?: number;
|
28
|
-
unit_amount_float?: number;
|
29
|
-
formatted_unit_amount?: string;
|
30
|
-
total_amount_cents?: number;
|
31
|
-
total_amount_float?: number;
|
32
|
-
formatted_total_amount?: string;
|
33
|
-
order_subscription?: OrderSubscription;
|
34
|
-
item?: Adjustment | Bundle | Sku;
|
35
|
-
sku?: Sku;
|
36
|
-
bundle?: Bundle;
|
37
|
-
adjustment?: Adjustment;
|
38
|
-
source_line_item?: LineItem;
|
39
|
-
}
|
40
|
-
interface OrderSubscriptionItemCreate extends ResourceCreate {
|
41
|
-
sku_code?: string;
|
42
|
-
bundle_code?: string;
|
43
|
-
quantity: number;
|
44
|
-
unit_amount_cents?: number;
|
45
|
-
order_subscription: OrderSubscriptionRel;
|
46
|
-
item: AdjustmentRel | BundleRel | SkuRel;
|
47
|
-
sku?: SkuRel;
|
48
|
-
bundle?: BundleRel;
|
49
|
-
adjustment?: AdjustmentRel;
|
50
|
-
}
|
51
|
-
interface OrderSubscriptionItemUpdate extends ResourceUpdate {
|
52
|
-
sku_code?: string;
|
53
|
-
bundle_code?: string;
|
54
|
-
quantity?: number;
|
55
|
-
unit_amount_cents?: number;
|
56
|
-
}
|
57
|
-
declare class OrderSubscriptionItems extends ApiResource {
|
58
|
-
static readonly TYPE: 'order_subscription_items';
|
59
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderSubscriptionItem>>;
|
60
|
-
create(resource: OrderSubscriptionItemCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscriptionItem>;
|
61
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscriptionItem>;
|
62
|
-
update(resource: OrderSubscriptionItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscriptionItem>;
|
63
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
64
|
-
order_subscription(orderSubscriptionItemId: string | OrderSubscriptionItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
|
65
|
-
source_line_item(orderSubscriptionItemId: string | OrderSubscriptionItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
66
|
-
isOrderSubscriptionItem(resource: any): resource is OrderSubscriptionItem;
|
67
|
-
relationship(id: string | ResourceId | null): OrderSubscriptionItemRel;
|
68
|
-
type(): string;
|
69
|
-
}
|
70
|
-
export default OrderSubscriptionItems;
|
71
|
-
export { OrderSubscriptionItem, OrderSubscriptionItemCreate, OrderSubscriptionItemUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{OrderSubscription}from'./order_subscriptions';import type{Adjustment}from'./adjustments';import type{Bundle}from'./bundles';import type{Sku}from'./skus';import type{LineItem}from'./line_items';type OrderSubscriptionItemRel=ResourceRel&{type:typeof OrderSubscriptionItems.TYPE;};type OrderSubscriptionRel=ResourceRel&{type:'order_subscriptions';};type AdjustmentRel=ResourceRel&{type:'adjustments';};type BundleRel=ResourceRel&{type:'bundles';};type SkuRel=ResourceRel&{type:'skus';};interface OrderSubscriptionItem extends Resource{sku_code?:string;bundle_code?:string;quantity?:number;unit_amount_cents?:number;unit_amount_float?:number;formatted_unit_amount?:string;total_amount_cents?:number;total_amount_float?:number;formatted_total_amount?:string;order_subscription?:OrderSubscription;item?:Adjustment|Bundle|Sku;sku?:Sku;bundle?:Bundle;adjustment?:Adjustment;source_line_item?:LineItem;}interface OrderSubscriptionItemCreate extends ResourceCreate{sku_code?:string;bundle_code?:string;quantity:number;unit_amount_cents?:number;order_subscription:OrderSubscriptionRel;item:AdjustmentRel|BundleRel|SkuRel;sku?:SkuRel;bundle?:BundleRel;adjustment?:AdjustmentRel;}interface OrderSubscriptionItemUpdate extends ResourceUpdate{sku_code?:string;bundle_code?:string;quantity?:number;unit_amount_cents?:number;}declare class OrderSubscriptionItems extends ApiResource{static readonly TYPE:'order_subscription_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderSubscriptionItem>>;create(resource:OrderSubscriptionItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscriptionItem>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscriptionItem>;update(resource:OrderSubscriptionItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscriptionItem>;delete(id:string,options?:ResourcesConfig):Promise<void>;order_subscription(orderSubscriptionItemId:string|OrderSubscriptionItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;source_line_item(orderSubscriptionItemId:string|OrderSubscriptionItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;isOrderSubscriptionItem(resource:any):resource is OrderSubscriptionItem;relationship(id:string|ResourceId|null):OrderSubscriptionItemRel;type():string;}export default OrderSubscriptionItems;export{OrderSubscriptionItem,OrderSubscriptionItemCreate,OrderSubscriptionItemUpdate};
|
@@ -1,41 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class OrderSubscriptionItems extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'order_subscription_items'
|
6
|
-
async list(params, options) {
|
7
|
-
return this.resources.list({ type: OrderSubscriptionItems.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async create(resource, params, options) {
|
10
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: OrderSubscriptionItems.TYPE }), params, options);
|
11
|
-
}
|
12
|
-
async retrieve(id, params, options) {
|
13
|
-
return this.resources.retrieve({ type: OrderSubscriptionItems.TYPE, id }, params, options);
|
14
|
-
}
|
15
|
-
async update(resource, params, options) {
|
16
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: OrderSubscriptionItems.TYPE }), params, options);
|
17
|
-
}
|
18
|
-
async delete(id, options) {
|
19
|
-
await this.resources.delete({ type: OrderSubscriptionItems.TYPE, id }, options);
|
20
|
-
}
|
21
|
-
async order_subscription(orderSubscriptionItemId, params, options) {
|
22
|
-
const _orderSubscriptionItemId = orderSubscriptionItemId.id || orderSubscriptionItemId;
|
23
|
-
return this.resources.fetch({ type: 'order_subscriptions' }, `order_subscription_items/${_orderSubscriptionItemId}/order_subscription`, params, options);
|
24
|
-
}
|
25
|
-
async source_line_item(orderSubscriptionItemId, params, options) {
|
26
|
-
const _orderSubscriptionItemId = orderSubscriptionItemId.id || orderSubscriptionItemId;
|
27
|
-
return this.resources.fetch({ type: 'line_items' }, `order_subscription_items/${_orderSubscriptionItemId}/source_line_item`, params, options);
|
28
|
-
}
|
29
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
30
|
-
isOrderSubscriptionItem(resource) {
|
31
|
-
return resource.type && (resource.type === OrderSubscriptionItems.TYPE);
|
32
|
-
}
|
33
|
-
relationship(id) {
|
34
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: OrderSubscriptionItems.TYPE } : { id: id.id, type: OrderSubscriptionItems.TYPE };
|
35
|
-
}
|
36
|
-
type() {
|
37
|
-
return OrderSubscriptionItems.TYPE;
|
38
|
-
}
|
39
|
-
}
|
40
|
-
OrderSubscriptionItems.TYPE = 'order_subscription_items';
|
41
|
-
exports.default = OrderSubscriptionItems;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class OrderSubscriptionItems extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:OrderSubscriptionItems.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:OrderSubscriptionItems.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:OrderSubscriptionItems.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:OrderSubscriptionItems.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:OrderSubscriptionItems.TYPE,id:e},s)}async order_subscription(e,s,t){const r=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`order_subscription_items/${r}/order_subscription`,s,t)}async source_line_item(e,s,t){const r=e.id||e;return this.resources.fetch({type:"line_items"},`order_subscription_items/${r}/source_line_item`,s,t)}isOrderSubscriptionItem(e){return e.type&&e.type===OrderSubscriptionItems.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:OrderSubscriptionItems.TYPE}:{id:e.id,type:OrderSubscriptionItems.TYPE}}type(){return OrderSubscriptionItems.TYPE}}OrderSubscriptionItems.TYPE="order_subscription_items",exports.default=OrderSubscriptionItems;
|
@@ -1,94 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Market } from './markets';
|
4
|
-
import type { SubscriptionModel } from './subscription_models';
|
5
|
-
import type { Order } from './orders';
|
6
|
-
import type { Customer } from './customers';
|
7
|
-
import type { CustomerPaymentSource } from './customer_payment_sources';
|
8
|
-
import type { OrderSubscriptionItem } from './order_subscription_items';
|
9
|
-
import type { OrderFactory } from './order_factories';
|
10
|
-
import type { RecurringOrderCopy } from './recurring_order_copies';
|
11
|
-
import type { Event } from './events';
|
12
|
-
import type { Version } from './versions';
|
13
|
-
type OrderSubscriptionRel = ResourceRel & {
|
14
|
-
type: typeof OrderSubscriptions.TYPE;
|
15
|
-
};
|
16
|
-
type MarketRel = ResourceRel & {
|
17
|
-
type: 'markets';
|
18
|
-
};
|
19
|
-
type OrderRel = ResourceRel & {
|
20
|
-
type: 'orders';
|
21
|
-
};
|
22
|
-
type CustomerPaymentSourceRel = ResourceRel & {
|
23
|
-
type: 'customer_payment_sources';
|
24
|
-
};
|
25
|
-
interface OrderSubscription extends Resource {
|
26
|
-
number?: string;
|
27
|
-
status?: string;
|
28
|
-
frequency?: string;
|
29
|
-
activate_by_source_order?: boolean;
|
30
|
-
place_target_order?: boolean;
|
31
|
-
customer_email?: string;
|
32
|
-
starts_at?: string;
|
33
|
-
expires_at?: string;
|
34
|
-
last_run_at?: string;
|
35
|
-
next_run_at?: string;
|
36
|
-
occurrencies?: number;
|
37
|
-
errors_count?: number;
|
38
|
-
succeeded_on_last_run?: boolean;
|
39
|
-
market?: Market;
|
40
|
-
subscription_model?: SubscriptionModel;
|
41
|
-
source_order?: Order;
|
42
|
-
customer?: Customer;
|
43
|
-
customer_payment_source?: CustomerPaymentSource;
|
44
|
-
order_subscription_items?: OrderSubscriptionItem[];
|
45
|
-
order_factories?: OrderFactory[];
|
46
|
-
recurring_order_copies?: RecurringOrderCopy[];
|
47
|
-
orders?: Order[];
|
48
|
-
events?: Event[];
|
49
|
-
versions?: Version[];
|
50
|
-
}
|
51
|
-
interface OrderSubscriptionCreate extends ResourceCreate {
|
52
|
-
frequency: string;
|
53
|
-
activate_by_source_order?: boolean;
|
54
|
-
place_target_order?: boolean;
|
55
|
-
starts_at?: string;
|
56
|
-
expires_at?: string;
|
57
|
-
market?: MarketRel;
|
58
|
-
source_order: OrderRel;
|
59
|
-
}
|
60
|
-
interface OrderSubscriptionUpdate extends ResourceUpdate {
|
61
|
-
frequency?: string;
|
62
|
-
activate_by_source_order?: boolean;
|
63
|
-
place_target_order?: boolean;
|
64
|
-
expires_at?: string;
|
65
|
-
next_run_at?: string;
|
66
|
-
_activate?: boolean;
|
67
|
-
_deactivate?: boolean;
|
68
|
-
_cancel?: boolean;
|
69
|
-
customer_payment_source?: CustomerPaymentSourceRel;
|
70
|
-
}
|
71
|
-
declare class OrderSubscriptions extends ApiResource {
|
72
|
-
static readonly TYPE: 'order_subscriptions';
|
73
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>>;
|
74
|
-
create(resource: OrderSubscriptionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
|
75
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
|
76
|
-
update(resource: OrderSubscriptionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
|
77
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
78
|
-
market(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
79
|
-
subscription_model(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SubscriptionModel>;
|
80
|
-
source_order(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
81
|
-
customer(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
82
|
-
customer_payment_source(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPaymentSource>;
|
83
|
-
order_subscription_items(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderSubscriptionItem>>;
|
84
|
-
order_factories(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderFactory>>;
|
85
|
-
recurring_order_copies(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<RecurringOrderCopy>>;
|
86
|
-
orders(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Order>>;
|
87
|
-
events(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
88
|
-
versions(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
89
|
-
isOrderSubscription(resource: any): resource is OrderSubscription;
|
90
|
-
relationship(id: string | ResourceId | null): OrderSubscriptionRel;
|
91
|
-
type(): string;
|
92
|
-
}
|
93
|
-
export default OrderSubscriptions;
|
94
|
-
export { OrderSubscription, OrderSubscriptionCreate, OrderSubscriptionUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{SubscriptionModel}from'./subscription_models';import type{Order}from'./orders';import type{Customer}from'./customers';import type{CustomerPaymentSource}from'./customer_payment_sources';import type{OrderSubscriptionItem}from'./order_subscription_items';import type{OrderFactory}from'./order_factories';import type{RecurringOrderCopy}from'./recurring_order_copies';import type{Event}from'./events';import type{Version}from'./versions';type OrderSubscriptionRel=ResourceRel&{type:typeof OrderSubscriptions.TYPE;};type MarketRel=ResourceRel&{type:'markets';};type OrderRel=ResourceRel&{type:'orders';};type CustomerPaymentSourceRel=ResourceRel&{type:'customer_payment_sources';};interface OrderSubscription extends Resource{number?:string;status?:string;frequency?:string;activate_by_source_order?:boolean;place_target_order?:boolean;renewal_alert_period?:number;customer_email?:string;starts_at?:string;expires_at?:string;last_run_at?:string;next_run_at?:string;occurrencies?:number;errors_count?:number;succeeded_on_last_run?:boolean;market?:Market;subscription_model?:SubscriptionModel;source_order?:Order;customer?:Customer;customer_payment_source?:CustomerPaymentSource;order_subscription_items?:OrderSubscriptionItem[];order_factories?:OrderFactory[];recurring_order_copies?:RecurringOrderCopy[];orders?:Order[];events?:Event[];versions?:Version[];}interface OrderSubscriptionCreate extends ResourceCreate{frequency:string;activate_by_source_order?:boolean;place_target_order?:boolean;renewal_alert_period?:number;starts_at?:string;expires_at?:string;market?:MarketRel;source_order:OrderRel;}interface OrderSubscriptionUpdate extends ResourceUpdate{frequency?:string;activate_by_source_order?:boolean;place_target_order?:boolean;renewal_alert_period?:number;expires_at?:string;next_run_at?:string;_activate?:boolean;_deactivate?:boolean;_cancel?:boolean;customer_payment_source?:CustomerPaymentSourceRel;}declare class OrderSubscriptions extends ApiResource{static readonly TYPE:'order_subscriptions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderSubscription>>;create(resource:OrderSubscriptionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;update(resource:OrderSubscriptionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;subscription_model(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SubscriptionModel>;source_order(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;customer(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;customer_payment_source(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerPaymentSource>;order_subscription_items(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderSubscriptionItem>>;order_factories(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderFactory>>;recurring_order_copies(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<RecurringOrderCopy>>;orders(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Order>>;events(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;versions(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isOrderSubscription(resource:any):resource is OrderSubscription;relationship(id:string|ResourceId|null):OrderSubscriptionRel;type():string;}export default OrderSubscriptions;export{OrderSubscription,OrderSubscriptionCreate,OrderSubscriptionUpdate};
|
@@ -1,77 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class OrderSubscriptions extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'order_subscriptions'
|
6
|
-
async list(params, options) {
|
7
|
-
return this.resources.list({ type: OrderSubscriptions.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async create(resource, params, options) {
|
10
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: OrderSubscriptions.TYPE }), params, options);
|
11
|
-
}
|
12
|
-
async retrieve(id, params, options) {
|
13
|
-
return this.resources.retrieve({ type: OrderSubscriptions.TYPE, id }, params, options);
|
14
|
-
}
|
15
|
-
async update(resource, params, options) {
|
16
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: OrderSubscriptions.TYPE }), params, options);
|
17
|
-
}
|
18
|
-
async delete(id, options) {
|
19
|
-
await this.resources.delete({ type: OrderSubscriptions.TYPE, id }, options);
|
20
|
-
}
|
21
|
-
async market(orderSubscriptionId, params, options) {
|
22
|
-
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
23
|
-
return this.resources.fetch({ type: 'markets' }, `order_subscriptions/${_orderSubscriptionId}/market`, params, options);
|
24
|
-
}
|
25
|
-
async subscription_model(orderSubscriptionId, params, options) {
|
26
|
-
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
27
|
-
return this.resources.fetch({ type: 'subscription_models' }, `order_subscriptions/${_orderSubscriptionId}/subscription_model`, params, options);
|
28
|
-
}
|
29
|
-
async source_order(orderSubscriptionId, params, options) {
|
30
|
-
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
31
|
-
return this.resources.fetch({ type: 'orders' }, `order_subscriptions/${_orderSubscriptionId}/source_order`, params, options);
|
32
|
-
}
|
33
|
-
async customer(orderSubscriptionId, params, options) {
|
34
|
-
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
35
|
-
return this.resources.fetch({ type: 'customers' }, `order_subscriptions/${_orderSubscriptionId}/customer`, params, options);
|
36
|
-
}
|
37
|
-
async customer_payment_source(orderSubscriptionId, params, options) {
|
38
|
-
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
39
|
-
return this.resources.fetch({ type: 'customer_payment_sources' }, `order_subscriptions/${_orderSubscriptionId}/customer_payment_source`, params, options);
|
40
|
-
}
|
41
|
-
async order_subscription_items(orderSubscriptionId, params, options) {
|
42
|
-
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
43
|
-
return this.resources.fetch({ type: 'order_subscription_items' }, `order_subscriptions/${_orderSubscriptionId}/order_subscription_items`, params, options);
|
44
|
-
}
|
45
|
-
async order_factories(orderSubscriptionId, params, options) {
|
46
|
-
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
47
|
-
return this.resources.fetch({ type: 'order_factories' }, `order_subscriptions/${_orderSubscriptionId}/order_factories`, params, options);
|
48
|
-
}
|
49
|
-
async recurring_order_copies(orderSubscriptionId, params, options) {
|
50
|
-
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
51
|
-
return this.resources.fetch({ type: 'recurring_order_copies' }, `order_subscriptions/${_orderSubscriptionId}/recurring_order_copies`, params, options);
|
52
|
-
}
|
53
|
-
async orders(orderSubscriptionId, params, options) {
|
54
|
-
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
55
|
-
return this.resources.fetch({ type: 'orders' }, `order_subscriptions/${_orderSubscriptionId}/orders`, params, options);
|
56
|
-
}
|
57
|
-
async events(orderSubscriptionId, params, options) {
|
58
|
-
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
59
|
-
return this.resources.fetch({ type: 'events' }, `order_subscriptions/${_orderSubscriptionId}/events`, params, options);
|
60
|
-
}
|
61
|
-
async versions(orderSubscriptionId, params, options) {
|
62
|
-
const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
|
63
|
-
return this.resources.fetch({ type: 'versions' }, `order_subscriptions/${_orderSubscriptionId}/versions`, params, options);
|
64
|
-
}
|
65
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
66
|
-
isOrderSubscription(resource) {
|
67
|
-
return resource.type && (resource.type === OrderSubscriptions.TYPE);
|
68
|
-
}
|
69
|
-
relationship(id) {
|
70
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: OrderSubscriptions.TYPE } : { id: id.id, type: OrderSubscriptions.TYPE };
|
71
|
-
}
|
72
|
-
type() {
|
73
|
-
return OrderSubscriptions.TYPE;
|
74
|
-
}
|
75
|
-
}
|
76
|
-
OrderSubscriptions.TYPE = 'order_subscriptions';
|
77
|
-
exports.default = OrderSubscriptions;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class OrderSubscriptions extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:OrderSubscriptions.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:OrderSubscriptions.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:OrderSubscriptions.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:OrderSubscriptions.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:OrderSubscriptions.TYPE,id:e},s)}async market(e,s,r){const t=e.id||e;return this.resources.fetch({type:"markets"},`order_subscriptions/${t}/market`,s,r)}async subscription_model(e,s,r){const t=e.id||e;return this.resources.fetch({type:"subscription_models"},`order_subscriptions/${t}/subscription_model`,s,r)}async source_order(e,s,r){const t=e.id||e;return this.resources.fetch({type:"orders"},`order_subscriptions/${t}/source_order`,s,r)}async customer(e,s,r){const t=e.id||e;return this.resources.fetch({type:"customers"},`order_subscriptions/${t}/customer`,s,r)}async customer_payment_source(e,s,r){const t=e.id||e;return this.resources.fetch({type:"customer_payment_sources"},`order_subscriptions/${t}/customer_payment_source`,s,r)}async order_subscription_items(e,s,r){const t=e.id||e;return this.resources.fetch({type:"order_subscription_items"},`order_subscriptions/${t}/order_subscription_items`,s,r)}async order_factories(e,s,r){const t=e.id||e;return this.resources.fetch({type:"order_factories"},`order_subscriptions/${t}/order_factories`,s,r)}async recurring_order_copies(e,s,r){const t=e.id||e;return this.resources.fetch({type:"recurring_order_copies"},`order_subscriptions/${t}/recurring_order_copies`,s,r)}async orders(e,s,r){const t=e.id||e;return this.resources.fetch({type:"orders"},`order_subscriptions/${t}/orders`,s,r)}async events(e,s,r){const t=e.id||e;return this.resources.fetch({type:"events"},`order_subscriptions/${t}/events`,s,r)}async versions(e,s,r){const t=e.id||e;return this.resources.fetch({type:"versions"},`order_subscriptions/${t}/versions`,s,r)}isOrderSubscription(e){return e.type&&e.type===OrderSubscriptions.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:OrderSubscriptions.TYPE}:{id:e.id,type:OrderSubscriptions.TYPE}}type(){return OrderSubscriptions.TYPE}}OrderSubscriptions.TYPE="order_subscriptions",exports.default=OrderSubscriptions;
|
@@ -1,26 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Market } from './markets';
|
4
|
-
import type { Attachment } from './attachments';
|
5
|
-
import type { Version } from './versions';
|
6
|
-
type OrderValidationRuleRel = ResourceRel & {
|
7
|
-
type: typeof OrderValidationRules.TYPE;
|
8
|
-
};
|
9
|
-
interface OrderValidationRule extends Resource {
|
10
|
-
market?: Market;
|
11
|
-
attachments?: Attachment[];
|
12
|
-
versions?: Version[];
|
13
|
-
}
|
14
|
-
declare class OrderValidationRules extends ApiResource {
|
15
|
-
static readonly TYPE: 'order_validation_rules';
|
16
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderValidationRule>>;
|
17
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderValidationRule>;
|
18
|
-
market(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
19
|
-
attachments(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
20
|
-
versions(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
21
|
-
isOrderValidationRule(resource: any): resource is OrderValidationRule;
|
22
|
-
relationship(id: string | ResourceId | null): OrderValidationRuleRel;
|
23
|
-
type(): string;
|
24
|
-
}
|
25
|
-
export default OrderValidationRules;
|
26
|
-
export { OrderValidationRule };
|
1
|
+
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{Attachment}from'./attachments';import type{Version}from'./versions';type OrderValidationRuleRel=ResourceRel&{type:typeof OrderValidationRules.TYPE;};interface OrderValidationRule extends Resource{market?:Market;attachments?:Attachment[];versions?:Version[];}declare class OrderValidationRules extends ApiResource{static readonly TYPE:'order_validation_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderValidationRule>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderValidationRule>;market(orderValidationRuleId:string|OrderValidationRule,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;attachments(orderValidationRuleId:string|OrderValidationRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(orderValidationRuleId:string|OrderValidationRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isOrderValidationRule(resource:any):resource is OrderValidationRule;relationship(id:string|ResourceId|null):OrderValidationRuleRel;type():string;}export default OrderValidationRules;export{OrderValidationRule};
|
@@ -1,36 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class OrderValidationRules extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'order_validation_rules'
|
6
|
-
async list(params, options) {
|
7
|
-
return this.resources.list({ type: OrderValidationRules.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async retrieve(id, params, options) {
|
10
|
-
return this.resources.retrieve({ type: OrderValidationRules.TYPE, id }, params, options);
|
11
|
-
}
|
12
|
-
async market(orderValidationRuleId, params, options) {
|
13
|
-
const _orderValidationRuleId = orderValidationRuleId.id || orderValidationRuleId;
|
14
|
-
return this.resources.fetch({ type: 'markets' }, `order_validation_rules/${_orderValidationRuleId}/market`, params, options);
|
15
|
-
}
|
16
|
-
async attachments(orderValidationRuleId, params, options) {
|
17
|
-
const _orderValidationRuleId = orderValidationRuleId.id || orderValidationRuleId;
|
18
|
-
return this.resources.fetch({ type: 'attachments' }, `order_validation_rules/${_orderValidationRuleId}/attachments`, params, options);
|
19
|
-
}
|
20
|
-
async versions(orderValidationRuleId, params, options) {
|
21
|
-
const _orderValidationRuleId = orderValidationRuleId.id || orderValidationRuleId;
|
22
|
-
return this.resources.fetch({ type: 'versions' }, `order_validation_rules/${_orderValidationRuleId}/versions`, params, options);
|
23
|
-
}
|
24
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
25
|
-
isOrderValidationRule(resource) {
|
26
|
-
return resource.type && (resource.type === OrderValidationRules.TYPE);
|
27
|
-
}
|
28
|
-
relationship(id) {
|
29
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: OrderValidationRules.TYPE } : { id: id.id, type: OrderValidationRules.TYPE };
|
30
|
-
}
|
31
|
-
type() {
|
32
|
-
return OrderValidationRules.TYPE;
|
33
|
-
}
|
34
|
-
}
|
35
|
-
OrderValidationRules.TYPE = 'order_validation_rules';
|
36
|
-
exports.default = OrderValidationRules;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class OrderValidationRules extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:OrderValidationRules.TYPE},e,t)}async retrieve(e,t,r){return this.resources.retrieve({type:OrderValidationRules.TYPE,id:e},t,r)}async market(e,t,r){const s=e.id||e;return this.resources.fetch({type:"markets"},`order_validation_rules/${s}/market`,t,r)}async attachments(e,t,r){const s=e.id||e;return this.resources.fetch({type:"attachments"},`order_validation_rules/${s}/attachments`,t,r)}async versions(e,t,r){const s=e.id||e;return this.resources.fetch({type:"versions"},`order_validation_rules/${s}/versions`,t,r)}isOrderValidationRule(e){return e.type&&e.type===OrderValidationRules.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:OrderValidationRules.TYPE}:{id:e.id,type:OrderValidationRules.TYPE}}type(){return OrderValidationRules.TYPE}}OrderValidationRules.TYPE="order_validation_rules",exports.default=OrderValidationRules;
|