@commercelayer/sdk 4.47.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 -55
- 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 -49
- 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 -67
- package/lib/cjs/resources/order_subscription_items.js +1 -41
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -92
- 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 -55
- 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 -74
- package/lib/cjs/resources/prices.js +1 -61
- 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 -51
- 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 -58
- 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 -59
- 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 -55
- 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 -49
- 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 -67
- package/lib/esm/resources/order_subscription_items.js +1 -39
- package/lib/esm/resources/order_subscriptions.d.ts +1 -92
- 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 -55
- 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 -74
- package/lib/esm/resources/prices.js +1 -59
- 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 -51
- 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 -58
- 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 -59
- 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 +5 -5
@@ -1,45 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { PaymentMethod } from './payment_methods';
|
4
|
-
import type { Version } from './versions';
|
5
|
-
import type { SatispayPayment } from './satispay_payments';
|
6
|
-
type SatispayGatewayRel = ResourceRel & {
|
7
|
-
type: typeof SatispayGateways.TYPE;
|
8
|
-
};
|
9
|
-
type SatispayPaymentRel = ResourceRel & {
|
10
|
-
type: 'satispay_payments';
|
11
|
-
};
|
12
|
-
interface SatispayGateway extends Resource {
|
13
|
-
name?: string;
|
14
|
-
token?: string;
|
15
|
-
key_id?: string;
|
16
|
-
webhook_endpoint_url?: string;
|
17
|
-
payment_methods?: PaymentMethod[];
|
18
|
-
versions?: Version[];
|
19
|
-
satispay_payments?: SatispayPayment[];
|
20
|
-
}
|
21
|
-
interface SatispayGatewayCreate extends ResourceCreate {
|
22
|
-
name: string;
|
23
|
-
token: string;
|
24
|
-
satispay_payments?: SatispayPaymentRel[];
|
25
|
-
}
|
26
|
-
interface SatispayGatewayUpdate extends ResourceUpdate {
|
27
|
-
name?: string;
|
28
|
-
satispay_payments?: SatispayPaymentRel[];
|
29
|
-
}
|
30
|
-
declare class SatispayGateways extends ApiResource {
|
31
|
-
static readonly TYPE: 'satispay_gateways';
|
32
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SatispayGateway>>;
|
33
|
-
create(resource: SatispayGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayGateway>;
|
34
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayGateway>;
|
35
|
-
update(resource: SatispayGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayGateway>;
|
36
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
37
|
-
payment_methods(satispayGatewayId: string | SatispayGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
38
|
-
versions(satispayGatewayId: string | SatispayGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
39
|
-
satispay_payments(satispayGatewayId: string | SatispayGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SatispayPayment>>;
|
40
|
-
isSatispayGateway(resource: any): resource is SatispayGateway;
|
41
|
-
relationship(id: string | ResourceId | null): SatispayGatewayRel;
|
42
|
-
type(): string;
|
43
|
-
}
|
44
|
-
export default SatispayGateways;
|
45
|
-
export { SatispayGateway, SatispayGatewayCreate, SatispayGatewayUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{Version}from'./versions';import type{SatispayPayment}from'./satispay_payments';type SatispayGatewayRel=ResourceRel&{type:typeof SatispayGateways.TYPE;};type SatispayPaymentRel=ResourceRel&{type:'satispay_payments';};interface SatispayGateway extends Resource{name?:string;token?:string;key_id?:string;webhook_endpoint_url?:string;payment_methods?:PaymentMethod[];versions?:Version[];satispay_payments?:SatispayPayment[];}interface SatispayGatewayCreate extends ResourceCreate{name:string;token:string;satispay_payments?:SatispayPaymentRel[];}interface SatispayGatewayUpdate extends ResourceUpdate{name?:string;satispay_payments?:SatispayPaymentRel[];}declare class SatispayGateways extends ApiResource{static readonly TYPE:'satispay_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SatispayGateway>>;create(resource:SatispayGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayGateway>;update(resource:SatispayGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(satispayGatewayId:string|SatispayGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;versions(satispayGatewayId:string|SatispayGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;satispay_payments(satispayGatewayId:string|SatispayGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SatispayPayment>>;isSatispayGateway(resource:any):resource is SatispayGateway;relationship(id:string|ResourceId|null):SatispayGatewayRel;type():string;}export default SatispayGateways;export{SatispayGateway,SatispayGatewayCreate,SatispayGatewayUpdate};
|
@@ -1,43 +1 @@
|
|
1
|
-
import
|
2
|
-
class SatispayGateways extends ApiResource {
|
3
|
-
// static readonly PATH = 'satispay_gateways'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: SatispayGateways.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async create(resource, params, options) {
|
8
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: SatispayGateways.TYPE }), params, options);
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: SatispayGateways.TYPE, id }, params, options);
|
12
|
-
}
|
13
|
-
async update(resource, params, options) {
|
14
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: SatispayGateways.TYPE }), params, options);
|
15
|
-
}
|
16
|
-
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: SatispayGateways.TYPE, id }, options);
|
18
|
-
}
|
19
|
-
async payment_methods(satispayGatewayId, params, options) {
|
20
|
-
const _satispayGatewayId = satispayGatewayId.id || satispayGatewayId;
|
21
|
-
return this.resources.fetch({ type: 'payment_methods' }, `satispay_gateways/${_satispayGatewayId}/payment_methods`, params, options);
|
22
|
-
}
|
23
|
-
async versions(satispayGatewayId, params, options) {
|
24
|
-
const _satispayGatewayId = satispayGatewayId.id || satispayGatewayId;
|
25
|
-
return this.resources.fetch({ type: 'versions' }, `satispay_gateways/${_satispayGatewayId}/versions`, params, options);
|
26
|
-
}
|
27
|
-
async satispay_payments(satispayGatewayId, params, options) {
|
28
|
-
const _satispayGatewayId = satispayGatewayId.id || satispayGatewayId;
|
29
|
-
return this.resources.fetch({ type: 'satispay_payments' }, `satispay_gateways/${_satispayGatewayId}/satispay_payments`, params, options);
|
30
|
-
}
|
31
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
32
|
-
isSatispayGateway(resource) {
|
33
|
-
return resource.type && (resource.type === SatispayGateways.TYPE);
|
34
|
-
}
|
35
|
-
relationship(id) {
|
36
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: SatispayGateways.TYPE } : { id: id.id, type: SatispayGateways.TYPE };
|
37
|
-
}
|
38
|
-
type() {
|
39
|
-
return SatispayGateways.TYPE;
|
40
|
-
}
|
41
|
-
}
|
42
|
-
SatispayGateways.TYPE = 'satispay_gateways';
|
43
|
-
export default SatispayGateways;
|
1
|
+
import{ApiResource as c}from"../resource";class t extends c{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}async payment_methods(e,s,r){const n=e.id||e;return this.resources.fetch({type:"payment_methods"},`satispay_gateways/${n}/payment_methods`,s,r)}async versions(e,s,r){const n=e.id||e;return this.resources.fetch({type:"versions"},`satispay_gateways/${n}/versions`,s,r)}async satispay_payments(e,s,r){const n=e.id||e;return this.resources.fetch({type:"satispay_payments"},`satispay_gateways/${n}/satispay_payments`,s,r)}isSatispayGateway(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="satispay_gateways";export default t;
|
@@ -1,51 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Order } from './orders';
|
4
|
-
import type { PaymentGateway } from './payment_gateways';
|
5
|
-
import type { Version } from './versions';
|
6
|
-
type SatispayPaymentRel = ResourceRel & {
|
7
|
-
type: typeof SatispayPayments.TYPE;
|
8
|
-
};
|
9
|
-
type OrderRel = ResourceRel & {
|
10
|
-
type: 'orders';
|
11
|
-
};
|
12
|
-
interface SatispayPayment extends Resource {
|
13
|
-
payment_id?: string;
|
14
|
-
flow?: string;
|
15
|
-
status?: string;
|
16
|
-
redirect_url?: string;
|
17
|
-
payment_url?: string;
|
18
|
-
intent_amount_cents?: number;
|
19
|
-
intent_amount_float?: number;
|
20
|
-
formatted_intent_amount?: string;
|
21
|
-
payment_response?: object;
|
22
|
-
order?: Order;
|
23
|
-
payment_gateway?: PaymentGateway;
|
24
|
-
versions?: Version[];
|
25
|
-
}
|
26
|
-
interface SatispayPaymentCreate extends ResourceCreate {
|
27
|
-
flow?: string;
|
28
|
-
redirect_url?: string;
|
29
|
-
order: OrderRel;
|
30
|
-
}
|
31
|
-
interface SatispayPaymentUpdate extends ResourceUpdate {
|
32
|
-
redirect_url?: string;
|
33
|
-
_refresh?: boolean;
|
34
|
-
order?: OrderRel;
|
35
|
-
}
|
36
|
-
declare class SatispayPayments extends ApiResource {
|
37
|
-
static readonly TYPE: 'satispay_payments';
|
38
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SatispayPayment>>;
|
39
|
-
create(resource: SatispayPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayPayment>;
|
40
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayPayment>;
|
41
|
-
update(resource: SatispayPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayPayment>;
|
42
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
43
|
-
order(satispayPaymentId: string | SatispayPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
44
|
-
payment_gateway(satispayPaymentId: string | SatispayPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
45
|
-
versions(satispayPaymentId: string | SatispayPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
46
|
-
isSatispayPayment(resource: any): resource is SatispayPayment;
|
47
|
-
relationship(id: string | ResourceId | null): SatispayPaymentRel;
|
48
|
-
type(): string;
|
49
|
-
}
|
50
|
-
export default SatispayPayments;
|
51
|
-
export { SatispayPayment, SatispayPaymentCreate, SatispayPaymentUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';import type{Version}from'./versions';type SatispayPaymentRel=ResourceRel&{type:typeof SatispayPayments.TYPE;};type OrderRel=ResourceRel&{type:'orders';};interface SatispayPayment extends Resource{payment_id?:string;flow?:string;status?:string;redirect_url?:string;payment_url?:string;payment_response?:object;order?:Order;payment_gateway?:PaymentGateway;versions?:Version[];}interface SatispayPaymentCreate extends ResourceCreate{flow?:string;redirect_url?:string;order:OrderRel;}interface SatispayPaymentUpdate extends ResourceUpdate{redirect_url?:string;_refresh?:boolean;order?:OrderRel;}declare class SatispayPayments extends ApiResource{static readonly TYPE:'satispay_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SatispayPayment>>;create(resource:SatispayPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayPayment>;update(resource:SatispayPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(satispayPaymentId:string|SatispayPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(satispayPaymentId:string|SatispayPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;versions(satispayPaymentId:string|SatispayPayment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isSatispayPayment(resource:any):resource is SatispayPayment;relationship(id:string|ResourceId|null):SatispayPaymentRel;type():string;}export default SatispayPayments;export{SatispayPayment,SatispayPaymentCreate,SatispayPaymentUpdate};
|
@@ -1,43 +1 @@
|
|
1
|
-
import
|
2
|
-
class SatispayPayments extends ApiResource {
|
3
|
-
// static readonly PATH = 'satispay_payments'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: SatispayPayments.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async create(resource, params, options) {
|
8
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: SatispayPayments.TYPE }), params, options);
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: SatispayPayments.TYPE, id }, params, options);
|
12
|
-
}
|
13
|
-
async update(resource, params, options) {
|
14
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: SatispayPayments.TYPE }), params, options);
|
15
|
-
}
|
16
|
-
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: SatispayPayments.TYPE, id }, options);
|
18
|
-
}
|
19
|
-
async order(satispayPaymentId, params, options) {
|
20
|
-
const _satispayPaymentId = satispayPaymentId.id || satispayPaymentId;
|
21
|
-
return this.resources.fetch({ type: 'orders' }, `satispay_payments/${_satispayPaymentId}/order`, params, options);
|
22
|
-
}
|
23
|
-
async payment_gateway(satispayPaymentId, params, options) {
|
24
|
-
const _satispayPaymentId = satispayPaymentId.id || satispayPaymentId;
|
25
|
-
return this.resources.fetch({ type: 'payment_gateways' }, `satispay_payments/${_satispayPaymentId}/payment_gateway`, params, options);
|
26
|
-
}
|
27
|
-
async versions(satispayPaymentId, params, options) {
|
28
|
-
const _satispayPaymentId = satispayPaymentId.id || satispayPaymentId;
|
29
|
-
return this.resources.fetch({ type: 'versions' }, `satispay_payments/${_satispayPaymentId}/versions`, params, options);
|
30
|
-
}
|
31
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
32
|
-
isSatispayPayment(resource) {
|
33
|
-
return resource.type && (resource.type === SatispayPayments.TYPE);
|
34
|
-
}
|
35
|
-
relationship(id) {
|
36
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: SatispayPayments.TYPE } : { id: id.id, type: SatispayPayments.TYPE };
|
37
|
-
}
|
38
|
-
type() {
|
39
|
-
return SatispayPayments.TYPE;
|
40
|
-
}
|
41
|
-
}
|
42
|
-
SatispayPayments.TYPE = 'satispay_payments';
|
43
|
-
export default SatispayPayments;
|
1
|
+
import{ApiResource as c}from"../resource";class s extends c{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async order(e,t,r){const n=e.id||e;return this.resources.fetch({type:"orders"},`satispay_payments/${n}/order`,t,r)}async payment_gateway(e,t,r){const n=e.id||e;return this.resources.fetch({type:"payment_gateways"},`satispay_payments/${n}/payment_gateway`,t,r)}async versions(e,t,r){const n=e.id||e;return this.resources.fetch({type:"versions"},`satispay_payments/${n}/versions`,t,r)}isSatispayPayment(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="satispay_payments";export default s;
|
@@ -1,139 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Order } from './orders';
|
4
|
-
import type { ShippingCategory } from './shipping_categories';
|
5
|
-
import type { InventoryStockLocation } from './inventory_stock_locations';
|
6
|
-
import type { StockLocation } from './stock_locations';
|
7
|
-
import type { Address } from './addresses';
|
8
|
-
import type { ShippingMethod } from './shipping_methods';
|
9
|
-
import type { DeliveryLeadTime } from './delivery_lead_times';
|
10
|
-
import type { StockLineItem } from './stock_line_items';
|
11
|
-
import type { StockTransfer } from './stock_transfers';
|
12
|
-
import type { LineItem } from './line_items';
|
13
|
-
import type { CarrierAccount } from './carrier_accounts';
|
14
|
-
import type { Parcel } from './parcels';
|
15
|
-
import type { Attachment } from './attachments';
|
16
|
-
import type { Event } from './events';
|
17
|
-
import type { Tag } from './tags';
|
18
|
-
import type { Version } from './versions';
|
19
|
-
type ShipmentRel = ResourceRel & {
|
20
|
-
type: typeof Shipments.TYPE;
|
21
|
-
};
|
22
|
-
type OrderRel = ResourceRel & {
|
23
|
-
type: 'orders';
|
24
|
-
};
|
25
|
-
type ShippingCategoryRel = ResourceRel & {
|
26
|
-
type: 'shipping_categories';
|
27
|
-
};
|
28
|
-
type InventoryStockLocationRel = ResourceRel & {
|
29
|
-
type: 'inventory_stock_locations';
|
30
|
-
};
|
31
|
-
type AddressRel = ResourceRel & {
|
32
|
-
type: 'addresses';
|
33
|
-
};
|
34
|
-
type ShippingMethodRel = ResourceRel & {
|
35
|
-
type: 'shipping_methods';
|
36
|
-
};
|
37
|
-
type TagRel = ResourceRel & {
|
38
|
-
type: 'tags';
|
39
|
-
};
|
40
|
-
interface Shipment extends Resource {
|
41
|
-
number?: string;
|
42
|
-
status?: string;
|
43
|
-
currency_code?: string;
|
44
|
-
cost_amount_cents?: number;
|
45
|
-
cost_amount_float?: number;
|
46
|
-
formatted_cost_amount?: string;
|
47
|
-
skus_count?: number;
|
48
|
-
selected_rate_id?: string;
|
49
|
-
rates?: object[];
|
50
|
-
purchase_error_code?: string;
|
51
|
-
purchase_error_message?: string;
|
52
|
-
get_rates_errors?: object[];
|
53
|
-
get_rates_started_at?: string;
|
54
|
-
get_rates_completed_at?: string;
|
55
|
-
purchase_started_at?: string;
|
56
|
-
purchase_completed_at?: string;
|
57
|
-
purchase_failed_at?: string;
|
58
|
-
on_hold_at?: string;
|
59
|
-
picking_at?: string;
|
60
|
-
packing_at?: string;
|
61
|
-
ready_to_ship_at?: string;
|
62
|
-
shipped_at?: string;
|
63
|
-
order?: Order;
|
64
|
-
shipping_category?: ShippingCategory;
|
65
|
-
inventory_stock_location?: InventoryStockLocation;
|
66
|
-
stock_location?: StockLocation;
|
67
|
-
origin_address?: Address;
|
68
|
-
shipping_address?: Address;
|
69
|
-
shipping_method?: ShippingMethod;
|
70
|
-
delivery_lead_time?: DeliveryLeadTime;
|
71
|
-
stock_line_items?: StockLineItem[];
|
72
|
-
stock_transfers?: StockTransfer[];
|
73
|
-
line_items?: LineItem[];
|
74
|
-
available_shipping_methods?: ShippingMethod[];
|
75
|
-
carrier_accounts?: CarrierAccount[];
|
76
|
-
parcels?: Parcel[];
|
77
|
-
attachments?: Attachment[];
|
78
|
-
events?: Event[];
|
79
|
-
tags?: Tag[];
|
80
|
-
versions?: Version[];
|
81
|
-
}
|
82
|
-
interface ShipmentCreate extends ResourceCreate {
|
83
|
-
order: OrderRel;
|
84
|
-
shipping_category?: ShippingCategoryRel;
|
85
|
-
inventory_stock_location: InventoryStockLocationRel;
|
86
|
-
shipping_address?: AddressRel;
|
87
|
-
shipping_method?: ShippingMethodRel;
|
88
|
-
tags?: TagRel[];
|
89
|
-
}
|
90
|
-
interface ShipmentUpdate extends ResourceUpdate {
|
91
|
-
_upcoming?: boolean;
|
92
|
-
_on_hold?: boolean;
|
93
|
-
_picking?: boolean;
|
94
|
-
_packing?: boolean;
|
95
|
-
_ready_to_ship?: boolean;
|
96
|
-
_ship?: boolean;
|
97
|
-
_reserve_stock?: boolean;
|
98
|
-
_release_stock?: boolean;
|
99
|
-
_decrement_stock?: boolean;
|
100
|
-
_get_rates?: boolean;
|
101
|
-
selected_rate_id?: string;
|
102
|
-
_purchase?: boolean;
|
103
|
-
shipping_category?: ShippingCategoryRel;
|
104
|
-
inventory_stock_location?: InventoryStockLocationRel;
|
105
|
-
shipping_address?: AddressRel;
|
106
|
-
shipping_method?: ShippingMethodRel;
|
107
|
-
tags?: TagRel[];
|
108
|
-
}
|
109
|
-
declare class Shipments extends ApiResource {
|
110
|
-
static readonly TYPE: 'shipments';
|
111
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Shipment>>;
|
112
|
-
create(resource: ShipmentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
113
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
114
|
-
update(resource: ShipmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
115
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
116
|
-
order(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
117
|
-
shipping_category(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
|
118
|
-
inventory_stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryStockLocation>;
|
119
|
-
stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
120
|
-
origin_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
121
|
-
shipping_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
|
122
|
-
shipping_method(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
123
|
-
delivery_lead_time(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
|
124
|
-
stock_line_items(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
|
125
|
-
stock_transfers(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
|
126
|
-
line_items(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItem>>;
|
127
|
-
available_shipping_methods(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>>;
|
128
|
-
carrier_accounts(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>>;
|
129
|
-
parcels(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Parcel>>;
|
130
|
-
attachments(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
131
|
-
events(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
132
|
-
tags(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
133
|
-
versions(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
134
|
-
isShipment(resource: any): resource is Shipment;
|
135
|
-
relationship(id: string | ResourceId | null): ShipmentRel;
|
136
|
-
type(): string;
|
137
|
-
}
|
138
|
-
export default Shipments;
|
139
|
-
export { Shipment, ShipmentCreate, ShipmentUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{ShippingCategory}from'./shipping_categories';import type{InventoryStockLocation}from'./inventory_stock_locations';import type{StockLocation}from'./stock_locations';import type{Address}from'./addresses';import type{ShippingMethod}from'./shipping_methods';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{StockLineItem}from'./stock_line_items';import type{StockTransfer}from'./stock_transfers';import type{LineItem}from'./line_items';import type{CarrierAccount}from'./carrier_accounts';import type{Parcel}from'./parcels';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Tag}from'./tags';import type{Version}from'./versions';type ShipmentRel=ResourceRel&{type:typeof Shipments.TYPE;};type OrderRel=ResourceRel&{type:'orders';};type ShippingCategoryRel=ResourceRel&{type:'shipping_categories';};type InventoryStockLocationRel=ResourceRel&{type:'inventory_stock_locations';};type AddressRel=ResourceRel&{type:'addresses';};type ShippingMethodRel=ResourceRel&{type:'shipping_methods';};type TagRel=ResourceRel&{type:'tags';};interface Shipment extends Resource{number?:string;status?:string;currency_code?:string;cost_amount_cents?:number;cost_amount_float?:number;formatted_cost_amount?:string;skus_count?:number;selected_rate_id?:string;rates?:object[];purchase_error_code?:string;purchase_error_message?:string;get_rates_errors?:object[];get_rates_started_at?:string;get_rates_completed_at?:string;purchase_started_at?:string;purchase_completed_at?:string;purchase_failed_at?:string;on_hold_at?:string;picking_at?:string;packing_at?:string;ready_to_ship_at?:string;shipped_at?:string;order?:Order;shipping_category?:ShippingCategory;inventory_stock_location?:InventoryStockLocation;stock_location?:StockLocation;origin_address?:Address;shipping_address?:Address;shipping_method?:ShippingMethod;delivery_lead_time?:DeliveryLeadTime;stock_line_items?:StockLineItem[];stock_transfers?:StockTransfer[];line_items?:LineItem[];available_shipping_methods?:ShippingMethod[];carrier_accounts?:CarrierAccount[];parcels?:Parcel[];attachments?:Attachment[];events?:Event[];tags?:Tag[];versions?:Version[];}interface ShipmentCreate extends ResourceCreate{order:OrderRel;shipping_category?:ShippingCategoryRel;inventory_stock_location:InventoryStockLocationRel;shipping_address?:AddressRel;shipping_method?:ShippingMethodRel;tags?:TagRel[];}interface ShipmentUpdate extends ResourceUpdate{_upcoming?:boolean;_on_hold?:boolean;_picking?:boolean;_packing?:boolean;_ready_to_ship?:boolean;_ship?:boolean;_reserve_stock?:boolean;_release_stock?:boolean;_decrement_stock?:boolean;_get_rates?:boolean;selected_rate_id?:string;_purchase?:boolean;shipping_category?:ShippingCategoryRel;inventory_stock_location?:InventoryStockLocationRel;shipping_address?:AddressRel;shipping_method?:ShippingMethodRel;tags?:TagRel[];}declare class Shipments extends ApiResource{static readonly TYPE:'shipments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Shipment>>;create(resource:ShipmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;update(resource:ShipmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;shipping_category(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;inventory_stock_location(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryStockLocation>;stock_location(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;origin_address(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;shipping_address(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;shipping_method(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;delivery_lead_time(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<DeliveryLeadTime>;stock_line_items(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLineItem>>;stock_transfers(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;line_items(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItem>>;available_shipping_methods(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingMethod>>;carrier_accounts(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CarrierAccount>>;parcels(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Parcel>>;attachments(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isShipment(resource:any):resource is Shipment;relationship(id:string|ResourceId|null):ShipmentRel;type():string;}export default Shipments;export{Shipment,ShipmentCreate,ShipmentUpdate};
|
@@ -1,103 +1 @@
|
|
1
|
-
import
|
2
|
-
class Shipments extends ApiResource {
|
3
|
-
// static readonly PATH = 'shipments'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: Shipments.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async create(resource, params, options) {
|
8
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: Shipments.TYPE }), params, options);
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: Shipments.TYPE, id }, params, options);
|
12
|
-
}
|
13
|
-
async update(resource, params, options) {
|
14
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Shipments.TYPE }), params, options);
|
15
|
-
}
|
16
|
-
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: Shipments.TYPE, id }, options);
|
18
|
-
}
|
19
|
-
async order(shipmentId, params, options) {
|
20
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
21
|
-
return this.resources.fetch({ type: 'orders' }, `shipments/${_shipmentId}/order`, params, options);
|
22
|
-
}
|
23
|
-
async shipping_category(shipmentId, params, options) {
|
24
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
25
|
-
return this.resources.fetch({ type: 'shipping_categories' }, `shipments/${_shipmentId}/shipping_category`, params, options);
|
26
|
-
}
|
27
|
-
async inventory_stock_location(shipmentId, params, options) {
|
28
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
29
|
-
return this.resources.fetch({ type: 'inventory_stock_locations' }, `shipments/${_shipmentId}/inventory_stock_location`, params, options);
|
30
|
-
}
|
31
|
-
async stock_location(shipmentId, params, options) {
|
32
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
33
|
-
return this.resources.fetch({ type: 'stock_locations' }, `shipments/${_shipmentId}/stock_location`, params, options);
|
34
|
-
}
|
35
|
-
async origin_address(shipmentId, params, options) {
|
36
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
37
|
-
return this.resources.fetch({ type: 'addresses' }, `shipments/${_shipmentId}/origin_address`, params, options);
|
38
|
-
}
|
39
|
-
async shipping_address(shipmentId, params, options) {
|
40
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
41
|
-
return this.resources.fetch({ type: 'addresses' }, `shipments/${_shipmentId}/shipping_address`, params, options);
|
42
|
-
}
|
43
|
-
async shipping_method(shipmentId, params, options) {
|
44
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
45
|
-
return this.resources.fetch({ type: 'shipping_methods' }, `shipments/${_shipmentId}/shipping_method`, params, options);
|
46
|
-
}
|
47
|
-
async delivery_lead_time(shipmentId, params, options) {
|
48
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
49
|
-
return this.resources.fetch({ type: 'delivery_lead_times' }, `shipments/${_shipmentId}/delivery_lead_time`, params, options);
|
50
|
-
}
|
51
|
-
async stock_line_items(shipmentId, params, options) {
|
52
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
53
|
-
return this.resources.fetch({ type: 'stock_line_items' }, `shipments/${_shipmentId}/stock_line_items`, params, options);
|
54
|
-
}
|
55
|
-
async stock_transfers(shipmentId, params, options) {
|
56
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
57
|
-
return this.resources.fetch({ type: 'stock_transfers' }, `shipments/${_shipmentId}/stock_transfers`, params, options);
|
58
|
-
}
|
59
|
-
async line_items(shipmentId, params, options) {
|
60
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
61
|
-
return this.resources.fetch({ type: 'line_items' }, `shipments/${_shipmentId}/line_items`, params, options);
|
62
|
-
}
|
63
|
-
async available_shipping_methods(shipmentId, params, options) {
|
64
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
65
|
-
return this.resources.fetch({ type: 'shipping_methods' }, `shipments/${_shipmentId}/available_shipping_methods`, params, options);
|
66
|
-
}
|
67
|
-
async carrier_accounts(shipmentId, params, options) {
|
68
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
69
|
-
return this.resources.fetch({ type: 'carrier_accounts' }, `shipments/${_shipmentId}/carrier_accounts`, params, options);
|
70
|
-
}
|
71
|
-
async parcels(shipmentId, params, options) {
|
72
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
73
|
-
return this.resources.fetch({ type: 'parcels' }, `shipments/${_shipmentId}/parcels`, params, options);
|
74
|
-
}
|
75
|
-
async attachments(shipmentId, params, options) {
|
76
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
77
|
-
return this.resources.fetch({ type: 'attachments' }, `shipments/${_shipmentId}/attachments`, params, options);
|
78
|
-
}
|
79
|
-
async events(shipmentId, params, options) {
|
80
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
81
|
-
return this.resources.fetch({ type: 'events' }, `shipments/${_shipmentId}/events`, params, options);
|
82
|
-
}
|
83
|
-
async tags(shipmentId, params, options) {
|
84
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
85
|
-
return this.resources.fetch({ type: 'tags' }, `shipments/${_shipmentId}/tags`, params, options);
|
86
|
-
}
|
87
|
-
async versions(shipmentId, params, options) {
|
88
|
-
const _shipmentId = shipmentId.id || shipmentId;
|
89
|
-
return this.resources.fetch({ type: 'versions' }, `shipments/${_shipmentId}/versions`, params, options);
|
90
|
-
}
|
91
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
92
|
-
isShipment(resource) {
|
93
|
-
return resource.type && (resource.type === Shipments.TYPE);
|
94
|
-
}
|
95
|
-
relationship(id) {
|
96
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: Shipments.TYPE } : { id: id.id, type: Shipments.TYPE };
|
97
|
-
}
|
98
|
-
type() {
|
99
|
-
return Shipments.TYPE;
|
100
|
-
}
|
101
|
-
}
|
102
|
-
Shipments.TYPE = 'shipments';
|
103
|
-
export default Shipments;
|
1
|
+
import{ApiResource as i}from"../resource";class n extends i{async list(s,e){return this.resources.list({type:n.TYPE},s,e)}async create(s,e,t){return this.resources.create(Object.assign(Object.assign({},s),{type:n.TYPE}),e,t)}async retrieve(s,e,t){return this.resources.retrieve({type:n.TYPE,id:s},e,t)}async update(s,e,t){return this.resources.update(Object.assign(Object.assign({},s),{type:n.TYPE}),e,t)}async delete(s,e){await this.resources.delete({type:n.TYPE,id:s},e)}async order(s,e,t){const r=s.id||s;return this.resources.fetch({type:"orders"},`shipments/${r}/order`,e,t)}async shipping_category(s,e,t){const r=s.id||s;return this.resources.fetch({type:"shipping_categories"},`shipments/${r}/shipping_category`,e,t)}async inventory_stock_location(s,e,t){const r=s.id||s;return this.resources.fetch({type:"inventory_stock_locations"},`shipments/${r}/inventory_stock_location`,e,t)}async stock_location(s,e,t){const r=s.id||s;return this.resources.fetch({type:"stock_locations"},`shipments/${r}/stock_location`,e,t)}async origin_address(s,e,t){const r=s.id||s;return this.resources.fetch({type:"addresses"},`shipments/${r}/origin_address`,e,t)}async shipping_address(s,e,t){const r=s.id||s;return this.resources.fetch({type:"addresses"},`shipments/${r}/shipping_address`,e,t)}async shipping_method(s,e,t){const r=s.id||s;return this.resources.fetch({type:"shipping_methods"},`shipments/${r}/shipping_method`,e,t)}async delivery_lead_time(s,e,t){const r=s.id||s;return this.resources.fetch({type:"delivery_lead_times"},`shipments/${r}/delivery_lead_time`,e,t)}async stock_line_items(s,e,t){const r=s.id||s;return this.resources.fetch({type:"stock_line_items"},`shipments/${r}/stock_line_items`,e,t)}async stock_transfers(s,e,t){const r=s.id||s;return this.resources.fetch({type:"stock_transfers"},`shipments/${r}/stock_transfers`,e,t)}async line_items(s,e,t){const r=s.id||s;return this.resources.fetch({type:"line_items"},`shipments/${r}/line_items`,e,t)}async available_shipping_methods(s,e,t){const r=s.id||s;return this.resources.fetch({type:"shipping_methods"},`shipments/${r}/available_shipping_methods`,e,t)}async carrier_accounts(s,e,t){const r=s.id||s;return this.resources.fetch({type:"carrier_accounts"},`shipments/${r}/carrier_accounts`,e,t)}async parcels(s,e,t){const r=s.id||s;return this.resources.fetch({type:"parcels"},`shipments/${r}/parcels`,e,t)}async attachments(s,e,t){const r=s.id||s;return this.resources.fetch({type:"attachments"},`shipments/${r}/attachments`,e,t)}async events(s,e,t){const r=s.id||s;return this.resources.fetch({type:"events"},`shipments/${r}/events`,e,t)}async tags(s,e,t){const r=s.id||s;return this.resources.fetch({type:"tags"},`shipments/${r}/tags`,e,t)}async versions(s,e,t){const r=s.id||s;return this.resources.fetch({type:"versions"},`shipments/${r}/versions`,e,t)}isShipment(s){return s.type&&s.type===n.TYPE}relationship(s){return s===null||typeof s=="string"?{id:s,type:n.TYPE}:{id:s.id,type:n.TYPE}}type(){return n.TYPE}}n.TYPE="shipments";export default n;
|
@@ -1,39 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Sku } from './skus';
|
4
|
-
import type { Attachment } from './attachments';
|
5
|
-
import type { Version } from './versions';
|
6
|
-
type ShippingCategoryRel = ResourceRel & {
|
7
|
-
type: typeof ShippingCategories.TYPE;
|
8
|
-
};
|
9
|
-
interface ShippingCategory extends Resource {
|
10
|
-
name?: string;
|
11
|
-
code?: string;
|
12
|
-
skus?: Sku[];
|
13
|
-
attachments?: Attachment[];
|
14
|
-
versions?: Version[];
|
15
|
-
}
|
16
|
-
interface ShippingCategoryCreate extends ResourceCreate {
|
17
|
-
name: string;
|
18
|
-
code?: string;
|
19
|
-
}
|
20
|
-
interface ShippingCategoryUpdate extends ResourceUpdate {
|
21
|
-
name?: string;
|
22
|
-
code?: string;
|
23
|
-
}
|
24
|
-
declare class ShippingCategories extends ApiResource {
|
25
|
-
static readonly TYPE: 'shipping_categories';
|
26
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingCategory>>;
|
27
|
-
create(resource: ShippingCategoryCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
|
28
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
|
29
|
-
update(resource: ShippingCategoryUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
|
30
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
31
|
-
skus(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
32
|
-
attachments(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
33
|
-
versions(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
34
|
-
isShippingCategory(resource: any): resource is ShippingCategory;
|
35
|
-
relationship(id: string | ResourceId | null): ShippingCategoryRel;
|
36
|
-
type(): string;
|
37
|
-
}
|
38
|
-
export default ShippingCategories;
|
39
|
-
export { ShippingCategory, ShippingCategoryCreate, ShippingCategoryUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Sku}from'./skus';import type{Attachment}from'./attachments';import type{Version}from'./versions';type ShippingCategoryRel=ResourceRel&{type:typeof ShippingCategories.TYPE;};interface ShippingCategory extends Resource{name?:string;code?:string;skus?:Sku[];attachments?:Attachment[];versions?:Version[];}interface ShippingCategoryCreate extends ResourceCreate{name:string;code?:string;}interface ShippingCategoryUpdate extends ResourceUpdate{name?:string;code?:string;}declare class ShippingCategories extends ApiResource{static readonly TYPE:'shipping_categories';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingCategory>>;create(resource:ShippingCategoryCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;update(resource:ShippingCategoryUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;delete(id:string,options?:ResourcesConfig):Promise<void>;skus(shippingCategoryId:string|ShippingCategory,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;attachments(shippingCategoryId:string|ShippingCategory,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(shippingCategoryId:string|ShippingCategory,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isShippingCategory(resource:any):resource is ShippingCategory;relationship(id:string|ResourceId|null):ShippingCategoryRel;type():string;}export default ShippingCategories;export{ShippingCategory,ShippingCategoryCreate,ShippingCategoryUpdate};
|
@@ -1,43 +1 @@
|
|
1
|
-
import
|
2
|
-
class ShippingCategories extends ApiResource {
|
3
|
-
// static readonly PATH = 'shipping_categories'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: ShippingCategories.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async create(resource, params, options) {
|
8
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ShippingCategories.TYPE }), params, options);
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: ShippingCategories.TYPE, id }, params, options);
|
12
|
-
}
|
13
|
-
async update(resource, params, options) {
|
14
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ShippingCategories.TYPE }), params, options);
|
15
|
-
}
|
16
|
-
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: ShippingCategories.TYPE, id }, options);
|
18
|
-
}
|
19
|
-
async skus(shippingCategoryId, params, options) {
|
20
|
-
const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
|
21
|
-
return this.resources.fetch({ type: 'skus' }, `shipping_categories/${_shippingCategoryId}/skus`, params, options);
|
22
|
-
}
|
23
|
-
async attachments(shippingCategoryId, params, options) {
|
24
|
-
const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
|
25
|
-
return this.resources.fetch({ type: 'attachments' }, `shipping_categories/${_shippingCategoryId}/attachments`, params, options);
|
26
|
-
}
|
27
|
-
async versions(shippingCategoryId, params, options) {
|
28
|
-
const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
|
29
|
-
return this.resources.fetch({ type: 'versions' }, `shipping_categories/${_shippingCategoryId}/versions`, params, options);
|
30
|
-
}
|
31
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
32
|
-
isShippingCategory(resource) {
|
33
|
-
return resource.type && (resource.type === ShippingCategories.TYPE);
|
34
|
-
}
|
35
|
-
relationship(id) {
|
36
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: ShippingCategories.TYPE } : { id: id.id, type: ShippingCategories.TYPE };
|
37
|
-
}
|
38
|
-
type() {
|
39
|
-
return ShippingCategories.TYPE;
|
40
|
-
}
|
41
|
-
}
|
42
|
-
ShippingCategories.TYPE = 'shipping_categories';
|
43
|
-
export default ShippingCategories;
|
1
|
+
import{ApiResource as n}from"../resource";class t extends n{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}async skus(e,s,r){const c=e.id||e;return this.resources.fetch({type:"skus"},`shipping_categories/${c}/skus`,s,r)}async attachments(e,s,r){const c=e.id||e;return this.resources.fetch({type:"attachments"},`shipping_categories/${c}/attachments`,s,r)}async versions(e,s,r){const c=e.id||e;return this.resources.fetch({type:"versions"},`shipping_categories/${c}/versions`,s,r)}isShippingCategory(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="shipping_categories";export default t;
|
@@ -1,31 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { ShippingMethod } from './shipping_methods';
|
4
|
-
import type { Attachment } from './attachments';
|
5
|
-
import type { Version } from './versions';
|
6
|
-
type ShippingMethodTierRel = ResourceRel & {
|
7
|
-
type: typeof ShippingMethodTiers.TYPE;
|
8
|
-
};
|
9
|
-
interface ShippingMethodTier extends Resource {
|
10
|
-
name?: string;
|
11
|
-
up_to?: number;
|
12
|
-
price_amount_cents?: number;
|
13
|
-
price_amount_float?: number;
|
14
|
-
formatted_price_amount?: string;
|
15
|
-
shipping_method?: ShippingMethod;
|
16
|
-
attachments?: Attachment[];
|
17
|
-
versions?: Version[];
|
18
|
-
}
|
19
|
-
declare class ShippingMethodTiers extends ApiResource {
|
20
|
-
static readonly TYPE: 'shipping_method_tiers';
|
21
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingMethodTier>>;
|
22
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethodTier>;
|
23
|
-
shipping_method(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
|
24
|
-
attachments(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
25
|
-
versions(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
26
|
-
isShippingMethodTier(resource: any): resource is ShippingMethodTier;
|
27
|
-
relationship(id: string | ResourceId | null): ShippingMethodTierRel;
|
28
|
-
type(): string;
|
29
|
-
}
|
30
|
-
export default ShippingMethodTiers;
|
31
|
-
export { ShippingMethodTier };
|
1
|
+
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{ShippingMethod}from'./shipping_methods';import type{Attachment}from'./attachments';import type{Version}from'./versions';type ShippingMethodTierRel=ResourceRel&{type:typeof ShippingMethodTiers.TYPE;};interface ShippingMethodTier extends Resource{name?:string;up_to?:number;price_amount_cents?:number;price_amount_float?:number;formatted_price_amount?:string;shipping_method?:ShippingMethod;attachments?:Attachment[];versions?:Version[];}declare class ShippingMethodTiers extends ApiResource{static readonly TYPE:'shipping_method_tiers';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingMethodTier>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethodTier>;shipping_method(shippingMethodTierId:string|ShippingMethodTier,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;attachments(shippingMethodTierId:string|ShippingMethodTier,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(shippingMethodTierId:string|ShippingMethodTier,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isShippingMethodTier(resource:any):resource is ShippingMethodTier;relationship(id:string|ResourceId|null):ShippingMethodTierRel;type():string;}export default ShippingMethodTiers;export{ShippingMethodTier};
|
@@ -1,34 +1 @@
|
|
1
|
-
import
|
2
|
-
class ShippingMethodTiers extends ApiResource {
|
3
|
-
// static readonly PATH = 'shipping_method_tiers'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: ShippingMethodTiers.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async retrieve(id, params, options) {
|
8
|
-
return this.resources.retrieve({ type: ShippingMethodTiers.TYPE, id }, params, options);
|
9
|
-
}
|
10
|
-
async shipping_method(shippingMethodTierId, params, options) {
|
11
|
-
const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
|
12
|
-
return this.resources.fetch({ type: 'shipping_methods' }, `shipping_method_tiers/${_shippingMethodTierId}/shipping_method`, params, options);
|
13
|
-
}
|
14
|
-
async attachments(shippingMethodTierId, params, options) {
|
15
|
-
const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
|
16
|
-
return this.resources.fetch({ type: 'attachments' }, `shipping_method_tiers/${_shippingMethodTierId}/attachments`, params, options);
|
17
|
-
}
|
18
|
-
async versions(shippingMethodTierId, params, options) {
|
19
|
-
const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
|
20
|
-
return this.resources.fetch({ type: 'versions' }, `shipping_method_tiers/${_shippingMethodTierId}/versions`, params, options);
|
21
|
-
}
|
22
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
23
|
-
isShippingMethodTier(resource) {
|
24
|
-
return resource.type && (resource.type === ShippingMethodTiers.TYPE);
|
25
|
-
}
|
26
|
-
relationship(id) {
|
27
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: ShippingMethodTiers.TYPE } : { id: id.id, type: ShippingMethodTiers.TYPE };
|
28
|
-
}
|
29
|
-
type() {
|
30
|
-
return ShippingMethodTiers.TYPE;
|
31
|
-
}
|
32
|
-
}
|
33
|
-
ShippingMethodTiers.TYPE = 'shipping_method_tiers';
|
34
|
-
export default ShippingMethodTiers;
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(t,e){return this.resources.list({type:s.TYPE},t,e)}async retrieve(t,e,r){return this.resources.retrieve({type:s.TYPE,id:t},e,r)}async shipping_method(t,e,r){const n=t.id||t;return this.resources.fetch({type:"shipping_methods"},`shipping_method_tiers/${n}/shipping_method`,e,r)}async attachments(t,e,r){const n=t.id||t;return this.resources.fetch({type:"attachments"},`shipping_method_tiers/${n}/attachments`,e,r)}async versions(t,e,r){const n=t.id||t;return this.resources.fetch({type:"versions"},`shipping_method_tiers/${n}/versions`,e,r)}isShippingMethodTier(t){return t.type&&t.type===s.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:s.TYPE}:{id:t.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="shipping_method_tiers";export default s;
|