@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,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 { KlarnaPayment, KlarnaPaymentType } from './klarna_payments';
|
7
|
-
type KlarnaGatewayType = 'klarna_gateways';
|
8
|
-
type KlarnaGatewayRel = ResourceRel & {
|
9
|
-
type: KlarnaGatewayType;
|
10
|
-
};
|
11
|
-
type KlarnaPaymentRel = ResourceRel & {
|
12
|
-
type: KlarnaPaymentType;
|
13
|
-
};
|
14
|
-
interface KlarnaGateway extends Resource {
|
15
|
-
readonly type: KlarnaGatewayType;
|
16
|
-
name: string;
|
17
|
-
payment_methods?: PaymentMethod[] | null;
|
18
|
-
versions?: Version[] | null;
|
19
|
-
klarna_payments?: KlarnaPayment[] | null;
|
20
|
-
}
|
21
|
-
interface KlarnaGatewayCreate extends ResourceCreate {
|
22
|
-
name: string;
|
23
|
-
country_code: string;
|
24
|
-
api_key: string;
|
25
|
-
api_secret: string;
|
26
|
-
klarna_payments?: KlarnaPaymentRel[] | null;
|
27
|
-
}
|
28
|
-
interface KlarnaGatewayUpdate extends ResourceUpdate {
|
29
|
-
name?: string | null;
|
30
|
-
country_code?: string | null;
|
31
|
-
api_key?: string | null;
|
32
|
-
api_secret?: string | null;
|
33
|
-
klarna_payments?: KlarnaPaymentRel[] | null;
|
34
|
-
}
|
35
|
-
declare class KlarnaGateways extends ApiResource<KlarnaGateway> {
|
36
|
-
static readonly TYPE: KlarnaGatewayType;
|
37
|
-
create(resource: KlarnaGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaGateway>;
|
38
|
-
update(resource: KlarnaGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaGateway>;
|
39
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
40
|
-
payment_methods(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
41
|
-
versions(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
42
|
-
klarna_payments(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<KlarnaPayment>>;
|
43
|
-
isKlarnaGateway(resource: any): resource is KlarnaGateway;
|
44
|
-
relationship(id: string | ResourceId | null): KlarnaGatewayRel;
|
45
|
-
type(): KlarnaGatewayType;
|
46
|
-
}
|
47
|
-
export default KlarnaGateways;
|
48
|
-
export type { KlarnaGateway, KlarnaGatewayCreate, KlarnaGatewayUpdate, KlarnaGatewayType };
|
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{KlarnaPayment,KlarnaPaymentType}from'./klarna_payments';type KlarnaGatewayType='klarna_gateways';type KlarnaGatewayRel=ResourceRel&{type:KlarnaGatewayType;};type KlarnaPaymentRel=ResourceRel&{type:KlarnaPaymentType;};interface KlarnaGateway extends Resource{readonly type:KlarnaGatewayType;name:string;payment_methods?:PaymentMethod[]|null;versions?:Version[]|null;klarna_payments?:KlarnaPayment[]|null;}interface KlarnaGatewayCreate extends ResourceCreate{name:string;country_code:string;api_key:string;api_secret:string;klarna_payments?:KlarnaPaymentRel[]|null;}interface KlarnaGatewayUpdate extends ResourceUpdate{name?:string|null;country_code?:string|null;api_key?:string|null;api_secret?:string|null;klarna_payments?:KlarnaPaymentRel[]|null;}declare class KlarnaGateways extends ApiResource<KlarnaGateway>{static readonly TYPE:KlarnaGatewayType;create(resource:KlarnaGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaGateway>;update(resource:KlarnaGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaGateway>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;payment_methods(klarnaGatewayId:string|KlarnaGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;versions(klarnaGatewayId:string|KlarnaGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;klarna_payments(klarnaGatewayId:string|KlarnaGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<KlarnaPayment>>;isKlarnaGateway(resource:any):resource is KlarnaGateway;relationship(id:string|ResourceId|null):KlarnaGatewayRel;type():KlarnaGatewayType;}export default KlarnaGateways;export type{KlarnaGateway,KlarnaGatewayCreate,KlarnaGatewayUpdate,KlarnaGatewayType};
|
@@ -1,37 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class KlarnaGateways extends resource_1.ApiResource {
|
5
|
-
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type: KlarnaGateways.TYPE }, params, options);
|
7
|
-
}
|
8
|
-
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type: KlarnaGateways.TYPE }, params, options);
|
10
|
-
}
|
11
|
-
async delete(id, options) {
|
12
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: KlarnaGateways.TYPE } : id, options);
|
13
|
-
}
|
14
|
-
async payment_methods(klarnaGatewayId, params, options) {
|
15
|
-
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
16
|
-
return this.resources.fetch({ type: 'payment_methods' }, `klarna_gateways/${_klarnaGatewayId}/payment_methods`, params, options);
|
17
|
-
}
|
18
|
-
async versions(klarnaGatewayId, params, options) {
|
19
|
-
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
20
|
-
return this.resources.fetch({ type: 'versions' }, `klarna_gateways/${_klarnaGatewayId}/versions`, params, options);
|
21
|
-
}
|
22
|
-
async klarna_payments(klarnaGatewayId, params, options) {
|
23
|
-
const _klarnaGatewayId = klarnaGatewayId.id || klarnaGatewayId;
|
24
|
-
return this.resources.fetch({ type: 'klarna_payments' }, `klarna_gateways/${_klarnaGatewayId}/klarna_payments`, params, options);
|
25
|
-
}
|
26
|
-
isKlarnaGateway(resource) {
|
27
|
-
return resource.type && (resource.type === KlarnaGateways.TYPE);
|
28
|
-
}
|
29
|
-
relationship(id) {
|
30
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: KlarnaGateways.TYPE } : { id: id.id, type: KlarnaGateways.TYPE };
|
31
|
-
}
|
32
|
-
type() {
|
33
|
-
return KlarnaGateways.TYPE;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
KlarnaGateways.TYPE = 'klarna_gateways';
|
37
|
-
exports.default = KlarnaGateways;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class KlarnaGateways extends resource_1.ApiResource{async create(e,t,s){return this.resources.create({...e,type:KlarnaGateways.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:KlarnaGateways.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:KlarnaGateways.TYPE}:e,t)}async payment_methods(e,t,s){const r=e.id||e;return this.resources.fetch({type:"payment_methods"},`klarna_gateways/${r}/payment_methods`,t,s)}async versions(e,t,s){const r=e.id||e;return this.resources.fetch({type:"versions"},`klarna_gateways/${r}/versions`,t,s)}async klarna_payments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"klarna_payments"},`klarna_gateways/${r}/klarna_payments`,t,s)}isKlarnaGateway(e){return e.type&&e.type===KlarnaGateways.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:KlarnaGateways.TYPE}:{id:e.id,type:KlarnaGateways.TYPE}}type(){return KlarnaGateways.TYPE}}KlarnaGateways.TYPE="klarna_gateways",exports.default=KlarnaGateways;
|
@@ -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 { Order, OrderType } from './orders';
|
5
|
-
import type { PaymentGateway } from './payment_gateways';
|
6
|
-
import type { Version } from './versions';
|
7
|
-
type KlarnaPaymentType = 'klarna_payments';
|
8
|
-
type KlarnaPaymentRel = ResourceRel & {
|
9
|
-
type: KlarnaPaymentType;
|
10
|
-
};
|
11
|
-
type OrderRel = ResourceRel & {
|
12
|
-
type: OrderType;
|
13
|
-
};
|
14
|
-
interface KlarnaPayment extends Resource {
|
15
|
-
readonly type: KlarnaPaymentType;
|
16
|
-
session_id?: string | null;
|
17
|
-
client_token?: string | null;
|
18
|
-
payment_methods: Array<Record<string, any>>;
|
19
|
-
auth_token?: string | null;
|
20
|
-
mismatched_amounts?: boolean | null;
|
21
|
-
payment_instrument?: Record<string, any> | null;
|
22
|
-
order?: Order | null;
|
23
|
-
payment_gateway?: PaymentGateway | null;
|
24
|
-
versions?: Version[] | null;
|
25
|
-
}
|
26
|
-
interface KlarnaPaymentCreate extends ResourceCreate {
|
27
|
-
order: OrderRel;
|
28
|
-
}
|
29
|
-
interface KlarnaPaymentUpdate extends ResourceUpdate {
|
30
|
-
auth_token?: string | null;
|
31
|
-
_update?: boolean | null;
|
32
|
-
order?: OrderRel | null;
|
33
|
-
}
|
34
|
-
declare class KlarnaPayments extends ApiResource<KlarnaPayment> {
|
35
|
-
static readonly TYPE: KlarnaPaymentType;
|
36
|
-
create(resource: KlarnaPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaPayment>;
|
37
|
-
update(resource: KlarnaPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaPayment>;
|
38
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
39
|
-
order(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
40
|
-
payment_gateway(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
41
|
-
versions(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
42
|
-
_update(id: string | KlarnaPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<KlarnaPayment>;
|
43
|
-
isKlarnaPayment(resource: any): resource is KlarnaPayment;
|
44
|
-
relationship(id: string | ResourceId | null): KlarnaPaymentRel;
|
45
|
-
type(): KlarnaPaymentType;
|
46
|
-
}
|
47
|
-
export default KlarnaPayments;
|
48
|
-
export type { KlarnaPayment, KlarnaPaymentCreate, KlarnaPaymentUpdate, KlarnaPaymentType };
|
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 KlarnaPaymentType='klarna_payments';type KlarnaPaymentRel=ResourceRel&{type:KlarnaPaymentType;};type OrderRel=ResourceRel&{type:OrderType;};interface KlarnaPayment extends Resource{readonly type:KlarnaPaymentType;session_id?:string|null;client_token?:string|null;payment_methods:Array<Record<string,any>>;auth_token?:string|null;mismatched_amounts?:boolean|null;payment_instrument?:Record<string,any>|null;order?:Order|null;payment_gateway?:PaymentGateway|null;versions?:Version[]|null;}interface KlarnaPaymentCreate extends ResourceCreate{order:OrderRel;}interface KlarnaPaymentUpdate extends ResourceUpdate{auth_token?:string|null;_update?:boolean|null;order?:OrderRel|null;}declare class KlarnaPayments extends ApiResource<KlarnaPayment>{static readonly TYPE:KlarnaPaymentType;create(resource:KlarnaPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaPayment>;update(resource:KlarnaPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaPayment>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;order(klarnaPaymentId:string|KlarnaPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(klarnaPaymentId:string|KlarnaPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;versions(klarnaPaymentId:string|KlarnaPayment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;_update(id:string|KlarnaPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaPayment>;isKlarnaPayment(resource:any):resource is KlarnaPayment;relationship(id:string|ResourceId|null):KlarnaPaymentRel;type():KlarnaPaymentType;}export default KlarnaPayments;export type{KlarnaPayment,KlarnaPaymentCreate,KlarnaPaymentUpdate,KlarnaPaymentType};
|
@@ -1,40 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class KlarnaPayments extends resource_1.ApiResource {
|
5
|
-
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type: KlarnaPayments.TYPE }, params, options);
|
7
|
-
}
|
8
|
-
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type: KlarnaPayments.TYPE }, params, options);
|
10
|
-
}
|
11
|
-
async delete(id, options) {
|
12
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: KlarnaPayments.TYPE } : id, options);
|
13
|
-
}
|
14
|
-
async order(klarnaPaymentId, params, options) {
|
15
|
-
const _klarnaPaymentId = klarnaPaymentId.id || klarnaPaymentId;
|
16
|
-
return this.resources.fetch({ type: 'orders' }, `klarna_payments/${_klarnaPaymentId}/order`, params, options);
|
17
|
-
}
|
18
|
-
async payment_gateway(klarnaPaymentId, params, options) {
|
19
|
-
const _klarnaPaymentId = klarnaPaymentId.id || klarnaPaymentId;
|
20
|
-
return this.resources.fetch({ type: 'payment_gateways' }, `klarna_payments/${_klarnaPaymentId}/payment_gateway`, params, options);
|
21
|
-
}
|
22
|
-
async versions(klarnaPaymentId, params, options) {
|
23
|
-
const _klarnaPaymentId = klarnaPaymentId.id || klarnaPaymentId;
|
24
|
-
return this.resources.fetch({ type: 'versions' }, `klarna_payments/${_klarnaPaymentId}/versions`, params, options);
|
25
|
-
}
|
26
|
-
async _update(id, params, options) {
|
27
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: KlarnaPayments.TYPE, _update: true }, params, options);
|
28
|
-
}
|
29
|
-
isKlarnaPayment(resource) {
|
30
|
-
return resource.type && (resource.type === KlarnaPayments.TYPE);
|
31
|
-
}
|
32
|
-
relationship(id) {
|
33
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: KlarnaPayments.TYPE } : { id: id.id, type: KlarnaPayments.TYPE };
|
34
|
-
}
|
35
|
-
type() {
|
36
|
-
return KlarnaPayments.TYPE;
|
37
|
-
}
|
38
|
-
}
|
39
|
-
KlarnaPayments.TYPE = 'klarna_payments';
|
40
|
-
exports.default = KlarnaPayments;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class KlarnaPayments extends resource_1.ApiResource{async create(e,t,r){return this.resources.create({...e,type:KlarnaPayments.TYPE},t,r)}async update(e,t,r){return this.resources.update({...e,type:KlarnaPayments.TYPE},t,r)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:KlarnaPayments.TYPE}:e,t)}async order(e,t,r){const s=e.id||e;return this.resources.fetch({type:"orders"},`klarna_payments/${s}/order`,t,r)}async payment_gateway(e,t,r){const s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`klarna_payments/${s}/payment_gateway`,t,r)}async versions(e,t,r){const s=e.id||e;return this.resources.fetch({type:"versions"},`klarna_payments/${s}/versions`,t,r)}async _update(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:KlarnaPayments.TYPE,_update:!0},t,r)}isKlarnaPayment(e){return e.type&&e.type===KlarnaPayments.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:KlarnaPayments.TYPE}:{id:e.id,type:KlarnaPayments.TYPE}}type(){return KlarnaPayments.TYPE}}KlarnaPayments.TYPE="klarna_payments",exports.default=KlarnaPayments;
|
@@ -1,69 +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 { LineItem, LineItemType } from './line_items';
|
5
|
-
import type { SkuOption, SkuOptionType } from './sku_options';
|
6
|
-
import type { Event } from './events';
|
7
|
-
import type { Tag, TagType } from './tags';
|
8
|
-
type LineItemOptionType = 'line_item_options';
|
9
|
-
type LineItemOptionRel = ResourceRel & {
|
10
|
-
type: LineItemOptionType;
|
11
|
-
};
|
12
|
-
type LineItemRel = ResourceRel & {
|
13
|
-
type: LineItemType;
|
14
|
-
};
|
15
|
-
type SkuOptionRel = ResourceRel & {
|
16
|
-
type: SkuOptionType;
|
17
|
-
};
|
18
|
-
type TagRel = ResourceRel & {
|
19
|
-
type: TagType;
|
20
|
-
};
|
21
|
-
interface LineItemOption extends Resource {
|
22
|
-
readonly type: LineItemOptionType;
|
23
|
-
name?: string | null;
|
24
|
-
quantity: number;
|
25
|
-
currency_code?: string | null;
|
26
|
-
unit_amount_cents?: number | null;
|
27
|
-
unit_amount_float?: number | null;
|
28
|
-
formatted_unit_amount?: string | null;
|
29
|
-
total_amount_cents?: number | null;
|
30
|
-
total_amount_float: number;
|
31
|
-
formatted_total_amount?: string | null;
|
32
|
-
delay_hours?: number | null;
|
33
|
-
delay_days?: number | null;
|
34
|
-
options: Record<string, any>;
|
35
|
-
line_item?: LineItem | null;
|
36
|
-
sku_option?: SkuOption | null;
|
37
|
-
events?: Event[] | null;
|
38
|
-
tags?: Tag[] | null;
|
39
|
-
}
|
40
|
-
interface LineItemOptionCreate extends ResourceCreate {
|
41
|
-
name?: string | null;
|
42
|
-
quantity: number;
|
43
|
-
options: Record<string, any>;
|
44
|
-
line_item: LineItemRel;
|
45
|
-
sku_option: SkuOptionRel;
|
46
|
-
tags?: TagRel[] | null;
|
47
|
-
}
|
48
|
-
interface LineItemOptionUpdate extends ResourceUpdate {
|
49
|
-
name?: string | null;
|
50
|
-
quantity?: number | null;
|
51
|
-
options?: Record<string, any> | null;
|
52
|
-
sku_option?: SkuOptionRel | null;
|
53
|
-
tags?: TagRel[] | null;
|
54
|
-
}
|
55
|
-
declare class LineItemOptions extends ApiResource<LineItemOption> {
|
56
|
-
static readonly TYPE: LineItemOptionType;
|
57
|
-
create(resource: LineItemOptionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItemOption>;
|
58
|
-
update(resource: LineItemOptionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItemOption>;
|
59
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
60
|
-
line_item(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
61
|
-
sku_option(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuOption>;
|
62
|
-
events(lineItemOptionId: string | LineItemOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
63
|
-
tags(lineItemOptionId: string | LineItemOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
64
|
-
isLineItemOption(resource: any): resource is LineItemOption;
|
65
|
-
relationship(id: string | ResourceId | null): LineItemOptionRel;
|
66
|
-
type(): LineItemOptionType;
|
67
|
-
}
|
68
|
-
export default LineItemOptions;
|
69
|
-
export type { LineItemOption, LineItemOptionCreate, LineItemOptionUpdate, LineItemOptionType };
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{LineItem,LineItemType}from'./line_items';import type{SkuOption,SkuOptionType}from'./sku_options';import type{Event}from'./events';import type{Tag,TagType}from'./tags';type LineItemOptionType='line_item_options';type LineItemOptionRel=ResourceRel&{type:LineItemOptionType;};type LineItemRel=ResourceRel&{type:LineItemType;};type SkuOptionRel=ResourceRel&{type:SkuOptionType;};type TagRel=ResourceRel&{type:TagType;};interface LineItemOption extends Resource{readonly type:LineItemOptionType;name?:string|null;quantity:number;currency_code?:string|null;unit_amount_cents?:number|null;unit_amount_float?:number|null;formatted_unit_amount?:string|null;total_amount_cents?:number|null;total_amount_float:number;formatted_total_amount?:string|null;delay_hours?:number|null;delay_days?:number|null;options:Record<string,any>;line_item?:LineItem|null;sku_option?:SkuOption|null;events?:Event[]|null;tags?:Tag[]|null;}interface LineItemOptionCreate extends ResourceCreate{name?:string|null;quantity:number;options:Record<string,any>;line_item:LineItemRel;sku_option:SkuOptionRel;tags?:TagRel[]|null;}interface LineItemOptionUpdate extends ResourceUpdate{name?:string|null;quantity?:number|null;options?:Record<string,any>|null;sku_option?:SkuOptionRel|null;tags?:TagRel[]|null;}declare class LineItemOptions extends ApiResource<LineItemOption>{static readonly TYPE:LineItemOptionType;create(resource:LineItemOptionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItemOption>;update(resource:LineItemOptionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItemOption>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;line_item(lineItemOptionId:string|LineItemOption,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;sku_option(lineItemOptionId:string|LineItemOption,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuOption>;events(lineItemOptionId:string|LineItemOption,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(lineItemOptionId:string|LineItemOption,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;isLineItemOption(resource:any):resource is LineItemOption;relationship(id:string|ResourceId|null):LineItemOptionRel;type():LineItemOptionType;}export default LineItemOptions;export type{LineItemOption,LineItemOptionCreate,LineItemOptionUpdate,LineItemOptionType};
|
@@ -1,41 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class LineItemOptions extends resource_1.ApiResource {
|
5
|
-
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type: LineItemOptions.TYPE }, params, options);
|
7
|
-
}
|
8
|
-
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type: LineItemOptions.TYPE }, params, options);
|
10
|
-
}
|
11
|
-
async delete(id, options) {
|
12
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: LineItemOptions.TYPE } : id, options);
|
13
|
-
}
|
14
|
-
async line_item(lineItemOptionId, params, options) {
|
15
|
-
const _lineItemOptionId = lineItemOptionId.id || lineItemOptionId;
|
16
|
-
return this.resources.fetch({ type: 'line_items' }, `line_item_options/${_lineItemOptionId}/line_item`, params, options);
|
17
|
-
}
|
18
|
-
async sku_option(lineItemOptionId, params, options) {
|
19
|
-
const _lineItemOptionId = lineItemOptionId.id || lineItemOptionId;
|
20
|
-
return this.resources.fetch({ type: 'sku_options' }, `line_item_options/${_lineItemOptionId}/sku_option`, params, options);
|
21
|
-
}
|
22
|
-
async events(lineItemOptionId, params, options) {
|
23
|
-
const _lineItemOptionId = lineItemOptionId.id || lineItemOptionId;
|
24
|
-
return this.resources.fetch({ type: 'events' }, `line_item_options/${_lineItemOptionId}/events`, params, options);
|
25
|
-
}
|
26
|
-
async tags(lineItemOptionId, params, options) {
|
27
|
-
const _lineItemOptionId = lineItemOptionId.id || lineItemOptionId;
|
28
|
-
return this.resources.fetch({ type: 'tags' }, `line_item_options/${_lineItemOptionId}/tags`, params, options);
|
29
|
-
}
|
30
|
-
isLineItemOption(resource) {
|
31
|
-
return resource.type && (resource.type === LineItemOptions.TYPE);
|
32
|
-
}
|
33
|
-
relationship(id) {
|
34
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: LineItemOptions.TYPE } : { id: id.id, type: LineItemOptions.TYPE };
|
35
|
-
}
|
36
|
-
type() {
|
37
|
-
return LineItemOptions.TYPE;
|
38
|
-
}
|
39
|
-
}
|
40
|
-
LineItemOptions.TYPE = 'line_item_options';
|
41
|
-
exports.default = LineItemOptions;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class LineItemOptions extends resource_1.ApiResource{async create(e,t,s){return this.resources.create({...e,type:LineItemOptions.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:LineItemOptions.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:LineItemOptions.TYPE}:e,t)}async line_item(e,t,s){const r=e.id||e;return this.resources.fetch({type:"line_items"},`line_item_options/${r}/line_item`,t,s)}async sku_option(e,t,s){const r=e.id||e;return this.resources.fetch({type:"sku_options"},`line_item_options/${r}/sku_option`,t,s)}async events(e,t,s){const r=e.id||e;return this.resources.fetch({type:"events"},`line_item_options/${r}/events`,t,s)}async tags(e,t,s){const r=e.id||e;return this.resources.fetch({type:"tags"},`line_item_options/${r}/tags`,t,s)}isLineItemOption(e){return e.type&&e.type===LineItemOptions.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:LineItemOptions.TYPE}:{id:e.id,type:LineItemOptions.TYPE}}type(){return LineItemOptions.TYPE}}LineItemOptions.TYPE="line_item_options",exports.default=LineItemOptions;
|
@@ -1,170 +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 { Adjustment, AdjustmentType } from './adjustments';
|
6
|
-
import type { Bundle, BundleType } from './bundles';
|
7
|
-
import type { ExternalPromotion, ExternalPromotionType } from './external_promotions';
|
8
|
-
import type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions';
|
9
|
-
import type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions';
|
10
|
-
import type { GiftCard, GiftCardType } from './gift_cards';
|
11
|
-
import type { PaymentMethod, PaymentMethodType } from './payment_methods';
|
12
|
-
import type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions';
|
13
|
-
import type { Shipment, ShipmentType } from './shipments';
|
14
|
-
import type { Sku, SkuType } from './skus';
|
15
|
-
import type { LineItemOption } from './line_item_options';
|
16
|
-
import type { ReturnLineItem } from './return_line_items';
|
17
|
-
import type { StockReservation } from './stock_reservations';
|
18
|
-
import type { StockLineItem } from './stock_line_items';
|
19
|
-
import type { StockTransfer } from './stock_transfers';
|
20
|
-
import type { Event } from './events';
|
21
|
-
import type { Tag, TagType } from './tags';
|
22
|
-
type LineItemType = 'line_items';
|
23
|
-
type LineItemRel = ResourceRel & {
|
24
|
-
type: LineItemType;
|
25
|
-
};
|
26
|
-
type OrderRel = ResourceRel & {
|
27
|
-
type: OrderType;
|
28
|
-
};
|
29
|
-
type AdjustmentRel = ResourceRel & {
|
30
|
-
type: AdjustmentType;
|
31
|
-
};
|
32
|
-
type BundleRel = ResourceRel & {
|
33
|
-
type: BundleType;
|
34
|
-
};
|
35
|
-
type ExternalPromotionRel = ResourceRel & {
|
36
|
-
type: ExternalPromotionType;
|
37
|
-
};
|
38
|
-
type FixedAmountPromotionRel = ResourceRel & {
|
39
|
-
type: FixedAmountPromotionType;
|
40
|
-
};
|
41
|
-
type FreeShippingPromotionRel = ResourceRel & {
|
42
|
-
type: FreeShippingPromotionType;
|
43
|
-
};
|
44
|
-
type GiftCardRel = ResourceRel & {
|
45
|
-
type: GiftCardType;
|
46
|
-
};
|
47
|
-
type PaymentMethodRel = ResourceRel & {
|
48
|
-
type: PaymentMethodType;
|
49
|
-
};
|
50
|
-
type PercentageDiscountPromotionRel = ResourceRel & {
|
51
|
-
type: PercentageDiscountPromotionType;
|
52
|
-
};
|
53
|
-
type ShipmentRel = ResourceRel & {
|
54
|
-
type: ShipmentType;
|
55
|
-
};
|
56
|
-
type SkuRel = ResourceRel & {
|
57
|
-
type: SkuType;
|
58
|
-
};
|
59
|
-
type TagRel = ResourceRel & {
|
60
|
-
type: TagType;
|
61
|
-
};
|
62
|
-
interface LineItem extends Resource {
|
63
|
-
readonly type: LineItemType;
|
64
|
-
sku_code?: string | null;
|
65
|
-
bundle_code?: string | null;
|
66
|
-
quantity: number;
|
67
|
-
_external_price?: boolean | null;
|
68
|
-
currency_code?: string | null;
|
69
|
-
unit_amount_cents?: number | null;
|
70
|
-
unit_amount_float?: number | null;
|
71
|
-
formatted_unit_amount?: string | null;
|
72
|
-
compare_at_amount_cents?: number | null;
|
73
|
-
compare_at_amount_float?: number | null;
|
74
|
-
formatted_compare_at_amount?: string | null;
|
75
|
-
options_amount_cents?: number | null;
|
76
|
-
options_amount_float?: number | null;
|
77
|
-
formatted_options_amount?: string | null;
|
78
|
-
discount_cents?: number | null;
|
79
|
-
discount_float?: number | null;
|
80
|
-
formatted_discount?: string | null;
|
81
|
-
total_amount_cents?: number | null;
|
82
|
-
total_amount_float: number;
|
83
|
-
formatted_total_amount?: string | null;
|
84
|
-
tax_amount_cents?: number | null;
|
85
|
-
tax_amount_float: number;
|
86
|
-
formatted_tax_amount?: string | null;
|
87
|
-
name?: string | null;
|
88
|
-
image_url?: string | null;
|
89
|
-
discount_breakdown?: Record<string, any> | null;
|
90
|
-
tax_rate?: number | null;
|
91
|
-
tax_breakdown?: Record<string, any> | null;
|
92
|
-
item_type?: 'skus' | 'bundles' | 'shipments' | 'payment_methods' | 'adjustments' | 'gift_cards' | 'percentage_discount_promotions' | 'free_shipping_promotions' | 'free_gift_promotions' | 'fixed_price_promotions' | 'external_promotions' | 'fixed_amount_promotions' | null;
|
93
|
-
frequency?: string | null;
|
94
|
-
coupon_code?: string | null;
|
95
|
-
circuit_state?: string | null;
|
96
|
-
circuit_failure_count?: number | null;
|
97
|
-
order?: Order | null;
|
98
|
-
item?: Adjustment | Bundle | ExternalPromotion | FixedAmountPromotion | FreeShippingPromotion | GiftCard | PaymentMethod | PercentageDiscountPromotion | Shipment | Sku | null;
|
99
|
-
sku?: Sku | null;
|
100
|
-
bundle?: Bundle | null;
|
101
|
-
adjustment?: Adjustment | null;
|
102
|
-
gift_card?: GiftCard | null;
|
103
|
-
shipment?: Shipment | null;
|
104
|
-
payment_method?: PaymentMethod | null;
|
105
|
-
line_item_options?: LineItemOption[] | null;
|
106
|
-
return_line_items?: ReturnLineItem[] | null;
|
107
|
-
stock_reservations?: StockReservation[] | null;
|
108
|
-
stock_line_items?: StockLineItem[] | null;
|
109
|
-
stock_transfers?: StockTransfer[] | null;
|
110
|
-
events?: Event[] | null;
|
111
|
-
tags?: Tag[] | null;
|
112
|
-
}
|
113
|
-
interface LineItemCreate extends ResourceCreate {
|
114
|
-
sku_code?: string | null;
|
115
|
-
bundle_code?: string | null;
|
116
|
-
quantity: number;
|
117
|
-
_external_price?: boolean | null;
|
118
|
-
_update_quantity?: boolean | null;
|
119
|
-
_reserve_stock?: boolean | null;
|
120
|
-
unit_amount_cents?: number | null;
|
121
|
-
compare_at_amount_cents?: number | null;
|
122
|
-
name?: string | null;
|
123
|
-
image_url?: string | null;
|
124
|
-
item_type?: 'skus' | 'bundles' | 'shipments' | 'payment_methods' | 'adjustments' | 'gift_cards' | 'percentage_discount_promotions' | 'free_shipping_promotions' | 'free_gift_promotions' | 'fixed_price_promotions' | 'external_promotions' | 'fixed_amount_promotions' | null;
|
125
|
-
frequency?: string | null;
|
126
|
-
order: OrderRel;
|
127
|
-
item?: AdjustmentRel | BundleRel | ExternalPromotionRel | FixedAmountPromotionRel | FreeShippingPromotionRel | GiftCardRel | PaymentMethodRel | PercentageDiscountPromotionRel | ShipmentRel | SkuRel | null;
|
128
|
-
sku?: SkuRel | null;
|
129
|
-
bundle?: BundleRel | null;
|
130
|
-
adjustment?: AdjustmentRel | null;
|
131
|
-
gift_card?: GiftCardRel | null;
|
132
|
-
shipment?: ShipmentRel | null;
|
133
|
-
payment_method?: PaymentMethodRel | null;
|
134
|
-
tags?: TagRel[] | null;
|
135
|
-
}
|
136
|
-
interface LineItemUpdate extends ResourceUpdate {
|
137
|
-
sku_code?: string | null;
|
138
|
-
bundle_code?: string | null;
|
139
|
-
quantity?: number | null;
|
140
|
-
_external_price?: boolean | null;
|
141
|
-
_reserve_stock?: boolean | null;
|
142
|
-
compare_at_amount_cents?: number | null;
|
143
|
-
name?: string | null;
|
144
|
-
image_url?: string | null;
|
145
|
-
frequency?: string | null;
|
146
|
-
_reset_circuit?: boolean | null;
|
147
|
-
tags?: TagRel[] | null;
|
148
|
-
}
|
149
|
-
declare class LineItems extends ApiResource<LineItem> {
|
150
|
-
static readonly TYPE: LineItemType;
|
151
|
-
create(resource: LineItemCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
152
|
-
update(resource: LineItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
153
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
154
|
-
order(lineItemId: string | LineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
155
|
-
line_item_options(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>>;
|
156
|
-
return_line_items(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>>;
|
157
|
-
stock_reservations(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockReservation>>;
|
158
|
-
stock_line_items(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
|
159
|
-
stock_transfers(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
|
160
|
-
events(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
161
|
-
tags(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
162
|
-
_external_price(id: string | LineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
163
|
-
_reserve_stock(id: string | LineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
164
|
-
_reset_circuit(id: string | LineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
165
|
-
isLineItem(resource: any): resource is LineItem;
|
166
|
-
relationship(id: string | ResourceId | null): LineItemRel;
|
167
|
-
type(): LineItemType;
|
168
|
-
}
|
169
|
-
export default LineItems;
|
170
|
-
export type { LineItem, LineItemCreate, LineItemUpdate, LineItemType };
|
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{Adjustment,AdjustmentType}from'./adjustments';import type{Bundle,BundleType}from'./bundles';import type{ExternalPromotion,ExternalPromotionType}from'./external_promotions';import type{FixedAmountPromotion,FixedAmountPromotionType}from'./fixed_amount_promotions';import type{FreeShippingPromotion,FreeShippingPromotionType}from'./free_shipping_promotions';import type{GiftCard,GiftCardType}from'./gift_cards';import type{PaymentMethod,PaymentMethodType}from'./payment_methods';import type{PercentageDiscountPromotion,PercentageDiscountPromotionType}from'./percentage_discount_promotions';import type{Shipment,ShipmentType}from'./shipments';import type{Sku,SkuType}from'./skus';import type{LineItemOption}from'./line_item_options';import type{ReturnLineItem}from'./return_line_items';import type{StockReservation}from'./stock_reservations';import type{StockLineItem}from'./stock_line_items';import type{StockTransfer}from'./stock_transfers';import type{Event}from'./events';import type{Tag,TagType}from'./tags';type LineItemType='line_items';type LineItemRel=ResourceRel&{type:LineItemType;};type OrderRel=ResourceRel&{type:OrderType;};type AdjustmentRel=ResourceRel&{type:AdjustmentType;};type BundleRel=ResourceRel&{type:BundleType;};type ExternalPromotionRel=ResourceRel&{type:ExternalPromotionType;};type FixedAmountPromotionRel=ResourceRel&{type:FixedAmountPromotionType;};type FreeShippingPromotionRel=ResourceRel&{type:FreeShippingPromotionType;};type GiftCardRel=ResourceRel&{type:GiftCardType;};type PaymentMethodRel=ResourceRel&{type:PaymentMethodType;};type PercentageDiscountPromotionRel=ResourceRel&{type:PercentageDiscountPromotionType;};type ShipmentRel=ResourceRel&{type:ShipmentType;};type SkuRel=ResourceRel&{type:SkuType;};type TagRel=ResourceRel&{type:TagType;};interface LineItem extends Resource{readonly type:LineItemType;sku_code?:string|null;bundle_code?:string|null;quantity:number;_external_price?:boolean|null;currency_code?:string|null;unit_amount_cents?:number|null;unit_amount_float?:number|null;formatted_unit_amount?:string|null;compare_at_amount_cents?:number|null;compare_at_amount_float?:number|null;formatted_compare_at_amount?:string|null;options_amount_cents?:number|null;options_amount_float?:number|null;formatted_options_amount?:string|null;discount_cents?:number|null;discount_float?:number|null;formatted_discount?:string|null;total_amount_cents?:number|null;total_amount_float:number;formatted_total_amount?:string|null;tax_amount_cents?:number|null;tax_amount_float:number;formatted_tax_amount?:string|null;name?:string|null;image_url?:string|null;discount_breakdown?:Record<string,any>|null;tax_rate?:number|null;tax_breakdown?:Record<string,any>|null;item_type?:'skus'|'bundles'|'shipments'|'payment_methods'|'adjustments'|'gift_cards'|'percentage_discount_promotions'|'free_shipping_promotions'|'free_gift_promotions'|'fixed_price_promotions'|'external_promotions'|'fixed_amount_promotions'|null;frequency?:string|null;coupon_code?:string|null;circuit_state?:string|null;circuit_failure_count?:number|null;order?:Order|null;item?:Adjustment|Bundle|ExternalPromotion|FixedAmountPromotion|FreeShippingPromotion|GiftCard|PaymentMethod|PercentageDiscountPromotion|Shipment|Sku|null;sku?:Sku|null;bundle?:Bundle|null;adjustment?:Adjustment|null;gift_card?:GiftCard|null;shipment?:Shipment|null;payment_method?:PaymentMethod|null;line_item_options?:LineItemOption[]|null;return_line_items?:ReturnLineItem[]|null;stock_reservations?:StockReservation[]|null;stock_line_items?:StockLineItem[]|null;stock_transfers?:StockTransfer[]|null;events?:Event[]|null;tags?:Tag[]|null;}interface LineItemCreate extends ResourceCreate{sku_code?:string|null;bundle_code?:string|null;quantity:number;_external_price?:boolean|null;_update_quantity?:boolean|null;_reserve_stock?:boolean|null;unit_amount_cents?:number|null;compare_at_amount_cents?:number|null;name?:string|null;image_url?:string|null;item_type?:'skus'|'bundles'|'shipments'|'payment_methods'|'adjustments'|'gift_cards'|'percentage_discount_promotions'|'free_shipping_promotions'|'free_gift_promotions'|'fixed_price_promotions'|'external_promotions'|'fixed_amount_promotions'|null;frequency?:string|null;order:OrderRel;item?:AdjustmentRel|BundleRel|ExternalPromotionRel|FixedAmountPromotionRel|FreeShippingPromotionRel|GiftCardRel|PaymentMethodRel|PercentageDiscountPromotionRel|ShipmentRel|SkuRel|null;sku?:SkuRel|null;bundle?:BundleRel|null;adjustment?:AdjustmentRel|null;gift_card?:GiftCardRel|null;shipment?:ShipmentRel|null;payment_method?:PaymentMethodRel|null;tags?:TagRel[]|null;}interface LineItemUpdate extends ResourceUpdate{sku_code?:string|null;bundle_code?:string|null;quantity?:number|null;_external_price?:boolean|null;_reserve_stock?:boolean|null;compare_at_amount_cents?:number|null;name?:string|null;image_url?:string|null;frequency?:string|null;_reset_circuit?:boolean|null;tags?:TagRel[]|null;}declare class LineItems extends ApiResource<LineItem>{static readonly TYPE:LineItemType;create(resource:LineItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;update(resource:LineItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;order(lineItemId:string|LineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;line_item_options(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItemOption>>;return_line_items(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ReturnLineItem>>;stock_reservations(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockReservation>>;stock_line_items(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLineItem>>;stock_transfers(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;events(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;_external_price(id:string|LineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;_reserve_stock(id:string|LineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;_reset_circuit(id:string|LineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;isLineItem(resource:any):resource is LineItem;relationship(id:string|ResourceId|null):LineItemRel;type():LineItemType;}export default LineItems;export type{LineItem,LineItemCreate,LineItemUpdate,LineItemType};
|
@@ -1,66 +1 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const resource_1 = require("../resource");
|
4
|
-
class LineItems extends resource_1.ApiResource {
|
5
|
-
async create(resource, params, options) {
|
6
|
-
return this.resources.create({ ...resource, type: LineItems.TYPE }, params, options);
|
7
|
-
}
|
8
|
-
async update(resource, params, options) {
|
9
|
-
return this.resources.update({ ...resource, type: LineItems.TYPE }, params, options);
|
10
|
-
}
|
11
|
-
async delete(id, options) {
|
12
|
-
await this.resources.delete((typeof id === 'string') ? { id, type: LineItems.TYPE } : id, options);
|
13
|
-
}
|
14
|
-
async order(lineItemId, params, options) {
|
15
|
-
const _lineItemId = lineItemId.id || lineItemId;
|
16
|
-
return this.resources.fetch({ type: 'orders' }, `line_items/${_lineItemId}/order`, params, options);
|
17
|
-
}
|
18
|
-
async line_item_options(lineItemId, params, options) {
|
19
|
-
const _lineItemId = lineItemId.id || lineItemId;
|
20
|
-
return this.resources.fetch({ type: 'line_item_options' }, `line_items/${_lineItemId}/line_item_options`, params, options);
|
21
|
-
}
|
22
|
-
async return_line_items(lineItemId, params, options) {
|
23
|
-
const _lineItemId = lineItemId.id || lineItemId;
|
24
|
-
return this.resources.fetch({ type: 'return_line_items' }, `line_items/${_lineItemId}/return_line_items`, params, options);
|
25
|
-
}
|
26
|
-
async stock_reservations(lineItemId, params, options) {
|
27
|
-
const _lineItemId = lineItemId.id || lineItemId;
|
28
|
-
return this.resources.fetch({ type: 'stock_reservations' }, `line_items/${_lineItemId}/stock_reservations`, params, options);
|
29
|
-
}
|
30
|
-
async stock_line_items(lineItemId, params, options) {
|
31
|
-
const _lineItemId = lineItemId.id || lineItemId;
|
32
|
-
return this.resources.fetch({ type: 'stock_line_items' }, `line_items/${_lineItemId}/stock_line_items`, params, options);
|
33
|
-
}
|
34
|
-
async stock_transfers(lineItemId, params, options) {
|
35
|
-
const _lineItemId = lineItemId.id || lineItemId;
|
36
|
-
return this.resources.fetch({ type: 'stock_transfers' }, `line_items/${_lineItemId}/stock_transfers`, params, options);
|
37
|
-
}
|
38
|
-
async events(lineItemId, params, options) {
|
39
|
-
const _lineItemId = lineItemId.id || lineItemId;
|
40
|
-
return this.resources.fetch({ type: 'events' }, `line_items/${_lineItemId}/events`, params, options);
|
41
|
-
}
|
42
|
-
async tags(lineItemId, params, options) {
|
43
|
-
const _lineItemId = lineItemId.id || lineItemId;
|
44
|
-
return this.resources.fetch({ type: 'tags' }, `line_items/${_lineItemId}/tags`, params, options);
|
45
|
-
}
|
46
|
-
async _external_price(id, params, options) {
|
47
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: LineItems.TYPE, _external_price: true }, params, options);
|
48
|
-
}
|
49
|
-
async _reserve_stock(id, params, options) {
|
50
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: LineItems.TYPE, _reserve_stock: true }, params, options);
|
51
|
-
}
|
52
|
-
async _reset_circuit(id, params, options) {
|
53
|
-
return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: LineItems.TYPE, _reset_circuit: true }, params, options);
|
54
|
-
}
|
55
|
-
isLineItem(resource) {
|
56
|
-
return resource.type && (resource.type === LineItems.TYPE);
|
57
|
-
}
|
58
|
-
relationship(id) {
|
59
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: LineItems.TYPE } : { id: id.id, type: LineItems.TYPE };
|
60
|
-
}
|
61
|
-
type() {
|
62
|
-
return LineItems.TYPE;
|
63
|
-
}
|
64
|
-
}
|
65
|
-
LineItems.TYPE = 'line_items';
|
66
|
-
exports.default = LineItems;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class LineItems extends resource_1.ApiResource{async create(e,t,s){return this.resources.create({...e,type:LineItems.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:LineItems.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:LineItems.TYPE}:e,t)}async order(e,t,s){const r=e.id||e;return this.resources.fetch({type:"orders"},`line_items/${r}/order`,t,s)}async line_item_options(e,t,s){const r=e.id||e;return this.resources.fetch({type:"line_item_options"},`line_items/${r}/line_item_options`,t,s)}async return_line_items(e,t,s){const r=e.id||e;return this.resources.fetch({type:"return_line_items"},`line_items/${r}/return_line_items`,t,s)}async stock_reservations(e,t,s){const r=e.id||e;return this.resources.fetch({type:"stock_reservations"},`line_items/${r}/stock_reservations`,t,s)}async stock_line_items(e,t,s){const r=e.id||e;return this.resources.fetch({type:"stock_line_items"},`line_items/${r}/stock_line_items`,t,s)}async stock_transfers(e,t,s){const r=e.id||e;return this.resources.fetch({type:"stock_transfers"},`line_items/${r}/stock_transfers`,t,s)}async events(e,t,s){const r=e.id||e;return this.resources.fetch({type:"events"},`line_items/${r}/events`,t,s)}async tags(e,t,s){const r=e.id||e;return this.resources.fetch({type:"tags"},`line_items/${r}/tags`,t,s)}async _external_price(e,t,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:LineItems.TYPE,_external_price:!0},t,s)}async _reserve_stock(e,t,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:LineItems.TYPE,_reserve_stock:!0},t,s)}async _reset_circuit(e,t,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:LineItems.TYPE,_reset_circuit:!0},t,s)}isLineItem(e){return e.type&&e.type===LineItems.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:LineItems.TYPE}:{id:e.id,type:LineItems.TYPE}}type(){return LineItems.TYPE}}LineItems.TYPE="line_items",exports.default=LineItems;
|
@@ -1,34 +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
|
-
type ManualGatewayType = 'manual_gateways';
|
7
|
-
type ManualGatewayRel = ResourceRel & {
|
8
|
-
type: ManualGatewayType;
|
9
|
-
};
|
10
|
-
interface ManualGateway extends Resource {
|
11
|
-
readonly type: ManualGatewayType;
|
12
|
-
name: string;
|
13
|
-
payment_methods?: PaymentMethod[] | null;
|
14
|
-
versions?: Version[] | null;
|
15
|
-
}
|
16
|
-
interface ManualGatewayCreate extends ResourceCreate {
|
17
|
-
name: string;
|
18
|
-
}
|
19
|
-
interface ManualGatewayUpdate extends ResourceUpdate {
|
20
|
-
name?: string | null;
|
21
|
-
}
|
22
|
-
declare class ManualGateways extends ApiResource<ManualGateway> {
|
23
|
-
static readonly TYPE: ManualGatewayType;
|
24
|
-
create(resource: ManualGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualGateway>;
|
25
|
-
update(resource: ManualGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualGateway>;
|
26
|
-
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
27
|
-
payment_methods(manualGatewayId: string | ManualGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
28
|
-
versions(manualGatewayId: string | ManualGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
29
|
-
isManualGateway(resource: any): resource is ManualGateway;
|
30
|
-
relationship(id: string | ResourceId | null): ManualGatewayRel;
|
31
|
-
type(): ManualGatewayType;
|
32
|
-
}
|
33
|
-
export default ManualGateways;
|
34
|
-
export type { ManualGateway, ManualGatewayCreate, ManualGatewayUpdate, ManualGatewayType };
|
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';type ManualGatewayType='manual_gateways';type ManualGatewayRel=ResourceRel&{type:ManualGatewayType;};interface ManualGateway extends Resource{readonly type:ManualGatewayType;name:string;payment_methods?:PaymentMethod[]|null;versions?:Version[]|null;}interface ManualGatewayCreate extends ResourceCreate{name:string;}interface ManualGatewayUpdate extends ResourceUpdate{name?:string|null;}declare class ManualGateways extends ApiResource<ManualGateway>{static readonly TYPE:ManualGatewayType;create(resource:ManualGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualGateway>;update(resource:ManualGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualGateway>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;payment_methods(manualGatewayId:string|ManualGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;versions(manualGatewayId:string|ManualGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isManualGateway(resource:any):resource is ManualGateway;relationship(id:string|ResourceId|null):ManualGatewayRel;type():ManualGatewayType;}export default ManualGateways;export type{ManualGateway,ManualGatewayCreate,ManualGatewayUpdate,ManualGatewayType};
|