@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,60 +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 { AdyenPayment, AdyenPaymentType } from './adyen_payments';
|
7
|
-
type AdyenGatewayType = 'adyen_gateways';
|
8
|
-
type AdyenGatewayRel = ResourceRel & {
|
9
|
-
type: AdyenGatewayType;
|
10
|
-
};
|
11
|
-
type AdyenPaymentRel = ResourceRel & {
|
12
|
-
type: AdyenPaymentType;
|
13
|
-
};
|
14
|
-
interface AdyenGateway extends Resource {
|
15
|
-
readonly type: AdyenGatewayType;
|
16
|
-
name: string;
|
17
|
-
live_url_prefix: string;
|
18
|
-
async_api?: boolean | null;
|
19
|
-
webhook_endpoint_secret?: string | null;
|
20
|
-
webhook_endpoint_url?: string | null;
|
21
|
-
payment_methods?: PaymentMethod[] | null;
|
22
|
-
versions?: Version[] | null;
|
23
|
-
adyen_payments?: AdyenPayment[] | null;
|
24
|
-
}
|
25
|
-
interface AdyenGatewayCreate extends ResourceCreate {
|
26
|
-
name: string;
|
27
|
-
merchant_account: string;
|
28
|
-
api_key: string;
|
29
|
-
public_key?: string | null;
|
30
|
-
live_url_prefix: string;
|
31
|
-
api_version?: number | null;
|
32
|
-
async_api?: boolean | null;
|
33
|
-
webhook_endpoint_secret?: string | null;
|
34
|
-
adyen_payments?: AdyenPaymentRel[] | null;
|
35
|
-
}
|
36
|
-
interface AdyenGatewayUpdate extends ResourceUpdate {
|
37
|
-
name?: string | null;
|
38
|
-
merchant_account?: string | null;
|
39
|
-
api_key?: string | null;
|
40
|
-
public_key?: string | null;
|
41
|
-
live_url_prefix?: string | null;
|
42
|
-
api_version?: number | null;
|
43
|
-
async_api?: boolean | null;
|
44
|
-
webhook_endpoint_secret?: string | null;
|
45
|
-
adyen_payments?: AdyenPaymentRel[] | null;
|
46
|
-
}
|
47
|
-
declare class AdyenGateways extends ApiResource<AdyenGateway> {
|
48
|
-
static readonly TYPE: AdyenGatewayType;
|
49
|
-
create(resource: AdyenGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
|
50
|
-
update(resource: AdyenGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
|
51
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
52
|
-
payment_methods(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
53
|
-
versions(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
54
|
-
adyen_payments(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>>;
|
55
|
-
isAdyenGateway(resource: any): resource is AdyenGateway;
|
56
|
-
relationship(id: string | ResourceId | null): AdyenGatewayRel;
|
57
|
-
type(): AdyenGatewayType;
|
58
|
-
}
|
59
|
-
export default AdyenGateways;
|
60
|
-
export type { AdyenGateway, AdyenGatewayCreate, AdyenGatewayUpdate, AdyenGatewayType };
|
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{AdyenPayment,AdyenPaymentType}from'./adyen_payments';type AdyenGatewayType='adyen_gateways';type AdyenGatewayRel=ResourceRel&{type:AdyenGatewayType;};type AdyenPaymentRel=ResourceRel&{type:AdyenPaymentType;};interface AdyenGateway extends Resource{readonly type:AdyenGatewayType;name:string;live_url_prefix:string;async_api?:boolean|null;webhook_endpoint_secret?:string|null;webhook_endpoint_url?:string|null;payment_methods?:PaymentMethod[]|null;versions?:Version[]|null;adyen_payments?:AdyenPayment[]|null;}interface AdyenGatewayCreate extends ResourceCreate{name:string;merchant_account:string;api_key:string;public_key?:string|null;live_url_prefix:string;api_version?:number|null;async_api?:boolean|null;webhook_endpoint_secret?:string|null;adyen_payments?:AdyenPaymentRel[]|null;}interface AdyenGatewayUpdate extends ResourceUpdate{name?:string|null;merchant_account?:string|null;api_key?:string|null;public_key?:string|null;live_url_prefix?:string|null;api_version?:number|null;async_api?:boolean|null;webhook_endpoint_secret?:string|null;adyen_payments?:AdyenPaymentRel[]|null;}declare class AdyenGateways extends ApiResource<AdyenGateway>{static readonly TYPE:AdyenGatewayType;create(resource:AdyenGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;update(resource:AdyenGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;payment_methods(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;versions(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;adyen_payments(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenPayment>>;isAdyenGateway(resource:any):resource is AdyenGateway;relationship(id:string|ResourceId|null):AdyenGatewayRel;type():AdyenGatewayType;}export default AdyenGateways;export type{AdyenGateway,AdyenGatewayCreate,AdyenGatewayUpdate,AdyenGatewayType};
|
@@ -1,37 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class AdyenGateways extends resource_1.ApiResource {
|
5
|
-
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type: AdyenGateways.TYPE }, params, options);
|
7
|
-
}
|
8
|
-
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type: AdyenGateways.TYPE }, params, options);
|
10
|
-
}
|
11
|
-
async delete(id, options) {
|
12
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: AdyenGateways.TYPE } : id, options);
|
13
|
-
}
|
14
|
-
async payment_methods(adyenGatewayId, params, options) {
|
15
|
-
const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
|
16
|
-
return this.resources.fetch({ type: 'payment_methods' }, `adyen_gateways/${_adyenGatewayId}/payment_methods`, params, options);
|
17
|
-
}
|
18
|
-
async versions(adyenGatewayId, params, options) {
|
19
|
-
const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
|
20
|
-
return this.resources.fetch({ type: 'versions' }, `adyen_gateways/${_adyenGatewayId}/versions`, params, options);
|
21
|
-
}
|
22
|
-
async adyen_payments(adyenGatewayId, params, options) {
|
23
|
-
const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
|
24
|
-
return this.resources.fetch({ type: 'adyen_payments' }, `adyen_gateways/${_adyenGatewayId}/adyen_payments`, params, options);
|
25
|
-
}
|
26
|
-
isAdyenGateway(resource) {
|
27
|
-
return resource.type && (resource.type === AdyenGateways.TYPE);
|
28
|
-
}
|
29
|
-
relationship(id) {
|
30
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: AdyenGateways.TYPE } : { id: id.id, type: AdyenGateways.TYPE };
|
31
|
-
}
|
32
|
-
type() {
|
33
|
-
return AdyenGateways.TYPE;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
AdyenGateways.TYPE = 'adyen_gateways';
|
37
|
-
exports.default = AdyenGateways;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class AdyenGateways extends resource_1.ApiResource{async create(e,t,s){return this.resources.create({...e,type:AdyenGateways.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:AdyenGateways.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:AdyenGateways.TYPE}:e,t)}async payment_methods(e,t,s){const r=e.id||e;return this.resources.fetch({type:"payment_methods"},`adyen_gateways/${r}/payment_methods`,t,s)}async versions(e,t,s){const r=e.id||e;return this.resources.fetch({type:"versions"},`adyen_gateways/${r}/versions`,t,s)}async adyen_payments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"adyen_payments"},`adyen_gateways/${r}/adyen_payments`,t,s)}isAdyenGateway(e){return e.type&&e.type===AdyenGateways.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:AdyenGateways.TYPE}:{id:e.id,type:AdyenGateways.TYPE}}type(){return AdyenGateways.TYPE}}AdyenGateways.TYPE="adyen_gateways",exports.default=AdyenGateways;
|
@@ -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,40 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class AdyenPayments extends resource_1.ApiResource {
|
5
|
-
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type: AdyenPayments.TYPE }, params, options);
|
7
|
-
}
|
8
|
-
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type: AdyenPayments.TYPE }, params, options);
|
10
|
-
}
|
11
|
-
async delete(id, options) {
|
12
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: AdyenPayments.TYPE } : id, options);
|
13
|
-
}
|
14
|
-
async order(adyenPaymentId, params, options) {
|
15
|
-
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
16
|
-
return this.resources.fetch({ type: 'orders' }, `adyen_payments/${_adyenPaymentId}/order`, params, options);
|
17
|
-
}
|
18
|
-
async payment_gateway(adyenPaymentId, params, options) {
|
19
|
-
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
20
|
-
return this.resources.fetch({ type: 'payment_gateways' }, `adyen_payments/${_adyenPaymentId}/payment_gateway`, params, options);
|
21
|
-
}
|
22
|
-
async versions(adyenPaymentId, params, options) {
|
23
|
-
const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
|
24
|
-
return this.resources.fetch({ type: 'versions' }, `adyen_payments/${_adyenPaymentId}/versions`, params, options);
|
25
|
-
}
|
26
|
-
async _details(id, params, options) {
|
27
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: AdyenPayments.TYPE, _details: true }, params, options);
|
28
|
-
}
|
29
|
-
isAdyenPayment(resource) {
|
30
|
-
return resource.type && (resource.type === AdyenPayments.TYPE);
|
31
|
-
}
|
32
|
-
relationship(id) {
|
33
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: AdyenPayments.TYPE } : { id: id.id, type: AdyenPayments.TYPE };
|
34
|
-
}
|
35
|
-
type() {
|
36
|
-
return AdyenPayments.TYPE;
|
37
|
-
}
|
38
|
-
}
|
39
|
-
AdyenPayments.TYPE = 'adyen_payments';
|
40
|
-
exports.default = AdyenPayments;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class AdyenPayments extends resource_1.ApiResource{async create(e,t,r){return this.resources.create({...e,type:AdyenPayments.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:AdyenPayments.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:AdyenPayments.TYPE}:e,t)}async order(e,t,r){const s=e.id||e;return this.resources.fetch({type:"orders"},`adyen_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){const s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`adyen_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){const s=e.id||e;return this.resources.fetch({type:"versions"},`adyen_payments/${s}/versions`,t,r)}async _details(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:AdyenPayments.TYPE,_details:!0},t,r)}isAdyenPayment(e){return e.type&&e.type===AdyenPayments.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:AdyenPayments.TYPE}:{id:e.id,type:AdyenPayments.TYPE}}type(){return AdyenPayments.TYPE}}AdyenPayments.TYPE="adyen_payments",exports.default=AdyenPayments;
|
@@ -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,16 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class Applications extends resource_1.ApiSingleton {
|
5
|
-
isApplication(resource) {
|
6
|
-
return resource.type && (resource.type === Applications.TYPE);
|
7
|
-
}
|
8
|
-
relationship(id) {
|
9
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: Applications.TYPE } : { id: id.id, type: Applications.TYPE };
|
10
|
-
}
|
11
|
-
type() {
|
12
|
-
return Applications.TYPE;
|
13
|
-
}
|
14
|
-
}
|
15
|
-
Applications.TYPE = 'application';
|
16
|
-
exports.default = Applications;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Applications extends resource_1.ApiSingleton{isApplication(e){return e.type&&e.type===Applications.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Applications.TYPE}:{id:e.id,type:Applications.TYPE}}type(){return Applications.TYPE}}Applications.TYPE="application",exports.default=Applications;
|
@@ -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,25 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class Attachments extends resource_1.ApiResource {
|
5
|
-
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type: Attachments.TYPE }, params, options);
|
7
|
-
}
|
8
|
-
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type: Attachments.TYPE }, params, options);
|
10
|
-
}
|
11
|
-
async delete(id, options) {
|
12
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: Attachments.TYPE } : id, options);
|
13
|
-
}
|
14
|
-
isAttachment(resource) {
|
15
|
-
return resource.type && (resource.type === Attachments.TYPE);
|
16
|
-
}
|
17
|
-
relationship(id) {
|
18
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: Attachments.TYPE } : { id: id.id, type: Attachments.TYPE };
|
19
|
-
}
|
20
|
-
type() {
|
21
|
-
return Attachments.TYPE;
|
22
|
-
}
|
23
|
-
}
|
24
|
-
Attachments.TYPE = 'attachments';
|
25
|
-
exports.default = Attachments;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Attachments extends resource_1.ApiResource{async create(e,r,t){return this.resources.create({...e,type:Attachments.TYPE},r,t)}async update(e,r,t){return this.resources.update({...e,type:Attachments.TYPE},r,t)}async delete(e,r){await this.resources.delete(typeof e=="string"?{id:e,type:Attachments.TYPE}:e,r)}isAttachment(e){return e.type&&e.type===Attachments.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Attachments.TYPE}:{id:e.id,type:Attachments.TYPE}}type(){return Attachments.TYPE}}Attachments.TYPE="attachments",exports.default=Attachments;
|
@@ -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,52 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class Authorizations extends resource_1.ApiResource {
|
5
|
-
async update(resource, params, options) {
|
6
|
-
return this.resources.update({ ...resource, type: Authorizations.TYPE }, params, options);
|
7
|
-
}
|
8
|
-
async order(authorizationId, params, options) {
|
9
|
-
const _authorizationId = authorizationId.id || authorizationId;
|
10
|
-
return this.resources.fetch({ type: 'orders' }, `authorizations/${_authorizationId}/order`, params, options);
|
11
|
-
}
|
12
|
-
async attachments(authorizationId, params, options) {
|
13
|
-
const _authorizationId = authorizationId.id || authorizationId;
|
14
|
-
return this.resources.fetch({ type: 'attachments' }, `authorizations/${_authorizationId}/attachments`, params, options);
|
15
|
-
}
|
16
|
-
async events(authorizationId, params, options) {
|
17
|
-
const _authorizationId = authorizationId.id || authorizationId;
|
18
|
-
return this.resources.fetch({ type: 'events' }, `authorizations/${_authorizationId}/events`, params, options);
|
19
|
-
}
|
20
|
-
async versions(authorizationId, params, options) {
|
21
|
-
const _authorizationId = authorizationId.id || authorizationId;
|
22
|
-
return this.resources.fetch({ type: 'versions' }, `authorizations/${_authorizationId}/versions`, params, options);
|
23
|
-
}
|
24
|
-
async captures(authorizationId, params, options) {
|
25
|
-
const _authorizationId = authorizationId.id || authorizationId;
|
26
|
-
return this.resources.fetch({ type: 'captures' }, `authorizations/${_authorizationId}/captures`, params, options);
|
27
|
-
}
|
28
|
-
async voids(authorizationId, params, options) {
|
29
|
-
const _authorizationId = authorizationId.id || authorizationId;
|
30
|
-
return this.resources.fetch({ type: 'voids' }, `authorizations/${_authorizationId}/voids`, params, options);
|
31
|
-
}
|
32
|
-
async _capture(id, params, options) {
|
33
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Authorizations.TYPE, _capture: true }, params, options);
|
34
|
-
}
|
35
|
-
async _capture_amount_cents(id, triggerValue, params, options) {
|
36
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Authorizations.TYPE, _capture_amount_cents: triggerValue }, params, options);
|
37
|
-
}
|
38
|
-
async _void(id, params, options) {
|
39
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Authorizations.TYPE, _void: true }, params, options);
|
40
|
-
}
|
41
|
-
isAuthorization(resource) {
|
42
|
-
return resource.type && (resource.type === Authorizations.TYPE);
|
43
|
-
}
|
44
|
-
relationship(id) {
|
45
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: Authorizations.TYPE } : { id: id.id, type: Authorizations.TYPE };
|
46
|
-
}
|
47
|
-
type() {
|
48
|
-
return Authorizations.TYPE;
|
49
|
-
}
|
50
|
-
}
|
51
|
-
Authorizations.TYPE = 'authorizations';
|
52
|
-
exports.default = Authorizations;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Authorizations extends resource_1.ApiResource{async update(e,t,s){return this.resources.update({...e,type:Authorizations.TYPE},t,s)}async order(e,t,s){const r=e.id||e;return this.resources.fetch({type:"orders"},`authorizations/${r}/order`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`authorizations/${r}/attachments`,t,s)}async events(e,t,s){const r=e.id||e;return this.resources.fetch({type:"events"},`authorizations/${r}/events`,t,s)}async versions(e,t,s){const r=e.id||e;return this.resources.fetch({type:"versions"},`authorizations/${r}/versions`,t,s)}async captures(e,t,s){const r=e.id||e;return this.resources.fetch({type:"captures"},`authorizations/${r}/captures`,t,s)}async voids(e,t,s){const r=e.id||e;return this.resources.fetch({type:"voids"},`authorizations/${r}/voids`,t,s)}async _capture(e,t,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:Authorizations.TYPE,_capture:!0},t,s)}async _capture_amount_cents(e,t,s,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Authorizations.TYPE,_capture_amount_cents:t},s,r)}async _void(e,t,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:Authorizations.TYPE,_void:!0},t,s)}isAuthorization(e){return e.type&&e.type===Authorizations.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Authorizations.TYPE}:{id:e.id,type:Authorizations.TYPE}}type(){return Authorizations.TYPE}}Authorizations.TYPE="authorizations",exports.default=Authorizations;
|