@commercelayer/sdk 5.37.0 → 5.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +1 -164
- package/lib/cjs/api.js +1 -387
- package/lib/cjs/client.d.ts +1 -39
- package/lib/cjs/client.js +1 -154
- package/lib/cjs/commercelayer.d.ts +1 -153
- package/lib/cjs/commercelayer.js +1 -253
- package/lib/cjs/common.d.ts +1 -5
- package/lib/cjs/common.js +1 -23
- package/lib/cjs/config.d.ts +1 -15
- package/lib/cjs/config.js +1 -19
- package/lib/cjs/debug.d.ts +1 -3
- package/lib/cjs/debug.js +1 -38
- package/lib/cjs/error.d.ts +1 -31
- package/lib/cjs/error.js +1 -77
- package/lib/cjs/index.d.ts +1 -7
- package/lib/cjs/index.js +1 -13
- package/lib/cjs/interceptor.d.ts +1 -25
- package/lib/cjs/interceptor.js +1 -2
- package/lib/cjs/jsonapi.d.ts +1 -6
- package/lib/cjs/jsonapi.js +1 -94
- package/lib/cjs/model.d.ts +1 -124
- package/lib/cjs/model.js +1 -3
- package/lib/cjs/query.d.ts +1 -17
- package/lib/cjs/query.js +1 -69
- package/lib/cjs/resource.d.ts +1 -89
- package/lib/cjs/resource.js +1 -198
- package/lib/cjs/resources/addresses.d.ts +1 -103
- package/lib/cjs/resources/addresses.js +1 -41
- package/lib/cjs/resources/adjustments.d.ts +1 -42
- package/lib/cjs/resources/adjustments.js +1 -29
- package/lib/cjs/resources/adyen_gateways.d.ts +1 -60
- package/lib/cjs/resources/adyen_gateways.js +1 -37
- package/lib/cjs/resources/adyen_payments.d.ts +1 -51
- package/lib/cjs/resources/adyen_payments.js +1 -40
- package/lib/cjs/resources/application.d.ts +1 -22
- package/lib/cjs/resources/application.js +1 -16
- package/lib/cjs/resources/attachments.d.ts +1 -157
- package/lib/cjs/resources/attachments.js +1 -25
- package/lib/cjs/resources/authorizations.d.ts +1 -70
- package/lib/cjs/resources/authorizations.js +1 -52
- package/lib/cjs/resources/avalara_accounts.d.ts +1 -59
- package/lib/cjs/resources/avalara_accounts.js +1 -41
- package/lib/cjs/resources/axerve_gateways.d.ts +1 -48
- package/lib/cjs/resources/axerve_gateways.js +1 -37
- package/lib/cjs/resources/axerve_payments.d.ts +1 -54
- package/lib/cjs/resources/axerve_payments.js +1 -40
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -39
- package/lib/cjs/resources/billing_info_validation_rules.js +1 -37
- package/lib/cjs/resources/bing_geocoders.d.ts +1 -36
- package/lib/cjs/resources/bing_geocoders.js +1 -33
- package/lib/cjs/resources/braintree_gateways.d.ts +1 -60
- package/lib/cjs/resources/braintree_gateways.js +1 -37
- package/lib/cjs/resources/braintree_payments.d.ts +1 -52
- package/lib/cjs/resources/braintree_payments.js +1 -37
- package/lib/cjs/resources/bundles.d.ts +1 -93
- package/lib/cjs/resources/bundles.js +1 -59
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +1 -137
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +1 -79
- package/lib/cjs/resources/captures.d.ts +1 -60
- package/lib/cjs/resources/captures.js +1 -49
- package/lib/cjs/resources/carrier_accounts.d.ts +1 -30
- package/lib/cjs/resources/carrier_accounts.js +1 -28
- package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -49
- package/lib/cjs/resources/checkout_com_gateways.js +1 -37
- package/lib/cjs/resources/checkout_com_payments.d.ts +1 -65
- package/lib/cjs/resources/checkout_com_payments.js +1 -43
- package/lib/cjs/resources/cleanups.d.ts +1 -40
- package/lib/cjs/resources/cleanups.js +1 -30
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -67
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -33
- package/lib/cjs/resources/coupon_recipients.d.ts +1 -48
- package/lib/cjs/resources/coupon_recipients.js +1 -37
- package/lib/cjs/resources/coupons.d.ts +1 -71
- package/lib/cjs/resources/coupons.js +1 -45
- package/lib/cjs/resources/custom_promotion_rules.d.ts +1 -62
- package/lib/cjs/resources/custom_promotion_rules.js +1 -29
- package/lib/cjs/resources/customer_addresses.d.ts +1 -50
- package/lib/cjs/resources/customer_addresses.js +1 -41
- package/lib/cjs/resources/customer_groups.d.ts +1 -40
- package/lib/cjs/resources/customer_groups.js +1 -41
- package/lib/cjs/resources/customer_password_resets.d.ts +1 -38
- package/lib/cjs/resources/customer_password_resets.js +1 -36
- package/lib/cjs/resources/customer_payment_sources.d.ts +1 -86
- package/lib/cjs/resources/customer_payment_sources.js +1 -37
- package/lib/cjs/resources/customer_subscriptions.d.ts +1 -35
- package/lib/cjs/resources/customer_subscriptions.js +1 -37
- package/lib/cjs/resources/customers.d.ts +1 -76
- package/lib/cjs/resources/customers.js +1 -69
- package/lib/cjs/resources/delivery_lead_times.d.ts +1 -55
- package/lib/cjs/resources/delivery_lead_times.js +1 -41
- package/lib/cjs/resources/event_callbacks.d.ts +1 -25
- package/lib/cjs/resources/event_callbacks.js +1 -20
- package/lib/cjs/resources/events.d.ts +1 -25
- package/lib/cjs/resources/events.js +1 -24
- package/lib/cjs/resources/exports.d.ts +1 -41
- package/lib/cjs/resources/exports.js +1 -26
- package/lib/cjs/resources/external_gateways.d.ts +1 -57
- package/lib/cjs/resources/external_gateways.js +1 -40
- package/lib/cjs/resources/external_payments.d.ts +1 -48
- package/lib/cjs/resources/external_payments.js +1 -41
- package/lib/cjs/resources/external_promotions.d.ts +1 -136
- package/lib/cjs/resources/external_promotions.js +1 -82
- package/lib/cjs/resources/external_tax_calculators.d.ts +1 -45
- package/lib/cjs/resources/external_tax_calculators.js +1 -40
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -133
- package/lib/cjs/resources/fixed_amount_promotions.js +1 -79
- package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -133
- package/lib/cjs/resources/fixed_price_promotions.js +1 -79
- package/lib/cjs/resources/free_gift_promotions.d.ts +1 -131
- package/lib/cjs/resources/free_gift_promotions.js +1 -79
- package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -125
- package/lib/cjs/resources/free_shipping_promotions.js +1 -75
- package/lib/cjs/resources/geocoders.d.ts +1 -25
- package/lib/cjs/resources/geocoders.js +1 -24
- package/lib/cjs/resources/gift_card_recipients.d.ts +1 -48
- package/lib/cjs/resources/gift_card_recipients.js +1 -37
- package/lib/cjs/resources/gift_cards.d.ts +1 -104
- package/lib/cjs/resources/gift_cards.js +1 -61
- package/lib/cjs/resources/google_geocoders.d.ts +1 -36
- package/lib/cjs/resources/google_geocoders.js +1 -33
- package/lib/cjs/resources/imports.d.ts +1 -44
- package/lib/cjs/resources/imports.js +1 -26
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -68
- package/lib/cjs/resources/in_stock_subscriptions.js +1 -51
- package/lib/cjs/resources/inventory_models.d.ts +1 -55
- package/lib/cjs/resources/inventory_models.js +1 -41
- package/lib/cjs/resources/inventory_return_locations.d.ts +1 -47
- package/lib/cjs/resources/inventory_return_locations.js +1 -37
- package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -50
- package/lib/cjs/resources/inventory_stock_locations.js +1 -37
- package/lib/cjs/resources/klarna_gateways.d.ts +1 -48
- package/lib/cjs/resources/klarna_gateways.js +1 -37
- package/lib/cjs/resources/klarna_payments.d.ts +1 -48
- package/lib/cjs/resources/klarna_payments.js +1 -40
- package/lib/cjs/resources/line_item_options.d.ts +1 -69
- package/lib/cjs/resources/line_item_options.js +1 -41
- package/lib/cjs/resources/line_items.d.ts +1 -170
- package/lib/cjs/resources/line_items.js +1 -66
- package/lib/cjs/resources/manual_gateways.d.ts +1 -34
- package/lib/cjs/resources/manual_gateways.js +1 -33
- package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -45
- package/lib/cjs/resources/manual_tax_calculators.js +1 -41
- package/lib/cjs/resources/markets.d.ts +1 -107
- package/lib/cjs/resources/markets.js +1 -63
- package/lib/cjs/resources/merchants.d.ts +1 -42
- package/lib/cjs/resources/merchants.js +1 -37
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -67
- package/lib/cjs/resources/order_amount_promotion_rules.js +1 -29
- package/lib/cjs/resources/order_copies.d.ts +1 -51
- package/lib/cjs/resources/order_copies.js +1 -41
- package/lib/cjs/resources/order_factories.d.ts +1 -34
- package/lib/cjs/resources/order_factories.js +1 -28
- package/lib/cjs/resources/order_subscription_items.d.ts +1 -72
- package/lib/cjs/resources/order_subscription_items.js +1 -33
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -98
- package/lib/cjs/resources/order_subscriptions.js +1 -78
- package/lib/cjs/resources/order_validation_rules.d.ts +1 -27
- package/lib/cjs/resources/order_validation_rules.js +1 -28
- package/lib/cjs/resources/orders.d.ts +1 -389
- package/lib/cjs/resources/orders.js +1 -236
- package/lib/cjs/resources/organization.d.ts +1 -34
- package/lib/cjs/resources/organization.js +1 -16
- package/lib/cjs/resources/packages.d.ts +1 -60
- package/lib/cjs/resources/packages.js +1 -41
- package/lib/cjs/resources/parcel_line_items.d.ts +1 -47
- package/lib/cjs/resources/parcel_line_items.js +1 -37
- package/lib/cjs/resources/parcels.d.ts +1 -126
- package/lib/cjs/resources/parcels.js +1 -49
- package/lib/cjs/resources/payment_gateways.d.ts +1 -25
- package/lib/cjs/resources/payment_gateways.js +1 -24
- package/lib/cjs/resources/payment_methods.d.ts +1 -83
- package/lib/cjs/resources/payment_methods.js +1 -47
- package/lib/cjs/resources/payment_options.d.ts +1 -44
- package/lib/cjs/resources/payment_options.js +1 -33
- package/lib/cjs/resources/paypal_gateways.d.ts +1 -41
- package/lib/cjs/resources/paypal_gateways.js +1 -37
- package/lib/cjs/resources/paypal_payments.d.ts +1 -53
- package/lib/cjs/resources/paypal_payments.js +1 -37
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -131
- package/lib/cjs/resources/percentage_discount_promotions.js +1 -79
- package/lib/cjs/resources/price_frequency_tiers.d.ts +1 -53
- package/lib/cjs/resources/price_frequency_tiers.js +1 -41
- package/lib/cjs/resources/price_lists.d.ts +1 -46
- package/lib/cjs/resources/price_lists.js +1 -37
- package/lib/cjs/resources/price_tiers.d.ts +1 -32
- package/lib/cjs/resources/price_tiers.js +1 -28
- package/lib/cjs/resources/price_volume_tiers.d.ts +1 -53
- package/lib/cjs/resources/price_volume_tiers.js +1 -41
- package/lib/cjs/resources/prices.d.ts +1 -84
- package/lib/cjs/resources/prices.js +1 -65
- package/lib/cjs/resources/promotion_rules.d.ts +1 -29
- package/lib/cjs/resources/promotion_rules.js +1 -20
- package/lib/cjs/resources/promotions.d.ts +1 -63
- package/lib/cjs/resources/promotions.js +1 -60
- package/lib/cjs/resources/recurring_order_copies.d.ts +1 -53
- package/lib/cjs/resources/recurring_order_copies.js +1 -41
- package/lib/cjs/resources/refunds.d.ts +1 -44
- package/lib/cjs/resources/refunds.js +1 -36
- package/lib/cjs/resources/reserved_stocks.d.ts +1 -28
- package/lib/cjs/resources/reserved_stocks.js +1 -28
- package/lib/cjs/resources/resource_errors.d.ts +1 -22
- package/lib/cjs/resources/resource_errors.js +1 -16
- package/lib/cjs/resources/return_line_items.d.ts +1 -52
- package/lib/cjs/resources/return_line_items.js +1 -36
- package/lib/cjs/resources/returns.d.ts +1 -96
- package/lib/cjs/resources/returns.js +1 -92
- package/lib/cjs/resources/satispay_gateways.d.ts +1 -46
- package/lib/cjs/resources/satispay_gateways.js +1 -37
- package/lib/cjs/resources/satispay_payments.d.ts +1 -50
- package/lib/cjs/resources/satispay_payments.js +1 -40
- package/lib/cjs/resources/shipments.d.ts +1 -151
- package/lib/cjs/resources/shipments.js +1 -130
- package/lib/cjs/resources/shipping_categories.d.ts +1 -40
- package/lib/cjs/resources/shipping_categories.js +1 -37
- package/lib/cjs/resources/shipping_method_tiers.d.ts +1 -32
- package/lib/cjs/resources/shipping_method_tiers.js +1 -28
- package/lib/cjs/resources/shipping_methods.d.ts +1 -125
- package/lib/cjs/resources/shipping_methods.js +1 -70
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +1 -50
- package/lib/cjs/resources/shipping_weight_tiers.js +1 -37
- package/lib/cjs/resources/shipping_zones.d.ts +1 -52
- package/lib/cjs/resources/shipping_zones.js +1 -33
- package/lib/cjs/resources/sku_list_items.d.ts +1 -51
- package/lib/cjs/resources/sku_list_items.js +1 -37
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -76
- package/lib/cjs/resources/sku_list_promotion_rules.js +1 -37
- package/lib/cjs/resources/sku_lists.d.ts +1 -64
- package/lib/cjs/resources/sku_lists.js +1 -49
- package/lib/cjs/resources/sku_options.d.ts +1 -71
- package/lib/cjs/resources/sku_options.js +1 -45
- package/lib/cjs/resources/skus.d.ts +1 -96
- package/lib/cjs/resources/skus.js +1 -65
- package/lib/cjs/resources/stock_items.d.ts +1 -61
- package/lib/cjs/resources/stock_items.js +1 -52
- package/lib/cjs/resources/stock_line_items.d.ts +1 -73
- package/lib/cjs/resources/stock_line_items.js +1 -54
- package/lib/cjs/resources/stock_locations.d.ts +1 -64
- package/lib/cjs/resources/stock_locations.js +1 -53
- package/lib/cjs/resources/stock_reservations.d.ts +1 -51
- package/lib/cjs/resources/stock_reservations.js +1 -48
- package/lib/cjs/resources/stock_transfers.d.ts +1 -86
- package/lib/cjs/resources/stock_transfers.js +1 -71
- package/lib/cjs/resources/stripe_gateways.d.ts +1 -45
- package/lib/cjs/resources/stripe_gateways.js +1 -37
- package/lib/cjs/resources/stripe_payments.d.ts +1 -59
- package/lib/cjs/resources/stripe_payments.js +1 -43
- package/lib/cjs/resources/subscription_models.d.ts +1 -49
- package/lib/cjs/resources/subscription_models.js +1 -37
- package/lib/cjs/resources/tags.d.ts +1 -28
- package/lib/cjs/resources/tags.js +1 -25
- package/lib/cjs/resources/tax_calculators.d.ts +1 -28
- package/lib/cjs/resources/tax_calculators.js +1 -28
- package/lib/cjs/resources/tax_categories.d.ts +1 -63
- package/lib/cjs/resources/tax_categories.js +1 -37
- package/lib/cjs/resources/tax_rules.d.ts +1 -73
- package/lib/cjs/resources/tax_rules.js +1 -33
- package/lib/cjs/resources/taxjar_accounts.d.ts +1 -47
- package/lib/cjs/resources/taxjar_accounts.js +1 -41
- package/lib/cjs/resources/transactions.d.ts +1 -41
- package/lib/cjs/resources/transactions.js +1 -32
- package/lib/cjs/resources/versions.d.ts +1 -22
- package/lib/cjs/resources/versions.js +1 -16
- package/lib/cjs/resources/voids.d.ts +1 -44
- package/lib/cjs/resources/voids.js +1 -36
- package/lib/cjs/resources/webhooks.d.ts +1 -55
- package/lib/cjs/resources/webhooks.js +1 -42
- package/lib/cjs/resources/wire_transfers.d.ts +1 -37
- package/lib/cjs/resources/wire_transfers.js +1 -33
- package/lib/cjs/static.d.ts +1 -12
- package/lib/cjs/static.js +1 -51
- package/lib/cjs/util.d.ts +1 -4
- package/lib/cjs/util.js +1 -16
- package/lib/esm/api.d.ts +1 -164
- package/lib/esm/api.js +1 -258
- package/lib/esm/client.d.ts +1 -39
- package/lib/esm/client.js +1 -149
- package/lib/esm/commercelayer.d.ts +1 -153
- package/lib/esm/commercelayer.js +1 -224
- package/lib/esm/common.d.ts +1 -5
- package/lib/esm/common.js +1 -19
- package/lib/esm/config.d.ts +1 -15
- package/lib/esm/config.js +1 -17
- package/lib/esm/debug.d.ts +1 -3
- package/lib/esm/debug.js +1 -36
- package/lib/esm/error.d.ts +1 -31
- package/lib/esm/error.js +1 -69
- package/lib/esm/index.d.ts +1 -7
- package/lib/esm/index.js +1 -4
- package/lib/esm/interceptor.d.ts +1 -25
- package/lib/esm/interceptor.js +1 -1
- package/lib/esm/jsonapi.d.ts +1 -6
- package/lib/esm/jsonapi.js +1 -87
- package/lib/esm/model.d.ts +1 -124
- package/lib/esm/model.js +1 -2
- package/lib/esm/query.d.ts +1 -17
- package/lib/esm/query.js +1 -62
- package/lib/esm/resource.d.ts +1 -89
- package/lib/esm/resource.js +1 -191
- package/lib/esm/resources/addresses.d.ts +1 -103
- package/lib/esm/resources/addresses.js +1 -39
- package/lib/esm/resources/adjustments.d.ts +1 -42
- package/lib/esm/resources/adjustments.js +1 -27
- package/lib/esm/resources/adyen_gateways.d.ts +1 -60
- package/lib/esm/resources/adyen_gateways.js +1 -35
- package/lib/esm/resources/adyen_payments.d.ts +1 -51
- package/lib/esm/resources/adyen_payments.js +1 -38
- package/lib/esm/resources/application.d.ts +1 -22
- package/lib/esm/resources/application.js +1 -14
- package/lib/esm/resources/attachments.d.ts +1 -157
- package/lib/esm/resources/attachments.js +1 -23
- package/lib/esm/resources/authorizations.d.ts +1 -70
- package/lib/esm/resources/authorizations.js +1 -50
- package/lib/esm/resources/avalara_accounts.d.ts +1 -59
- package/lib/esm/resources/avalara_accounts.js +1 -39
- package/lib/esm/resources/axerve_gateways.d.ts +1 -48
- package/lib/esm/resources/axerve_gateways.js +1 -35
- package/lib/esm/resources/axerve_payments.d.ts +1 -54
- package/lib/esm/resources/axerve_payments.js +1 -38
- package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -39
- package/lib/esm/resources/billing_info_validation_rules.js +1 -35
- package/lib/esm/resources/bing_geocoders.d.ts +1 -36
- package/lib/esm/resources/bing_geocoders.js +1 -31
- package/lib/esm/resources/braintree_gateways.d.ts +1 -60
- package/lib/esm/resources/braintree_gateways.js +1 -35
- package/lib/esm/resources/braintree_payments.d.ts +1 -52
- package/lib/esm/resources/braintree_payments.js +1 -35
- package/lib/esm/resources/bundles.d.ts +1 -93
- package/lib/esm/resources/bundles.js +1 -57
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +1 -137
- package/lib/esm/resources/buy_x_pay_y_promotions.js +1 -77
- package/lib/esm/resources/captures.d.ts +1 -60
- package/lib/esm/resources/captures.js +1 -47
- package/lib/esm/resources/carrier_accounts.d.ts +1 -30
- package/lib/esm/resources/carrier_accounts.js +1 -26
- package/lib/esm/resources/checkout_com_gateways.d.ts +1 -49
- package/lib/esm/resources/checkout_com_gateways.js +1 -35
- package/lib/esm/resources/checkout_com_payments.d.ts +1 -65
- package/lib/esm/resources/checkout_com_payments.js +1 -41
- package/lib/esm/resources/cleanups.d.ts +1 -40
- package/lib/esm/resources/cleanups.js +1 -28
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -67
- package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -31
- package/lib/esm/resources/coupon_recipients.d.ts +1 -48
- package/lib/esm/resources/coupon_recipients.js +1 -35
- package/lib/esm/resources/coupons.d.ts +1 -71
- package/lib/esm/resources/coupons.js +1 -43
- package/lib/esm/resources/custom_promotion_rules.d.ts +1 -62
- package/lib/esm/resources/custom_promotion_rules.js +1 -27
- package/lib/esm/resources/customer_addresses.d.ts +1 -50
- package/lib/esm/resources/customer_addresses.js +1 -39
- package/lib/esm/resources/customer_groups.d.ts +1 -40
- package/lib/esm/resources/customer_groups.js +1 -39
- package/lib/esm/resources/customer_password_resets.d.ts +1 -38
- package/lib/esm/resources/customer_password_resets.js +1 -34
- package/lib/esm/resources/customer_payment_sources.d.ts +1 -86
- package/lib/esm/resources/customer_payment_sources.js +1 -35
- package/lib/esm/resources/customer_subscriptions.d.ts +1 -35
- package/lib/esm/resources/customer_subscriptions.js +1 -35
- package/lib/esm/resources/customers.d.ts +1 -76
- package/lib/esm/resources/customers.js +1 -67
- package/lib/esm/resources/delivery_lead_times.d.ts +1 -55
- package/lib/esm/resources/delivery_lead_times.js +1 -39
- package/lib/esm/resources/event_callbacks.d.ts +1 -25
- package/lib/esm/resources/event_callbacks.js +1 -18
- package/lib/esm/resources/events.d.ts +1 -25
- package/lib/esm/resources/events.js +1 -22
- package/lib/esm/resources/exports.d.ts +1 -41
- package/lib/esm/resources/exports.js +1 -24
- package/lib/esm/resources/external_gateways.d.ts +1 -57
- package/lib/esm/resources/external_gateways.js +1 -38
- package/lib/esm/resources/external_payments.d.ts +1 -48
- package/lib/esm/resources/external_payments.js +1 -39
- package/lib/esm/resources/external_promotions.d.ts +1 -136
- package/lib/esm/resources/external_promotions.js +1 -80
- package/lib/esm/resources/external_tax_calculators.d.ts +1 -45
- package/lib/esm/resources/external_tax_calculators.js +1 -38
- package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -133
- package/lib/esm/resources/fixed_amount_promotions.js +1 -77
- package/lib/esm/resources/fixed_price_promotions.d.ts +1 -133
- package/lib/esm/resources/fixed_price_promotions.js +1 -77
- package/lib/esm/resources/free_gift_promotions.d.ts +1 -131
- package/lib/esm/resources/free_gift_promotions.js +1 -77
- package/lib/esm/resources/free_shipping_promotions.d.ts +1 -125
- package/lib/esm/resources/free_shipping_promotions.js +1 -73
- package/lib/esm/resources/geocoders.d.ts +1 -25
- package/lib/esm/resources/geocoders.js +1 -22
- package/lib/esm/resources/gift_card_recipients.d.ts +1 -48
- package/lib/esm/resources/gift_card_recipients.js +1 -35
- package/lib/esm/resources/gift_cards.d.ts +1 -104
- package/lib/esm/resources/gift_cards.js +1 -59
- package/lib/esm/resources/google_geocoders.d.ts +1 -36
- package/lib/esm/resources/google_geocoders.js +1 -31
- package/lib/esm/resources/imports.d.ts +1 -44
- package/lib/esm/resources/imports.js +1 -24
- package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -68
- package/lib/esm/resources/in_stock_subscriptions.js +1 -49
- package/lib/esm/resources/inventory_models.d.ts +1 -55
- package/lib/esm/resources/inventory_models.js +1 -39
- package/lib/esm/resources/inventory_return_locations.d.ts +1 -47
- package/lib/esm/resources/inventory_return_locations.js +1 -35
- package/lib/esm/resources/inventory_stock_locations.d.ts +1 -50
- package/lib/esm/resources/inventory_stock_locations.js +1 -35
- package/lib/esm/resources/klarna_gateways.d.ts +1 -48
- package/lib/esm/resources/klarna_gateways.js +1 -35
- package/lib/esm/resources/klarna_payments.d.ts +1 -48
- package/lib/esm/resources/klarna_payments.js +1 -38
- package/lib/esm/resources/line_item_options.d.ts +1 -69
- package/lib/esm/resources/line_item_options.js +1 -39
- package/lib/esm/resources/line_items.d.ts +1 -170
- package/lib/esm/resources/line_items.js +1 -64
- package/lib/esm/resources/manual_gateways.d.ts +1 -34
- package/lib/esm/resources/manual_gateways.js +1 -31
- package/lib/esm/resources/manual_tax_calculators.d.ts +1 -45
- package/lib/esm/resources/manual_tax_calculators.js +1 -39
- package/lib/esm/resources/markets.d.ts +1 -107
- package/lib/esm/resources/markets.js +1 -61
- package/lib/esm/resources/merchants.d.ts +1 -42
- package/lib/esm/resources/merchants.js +1 -35
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -67
- package/lib/esm/resources/order_amount_promotion_rules.js +1 -27
- package/lib/esm/resources/order_copies.d.ts +1 -51
- package/lib/esm/resources/order_copies.js +1 -39
- package/lib/esm/resources/order_factories.d.ts +1 -34
- package/lib/esm/resources/order_factories.js +1 -26
- package/lib/esm/resources/order_subscription_items.d.ts +1 -72
- package/lib/esm/resources/order_subscription_items.js +1 -31
- package/lib/esm/resources/order_subscriptions.d.ts +1 -98
- package/lib/esm/resources/order_subscriptions.js +1 -76
- package/lib/esm/resources/order_validation_rules.d.ts +1 -27
- package/lib/esm/resources/order_validation_rules.js +1 -26
- package/lib/esm/resources/orders.d.ts +1 -389
- package/lib/esm/resources/orders.js +1 -234
- package/lib/esm/resources/organization.d.ts +1 -34
- package/lib/esm/resources/organization.js +1 -14
- package/lib/esm/resources/packages.d.ts +1 -60
- package/lib/esm/resources/packages.js +1 -39
- package/lib/esm/resources/parcel_line_items.d.ts +1 -47
- package/lib/esm/resources/parcel_line_items.js +1 -35
- package/lib/esm/resources/parcels.d.ts +1 -126
- package/lib/esm/resources/parcels.js +1 -47
- package/lib/esm/resources/payment_gateways.d.ts +1 -25
- package/lib/esm/resources/payment_gateways.js +1 -22
- package/lib/esm/resources/payment_methods.d.ts +1 -83
- package/lib/esm/resources/payment_methods.js +1 -45
- package/lib/esm/resources/payment_options.d.ts +1 -44
- package/lib/esm/resources/payment_options.js +1 -31
- package/lib/esm/resources/paypal_gateways.d.ts +1 -41
- package/lib/esm/resources/paypal_gateways.js +1 -35
- package/lib/esm/resources/paypal_payments.d.ts +1 -53
- package/lib/esm/resources/paypal_payments.js +1 -35
- package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -131
- package/lib/esm/resources/percentage_discount_promotions.js +1 -77
- package/lib/esm/resources/price_frequency_tiers.d.ts +1 -53
- package/lib/esm/resources/price_frequency_tiers.js +1 -39
- package/lib/esm/resources/price_lists.d.ts +1 -46
- package/lib/esm/resources/price_lists.js +1 -35
- package/lib/esm/resources/price_tiers.d.ts +1 -32
- package/lib/esm/resources/price_tiers.js +1 -26
- package/lib/esm/resources/price_volume_tiers.d.ts +1 -53
- package/lib/esm/resources/price_volume_tiers.js +1 -39
- package/lib/esm/resources/prices.d.ts +1 -84
- package/lib/esm/resources/prices.js +1 -63
- package/lib/esm/resources/promotion_rules.d.ts +1 -29
- package/lib/esm/resources/promotion_rules.js +1 -18
- package/lib/esm/resources/promotions.d.ts +1 -63
- package/lib/esm/resources/promotions.js +1 -58
- package/lib/esm/resources/recurring_order_copies.d.ts +1 -53
- package/lib/esm/resources/recurring_order_copies.js +1 -39
- package/lib/esm/resources/refunds.d.ts +1 -44
- package/lib/esm/resources/refunds.js +1 -34
- package/lib/esm/resources/reserved_stocks.d.ts +1 -28
- package/lib/esm/resources/reserved_stocks.js +1 -26
- package/lib/esm/resources/resource_errors.d.ts +1 -22
- package/lib/esm/resources/resource_errors.js +1 -14
- package/lib/esm/resources/return_line_items.d.ts +1 -52
- package/lib/esm/resources/return_line_items.js +1 -34
- package/lib/esm/resources/returns.d.ts +1 -96
- package/lib/esm/resources/returns.js +1 -90
- package/lib/esm/resources/satispay_gateways.d.ts +1 -46
- package/lib/esm/resources/satispay_gateways.js +1 -35
- package/lib/esm/resources/satispay_payments.d.ts +1 -50
- package/lib/esm/resources/satispay_payments.js +1 -38
- package/lib/esm/resources/shipments.d.ts +1 -151
- package/lib/esm/resources/shipments.js +1 -128
- package/lib/esm/resources/shipping_categories.d.ts +1 -40
- package/lib/esm/resources/shipping_categories.js +1 -35
- package/lib/esm/resources/shipping_method_tiers.d.ts +1 -32
- package/lib/esm/resources/shipping_method_tiers.js +1 -26
- package/lib/esm/resources/shipping_methods.d.ts +1 -125
- package/lib/esm/resources/shipping_methods.js +1 -68
- package/lib/esm/resources/shipping_weight_tiers.d.ts +1 -50
- package/lib/esm/resources/shipping_weight_tiers.js +1 -35
- package/lib/esm/resources/shipping_zones.d.ts +1 -52
- package/lib/esm/resources/shipping_zones.js +1 -31
- package/lib/esm/resources/sku_list_items.d.ts +1 -51
- package/lib/esm/resources/sku_list_items.js +1 -35
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -76
- package/lib/esm/resources/sku_list_promotion_rules.js +1 -35
- package/lib/esm/resources/sku_lists.d.ts +1 -64
- package/lib/esm/resources/sku_lists.js +1 -47
- package/lib/esm/resources/sku_options.d.ts +1 -71
- package/lib/esm/resources/sku_options.js +1 -43
- package/lib/esm/resources/skus.d.ts +1 -96
- package/lib/esm/resources/skus.js +1 -63
- package/lib/esm/resources/stock_items.d.ts +1 -61
- package/lib/esm/resources/stock_items.js +1 -50
- package/lib/esm/resources/stock_line_items.d.ts +1 -73
- package/lib/esm/resources/stock_line_items.js +1 -52
- package/lib/esm/resources/stock_locations.d.ts +1 -64
- package/lib/esm/resources/stock_locations.js +1 -51
- package/lib/esm/resources/stock_reservations.d.ts +1 -51
- package/lib/esm/resources/stock_reservations.js +1 -46
- package/lib/esm/resources/stock_transfers.d.ts +1 -86
- package/lib/esm/resources/stock_transfers.js +1 -69
- package/lib/esm/resources/stripe_gateways.d.ts +1 -45
- package/lib/esm/resources/stripe_gateways.js +1 -35
- package/lib/esm/resources/stripe_payments.d.ts +1 -59
- package/lib/esm/resources/stripe_payments.js +1 -41
- package/lib/esm/resources/subscription_models.d.ts +1 -49
- package/lib/esm/resources/subscription_models.js +1 -35
- package/lib/esm/resources/tags.d.ts +1 -28
- package/lib/esm/resources/tags.js +1 -23
- package/lib/esm/resources/tax_calculators.d.ts +1 -28
- package/lib/esm/resources/tax_calculators.js +1 -26
- package/lib/esm/resources/tax_categories.d.ts +1 -63
- package/lib/esm/resources/tax_categories.js +1 -35
- package/lib/esm/resources/tax_rules.d.ts +1 -73
- package/lib/esm/resources/tax_rules.js +1 -31
- package/lib/esm/resources/taxjar_accounts.d.ts +1 -47
- package/lib/esm/resources/taxjar_accounts.js +1 -39
- package/lib/esm/resources/transactions.d.ts +1 -41
- package/lib/esm/resources/transactions.js +1 -30
- package/lib/esm/resources/versions.d.ts +1 -22
- package/lib/esm/resources/versions.js +1 -14
- package/lib/esm/resources/voids.d.ts +1 -44
- package/lib/esm/resources/voids.js +1 -34
- package/lib/esm/resources/webhooks.d.ts +1 -55
- package/lib/esm/resources/webhooks.js +1 -40
- package/lib/esm/resources/wire_transfers.d.ts +1 -37
- package/lib/esm/resources/wire_transfers.js +1 -31
- package/lib/esm/static.d.ts +1 -12
- package/lib/esm/static.js +1 -25
- package/lib/esm/util.d.ts +1 -4
- package/lib/esm/util.js +1 -37
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
@@ -1,51 +1 @@
|
|
1
|
-
import
|
2
|
-
class StockLocations extends ApiResource {
|
3
|
-
async create(resource, params, options) {
|
4
|
-
return this.resources.create({ ...resource, type: StockLocations.TYPE }, params, options);
|
5
|
-
}
|
6
|
-
async update(resource, params, options) {
|
7
|
-
return this.resources.update({ ...resource, type: StockLocations.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async delete(id, options) {
|
10
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: StockLocations.TYPE } : id, options);
|
11
|
-
}
|
12
|
-
async address(stockLocationId, params, options) {
|
13
|
-
const _stockLocationId = stockLocationId.id || stockLocationId;
|
14
|
-
return this.resources.fetch({ type: 'addresses' }, `stock_locations/${_stockLocationId}/address`, params, options);
|
15
|
-
}
|
16
|
-
async inventory_stock_locations(stockLocationId, params, options) {
|
17
|
-
const _stockLocationId = stockLocationId.id || stockLocationId;
|
18
|
-
return this.resources.fetch({ type: 'inventory_stock_locations' }, `stock_locations/${_stockLocationId}/inventory_stock_locations`, params, options);
|
19
|
-
}
|
20
|
-
async inventory_return_locations(stockLocationId, params, options) {
|
21
|
-
const _stockLocationId = stockLocationId.id || stockLocationId;
|
22
|
-
return this.resources.fetch({ type: 'inventory_return_locations' }, `stock_locations/${_stockLocationId}/inventory_return_locations`, params, options);
|
23
|
-
}
|
24
|
-
async stock_items(stockLocationId, params, options) {
|
25
|
-
const _stockLocationId = stockLocationId.id || stockLocationId;
|
26
|
-
return this.resources.fetch({ type: 'stock_items' }, `stock_locations/${_stockLocationId}/stock_items`, params, options);
|
27
|
-
}
|
28
|
-
async stock_transfers(stockLocationId, params, options) {
|
29
|
-
const _stockLocationId = stockLocationId.id || stockLocationId;
|
30
|
-
return this.resources.fetch({ type: 'stock_transfers' }, `stock_locations/${_stockLocationId}/stock_transfers`, params, options);
|
31
|
-
}
|
32
|
-
async attachments(stockLocationId, params, options) {
|
33
|
-
const _stockLocationId = stockLocationId.id || stockLocationId;
|
34
|
-
return this.resources.fetch({ type: 'attachments' }, `stock_locations/${_stockLocationId}/attachments`, params, options);
|
35
|
-
}
|
36
|
-
async versions(stockLocationId, params, options) {
|
37
|
-
const _stockLocationId = stockLocationId.id || stockLocationId;
|
38
|
-
return this.resources.fetch({ type: 'versions' }, `stock_locations/${_stockLocationId}/versions`, params, options);
|
39
|
-
}
|
40
|
-
isStockLocation(resource) {
|
41
|
-
return resource.type && (resource.type === StockLocations.TYPE);
|
42
|
-
}
|
43
|
-
relationship(id) {
|
44
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: StockLocations.TYPE } : { id: id.id, type: StockLocations.TYPE };
|
45
|
-
}
|
46
|
-
type() {
|
47
|
-
return StockLocations.TYPE;
|
48
|
-
}
|
49
|
-
}
|
50
|
-
StockLocations.TYPE = 'stock_locations';
|
51
|
-
export default StockLocations;
|
1
|
+
import{ApiResource as o}from"../resource";class n extends o{async create(t,s,e){return this.resources.create({...t,type:n.TYPE},s,e)}async update(t,s,e){return this.resources.update({...t,type:n.TYPE},s,e)}async delete(t,s){await this.resources.delete(typeof t=="string"?{id:t,type:n.TYPE}:t,s)}async address(t,s,e){const r=t.id||t;return this.resources.fetch({type:"addresses"},`stock_locations/${r}/address`,s,e)}async inventory_stock_locations(t,s,e){const r=t.id||t;return this.resources.fetch({type:"inventory_stock_locations"},`stock_locations/${r}/inventory_stock_locations`,s,e)}async inventory_return_locations(t,s,e){const r=t.id||t;return this.resources.fetch({type:"inventory_return_locations"},`stock_locations/${r}/inventory_return_locations`,s,e)}async stock_items(t,s,e){const r=t.id||t;return this.resources.fetch({type:"stock_items"},`stock_locations/${r}/stock_items`,s,e)}async stock_transfers(t,s,e){const r=t.id||t;return this.resources.fetch({type:"stock_transfers"},`stock_locations/${r}/stock_transfers`,s,e)}async attachments(t,s,e){const r=t.id||t;return this.resources.fetch({type:"attachments"},`stock_locations/${r}/attachments`,s,e)}async versions(t,s,e){const r=t.id||t;return this.resources.fetch({type:"versions"},`stock_locations/${r}/versions`,s,e)}isStockLocation(t){return t.type&&t.type===n.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:n.TYPE}:{id:t.id,type:n.TYPE}}type(){return n.TYPE}}n.TYPE="stock_locations";export default n;
|
@@ -1,51 +1 @@
|
|
1
|
-
import {
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve } from '../query';
|
4
|
-
import type { LineItem } from './line_items';
|
5
|
-
import type { Order } from './orders';
|
6
|
-
import type { StockItem, StockItemType } from './stock_items';
|
7
|
-
import type { ReservedStock } from './reserved_stocks';
|
8
|
-
import type { Sku } from './skus';
|
9
|
-
type StockReservationType = 'stock_reservations';
|
10
|
-
type StockReservationRel = ResourceRel & {
|
11
|
-
type: StockReservationType;
|
12
|
-
};
|
13
|
-
type StockItemRel = ResourceRel & {
|
14
|
-
type: StockItemType;
|
15
|
-
};
|
16
|
-
interface StockReservation extends Resource {
|
17
|
-
readonly type: StockReservationType;
|
18
|
-
status: 'draft' | 'pending';
|
19
|
-
quantity: number;
|
20
|
-
expires_at: string;
|
21
|
-
line_item?: LineItem | null;
|
22
|
-
order?: Order | null;
|
23
|
-
stock_item?: StockItem | null;
|
24
|
-
reserved_stock?: ReservedStock | null;
|
25
|
-
sku?: Sku | null;
|
26
|
-
}
|
27
|
-
interface StockReservationCreate extends ResourceCreate {
|
28
|
-
quantity: number;
|
29
|
-
stock_item: StockItemRel;
|
30
|
-
}
|
31
|
-
interface StockReservationUpdate extends ResourceUpdate {
|
32
|
-
quantity?: number | null;
|
33
|
-
_pending?: boolean | null;
|
34
|
-
}
|
35
|
-
declare class StockReservations extends ApiResource<StockReservation> {
|
36
|
-
static readonly TYPE: StockReservationType;
|
37
|
-
create(resource: StockReservationCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockReservation>;
|
38
|
-
update(resource: StockReservationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockReservation>;
|
39
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
40
|
-
line_item(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
41
|
-
order(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
42
|
-
stock_item(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
|
43
|
-
reserved_stock(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ReservedStock>;
|
44
|
-
sku(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
45
|
-
_pending(id: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockReservation>;
|
46
|
-
isStockReservation(resource: any): resource is StockReservation;
|
47
|
-
relationship(id: string | ResourceId | null): StockReservationRel;
|
48
|
-
type(): StockReservationType;
|
49
|
-
}
|
50
|
-
export default StockReservations;
|
51
|
-
export type { StockReservation, StockReservationCreate, StockReservationUpdate, StockReservationType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';import type{LineItem}from'./line_items';import type{Order}from'./orders';import type{StockItem,StockItemType}from'./stock_items';import type{ReservedStock}from'./reserved_stocks';import type{Sku}from'./skus';type StockReservationType='stock_reservations';type StockReservationRel=ResourceRel&{type:StockReservationType;};type StockItemRel=ResourceRel&{type:StockItemType;};interface StockReservation extends Resource{readonly type:StockReservationType;status:'draft'|'pending';quantity:number;expires_at:string;line_item?:LineItem|null;order?:Order|null;stock_item?:StockItem|null;reserved_stock?:ReservedStock|null;sku?:Sku|null;}interface StockReservationCreate extends ResourceCreate{quantity:number;stock_item:StockItemRel;}interface StockReservationUpdate extends ResourceUpdate{quantity?:number|null;_pending?:boolean|null;}declare class StockReservations extends ApiResource<StockReservation>{static readonly TYPE:StockReservationType;create(resource:StockReservationCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockReservation>;update(resource:StockReservationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockReservation>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;line_item(stockReservationId:string|StockReservation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;order(stockReservationId:string|StockReservation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;stock_item(stockReservationId:string|StockReservation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockItem>;reserved_stock(stockReservationId:string|StockReservation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReservedStock>;sku(stockReservationId:string|StockReservation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;_pending(id:string|StockReservation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockReservation>;isStockReservation(resource:any):resource is StockReservation;relationship(id:string|ResourceId|null):StockReservationRel;type():StockReservationType;}export default StockReservations;export type{StockReservation,StockReservationCreate,StockReservationUpdate,StockReservationType};
|
@@ -1,46 +1 @@
|
|
1
|
-
import
|
2
|
-
class StockReservations extends ApiResource {
|
3
|
-
async create(resource, params, options) {
|
4
|
-
return this.resources.create({ ...resource, type: StockReservations.TYPE }, params, options);
|
5
|
-
}
|
6
|
-
async update(resource, params, options) {
|
7
|
-
return this.resources.update({ ...resource, type: StockReservations.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async delete(id, options) {
|
10
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: StockReservations.TYPE } : id, options);
|
11
|
-
}
|
12
|
-
async line_item(stockReservationId, params, options) {
|
13
|
-
const _stockReservationId = stockReservationId.id || stockReservationId;
|
14
|
-
return this.resources.fetch({ type: 'line_items' }, `stock_reservations/${_stockReservationId}/line_item`, params, options);
|
15
|
-
}
|
16
|
-
async order(stockReservationId, params, options) {
|
17
|
-
const _stockReservationId = stockReservationId.id || stockReservationId;
|
18
|
-
return this.resources.fetch({ type: 'orders' }, `stock_reservations/${_stockReservationId}/order`, params, options);
|
19
|
-
}
|
20
|
-
async stock_item(stockReservationId, params, options) {
|
21
|
-
const _stockReservationId = stockReservationId.id || stockReservationId;
|
22
|
-
return this.resources.fetch({ type: 'stock_items' }, `stock_reservations/${_stockReservationId}/stock_item`, params, options);
|
23
|
-
}
|
24
|
-
async reserved_stock(stockReservationId, params, options) {
|
25
|
-
const _stockReservationId = stockReservationId.id || stockReservationId;
|
26
|
-
return this.resources.fetch({ type: 'reserved_stocks' }, `stock_reservations/${_stockReservationId}/reserved_stock`, params, options);
|
27
|
-
}
|
28
|
-
async sku(stockReservationId, params, options) {
|
29
|
-
const _stockReservationId = stockReservationId.id || stockReservationId;
|
30
|
-
return this.resources.fetch({ type: 'skus' }, `stock_reservations/${_stockReservationId}/sku`, params, options);
|
31
|
-
}
|
32
|
-
async _pending(id, params, options) {
|
33
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: StockReservations.TYPE, _pending: true }, params, options);
|
34
|
-
}
|
35
|
-
isStockReservation(resource) {
|
36
|
-
return resource.type && (resource.type === StockReservations.TYPE);
|
37
|
-
}
|
38
|
-
relationship(id) {
|
39
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: StockReservations.TYPE } : { id: id.id, type: StockReservations.TYPE };
|
40
|
-
}
|
41
|
-
type() {
|
42
|
-
return StockReservations.TYPE;
|
43
|
-
}
|
44
|
-
}
|
45
|
-
StockReservations.TYPE = 'stock_reservations';
|
46
|
-
export default StockReservations;
|
1
|
+
import{ApiResource as c}from"../resource";class r extends c{async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:r.TYPE}:e,t)}async line_item(e,t,s){const n=e.id||e;return this.resources.fetch({type:"line_items"},`stock_reservations/${n}/line_item`,t,s)}async order(e,t,s){const n=e.id||e;return this.resources.fetch({type:"orders"},`stock_reservations/${n}/order`,t,s)}async stock_item(e,t,s){const n=e.id||e;return this.resources.fetch({type:"stock_items"},`stock_reservations/${n}/stock_item`,t,s)}async reserved_stock(e,t,s){const n=e.id||e;return this.resources.fetch({type:"reserved_stocks"},`stock_reservations/${n}/reserved_stock`,t,s)}async sku(e,t,s){const n=e.id||e;return this.resources.fetch({type:"skus"},`stock_reservations/${n}/sku`,t,s)}async _pending(e,t,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:r.TYPE,_pending:!0},t,s)}isStockReservation(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="stock_reservations";export default r;
|
@@ -1,86 +1 @@
|
|
1
|
-
import {
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { Sku, SkuType } from './skus';
|
5
|
-
import type { StockLocation, StockLocationType } from './stock_locations';
|
6
|
-
import type { Shipment, ShipmentType } from './shipments';
|
7
|
-
import type { LineItem, LineItemType } from './line_items';
|
8
|
-
import type { Event } from './events';
|
9
|
-
import type { Version } from './versions';
|
10
|
-
type StockTransferType = 'stock_transfers';
|
11
|
-
type StockTransferRel = ResourceRel & {
|
12
|
-
type: StockTransferType;
|
13
|
-
};
|
14
|
-
type SkuRel = ResourceRel & {
|
15
|
-
type: SkuType;
|
16
|
-
};
|
17
|
-
type StockLocationRel = ResourceRel & {
|
18
|
-
type: StockLocationType;
|
19
|
-
};
|
20
|
-
type ShipmentRel = ResourceRel & {
|
21
|
-
type: ShipmentType;
|
22
|
-
};
|
23
|
-
type LineItemRel = ResourceRel & {
|
24
|
-
type: LineItemType;
|
25
|
-
};
|
26
|
-
interface StockTransfer extends Resource {
|
27
|
-
readonly type: StockTransferType;
|
28
|
-
number?: string | null;
|
29
|
-
sku_code?: string | null;
|
30
|
-
status: 'draft' | 'upcoming' | 'on_hold' | 'picking' | 'in_transit' | 'completed' | 'cancelled';
|
31
|
-
quantity: number;
|
32
|
-
completed_at?: string | null;
|
33
|
-
cancelled_at?: string | null;
|
34
|
-
sku?: Sku | null;
|
35
|
-
origin_stock_location?: StockLocation | null;
|
36
|
-
destination_stock_location?: StockLocation | null;
|
37
|
-
shipment?: Shipment | null;
|
38
|
-
line_item?: LineItem | null;
|
39
|
-
events?: Event[] | null;
|
40
|
-
versions?: Version[] | null;
|
41
|
-
}
|
42
|
-
interface StockTransferCreate extends ResourceCreate {
|
43
|
-
sku_code?: string | null;
|
44
|
-
quantity: number;
|
45
|
-
sku: SkuRel;
|
46
|
-
origin_stock_location: StockLocationRel;
|
47
|
-
destination_stock_location: StockLocationRel;
|
48
|
-
shipment?: ShipmentRel | null;
|
49
|
-
line_item?: LineItemRel | null;
|
50
|
-
}
|
51
|
-
interface StockTransferUpdate extends ResourceUpdate {
|
52
|
-
sku_code?: string | null;
|
53
|
-
_upcoming?: boolean | null;
|
54
|
-
_on_hold?: boolean | null;
|
55
|
-
_picking?: boolean | null;
|
56
|
-
_in_transit?: boolean | null;
|
57
|
-
_complete?: boolean | null;
|
58
|
-
_cancel?: boolean | null;
|
59
|
-
sku?: SkuRel | null;
|
60
|
-
origin_stock_location?: StockLocationRel | null;
|
61
|
-
destination_stock_location?: StockLocationRel | null;
|
62
|
-
}
|
63
|
-
declare class StockTransfers extends ApiResource<StockTransfer> {
|
64
|
-
static readonly TYPE: StockTransferType;
|
65
|
-
create(resource: StockTransferCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
|
66
|
-
update(resource: StockTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
|
67
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
68
|
-
sku(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
69
|
-
origin_stock_location(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
70
|
-
destination_stock_location(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
71
|
-
shipment(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
72
|
-
line_item(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
73
|
-
events(stockTransferId: string | StockTransfer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
74
|
-
versions(stockTransferId: string | StockTransfer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
75
|
-
_upcoming(id: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
|
76
|
-
_on_hold(id: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
|
77
|
-
_picking(id: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
|
78
|
-
_in_transit(id: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
|
79
|
-
_complete(id: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
|
80
|
-
_cancel(id: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
|
81
|
-
isStockTransfer(resource: any): resource is StockTransfer;
|
82
|
-
relationship(id: string | ResourceId | null): StockTransferRel;
|
83
|
-
type(): StockTransferType;
|
84
|
-
}
|
85
|
-
export default StockTransfers;
|
86
|
-
export type { StockTransfer, StockTransferCreate, StockTransferUpdate, StockTransferType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Sku,SkuType}from'./skus';import type{StockLocation,StockLocationType}from'./stock_locations';import type{Shipment,ShipmentType}from'./shipments';import type{LineItem,LineItemType}from'./line_items';import type{Event}from'./events';import type{Version}from'./versions';type StockTransferType='stock_transfers';type StockTransferRel=ResourceRel&{type:StockTransferType;};type SkuRel=ResourceRel&{type:SkuType;};type StockLocationRel=ResourceRel&{type:StockLocationType;};type ShipmentRel=ResourceRel&{type:ShipmentType;};type LineItemRel=ResourceRel&{type:LineItemType;};interface StockTransfer extends Resource{readonly type:StockTransferType;number?:string|null;sku_code?:string|null;status:'draft'|'upcoming'|'on_hold'|'picking'|'in_transit'|'completed'|'cancelled';quantity:number;completed_at?:string|null;cancelled_at?:string|null;sku?:Sku|null;origin_stock_location?:StockLocation|null;destination_stock_location?:StockLocation|null;shipment?:Shipment|null;line_item?:LineItem|null;events?:Event[]|null;versions?:Version[]|null;}interface StockTransferCreate extends ResourceCreate{sku_code?:string|null;quantity:number;sku:SkuRel;origin_stock_location:StockLocationRel;destination_stock_location:StockLocationRel;shipment?:ShipmentRel|null;line_item?:LineItemRel|null;}interface StockTransferUpdate extends ResourceUpdate{sku_code?:string|null;_upcoming?:boolean|null;_on_hold?:boolean|null;_picking?:boolean|null;_in_transit?:boolean|null;_complete?:boolean|null;_cancel?:boolean|null;sku?:SkuRel|null;origin_stock_location?:StockLocationRel|null;destination_stock_location?:StockLocationRel|null;}declare class StockTransfers extends ApiResource<StockTransfer>{static readonly TYPE:StockTransferType;create(resource:StockTransferCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;update(resource:StockTransferUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;sku(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;origin_stock_location(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;destination_stock_location(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;shipment(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;line_item(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;events(stockTransferId:string|StockTransfer,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;versions(stockTransferId:string|StockTransfer,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;_upcoming(id:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;_on_hold(id:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;_picking(id:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;_in_transit(id:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;_complete(id:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;_cancel(id:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;isStockTransfer(resource:any):resource is StockTransfer;relationship(id:string|ResourceId|null):StockTransferRel;type():StockTransferType;}export default StockTransfers;export type{StockTransfer,StockTransferCreate,StockTransferUpdate,StockTransferType};
|
@@ -1,69 +1 @@
|
|
1
|
-
import
|
2
|
-
class StockTransfers extends ApiResource {
|
3
|
-
async create(resource, params, options) {
|
4
|
-
return this.resources.create({ ...resource, type: StockTransfers.TYPE }, params, options);
|
5
|
-
}
|
6
|
-
async update(resource, params, options) {
|
7
|
-
return this.resources.update({ ...resource, type: StockTransfers.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async delete(id, options) {
|
10
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: StockTransfers.TYPE } : id, options);
|
11
|
-
}
|
12
|
-
async sku(stockTransferId, params, options) {
|
13
|
-
const _stockTransferId = stockTransferId.id || stockTransferId;
|
14
|
-
return this.resources.fetch({ type: 'skus' }, `stock_transfers/${_stockTransferId}/sku`, params, options);
|
15
|
-
}
|
16
|
-
async origin_stock_location(stockTransferId, params, options) {
|
17
|
-
const _stockTransferId = stockTransferId.id || stockTransferId;
|
18
|
-
return this.resources.fetch({ type: 'stock_locations' }, `stock_transfers/${_stockTransferId}/origin_stock_location`, params, options);
|
19
|
-
}
|
20
|
-
async destination_stock_location(stockTransferId, params, options) {
|
21
|
-
const _stockTransferId = stockTransferId.id || stockTransferId;
|
22
|
-
return this.resources.fetch({ type: 'stock_locations' }, `stock_transfers/${_stockTransferId}/destination_stock_location`, params, options);
|
23
|
-
}
|
24
|
-
async shipment(stockTransferId, params, options) {
|
25
|
-
const _stockTransferId = stockTransferId.id || stockTransferId;
|
26
|
-
return this.resources.fetch({ type: 'shipments' }, `stock_transfers/${_stockTransferId}/shipment`, params, options);
|
27
|
-
}
|
28
|
-
async line_item(stockTransferId, params, options) {
|
29
|
-
const _stockTransferId = stockTransferId.id || stockTransferId;
|
30
|
-
return this.resources.fetch({ type: 'line_items' }, `stock_transfers/${_stockTransferId}/line_item`, params, options);
|
31
|
-
}
|
32
|
-
async events(stockTransferId, params, options) {
|
33
|
-
const _stockTransferId = stockTransferId.id || stockTransferId;
|
34
|
-
return this.resources.fetch({ type: 'events' }, `stock_transfers/${_stockTransferId}/events`, params, options);
|
35
|
-
}
|
36
|
-
async versions(stockTransferId, params, options) {
|
37
|
-
const _stockTransferId = stockTransferId.id || stockTransferId;
|
38
|
-
return this.resources.fetch({ type: 'versions' }, `stock_transfers/${_stockTransferId}/versions`, params, options);
|
39
|
-
}
|
40
|
-
async _upcoming(id, params, options) {
|
41
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: StockTransfers.TYPE, _upcoming: true }, params, options);
|
42
|
-
}
|
43
|
-
async _on_hold(id, params, options) {
|
44
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: StockTransfers.TYPE, _on_hold: true }, params, options);
|
45
|
-
}
|
46
|
-
async _picking(id, params, options) {
|
47
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: StockTransfers.TYPE, _picking: true }, params, options);
|
48
|
-
}
|
49
|
-
async _in_transit(id, params, options) {
|
50
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: StockTransfers.TYPE, _in_transit: true }, params, options);
|
51
|
-
}
|
52
|
-
async _complete(id, params, options) {
|
53
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: StockTransfers.TYPE, _complete: true }, params, options);
|
54
|
-
}
|
55
|
-
async _cancel(id, params, options) {
|
56
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: StockTransfers.TYPE, _cancel: true }, params, options);
|
57
|
-
}
|
58
|
-
isStockTransfer(resource) {
|
59
|
-
return resource.type && (resource.type === StockTransfers.TYPE);
|
60
|
-
}
|
61
|
-
relationship(id) {
|
62
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: StockTransfers.TYPE } : { id: id.id, type: StockTransfers.TYPE };
|
63
|
-
}
|
64
|
-
type() {
|
65
|
-
return StockTransfers.TYPE;
|
66
|
-
}
|
67
|
-
}
|
68
|
-
StockTransfers.TYPE = 'stock_transfers';
|
69
|
-
export default StockTransfers;
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async create(t,e,s){return this.resources.create({...t,type:r.TYPE},e,s)}async update(t,e,s){return this.resources.update({...t,type:r.TYPE},e,s)}async delete(t,e){await this.resources.delete(typeof t=="string"?{id:t,type:r.TYPE}:t,e)}async sku(t,e,s){const n=t.id||t;return this.resources.fetch({type:"skus"},`stock_transfers/${n}/sku`,e,s)}async origin_stock_location(t,e,s){const n=t.id||t;return this.resources.fetch({type:"stock_locations"},`stock_transfers/${n}/origin_stock_location`,e,s)}async destination_stock_location(t,e,s){const n=t.id||t;return this.resources.fetch({type:"stock_locations"},`stock_transfers/${n}/destination_stock_location`,e,s)}async shipment(t,e,s){const n=t.id||t;return this.resources.fetch({type:"shipments"},`stock_transfers/${n}/shipment`,e,s)}async line_item(t,e,s){const n=t.id||t;return this.resources.fetch({type:"line_items"},`stock_transfers/${n}/line_item`,e,s)}async events(t,e,s){const n=t.id||t;return this.resources.fetch({type:"events"},`stock_transfers/${n}/events`,e,s)}async versions(t,e,s){const n=t.id||t;return this.resources.fetch({type:"versions"},`stock_transfers/${n}/versions`,e,s)}async _upcoming(t,e,s){return this.resources.update({id:typeof t=="string"?t:t.id,type:r.TYPE,_upcoming:!0},e,s)}async _on_hold(t,e,s){return this.resources.update({id:typeof t=="string"?t:t.id,type:r.TYPE,_on_hold:!0},e,s)}async _picking(t,e,s){return this.resources.update({id:typeof t=="string"?t:t.id,type:r.TYPE,_picking:!0},e,s)}async _in_transit(t,e,s){return this.resources.update({id:typeof t=="string"?t:t.id,type:r.TYPE,_in_transit:!0},e,s)}async _complete(t,e,s){return this.resources.update({id:typeof t=="string"?t:t.id,type:r.TYPE,_complete:!0},e,s)}async _cancel(t,e,s){return this.resources.update({id:typeof t=="string"?t:t.id,type:r.TYPE,_cancel:!0},e,s)}isStockTransfer(t){return t.type&&t.type===r.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:r.TYPE}:{id:t.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="stock_transfers";export default r;
|
@@ -1,45 +1 @@
|
|
1
|
-
import {
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { PaymentMethod } from './payment_methods';
|
5
|
-
import type { Version } from './versions';
|
6
|
-
import type { StripePayment } from './stripe_payments';
|
7
|
-
type StripeGatewayType = 'stripe_gateways';
|
8
|
-
type StripeGatewayRel = ResourceRel & {
|
9
|
-
type: StripeGatewayType;
|
10
|
-
};
|
11
|
-
interface StripeGateway extends Resource {
|
12
|
-
readonly type: StripeGatewayType;
|
13
|
-
name: string;
|
14
|
-
auto_payments?: boolean | null;
|
15
|
-
webhook_endpoint_id?: string | null;
|
16
|
-
webhook_endpoint_secret?: string | null;
|
17
|
-
webhook_endpoint_url?: string | null;
|
18
|
-
payment_methods?: PaymentMethod[] | null;
|
19
|
-
versions?: Version[] | null;
|
20
|
-
stripe_payments?: StripePayment[] | null;
|
21
|
-
}
|
22
|
-
interface StripeGatewayCreate extends ResourceCreate {
|
23
|
-
name: string;
|
24
|
-
login: string;
|
25
|
-
publishable_key?: string | null;
|
26
|
-
auto_payments?: boolean | null;
|
27
|
-
}
|
28
|
-
interface StripeGatewayUpdate extends ResourceUpdate {
|
29
|
-
name?: string | null;
|
30
|
-
auto_payments?: boolean | null;
|
31
|
-
}
|
32
|
-
declare class StripeGateways extends ApiResource<StripeGateway> {
|
33
|
-
static readonly TYPE: StripeGatewayType;
|
34
|
-
create(resource: StripeGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripeGateway>;
|
35
|
-
update(resource: StripeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripeGateway>;
|
36
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
37
|
-
payment_methods(stripeGatewayId: string | StripeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
38
|
-
versions(stripeGatewayId: string | StripeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
39
|
-
stripe_payments(stripeGatewayId: string | StripeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StripePayment>>;
|
40
|
-
isStripeGateway(resource: any): resource is StripeGateway;
|
41
|
-
relationship(id: string | ResourceId | null): StripeGatewayRel;
|
42
|
-
type(): StripeGatewayType;
|
43
|
-
}
|
44
|
-
export default StripeGateways;
|
45
|
-
export type { StripeGateway, StripeGatewayCreate, StripeGatewayUpdate, StripeGatewayType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{PaymentMethod}from'./payment_methods';import type{Version}from'./versions';import type{StripePayment}from'./stripe_payments';type StripeGatewayType='stripe_gateways';type StripeGatewayRel=ResourceRel&{type:StripeGatewayType;};interface StripeGateway extends Resource{readonly type:StripeGatewayType;name:string;auto_payments?:boolean|null;webhook_endpoint_id?:string|null;webhook_endpoint_secret?:string|null;webhook_endpoint_url?:string|null;payment_methods?:PaymentMethod[]|null;versions?:Version[]|null;stripe_payments?:StripePayment[]|null;}interface StripeGatewayCreate extends ResourceCreate{name:string;login:string;publishable_key?:string|null;auto_payments?:boolean|null;}interface StripeGatewayUpdate extends ResourceUpdate{name?:string|null;auto_payments?:boolean|null;}declare class StripeGateways extends ApiResource<StripeGateway>{static readonly TYPE:StripeGatewayType;create(resource:StripeGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripeGateway>;update(resource:StripeGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripeGateway>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;payment_methods(stripeGatewayId:string|StripeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;versions(stripeGatewayId:string|StripeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;stripe_payments(stripeGatewayId:string|StripeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StripePayment>>;isStripeGateway(resource:any):resource is StripeGateway;relationship(id:string|ResourceId|null):StripeGatewayRel;type():StripeGatewayType;}export default StripeGateways;export type{StripeGateway,StripeGatewayCreate,StripeGatewayUpdate,StripeGatewayType};
|
@@ -1,35 +1 @@
|
|
1
|
-
import
|
2
|
-
class StripeGateways extends ApiResource {
|
3
|
-
async create(resource, params, options) {
|
4
|
-
return this.resources.create({ ...resource, type: StripeGateways.TYPE }, params, options);
|
5
|
-
}
|
6
|
-
async update(resource, params, options) {
|
7
|
-
return this.resources.update({ ...resource, type: StripeGateways.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async delete(id, options) {
|
10
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: StripeGateways.TYPE } : id, options);
|
11
|
-
}
|
12
|
-
async payment_methods(stripeGatewayId, params, options) {
|
13
|
-
const _stripeGatewayId = stripeGatewayId.id || stripeGatewayId;
|
14
|
-
return this.resources.fetch({ type: 'payment_methods' }, `stripe_gateways/${_stripeGatewayId}/payment_methods`, params, options);
|
15
|
-
}
|
16
|
-
async versions(stripeGatewayId, params, options) {
|
17
|
-
const _stripeGatewayId = stripeGatewayId.id || stripeGatewayId;
|
18
|
-
return this.resources.fetch({ type: 'versions' }, `stripe_gateways/${_stripeGatewayId}/versions`, params, options);
|
19
|
-
}
|
20
|
-
async stripe_payments(stripeGatewayId, params, options) {
|
21
|
-
const _stripeGatewayId = stripeGatewayId.id || stripeGatewayId;
|
22
|
-
return this.resources.fetch({ type: 'stripe_payments' }, `stripe_gateways/${_stripeGatewayId}/stripe_payments`, params, options);
|
23
|
-
}
|
24
|
-
isStripeGateway(resource) {
|
25
|
-
return resource.type && (resource.type === StripeGateways.TYPE);
|
26
|
-
}
|
27
|
-
relationship(id) {
|
28
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: StripeGateways.TYPE } : { id: id.id, type: StripeGateways.TYPE };
|
29
|
-
}
|
30
|
-
type() {
|
31
|
-
return StripeGateways.TYPE;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
StripeGateways.TYPE = 'stripe_gateways';
|
35
|
-
export default StripeGateways;
|
1
|
+
import{ApiResource as p}from"../resource";class s extends p{async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:s.TYPE}:e,t)}async payment_methods(e,t,r){const n=e.id||e;return this.resources.fetch({type:"payment_methods"},`stripe_gateways/${n}/payment_methods`,t,r)}async versions(e,t,r){const n=e.id||e;return this.resources.fetch({type:"versions"},`stripe_gateways/${n}/versions`,t,r)}async stripe_payments(e,t,r){const n=e.id||e;return this.resources.fetch({type:"stripe_payments"},`stripe_gateways/${n}/stripe_payments`,t,r)}isStripeGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="stripe_gateways";export default s;
|
@@ -1,59 +1 @@
|
|
1
|
-
import {
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { Order, OrderType } from './orders';
|
5
|
-
import type { PaymentGateway } from './payment_gateways';
|
6
|
-
import type { Version } from './versions';
|
7
|
-
type StripePaymentType = 'stripe_payments';
|
8
|
-
type StripePaymentRel = ResourceRel & {
|
9
|
-
type: StripePaymentType;
|
10
|
-
};
|
11
|
-
type OrderRel = ResourceRel & {
|
12
|
-
type: OrderType;
|
13
|
-
};
|
14
|
-
interface StripePayment extends Resource {
|
15
|
-
readonly type: StripePaymentType;
|
16
|
-
stripe_id?: string | null;
|
17
|
-
client_secret?: string | null;
|
18
|
-
publishable_key?: string | null;
|
19
|
-
options?: Record<string, any> | null;
|
20
|
-
payment_method?: Record<string, any> | null;
|
21
|
-
mismatched_amounts?: boolean | null;
|
22
|
-
return_url?: string | null;
|
23
|
-
receipt_email?: string | null;
|
24
|
-
payment_instrument?: Record<string, any> | null;
|
25
|
-
order?: Order | null;
|
26
|
-
payment_gateway?: PaymentGateway | null;
|
27
|
-
versions?: Version[] | null;
|
28
|
-
}
|
29
|
-
interface StripePaymentCreate extends ResourceCreate {
|
30
|
-
stripe_id?: string | null;
|
31
|
-
client_secret?: string | null;
|
32
|
-
options?: Record<string, any> | null;
|
33
|
-
return_url?: string | null;
|
34
|
-
receipt_email?: string | null;
|
35
|
-
order: OrderRel;
|
36
|
-
}
|
37
|
-
interface StripePaymentUpdate extends ResourceUpdate {
|
38
|
-
options?: Record<string, any> | null;
|
39
|
-
return_url?: string | null;
|
40
|
-
_update?: boolean | null;
|
41
|
-
_refresh?: boolean | null;
|
42
|
-
order?: OrderRel | null;
|
43
|
-
}
|
44
|
-
declare class StripePayments extends ApiResource<StripePayment> {
|
45
|
-
static readonly TYPE: StripePaymentType;
|
46
|
-
create(resource: StripePaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
|
47
|
-
update(resource: StripePaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
|
48
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
49
|
-
order(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
50
|
-
payment_gateway(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
51
|
-
versions(stripePaymentId: string | StripePayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
52
|
-
_update(id: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
|
53
|
-
_refresh(id: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
|
54
|
-
isStripePayment(resource: any): resource is StripePayment;
|
55
|
-
relationship(id: string | ResourceId | null): StripePaymentRel;
|
56
|
-
type(): StripePaymentType;
|
57
|
-
}
|
58
|
-
export default StripePayments;
|
59
|
-
export type { StripePayment, StripePaymentCreate, StripePaymentUpdate, StripePaymentType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Order,OrderType}from'./orders';import type{PaymentGateway}from'./payment_gateways';import type{Version}from'./versions';type StripePaymentType='stripe_payments';type StripePaymentRel=ResourceRel&{type:StripePaymentType;};type OrderRel=ResourceRel&{type:OrderType;};interface StripePayment extends Resource{readonly type:StripePaymentType;stripe_id?:string|null;client_secret?:string|null;publishable_key?:string|null;options?:Record<string,any>|null;payment_method?:Record<string,any>|null;mismatched_amounts?:boolean|null;return_url?:string|null;receipt_email?:string|null;payment_instrument?:Record<string,any>|null;order?:Order|null;payment_gateway?:PaymentGateway|null;versions?:Version[]|null;}interface StripePaymentCreate extends ResourceCreate{stripe_id?:string|null;client_secret?:string|null;options?:Record<string,any>|null;return_url?:string|null;receipt_email?:string|null;order:OrderRel;}interface StripePaymentUpdate extends ResourceUpdate{options?:Record<string,any>|null;return_url?:string|null;_update?:boolean|null;_refresh?:boolean|null;order?:OrderRel|null;}declare class StripePayments extends ApiResource<StripePayment>{static readonly TYPE:StripePaymentType;create(resource:StripePaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripePayment>;update(resource:StripePaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripePayment>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;order(stripePaymentId:string|StripePayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(stripePaymentId:string|StripePayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;versions(stripePaymentId:string|StripePayment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;_update(id:string|StripePayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripePayment>;_refresh(id:string|StripePayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripePayment>;isStripePayment(resource:any):resource is StripePayment;relationship(id:string|ResourceId|null):StripePaymentRel;type():StripePaymentType;}export default StripePayments;export type{StripePayment,StripePaymentCreate,StripePaymentUpdate,StripePaymentType};
|
@@ -1,41 +1 @@
|
|
1
|
-
import
|
2
|
-
class StripePayments extends ApiResource {
|
3
|
-
async create(resource, params, options) {
|
4
|
-
return this.resources.create({ ...resource, type: StripePayments.TYPE }, params, options);
|
5
|
-
}
|
6
|
-
async update(resource, params, options) {
|
7
|
-
return this.resources.update({ ...resource, type: StripePayments.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async delete(id, options) {
|
10
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: StripePayments.TYPE } : id, options);
|
11
|
-
}
|
12
|
-
async order(stripePaymentId, params, options) {
|
13
|
-
const _stripePaymentId = stripePaymentId.id || stripePaymentId;
|
14
|
-
return this.resources.fetch({ type: 'orders' }, `stripe_payments/${_stripePaymentId}/order`, params, options);
|
15
|
-
}
|
16
|
-
async payment_gateway(stripePaymentId, params, options) {
|
17
|
-
const _stripePaymentId = stripePaymentId.id || stripePaymentId;
|
18
|
-
return this.resources.fetch({ type: 'payment_gateways' }, `stripe_payments/${_stripePaymentId}/payment_gateway`, params, options);
|
19
|
-
}
|
20
|
-
async versions(stripePaymentId, params, options) {
|
21
|
-
const _stripePaymentId = stripePaymentId.id || stripePaymentId;
|
22
|
-
return this.resources.fetch({ type: 'versions' }, `stripe_payments/${_stripePaymentId}/versions`, params, options);
|
23
|
-
}
|
24
|
-
async _update(id, params, options) {
|
25
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: StripePayments.TYPE, _update: true }, params, options);
|
26
|
-
}
|
27
|
-
async _refresh(id, params, options) {
|
28
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: StripePayments.TYPE, _refresh: true }, params, options);
|
29
|
-
}
|
30
|
-
isStripePayment(resource) {
|
31
|
-
return resource.type && (resource.type === StripePayments.TYPE);
|
32
|
-
}
|
33
|
-
relationship(id) {
|
34
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: StripePayments.TYPE } : { id: id.id, type: StripePayments.TYPE };
|
35
|
-
}
|
36
|
-
type() {
|
37
|
-
return StripePayments.TYPE;
|
38
|
-
}
|
39
|
-
}
|
40
|
-
StripePayments.TYPE = 'stripe_payments';
|
41
|
-
export default StripePayments;
|
1
|
+
import{ApiResource as p}from"../resource";class s extends p{async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:s.TYPE}:e,t)}async order(e,t,r){const n=e.id||e;return this.resources.fetch({type:"orders"},`stripe_payments/${n}/order`,t,r)}async payment_gateway(e,t,r){const n=e.id||e;return this.resources.fetch({type:"payment_gateways"},`stripe_payments/${n}/payment_gateway`,t,r)}async versions(e,t,r){const n=e.id||e;return this.resources.fetch({type:"versions"},`stripe_payments/${n}/versions`,t,r)}async _update(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:s.TYPE,_update:!0},t,r)}async _refresh(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:s.TYPE,_refresh:!0},t,r)}isStripePayment(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="stripe_payments";export default s;
|
@@ -1,49 +1 @@
|
|
1
|
-
import {
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { Market } from './markets';
|
5
|
-
import type { OrderSubscription } from './order_subscriptions';
|
6
|
-
import type { Attachment } from './attachments';
|
7
|
-
type SubscriptionModelType = 'subscription_models';
|
8
|
-
type SubscriptionModelRel = ResourceRel & {
|
9
|
-
type: SubscriptionModelType;
|
10
|
-
};
|
11
|
-
interface SubscriptionModel extends Resource {
|
12
|
-
readonly type: SubscriptionModelType;
|
13
|
-
name: string;
|
14
|
-
strategy?: string | null;
|
15
|
-
frequencies: string[];
|
16
|
-
auto_activate?: boolean | null;
|
17
|
-
auto_cancel?: boolean | null;
|
18
|
-
markets?: Market[] | null;
|
19
|
-
order_subscriptions?: OrderSubscription[] | null;
|
20
|
-
attachments?: Attachment[] | null;
|
21
|
-
}
|
22
|
-
interface SubscriptionModelCreate extends ResourceCreate {
|
23
|
-
name: string;
|
24
|
-
strategy?: string | null;
|
25
|
-
frequencies: string[];
|
26
|
-
auto_activate?: boolean | null;
|
27
|
-
auto_cancel?: boolean | null;
|
28
|
-
}
|
29
|
-
interface SubscriptionModelUpdate extends ResourceUpdate {
|
30
|
-
name?: string | null;
|
31
|
-
strategy?: string | null;
|
32
|
-
frequencies?: string[] | null;
|
33
|
-
auto_activate?: boolean | null;
|
34
|
-
auto_cancel?: boolean | null;
|
35
|
-
}
|
36
|
-
declare class SubscriptionModels extends ApiResource<SubscriptionModel> {
|
37
|
-
static readonly TYPE: SubscriptionModelType;
|
38
|
-
create(resource: SubscriptionModelCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SubscriptionModel>;
|
39
|
-
update(resource: SubscriptionModelUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SubscriptionModel>;
|
40
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
41
|
-
markets(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
42
|
-
order_subscriptions(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>>;
|
43
|
-
attachments(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
44
|
-
isSubscriptionModel(resource: any): resource is SubscriptionModel;
|
45
|
-
relationship(id: string | ResourceId | null): SubscriptionModelRel;
|
46
|
-
type(): SubscriptionModelType;
|
47
|
-
}
|
48
|
-
export default SubscriptionModels;
|
49
|
-
export type { SubscriptionModel, SubscriptionModelCreate, SubscriptionModelUpdate, SubscriptionModelType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market}from'./markets';import type{OrderSubscription}from'./order_subscriptions';import type{Attachment}from'./attachments';type SubscriptionModelType='subscription_models';type SubscriptionModelRel=ResourceRel&{type:SubscriptionModelType;};interface SubscriptionModel extends Resource{readonly type:SubscriptionModelType;name:string;strategy?:string|null;frequencies:string[];auto_activate?:boolean|null;auto_cancel?:boolean|null;markets?:Market[]|null;order_subscriptions?:OrderSubscription[]|null;attachments?:Attachment[]|null;}interface SubscriptionModelCreate extends ResourceCreate{name:string;strategy?:string|null;frequencies:string[];auto_activate?:boolean|null;auto_cancel?:boolean|null;}interface SubscriptionModelUpdate extends ResourceUpdate{name?:string|null;strategy?:string|null;frequencies?:string[]|null;auto_activate?:boolean|null;auto_cancel?:boolean|null;}declare class SubscriptionModels extends ApiResource<SubscriptionModel>{static readonly TYPE:SubscriptionModelType;create(resource:SubscriptionModelCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SubscriptionModel>;update(resource:SubscriptionModelUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SubscriptionModel>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;markets(subscriptionModelId:string|SubscriptionModel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;order_subscriptions(subscriptionModelId:string|SubscriptionModel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderSubscription>>;attachments(subscriptionModelId:string|SubscriptionModel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isSubscriptionModel(resource:any):resource is SubscriptionModel;relationship(id:string|ResourceId|null):SubscriptionModelRel;type():SubscriptionModelType;}export default SubscriptionModels;export type{SubscriptionModel,SubscriptionModelCreate,SubscriptionModelUpdate,SubscriptionModelType};
|
@@ -1,35 +1 @@
|
|
1
|
-
import
|
2
|
-
class SubscriptionModels extends ApiResource {
|
3
|
-
async create(resource, params, options) {
|
4
|
-
return this.resources.create({ ...resource, type: SubscriptionModels.TYPE }, params, options);
|
5
|
-
}
|
6
|
-
async update(resource, params, options) {
|
7
|
-
return this.resources.update({ ...resource, type: SubscriptionModels.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async delete(id, options) {
|
10
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: SubscriptionModels.TYPE } : id, options);
|
11
|
-
}
|
12
|
-
async markets(subscriptionModelId, params, options) {
|
13
|
-
const _subscriptionModelId = subscriptionModelId.id || subscriptionModelId;
|
14
|
-
return this.resources.fetch({ type: 'markets' }, `subscription_models/${_subscriptionModelId}/markets`, params, options);
|
15
|
-
}
|
16
|
-
async order_subscriptions(subscriptionModelId, params, options) {
|
17
|
-
const _subscriptionModelId = subscriptionModelId.id || subscriptionModelId;
|
18
|
-
return this.resources.fetch({ type: 'order_subscriptions' }, `subscription_models/${_subscriptionModelId}/order_subscriptions`, params, options);
|
19
|
-
}
|
20
|
-
async attachments(subscriptionModelId, params, options) {
|
21
|
-
const _subscriptionModelId = subscriptionModelId.id || subscriptionModelId;
|
22
|
-
return this.resources.fetch({ type: 'attachments' }, `subscription_models/${_subscriptionModelId}/attachments`, params, options);
|
23
|
-
}
|
24
|
-
isSubscriptionModel(resource) {
|
25
|
-
return resource.type && (resource.type === SubscriptionModels.TYPE);
|
26
|
-
}
|
27
|
-
relationship(id) {
|
28
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: SubscriptionModels.TYPE } : { id: id.id, type: SubscriptionModels.TYPE };
|
29
|
-
}
|
30
|
-
type() {
|
31
|
-
return SubscriptionModels.TYPE;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
SubscriptionModels.TYPE = 'subscription_models';
|
35
|
-
export default SubscriptionModels;
|
1
|
+
import{ApiResource as c}from"../resource";class s extends c{async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:s.TYPE}:e,t)}async markets(e,t,r){const n=e.id||e;return this.resources.fetch({type:"markets"},`subscription_models/${n}/markets`,t,r)}async order_subscriptions(e,t,r){const n=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`subscription_models/${n}/order_subscriptions`,t,r)}async attachments(e,t,r){const n=e.id||e;return this.resources.fetch({type:"attachments"},`subscription_models/${n}/attachments`,t,r)}isSubscriptionModel(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="subscription_models";export default s;
|