@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,59 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { StockLocation } from './stock_locations';
|
4
|
-
import type { Parcel } from './parcels';
|
5
|
-
import type { Attachment } from './attachments';
|
6
|
-
import type { Version } from './versions';
|
7
|
-
type PackageRel = ResourceRel & {
|
8
|
-
type: typeof Packages.TYPE;
|
9
|
-
};
|
10
|
-
type StockLocationRel = ResourceRel & {
|
11
|
-
type: 'stock_locations';
|
12
|
-
};
|
13
|
-
interface Package extends Resource {
|
14
|
-
name?: string;
|
15
|
-
code?: string;
|
16
|
-
length?: number;
|
17
|
-
width?: number;
|
18
|
-
height?: number;
|
19
|
-
unit_of_length?: string;
|
20
|
-
stock_location?: StockLocation;
|
21
|
-
parcels?: Parcel[];
|
22
|
-
attachments?: Attachment[];
|
23
|
-
versions?: Version[];
|
24
|
-
}
|
25
|
-
interface PackageCreate extends ResourceCreate {
|
26
|
-
name: string;
|
27
|
-
code?: string;
|
28
|
-
length: number;
|
29
|
-
width: number;
|
30
|
-
height: number;
|
31
|
-
unit_of_length: string;
|
32
|
-
stock_location: StockLocationRel;
|
33
|
-
}
|
34
|
-
interface PackageUpdate extends ResourceUpdate {
|
35
|
-
name?: string;
|
36
|
-
code?: string;
|
37
|
-
length?: number;
|
38
|
-
width?: number;
|
39
|
-
height?: number;
|
40
|
-
unit_of_length?: string;
|
41
|
-
stock_location?: StockLocationRel;
|
42
|
-
}
|
43
|
-
declare class Packages extends ApiResource {
|
44
|
-
static readonly TYPE: 'packages';
|
45
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Package>>;
|
46
|
-
create(resource: PackageCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Package>;
|
47
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Package>;
|
48
|
-
update(resource: PackageUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Package>;
|
49
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
50
|
-
stock_location(packageId: string | Package, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
51
|
-
parcels(packageId: string | Package, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Parcel>>;
|
52
|
-
attachments(packageId: string | Package, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
53
|
-
versions(packageId: string | Package, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
54
|
-
isPackage(resource: any): resource is Package;
|
55
|
-
relationship(id: string | ResourceId | null): PackageRel;
|
56
|
-
type(): string;
|
57
|
-
}
|
58
|
-
export default Packages;
|
59
|
-
export { Package, PackageCreate, PackageUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{StockLocation}from'./stock_locations';import type{Parcel}from'./parcels';import type{Attachment}from'./attachments';import type{Version}from'./versions';type PackageRel=ResourceRel&{type:typeof Packages.TYPE;};type StockLocationRel=ResourceRel&{type:'stock_locations';};interface Package extends Resource{name?:string;code?:string;length?:number;width?:number;height?:number;unit_of_length?:string;stock_location?:StockLocation;parcels?:Parcel[];attachments?:Attachment[];versions?:Version[];}interface PackageCreate extends ResourceCreate{name:string;code?:string;length:number;width:number;height:number;unit_of_length:string;stock_location:StockLocationRel;}interface PackageUpdate extends ResourceUpdate{name?:string;code?:string;length?:number;width?:number;height?:number;unit_of_length?:string;stock_location?:StockLocationRel;}declare class Packages extends ApiResource{static readonly TYPE:'packages';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Package>>;create(resource:PackageCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Package>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Package>;update(resource:PackageUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Package>;delete(id:string,options?:ResourcesConfig):Promise<void>;stock_location(packageId:string|Package,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;parcels(packageId:string|Package,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Parcel>>;attachments(packageId:string|Package,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(packageId:string|Package,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isPackage(resource:any):resource is Package;relationship(id:string|ResourceId|null):PackageRel;type():string;}export default Packages;export{Package,PackageCreate,PackageUpdate};
|
@@ -1,49 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class Packages extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'packages'
|
6
|
-
async list(params, options) {
|
7
|
-
return this.resources.list({ type: Packages.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async create(resource, params, options) {
|
10
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: Packages.TYPE }), params, options);
|
11
|
-
}
|
12
|
-
async retrieve(id, params, options) {
|
13
|
-
return this.resources.retrieve({ type: Packages.TYPE, id }, params, options);
|
14
|
-
}
|
15
|
-
async update(resource, params, options) {
|
16
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Packages.TYPE }), params, options);
|
17
|
-
}
|
18
|
-
async delete(id, options) {
|
19
|
-
await this.resources.delete({ type: Packages.TYPE, id }, options);
|
20
|
-
}
|
21
|
-
async stock_location(packageId, params, options) {
|
22
|
-
const _packageId = packageId.id || packageId;
|
23
|
-
return this.resources.fetch({ type: 'stock_locations' }, `packages/${_packageId}/stock_location`, params, options);
|
24
|
-
}
|
25
|
-
async parcels(packageId, params, options) {
|
26
|
-
const _packageId = packageId.id || packageId;
|
27
|
-
return this.resources.fetch({ type: 'parcels' }, `packages/${_packageId}/parcels`, params, options);
|
28
|
-
}
|
29
|
-
async attachments(packageId, params, options) {
|
30
|
-
const _packageId = packageId.id || packageId;
|
31
|
-
return this.resources.fetch({ type: 'attachments' }, `packages/${_packageId}/attachments`, params, options);
|
32
|
-
}
|
33
|
-
async versions(packageId, params, options) {
|
34
|
-
const _packageId = packageId.id || packageId;
|
35
|
-
return this.resources.fetch({ type: 'versions' }, `packages/${_packageId}/versions`, params, options);
|
36
|
-
}
|
37
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
38
|
-
isPackage(resource) {
|
39
|
-
return resource.type && (resource.type === Packages.TYPE);
|
40
|
-
}
|
41
|
-
relationship(id) {
|
42
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: Packages.TYPE } : { id: id.id, type: Packages.TYPE };
|
43
|
-
}
|
44
|
-
type() {
|
45
|
-
return Packages.TYPE;
|
46
|
-
}
|
47
|
-
}
|
48
|
-
Packages.TYPE = 'packages';
|
49
|
-
exports.default = Packages;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Packages extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Packages.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:Packages.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:Packages.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:Packages.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:Packages.TYPE,id:e},t)}async stock_location(e,t,s){const r=e.id||e;return this.resources.fetch({type:"stock_locations"},`packages/${r}/stock_location`,t,s)}async parcels(e,t,s){const r=e.id||e;return this.resources.fetch({type:"parcels"},`packages/${r}/parcels`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`packages/${r}/attachments`,t,s)}async versions(e,t,s){const r=e.id||e;return this.resources.fetch({type:"versions"},`packages/${r}/versions`,t,s)}isPackage(e){return e.type&&e.type===Packages.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Packages.TYPE}:{id:e.id,type:Packages.TYPE}}type(){return Packages.TYPE}}Packages.TYPE="packages",exports.default=Packages;
|
@@ -1,46 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Parcel } from './parcels';
|
4
|
-
import type { StockLineItem } from './stock_line_items';
|
5
|
-
import type { Version } from './versions';
|
6
|
-
type ParcelLineItemRel = ResourceRel & {
|
7
|
-
type: typeof ParcelLineItems.TYPE;
|
8
|
-
};
|
9
|
-
type ParcelRel = ResourceRel & {
|
10
|
-
type: 'parcels';
|
11
|
-
};
|
12
|
-
type StockLineItemRel = ResourceRel & {
|
13
|
-
type: 'stock_line_items';
|
14
|
-
};
|
15
|
-
interface ParcelLineItem extends Resource {
|
16
|
-
sku_code?: string;
|
17
|
-
bundle_code?: string;
|
18
|
-
quantity?: number;
|
19
|
-
name?: string;
|
20
|
-
image_url?: string;
|
21
|
-
parcel?: Parcel;
|
22
|
-
stock_line_item?: StockLineItem;
|
23
|
-
versions?: Version[];
|
24
|
-
}
|
25
|
-
interface ParcelLineItemCreate extends ResourceCreate {
|
26
|
-
quantity: number;
|
27
|
-
parcel: ParcelRel;
|
28
|
-
stock_line_item: StockLineItemRel;
|
29
|
-
}
|
30
|
-
type ParcelLineItemUpdate = ResourceUpdate;
|
31
|
-
declare class ParcelLineItems extends ApiResource {
|
32
|
-
static readonly TYPE: 'parcel_line_items';
|
33
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ParcelLineItem>>;
|
34
|
-
create(resource: ParcelLineItemCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ParcelLineItem>;
|
35
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ParcelLineItem>;
|
36
|
-
update(resource: ParcelLineItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ParcelLineItem>;
|
37
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
38
|
-
parcel(parcelLineItemId: string | ParcelLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Parcel>;
|
39
|
-
stock_line_item(parcelLineItemId: string | ParcelLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLineItem>;
|
40
|
-
versions(parcelLineItemId: string | ParcelLineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
41
|
-
isParcelLineItem(resource: any): resource is ParcelLineItem;
|
42
|
-
relationship(id: string | ResourceId | null): ParcelLineItemRel;
|
43
|
-
type(): string;
|
44
|
-
}
|
45
|
-
export default ParcelLineItems;
|
46
|
-
export { ParcelLineItem, ParcelLineItemCreate, ParcelLineItemUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Parcel}from'./parcels';import type{StockLineItem}from'./stock_line_items';import type{Version}from'./versions';type ParcelLineItemRel=ResourceRel&{type:typeof ParcelLineItems.TYPE;};type ParcelRel=ResourceRel&{type:'parcels';};type StockLineItemRel=ResourceRel&{type:'stock_line_items';};interface ParcelLineItem extends Resource{sku_code?:string;bundle_code?:string;quantity?:number;name?:string;image_url?:string;parcel?:Parcel;stock_line_item?:StockLineItem;versions?:Version[];}interface ParcelLineItemCreate extends ResourceCreate{quantity:number;parcel:ParcelRel;stock_line_item:StockLineItemRel;}type ParcelLineItemUpdate=ResourceUpdate;declare class ParcelLineItems extends ApiResource{static readonly TYPE:'parcel_line_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ParcelLineItem>>;create(resource:ParcelLineItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ParcelLineItem>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ParcelLineItem>;update(resource:ParcelLineItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ParcelLineItem>;delete(id:string,options?:ResourcesConfig):Promise<void>;parcel(parcelLineItemId:string|ParcelLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Parcel>;stock_line_item(parcelLineItemId:string|ParcelLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLineItem>;versions(parcelLineItemId:string|ParcelLineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isParcelLineItem(resource:any):resource is ParcelLineItem;relationship(id:string|ResourceId|null):ParcelLineItemRel;type():string;}export default ParcelLineItems;export{ParcelLineItem,ParcelLineItemCreate,ParcelLineItemUpdate};
|
@@ -1,45 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class ParcelLineItems extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'parcel_line_items'
|
6
|
-
async list(params, options) {
|
7
|
-
return this.resources.list({ type: ParcelLineItems.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async create(resource, params, options) {
|
10
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ParcelLineItems.TYPE }), params, options);
|
11
|
-
}
|
12
|
-
async retrieve(id, params, options) {
|
13
|
-
return this.resources.retrieve({ type: ParcelLineItems.TYPE, id }, params, options);
|
14
|
-
}
|
15
|
-
async update(resource, params, options) {
|
16
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ParcelLineItems.TYPE }), params, options);
|
17
|
-
}
|
18
|
-
async delete(id, options) {
|
19
|
-
await this.resources.delete({ type: ParcelLineItems.TYPE, id }, options);
|
20
|
-
}
|
21
|
-
async parcel(parcelLineItemId, params, options) {
|
22
|
-
const _parcelLineItemId = parcelLineItemId.id || parcelLineItemId;
|
23
|
-
return this.resources.fetch({ type: 'parcels' }, `parcel_line_items/${_parcelLineItemId}/parcel`, params, options);
|
24
|
-
}
|
25
|
-
async stock_line_item(parcelLineItemId, params, options) {
|
26
|
-
const _parcelLineItemId = parcelLineItemId.id || parcelLineItemId;
|
27
|
-
return this.resources.fetch({ type: 'stock_line_items' }, `parcel_line_items/${_parcelLineItemId}/stock_line_item`, params, options);
|
28
|
-
}
|
29
|
-
async versions(parcelLineItemId, params, options) {
|
30
|
-
const _parcelLineItemId = parcelLineItemId.id || parcelLineItemId;
|
31
|
-
return this.resources.fetch({ type: 'versions' }, `parcel_line_items/${_parcelLineItemId}/versions`, params, options);
|
32
|
-
}
|
33
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
34
|
-
isParcelLineItem(resource) {
|
35
|
-
return resource.type && (resource.type === ParcelLineItems.TYPE);
|
36
|
-
}
|
37
|
-
relationship(id) {
|
38
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: ParcelLineItems.TYPE } : { id: id.id, type: ParcelLineItems.TYPE };
|
39
|
-
}
|
40
|
-
type() {
|
41
|
-
return ParcelLineItems.TYPE;
|
42
|
-
}
|
43
|
-
}
|
44
|
-
ParcelLineItems.TYPE = 'parcel_line_items';
|
45
|
-
exports.default = ParcelLineItems;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ParcelLineItems extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ParcelLineItems.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:ParcelLineItems.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:ParcelLineItems.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:ParcelLineItems.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:ParcelLineItems.TYPE,id:e},t)}async parcel(e,t,s){const r=e.id||e;return this.resources.fetch({type:"parcels"},`parcel_line_items/${r}/parcel`,t,s)}async stock_line_item(e,t,s){const r=e.id||e;return this.resources.fetch({type:"stock_line_items"},`parcel_line_items/${r}/stock_line_item`,t,s)}async versions(e,t,s){const r=e.id||e;return this.resources.fetch({type:"versions"},`parcel_line_items/${r}/versions`,t,s)}isParcelLineItem(e){return e.type&&e.type===ParcelLineItems.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:ParcelLineItems.TYPE}:{id:e.id,type:ParcelLineItems.TYPE}}type(){return ParcelLineItems.TYPE}}ParcelLineItems.TYPE="parcel_line_items",exports.default=ParcelLineItems;
|
@@ -1,125 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Shipment } from './shipments';
|
4
|
-
import type { Package } from './packages';
|
5
|
-
import type { ParcelLineItem } from './parcel_line_items';
|
6
|
-
import type { Attachment } from './attachments';
|
7
|
-
import type { Event } from './events';
|
8
|
-
import type { Version } from './versions';
|
9
|
-
type ParcelRel = ResourceRel & {
|
10
|
-
type: typeof Parcels.TYPE;
|
11
|
-
};
|
12
|
-
type ShipmentRel = ResourceRel & {
|
13
|
-
type: 'shipments';
|
14
|
-
};
|
15
|
-
type PackageRel = ResourceRel & {
|
16
|
-
type: 'packages';
|
17
|
-
};
|
18
|
-
interface Parcel extends Resource {
|
19
|
-
number?: string;
|
20
|
-
weight?: number;
|
21
|
-
unit_of_weight?: string;
|
22
|
-
eel_pfc?: string;
|
23
|
-
contents_type?: string;
|
24
|
-
contents_explanation?: string;
|
25
|
-
customs_certify?: boolean;
|
26
|
-
customs_signer?: string;
|
27
|
-
non_delivery_option?: string;
|
28
|
-
restriction_type?: string;
|
29
|
-
restriction_comments?: string;
|
30
|
-
customs_info_required?: boolean;
|
31
|
-
shipping_label_url?: string;
|
32
|
-
shipping_label_file_type?: string;
|
33
|
-
shipping_label_size?: string;
|
34
|
-
shipping_label_resolution?: string;
|
35
|
-
tracking_number?: string;
|
36
|
-
tracking_status?: string;
|
37
|
-
tracking_status_detail?: string;
|
38
|
-
tracking_status_updated_at?: string;
|
39
|
-
tracking_details?: object;
|
40
|
-
carrier_weight_oz?: string;
|
41
|
-
signed_by?: string;
|
42
|
-
incoterm?: string;
|
43
|
-
delivery_confirmation?: string;
|
44
|
-
shipment?: Shipment;
|
45
|
-
package?: Package;
|
46
|
-
parcel_line_items?: ParcelLineItem[];
|
47
|
-
attachments?: Attachment[];
|
48
|
-
events?: Event[];
|
49
|
-
versions?: Version[];
|
50
|
-
}
|
51
|
-
interface ParcelCreate extends ResourceCreate {
|
52
|
-
weight: number;
|
53
|
-
unit_of_weight: string;
|
54
|
-
eel_pfc?: string;
|
55
|
-
contents_type?: string;
|
56
|
-
contents_explanation?: string;
|
57
|
-
customs_certify?: boolean;
|
58
|
-
customs_signer?: string;
|
59
|
-
non_delivery_option?: string;
|
60
|
-
restriction_type?: string;
|
61
|
-
restriction_comments?: string;
|
62
|
-
customs_info_required?: boolean;
|
63
|
-
shipping_label_url?: string;
|
64
|
-
shipping_label_file_type?: string;
|
65
|
-
shipping_label_size?: string;
|
66
|
-
shipping_label_resolution?: string;
|
67
|
-
tracking_number?: string;
|
68
|
-
tracking_status?: string;
|
69
|
-
tracking_status_detail?: string;
|
70
|
-
tracking_status_updated_at?: string;
|
71
|
-
tracking_details?: object;
|
72
|
-
carrier_weight_oz?: string;
|
73
|
-
signed_by?: string;
|
74
|
-
incoterm?: string;
|
75
|
-
delivery_confirmation?: string;
|
76
|
-
shipment: ShipmentRel;
|
77
|
-
package: PackageRel;
|
78
|
-
}
|
79
|
-
interface ParcelUpdate extends ResourceUpdate {
|
80
|
-
weight?: number;
|
81
|
-
unit_of_weight?: string;
|
82
|
-
eel_pfc?: string;
|
83
|
-
contents_type?: string;
|
84
|
-
contents_explanation?: string;
|
85
|
-
customs_certify?: boolean;
|
86
|
-
customs_signer?: string;
|
87
|
-
non_delivery_option?: string;
|
88
|
-
restriction_type?: string;
|
89
|
-
restriction_comments?: string;
|
90
|
-
customs_info_required?: boolean;
|
91
|
-
shipping_label_url?: string;
|
92
|
-
shipping_label_file_type?: string;
|
93
|
-
shipping_label_size?: string;
|
94
|
-
shipping_label_resolution?: string;
|
95
|
-
tracking_number?: string;
|
96
|
-
tracking_status?: string;
|
97
|
-
tracking_status_detail?: string;
|
98
|
-
tracking_status_updated_at?: string;
|
99
|
-
tracking_details?: object;
|
100
|
-
carrier_weight_oz?: string;
|
101
|
-
signed_by?: string;
|
102
|
-
incoterm?: string;
|
103
|
-
delivery_confirmation?: string;
|
104
|
-
shipment?: ShipmentRel;
|
105
|
-
package?: PackageRel;
|
106
|
-
}
|
107
|
-
declare class Parcels extends ApiResource {
|
108
|
-
static readonly TYPE: 'parcels';
|
109
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Parcel>>;
|
110
|
-
create(resource: ParcelCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Parcel>;
|
111
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Parcel>;
|
112
|
-
update(resource: ParcelUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Parcel>;
|
113
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
114
|
-
shipment(parcelId: string | Parcel, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
115
|
-
package(parcelId: string | Parcel, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Package>;
|
116
|
-
parcel_line_items(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ParcelLineItem>>;
|
117
|
-
attachments(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
118
|
-
events(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
119
|
-
versions(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
120
|
-
isParcel(resource: any): resource is Parcel;
|
121
|
-
relationship(id: string | ResourceId | null): ParcelRel;
|
122
|
-
type(): string;
|
123
|
-
}
|
124
|
-
export default Parcels;
|
125
|
-
export { Parcel, ParcelCreate, ParcelUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Shipment}from'./shipments';import type{Package}from'./packages';import type{ParcelLineItem}from'./parcel_line_items';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Version}from'./versions';type ParcelRel=ResourceRel&{type:typeof Parcels.TYPE;};type ShipmentRel=ResourceRel&{type:'shipments';};type PackageRel=ResourceRel&{type:'packages';};interface Parcel extends Resource{number?:string;weight?:number;unit_of_weight?:string;eel_pfc?:string;contents_type?:string;contents_explanation?:string;customs_certify?:boolean;customs_signer?:string;non_delivery_option?:string;restriction_type?:string;restriction_comments?:string;customs_info_required?:boolean;shipping_label_url?:string;shipping_label_file_type?:string;shipping_label_size?:string;shipping_label_resolution?:string;tracking_number?:string;tracking_status?:string;tracking_status_detail?:string;tracking_status_updated_at?:string;tracking_details?:object;carrier_weight_oz?:string;signed_by?:string;incoterm?:string;delivery_confirmation?:string;shipment?:Shipment;package?:Package;parcel_line_items?:ParcelLineItem[];attachments?:Attachment[];events?:Event[];versions?:Version[];}interface ParcelCreate extends ResourceCreate{weight:number;unit_of_weight:string;eel_pfc?:string;contents_type?:string;contents_explanation?:string;customs_certify?:boolean;customs_signer?:string;non_delivery_option?:string;restriction_type?:string;restriction_comments?:string;customs_info_required?:boolean;shipping_label_url?:string;shipping_label_file_type?:string;shipping_label_size?:string;shipping_label_resolution?:string;tracking_number?:string;tracking_status?:string;tracking_status_detail?:string;tracking_status_updated_at?:string;tracking_details?:object;carrier_weight_oz?:string;signed_by?:string;incoterm?:string;delivery_confirmation?:string;shipment:ShipmentRel;package:PackageRel;}interface ParcelUpdate extends ResourceUpdate{weight?:number;unit_of_weight?:string;eel_pfc?:string;contents_type?:string;contents_explanation?:string;customs_certify?:boolean;customs_signer?:string;non_delivery_option?:string;restriction_type?:string;restriction_comments?:string;customs_info_required?:boolean;shipping_label_url?:string;shipping_label_file_type?:string;shipping_label_size?:string;shipping_label_resolution?:string;tracking_number?:string;tracking_status?:string;tracking_status_detail?:string;tracking_status_updated_at?:string;tracking_details?:object;carrier_weight_oz?:string;signed_by?:string;incoterm?:string;delivery_confirmation?:string;shipment?:ShipmentRel;package?:PackageRel;}declare class Parcels extends ApiResource{static readonly TYPE:'parcels';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Parcel>>;create(resource:ParcelCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Parcel>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Parcel>;update(resource:ParcelUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Parcel>;delete(id:string,options?:ResourcesConfig):Promise<void>;shipment(parcelId:string|Parcel,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;package(parcelId:string|Parcel,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Package>;parcel_line_items(parcelId:string|Parcel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ParcelLineItem>>;attachments(parcelId:string|Parcel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(parcelId:string|Parcel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;versions(parcelId:string|Parcel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isParcel(resource:any):resource is Parcel;relationship(id:string|ResourceId|null):ParcelRel;type():string;}export default Parcels;export{Parcel,ParcelCreate,ParcelUpdate};
|
@@ -1,57 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class Parcels extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'parcels'
|
6
|
-
async list(params, options) {
|
7
|
-
return this.resources.list({ type: Parcels.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async create(resource, params, options) {
|
10
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: Parcels.TYPE }), params, options);
|
11
|
-
}
|
12
|
-
async retrieve(id, params, options) {
|
13
|
-
return this.resources.retrieve({ type: Parcels.TYPE, id }, params, options);
|
14
|
-
}
|
15
|
-
async update(resource, params, options) {
|
16
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Parcels.TYPE }), params, options);
|
17
|
-
}
|
18
|
-
async delete(id, options) {
|
19
|
-
await this.resources.delete({ type: Parcels.TYPE, id }, options);
|
20
|
-
}
|
21
|
-
async shipment(parcelId, params, options) {
|
22
|
-
const _parcelId = parcelId.id || parcelId;
|
23
|
-
return this.resources.fetch({ type: 'shipments' }, `parcels/${_parcelId}/shipment`, params, options);
|
24
|
-
}
|
25
|
-
async package(parcelId, params, options) {
|
26
|
-
const _parcelId = parcelId.id || parcelId;
|
27
|
-
return this.resources.fetch({ type: 'packages' }, `parcels/${_parcelId}/package`, params, options);
|
28
|
-
}
|
29
|
-
async parcel_line_items(parcelId, params, options) {
|
30
|
-
const _parcelId = parcelId.id || parcelId;
|
31
|
-
return this.resources.fetch({ type: 'parcel_line_items' }, `parcels/${_parcelId}/parcel_line_items`, params, options);
|
32
|
-
}
|
33
|
-
async attachments(parcelId, params, options) {
|
34
|
-
const _parcelId = parcelId.id || parcelId;
|
35
|
-
return this.resources.fetch({ type: 'attachments' }, `parcels/${_parcelId}/attachments`, params, options);
|
36
|
-
}
|
37
|
-
async events(parcelId, params, options) {
|
38
|
-
const _parcelId = parcelId.id || parcelId;
|
39
|
-
return this.resources.fetch({ type: 'events' }, `parcels/${_parcelId}/events`, params, options);
|
40
|
-
}
|
41
|
-
async versions(parcelId, params, options) {
|
42
|
-
const _parcelId = parcelId.id || parcelId;
|
43
|
-
return this.resources.fetch({ type: 'versions' }, `parcels/${_parcelId}/versions`, params, options);
|
44
|
-
}
|
45
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
46
|
-
isParcel(resource) {
|
47
|
-
return resource.type && (resource.type === Parcels.TYPE);
|
48
|
-
}
|
49
|
-
relationship(id) {
|
50
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: Parcels.TYPE } : { id: id.id, type: Parcels.TYPE };
|
51
|
-
}
|
52
|
-
type() {
|
53
|
-
return Parcels.TYPE;
|
54
|
-
}
|
55
|
-
}
|
56
|
-
Parcels.TYPE = 'parcels';
|
57
|
-
exports.default = Parcels;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Parcels extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Parcels.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:Parcels.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:Parcels.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:Parcels.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:Parcels.TYPE,id:e},t)}async shipment(e,t,s){const r=e.id||e;return this.resources.fetch({type:"shipments"},`parcels/${r}/shipment`,t,s)}async package(e,t,s){const r=e.id||e;return this.resources.fetch({type:"packages"},`parcels/${r}/package`,t,s)}async parcel_line_items(e,t,s){const r=e.id||e;return this.resources.fetch({type:"parcel_line_items"},`parcels/${r}/parcel_line_items`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`parcels/${r}/attachments`,t,s)}async events(e,t,s){const r=e.id||e;return this.resources.fetch({type:"events"},`parcels/${r}/events`,t,s)}async versions(e,t,s){const r=e.id||e;return this.resources.fetch({type:"versions"},`parcels/${r}/versions`,t,s)}isParcel(e){return e.type&&e.type===Parcels.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Parcels.TYPE}:{id:e.id,type:Parcels.TYPE}}type(){return Parcels.TYPE}}Parcels.TYPE="parcels",exports.default=Parcels;
|
@@ -1,24 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { PaymentMethod } from './payment_methods';
|
4
|
-
import type { Version } from './versions';
|
5
|
-
type PaymentGatewayRel = ResourceRel & {
|
6
|
-
type: typeof PaymentGateways.TYPE;
|
7
|
-
};
|
8
|
-
interface PaymentGateway extends Resource {
|
9
|
-
name?: string;
|
10
|
-
payment_methods?: PaymentMethod[];
|
11
|
-
versions?: Version[];
|
12
|
-
}
|
13
|
-
declare class PaymentGateways extends ApiResource {
|
14
|
-
static readonly TYPE: 'payment_gateways';
|
15
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentGateway>>;
|
16
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
17
|
-
payment_methods(paymentGatewayId: string | PaymentGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
18
|
-
versions(paymentGatewayId: string | PaymentGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
19
|
-
isPaymentGateway(resource: any): resource is PaymentGateway;
|
20
|
-
relationship(id: string | ResourceId | null): PaymentGatewayRel;
|
21
|
-
type(): string;
|
22
|
-
}
|
23
|
-
export default PaymentGateways;
|
24
|
-
export { PaymentGateway };
|
1
|
+
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{Version}from'./versions';type PaymentGatewayRel=ResourceRel&{type:typeof PaymentGateways.TYPE;};interface PaymentGateway extends Resource{name?:string;payment_methods?:PaymentMethod[];versions?:Version[];}declare class PaymentGateways extends ApiResource{static readonly TYPE:'payment_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentGateway>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;payment_methods(paymentGatewayId:string|PaymentGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;versions(paymentGatewayId:string|PaymentGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isPaymentGateway(resource:any):resource is PaymentGateway;relationship(id:string|ResourceId|null):PaymentGatewayRel;type():string;}export default PaymentGateways;export{PaymentGateway};
|
@@ -1,32 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class PaymentGateways extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'payment_gateways'
|
6
|
-
async list(params, options) {
|
7
|
-
return this.resources.list({ type: PaymentGateways.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async retrieve(id, params, options) {
|
10
|
-
return this.resources.retrieve({ type: PaymentGateways.TYPE, id }, params, options);
|
11
|
-
}
|
12
|
-
async payment_methods(paymentGatewayId, params, options) {
|
13
|
-
const _paymentGatewayId = paymentGatewayId.id || paymentGatewayId;
|
14
|
-
return this.resources.fetch({ type: 'payment_methods' }, `payment_gateways/${_paymentGatewayId}/payment_methods`, params, options);
|
15
|
-
}
|
16
|
-
async versions(paymentGatewayId, params, options) {
|
17
|
-
const _paymentGatewayId = paymentGatewayId.id || paymentGatewayId;
|
18
|
-
return this.resources.fetch({ type: 'versions' }, `payment_gateways/${_paymentGatewayId}/versions`, params, options);
|
19
|
-
}
|
20
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
21
|
-
isPaymentGateway(resource) {
|
22
|
-
return resource.type && (resource.type === PaymentGateways.TYPE);
|
23
|
-
}
|
24
|
-
relationship(id) {
|
25
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: PaymentGateways.TYPE } : { id: id.id, type: PaymentGateways.TYPE };
|
26
|
-
}
|
27
|
-
type() {
|
28
|
-
return PaymentGateways.TYPE;
|
29
|
-
}
|
30
|
-
}
|
31
|
-
PaymentGateways.TYPE = 'payment_gateways';
|
32
|
-
exports.default = PaymentGateways;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class PaymentGateways extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:PaymentGateways.TYPE},e,t)}async retrieve(e,t,r){return this.resources.retrieve({type:PaymentGateways.TYPE,id:e},t,r)}async payment_methods(e,t,r){const s=e.id||e;return this.resources.fetch({type:"payment_methods"},`payment_gateways/${s}/payment_methods`,t,r)}async versions(e,t,r){const s=e.id||e;return this.resources.fetch({type:"versions"},`payment_gateways/${s}/versions`,t,r)}isPaymentGateway(e){return e.type&&e.type===PaymentGateways.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:PaymentGateways.TYPE}:{id:e.id,type:PaymentGateways.TYPE}}type(){return PaymentGateways.TYPE}}PaymentGateways.TYPE="payment_gateways",exports.default=PaymentGateways;
|
@@ -1,80 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Market } from './markets';
|
4
|
-
import type { PaymentGateway } from './payment_gateways';
|
5
|
-
import type { Attachment } from './attachments';
|
6
|
-
import type { Version } from './versions';
|
7
|
-
type PaymentMethodRel = ResourceRel & {
|
8
|
-
type: typeof PaymentMethods.TYPE;
|
9
|
-
};
|
10
|
-
type MarketRel = ResourceRel & {
|
11
|
-
type: 'markets';
|
12
|
-
};
|
13
|
-
type PaymentGatewayRel = ResourceRel & {
|
14
|
-
type: 'payment_gateways';
|
15
|
-
};
|
16
|
-
interface PaymentMethod extends Resource {
|
17
|
-
name?: string;
|
18
|
-
payment_source_type?: string;
|
19
|
-
currency_code?: string;
|
20
|
-
moto?: boolean;
|
21
|
-
require_capture?: boolean;
|
22
|
-
auto_place?: boolean;
|
23
|
-
auto_capture?: boolean;
|
24
|
-
price_amount_cents?: number;
|
25
|
-
price_amount_float?: number;
|
26
|
-
formatted_price_amount?: string;
|
27
|
-
auto_capture_max_amount_cents?: number;
|
28
|
-
auto_capture_max_amount_float?: number;
|
29
|
-
formatted_auto_capture_max_amount?: string;
|
30
|
-
disabled_at?: string;
|
31
|
-
market?: Market;
|
32
|
-
payment_gateway?: PaymentGateway;
|
33
|
-
attachments?: Attachment[];
|
34
|
-
versions?: Version[];
|
35
|
-
}
|
36
|
-
interface PaymentMethodCreate extends ResourceCreate {
|
37
|
-
payment_source_type: string;
|
38
|
-
currency_code?: string;
|
39
|
-
moto?: boolean;
|
40
|
-
require_capture?: boolean;
|
41
|
-
auto_place?: boolean;
|
42
|
-
auto_capture?: boolean;
|
43
|
-
price_amount_cents: number;
|
44
|
-
auto_capture_max_amount_cents?: number;
|
45
|
-
_disable?: boolean;
|
46
|
-
_enable?: boolean;
|
47
|
-
market?: MarketRel;
|
48
|
-
payment_gateway: PaymentGatewayRel;
|
49
|
-
}
|
50
|
-
interface PaymentMethodUpdate extends ResourceUpdate {
|
51
|
-
payment_source_type?: string;
|
52
|
-
currency_code?: string;
|
53
|
-
moto?: boolean;
|
54
|
-
require_capture?: boolean;
|
55
|
-
auto_place?: boolean;
|
56
|
-
auto_capture?: boolean;
|
57
|
-
price_amount_cents?: number;
|
58
|
-
auto_capture_max_amount_cents?: number;
|
59
|
-
_disable?: boolean;
|
60
|
-
_enable?: boolean;
|
61
|
-
market?: MarketRel;
|
62
|
-
payment_gateway?: PaymentGatewayRel;
|
63
|
-
}
|
64
|
-
declare class PaymentMethods extends ApiResource {
|
65
|
-
static readonly TYPE: 'payment_methods';
|
66
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
67
|
-
create(resource: PaymentMethodCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentMethod>;
|
68
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentMethod>;
|
69
|
-
update(resource: PaymentMethodUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentMethod>;
|
70
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
71
|
-
market(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
72
|
-
payment_gateway(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
73
|
-
attachments(paymentMethodId: string | PaymentMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
74
|
-
versions(paymentMethodId: string | PaymentMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
75
|
-
isPaymentMethod(resource: any): resource is PaymentMethod;
|
76
|
-
relationship(id: string | ResourceId | null): PaymentMethodRel;
|
77
|
-
type(): string;
|
78
|
-
}
|
79
|
-
export default PaymentMethods;
|
80
|
-
export { PaymentMethod, PaymentMethodCreate, PaymentMethodUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{PaymentGateway}from'./payment_gateways';import type{Attachment}from'./attachments';import type{Version}from'./versions';type PaymentMethodRel=ResourceRel&{type:typeof PaymentMethods.TYPE;};type MarketRel=ResourceRel&{type:'markets';};type PaymentGatewayRel=ResourceRel&{type:'payment_gateways';};interface PaymentMethod extends Resource{name?:string;payment_source_type?:string;currency_code?:string;moto?:boolean;require_capture?:boolean;auto_place?:boolean;auto_capture?:boolean;price_amount_cents?:number;price_amount_float?:number;formatted_price_amount?:string;auto_capture_max_amount_cents?:number;auto_capture_max_amount_float?:number;formatted_auto_capture_max_amount?:string;disabled_at?:string;market?:Market;payment_gateway?:PaymentGateway;attachments?:Attachment[];versions?:Version[];}interface PaymentMethodCreate extends ResourceCreate{payment_source_type:string;currency_code?:string;moto?:boolean;require_capture?:boolean;auto_place?:boolean;auto_capture?:boolean;price_amount_cents:number;auto_capture_max_amount_cents?:number;_disable?:boolean;_enable?:boolean;market?:MarketRel;payment_gateway:PaymentGatewayRel;}interface PaymentMethodUpdate extends ResourceUpdate{payment_source_type?:string;currency_code?:string;moto?:boolean;require_capture?:boolean;auto_place?:boolean;auto_capture?:boolean;price_amount_cents?:number;auto_capture_max_amount_cents?:number;_disable?:boolean;_enable?:boolean;market?:MarketRel;payment_gateway?:PaymentGatewayRel;}declare class PaymentMethods extends ApiResource{static readonly TYPE:'payment_methods';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;create(resource:PaymentMethodCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentMethod>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentMethod>;update(resource:PaymentMethodUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentMethod>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(paymentMethodId:string|PaymentMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;payment_gateway(paymentMethodId:string|PaymentMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;attachments(paymentMethodId:string|PaymentMethod,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(paymentMethodId:string|PaymentMethod,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isPaymentMethod(resource:any):resource is PaymentMethod;relationship(id:string|ResourceId|null):PaymentMethodRel;type():string;}export default PaymentMethods;export{PaymentMethod,PaymentMethodCreate,PaymentMethodUpdate};
|
@@ -1,49 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class PaymentMethods extends resource_1.ApiResource {
|
5
|
-
// static readonly PATH = 'payment_methods'
|
6
|
-
async list(params, options) {
|
7
|
-
return this.resources.list({ type: PaymentMethods.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async create(resource, params, options) {
|
10
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: PaymentMethods.TYPE }), params, options);
|
11
|
-
}
|
12
|
-
async retrieve(id, params, options) {
|
13
|
-
return this.resources.retrieve({ type: PaymentMethods.TYPE, id }, params, options);
|
14
|
-
}
|
15
|
-
async update(resource, params, options) {
|
16
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: PaymentMethods.TYPE }), params, options);
|
17
|
-
}
|
18
|
-
async delete(id, options) {
|
19
|
-
await this.resources.delete({ type: PaymentMethods.TYPE, id }, options);
|
20
|
-
}
|
21
|
-
async market(paymentMethodId, params, options) {
|
22
|
-
const _paymentMethodId = paymentMethodId.id || paymentMethodId;
|
23
|
-
return this.resources.fetch({ type: 'markets' }, `payment_methods/${_paymentMethodId}/market`, params, options);
|
24
|
-
}
|
25
|
-
async payment_gateway(paymentMethodId, params, options) {
|
26
|
-
const _paymentMethodId = paymentMethodId.id || paymentMethodId;
|
27
|
-
return this.resources.fetch({ type: 'payment_gateways' }, `payment_methods/${_paymentMethodId}/payment_gateway`, params, options);
|
28
|
-
}
|
29
|
-
async attachments(paymentMethodId, params, options) {
|
30
|
-
const _paymentMethodId = paymentMethodId.id || paymentMethodId;
|
31
|
-
return this.resources.fetch({ type: 'attachments' }, `payment_methods/${_paymentMethodId}/attachments`, params, options);
|
32
|
-
}
|
33
|
-
async versions(paymentMethodId, params, options) {
|
34
|
-
const _paymentMethodId = paymentMethodId.id || paymentMethodId;
|
35
|
-
return this.resources.fetch({ type: 'versions' }, `payment_methods/${_paymentMethodId}/versions`, params, options);
|
36
|
-
}
|
37
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
38
|
-
isPaymentMethod(resource) {
|
39
|
-
return resource.type && (resource.type === PaymentMethods.TYPE);
|
40
|
-
}
|
41
|
-
relationship(id) {
|
42
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: PaymentMethods.TYPE } : { id: id.id, type: PaymentMethods.TYPE };
|
43
|
-
}
|
44
|
-
type() {
|
45
|
-
return PaymentMethods.TYPE;
|
46
|
-
}
|
47
|
-
}
|
48
|
-
PaymentMethods.TYPE = 'payment_methods';
|
49
|
-
exports.default = PaymentMethods;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class PaymentMethods extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:PaymentMethods.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:PaymentMethods.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:PaymentMethods.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:PaymentMethods.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:PaymentMethods.TYPE,id:e},t)}async market(e,t,s){const r=e.id||e;return this.resources.fetch({type:"markets"},`payment_methods/${r}/market`,t,s)}async payment_gateway(e,t,s){const r=e.id||e;return this.resources.fetch({type:"payment_gateways"},`payment_methods/${r}/payment_gateway`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`payment_methods/${r}/attachments`,t,s)}async versions(e,t,s){const r=e.id||e;return this.resources.fetch({type:"versions"},`payment_methods/${r}/versions`,t,s)}isPaymentMethod(e){return e.type&&e.type===PaymentMethods.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:PaymentMethods.TYPE}:{id:e.id,type:PaymentMethods.TYPE}}type(){return PaymentMethods.TYPE}}PaymentMethods.TYPE="payment_methods",exports.default=PaymentMethods;
|