@commercelayer/sdk 5.37.0 → 5.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +1 -164
- package/lib/cjs/api.js +1 -387
- package/lib/cjs/client.d.ts +1 -39
- package/lib/cjs/client.js +1 -154
- package/lib/cjs/commercelayer.d.ts +1 -153
- package/lib/cjs/commercelayer.js +1 -253
- package/lib/cjs/common.d.ts +1 -5
- package/lib/cjs/common.js +1 -23
- package/lib/cjs/config.d.ts +1 -15
- package/lib/cjs/config.js +1 -19
- package/lib/cjs/debug.d.ts +1 -3
- package/lib/cjs/debug.js +1 -38
- package/lib/cjs/error.d.ts +1 -31
- package/lib/cjs/error.js +1 -77
- package/lib/cjs/index.d.ts +1 -7
- package/lib/cjs/index.js +1 -13
- package/lib/cjs/interceptor.d.ts +1 -25
- package/lib/cjs/interceptor.js +1 -2
- package/lib/cjs/jsonapi.d.ts +1 -6
- package/lib/cjs/jsonapi.js +1 -94
- package/lib/cjs/model.d.ts +1 -124
- package/lib/cjs/model.js +1 -3
- package/lib/cjs/query.d.ts +1 -17
- package/lib/cjs/query.js +1 -69
- package/lib/cjs/resource.d.ts +1 -89
- package/lib/cjs/resource.js +1 -198
- package/lib/cjs/resources/addresses.d.ts +1 -103
- package/lib/cjs/resources/addresses.js +1 -41
- package/lib/cjs/resources/adjustments.d.ts +1 -42
- package/lib/cjs/resources/adjustments.js +1 -29
- package/lib/cjs/resources/adyen_gateways.d.ts +1 -60
- package/lib/cjs/resources/adyen_gateways.js +1 -37
- package/lib/cjs/resources/adyen_payments.d.ts +1 -51
- package/lib/cjs/resources/adyen_payments.js +1 -40
- package/lib/cjs/resources/application.d.ts +1 -22
- package/lib/cjs/resources/application.js +1 -16
- package/lib/cjs/resources/attachments.d.ts +1 -157
- package/lib/cjs/resources/attachments.js +1 -25
- package/lib/cjs/resources/authorizations.d.ts +1 -70
- package/lib/cjs/resources/authorizations.js +1 -52
- package/lib/cjs/resources/avalara_accounts.d.ts +1 -59
- package/lib/cjs/resources/avalara_accounts.js +1 -41
- package/lib/cjs/resources/axerve_gateways.d.ts +1 -48
- package/lib/cjs/resources/axerve_gateways.js +1 -37
- package/lib/cjs/resources/axerve_payments.d.ts +1 -54
- package/lib/cjs/resources/axerve_payments.js +1 -40
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -39
- package/lib/cjs/resources/billing_info_validation_rules.js +1 -37
- package/lib/cjs/resources/bing_geocoders.d.ts +1 -36
- package/lib/cjs/resources/bing_geocoders.js +1 -33
- package/lib/cjs/resources/braintree_gateways.d.ts +1 -60
- package/lib/cjs/resources/braintree_gateways.js +1 -37
- package/lib/cjs/resources/braintree_payments.d.ts +1 -52
- package/lib/cjs/resources/braintree_payments.js +1 -37
- package/lib/cjs/resources/bundles.d.ts +1 -93
- package/lib/cjs/resources/bundles.js +1 -59
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +1 -137
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +1 -79
- package/lib/cjs/resources/captures.d.ts +1 -60
- package/lib/cjs/resources/captures.js +1 -49
- package/lib/cjs/resources/carrier_accounts.d.ts +1 -30
- package/lib/cjs/resources/carrier_accounts.js +1 -28
- package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -49
- package/lib/cjs/resources/checkout_com_gateways.js +1 -37
- package/lib/cjs/resources/checkout_com_payments.d.ts +1 -65
- package/lib/cjs/resources/checkout_com_payments.js +1 -43
- package/lib/cjs/resources/cleanups.d.ts +1 -40
- package/lib/cjs/resources/cleanups.js +1 -30
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -67
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -33
- package/lib/cjs/resources/coupon_recipients.d.ts +1 -48
- package/lib/cjs/resources/coupon_recipients.js +1 -37
- package/lib/cjs/resources/coupons.d.ts +1 -71
- package/lib/cjs/resources/coupons.js +1 -45
- package/lib/cjs/resources/custom_promotion_rules.d.ts +1 -62
- package/lib/cjs/resources/custom_promotion_rules.js +1 -29
- package/lib/cjs/resources/customer_addresses.d.ts +1 -50
- package/lib/cjs/resources/customer_addresses.js +1 -41
- package/lib/cjs/resources/customer_groups.d.ts +1 -40
- package/lib/cjs/resources/customer_groups.js +1 -41
- package/lib/cjs/resources/customer_password_resets.d.ts +1 -38
- package/lib/cjs/resources/customer_password_resets.js +1 -36
- package/lib/cjs/resources/customer_payment_sources.d.ts +1 -86
- package/lib/cjs/resources/customer_payment_sources.js +1 -37
- package/lib/cjs/resources/customer_subscriptions.d.ts +1 -35
- package/lib/cjs/resources/customer_subscriptions.js +1 -37
- package/lib/cjs/resources/customers.d.ts +1 -76
- package/lib/cjs/resources/customers.js +1 -69
- package/lib/cjs/resources/delivery_lead_times.d.ts +1 -55
- package/lib/cjs/resources/delivery_lead_times.js +1 -41
- package/lib/cjs/resources/event_callbacks.d.ts +1 -25
- package/lib/cjs/resources/event_callbacks.js +1 -20
- package/lib/cjs/resources/events.d.ts +1 -25
- package/lib/cjs/resources/events.js +1 -24
- package/lib/cjs/resources/exports.d.ts +1 -41
- package/lib/cjs/resources/exports.js +1 -26
- package/lib/cjs/resources/external_gateways.d.ts +1 -57
- package/lib/cjs/resources/external_gateways.js +1 -40
- package/lib/cjs/resources/external_payments.d.ts +1 -48
- package/lib/cjs/resources/external_payments.js +1 -41
- package/lib/cjs/resources/external_promotions.d.ts +1 -136
- package/lib/cjs/resources/external_promotions.js +1 -82
- package/lib/cjs/resources/external_tax_calculators.d.ts +1 -45
- package/lib/cjs/resources/external_tax_calculators.js +1 -40
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -133
- package/lib/cjs/resources/fixed_amount_promotions.js +1 -79
- package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -133
- package/lib/cjs/resources/fixed_price_promotions.js +1 -79
- package/lib/cjs/resources/free_gift_promotions.d.ts +1 -131
- package/lib/cjs/resources/free_gift_promotions.js +1 -79
- package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -125
- package/lib/cjs/resources/free_shipping_promotions.js +1 -75
- package/lib/cjs/resources/geocoders.d.ts +1 -25
- package/lib/cjs/resources/geocoders.js +1 -24
- package/lib/cjs/resources/gift_card_recipients.d.ts +1 -48
- package/lib/cjs/resources/gift_card_recipients.js +1 -37
- package/lib/cjs/resources/gift_cards.d.ts +1 -104
- package/lib/cjs/resources/gift_cards.js +1 -61
- package/lib/cjs/resources/google_geocoders.d.ts +1 -36
- package/lib/cjs/resources/google_geocoders.js +1 -33
- package/lib/cjs/resources/imports.d.ts +1 -44
- package/lib/cjs/resources/imports.js +1 -26
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -68
- package/lib/cjs/resources/in_stock_subscriptions.js +1 -51
- package/lib/cjs/resources/inventory_models.d.ts +1 -55
- package/lib/cjs/resources/inventory_models.js +1 -41
- package/lib/cjs/resources/inventory_return_locations.d.ts +1 -47
- package/lib/cjs/resources/inventory_return_locations.js +1 -37
- package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -50
- package/lib/cjs/resources/inventory_stock_locations.js +1 -37
- package/lib/cjs/resources/klarna_gateways.d.ts +1 -48
- package/lib/cjs/resources/klarna_gateways.js +1 -37
- package/lib/cjs/resources/klarna_payments.d.ts +1 -48
- package/lib/cjs/resources/klarna_payments.js +1 -40
- package/lib/cjs/resources/line_item_options.d.ts +1 -69
- package/lib/cjs/resources/line_item_options.js +1 -41
- package/lib/cjs/resources/line_items.d.ts +1 -170
- package/lib/cjs/resources/line_items.js +1 -66
- package/lib/cjs/resources/manual_gateways.d.ts +1 -34
- package/lib/cjs/resources/manual_gateways.js +1 -33
- package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -45
- package/lib/cjs/resources/manual_tax_calculators.js +1 -41
- package/lib/cjs/resources/markets.d.ts +1 -107
- package/lib/cjs/resources/markets.js +1 -63
- package/lib/cjs/resources/merchants.d.ts +1 -42
- package/lib/cjs/resources/merchants.js +1 -37
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -67
- package/lib/cjs/resources/order_amount_promotion_rules.js +1 -29
- package/lib/cjs/resources/order_copies.d.ts +1 -51
- package/lib/cjs/resources/order_copies.js +1 -41
- package/lib/cjs/resources/order_factories.d.ts +1 -34
- package/lib/cjs/resources/order_factories.js +1 -28
- package/lib/cjs/resources/order_subscription_items.d.ts +1 -72
- package/lib/cjs/resources/order_subscription_items.js +1 -33
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -98
- package/lib/cjs/resources/order_subscriptions.js +1 -78
- package/lib/cjs/resources/order_validation_rules.d.ts +1 -27
- package/lib/cjs/resources/order_validation_rules.js +1 -28
- package/lib/cjs/resources/orders.d.ts +1 -389
- package/lib/cjs/resources/orders.js +1 -236
- package/lib/cjs/resources/organization.d.ts +1 -34
- package/lib/cjs/resources/organization.js +1 -16
- package/lib/cjs/resources/packages.d.ts +1 -60
- package/lib/cjs/resources/packages.js +1 -41
- package/lib/cjs/resources/parcel_line_items.d.ts +1 -47
- package/lib/cjs/resources/parcel_line_items.js +1 -37
- package/lib/cjs/resources/parcels.d.ts +1 -126
- package/lib/cjs/resources/parcels.js +1 -49
- package/lib/cjs/resources/payment_gateways.d.ts +1 -25
- package/lib/cjs/resources/payment_gateways.js +1 -24
- package/lib/cjs/resources/payment_methods.d.ts +1 -83
- package/lib/cjs/resources/payment_methods.js +1 -47
- package/lib/cjs/resources/payment_options.d.ts +1 -44
- package/lib/cjs/resources/payment_options.js +1 -33
- package/lib/cjs/resources/paypal_gateways.d.ts +1 -41
- package/lib/cjs/resources/paypal_gateways.js +1 -37
- package/lib/cjs/resources/paypal_payments.d.ts +1 -53
- package/lib/cjs/resources/paypal_payments.js +1 -37
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -131
- package/lib/cjs/resources/percentage_discount_promotions.js +1 -79
- package/lib/cjs/resources/price_frequency_tiers.d.ts +1 -53
- package/lib/cjs/resources/price_frequency_tiers.js +1 -41
- package/lib/cjs/resources/price_lists.d.ts +1 -46
- package/lib/cjs/resources/price_lists.js +1 -37
- package/lib/cjs/resources/price_tiers.d.ts +1 -32
- package/lib/cjs/resources/price_tiers.js +1 -28
- package/lib/cjs/resources/price_volume_tiers.d.ts +1 -53
- package/lib/cjs/resources/price_volume_tiers.js +1 -41
- package/lib/cjs/resources/prices.d.ts +1 -84
- package/lib/cjs/resources/prices.js +1 -65
- package/lib/cjs/resources/promotion_rules.d.ts +1 -29
- package/lib/cjs/resources/promotion_rules.js +1 -20
- package/lib/cjs/resources/promotions.d.ts +1 -63
- package/lib/cjs/resources/promotions.js +1 -60
- package/lib/cjs/resources/recurring_order_copies.d.ts +1 -53
- package/lib/cjs/resources/recurring_order_copies.js +1 -41
- package/lib/cjs/resources/refunds.d.ts +1 -44
- package/lib/cjs/resources/refunds.js +1 -36
- package/lib/cjs/resources/reserved_stocks.d.ts +1 -28
- package/lib/cjs/resources/reserved_stocks.js +1 -28
- package/lib/cjs/resources/resource_errors.d.ts +1 -22
- package/lib/cjs/resources/resource_errors.js +1 -16
- package/lib/cjs/resources/return_line_items.d.ts +1 -52
- package/lib/cjs/resources/return_line_items.js +1 -36
- package/lib/cjs/resources/returns.d.ts +1 -96
- package/lib/cjs/resources/returns.js +1 -92
- package/lib/cjs/resources/satispay_gateways.d.ts +1 -46
- package/lib/cjs/resources/satispay_gateways.js +1 -37
- package/lib/cjs/resources/satispay_payments.d.ts +1 -50
- package/lib/cjs/resources/satispay_payments.js +1 -40
- package/lib/cjs/resources/shipments.d.ts +1 -151
- package/lib/cjs/resources/shipments.js +1 -130
- package/lib/cjs/resources/shipping_categories.d.ts +1 -40
- package/lib/cjs/resources/shipping_categories.js +1 -37
- package/lib/cjs/resources/shipping_method_tiers.d.ts +1 -32
- package/lib/cjs/resources/shipping_method_tiers.js +1 -28
- package/lib/cjs/resources/shipping_methods.d.ts +1 -125
- package/lib/cjs/resources/shipping_methods.js +1 -70
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +1 -50
- package/lib/cjs/resources/shipping_weight_tiers.js +1 -37
- package/lib/cjs/resources/shipping_zones.d.ts +1 -52
- package/lib/cjs/resources/shipping_zones.js +1 -33
- package/lib/cjs/resources/sku_list_items.d.ts +1 -51
- package/lib/cjs/resources/sku_list_items.js +1 -37
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -76
- package/lib/cjs/resources/sku_list_promotion_rules.js +1 -37
- package/lib/cjs/resources/sku_lists.d.ts +1 -64
- package/lib/cjs/resources/sku_lists.js +1 -49
- package/lib/cjs/resources/sku_options.d.ts +1 -71
- package/lib/cjs/resources/sku_options.js +1 -45
- package/lib/cjs/resources/skus.d.ts +1 -96
- package/lib/cjs/resources/skus.js +1 -65
- package/lib/cjs/resources/stock_items.d.ts +1 -61
- package/lib/cjs/resources/stock_items.js +1 -52
- package/lib/cjs/resources/stock_line_items.d.ts +1 -73
- package/lib/cjs/resources/stock_line_items.js +1 -54
- package/lib/cjs/resources/stock_locations.d.ts +1 -64
- package/lib/cjs/resources/stock_locations.js +1 -53
- package/lib/cjs/resources/stock_reservations.d.ts +1 -51
- package/lib/cjs/resources/stock_reservations.js +1 -48
- package/lib/cjs/resources/stock_transfers.d.ts +1 -86
- package/lib/cjs/resources/stock_transfers.js +1 -71
- package/lib/cjs/resources/stripe_gateways.d.ts +1 -45
- package/lib/cjs/resources/stripe_gateways.js +1 -37
- package/lib/cjs/resources/stripe_payments.d.ts +1 -59
- package/lib/cjs/resources/stripe_payments.js +1 -43
- package/lib/cjs/resources/subscription_models.d.ts +1 -49
- package/lib/cjs/resources/subscription_models.js +1 -37
- package/lib/cjs/resources/tags.d.ts +1 -28
- package/lib/cjs/resources/tags.js +1 -25
- package/lib/cjs/resources/tax_calculators.d.ts +1 -28
- package/lib/cjs/resources/tax_calculators.js +1 -28
- package/lib/cjs/resources/tax_categories.d.ts +1 -63
- package/lib/cjs/resources/tax_categories.js +1 -37
- package/lib/cjs/resources/tax_rules.d.ts +1 -73
- package/lib/cjs/resources/tax_rules.js +1 -33
- package/lib/cjs/resources/taxjar_accounts.d.ts +1 -47
- package/lib/cjs/resources/taxjar_accounts.js +1 -41
- package/lib/cjs/resources/transactions.d.ts +1 -41
- package/lib/cjs/resources/transactions.js +1 -32
- package/lib/cjs/resources/versions.d.ts +1 -22
- package/lib/cjs/resources/versions.js +1 -16
- package/lib/cjs/resources/voids.d.ts +1 -44
- package/lib/cjs/resources/voids.js +1 -36
- package/lib/cjs/resources/webhooks.d.ts +1 -55
- package/lib/cjs/resources/webhooks.js +1 -42
- package/lib/cjs/resources/wire_transfers.d.ts +1 -37
- package/lib/cjs/resources/wire_transfers.js +1 -33
- package/lib/cjs/static.d.ts +1 -12
- package/lib/cjs/static.js +1 -51
- package/lib/cjs/util.d.ts +1 -4
- package/lib/cjs/util.js +1 -16
- package/lib/esm/api.d.ts +1 -164
- package/lib/esm/api.js +1 -258
- package/lib/esm/client.d.ts +1 -39
- package/lib/esm/client.js +1 -149
- package/lib/esm/commercelayer.d.ts +1 -153
- package/lib/esm/commercelayer.js +1 -224
- package/lib/esm/common.d.ts +1 -5
- package/lib/esm/common.js +1 -19
- package/lib/esm/config.d.ts +1 -15
- package/lib/esm/config.js +1 -17
- package/lib/esm/debug.d.ts +1 -3
- package/lib/esm/debug.js +1 -36
- package/lib/esm/error.d.ts +1 -31
- package/lib/esm/error.js +1 -69
- package/lib/esm/index.d.ts +1 -7
- package/lib/esm/index.js +1 -4
- package/lib/esm/interceptor.d.ts +1 -25
- package/lib/esm/interceptor.js +1 -1
- package/lib/esm/jsonapi.d.ts +1 -6
- package/lib/esm/jsonapi.js +1 -87
- package/lib/esm/model.d.ts +1 -124
- package/lib/esm/model.js +1 -2
- package/lib/esm/query.d.ts +1 -17
- package/lib/esm/query.js +1 -62
- package/lib/esm/resource.d.ts +1 -89
- package/lib/esm/resource.js +1 -191
- package/lib/esm/resources/addresses.d.ts +1 -103
- package/lib/esm/resources/addresses.js +1 -39
- package/lib/esm/resources/adjustments.d.ts +1 -42
- package/lib/esm/resources/adjustments.js +1 -27
- package/lib/esm/resources/adyen_gateways.d.ts +1 -60
- package/lib/esm/resources/adyen_gateways.js +1 -35
- package/lib/esm/resources/adyen_payments.d.ts +1 -51
- package/lib/esm/resources/adyen_payments.js +1 -38
- package/lib/esm/resources/application.d.ts +1 -22
- package/lib/esm/resources/application.js +1 -14
- package/lib/esm/resources/attachments.d.ts +1 -157
- package/lib/esm/resources/attachments.js +1 -23
- package/lib/esm/resources/authorizations.d.ts +1 -70
- package/lib/esm/resources/authorizations.js +1 -50
- package/lib/esm/resources/avalara_accounts.d.ts +1 -59
- package/lib/esm/resources/avalara_accounts.js +1 -39
- package/lib/esm/resources/axerve_gateways.d.ts +1 -48
- package/lib/esm/resources/axerve_gateways.js +1 -35
- package/lib/esm/resources/axerve_payments.d.ts +1 -54
- package/lib/esm/resources/axerve_payments.js +1 -38
- package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -39
- package/lib/esm/resources/billing_info_validation_rules.js +1 -35
- package/lib/esm/resources/bing_geocoders.d.ts +1 -36
- package/lib/esm/resources/bing_geocoders.js +1 -31
- package/lib/esm/resources/braintree_gateways.d.ts +1 -60
- package/lib/esm/resources/braintree_gateways.js +1 -35
- package/lib/esm/resources/braintree_payments.d.ts +1 -52
- package/lib/esm/resources/braintree_payments.js +1 -35
- package/lib/esm/resources/bundles.d.ts +1 -93
- package/lib/esm/resources/bundles.js +1 -57
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +1 -137
- package/lib/esm/resources/buy_x_pay_y_promotions.js +1 -77
- package/lib/esm/resources/captures.d.ts +1 -60
- package/lib/esm/resources/captures.js +1 -47
- package/lib/esm/resources/carrier_accounts.d.ts +1 -30
- package/lib/esm/resources/carrier_accounts.js +1 -26
- package/lib/esm/resources/checkout_com_gateways.d.ts +1 -49
- package/lib/esm/resources/checkout_com_gateways.js +1 -35
- package/lib/esm/resources/checkout_com_payments.d.ts +1 -65
- package/lib/esm/resources/checkout_com_payments.js +1 -41
- package/lib/esm/resources/cleanups.d.ts +1 -40
- package/lib/esm/resources/cleanups.js +1 -28
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -67
- package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -31
- package/lib/esm/resources/coupon_recipients.d.ts +1 -48
- package/lib/esm/resources/coupon_recipients.js +1 -35
- package/lib/esm/resources/coupons.d.ts +1 -71
- package/lib/esm/resources/coupons.js +1 -43
- package/lib/esm/resources/custom_promotion_rules.d.ts +1 -62
- package/lib/esm/resources/custom_promotion_rules.js +1 -27
- package/lib/esm/resources/customer_addresses.d.ts +1 -50
- package/lib/esm/resources/customer_addresses.js +1 -39
- package/lib/esm/resources/customer_groups.d.ts +1 -40
- package/lib/esm/resources/customer_groups.js +1 -39
- package/lib/esm/resources/customer_password_resets.d.ts +1 -38
- package/lib/esm/resources/customer_password_resets.js +1 -34
- package/lib/esm/resources/customer_payment_sources.d.ts +1 -86
- package/lib/esm/resources/customer_payment_sources.js +1 -35
- package/lib/esm/resources/customer_subscriptions.d.ts +1 -35
- package/lib/esm/resources/customer_subscriptions.js +1 -35
- package/lib/esm/resources/customers.d.ts +1 -76
- package/lib/esm/resources/customers.js +1 -67
- package/lib/esm/resources/delivery_lead_times.d.ts +1 -55
- package/lib/esm/resources/delivery_lead_times.js +1 -39
- package/lib/esm/resources/event_callbacks.d.ts +1 -25
- package/lib/esm/resources/event_callbacks.js +1 -18
- package/lib/esm/resources/events.d.ts +1 -25
- package/lib/esm/resources/events.js +1 -22
- package/lib/esm/resources/exports.d.ts +1 -41
- package/lib/esm/resources/exports.js +1 -24
- package/lib/esm/resources/external_gateways.d.ts +1 -57
- package/lib/esm/resources/external_gateways.js +1 -38
- package/lib/esm/resources/external_payments.d.ts +1 -48
- package/lib/esm/resources/external_payments.js +1 -39
- package/lib/esm/resources/external_promotions.d.ts +1 -136
- package/lib/esm/resources/external_promotions.js +1 -80
- package/lib/esm/resources/external_tax_calculators.d.ts +1 -45
- package/lib/esm/resources/external_tax_calculators.js +1 -38
- package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -133
- package/lib/esm/resources/fixed_amount_promotions.js +1 -77
- package/lib/esm/resources/fixed_price_promotions.d.ts +1 -133
- package/lib/esm/resources/fixed_price_promotions.js +1 -77
- package/lib/esm/resources/free_gift_promotions.d.ts +1 -131
- package/lib/esm/resources/free_gift_promotions.js +1 -77
- package/lib/esm/resources/free_shipping_promotions.d.ts +1 -125
- package/lib/esm/resources/free_shipping_promotions.js +1 -73
- package/lib/esm/resources/geocoders.d.ts +1 -25
- package/lib/esm/resources/geocoders.js +1 -22
- package/lib/esm/resources/gift_card_recipients.d.ts +1 -48
- package/lib/esm/resources/gift_card_recipients.js +1 -35
- package/lib/esm/resources/gift_cards.d.ts +1 -104
- package/lib/esm/resources/gift_cards.js +1 -59
- package/lib/esm/resources/google_geocoders.d.ts +1 -36
- package/lib/esm/resources/google_geocoders.js +1 -31
- package/lib/esm/resources/imports.d.ts +1 -44
- package/lib/esm/resources/imports.js +1 -24
- package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -68
- package/lib/esm/resources/in_stock_subscriptions.js +1 -49
- package/lib/esm/resources/inventory_models.d.ts +1 -55
- package/lib/esm/resources/inventory_models.js +1 -39
- package/lib/esm/resources/inventory_return_locations.d.ts +1 -47
- package/lib/esm/resources/inventory_return_locations.js +1 -35
- package/lib/esm/resources/inventory_stock_locations.d.ts +1 -50
- package/lib/esm/resources/inventory_stock_locations.js +1 -35
- package/lib/esm/resources/klarna_gateways.d.ts +1 -48
- package/lib/esm/resources/klarna_gateways.js +1 -35
- package/lib/esm/resources/klarna_payments.d.ts +1 -48
- package/lib/esm/resources/klarna_payments.js +1 -38
- package/lib/esm/resources/line_item_options.d.ts +1 -69
- package/lib/esm/resources/line_item_options.js +1 -39
- package/lib/esm/resources/line_items.d.ts +1 -170
- package/lib/esm/resources/line_items.js +1 -64
- package/lib/esm/resources/manual_gateways.d.ts +1 -34
- package/lib/esm/resources/manual_gateways.js +1 -31
- package/lib/esm/resources/manual_tax_calculators.d.ts +1 -45
- package/lib/esm/resources/manual_tax_calculators.js +1 -39
- package/lib/esm/resources/markets.d.ts +1 -107
- package/lib/esm/resources/markets.js +1 -61
- package/lib/esm/resources/merchants.d.ts +1 -42
- package/lib/esm/resources/merchants.js +1 -35
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -67
- package/lib/esm/resources/order_amount_promotion_rules.js +1 -27
- package/lib/esm/resources/order_copies.d.ts +1 -51
- package/lib/esm/resources/order_copies.js +1 -39
- package/lib/esm/resources/order_factories.d.ts +1 -34
- package/lib/esm/resources/order_factories.js +1 -26
- package/lib/esm/resources/order_subscription_items.d.ts +1 -72
- package/lib/esm/resources/order_subscription_items.js +1 -31
- package/lib/esm/resources/order_subscriptions.d.ts +1 -98
- package/lib/esm/resources/order_subscriptions.js +1 -76
- package/lib/esm/resources/order_validation_rules.d.ts +1 -27
- package/lib/esm/resources/order_validation_rules.js +1 -26
- package/lib/esm/resources/orders.d.ts +1 -389
- package/lib/esm/resources/orders.js +1 -234
- package/lib/esm/resources/organization.d.ts +1 -34
- package/lib/esm/resources/organization.js +1 -14
- package/lib/esm/resources/packages.d.ts +1 -60
- package/lib/esm/resources/packages.js +1 -39
- package/lib/esm/resources/parcel_line_items.d.ts +1 -47
- package/lib/esm/resources/parcel_line_items.js +1 -35
- package/lib/esm/resources/parcels.d.ts +1 -126
- package/lib/esm/resources/parcels.js +1 -47
- package/lib/esm/resources/payment_gateways.d.ts +1 -25
- package/lib/esm/resources/payment_gateways.js +1 -22
- package/lib/esm/resources/payment_methods.d.ts +1 -83
- package/lib/esm/resources/payment_methods.js +1 -45
- package/lib/esm/resources/payment_options.d.ts +1 -44
- package/lib/esm/resources/payment_options.js +1 -31
- package/lib/esm/resources/paypal_gateways.d.ts +1 -41
- package/lib/esm/resources/paypal_gateways.js +1 -35
- package/lib/esm/resources/paypal_payments.d.ts +1 -53
- package/lib/esm/resources/paypal_payments.js +1 -35
- package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -131
- package/lib/esm/resources/percentage_discount_promotions.js +1 -77
- package/lib/esm/resources/price_frequency_tiers.d.ts +1 -53
- package/lib/esm/resources/price_frequency_tiers.js +1 -39
- package/lib/esm/resources/price_lists.d.ts +1 -46
- package/lib/esm/resources/price_lists.js +1 -35
- package/lib/esm/resources/price_tiers.d.ts +1 -32
- package/lib/esm/resources/price_tiers.js +1 -26
- package/lib/esm/resources/price_volume_tiers.d.ts +1 -53
- package/lib/esm/resources/price_volume_tiers.js +1 -39
- package/lib/esm/resources/prices.d.ts +1 -84
- package/lib/esm/resources/prices.js +1 -63
- package/lib/esm/resources/promotion_rules.d.ts +1 -29
- package/lib/esm/resources/promotion_rules.js +1 -18
- package/lib/esm/resources/promotions.d.ts +1 -63
- package/lib/esm/resources/promotions.js +1 -58
- package/lib/esm/resources/recurring_order_copies.d.ts +1 -53
- package/lib/esm/resources/recurring_order_copies.js +1 -39
- package/lib/esm/resources/refunds.d.ts +1 -44
- package/lib/esm/resources/refunds.js +1 -34
- package/lib/esm/resources/reserved_stocks.d.ts +1 -28
- package/lib/esm/resources/reserved_stocks.js +1 -26
- package/lib/esm/resources/resource_errors.d.ts +1 -22
- package/lib/esm/resources/resource_errors.js +1 -14
- package/lib/esm/resources/return_line_items.d.ts +1 -52
- package/lib/esm/resources/return_line_items.js +1 -34
- package/lib/esm/resources/returns.d.ts +1 -96
- package/lib/esm/resources/returns.js +1 -90
- package/lib/esm/resources/satispay_gateways.d.ts +1 -46
- package/lib/esm/resources/satispay_gateways.js +1 -35
- package/lib/esm/resources/satispay_payments.d.ts +1 -50
- package/lib/esm/resources/satispay_payments.js +1 -38
- package/lib/esm/resources/shipments.d.ts +1 -151
- package/lib/esm/resources/shipments.js +1 -128
- package/lib/esm/resources/shipping_categories.d.ts +1 -40
- package/lib/esm/resources/shipping_categories.js +1 -35
- package/lib/esm/resources/shipping_method_tiers.d.ts +1 -32
- package/lib/esm/resources/shipping_method_tiers.js +1 -26
- package/lib/esm/resources/shipping_methods.d.ts +1 -125
- package/lib/esm/resources/shipping_methods.js +1 -68
- package/lib/esm/resources/shipping_weight_tiers.d.ts +1 -50
- package/lib/esm/resources/shipping_weight_tiers.js +1 -35
- package/lib/esm/resources/shipping_zones.d.ts +1 -52
- package/lib/esm/resources/shipping_zones.js +1 -31
- package/lib/esm/resources/sku_list_items.d.ts +1 -51
- package/lib/esm/resources/sku_list_items.js +1 -35
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -76
- package/lib/esm/resources/sku_list_promotion_rules.js +1 -35
- package/lib/esm/resources/sku_lists.d.ts +1 -64
- package/lib/esm/resources/sku_lists.js +1 -47
- package/lib/esm/resources/sku_options.d.ts +1 -71
- package/lib/esm/resources/sku_options.js +1 -43
- package/lib/esm/resources/skus.d.ts +1 -96
- package/lib/esm/resources/skus.js +1 -63
- package/lib/esm/resources/stock_items.d.ts +1 -61
- package/lib/esm/resources/stock_items.js +1 -50
- package/lib/esm/resources/stock_line_items.d.ts +1 -73
- package/lib/esm/resources/stock_line_items.js +1 -52
- package/lib/esm/resources/stock_locations.d.ts +1 -64
- package/lib/esm/resources/stock_locations.js +1 -51
- package/lib/esm/resources/stock_reservations.d.ts +1 -51
- package/lib/esm/resources/stock_reservations.js +1 -46
- package/lib/esm/resources/stock_transfers.d.ts +1 -86
- package/lib/esm/resources/stock_transfers.js +1 -69
- package/lib/esm/resources/stripe_gateways.d.ts +1 -45
- package/lib/esm/resources/stripe_gateways.js +1 -35
- package/lib/esm/resources/stripe_payments.d.ts +1 -59
- package/lib/esm/resources/stripe_payments.js +1 -41
- package/lib/esm/resources/subscription_models.d.ts +1 -49
- package/lib/esm/resources/subscription_models.js +1 -35
- package/lib/esm/resources/tags.d.ts +1 -28
- package/lib/esm/resources/tags.js +1 -23
- package/lib/esm/resources/tax_calculators.d.ts +1 -28
- package/lib/esm/resources/tax_calculators.js +1 -26
- package/lib/esm/resources/tax_categories.d.ts +1 -63
- package/lib/esm/resources/tax_categories.js +1 -35
- package/lib/esm/resources/tax_rules.d.ts +1 -73
- package/lib/esm/resources/tax_rules.js +1 -31
- package/lib/esm/resources/taxjar_accounts.d.ts +1 -47
- package/lib/esm/resources/taxjar_accounts.js +1 -39
- package/lib/esm/resources/transactions.d.ts +1 -41
- package/lib/esm/resources/transactions.js +1 -30
- package/lib/esm/resources/versions.d.ts +1 -22
- package/lib/esm/resources/versions.js +1 -14
- package/lib/esm/resources/voids.d.ts +1 -44
- package/lib/esm/resources/voids.js +1 -34
- package/lib/esm/resources/webhooks.d.ts +1 -55
- package/lib/esm/resources/webhooks.js +1 -40
- package/lib/esm/resources/wire_transfers.d.ts +1 -37
- package/lib/esm/resources/wire_transfers.js +1 -31
- package/lib/esm/static.d.ts +1 -12
- package/lib/esm/static.js +1 -25
- package/lib/esm/util.d.ts +1 -4
- package/lib/esm/util.js +1 -37
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
@@ -1,51 +1 @@
|
|
1
|
-
import {
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { Order, OrderType } from './orders';
|
5
|
-
import type { PaymentGateway } from './payment_gateways';
|
6
|
-
import type { Version } from './versions';
|
7
|
-
type AdyenPaymentType = 'adyen_payments';
|
8
|
-
type AdyenPaymentRel = ResourceRel & {
|
9
|
-
type: AdyenPaymentType;
|
10
|
-
};
|
11
|
-
type OrderRel = ResourceRel & {
|
12
|
-
type: OrderType;
|
13
|
-
};
|
14
|
-
interface AdyenPayment extends Resource {
|
15
|
-
readonly type: AdyenPaymentType;
|
16
|
-
public_key?: string | null;
|
17
|
-
payment_methods: Record<string, any>;
|
18
|
-
payment_request_data?: Record<string, any> | null;
|
19
|
-
payment_request_details?: Record<string, any> | null;
|
20
|
-
payment_response?: Record<string, any> | null;
|
21
|
-
mismatched_amounts?: boolean | null;
|
22
|
-
payment_instrument?: Record<string, any> | null;
|
23
|
-
order?: Order | null;
|
24
|
-
payment_gateway?: PaymentGateway | null;
|
25
|
-
versions?: Version[] | null;
|
26
|
-
}
|
27
|
-
interface AdyenPaymentCreate extends ResourceCreate {
|
28
|
-
order: OrderRel;
|
29
|
-
}
|
30
|
-
interface AdyenPaymentUpdate extends ResourceUpdate {
|
31
|
-
payment_request_data?: Record<string, any> | null;
|
32
|
-
payment_request_details?: Record<string, any> | null;
|
33
|
-
payment_response?: Record<string, any> | null;
|
34
|
-
_details?: boolean | null;
|
35
|
-
order?: OrderRel | null;
|
36
|
-
}
|
37
|
-
declare class AdyenPayments extends ApiResource<AdyenPayment> {
|
38
|
-
static readonly TYPE: AdyenPaymentType;
|
39
|
-
create(resource: AdyenPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
|
40
|
-
update(resource: AdyenPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
|
41
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
42
|
-
order(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
43
|
-
payment_gateway(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
44
|
-
versions(adyenPaymentId: string | AdyenPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
45
|
-
_details(id: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
|
46
|
-
isAdyenPayment(resource: any): resource is AdyenPayment;
|
47
|
-
relationship(id: string | ResourceId | null): AdyenPaymentRel;
|
48
|
-
type(): AdyenPaymentType;
|
49
|
-
}
|
50
|
-
export default AdyenPayments;
|
51
|
-
export type { AdyenPayment, AdyenPaymentCreate, AdyenPaymentUpdate, AdyenPaymentType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Order,OrderType}from'./orders';import type{PaymentGateway}from'./payment_gateways';import type{Version}from'./versions';type AdyenPaymentType='adyen_payments';type AdyenPaymentRel=ResourceRel&{type:AdyenPaymentType;};type OrderRel=ResourceRel&{type:OrderType;};interface AdyenPayment extends Resource{readonly type:AdyenPaymentType;public_key?:string|null;payment_methods:Record<string,any>;payment_request_data?:Record<string,any>|null;payment_request_details?:Record<string,any>|null;payment_response?:Record<string,any>|null;mismatched_amounts?:boolean|null;payment_instrument?:Record<string,any>|null;order?:Order|null;payment_gateway?:PaymentGateway|null;versions?:Version[]|null;}interface AdyenPaymentCreate extends ResourceCreate{order:OrderRel;}interface AdyenPaymentUpdate extends ResourceUpdate{payment_request_data?:Record<string,any>|null;payment_request_details?:Record<string,any>|null;payment_response?:Record<string,any>|null;_details?:boolean|null;order?:OrderRel|null;}declare class AdyenPayments extends ApiResource<AdyenPayment>{static readonly TYPE:AdyenPaymentType;create(resource:AdyenPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;update(resource:AdyenPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;order(adyenPaymentId:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(adyenPaymentId:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;versions(adyenPaymentId:string|AdyenPayment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;_details(id:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;isAdyenPayment(resource:any):resource is AdyenPayment;relationship(id:string|ResourceId|null):AdyenPaymentRel;type():AdyenPaymentType;}export default AdyenPayments;export type{AdyenPayment,AdyenPaymentCreate,AdyenPaymentUpdate,AdyenPaymentType};
|
@@ -1,38 +1 @@
|
|
1
|
-
import
|
2
|
-
class AdyenPayments extends ApiResource {
|
3
|
-
async create(resource, params, options) {
|
4
|
-
return this.resources.create({ ...resource, type: AdyenPayments.TYPE }, params, options);
|
5
|
-
}
|
6
|
-
async update(resource, params, options) {
|
7
|
-
return this.resources.update({ ...resource, type: AdyenPayments.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async delete(id, options) {
|
10
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: AdyenPayments.TYPE } : id, options);
|
11
|
-
}
|
12
|
-
async order(adyenPaymentId, params, options) {
|
13
|
-
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
14
|
-
return this.resources.fetch({ type: 'orders' }, `adyen_payments/${_adyenPaymentId}/order`, params, options);
|
15
|
-
}
|
16
|
-
async payment_gateway(adyenPaymentId, params, options) {
|
17
|
-
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
18
|
-
return this.resources.fetch({ type: 'payment_gateways' }, `adyen_payments/${_adyenPaymentId}/payment_gateway`, params, options);
|
19
|
-
}
|
20
|
-
async versions(adyenPaymentId, params, options) {
|
21
|
-
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
22
|
-
return this.resources.fetch({ type: 'versions' }, `adyen_payments/${_adyenPaymentId}/versions`, params, options);
|
23
|
-
}
|
24
|
-
async _details(id, params, options) {
|
25
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: AdyenPayments.TYPE, _details: true }, params, options);
|
26
|
-
}
|
27
|
-
isAdyenPayment(resource) {
|
28
|
-
return resource.type && (resource.type === AdyenPayments.TYPE);
|
29
|
-
}
|
30
|
-
relationship(id) {
|
31
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: AdyenPayments.TYPE } : { id: id.id, type: AdyenPayments.TYPE };
|
32
|
-
}
|
33
|
-
type() {
|
34
|
-
return AdyenPayments.TYPE;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
AdyenPayments.TYPE = 'adyen_payments';
|
38
|
-
export default AdyenPayments;
|
1
|
+
import{ApiResource as p}from"../resource";class s extends p{async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:s.TYPE}:e,t)}async order(e,t,r){const a=e.id||e;return this.resources.fetch({type:"orders"},`adyen_payments/${a}/order`,t,r)}async payment_gateway(e,t,r){const a=e.id||e;return this.resources.fetch({type:"payment_gateways"},`adyen_payments/${a}/payment_gateway`,t,r)}async versions(e,t,r){const a=e.id||e;return this.resources.fetch({type:"versions"},`adyen_payments/${a}/versions`,t,r)}async _details(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:s.TYPE,_details:!0},t,r)}isAdyenPayment(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="adyen_payments";export default s;
|
@@ -1,22 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { Resource, ResourceId, ResourceRel } from '../resource';
|
3
|
-
type ApplicationType = 'application';
|
4
|
-
type ApplicationRel = ResourceRel & {
|
5
|
-
type: ApplicationType;
|
6
|
-
};
|
7
|
-
interface Application extends Resource {
|
8
|
-
readonly type: ApplicationType;
|
9
|
-
name?: string | null;
|
10
|
-
kind?: string | null;
|
11
|
-
public_access?: boolean | null;
|
12
|
-
redirect_uri?: string | null;
|
13
|
-
scopes?: string | null;
|
14
|
-
}
|
15
|
-
declare class Applications extends ApiSingleton<Application> {
|
16
|
-
static readonly TYPE: ApplicationType;
|
17
|
-
isApplication(resource: any): resource is Application;
|
18
|
-
relationship(id: string | ResourceId | null): ApplicationRel;
|
19
|
-
type(): ApplicationType;
|
20
|
-
}
|
21
|
-
export default Applications;
|
22
|
-
export type { Application, ApplicationType };
|
1
|
+
import{ApiSingleton}from'../resource';import type{Resource,ResourceId,ResourceRel}from'../resource';type ApplicationType='application';type ApplicationRel=ResourceRel&{type:ApplicationType;};interface Application extends Resource{readonly type:ApplicationType;name?:string|null;kind?:string|null;public_access?:boolean|null;redirect_uri?:string|null;scopes?:string|null;}declare class Applications extends ApiSingleton<Application>{static readonly TYPE:ApplicationType;isApplication(resource:any):resource is Application;relationship(id:string|ResourceId|null):ApplicationRel;type():ApplicationType;}export default Applications;export type{Application,ApplicationType};
|
@@ -1,14 +1 @@
|
|
1
|
-
import
|
2
|
-
class Applications extends ApiSingleton {
|
3
|
-
isApplication(resource) {
|
4
|
-
return resource.type && (resource.type === Applications.TYPE);
|
5
|
-
}
|
6
|
-
relationship(id) {
|
7
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: Applications.TYPE } : { id: id.id, type: Applications.TYPE };
|
8
|
-
}
|
9
|
-
type() {
|
10
|
-
return Applications.TYPE;
|
11
|
-
}
|
12
|
-
}
|
13
|
-
Applications.TYPE = 'application';
|
14
|
-
export default Applications;
|
1
|
+
import{ApiSingleton as r}from"../resource";class e extends r{isApplication(t){return t.type&&t.type===e.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:e.TYPE}:{id:t.id,type:e.TYPE}}type(){return e.TYPE}}e.TYPE="application";export default e;
|
@@ -1,157 +1 @@
|
|
1
|
-
import {
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve } from '../query';
|
4
|
-
import type { Bundle, BundleType } from './bundles';
|
5
|
-
import type { CarrierAccount, CarrierAccountType } from './carrier_accounts';
|
6
|
-
import type { CustomerGroup, CustomerGroupType } from './customer_groups';
|
7
|
-
import type { Customer, CustomerType } from './customers';
|
8
|
-
import type { DeliveryLeadTime, DeliveryLeadTimeType } from './delivery_lead_times';
|
9
|
-
import type { Geocoder, GeocoderType } from './geocoders';
|
10
|
-
import type { GiftCardRecipient, GiftCardRecipientType } from './gift_card_recipients';
|
11
|
-
import type { GiftCard, GiftCardType } from './gift_cards';
|
12
|
-
import type { InventoryModel, InventoryModelType } from './inventory_models';
|
13
|
-
import type { Market, MarketType } from './markets';
|
14
|
-
import type { Merchant, MerchantType } from './merchants';
|
15
|
-
import type { BillingInfoValidationRule, BillingInfoValidationRuleType } from './billing_info_validation_rules';
|
16
|
-
import type { Order, OrderType } from './orders';
|
17
|
-
import type { Package, PackageType } from './packages';
|
18
|
-
import type { Parcel, ParcelType } from './parcels';
|
19
|
-
import type { PaymentMethod, PaymentMethodType } from './payment_methods';
|
20
|
-
import type { PriceList, PriceListType } from './price_lists';
|
21
|
-
import type { Price, PriceType } from './prices';
|
22
|
-
import type { Promotion, PromotionType } from './promotions';
|
23
|
-
import type { Return, ReturnType } from './returns';
|
24
|
-
import type { Shipment, ShipmentType } from './shipments';
|
25
|
-
import type { ShippingCategory, ShippingCategoryType } from './shipping_categories';
|
26
|
-
import type { ShippingMethod, ShippingMethodType } from './shipping_methods';
|
27
|
-
import type { ShippingZone, ShippingZoneType } from './shipping_zones';
|
28
|
-
import type { SkuOption, SkuOptionType } from './sku_options';
|
29
|
-
import type { Sku, SkuType } from './skus';
|
30
|
-
import type { StockItem, StockItemType } from './stock_items';
|
31
|
-
import type { StockLocation, StockLocationType } from './stock_locations';
|
32
|
-
import type { TaxCalculator, TaxCalculatorType } from './tax_calculators';
|
33
|
-
import type { TaxCategory, TaxCategoryType } from './tax_categories';
|
34
|
-
type AttachmentType = 'attachments';
|
35
|
-
type AttachmentRel = ResourceRel & {
|
36
|
-
type: AttachmentType;
|
37
|
-
};
|
38
|
-
type BundleRel = ResourceRel & {
|
39
|
-
type: BundleType;
|
40
|
-
};
|
41
|
-
type CarrierAccountRel = ResourceRel & {
|
42
|
-
type: CarrierAccountType;
|
43
|
-
};
|
44
|
-
type CustomerGroupRel = ResourceRel & {
|
45
|
-
type: CustomerGroupType;
|
46
|
-
};
|
47
|
-
type CustomerRel = ResourceRel & {
|
48
|
-
type: CustomerType;
|
49
|
-
};
|
50
|
-
type DeliveryLeadTimeRel = ResourceRel & {
|
51
|
-
type: DeliveryLeadTimeType;
|
52
|
-
};
|
53
|
-
type GeocoderRel = ResourceRel & {
|
54
|
-
type: GeocoderType;
|
55
|
-
};
|
56
|
-
type GiftCardRecipientRel = ResourceRel & {
|
57
|
-
type: GiftCardRecipientType;
|
58
|
-
};
|
59
|
-
type GiftCardRel = ResourceRel & {
|
60
|
-
type: GiftCardType;
|
61
|
-
};
|
62
|
-
type InventoryModelRel = ResourceRel & {
|
63
|
-
type: InventoryModelType;
|
64
|
-
};
|
65
|
-
type MarketRel = ResourceRel & {
|
66
|
-
type: MarketType;
|
67
|
-
};
|
68
|
-
type MerchantRel = ResourceRel & {
|
69
|
-
type: MerchantType;
|
70
|
-
};
|
71
|
-
type BillingInfoValidationRuleRel = ResourceRel & {
|
72
|
-
type: BillingInfoValidationRuleType;
|
73
|
-
};
|
74
|
-
type OrderRel = ResourceRel & {
|
75
|
-
type: OrderType;
|
76
|
-
};
|
77
|
-
type PackageRel = ResourceRel & {
|
78
|
-
type: PackageType;
|
79
|
-
};
|
80
|
-
type ParcelRel = ResourceRel & {
|
81
|
-
type: ParcelType;
|
82
|
-
};
|
83
|
-
type PaymentMethodRel = ResourceRel & {
|
84
|
-
type: PaymentMethodType;
|
85
|
-
};
|
86
|
-
type PriceListRel = ResourceRel & {
|
87
|
-
type: PriceListType;
|
88
|
-
};
|
89
|
-
type PriceRel = ResourceRel & {
|
90
|
-
type: PriceType;
|
91
|
-
};
|
92
|
-
type PromotionRel = ResourceRel & {
|
93
|
-
type: PromotionType;
|
94
|
-
};
|
95
|
-
type ReturnRel = ResourceRel & {
|
96
|
-
type: ReturnType;
|
97
|
-
};
|
98
|
-
type ShipmentRel = ResourceRel & {
|
99
|
-
type: ShipmentType;
|
100
|
-
};
|
101
|
-
type ShippingCategoryRel = ResourceRel & {
|
102
|
-
type: ShippingCategoryType;
|
103
|
-
};
|
104
|
-
type ShippingMethodRel = ResourceRel & {
|
105
|
-
type: ShippingMethodType;
|
106
|
-
};
|
107
|
-
type ShippingZoneRel = ResourceRel & {
|
108
|
-
type: ShippingZoneType;
|
109
|
-
};
|
110
|
-
type SkuOptionRel = ResourceRel & {
|
111
|
-
type: SkuOptionType;
|
112
|
-
};
|
113
|
-
type SkuRel = ResourceRel & {
|
114
|
-
type: SkuType;
|
115
|
-
};
|
116
|
-
type StockItemRel = ResourceRel & {
|
117
|
-
type: StockItemType;
|
118
|
-
};
|
119
|
-
type StockLocationRel = ResourceRel & {
|
120
|
-
type: StockLocationType;
|
121
|
-
};
|
122
|
-
type TaxCalculatorRel = ResourceRel & {
|
123
|
-
type: TaxCalculatorType;
|
124
|
-
};
|
125
|
-
type TaxCategoryRel = ResourceRel & {
|
126
|
-
type: TaxCategoryType;
|
127
|
-
};
|
128
|
-
interface Attachment extends Resource {
|
129
|
-
readonly type: AttachmentType;
|
130
|
-
name: string;
|
131
|
-
description?: string | null;
|
132
|
-
url?: string | null;
|
133
|
-
attachable?: Bundle | CarrierAccount | CustomerGroup | Customer | DeliveryLeadTime | Geocoder | GiftCardRecipient | GiftCard | InventoryModel | Market | Merchant | BillingInfoValidationRule | Order | Package | Parcel | PaymentMethod | PriceList | Price | Promotion | Return | Shipment | ShippingCategory | ShippingMethod | ShippingZone | SkuOption | Sku | StockItem | StockLocation | TaxCalculator | TaxCategory | null;
|
134
|
-
}
|
135
|
-
interface AttachmentCreate extends ResourceCreate {
|
136
|
-
name: string;
|
137
|
-
description?: string | null;
|
138
|
-
url?: string | null;
|
139
|
-
attachable: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel;
|
140
|
-
}
|
141
|
-
interface AttachmentUpdate extends ResourceUpdate {
|
142
|
-
name?: string | null;
|
143
|
-
description?: string | null;
|
144
|
-
url?: string | null;
|
145
|
-
attachable?: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel | null;
|
146
|
-
}
|
147
|
-
declare class Attachments extends ApiResource<Attachment> {
|
148
|
-
static readonly TYPE: AttachmentType;
|
149
|
-
create(resource: AttachmentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Attachment>;
|
150
|
-
update(resource: AttachmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Attachment>;
|
151
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
152
|
-
isAttachment(resource: any): resource is Attachment;
|
153
|
-
relationship(id: string | ResourceId | null): AttachmentRel;
|
154
|
-
type(): AttachmentType;
|
155
|
-
}
|
156
|
-
export default Attachments;
|
157
|
-
export type { Attachment, AttachmentCreate, AttachmentUpdate, AttachmentType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';import type{Bundle,BundleType}from'./bundles';import type{CarrierAccount,CarrierAccountType}from'./carrier_accounts';import type{CustomerGroup,CustomerGroupType}from'./customer_groups';import type{Customer,CustomerType}from'./customers';import type{DeliveryLeadTime,DeliveryLeadTimeType}from'./delivery_lead_times';import type{Geocoder,GeocoderType}from'./geocoders';import type{GiftCardRecipient,GiftCardRecipientType}from'./gift_card_recipients';import type{GiftCard,GiftCardType}from'./gift_cards';import type{InventoryModel,InventoryModelType}from'./inventory_models';import type{Market,MarketType}from'./markets';import type{Merchant,MerchantType}from'./merchants';import type{BillingInfoValidationRule,BillingInfoValidationRuleType}from'./billing_info_validation_rules';import type{Order,OrderType}from'./orders';import type{Package,PackageType}from'./packages';import type{Parcel,ParcelType}from'./parcels';import type{PaymentMethod,PaymentMethodType}from'./payment_methods';import type{PriceList,PriceListType}from'./price_lists';import type{Price,PriceType}from'./prices';import type{Promotion,PromotionType}from'./promotions';import type{Return,ReturnType}from'./returns';import type{Shipment,ShipmentType}from'./shipments';import type{ShippingCategory,ShippingCategoryType}from'./shipping_categories';import type{ShippingMethod,ShippingMethodType}from'./shipping_methods';import type{ShippingZone,ShippingZoneType}from'./shipping_zones';import type{SkuOption,SkuOptionType}from'./sku_options';import type{Sku,SkuType}from'./skus';import type{StockItem,StockItemType}from'./stock_items';import type{StockLocation,StockLocationType}from'./stock_locations';import type{TaxCalculator,TaxCalculatorType}from'./tax_calculators';import type{TaxCategory,TaxCategoryType}from'./tax_categories';type AttachmentType='attachments';type AttachmentRel=ResourceRel&{type:AttachmentType;};type BundleRel=ResourceRel&{type:BundleType;};type CarrierAccountRel=ResourceRel&{type:CarrierAccountType;};type CustomerGroupRel=ResourceRel&{type:CustomerGroupType;};type CustomerRel=ResourceRel&{type:CustomerType;};type DeliveryLeadTimeRel=ResourceRel&{type:DeliveryLeadTimeType;};type GeocoderRel=ResourceRel&{type:GeocoderType;};type GiftCardRecipientRel=ResourceRel&{type:GiftCardRecipientType;};type GiftCardRel=ResourceRel&{type:GiftCardType;};type InventoryModelRel=ResourceRel&{type:InventoryModelType;};type MarketRel=ResourceRel&{type:MarketType;};type MerchantRel=ResourceRel&{type:MerchantType;};type BillingInfoValidationRuleRel=ResourceRel&{type:BillingInfoValidationRuleType;};type OrderRel=ResourceRel&{type:OrderType;};type PackageRel=ResourceRel&{type:PackageType;};type ParcelRel=ResourceRel&{type:ParcelType;};type PaymentMethodRel=ResourceRel&{type:PaymentMethodType;};type PriceListRel=ResourceRel&{type:PriceListType;};type PriceRel=ResourceRel&{type:PriceType;};type PromotionRel=ResourceRel&{type:PromotionType;};type ReturnRel=ResourceRel&{type:ReturnType;};type ShipmentRel=ResourceRel&{type:ShipmentType;};type ShippingCategoryRel=ResourceRel&{type:ShippingCategoryType;};type ShippingMethodRel=ResourceRel&{type:ShippingMethodType;};type ShippingZoneRel=ResourceRel&{type:ShippingZoneType;};type SkuOptionRel=ResourceRel&{type:SkuOptionType;};type SkuRel=ResourceRel&{type:SkuType;};type StockItemRel=ResourceRel&{type:StockItemType;};type StockLocationRel=ResourceRel&{type:StockLocationType;};type TaxCalculatorRel=ResourceRel&{type:TaxCalculatorType;};type TaxCategoryRel=ResourceRel&{type:TaxCategoryType;};interface Attachment extends Resource{readonly type:AttachmentType;name:string;description?:string|null;url?:string|null;attachable?:Bundle|CarrierAccount|CustomerGroup|Customer|DeliveryLeadTime|Geocoder|GiftCardRecipient|GiftCard|InventoryModel|Market|Merchant|BillingInfoValidationRule|Order|Package|Parcel|PaymentMethod|PriceList|Price|Promotion|Return|Shipment|ShippingCategory|ShippingMethod|ShippingZone|SkuOption|Sku|StockItem|StockLocation|TaxCalculator|TaxCategory|null;}interface AttachmentCreate extends ResourceCreate{name:string;description?:string|null;url?:string|null;attachable:BundleRel|CarrierAccountRel|CustomerGroupRel|CustomerRel|DeliveryLeadTimeRel|GeocoderRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|MarketRel|MerchantRel|BillingInfoValidationRuleRel|OrderRel|PackageRel|ParcelRel|PaymentMethodRel|PriceListRel|PriceRel|PromotionRel|ReturnRel|ShipmentRel|ShippingCategoryRel|ShippingMethodRel|ShippingZoneRel|SkuOptionRel|SkuRel|StockItemRel|StockLocationRel|TaxCalculatorRel|TaxCategoryRel;}interface AttachmentUpdate extends ResourceUpdate{name?:string|null;description?:string|null;url?:string|null;attachable?:BundleRel|CarrierAccountRel|CustomerGroupRel|CustomerRel|DeliveryLeadTimeRel|GeocoderRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|MarketRel|MerchantRel|BillingInfoValidationRuleRel|OrderRel|PackageRel|ParcelRel|PaymentMethodRel|PriceListRel|PriceRel|PromotionRel|ReturnRel|ShipmentRel|ShippingCategoryRel|ShippingMethodRel|ShippingZoneRel|SkuOptionRel|SkuRel|StockItemRel|StockLocationRel|TaxCalculatorRel|TaxCategoryRel|null;}declare class Attachments extends ApiResource<Attachment>{static readonly TYPE:AttachmentType;create(resource:AttachmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;update(resource:AttachmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;isAttachment(resource:any):resource is Attachment;relationship(id:string|ResourceId|null):AttachmentRel;type():AttachmentType;}export default Attachments;export type{Attachment,AttachmentCreate,AttachmentUpdate,AttachmentType};
|
@@ -1,23 +1 @@
|
|
1
|
-
import
|
2
|
-
class Attachments extends ApiResource {
|
3
|
-
async create(resource, params, options) {
|
4
|
-
return this.resources.create({ ...resource, type: Attachments.TYPE }, params, options);
|
5
|
-
}
|
6
|
-
async update(resource, params, options) {
|
7
|
-
return this.resources.update({ ...resource, type: Attachments.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async delete(id, options) {
|
10
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: Attachments.TYPE } : id, options);
|
11
|
-
}
|
12
|
-
isAttachment(resource) {
|
13
|
-
return resource.type && (resource.type === Attachments.TYPE);
|
14
|
-
}
|
15
|
-
relationship(id) {
|
16
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: Attachments.TYPE } : { id: id.id, type: Attachments.TYPE };
|
17
|
-
}
|
18
|
-
type() {
|
19
|
-
return Attachments.TYPE;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
Attachments.TYPE = 'attachments';
|
23
|
-
export default Attachments;
|
1
|
+
import{ApiResource as s}from"../resource";class r extends s{async create(e,t,p){return this.resources.create({...e,type:r.TYPE},t,p)}async update(e,t,p){return this.resources.update({...e,type:r.TYPE},t,p)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:r.TYPE}:e,t)}isAttachment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="attachments";export default r;
|
@@ -1,70 +1 @@
|
|
1
|
-
import {
|
2
|
-
import type { Resource, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { Order } from './orders';
|
5
|
-
import type { Attachment } from './attachments';
|
6
|
-
import type { Event } from './events';
|
7
|
-
import type { Version } from './versions';
|
8
|
-
import type { Capture } from './captures';
|
9
|
-
import type { Void } from './voids';
|
10
|
-
type AuthorizationType = 'authorizations';
|
11
|
-
type AuthorizationRel = ResourceRel & {
|
12
|
-
type: AuthorizationType;
|
13
|
-
};
|
14
|
-
interface Authorization extends Resource {
|
15
|
-
readonly type: AuthorizationType;
|
16
|
-
number: string;
|
17
|
-
currency_code: string;
|
18
|
-
amount_cents: number;
|
19
|
-
amount_float: number;
|
20
|
-
formatted_amount: string;
|
21
|
-
succeeded: boolean;
|
22
|
-
message?: string | null;
|
23
|
-
error_code?: string | null;
|
24
|
-
error_detail?: string | null;
|
25
|
-
token?: string | null;
|
26
|
-
gateway_transaction_id?: string | null;
|
27
|
-
cvv_code?: string | null;
|
28
|
-
cvv_message?: string | null;
|
29
|
-
avs_code?: string | null;
|
30
|
-
avs_message?: string | null;
|
31
|
-
fraud_review?: string | null;
|
32
|
-
capture_amount_cents?: number | null;
|
33
|
-
capture_amount_float?: number | null;
|
34
|
-
formatted_capture_amount?: string | null;
|
35
|
-
capture_balance_cents?: number | null;
|
36
|
-
capture_balance_float?: number | null;
|
37
|
-
formatted_capture_balance?: string | null;
|
38
|
-
void_balance_cents?: number | null;
|
39
|
-
void_balance_float?: number | null;
|
40
|
-
formatted_void_balance?: string | null;
|
41
|
-
order?: Order | null;
|
42
|
-
attachments?: Attachment[] | null;
|
43
|
-
events?: Event[] | null;
|
44
|
-
versions?: Version[] | null;
|
45
|
-
captures?: Capture[] | null;
|
46
|
-
voids?: Void[] | null;
|
47
|
-
}
|
48
|
-
interface AuthorizationUpdate extends ResourceUpdate {
|
49
|
-
_capture?: boolean | null;
|
50
|
-
_capture_amount_cents?: number | null;
|
51
|
-
_void?: boolean | null;
|
52
|
-
}
|
53
|
-
declare class Authorizations extends ApiResource<Authorization> {
|
54
|
-
static readonly TYPE: AuthorizationType;
|
55
|
-
update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
56
|
-
order(authorizationId: string | Authorization, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
57
|
-
attachments(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
58
|
-
events(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
59
|
-
versions(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
60
|
-
captures(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
|
61
|
-
voids(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
|
62
|
-
_capture(id: string | Authorization, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
63
|
-
_capture_amount_cents(id: string | Authorization, triggerValue: number, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
64
|
-
_void(id: string | Authorization, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
65
|
-
isAuthorization(resource: any): resource is Authorization;
|
66
|
-
relationship(id: string | ResourceId | null): AuthorizationRel;
|
67
|
-
type(): AuthorizationType;
|
68
|
-
}
|
69
|
-
export default Authorizations;
|
70
|
-
export type { Authorization, AuthorizationUpdate, AuthorizationType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Order}from'./orders';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Version}from'./versions';import type{Capture}from'./captures';import type{Void}from'./voids';type AuthorizationType='authorizations';type AuthorizationRel=ResourceRel&{type:AuthorizationType;};interface Authorization extends Resource{readonly type:AuthorizationType;number:string;currency_code:string;amount_cents:number;amount_float:number;formatted_amount:string;succeeded:boolean;message?:string|null;error_code?:string|null;error_detail?:string|null;token?:string|null;gateway_transaction_id?:string|null;cvv_code?:string|null;cvv_message?:string|null;avs_code?:string|null;avs_message?:string|null;fraud_review?:string|null;capture_amount_cents?:number|null;capture_amount_float?:number|null;formatted_capture_amount?:string|null;capture_balance_cents?:number|null;capture_balance_float?:number|null;formatted_capture_balance?:string|null;void_balance_cents?:number|null;void_balance_float?:number|null;formatted_void_balance?:string|null;order?:Order|null;attachments?:Attachment[]|null;events?:Event[]|null;versions?:Version[]|null;captures?:Capture[]|null;voids?:Void[]|null;}interface AuthorizationUpdate extends ResourceUpdate{_capture?:boolean|null;_capture_amount_cents?:number|null;_void?:boolean|null;}declare class Authorizations extends ApiResource<Authorization>{static readonly TYPE:AuthorizationType;update(resource:AuthorizationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;order(authorizationId:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;attachments(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;versions(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;captures(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;voids(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;_capture(id:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;_capture_amount_cents(id:string|Authorization,triggerValue:number,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;_void(id:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;isAuthorization(resource:any):resource is Authorization;relationship(id:string|ResourceId|null):AuthorizationRel;type():AuthorizationType;}export default Authorizations;export type{Authorization,AuthorizationUpdate,AuthorizationType};
|
@@ -1,50 +1 @@
|
|
1
|
-
import
|
2
|
-
class Authorizations extends ApiResource {
|
3
|
-
async update(resource, params, options) {
|
4
|
-
return this.resources.update({ ...resource, type: Authorizations.TYPE }, params, options);
|
5
|
-
}
|
6
|
-
async order(authorizationId, params, options) {
|
7
|
-
const _authorizationId = authorizationId.id || authorizationId;
|
8
|
-
return this.resources.fetch({ type: 'orders' }, `authorizations/${_authorizationId}/order`, params, options);
|
9
|
-
}
|
10
|
-
async attachments(authorizationId, params, options) {
|
11
|
-
const _authorizationId = authorizationId.id || authorizationId;
|
12
|
-
return this.resources.fetch({ type: 'attachments' }, `authorizations/${_authorizationId}/attachments`, params, options);
|
13
|
-
}
|
14
|
-
async events(authorizationId, params, options) {
|
15
|
-
const _authorizationId = authorizationId.id || authorizationId;
|
16
|
-
return this.resources.fetch({ type: 'events' }, `authorizations/${_authorizationId}/events`, params, options);
|
17
|
-
}
|
18
|
-
async versions(authorizationId, params, options) {
|
19
|
-
const _authorizationId = authorizationId.id || authorizationId;
|
20
|
-
return this.resources.fetch({ type: 'versions' }, `authorizations/${_authorizationId}/versions`, params, options);
|
21
|
-
}
|
22
|
-
async captures(authorizationId, params, options) {
|
23
|
-
const _authorizationId = authorizationId.id || authorizationId;
|
24
|
-
return this.resources.fetch({ type: 'captures' }, `authorizations/${_authorizationId}/captures`, params, options);
|
25
|
-
}
|
26
|
-
async voids(authorizationId, params, options) {
|
27
|
-
const _authorizationId = authorizationId.id || authorizationId;
|
28
|
-
return this.resources.fetch({ type: 'voids' }, `authorizations/${_authorizationId}/voids`, params, options);
|
29
|
-
}
|
30
|
-
async _capture(id, params, options) {
|
31
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Authorizations.TYPE, _capture: true }, params, options);
|
32
|
-
}
|
33
|
-
async _capture_amount_cents(id, triggerValue, params, options) {
|
34
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Authorizations.TYPE, _capture_amount_cents: triggerValue }, params, options);
|
35
|
-
}
|
36
|
-
async _void(id, params, options) {
|
37
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Authorizations.TYPE, _void: true }, params, options);
|
38
|
-
}
|
39
|
-
isAuthorization(resource) {
|
40
|
-
return resource.type && (resource.type === Authorizations.TYPE);
|
41
|
-
}
|
42
|
-
relationship(id) {
|
43
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: Authorizations.TYPE } : { id: id.id, type: Authorizations.TYPE };
|
44
|
-
}
|
45
|
-
type() {
|
46
|
-
return Authorizations.TYPE;
|
47
|
-
}
|
48
|
-
}
|
49
|
-
Authorizations.TYPE = 'authorizations';
|
50
|
-
export default Authorizations;
|
1
|
+
import{ApiResource as c}from"../resource";class n extends c{async update(t,e,s){return this.resources.update({...t,type:n.TYPE},e,s)}async order(t,e,s){const r=t.id||t;return this.resources.fetch({type:"orders"},`authorizations/${r}/order`,e,s)}async attachments(t,e,s){const r=t.id||t;return this.resources.fetch({type:"attachments"},`authorizations/${r}/attachments`,e,s)}async events(t,e,s){const r=t.id||t;return this.resources.fetch({type:"events"},`authorizations/${r}/events`,e,s)}async versions(t,e,s){const r=t.id||t;return this.resources.fetch({type:"versions"},`authorizations/${r}/versions`,e,s)}async captures(t,e,s){const r=t.id||t;return this.resources.fetch({type:"captures"},`authorizations/${r}/captures`,e,s)}async voids(t,e,s){const r=t.id||t;return this.resources.fetch({type:"voids"},`authorizations/${r}/voids`,e,s)}async _capture(t,e,s){return this.resources.update({id:typeof t=="string"?t:t.id,type:n.TYPE,_capture:!0},e,s)}async _capture_amount_cents(t,e,s,r){return this.resources.update({id:typeof t=="string"?t:t.id,type:n.TYPE,_capture_amount_cents:e},s,r)}async _void(t,e,s){return this.resources.update({id:typeof t=="string"?t:t.id,type:n.TYPE,_void:!0},e,s)}isAuthorization(t){return t.type&&t.type===n.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:n.TYPE}:{id:t.id,type:n.TYPE}}type(){return n.TYPE}}n.TYPE="authorizations";export default n;
|
@@ -1,59 +1 @@
|
|
1
|
-
import {
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { Market } from './markets';
|
5
|
-
import type { Attachment } from './attachments';
|
6
|
-
import type { Version } from './versions';
|
7
|
-
import type { TaxCategory, TaxCategoryType } from './tax_categories';
|
8
|
-
type AvalaraAccountType = 'avalara_accounts';
|
9
|
-
type AvalaraAccountRel = ResourceRel & {
|
10
|
-
type: AvalaraAccountType;
|
11
|
-
};
|
12
|
-
type TaxCategoryRel = ResourceRel & {
|
13
|
-
type: TaxCategoryType;
|
14
|
-
};
|
15
|
-
interface AvalaraAccount extends Resource {
|
16
|
-
readonly type: AvalaraAccountType;
|
17
|
-
name: string;
|
18
|
-
username: string;
|
19
|
-
company_code: string;
|
20
|
-
commit_invoice?: boolean | null;
|
21
|
-
ddp?: boolean | null;
|
22
|
-
markets?: Market[] | null;
|
23
|
-
attachments?: Attachment[] | null;
|
24
|
-
versions?: Version[] | null;
|
25
|
-
tax_categories?: TaxCategory[] | null;
|
26
|
-
}
|
27
|
-
interface AvalaraAccountCreate extends ResourceCreate {
|
28
|
-
name: string;
|
29
|
-
username: string;
|
30
|
-
password: string;
|
31
|
-
company_code: string;
|
32
|
-
commit_invoice?: boolean | null;
|
33
|
-
ddp?: boolean | null;
|
34
|
-
tax_categories?: TaxCategoryRel[] | null;
|
35
|
-
}
|
36
|
-
interface AvalaraAccountUpdate extends ResourceUpdate {
|
37
|
-
name?: string | null;
|
38
|
-
username?: string | null;
|
39
|
-
password?: string | null;
|
40
|
-
company_code?: string | null;
|
41
|
-
commit_invoice?: boolean | null;
|
42
|
-
ddp?: boolean | null;
|
43
|
-
tax_categories?: TaxCategoryRel[] | null;
|
44
|
-
}
|
45
|
-
declare class AvalaraAccounts extends ApiResource<AvalaraAccount> {
|
46
|
-
static readonly TYPE: AvalaraAccountType;
|
47
|
-
create(resource: AvalaraAccountCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
|
48
|
-
update(resource: AvalaraAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
|
49
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
50
|
-
markets(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
51
|
-
attachments(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
52
|
-
versions(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
53
|
-
tax_categories(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
54
|
-
isAvalaraAccount(resource: any): resource is AvalaraAccount;
|
55
|
-
relationship(id: string | ResourceId | null): AvalaraAccountRel;
|
56
|
-
type(): AvalaraAccountType;
|
57
|
-
}
|
58
|
-
export default AvalaraAccounts;
|
59
|
-
export type { AvalaraAccount, AvalaraAccountCreate, AvalaraAccountUpdate, AvalaraAccountType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market}from'./markets';import type{Attachment}from'./attachments';import type{Version}from'./versions';import type{TaxCategory,TaxCategoryType}from'./tax_categories';type AvalaraAccountType='avalara_accounts';type AvalaraAccountRel=ResourceRel&{type:AvalaraAccountType;};type TaxCategoryRel=ResourceRel&{type:TaxCategoryType;};interface AvalaraAccount extends Resource{readonly type:AvalaraAccountType;name:string;username:string;company_code:string;commit_invoice?:boolean|null;ddp?:boolean|null;markets?:Market[]|null;attachments?:Attachment[]|null;versions?:Version[]|null;tax_categories?:TaxCategory[]|null;}interface AvalaraAccountCreate extends ResourceCreate{name:string;username:string;password:string;company_code:string;commit_invoice?:boolean|null;ddp?:boolean|null;tax_categories?:TaxCategoryRel[]|null;}interface AvalaraAccountUpdate extends ResourceUpdate{name?:string|null;username?:string|null;password?:string|null;company_code?:string|null;commit_invoice?:boolean|null;ddp?:boolean|null;tax_categories?:TaxCategoryRel[]|null;}declare class AvalaraAccounts extends ApiResource<AvalaraAccount>{static readonly TYPE:AvalaraAccountType;create(resource:AvalaraAccountCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;update(resource:AvalaraAccountUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;markets(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;tax_categories(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;isAvalaraAccount(resource:any):resource is AvalaraAccount;relationship(id:string|ResourceId|null):AvalaraAccountRel;type():AvalaraAccountType;}export default AvalaraAccounts;export type{AvalaraAccount,AvalaraAccountCreate,AvalaraAccountUpdate,AvalaraAccountType};
|
@@ -1,39 +1 @@
|
|
1
|
-
import
|
2
|
-
class AvalaraAccounts extends ApiResource {
|
3
|
-
async create(resource, params, options) {
|
4
|
-
return this.resources.create({ ...resource, type: AvalaraAccounts.TYPE }, params, options);
|
5
|
-
}
|
6
|
-
async update(resource, params, options) {
|
7
|
-
return this.resources.update({ ...resource, type: AvalaraAccounts.TYPE }, params, options);
|
8
|
-
}
|
9
|
-
async delete(id, options) {
|
10
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: AvalaraAccounts.TYPE } : id, options);
|
11
|
-
}
|
12
|
-
async markets(avalaraAccountId, params, options) {
|
13
|
-
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
14
|
-
return this.resources.fetch({ type: 'markets' }, `avalara_accounts/${_avalaraAccountId}/markets`, params, options);
|
15
|
-
}
|
16
|
-
async attachments(avalaraAccountId, params, options) {
|
17
|
-
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
18
|
-
return this.resources.fetch({ type: 'attachments' }, `avalara_accounts/${_avalaraAccountId}/attachments`, params, options);
|
19
|
-
}
|
20
|
-
async versions(avalaraAccountId, params, options) {
|
21
|
-
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
22
|
-
return this.resources.fetch({ type: 'versions' }, `avalara_accounts/${_avalaraAccountId}/versions`, params, options);
|
23
|
-
}
|
24
|
-
async tax_categories(avalaraAccountId, params, options) {
|
25
|
-
const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
|
26
|
-
return this.resources.fetch({ type: 'tax_categories' }, `avalara_accounts/${_avalaraAccountId}/tax_categories`, params, options);
|
27
|
-
}
|
28
|
-
isAvalaraAccount(resource) {
|
29
|
-
return resource.type && (resource.type === AvalaraAccounts.TYPE);
|
30
|
-
}
|
31
|
-
relationship(id) {
|
32
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: AvalaraAccounts.TYPE } : { id: id.id, type: AvalaraAccounts.TYPE };
|
33
|
-
}
|
34
|
-
type() {
|
35
|
-
return AvalaraAccounts.TYPE;
|
36
|
-
}
|
37
|
-
}
|
38
|
-
AvalaraAccounts.TYPE = 'avalara_accounts';
|
39
|
-
export default AvalaraAccounts;
|
1
|
+
import{ApiResource as c}from"../resource";class r extends c{async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:r.TYPE}:e,t)}async markets(e,t,s){const a=e.id||e;return this.resources.fetch({type:"markets"},`avalara_accounts/${a}/markets`,t,s)}async attachments(e,t,s){const a=e.id||e;return this.resources.fetch({type:"attachments"},`avalara_accounts/${a}/attachments`,t,s)}async versions(e,t,s){const a=e.id||e;return this.resources.fetch({type:"versions"},`avalara_accounts/${a}/versions`,t,s)}async tax_categories(e,t,s){const a=e.id||e;return this.resources.fetch({type:"tax_categories"},`avalara_accounts/${a}/tax_categories`,t,s)}isAvalaraAccount(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="avalara_accounts";export default r;
|
@@ -1,48 +1 @@
|
|
1
|
-
import {
|
2
|
-
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
|
-
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
|
-
import type { PaymentMethod } from './payment_methods';
|
5
|
-
import type { Version } from './versions';
|
6
|
-
import type { AxervePayment, AxervePaymentType } from './axerve_payments';
|
7
|
-
type AxerveGatewayType = 'axerve_gateways';
|
8
|
-
type AxerveGatewayRel = ResourceRel & {
|
9
|
-
type: AxerveGatewayType;
|
10
|
-
};
|
11
|
-
type AxervePaymentRel = ResourceRel & {
|
12
|
-
type: AxervePaymentType;
|
13
|
-
};
|
14
|
-
interface AxerveGateway extends Resource {
|
15
|
-
readonly type: AxerveGatewayType;
|
16
|
-
name: string;
|
17
|
-
login: string;
|
18
|
-
webhook_endpoint_url?: string | null;
|
19
|
-
payment_methods?: PaymentMethod[] | null;
|
20
|
-
versions?: Version[] | null;
|
21
|
-
axerve_payments?: AxervePayment[] | null;
|
22
|
-
}
|
23
|
-
interface AxerveGatewayCreate extends ResourceCreate {
|
24
|
-
name: string;
|
25
|
-
login: string;
|
26
|
-
api_key: string;
|
27
|
-
axerve_payments?: AxervePaymentRel[] | null;
|
28
|
-
}
|
29
|
-
interface AxerveGatewayUpdate extends ResourceUpdate {
|
30
|
-
name?: string | null;
|
31
|
-
login?: string | null;
|
32
|
-
api_key?: string | null;
|
33
|
-
axerve_payments?: AxervePaymentRel[] | null;
|
34
|
-
}
|
35
|
-
declare class AxerveGateways extends ApiResource<AxerveGateway> {
|
36
|
-
static readonly TYPE: AxerveGatewayType;
|
37
|
-
create(resource: AxerveGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxerveGateway>;
|
38
|
-
update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxerveGateway>;
|
39
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
40
|
-
payment_methods(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
41
|
-
versions(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
42
|
-
axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>>;
|
43
|
-
isAxerveGateway(resource: any): resource is AxerveGateway;
|
44
|
-
relationship(id: string | ResourceId | null): AxerveGatewayRel;
|
45
|
-
type(): AxerveGatewayType;
|
46
|
-
}
|
47
|
-
export default AxerveGateways;
|
48
|
-
export type { AxerveGateway, AxerveGatewayCreate, AxerveGatewayUpdate, AxerveGatewayType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{PaymentMethod}from'./payment_methods';import type{Version}from'./versions';import type{AxervePayment,AxervePaymentType}from'./axerve_payments';type AxerveGatewayType='axerve_gateways';type AxerveGatewayRel=ResourceRel&{type:AxerveGatewayType;};type AxervePaymentRel=ResourceRel&{type:AxervePaymentType;};interface AxerveGateway extends Resource{readonly type:AxerveGatewayType;name:string;login:string;webhook_endpoint_url?:string|null;payment_methods?:PaymentMethod[]|null;versions?:Version[]|null;axerve_payments?:AxervePayment[]|null;}interface AxerveGatewayCreate extends ResourceCreate{name:string;login:string;api_key:string;axerve_payments?:AxervePaymentRel[]|null;}interface AxerveGatewayUpdate extends ResourceUpdate{name?:string|null;login?:string|null;api_key?:string|null;axerve_payments?:AxervePaymentRel[]|null;}declare class AxerveGateways extends ApiResource<AxerveGateway>{static readonly TYPE:AxerveGatewayType;create(resource:AxerveGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AxerveGateway>;update(resource:AxerveGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AxerveGateway>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;payment_methods(axerveGatewayId:string|AxerveGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;versions(axerveGatewayId:string|AxerveGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;axerve_payments(axerveGatewayId:string|AxerveGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AxervePayment>>;isAxerveGateway(resource:any):resource is AxerveGateway;relationship(id:string|ResourceId|null):AxerveGatewayRel;type():AxerveGatewayType;}export default AxerveGateways;export type{AxerveGateway,AxerveGatewayCreate,AxerveGatewayUpdate,AxerveGatewayType};
|