@commercelayer/sdk 7.0.0-beta.8 → 7.0.0-rc.1
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/README.md +48 -35
- package/lib/api-DDgIE2i8.d.ts +17175 -0
- package/lib/api-DmIZO_Np.d.cts +17175 -0
- package/lib/api.cjs +796 -0
- package/lib/api.cjs.map +1 -0
- package/lib/api.d.cts +4 -0
- package/lib/api.d.ts +4 -0
- package/lib/api.js +133 -0
- package/lib/api.js.map +1 -0
- package/lib/client.cjs +160 -0
- package/lib/client.cjs.map +1 -0
- package/lib/client.d.cts +36 -0
- package/lib/client.d.ts +36 -0
- package/lib/client.js +151 -0
- package/lib/client.js.map +1 -0
- package/lib/commercelayer.cjs +114 -0
- package/lib/commercelayer.cjs.map +1 -0
- package/lib/commercelayer.d.cts +36 -0
- package/lib/commercelayer.d.ts +36 -0
- package/lib/commercelayer.js +104 -0
- package/lib/commercelayer.js.map +1 -0
- package/lib/config.cjs +23 -0
- package/lib/config.cjs.map +1 -0
- package/lib/config.d.cts +19 -0
- package/lib/config.d.ts +19 -0
- package/lib/config.js +19 -0
- package/lib/config.js.map +1 -0
- package/lib/debug.cjs +21 -0
- package/lib/debug.cjs.map +1 -0
- package/lib/debug.d.cts +4 -0
- package/lib/debug.d.ts +4 -0
- package/lib/debug.js +17 -0
- package/lib/debug.js.map +1 -0
- package/lib/enum.cjs +659 -0
- package/lib/enum.cjs.map +1 -0
- package/lib/enum.d.cts +4 -0
- package/lib/enum.d.ts +4 -0
- package/lib/enum.js +643 -0
- package/lib/enum.js.map +1 -0
- package/lib/error.cjs +101 -0
- package/lib/error.cjs.map +1 -0
- package/lib/error.d.cts +38 -0
- package/lib/error.d.ts +38 -0
- package/lib/error.js +93 -0
- package/lib/error.js.map +1 -0
- package/lib/fetch.cjs +69 -0
- package/lib/fetch.cjs.map +1 -0
- package/lib/fetch.d.cts +1 -0
- package/lib/fetch.d.ts +1 -0
- package/lib/fetch.js +62 -0
- package/lib/fetch.js.map +1 -0
- package/lib/index.cjs +34 -2
- package/lib/index.cjs.map +1 -0
- package/lib/index.d.cts +7 -17201
- package/lib/index.d.ts +7 -17201
- package/lib/index.js +5 -2
- package/lib/index.js.map +1 -0
- package/lib/interceptor-5MISI1yn.d.cts +54 -0
- package/lib/interceptor-5MISI1yn.d.ts +54 -0
- package/lib/interceptor.cjs +4 -0
- package/lib/interceptor.cjs.map +1 -0
- package/lib/interceptor.d.cts +1 -0
- package/lib/interceptor.d.ts +1 -0
- package/lib/interceptor.js +3 -0
- package/lib/interceptor.js.map +1 -0
- package/lib/jsonapi.cjs +81 -0
- package/lib/jsonapi.cjs.map +1 -0
- package/lib/jsonapi.d.cts +11 -0
- package/lib/jsonapi.d.ts +11 -0
- package/lib/jsonapi.js +73 -0
- package/lib/jsonapi.js.map +1 -0
- package/lib/model.cjs +4 -0
- package/lib/model.cjs.map +1 -0
- package/lib/model.d.cts +4 -0
- package/lib/model.d.ts +4 -0
- package/lib/model.js +3 -0
- package/lib/model.js.map +1 -0
- package/lib/query.cjs +66 -0
- package/lib/query.cjs.map +1 -0
- package/lib/query.d.cts +4 -0
- package/lib/query.d.ts +4 -0
- package/lib/query.js +58 -0
- package/lib/query.js.map +1 -0
- package/lib/resource.cjs +218 -0
- package/lib/resource.cjs.map +1 -0
- package/lib/resource.d.cts +4 -0
- package/lib/resource.d.ts +4 -0
- package/lib/resource.js +206 -0
- package/lib/resource.js.map +1 -0
- package/lib/resources/addresses.cjs +58 -0
- package/lib/resources/addresses.cjs.map +1 -0
- package/lib/resources/addresses.d.cts +4 -0
- package/lib/resources/addresses.d.ts +4 -0
- package/lib/resources/addresses.js +54 -0
- package/lib/resources/addresses.js.map +1 -0
- package/lib/resources/adjustments.cjs +40 -0
- package/lib/resources/adjustments.cjs.map +1 -0
- package/lib/resources/adjustments.d.cts +4 -0
- package/lib/resources/adjustments.d.ts +4 -0
- package/lib/resources/adjustments.js +36 -0
- package/lib/resources/adjustments.js.map +1 -0
- package/lib/resources/adyen_gateways.cjs +48 -0
- package/lib/resources/adyen_gateways.cjs.map +1 -0
- package/lib/resources/adyen_gateways.d.cts +4 -0
- package/lib/resources/adyen_gateways.d.ts +4 -0
- package/lib/resources/adyen_gateways.js +44 -0
- package/lib/resources/adyen_gateways.js.map +1 -0
- package/lib/resources/adyen_payments.cjs +54 -0
- package/lib/resources/adyen_payments.cjs.map +1 -0
- package/lib/resources/adyen_payments.d.cts +4 -0
- package/lib/resources/adyen_payments.d.ts +4 -0
- package/lib/resources/adyen_payments.js +50 -0
- package/lib/resources/adyen_payments.js.map +1 -0
- package/lib/resources/applications.cjs +30 -0
- package/lib/resources/applications.cjs.map +1 -0
- package/lib/resources/applications.d.cts +4 -0
- package/lib/resources/applications.d.ts +4 -0
- package/lib/resources/applications.js +26 -0
- package/lib/resources/applications.js.map +1 -0
- package/lib/resources/attachments.cjs +36 -0
- package/lib/resources/attachments.cjs.map +1 -0
- package/lib/resources/attachments.d.cts +4 -0
- package/lib/resources/attachments.d.ts +4 -0
- package/lib/resources/attachments.js +32 -0
- package/lib/resources/attachments.js.map +1 -0
- package/lib/resources/authorizations.cjs +69 -0
- package/lib/resources/authorizations.cjs.map +1 -0
- package/lib/resources/authorizations.d.cts +4 -0
- package/lib/resources/authorizations.d.ts +4 -0
- package/lib/resources/authorizations.js +65 -0
- package/lib/resources/authorizations.js.map +1 -0
- package/lib/resources/avalara_accounts.cjs +56 -0
- package/lib/resources/avalara_accounts.cjs.map +1 -0
- package/lib/resources/avalara_accounts.d.cts +4 -0
- package/lib/resources/avalara_accounts.d.ts +4 -0
- package/lib/resources/avalara_accounts.js +52 -0
- package/lib/resources/avalara_accounts.js.map +1 -0
- package/lib/resources/axerve_gateways.cjs +48 -0
- package/lib/resources/axerve_gateways.cjs.map +1 -0
- package/lib/resources/axerve_gateways.d.cts +4 -0
- package/lib/resources/axerve_gateways.d.ts +4 -0
- package/lib/resources/axerve_gateways.js +44 -0
- package/lib/resources/axerve_gateways.js.map +1 -0
- package/lib/resources/axerve_payments.cjs +51 -0
- package/lib/resources/axerve_payments.cjs.map +1 -0
- package/lib/resources/axerve_payments.d.cts +4 -0
- package/lib/resources/axerve_payments.d.ts +4 -0
- package/lib/resources/axerve_payments.js +47 -0
- package/lib/resources/axerve_payments.js.map +1 -0
- package/lib/resources/bing_geocoders.cjs +48 -0
- package/lib/resources/bing_geocoders.cjs.map +1 -0
- package/lib/resources/bing_geocoders.d.cts +4 -0
- package/lib/resources/bing_geocoders.d.ts +4 -0
- package/lib/resources/bing_geocoders.js +44 -0
- package/lib/resources/bing_geocoders.js.map +1 -0
- package/lib/resources/braintree_gateways.cjs +48 -0
- package/lib/resources/braintree_gateways.cjs.map +1 -0
- package/lib/resources/braintree_gateways.d.cts +4 -0
- package/lib/resources/braintree_gateways.d.ts +4 -0
- package/lib/resources/braintree_gateways.js +44 -0
- package/lib/resources/braintree_gateways.js.map +1 -0
- package/lib/resources/braintree_payments.cjs +48 -0
- package/lib/resources/braintree_payments.cjs.map +1 -0
- package/lib/resources/braintree_payments.d.cts +4 -0
- package/lib/resources/braintree_payments.d.ts +4 -0
- package/lib/resources/braintree_payments.js +44 -0
- package/lib/resources/braintree_payments.js.map +1 -0
- package/lib/resources/bundles.cjs +76 -0
- package/lib/resources/bundles.cjs.map +1 -0
- package/lib/resources/bundles.d.cts +4 -0
- package/lib/resources/bundles.d.ts +4 -0
- package/lib/resources/bundles.js +72 -0
- package/lib/resources/bundles.js.map +1 -0
- package/lib/resources/buy_x_pay_y_promotions.cjs +96 -0
- package/lib/resources/buy_x_pay_y_promotions.cjs.map +1 -0
- package/lib/resources/buy_x_pay_y_promotions.d.cts +4 -0
- package/lib/resources/buy_x_pay_y_promotions.d.ts +4 -0
- package/lib/resources/buy_x_pay_y_promotions.js +92 -0
- package/lib/resources/buy_x_pay_y_promotions.js.map +1 -0
- package/lib/resources/captures.cjs +70 -0
- package/lib/resources/captures.cjs.map +1 -0
- package/lib/resources/captures.d.cts +4 -0
- package/lib/resources/captures.d.ts +4 -0
- package/lib/resources/captures.js +66 -0
- package/lib/resources/captures.js.map +1 -0
- package/lib/resources/carrier_accounts.cjs +48 -0
- package/lib/resources/carrier_accounts.cjs.map +1 -0
- package/lib/resources/carrier_accounts.d.cts +4 -0
- package/lib/resources/carrier_accounts.d.ts +4 -0
- package/lib/resources/carrier_accounts.js +44 -0
- package/lib/resources/carrier_accounts.js.map +1 -0
- package/lib/resources/checkout_com_gateways.cjs +48 -0
- package/lib/resources/checkout_com_gateways.cjs.map +1 -0
- package/lib/resources/checkout_com_gateways.d.cts +4 -0
- package/lib/resources/checkout_com_gateways.d.ts +4 -0
- package/lib/resources/checkout_com_gateways.js +44 -0
- package/lib/resources/checkout_com_gateways.js.map +1 -0
- package/lib/resources/checkout_com_payments.cjs +54 -0
- package/lib/resources/checkout_com_payments.cjs.map +1 -0
- package/lib/resources/checkout_com_payments.d.cts +4 -0
- package/lib/resources/checkout_com_payments.d.ts +4 -0
- package/lib/resources/checkout_com_payments.js +50 -0
- package/lib/resources/checkout_com_payments.js.map +1 -0
- package/lib/resources/cleanups.cjs +47 -0
- package/lib/resources/cleanups.cjs.map +1 -0
- package/lib/resources/cleanups.d.cts +4 -0
- package/lib/resources/cleanups.d.ts +4 -0
- package/lib/resources/cleanups.js +43 -0
- package/lib/resources/cleanups.js.map +1 -0
- package/lib/resources/coupon_codes_promotion_rules.cjs +44 -0
- package/lib/resources/coupon_codes_promotion_rules.cjs.map +1 -0
- package/lib/resources/coupon_codes_promotion_rules.d.cts +4 -0
- package/lib/resources/coupon_codes_promotion_rules.d.ts +4 -0
- package/lib/resources/coupon_codes_promotion_rules.js +40 -0
- package/lib/resources/coupon_codes_promotion_rules.js.map +1 -0
- package/lib/resources/coupon_recipients.cjs +48 -0
- package/lib/resources/coupon_recipients.cjs.map +1 -0
- package/lib/resources/coupon_recipients.d.cts +4 -0
- package/lib/resources/coupon_recipients.d.ts +4 -0
- package/lib/resources/coupon_recipients.js +44 -0
- package/lib/resources/coupon_recipients.js.map +1 -0
- package/lib/resources/coupons.cjs +62 -0
- package/lib/resources/coupons.cjs.map +1 -0
- package/lib/resources/coupons.d.cts +4 -0
- package/lib/resources/coupons.d.ts +4 -0
- package/lib/resources/coupons.js +58 -0
- package/lib/resources/coupons.js.map +1 -0
- package/lib/resources/custom_promotion_rules.cjs +40 -0
- package/lib/resources/custom_promotion_rules.cjs.map +1 -0
- package/lib/resources/custom_promotion_rules.d.cts +4 -0
- package/lib/resources/custom_promotion_rules.d.ts +4 -0
- package/lib/resources/custom_promotion_rules.js +36 -0
- package/lib/resources/custom_promotion_rules.js.map +1 -0
- package/lib/resources/customer_addresses.cjs +52 -0
- package/lib/resources/customer_addresses.cjs.map +1 -0
- package/lib/resources/customer_addresses.d.cts +4 -0
- package/lib/resources/customer_addresses.d.ts +4 -0
- package/lib/resources/customer_addresses.js +48 -0
- package/lib/resources/customer_addresses.js.map +1 -0
- package/lib/resources/customer_groups.cjs +52 -0
- package/lib/resources/customer_groups.cjs.map +1 -0
- package/lib/resources/customer_groups.d.cts +4 -0
- package/lib/resources/customer_groups.d.ts +4 -0
- package/lib/resources/customer_groups.js +48 -0
- package/lib/resources/customer_groups.js.map +1 -0
- package/lib/resources/customer_password_resets.cjs +47 -0
- package/lib/resources/customer_password_resets.cjs.map +1 -0
- package/lib/resources/customer_password_resets.d.cts +4 -0
- package/lib/resources/customer_password_resets.d.ts +4 -0
- package/lib/resources/customer_password_resets.js +43 -0
- package/lib/resources/customer_password_resets.js.map +1 -0
- package/lib/resources/customer_payment_sources.cjs +48 -0
- package/lib/resources/customer_payment_sources.cjs.map +1 -0
- package/lib/resources/customer_payment_sources.d.cts +4 -0
- package/lib/resources/customer_payment_sources.d.ts +4 -0
- package/lib/resources/customer_payment_sources.js +44 -0
- package/lib/resources/customer_payment_sources.js.map +1 -0
- package/lib/resources/customer_subscriptions.cjs +48 -0
- package/lib/resources/customer_subscriptions.cjs.map +1 -0
- package/lib/resources/customer_subscriptions.d.cts +4 -0
- package/lib/resources/customer_subscriptions.d.ts +4 -0
- package/lib/resources/customer_subscriptions.js +44 -0
- package/lib/resources/customer_subscriptions.js.map +1 -0
- package/lib/resources/customers.cjs +86 -0
- package/lib/resources/customers.cjs.map +1 -0
- package/lib/resources/customers.d.cts +4 -0
- package/lib/resources/customers.d.ts +4 -0
- package/lib/resources/customers.js +82 -0
- package/lib/resources/customers.js.map +1 -0
- package/lib/resources/delivery_lead_times.cjs +52 -0
- package/lib/resources/delivery_lead_times.cjs.map +1 -0
- package/lib/resources/delivery_lead_times.d.cts +4 -0
- package/lib/resources/delivery_lead_times.d.ts +4 -0
- package/lib/resources/delivery_lead_times.js +48 -0
- package/lib/resources/delivery_lead_times.js.map +1 -0
- package/lib/resources/discount_engine_items.cjs +35 -0
- package/lib/resources/discount_engine_items.cjs.map +1 -0
- package/lib/resources/discount_engine_items.d.cts +4 -0
- package/lib/resources/discount_engine_items.d.ts +4 -0
- package/lib/resources/discount_engine_items.js +31 -0
- package/lib/resources/discount_engine_items.js.map +1 -0
- package/lib/resources/discount_engines.cjs +43 -0
- package/lib/resources/discount_engines.cjs.map +1 -0
- package/lib/resources/discount_engines.d.cts +4 -0
- package/lib/resources/discount_engines.d.ts +4 -0
- package/lib/resources/discount_engines.js +39 -0
- package/lib/resources/discount_engines.js.map +1 -0
- package/lib/resources/easypost_pickups.cjs +51 -0
- package/lib/resources/easypost_pickups.cjs.map +1 -0
- package/lib/resources/easypost_pickups.d.cts +4 -0
- package/lib/resources/easypost_pickups.d.ts +4 -0
- package/lib/resources/easypost_pickups.js +47 -0
- package/lib/resources/easypost_pickups.js.map +1 -0
- package/lib/resources/event_callbacks.cjs +31 -0
- package/lib/resources/event_callbacks.cjs.map +1 -0
- package/lib/resources/event_callbacks.d.cts +4 -0
- package/lib/resources/event_callbacks.d.ts +4 -0
- package/lib/resources/event_callbacks.js +27 -0
- package/lib/resources/event_callbacks.js.map +1 -0
- package/lib/resources/events.cjs +41 -0
- package/lib/resources/events.cjs.map +1 -0
- package/lib/resources/events.d.cts +4 -0
- package/lib/resources/events.d.ts +4 -0
- package/lib/resources/events.js +37 -0
- package/lib/resources/events.js.map +1 -0
- package/lib/resources/exports.cjs +47 -0
- package/lib/resources/exports.cjs.map +1 -0
- package/lib/resources/exports.d.cts +4 -0
- package/lib/resources/exports.d.ts +4 -0
- package/lib/resources/exports.js +43 -0
- package/lib/resources/exports.js.map +1 -0
- package/lib/resources/external_gateways.cjs +51 -0
- package/lib/resources/external_gateways.cjs.map +1 -0
- package/lib/resources/external_gateways.d.cts +4 -0
- package/lib/resources/external_gateways.d.ts +4 -0
- package/lib/resources/external_gateways.js +47 -0
- package/lib/resources/external_gateways.js.map +1 -0
- package/lib/resources/external_payments.cjs +52 -0
- package/lib/resources/external_payments.cjs.map +1 -0
- package/lib/resources/external_payments.d.cts +4 -0
- package/lib/resources/external_payments.d.ts +4 -0
- package/lib/resources/external_payments.js +48 -0
- package/lib/resources/external_payments.js.map +1 -0
- package/lib/resources/external_promotions.cjs +99 -0
- package/lib/resources/external_promotions.cjs.map +1 -0
- package/lib/resources/external_promotions.d.cts +4 -0
- package/lib/resources/external_promotions.d.ts +4 -0
- package/lib/resources/external_promotions.js +95 -0
- package/lib/resources/external_promotions.js.map +1 -0
- package/lib/resources/external_tax_calculators.cjs +55 -0
- package/lib/resources/external_tax_calculators.cjs.map +1 -0
- package/lib/resources/external_tax_calculators.d.cts +4 -0
- package/lib/resources/external_tax_calculators.d.ts +4 -0
- package/lib/resources/external_tax_calculators.js +51 -0
- package/lib/resources/external_tax_calculators.js.map +1 -0
- package/lib/resources/fixed_amount_promotions.cjs +96 -0
- package/lib/resources/fixed_amount_promotions.cjs.map +1 -0
- package/lib/resources/fixed_amount_promotions.d.cts +4 -0
- package/lib/resources/fixed_amount_promotions.d.ts +4 -0
- package/lib/resources/fixed_amount_promotions.js +92 -0
- package/lib/resources/fixed_amount_promotions.js.map +1 -0
- package/lib/resources/fixed_price_promotions.cjs +96 -0
- package/lib/resources/fixed_price_promotions.cjs.map +1 -0
- package/lib/resources/fixed_price_promotions.d.cts +4 -0
- package/lib/resources/fixed_price_promotions.d.ts +4 -0
- package/lib/resources/fixed_price_promotions.js +92 -0
- package/lib/resources/fixed_price_promotions.js.map +1 -0
- package/lib/resources/flex_promotions.cjs +72 -0
- package/lib/resources/flex_promotions.cjs.map +1 -0
- package/lib/resources/flex_promotions.d.cts +4 -0
- package/lib/resources/flex_promotions.d.ts +4 -0
- package/lib/resources/flex_promotions.js +68 -0
- package/lib/resources/flex_promotions.js.map +1 -0
- package/lib/resources/free_gift_promotions.cjs +96 -0
- package/lib/resources/free_gift_promotions.cjs.map +1 -0
- package/lib/resources/free_gift_promotions.d.cts +4 -0
- package/lib/resources/free_gift_promotions.d.ts +4 -0
- package/lib/resources/free_gift_promotions.js +92 -0
- package/lib/resources/free_gift_promotions.js.map +1 -0
- package/lib/resources/free_shipping_promotions.cjs +92 -0
- package/lib/resources/free_shipping_promotions.cjs.map +1 -0
- package/lib/resources/free_shipping_promotions.d.cts +4 -0
- package/lib/resources/free_shipping_promotions.d.ts +4 -0
- package/lib/resources/free_shipping_promotions.js +88 -0
- package/lib/resources/free_shipping_promotions.js.map +1 -0
- package/lib/resources/geocoders.cjs +39 -0
- package/lib/resources/geocoders.cjs.map +1 -0
- package/lib/resources/geocoders.d.cts +4 -0
- package/lib/resources/geocoders.d.ts +4 -0
- package/lib/resources/geocoders.js +35 -0
- package/lib/resources/geocoders.js.map +1 -0
- package/lib/resources/gift_card_recipients.cjs +48 -0
- package/lib/resources/gift_card_recipients.cjs.map +1 -0
- package/lib/resources/gift_card_recipients.d.cts +4 -0
- package/lib/resources/gift_card_recipients.d.ts +4 -0
- package/lib/resources/gift_card_recipients.js +44 -0
- package/lib/resources/gift_card_recipients.js.map +1 -0
- package/lib/resources/gift_cards.cjs +78 -0
- package/lib/resources/gift_cards.cjs.map +1 -0
- package/lib/resources/gift_cards.d.cts +4 -0
- package/lib/resources/gift_cards.d.ts +4 -0
- package/lib/resources/gift_cards.js +74 -0
- package/lib/resources/gift_cards.js.map +1 -0
- package/lib/resources/google_geocoders.cjs +48 -0
- package/lib/resources/google_geocoders.cjs.map +1 -0
- package/lib/resources/google_geocoders.d.cts +4 -0
- package/lib/resources/google_geocoders.d.ts +4 -0
- package/lib/resources/google_geocoders.js +44 -0
- package/lib/resources/google_geocoders.js.map +1 -0
- package/lib/resources/imports.cjs +43 -0
- package/lib/resources/imports.cjs.map +1 -0
- package/lib/resources/imports.d.cts +4 -0
- package/lib/resources/imports.d.ts +4 -0
- package/lib/resources/imports.js +39 -0
- package/lib/resources/imports.js.map +1 -0
- package/lib/resources/in_stock_subscriptions.cjs +62 -0
- package/lib/resources/in_stock_subscriptions.cjs.map +1 -0
- package/lib/resources/in_stock_subscriptions.d.cts +4 -0
- package/lib/resources/in_stock_subscriptions.d.ts +4 -0
- package/lib/resources/in_stock_subscriptions.js +58 -0
- package/lib/resources/in_stock_subscriptions.js.map +1 -0
- package/lib/resources/inventory_models.cjs +52 -0
- package/lib/resources/inventory_models.cjs.map +1 -0
- package/lib/resources/inventory_models.d.cts +4 -0
- package/lib/resources/inventory_models.d.ts +4 -0
- package/lib/resources/inventory_models.js +48 -0
- package/lib/resources/inventory_models.js.map +1 -0
- package/lib/resources/inventory_return_locations.cjs +48 -0
- package/lib/resources/inventory_return_locations.cjs.map +1 -0
- package/lib/resources/inventory_return_locations.d.cts +4 -0
- package/lib/resources/inventory_return_locations.d.ts +4 -0
- package/lib/resources/inventory_return_locations.js +44 -0
- package/lib/resources/inventory_return_locations.js.map +1 -0
- package/lib/resources/inventory_stock_locations.cjs +48 -0
- package/lib/resources/inventory_stock_locations.cjs.map +1 -0
- package/lib/resources/inventory_stock_locations.d.cts +4 -0
- package/lib/resources/inventory_stock_locations.d.ts +4 -0
- package/lib/resources/inventory_stock_locations.js +44 -0
- package/lib/resources/inventory_stock_locations.js.map +1 -0
- package/lib/resources/klarna_gateways.cjs +48 -0
- package/lib/resources/klarna_gateways.cjs.map +1 -0
- package/lib/resources/klarna_gateways.d.cts +4 -0
- package/lib/resources/klarna_gateways.d.ts +4 -0
- package/lib/resources/klarna_gateways.js +44 -0
- package/lib/resources/klarna_gateways.js.map +1 -0
- package/lib/resources/klarna_payments.cjs +51 -0
- package/lib/resources/klarna_payments.cjs.map +1 -0
- package/lib/resources/klarna_payments.d.cts +4 -0
- package/lib/resources/klarna_payments.d.ts +4 -0
- package/lib/resources/klarna_payments.js +47 -0
- package/lib/resources/klarna_payments.js.map +1 -0
- package/lib/resources/line_item_options.cjs +58 -0
- package/lib/resources/line_item_options.cjs.map +1 -0
- package/lib/resources/line_item_options.d.cts +4 -0
- package/lib/resources/line_item_options.d.ts +4 -0
- package/lib/resources/line_item_options.js +54 -0
- package/lib/resources/line_item_options.js.map +1 -0
- package/lib/resources/line_items.cjs +87 -0
- package/lib/resources/line_items.cjs.map +1 -0
- package/lib/resources/line_items.d.cts +4 -0
- package/lib/resources/line_items.d.ts +4 -0
- package/lib/resources/line_items.js +83 -0
- package/lib/resources/line_items.js.map +1 -0
- package/lib/resources/links.cjs +46 -0
- package/lib/resources/links.cjs.map +1 -0
- package/lib/resources/links.d.cts +4 -0
- package/lib/resources/links.d.ts +4 -0
- package/lib/resources/links.js +42 -0
- package/lib/resources/links.js.map +1 -0
- package/lib/resources/manual_gateways.cjs +44 -0
- package/lib/resources/manual_gateways.cjs.map +1 -0
- package/lib/resources/manual_gateways.d.cts +4 -0
- package/lib/resources/manual_gateways.d.ts +4 -0
- package/lib/resources/manual_gateways.js +40 -0
- package/lib/resources/manual_gateways.js.map +1 -0
- package/lib/resources/manual_tax_calculators.cjs +56 -0
- package/lib/resources/manual_tax_calculators.cjs.map +1 -0
- package/lib/resources/manual_tax_calculators.d.cts +4 -0
- package/lib/resources/manual_tax_calculators.d.ts +4 -0
- package/lib/resources/manual_tax_calculators.js +52 -0
- package/lib/resources/manual_tax_calculators.js.map +1 -0
- package/lib/resources/markets.cjs +98 -0
- package/lib/resources/markets.cjs.map +1 -0
- package/lib/resources/markets.d.cts +4 -0
- package/lib/resources/markets.d.ts +4 -0
- package/lib/resources/markets.js +94 -0
- package/lib/resources/markets.js.map +1 -0
- package/lib/resources/merchants.cjs +48 -0
- package/lib/resources/merchants.cjs.map +1 -0
- package/lib/resources/merchants.d.cts +4 -0
- package/lib/resources/merchants.d.ts +4 -0
- package/lib/resources/merchants.js +44 -0
- package/lib/resources/merchants.js.map +1 -0
- package/lib/resources/notifications.cjs +36 -0
- package/lib/resources/notifications.cjs.map +1 -0
- package/lib/resources/notifications.d.cts +4 -0
- package/lib/resources/notifications.d.ts +4 -0
- package/lib/resources/notifications.js +32 -0
- package/lib/resources/notifications.js.map +1 -0
- package/lib/resources/order_amount_promotion_rules.cjs +40 -0
- package/lib/resources/order_amount_promotion_rules.cjs.map +1 -0
- package/lib/resources/order_amount_promotion_rules.d.cts +4 -0
- package/lib/resources/order_amount_promotion_rules.d.ts +4 -0
- package/lib/resources/order_amount_promotion_rules.js +36 -0
- package/lib/resources/order_amount_promotion_rules.js.map +1 -0
- package/lib/resources/order_copies.cjs +52 -0
- package/lib/resources/order_copies.cjs.map +1 -0
- package/lib/resources/order_copies.d.cts +4 -0
- package/lib/resources/order_copies.d.ts +4 -0
- package/lib/resources/order_copies.js +48 -0
- package/lib/resources/order_copies.js.map +1 -0
- package/lib/resources/order_factories.cjs +39 -0
- package/lib/resources/order_factories.cjs.map +1 -0
- package/lib/resources/order_factories.d.cts +4 -0
- package/lib/resources/order_factories.d.ts +4 -0
- package/lib/resources/order_factories.js +35 -0
- package/lib/resources/order_factories.js.map +1 -0
- package/lib/resources/order_subscription_items.cjs +44 -0
- package/lib/resources/order_subscription_items.cjs.map +1 -0
- package/lib/resources/order_subscription_items.d.cts +4 -0
- package/lib/resources/order_subscription_items.d.ts +4 -0
- package/lib/resources/order_subscription_items.js +40 -0
- package/lib/resources/order_subscription_items.js.map +1 -0
- package/lib/resources/order_subscriptions.cjs +102 -0
- package/lib/resources/order_subscriptions.cjs.map +1 -0
- package/lib/resources/order_subscriptions.d.cts +4 -0
- package/lib/resources/order_subscriptions.d.ts +4 -0
- package/lib/resources/order_subscriptions.js +98 -0
- package/lib/resources/order_subscriptions.js.map +1 -0
- package/lib/resources/orders.cjs +279 -0
- package/lib/resources/orders.cjs.map +1 -0
- package/lib/resources/orders.d.cts +4 -0
- package/lib/resources/orders.d.ts +4 -0
- package/lib/resources/orders.js +275 -0
- package/lib/resources/orders.js.map +1 -0
- package/lib/resources/organizations.cjs +30 -0
- package/lib/resources/organizations.cjs.map +1 -0
- package/lib/resources/organizations.d.cts +4 -0
- package/lib/resources/organizations.d.ts +4 -0
- package/lib/resources/organizations.js +26 -0
- package/lib/resources/organizations.js.map +1 -0
- package/lib/resources/packages.cjs +52 -0
- package/lib/resources/packages.cjs.map +1 -0
- package/lib/resources/packages.d.cts +4 -0
- package/lib/resources/packages.d.ts +4 -0
- package/lib/resources/packages.js +48 -0
- package/lib/resources/packages.js.map +1 -0
- package/lib/resources/parcel_line_items.cjs +48 -0
- package/lib/resources/parcel_line_items.cjs.map +1 -0
- package/lib/resources/parcel_line_items.d.cts +4 -0
- package/lib/resources/parcel_line_items.d.ts +4 -0
- package/lib/resources/parcel_line_items.js +44 -0
- package/lib/resources/parcel_line_items.js.map +1 -0
- package/lib/resources/parcels.cjs +60 -0
- package/lib/resources/parcels.cjs.map +1 -0
- package/lib/resources/parcels.d.cts +4 -0
- package/lib/resources/parcels.d.ts +4 -0
- package/lib/resources/parcels.js +56 -0
- package/lib/resources/parcels.js.map +1 -0
- package/lib/resources/payment_gateways.cjs +35 -0
- package/lib/resources/payment_gateways.cjs.map +1 -0
- package/lib/resources/payment_gateways.d.cts +4 -0
- package/lib/resources/payment_gateways.d.ts +4 -0
- package/lib/resources/payment_gateways.js +31 -0
- package/lib/resources/payment_gateways.js.map +1 -0
- package/lib/resources/payment_methods.cjs +66 -0
- package/lib/resources/payment_methods.cjs.map +1 -0
- package/lib/resources/payment_methods.d.cts +4 -0
- package/lib/resources/payment_methods.d.ts +4 -0
- package/lib/resources/payment_methods.js +62 -0
- package/lib/resources/payment_methods.js.map +1 -0
- package/lib/resources/payment_options.cjs +44 -0
- package/lib/resources/payment_options.cjs.map +1 -0
- package/lib/resources/payment_options.d.cts +4 -0
- package/lib/resources/payment_options.d.ts +4 -0
- package/lib/resources/payment_options.js +40 -0
- package/lib/resources/payment_options.js.map +1 -0
- package/lib/resources/paypal_gateways.cjs +48 -0
- package/lib/resources/paypal_gateways.cjs.map +1 -0
- package/lib/resources/paypal_gateways.d.cts +4 -0
- package/lib/resources/paypal_gateways.d.ts +4 -0
- package/lib/resources/paypal_gateways.js +44 -0
- package/lib/resources/paypal_gateways.js.map +1 -0
- package/lib/resources/paypal_payments.cjs +48 -0
- package/lib/resources/paypal_payments.cjs.map +1 -0
- package/lib/resources/paypal_payments.d.cts +4 -0
- package/lib/resources/paypal_payments.d.ts +4 -0
- package/lib/resources/paypal_payments.js +44 -0
- package/lib/resources/paypal_payments.js.map +1 -0
- package/lib/resources/percentage_discount_promotions.cjs +96 -0
- package/lib/resources/percentage_discount_promotions.cjs.map +1 -0
- package/lib/resources/percentage_discount_promotions.d.cts +4 -0
- package/lib/resources/percentage_discount_promotions.d.ts +4 -0
- package/lib/resources/percentage_discount_promotions.js +92 -0
- package/lib/resources/percentage_discount_promotions.js.map +1 -0
- package/lib/resources/pickups.cjs +39 -0
- package/lib/resources/pickups.cjs.map +1 -0
- package/lib/resources/pickups.d.cts +4 -0
- package/lib/resources/pickups.d.ts +4 -0
- package/lib/resources/pickups.js +35 -0
- package/lib/resources/pickups.js.map +1 -0
- package/lib/resources/price_frequency_tiers.cjs +52 -0
- package/lib/resources/price_frequency_tiers.cjs.map +1 -0
- package/lib/resources/price_frequency_tiers.d.cts +4 -0
- package/lib/resources/price_frequency_tiers.d.ts +4 -0
- package/lib/resources/price_frequency_tiers.js +48 -0
- package/lib/resources/price_frequency_tiers.js.map +1 -0
- package/lib/resources/price_list_schedulers.cjs +58 -0
- package/lib/resources/price_list_schedulers.cjs.map +1 -0
- package/lib/resources/price_list_schedulers.d.cts +4 -0
- package/lib/resources/price_list_schedulers.d.ts +4 -0
- package/lib/resources/price_list_schedulers.js +54 -0
- package/lib/resources/price_list_schedulers.js.map +1 -0
- package/lib/resources/price_lists.cjs +52 -0
- package/lib/resources/price_lists.cjs.map +1 -0
- package/lib/resources/price_lists.d.cts +4 -0
- package/lib/resources/price_lists.d.ts +4 -0
- package/lib/resources/price_lists.js +48 -0
- package/lib/resources/price_lists.js.map +1 -0
- package/lib/resources/price_tiers.cjs +39 -0
- package/lib/resources/price_tiers.cjs.map +1 -0
- package/lib/resources/price_tiers.d.cts +4 -0
- package/lib/resources/price_tiers.d.ts +4 -0
- package/lib/resources/price_tiers.js +35 -0
- package/lib/resources/price_tiers.js.map +1 -0
- package/lib/resources/price_volume_tiers.cjs +52 -0
- package/lib/resources/price_volume_tiers.cjs.map +1 -0
- package/lib/resources/price_volume_tiers.d.cts +4 -0
- package/lib/resources/price_volume_tiers.d.ts +4 -0
- package/lib/resources/price_volume_tiers.js +48 -0
- package/lib/resources/price_volume_tiers.js.map +1 -0
- package/lib/resources/prices.cjs +76 -0
- package/lib/resources/prices.cjs.map +1 -0
- package/lib/resources/prices.d.cts +4 -0
- package/lib/resources/prices.d.ts +4 -0
- package/lib/resources/prices.js +72 -0
- package/lib/resources/prices.js.map +1 -0
- package/lib/resources/promotion_rules.cjs +31 -0
- package/lib/resources/promotion_rules.cjs.map +1 -0
- package/lib/resources/promotion_rules.d.cts +4 -0
- package/lib/resources/promotion_rules.d.ts +4 -0
- package/lib/resources/promotion_rules.js +27 -0
- package/lib/resources/promotion_rules.js.map +1 -0
- package/lib/resources/promotions.cjs +71 -0
- package/lib/resources/promotions.cjs.map +1 -0
- package/lib/resources/promotions.d.cts +4 -0
- package/lib/resources/promotions.d.ts +4 -0
- package/lib/resources/promotions.js +67 -0
- package/lib/resources/promotions.js.map +1 -0
- package/lib/resources/recurring_order_copies.cjs +52 -0
- package/lib/resources/recurring_order_copies.cjs.map +1 -0
- package/lib/resources/recurring_order_copies.d.cts +4 -0
- package/lib/resources/recurring_order_copies.d.ts +4 -0
- package/lib/resources/recurring_order_copies.js +48 -0
- package/lib/resources/recurring_order_copies.js.map +1 -0
- package/lib/resources/refunds.cjs +57 -0
- package/lib/resources/refunds.cjs.map +1 -0
- package/lib/resources/refunds.d.cts +4 -0
- package/lib/resources/refunds.d.ts +4 -0
- package/lib/resources/refunds.js +53 -0
- package/lib/resources/refunds.js.map +1 -0
- package/lib/resources/reserved_stocks.cjs +43 -0
- package/lib/resources/reserved_stocks.cjs.map +1 -0
- package/lib/resources/reserved_stocks.d.cts +4 -0
- package/lib/resources/reserved_stocks.d.ts +4 -0
- package/lib/resources/reserved_stocks.js +39 -0
- package/lib/resources/reserved_stocks.js.map +1 -0
- package/lib/resources/resource_errors.cjs +27 -0
- package/lib/resources/resource_errors.cjs.map +1 -0
- package/lib/resources/resource_errors.d.cts +4 -0
- package/lib/resources/resource_errors.d.ts +4 -0
- package/lib/resources/resource_errors.js +23 -0
- package/lib/resources/resource_errors.js.map +1 -0
- package/lib/resources/return_line_items.cjs +47 -0
- package/lib/resources/return_line_items.cjs.map +1 -0
- package/lib/resources/return_line_items.d.cts +4 -0
- package/lib/resources/return_line_items.d.ts +4 -0
- package/lib/resources/return_line_items.js +43 -0
- package/lib/resources/return_line_items.js.map +1 -0
- package/lib/resources/returns.cjs +127 -0
- package/lib/resources/returns.cjs.map +1 -0
- package/lib/resources/returns.d.cts +4 -0
- package/lib/resources/returns.d.ts +4 -0
- package/lib/resources/returns.js +123 -0
- package/lib/resources/returns.js.map +1 -0
- package/lib/resources/satispay_gateways.cjs +48 -0
- package/lib/resources/satispay_gateways.cjs.map +1 -0
- package/lib/resources/satispay_gateways.d.cts +4 -0
- package/lib/resources/satispay_gateways.d.ts +4 -0
- package/lib/resources/satispay_gateways.js +44 -0
- package/lib/resources/satispay_gateways.js.map +1 -0
- package/lib/resources/satispay_payments.cjs +51 -0
- package/lib/resources/satispay_payments.cjs.map +1 -0
- package/lib/resources/satispay_payments.d.cts +4 -0
- package/lib/resources/satispay_payments.d.ts +4 -0
- package/lib/resources/satispay_payments.js +47 -0
- package/lib/resources/satispay_payments.js.map +1 -0
- package/lib/resources/shipments.cjs +157 -0
- package/lib/resources/shipments.cjs.map +1 -0
- package/lib/resources/shipments.d.cts +4 -0
- package/lib/resources/shipments.d.ts +4 -0
- package/lib/resources/shipments.js +153 -0
- package/lib/resources/shipments.js.map +1 -0
- package/lib/resources/shipping_categories.cjs +48 -0
- package/lib/resources/shipping_categories.cjs.map +1 -0
- package/lib/resources/shipping_categories.d.cts +4 -0
- package/lib/resources/shipping_categories.d.ts +4 -0
- package/lib/resources/shipping_categories.js +44 -0
- package/lib/resources/shipping_categories.js.map +1 -0
- package/lib/resources/shipping_method_tiers.cjs +39 -0
- package/lib/resources/shipping_method_tiers.cjs.map +1 -0
- package/lib/resources/shipping_method_tiers.d.cts +4 -0
- package/lib/resources/shipping_method_tiers.d.ts +4 -0
- package/lib/resources/shipping_method_tiers.js +35 -0
- package/lib/resources/shipping_method_tiers.js.map +1 -0
- package/lib/resources/shipping_methods.cjs +85 -0
- package/lib/resources/shipping_methods.cjs.map +1 -0
- package/lib/resources/shipping_methods.d.cts +4 -0
- package/lib/resources/shipping_methods.d.ts +4 -0
- package/lib/resources/shipping_methods.js +81 -0
- package/lib/resources/shipping_methods.js.map +1 -0
- package/lib/resources/shipping_weight_tiers.cjs +48 -0
- package/lib/resources/shipping_weight_tiers.cjs.map +1 -0
- package/lib/resources/shipping_weight_tiers.d.cts +4 -0
- package/lib/resources/shipping_weight_tiers.d.ts +4 -0
- package/lib/resources/shipping_weight_tiers.js +44 -0
- package/lib/resources/shipping_weight_tiers.js.map +1 -0
- package/lib/resources/shipping_zones.cjs +44 -0
- package/lib/resources/shipping_zones.cjs.map +1 -0
- package/lib/resources/shipping_zones.d.cts +4 -0
- package/lib/resources/shipping_zones.d.ts +4 -0
- package/lib/resources/shipping_zones.js +40 -0
- package/lib/resources/shipping_zones.js.map +1 -0
- package/lib/resources/sku_list_items.cjs +48 -0
- package/lib/resources/sku_list_items.cjs.map +1 -0
- package/lib/resources/sku_list_items.d.cts +4 -0
- package/lib/resources/sku_list_items.d.ts +4 -0
- package/lib/resources/sku_list_items.js +44 -0
- package/lib/resources/sku_list_items.js.map +1 -0
- package/lib/resources/sku_list_promotion_rules.cjs +48 -0
- package/lib/resources/sku_list_promotion_rules.cjs.map +1 -0
- package/lib/resources/sku_list_promotion_rules.d.cts +4 -0
- package/lib/resources/sku_list_promotion_rules.d.ts +4 -0
- package/lib/resources/sku_list_promotion_rules.js +44 -0
- package/lib/resources/sku_list_promotion_rules.js.map +1 -0
- package/lib/resources/sku_lists.cjs +64 -0
- package/lib/resources/sku_lists.cjs.map +1 -0
- package/lib/resources/sku_lists.d.cts +4 -0
- package/lib/resources/sku_lists.d.ts +4 -0
- package/lib/resources/sku_lists.js +60 -0
- package/lib/resources/sku_lists.js.map +1 -0
- package/lib/resources/sku_options.cjs +62 -0
- package/lib/resources/sku_options.cjs.map +1 -0
- package/lib/resources/sku_options.d.cts +4 -0
- package/lib/resources/sku_options.d.ts +4 -0
- package/lib/resources/sku_options.js +58 -0
- package/lib/resources/sku_options.js.map +1 -0
- package/lib/resources/skus.cjs +106 -0
- package/lib/resources/skus.cjs.map +1 -0
- package/lib/resources/skus.d.cts +4 -0
- package/lib/resources/skus.d.ts +4 -0
- package/lib/resources/skus.js +102 -0
- package/lib/resources/skus.js.map +1 -0
- package/lib/resources/stock_items.cjs +63 -0
- package/lib/resources/stock_items.cjs.map +1 -0
- package/lib/resources/stock_items.d.cts +4 -0
- package/lib/resources/stock_items.d.ts +4 -0
- package/lib/resources/stock_items.js +59 -0
- package/lib/resources/stock_items.js.map +1 -0
- package/lib/resources/stock_line_items.cjs +69 -0
- package/lib/resources/stock_line_items.cjs.map +1 -0
- package/lib/resources/stock_line_items.d.cts +4 -0
- package/lib/resources/stock_line_items.d.ts +4 -0
- package/lib/resources/stock_line_items.js +65 -0
- package/lib/resources/stock_line_items.js.map +1 -0
- package/lib/resources/stock_locations.cjs +68 -0
- package/lib/resources/stock_locations.cjs.map +1 -0
- package/lib/resources/stock_locations.d.cts +4 -0
- package/lib/resources/stock_locations.d.ts +4 -0
- package/lib/resources/stock_locations.js +64 -0
- package/lib/resources/stock_locations.js.map +1 -0
- package/lib/resources/stock_reservations.cjs +67 -0
- package/lib/resources/stock_reservations.cjs.map +1 -0
- package/lib/resources/stock_reservations.d.cts +4 -0
- package/lib/resources/stock_reservations.d.ts +4 -0
- package/lib/resources/stock_reservations.js +63 -0
- package/lib/resources/stock_reservations.js.map +1 -0
- package/lib/resources/stock_transfers.cjs +90 -0
- package/lib/resources/stock_transfers.cjs.map +1 -0
- package/lib/resources/stock_transfers.d.cts +4 -0
- package/lib/resources/stock_transfers.d.ts +4 -0
- package/lib/resources/stock_transfers.js +86 -0
- package/lib/resources/stock_transfers.js.map +1 -0
- package/lib/resources/stores.cjs +64 -0
- package/lib/resources/stores.cjs.map +1 -0
- package/lib/resources/stores.d.cts +4 -0
- package/lib/resources/stores.d.ts +4 -0
- package/lib/resources/stores.js +60 -0
- package/lib/resources/stores.js.map +1 -0
- package/lib/resources/stripe_gateways.cjs +48 -0
- package/lib/resources/stripe_gateways.cjs.map +1 -0
- package/lib/resources/stripe_gateways.d.cts +4 -0
- package/lib/resources/stripe_gateways.d.ts +4 -0
- package/lib/resources/stripe_gateways.js +44 -0
- package/lib/resources/stripe_gateways.js.map +1 -0
- package/lib/resources/stripe_payments.cjs +54 -0
- package/lib/resources/stripe_payments.cjs.map +1 -0
- package/lib/resources/stripe_payments.d.cts +4 -0
- package/lib/resources/stripe_payments.d.ts +4 -0
- package/lib/resources/stripe_payments.js +50 -0
- package/lib/resources/stripe_payments.js.map +1 -0
- package/lib/resources/stripe_tax_accounts.cjs +56 -0
- package/lib/resources/stripe_tax_accounts.cjs.map +1 -0
- package/lib/resources/stripe_tax_accounts.d.cts +4 -0
- package/lib/resources/stripe_tax_accounts.d.ts +4 -0
- package/lib/resources/stripe_tax_accounts.js +52 -0
- package/lib/resources/stripe_tax_accounts.js.map +1 -0
- package/lib/resources/subscription_models.cjs +48 -0
- package/lib/resources/subscription_models.cjs.map +1 -0
- package/lib/resources/subscription_models.d.cts +4 -0
- package/lib/resources/subscription_models.d.ts +4 -0
- package/lib/resources/subscription_models.js +44 -0
- package/lib/resources/subscription_models.js.map +1 -0
- package/lib/resources/tags.cjs +36 -0
- package/lib/resources/tags.cjs.map +1 -0
- package/lib/resources/tags.d.cts +4 -0
- package/lib/resources/tags.d.ts +4 -0
- package/lib/resources/tags.js +32 -0
- package/lib/resources/tags.js.map +1 -0
- package/lib/resources/talon_one_accounts.cjs +52 -0
- package/lib/resources/talon_one_accounts.cjs.map +1 -0
- package/lib/resources/talon_one_accounts.d.cts +4 -0
- package/lib/resources/talon_one_accounts.d.ts +4 -0
- package/lib/resources/talon_one_accounts.js +48 -0
- package/lib/resources/talon_one_accounts.js.map +1 -0
- package/lib/resources/tax_calculators.cjs +43 -0
- package/lib/resources/tax_calculators.cjs.map +1 -0
- package/lib/resources/tax_calculators.d.cts +4 -0
- package/lib/resources/tax_calculators.d.ts +4 -0
- package/lib/resources/tax_calculators.js +39 -0
- package/lib/resources/tax_calculators.js.map +1 -0
- package/lib/resources/tax_categories.cjs +48 -0
- package/lib/resources/tax_categories.cjs.map +1 -0
- package/lib/resources/tax_categories.d.cts +4 -0
- package/lib/resources/tax_categories.d.ts +4 -0
- package/lib/resources/tax_categories.js +44 -0
- package/lib/resources/tax_categories.js.map +1 -0
- package/lib/resources/tax_rules.cjs +44 -0
- package/lib/resources/tax_rules.cjs.map +1 -0
- package/lib/resources/tax_rules.d.cts +4 -0
- package/lib/resources/tax_rules.d.ts +4 -0
- package/lib/resources/tax_rules.js +40 -0
- package/lib/resources/tax_rules.js.map +1 -0
- package/lib/resources/taxjar_accounts.cjs +56 -0
- package/lib/resources/taxjar_accounts.cjs.map +1 -0
- package/lib/resources/taxjar_accounts.d.cts +4 -0
- package/lib/resources/taxjar_accounts.d.ts +4 -0
- package/lib/resources/taxjar_accounts.js +52 -0
- package/lib/resources/taxjar_accounts.js.map +1 -0
- package/lib/resources/transactions.cjs +43 -0
- package/lib/resources/transactions.cjs.map +1 -0
- package/lib/resources/transactions.d.cts +4 -0
- package/lib/resources/transactions.d.ts +4 -0
- package/lib/resources/transactions.js +39 -0
- package/lib/resources/transactions.js.map +1 -0
- package/lib/resources/versions.cjs +27 -0
- package/lib/resources/versions.cjs.map +1 -0
- package/lib/resources/versions.d.cts +4 -0
- package/lib/resources/versions.d.ts +4 -0
- package/lib/resources/versions.js +23 -0
- package/lib/resources/versions.js.map +1 -0
- package/lib/resources/vertex_accounts.cjs +55 -0
- package/lib/resources/vertex_accounts.cjs.map +1 -0
- package/lib/resources/vertex_accounts.d.cts +4 -0
- package/lib/resources/vertex_accounts.d.ts +4 -0
- package/lib/resources/vertex_accounts.js +51 -0
- package/lib/resources/vertex_accounts.js.map +1 -0
- package/lib/resources/voids.cjs +53 -0
- package/lib/resources/voids.cjs.map +1 -0
- package/lib/resources/voids.d.cts +4 -0
- package/lib/resources/voids.d.ts +4 -0
- package/lib/resources/voids.js +49 -0
- package/lib/resources/voids.js.map +1 -0
- package/lib/resources/webhooks.cjs +53 -0
- package/lib/resources/webhooks.cjs.map +1 -0
- package/lib/resources/webhooks.d.cts +4 -0
- package/lib/resources/webhooks.d.ts +4 -0
- package/lib/resources/webhooks.js +49 -0
- package/lib/resources/webhooks.js.map +1 -0
- package/lib/resources/wire_transfers.cjs +44 -0
- package/lib/resources/wire_transfers.cjs.map +1 -0
- package/lib/resources/wire_transfers.d.cts +4 -0
- package/lib/resources/wire_transfers.d.ts +4 -0
- package/lib/resources/wire_transfers.js +40 -0
- package/lib/resources/wire_transfers.js.map +1 -0
- package/lib/static.cjs +49 -0
- package/lib/static.cjs.map +1 -0
- package/lib/static.d.cts +22 -0
- package/lib/static.d.ts +22 -0
- package/lib/static.js +47 -0
- package/lib/static.js.map +1 -0
- package/lib/types.cjs +4 -0
- package/lib/types.cjs.map +1 -0
- package/lib/types.d.cts +7 -0
- package/lib/types.d.ts +7 -0
- package/lib/types.js +3 -0
- package/lib/types.js.map +1 -0
- package/lib/util.cjs +39 -0
- package/lib/util.cjs.map +1 -0
- package/lib/util.d.cts +13 -0
- package/lib/util.d.ts +13 -0
- package/lib/util.js +34 -0
- package/lib/util.js.map +1 -0
- package/package.json +8 -10
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/buy_x_pay_y_promotions.ts"],"names":[],"mappings":";;AA0RA,MAAM,2BAA2B,WAA+B,CAAA;AAAA,EAE/D,OAAgB,IAA8B,GAAA,wBAAA;AAAA,EAE9C,MAAM,MAAA,CAAO,QAAmC,EAAA,MAAA,EAAiD,OAAuD,EAAA;AACvJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,EAEA,MAAM,MAAA,CAAO,QAAmC,EAAA,MAAA,EAAiD,OAAuD,EAAA;AACvJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,kBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,kBAAA,CAAmB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC1G,EAEA,MAAM,MAAA,CAAO,mBAAiD,EAAA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,kBAAmB,CAAA,IAAA;AAAA;AAC/D,EAGA,aAAa,EAAsD,EAAA;AAClE,IAAO,OAAA,KAAA,CAAM,qBAA2C,EAAE,CAAA;AAAA;AAC3D,EAEA,sBAAsB,GAAuC,EAAA;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAA4C,CAAA,GAAG,GAAG,CAAA;AAAA;AAChE,EAGA,IAA8B,GAAA;AAC7B,IAAA,OAAO,kBAAmB,CAAA,IAAA;AAAA;AAG5B;AAGA,MAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,8BAAQ,GAAA","file":"buy_x_pay_y_promotions.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Sku } from './skus'\nimport type { PromotionRule } from './promotion_rules'\n\n\ntype BuyXPayYPromotionType = 'buy_x_pay_y_promotions'\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type BuyXPayYPromotionSort = Pick<BuyXPayYPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at' | 'x' | 'y'> & ResourceSort\n// export type BuyXPayYPromotionFilter = Pick<BuyXPayYPromotion, 'id' | 'name' | 'currency_code' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at' | 'x' | 'y'> & ResourceFilter\n\n\ninterface BuyXPayYPromotion extends Resource {\n\t\n\treadonly type: BuyXPayYPromotionType\n\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * The number of times this promotion has been applied.\n\t * @example ```2```\n\t */\n\ttotal_usage_count?: number | null\n\t/** \n\t * Indicates if the promotion is active (enabled and not expired).\n\t * @example ```true```\n\t */\n\tactive?: boolean | null\n\t/** \n\t * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.\n\t * @example ```\"pending\"```\n\t */\n\tstatus?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\t/** \n\t * The quantity which defines the threshold for free items (works by multiple of x).\n\t * @example ```3```\n\t */\n\tx: number\n\t/** \n\t * The quantity which defines how many items you get for free, with the formula x-y.\n\t * @example ```2```\n\t */\n\ty: number\n\t/** \n\t * Indicates if the cheapest items are discounted, allowing all of the SKUs in the associated list to be eligible for counting.\n\t * @example ```true```\n\t */\n\tcheapest_free?: boolean | null\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface BuyXPayYPromotionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * The quantity which defines the threshold for free items (works by multiple of x).\n\t * @example ```3```\n\t */\n\tx: number\n\t/** \n\t * The quantity which defines how many items you get for free, with the formula x-y.\n\t * @example ```2```\n\t */\n\ty: number\n\t/** \n\t * Indicates if the cheapest items are discounted, allowing all of the SKUs in the associated list to be eligible for counting.\n\t * @example ```true```\n\t */\n\tcheapest_free?: boolean | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list: SkuListRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface BuyXPayYPromotionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at?: string | null\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\t/** \n\t * The quantity which defines the threshold for free items (works by multiple of x).\n\t * @example ```3```\n\t */\n\tx?: number | null\n\t/** \n\t * The quantity which defines how many items you get for free, with the formula x-y.\n\t * @example ```2```\n\t */\n\ty?: number | null\n\t/** \n\t * Indicates if the cheapest items are discounted, allowing all of the SKUs in the associated list to be eligible for counting.\n\t * @example ```true```\n\t */\n\tcheapest_free?: boolean | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass BuyXPayYPromotions extends ApiResource<BuyXPayYPromotion> {\n\n\tstatic readonly TYPE: BuyXPayYPromotionType = 'buy_x_pay_y_promotions' as const\n\n\tasync create(resource: BuyXPayYPromotionCreate, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.create<BuyXPayYPromotionCreate, BuyXPayYPromotion>({ ...resource, type: BuyXPayYPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BuyXPayYPromotionUpdate, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ ...resource, type: BuyXPayYPromotions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: BuyXPayYPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync skus(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync _disable(id: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ id: (typeof id === 'string')? id: id.id, type: BuyXPayYPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ id: (typeof id === 'string')? id: id.id, type: BuyXPayYPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | BuyXPayYPromotion, triggerValue: string, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ id: (typeof id === 'string')? id: id.id, type: BuyXPayYPromotions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | BuyXPayYPromotion, triggerValue: string, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ id: (typeof id === 'string')? id: id.id, type: BuyXPayYPromotions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisBuyXPayYPromotion(resource: any): resource is BuyXPayYPromotion {\n\t\treturn resource.type && (resource.type === BuyXPayYPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BuyXPayYPromotionRel {\n\t\treturn super.relationshipOneToOne<BuyXPayYPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BuyXPayYPromotionRel[] {\n\t\treturn super.relationshipOneToMany<BuyXPayYPromotionRel>(...ids)\n\t}\n\n\n\ttype(): BuyXPayYPromotionType {\n\t\treturn BuyXPayYPromotions.TYPE\n\t}\n\n}\n\n\nconst instance = new BuyXPayYPromotions()\nexport default instance\n\nexport type { BuyXPayYPromotion, BuyXPayYPromotionCreate, BuyXPayYPromotionUpdate, BuyXPayYPromotionType }\n"]}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class Captures extends resource.ApiResource {
|
6
|
+
static TYPE = "captures";
|
7
|
+
async update(resource, params, options) {
|
8
|
+
return this.resources.update({ ...resource, type: Captures.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async order(captureId, params, options) {
|
11
|
+
const _captureId = captureId.id || captureId;
|
12
|
+
return this.resources.fetch({ type: "orders" }, `captures/${_captureId}/order`, params, options);
|
13
|
+
}
|
14
|
+
async attachments(captureId, params, options) {
|
15
|
+
const _captureId = captureId.id || captureId;
|
16
|
+
return this.resources.fetch({ type: "attachments" }, `captures/${_captureId}/attachments`, params, options);
|
17
|
+
}
|
18
|
+
async events(captureId, params, options) {
|
19
|
+
const _captureId = captureId.id || captureId;
|
20
|
+
return this.resources.fetch({ type: "events" }, `captures/${_captureId}/events`, params, options);
|
21
|
+
}
|
22
|
+
async versions(captureId, params, options) {
|
23
|
+
const _captureId = captureId.id || captureId;
|
24
|
+
return this.resources.fetch({ type: "versions" }, `captures/${_captureId}/versions`, params, options);
|
25
|
+
}
|
26
|
+
async reference_authorization(captureId, params, options) {
|
27
|
+
const _captureId = captureId.id || captureId;
|
28
|
+
return this.resources.fetch({ type: "authorizations" }, `captures/${_captureId}/reference_authorization`, params, options);
|
29
|
+
}
|
30
|
+
async refunds(captureId, params, options) {
|
31
|
+
const _captureId = captureId.id || captureId;
|
32
|
+
return this.resources.fetch({ type: "refunds" }, `captures/${_captureId}/refunds`, params, options);
|
33
|
+
}
|
34
|
+
async return(captureId, params, options) {
|
35
|
+
const _captureId = captureId.id || captureId;
|
36
|
+
return this.resources.fetch({ type: "returns" }, `captures/${_captureId}/return`, params, options);
|
37
|
+
}
|
38
|
+
async _forward(id, params, options) {
|
39
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: Captures.TYPE, _forward: true }, params, options);
|
40
|
+
}
|
41
|
+
async _refund(id, params, options) {
|
42
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: Captures.TYPE, _refund: true }, params, options);
|
43
|
+
}
|
44
|
+
async _refund_amount_cents(id, triggerValue, params, options) {
|
45
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: Captures.TYPE, _refund_amount_cents: triggerValue }, params, options);
|
46
|
+
}
|
47
|
+
async _cancel(id, params, options) {
|
48
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: Captures.TYPE, _cancel: true }, params, options);
|
49
|
+
}
|
50
|
+
isCapture(resource) {
|
51
|
+
return resource.type && resource.type === Captures.TYPE;
|
52
|
+
}
|
53
|
+
relationship(id) {
|
54
|
+
return super.relationshipOneToOne(id);
|
55
|
+
}
|
56
|
+
relationshipToMany(...ids) {
|
57
|
+
return super.relationshipOneToMany(...ids);
|
58
|
+
}
|
59
|
+
type() {
|
60
|
+
return Captures.TYPE;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
const instance = new Captures();
|
64
|
+
var captures_default = instance;
|
65
|
+
|
66
|
+
module.exports = captures_default;
|
67
|
+
//# sourceMappingURL=captures.cjs.map
|
68
|
+
|
69
|
+
module.exports = exports.default;
|
70
|
+
//# sourceMappingURL=captures.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/captures.ts"],"names":["ApiRes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AA,KAAA,CAAM,qBAAiC,EAAE,CAAA;AAAA;AACjD,EAEA,sBAAsB,GAA6B,EAAA;AAClD,IAAO,OAAA,KAAA,CAAM,qBAAkC,CAAA,GAAG,GAAG,CAAA;AAAA;AACtD,EAGA,IAAoB,GAAA;AACnB,IAAA,OAAO,QAAS,CAAA,IAAA;AAAA;AAGlB;AAGA,MAAM,QAAA,GAAW,IAAI,QAAS,EAAA;AAC9B,IAAO,gBAAQ,GAAA","file":"captures.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order } from './orders'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { Authorization } from './authorizations'\nimport type { Refund } from './refunds'\nimport type { Return } from './returns'\nimport type { AdyenPayment } from './adyen_payments'\nimport type { AxervePayment } from './axerve_payments'\nimport type { BraintreePayment } from './braintree_payments'\nimport type { CheckoutComPayment } from './checkout_com_payments'\nimport type { ExternalPayment } from './external_payments'\nimport type { KlarnaPayment } from './klarna_payments'\nimport type { PaypalPayment } from './paypal_payments'\nimport type { SatispayPayment } from './satispay_payments'\nimport type { StripePayment } from './stripe_payments'\nimport type { WireTransfer } from './wire_transfers'\n\n\ntype CaptureType = 'captures'\ntype CaptureRel = ResourceRel & { type: CaptureType }\n\n\nexport type CaptureSort = Pick<Capture, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type CaptureFilter = Pick<Capture, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Capture extends Resource {\n\t\n\treadonly type: CaptureType\n\n\t/** \n\t * The transaction number, auto generated.\n\t * @example ```\"42/T/001\"```\n\t */\n\tnumber: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, inherited from the associated order.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * The transaction amount, in cents.\n\t * @example ```1500```\n\t */\n\tamount_cents: number\n\t/** \n\t * The transaction amount, float.\n\t * @example ```15```\n\t */\n\tamount_float: number\n\t/** \n\t * The transaction amount, formatted.\n\t * @example ```\"€15,00\"```\n\t */\n\tformatted_amount: string\n\t/** \n\t * Indicates if the transaction is successful.\n\t */\n\tsucceeded: boolean\n\t/** \n\t * The message returned by the payment gateway.\n\t * @example ```\"Accepted\"```\n\t */\n\tmessage?: string | null\n\t/** \n\t * The error code, if any, returned by the payment gateway.\n\t * @example ```\"00001\"```\n\t */\n\terror_code?: string | null\n\t/** \n\t * The error detail, if any, returned by the payment gateway.\n\t * @example ```\"Already settled\"```\n\t */\n\terror_detail?: string | null\n\t/** \n\t * The token identifying the transaction, returned by the payment gateway.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\ttoken?: string | null\n\t/** \n\t * The ID identifying the transaction, returned by the payment gateway.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tgateway_transaction_id?: string | null\n\t/** \n\t * The amount to be refunded, in cents.\n\t * @example ```500```\n\t */\n\trefund_amount_cents?: number | null\n\t/** \n\t * The amount to be refunded, float.\n\t * @example ```5```\n\t */\n\trefund_amount_float?: number | null\n\t/** \n\t * The amount to be refunded, formatted.\n\t * @example ```\"€5,00\"```\n\t */\n\tformatted_refund_amount?: string | null\n\t/** \n\t * The balance to be refunded, in cents.\n\t * @example ```1000```\n\t */\n\trefund_balance_cents?: number | null\n\t/** \n\t * The balance to be refunded, float.\n\t * @example ```10```\n\t */\n\trefund_balance_float?: number | null\n\t/** \n\t * The balance to be refunded, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_refund_balance?: string | null\n\n\torder?: Order | null\n\tpayment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\treference_authorization?: Authorization | null\n\trefunds?: Refund[] | null\n\treturn?: Return | null\n\n}\n\n\ninterface CaptureUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Indicates if the transaction is successful.\n\t */\n\tsucceeded?: boolean | null\n\t/** \n\t * Send this attribute if you want to forward a stuck transaction to succeeded and update associated order states accordingly.\n\t * @example ```true```\n\t */\n\t_forward?: boolean | null\n\t/** \n\t * Send this attribute if you want to create a refund for this capture.\n\t * @example ```true```\n\t */\n\t_refund?: boolean | null\n\t/** \n\t * Send this attribute as a value in cents if you want to overwrite the amount to be refunded.\n\t * @example ```500```\n\t */\n\t_refund_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to refund a succeeded capture of a pending order (which is left unpaid).\n\t * @example ```true```\n\t */\n\t_cancel?: boolean | null\n\t\n}\n\n\nclass Captures extends ApiResource<Capture> {\n\n\tstatic readonly TYPE: CaptureType = 'captures' as const\n\n\tasync update(resource: CaptureUpdate, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ ...resource, type: Captures.TYPE }, params, options)\n\t}\n\n\tasync order(captureId: string | Capture, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `captures/${_captureId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(captureId: string | Capture, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `captures/${_captureId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(captureId: string | Capture, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `captures/${_captureId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(captureId: string | Capture, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `captures/${_captureId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync reference_authorization(captureId: string | Capture, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Authorization>({ type: 'authorizations' }, `captures/${_captureId}/reference_authorization`, params, options) as unknown as Authorization\n\t}\n\n\tasync refunds(captureId: string | Capture, params?: QueryParamsList<Refund>, options?: ResourcesConfig): Promise<ListResponse<Refund>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Refund>({ type: 'refunds' }, `captures/${_captureId}/refunds`, params, options) as unknown as ListResponse<Refund>\n\t}\n\n\tasync return(captureId: string | Capture, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `captures/${_captureId}/return`, params, options) as unknown as Return\n\t}\n\n\tasync _forward(id: string | Capture, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _forward: true }, params, options)\n\t}\n\n\tasync _refund(id: string | Capture, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _refund: true }, params, options)\n\t}\n\n\tasync _refund_amount_cents(id: string | Capture, triggerValue: number, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _refund_amount_cents: triggerValue }, params, options)\n\t}\n\n\tasync _cancel(id: string | Capture, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _cancel: true }, params, options)\n\t}\n\n\n\tisCapture(resource: any): resource is Capture {\n\t\treturn resource.type && (resource.type === Captures.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CaptureRel {\n\t\treturn super.relationshipOneToOne<CaptureRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CaptureRel[] {\n\t\treturn super.relationshipOneToMany<CaptureRel>(...ids)\n\t}\n\n\n\ttype(): CaptureType {\n\t\treturn Captures.TYPE\n\t}\n\n}\n\n\nconst instance = new Captures()\nexport default instance\n\nexport type { Capture, CaptureUpdate, CaptureType }\n"]}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
class Captures extends ApiResource {
|
4
|
+
static TYPE = "captures";
|
5
|
+
async update(resource, params, options) {
|
6
|
+
return this.resources.update({ ...resource, type: Captures.TYPE }, params, options);
|
7
|
+
}
|
8
|
+
async order(captureId, params, options) {
|
9
|
+
const _captureId = captureId.id || captureId;
|
10
|
+
return this.resources.fetch({ type: "orders" }, `captures/${_captureId}/order`, params, options);
|
11
|
+
}
|
12
|
+
async attachments(captureId, params, options) {
|
13
|
+
const _captureId = captureId.id || captureId;
|
14
|
+
return this.resources.fetch({ type: "attachments" }, `captures/${_captureId}/attachments`, params, options);
|
15
|
+
}
|
16
|
+
async events(captureId, params, options) {
|
17
|
+
const _captureId = captureId.id || captureId;
|
18
|
+
return this.resources.fetch({ type: "events" }, `captures/${_captureId}/events`, params, options);
|
19
|
+
}
|
20
|
+
async versions(captureId, params, options) {
|
21
|
+
const _captureId = captureId.id || captureId;
|
22
|
+
return this.resources.fetch({ type: "versions" }, `captures/${_captureId}/versions`, params, options);
|
23
|
+
}
|
24
|
+
async reference_authorization(captureId, params, options) {
|
25
|
+
const _captureId = captureId.id || captureId;
|
26
|
+
return this.resources.fetch({ type: "authorizations" }, `captures/${_captureId}/reference_authorization`, params, options);
|
27
|
+
}
|
28
|
+
async refunds(captureId, params, options) {
|
29
|
+
const _captureId = captureId.id || captureId;
|
30
|
+
return this.resources.fetch({ type: "refunds" }, `captures/${_captureId}/refunds`, params, options);
|
31
|
+
}
|
32
|
+
async return(captureId, params, options) {
|
33
|
+
const _captureId = captureId.id || captureId;
|
34
|
+
return this.resources.fetch({ type: "returns" }, `captures/${_captureId}/return`, params, options);
|
35
|
+
}
|
36
|
+
async _forward(id, params, options) {
|
37
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: Captures.TYPE, _forward: true }, params, options);
|
38
|
+
}
|
39
|
+
async _refund(id, params, options) {
|
40
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: Captures.TYPE, _refund: true }, params, options);
|
41
|
+
}
|
42
|
+
async _refund_amount_cents(id, triggerValue, params, options) {
|
43
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: Captures.TYPE, _refund_amount_cents: triggerValue }, params, options);
|
44
|
+
}
|
45
|
+
async _cancel(id, params, options) {
|
46
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: Captures.TYPE, _cancel: true }, params, options);
|
47
|
+
}
|
48
|
+
isCapture(resource) {
|
49
|
+
return resource.type && resource.type === Captures.TYPE;
|
50
|
+
}
|
51
|
+
relationship(id) {
|
52
|
+
return super.relationshipOneToOne(id);
|
53
|
+
}
|
54
|
+
relationshipToMany(...ids) {
|
55
|
+
return super.relationshipOneToMany(...ids);
|
56
|
+
}
|
57
|
+
type() {
|
58
|
+
return Captures.TYPE;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
const instance = new Captures();
|
62
|
+
var captures_default = instance;
|
63
|
+
|
64
|
+
export { captures_default as default };
|
65
|
+
//# sourceMappingURL=captures.js.map
|
66
|
+
//# sourceMappingURL=captures.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/captures.ts"],"names":[],"mappings":";;AAkKA,MAAM,iBAAiB,WAAqB,CAAA;AAAA,EAE3C,OAAgB,IAAoB,GAAA,UAAA;AAAA,EAEpC,MAAM,MAAA,CAAO,QAAyB,EAAA,MAAA,EAAuC,OAA6C,EAAA;AACzH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+B,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,QAAS,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3G,EAEA,MAAM,KAAA,CAAM,SAA6B,EAAA,MAAA,EAAqC,OAA2C,EAAA;AACxH,IAAM,MAAA,UAAA,GAAc,UAAsB,EAAM,IAAA,SAAA;AAChD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAY,SAAA,EAAA,UAAU,CAAU,MAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvG,EAEA,MAAM,WAAA,CAAY,SAA6B,EAAA,MAAA,EAAsC,OAA8D,EAAA;AAClJ,IAAM,MAAA,UAAA,GAAc,UAAsB,EAAM,IAAA,SAAA;AAChD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAY,SAAA,EAAA,UAAU,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvH,EAEA,MAAM,MAAA,CAAO,SAA6B,EAAA,MAAA,EAAiC,OA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,EAAA,EAAI,MAAM,QAAS,CAAA,IAAA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtJ,EAGA,UAAU,QAAoC,EAAA;AAC7C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,QAAS,CAAA,IAAA;AAAA;AACrD,EAGA,aAAa,EAA4C,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAiC,EAAE,CAAA;AAAA;AACjD,EAEA,sBAAsB,GAA6B,EAAA;AAClD,IAAO,OAAA,KAAA,CAAM,qBAAkC,CAAA,GAAG,GAAG,CAAA;AAAA;AACtD,EAGA,IAAoB,GAAA;AACnB,IAAA,OAAO,QAAS,CAAA,IAAA;AAAA;AAGlB;AAGA,MAAM,QAAA,GAAW,IAAI,QAAS,EAAA;AAC9B,IAAO,gBAAQ,GAAA","file":"captures.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order } from './orders'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { Authorization } from './authorizations'\nimport type { Refund } from './refunds'\nimport type { Return } from './returns'\nimport type { AdyenPayment } from './adyen_payments'\nimport type { AxervePayment } from './axerve_payments'\nimport type { BraintreePayment } from './braintree_payments'\nimport type { CheckoutComPayment } from './checkout_com_payments'\nimport type { ExternalPayment } from './external_payments'\nimport type { KlarnaPayment } from './klarna_payments'\nimport type { PaypalPayment } from './paypal_payments'\nimport type { SatispayPayment } from './satispay_payments'\nimport type { StripePayment } from './stripe_payments'\nimport type { WireTransfer } from './wire_transfers'\n\n\ntype CaptureType = 'captures'\ntype CaptureRel = ResourceRel & { type: CaptureType }\n\n\nexport type CaptureSort = Pick<Capture, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type CaptureFilter = Pick<Capture, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Capture extends Resource {\n\t\n\treadonly type: CaptureType\n\n\t/** \n\t * The transaction number, auto generated.\n\t * @example ```\"42/T/001\"```\n\t */\n\tnumber: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, inherited from the associated order.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * The transaction amount, in cents.\n\t * @example ```1500```\n\t */\n\tamount_cents: number\n\t/** \n\t * The transaction amount, float.\n\t * @example ```15```\n\t */\n\tamount_float: number\n\t/** \n\t * The transaction amount, formatted.\n\t * @example ```\"€15,00\"```\n\t */\n\tformatted_amount: string\n\t/** \n\t * Indicates if the transaction is successful.\n\t */\n\tsucceeded: boolean\n\t/** \n\t * The message returned by the payment gateway.\n\t * @example ```\"Accepted\"```\n\t */\n\tmessage?: string | null\n\t/** \n\t * The error code, if any, returned by the payment gateway.\n\t * @example ```\"00001\"```\n\t */\n\terror_code?: string | null\n\t/** \n\t * The error detail, if any, returned by the payment gateway.\n\t * @example ```\"Already settled\"```\n\t */\n\terror_detail?: string | null\n\t/** \n\t * The token identifying the transaction, returned by the payment gateway.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\ttoken?: string | null\n\t/** \n\t * The ID identifying the transaction, returned by the payment gateway.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tgateway_transaction_id?: string | null\n\t/** \n\t * The amount to be refunded, in cents.\n\t * @example ```500```\n\t */\n\trefund_amount_cents?: number | null\n\t/** \n\t * The amount to be refunded, float.\n\t * @example ```5```\n\t */\n\trefund_amount_float?: number | null\n\t/** \n\t * The amount to be refunded, formatted.\n\t * @example ```\"€5,00\"```\n\t */\n\tformatted_refund_amount?: string | null\n\t/** \n\t * The balance to be refunded, in cents.\n\t * @example ```1000```\n\t */\n\trefund_balance_cents?: number | null\n\t/** \n\t * The balance to be refunded, float.\n\t * @example ```10```\n\t */\n\trefund_balance_float?: number | null\n\t/** \n\t * The balance to be refunded, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_refund_balance?: string | null\n\n\torder?: Order | null\n\tpayment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\treference_authorization?: Authorization | null\n\trefunds?: Refund[] | null\n\treturn?: Return | null\n\n}\n\n\ninterface CaptureUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Indicates if the transaction is successful.\n\t */\n\tsucceeded?: boolean | null\n\t/** \n\t * Send this attribute if you want to forward a stuck transaction to succeeded and update associated order states accordingly.\n\t * @example ```true```\n\t */\n\t_forward?: boolean | null\n\t/** \n\t * Send this attribute if you want to create a refund for this capture.\n\t * @example ```true```\n\t */\n\t_refund?: boolean | null\n\t/** \n\t * Send this attribute as a value in cents if you want to overwrite the amount to be refunded.\n\t * @example ```500```\n\t */\n\t_refund_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to refund a succeeded capture of a pending order (which is left unpaid).\n\t * @example ```true```\n\t */\n\t_cancel?: boolean | null\n\t\n}\n\n\nclass Captures extends ApiResource<Capture> {\n\n\tstatic readonly TYPE: CaptureType = 'captures' as const\n\n\tasync update(resource: CaptureUpdate, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ ...resource, type: Captures.TYPE }, params, options)\n\t}\n\n\tasync order(captureId: string | Capture, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `captures/${_captureId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(captureId: string | Capture, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `captures/${_captureId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(captureId: string | Capture, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `captures/${_captureId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(captureId: string | Capture, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `captures/${_captureId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync reference_authorization(captureId: string | Capture, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Authorization>({ type: 'authorizations' }, `captures/${_captureId}/reference_authorization`, params, options) as unknown as Authorization\n\t}\n\n\tasync refunds(captureId: string | Capture, params?: QueryParamsList<Refund>, options?: ResourcesConfig): Promise<ListResponse<Refund>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Refund>({ type: 'refunds' }, `captures/${_captureId}/refunds`, params, options) as unknown as ListResponse<Refund>\n\t}\n\n\tasync return(captureId: string | Capture, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `captures/${_captureId}/return`, params, options) as unknown as Return\n\t}\n\n\tasync _forward(id: string | Capture, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _forward: true }, params, options)\n\t}\n\n\tasync _refund(id: string | Capture, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _refund: true }, params, options)\n\t}\n\n\tasync _refund_amount_cents(id: string | Capture, triggerValue: number, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _refund_amount_cents: triggerValue }, params, options)\n\t}\n\n\tasync _cancel(id: string | Capture, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _cancel: true }, params, options)\n\t}\n\n\n\tisCapture(resource: any): resource is Capture {\n\t\treturn resource.type && (resource.type === Captures.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CaptureRel {\n\t\treturn super.relationshipOneToOne<CaptureRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CaptureRel[] {\n\t\treturn super.relationshipOneToMany<CaptureRel>(...ids)\n\t}\n\n\n\ttype(): CaptureType {\n\t\treturn Captures.TYPE\n\t}\n\n}\n\n\nconst instance = new Captures()\nexport default instance\n\nexport type { Capture, CaptureUpdate, CaptureType }\n"]}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class CarrierAccounts extends resource.ApiResource {
|
6
|
+
static TYPE = "carrier_accounts";
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: CarrierAccounts.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: CarrierAccounts.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: CarrierAccounts.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async market(carrierAccountId, params, options) {
|
17
|
+
const _carrierAccountId = carrierAccountId.id || carrierAccountId;
|
18
|
+
return this.resources.fetch({ type: "markets" }, `carrier_accounts/${_carrierAccountId}/market`, params, options);
|
19
|
+
}
|
20
|
+
async attachments(carrierAccountId, params, options) {
|
21
|
+
const _carrierAccountId = carrierAccountId.id || carrierAccountId;
|
22
|
+
return this.resources.fetch({ type: "attachments" }, `carrier_accounts/${_carrierAccountId}/attachments`, params, options);
|
23
|
+
}
|
24
|
+
async versions(carrierAccountId, params, options) {
|
25
|
+
const _carrierAccountId = carrierAccountId.id || carrierAccountId;
|
26
|
+
return this.resources.fetch({ type: "versions" }, `carrier_accounts/${_carrierAccountId}/versions`, params, options);
|
27
|
+
}
|
28
|
+
isCarrierAccount(resource) {
|
29
|
+
return resource.type && resource.type === CarrierAccounts.TYPE;
|
30
|
+
}
|
31
|
+
relationship(id) {
|
32
|
+
return super.relationshipOneToOne(id);
|
33
|
+
}
|
34
|
+
relationshipToMany(...ids) {
|
35
|
+
return super.relationshipOneToMany(...ids);
|
36
|
+
}
|
37
|
+
type() {
|
38
|
+
return CarrierAccounts.TYPE;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
const instance = new CarrierAccounts();
|
42
|
+
var carrier_accounts_default = instance;
|
43
|
+
|
44
|
+
module.exports = carrier_accounts_default;
|
45
|
+
//# sourceMappingURL=carrier_accounts.cjs.map
|
46
|
+
|
47
|
+
module.exports = exports.default;
|
48
|
+
//# sourceMappingURL=carrier_accounts.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/carrier_accounts.ts"],"names":["ApiResource"],"mappings":";;;;AAgGA,M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AAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAoB,iBAAA,EAAA,iBAAiB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,QAAA,CAAS,gBAA2C,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACvJ,IAAM,MAAA,iBAAA,GAAqB,iBAAoC,EAAM,IAAA,gBAAA;AACrE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAoB,iBAAA,EAAA,iBAAiB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAGA,iBAAiB,QAA2C,EAAA;AAC3D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAgB,CAAA,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAmD,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"carrier_accounts.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype CarrierAccountType = 'carrier_accounts'\ntype CarrierAccountRel = ResourceRel & { type: CarrierAccountType }\ntype MarketRel = ResourceRel & { type: MarketType }\n\n\nexport type CarrierAccountSort = Pick<CarrierAccount, 'id' | 'name'> & ResourceSort\n// export type CarrierAccountFilter = Pick<CarrierAccount, 'id' | 'name' | 'easypost_type'> & ResourceFilter\n\n\ninterface CarrierAccount extends Resource {\n\t\n\treadonly type: CarrierAccountType\n\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname: string\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type: string\n\t/** \n\t * The Easypost internal reference ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\teasypost_id?: string | null\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials: Record<string, any>\n\n\tmarket?: Market | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CarrierAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname: string\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type: string\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials: Record<string, any>\n\n\tmarket?: MarketRel | null\n\n}\n\n\ninterface CarrierAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type?: string | null\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials?: Record<string, any> | null\n\n\tmarket?: MarketRel | null\n\n}\n\n\nclass CarrierAccounts extends ApiResource<CarrierAccount> {\n\n\tstatic readonly TYPE: CarrierAccountType = 'carrier_accounts' as const\n\n\tasync create(resource: CarrierAccountCreate, params?: QueryParamsRetrieve<CarrierAccount>, options?: ResourcesConfig): Promise<CarrierAccount> {\n\t\treturn this.resources.create<CarrierAccountCreate, CarrierAccount>({ ...resource, type: CarrierAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CarrierAccountUpdate, params?: QueryParamsRetrieve<CarrierAccount>, options?: ResourcesConfig): Promise<CarrierAccount> {\n\t\treturn this.resources.update<CarrierAccountUpdate, CarrierAccount>({ ...resource, type: CarrierAccounts.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: CarrierAccounts.TYPE } : id, options)\n\t}\n\n\tasync market(carrierAccountId: string | CarrierAccount, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `carrier_accounts/${_carrierAccountId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync attachments(carrierAccountId: string | CarrierAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `carrier_accounts/${_carrierAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(carrierAccountId: string | CarrierAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `carrier_accounts/${_carrierAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCarrierAccount(resource: any): resource is CarrierAccount {\n\t\treturn resource.type && (resource.type === CarrierAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CarrierAccountRel {\n\t\treturn super.relationshipOneToOne<CarrierAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CarrierAccountRel[] {\n\t\treturn super.relationshipOneToMany<CarrierAccountRel>(...ids)\n\t}\n\n\n\ttype(): CarrierAccountType {\n\t\treturn CarrierAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new CarrierAccounts()\nexport default instance\n\nexport type { CarrierAccount, CarrierAccountCreate, CarrierAccountUpdate, CarrierAccountType }\n"]}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
class CarrierAccounts extends ApiResource {
|
4
|
+
static TYPE = "carrier_accounts";
|
5
|
+
async create(resource, params, options) {
|
6
|
+
return this.resources.create({ ...resource, type: CarrierAccounts.TYPE }, params, options);
|
7
|
+
}
|
8
|
+
async update(resource, params, options) {
|
9
|
+
return this.resources.update({ ...resource, type: CarrierAccounts.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async delete(id, options) {
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: CarrierAccounts.TYPE } : id, options);
|
13
|
+
}
|
14
|
+
async market(carrierAccountId, params, options) {
|
15
|
+
const _carrierAccountId = carrierAccountId.id || carrierAccountId;
|
16
|
+
return this.resources.fetch({ type: "markets" }, `carrier_accounts/${_carrierAccountId}/market`, params, options);
|
17
|
+
}
|
18
|
+
async attachments(carrierAccountId, params, options) {
|
19
|
+
const _carrierAccountId = carrierAccountId.id || carrierAccountId;
|
20
|
+
return this.resources.fetch({ type: "attachments" }, `carrier_accounts/${_carrierAccountId}/attachments`, params, options);
|
21
|
+
}
|
22
|
+
async versions(carrierAccountId, params, options) {
|
23
|
+
const _carrierAccountId = carrierAccountId.id || carrierAccountId;
|
24
|
+
return this.resources.fetch({ type: "versions" }, `carrier_accounts/${_carrierAccountId}/versions`, params, options);
|
25
|
+
}
|
26
|
+
isCarrierAccount(resource) {
|
27
|
+
return resource.type && resource.type === CarrierAccounts.TYPE;
|
28
|
+
}
|
29
|
+
relationship(id) {
|
30
|
+
return super.relationshipOneToOne(id);
|
31
|
+
}
|
32
|
+
relationshipToMany(...ids) {
|
33
|
+
return super.relationshipOneToMany(...ids);
|
34
|
+
}
|
35
|
+
type() {
|
36
|
+
return CarrierAccounts.TYPE;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
const instance = new CarrierAccounts();
|
40
|
+
var carrier_accounts_default = instance;
|
41
|
+
|
42
|
+
export { carrier_accounts_default as default };
|
43
|
+
//# sourceMappingURL=carrier_accounts.js.map
|
44
|
+
//# sourceMappingURL=carrier_accounts.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/carrier_accounts.ts"],"names":[],"mappings":";;AAgGA,MAAM,wBAAwB,WAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,kBAAA;AAAA,EAE3C,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAA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oC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,eAAgB,CAAA,IAAA;AAAA;AAGzB;AAGA,MAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"carrier_accounts.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype CarrierAccountType = 'carrier_accounts'\ntype CarrierAccountRel = ResourceRel & { type: CarrierAccountType }\ntype MarketRel = ResourceRel & { type: MarketType }\n\n\nexport type CarrierAccountSort = Pick<CarrierAccount, 'id' | 'name'> & ResourceSort\n// export type CarrierAccountFilter = Pick<CarrierAccount, 'id' | 'name' | 'easypost_type'> & ResourceFilter\n\n\ninterface CarrierAccount extends Resource {\n\t\n\treadonly type: CarrierAccountType\n\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname: string\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type: string\n\t/** \n\t * The Easypost internal reference ID.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\teasypost_id?: string | null\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials: Record<string, any>\n\n\tmarket?: Market | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CarrierAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname: string\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type: string\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials: Record<string, any>\n\n\tmarket?: MarketRel | null\n\n}\n\n\ninterface CarrierAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The carrier account internal name.\n\t * @example ```\"Accurate\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Easypost service carrier type.\n\t * @example ```\"AccurateAccount\"```\n\t */\n\teasypost_type?: string | null\n\t/** \n\t * The Easypost carrier accounts credentials fields.\n\t * @example ```{\"username\":\"xxxx\",\"password\":\"secret\"}```\n\t */\n\tcredentials?: Record<string, any> | null\n\n\tmarket?: MarketRel | null\n\n}\n\n\nclass CarrierAccounts extends ApiResource<CarrierAccount> {\n\n\tstatic readonly TYPE: CarrierAccountType = 'carrier_accounts' as const\n\n\tasync create(resource: CarrierAccountCreate, params?: QueryParamsRetrieve<CarrierAccount>, options?: ResourcesConfig): Promise<CarrierAccount> {\n\t\treturn this.resources.create<CarrierAccountCreate, CarrierAccount>({ ...resource, type: CarrierAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CarrierAccountUpdate, params?: QueryParamsRetrieve<CarrierAccount>, options?: ResourcesConfig): Promise<CarrierAccount> {\n\t\treturn this.resources.update<CarrierAccountUpdate, CarrierAccount>({ ...resource, type: CarrierAccounts.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: CarrierAccounts.TYPE } : id, options)\n\t}\n\n\tasync market(carrierAccountId: string | CarrierAccount, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `carrier_accounts/${_carrierAccountId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync attachments(carrierAccountId: string | CarrierAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `carrier_accounts/${_carrierAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(carrierAccountId: string | CarrierAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `carrier_accounts/${_carrierAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCarrierAccount(resource: any): resource is CarrierAccount {\n\t\treturn resource.type && (resource.type === CarrierAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CarrierAccountRel {\n\t\treturn super.relationshipOneToOne<CarrierAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CarrierAccountRel[] {\n\t\treturn super.relationshipOneToMany<CarrierAccountRel>(...ids)\n\t}\n\n\n\ttype(): CarrierAccountType {\n\t\treturn CarrierAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new CarrierAccounts()\nexport default instance\n\nexport type { CarrierAccount, CarrierAccountCreate, CarrierAccountUpdate, CarrierAccountType }\n"]}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class CheckoutComGateways extends resource.ApiResource {
|
6
|
+
static TYPE = "checkout_com_gateways";
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: CheckoutComGateways.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: CheckoutComGateways.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: CheckoutComGateways.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async payment_methods(checkoutComGatewayId, params, options) {
|
17
|
+
const _checkoutComGatewayId = checkoutComGatewayId.id || checkoutComGatewayId;
|
18
|
+
return this.resources.fetch({ type: "payment_methods" }, `checkout_com_gateways/${_checkoutComGatewayId}/payment_methods`, params, options);
|
19
|
+
}
|
20
|
+
async versions(checkoutComGatewayId, params, options) {
|
21
|
+
const _checkoutComGatewayId = checkoutComGatewayId.id || checkoutComGatewayId;
|
22
|
+
return this.resources.fetch({ type: "versions" }, `checkout_com_gateways/${_checkoutComGatewayId}/versions`, params, options);
|
23
|
+
}
|
24
|
+
async checkout_com_payments(checkoutComGatewayId, params, options) {
|
25
|
+
const _checkoutComGatewayId = checkoutComGatewayId.id || checkoutComGatewayId;
|
26
|
+
return this.resources.fetch({ type: "checkout_com_payments" }, `checkout_com_gateways/${_checkoutComGatewayId}/checkout_com_payments`, params, options);
|
27
|
+
}
|
28
|
+
isCheckoutComGateway(resource) {
|
29
|
+
return resource.type && resource.type === CheckoutComGateways.TYPE;
|
30
|
+
}
|
31
|
+
relationship(id) {
|
32
|
+
return super.relationshipOneToOne(id);
|
33
|
+
}
|
34
|
+
relationshipToMany(...ids) {
|
35
|
+
return super.relationshipOneToMany(...ids);
|
36
|
+
}
|
37
|
+
type() {
|
38
|
+
return CheckoutComGateways.TYPE;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
const instance = new CheckoutComGateways();
|
42
|
+
var checkout_com_gateways_default = instance;
|
43
|
+
|
44
|
+
module.exports = checkout_com_gateways_default;
|
45
|
+
//# sourceMappingURL=checkout_com_gateways.cjs.map
|
46
|
+
|
47
|
+
module.exports = exports.default;
|
48
|
+
//# sourceMappingURL=checkout_com_gateways.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":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AyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAyB,sBAAA,EAAA,qBAAqB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,qBAAA,CAAsB,oBAAmD,EAAA,MAAA,EAA8C,OAAsE,EAAA;AAClM,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAA0B,EAAE,IAAA,EAAM,uBAAwB,EAAA,EAAG,CAAyB,sBAAA,EAAA,qBAAqB,CAA0B,sBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3K,EAGA,qBAAqB,QAA+C,EAAA;AACnE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,mBAAoB,CAAA,IAAA;AAAA;AAChE,EAGA,aAAa,EAAuD,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAA4C,EAAE,CAAA;AAAA;AAC5D,EAEA,sBAAsB,GAAwC,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"checkout_com_gateways.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\n\n\ntype CheckoutComGatewayType = 'checkout_com_gateways'\ntype CheckoutComGatewayRel = ResourceRel & { type: CheckoutComGatewayType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\n\n\nexport type CheckoutComGatewaySort = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceSort\n// export type CheckoutComGatewayFilter = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface CheckoutComGateway extends Resource {\n\t\n\treadonly type: CheckoutComGatewayType\n\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The gateway webhook endpoint ID, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_id?: string | null\n\t/** \n\t * The gateway webhook endpoint secret, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/checkout_com_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tcheckout_com_payments?: CheckoutComPayment[] | null\n\n}\n\n\ninterface CheckoutComGatewayCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The gateway secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key: string\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key: string\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\ninterface CheckoutComGatewayUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The gateway secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key?: string | null\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\nclass CheckoutComGateways extends ApiResource<CheckoutComGateway> {\n\n\tstatic readonly TYPE: CheckoutComGatewayType = 'checkout_com_gateways' as const\n\n\tasync create(resource: CheckoutComGatewayCreate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.create<CheckoutComGatewayCreate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComGatewayUpdate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.update<CheckoutComGatewayUpdate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: CheckoutComGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `checkout_com_gateways/${_checkoutComGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_gateways/${_checkoutComGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync checkout_com_payments(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<CheckoutComPayment>, options?: ResourcesConfig): Promise<ListResponse<CheckoutComPayment>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<CheckoutComPayment>({ type: 'checkout_com_payments' }, `checkout_com_gateways/${_checkoutComGatewayId}/checkout_com_payments`, params, options) as unknown as ListResponse<CheckoutComPayment>\n\t}\n\n\n\tisCheckoutComGateway(resource: any): resource is CheckoutComGateway {\n\t\treturn resource.type && (resource.type === CheckoutComGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComGatewayRel {\n\t\treturn super.relationshipOneToOne<CheckoutComGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComGatewayRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComGatewayRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComGatewayType {\n\t\treturn CheckoutComGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new CheckoutComGateways()\nexport default instance\n\nexport type { CheckoutComGateway, CheckoutComGatewayCreate, CheckoutComGatewayUpdate, CheckoutComGatewayType }\n"]}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export { cO as CheckoutComGateway, cP as CheckoutComGatewayCreate, cR as CheckoutComGatewaySort, la as CheckoutComGatewayType, cQ as CheckoutComGatewayUpdate, a0 as default } from '../api-DmIZO_Np.cjs';
|
2
|
+
import '../client.cjs';
|
3
|
+
import '../interceptor-5MISI1yn.cjs';
|
4
|
+
import '../types.cjs';
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export { cO as CheckoutComGateway, cP as CheckoutComGatewayCreate, cR as CheckoutComGatewaySort, la as CheckoutComGatewayType, cQ as CheckoutComGatewayUpdate, a0 as default } from '../api-DDgIE2i8.js';
|
2
|
+
import '../client.js';
|
3
|
+
import '../interceptor-5MISI1yn.js';
|
4
|
+
import '../types.js';
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
class CheckoutComGateways extends ApiResource {
|
4
|
+
static TYPE = "checkout_com_gateways";
|
5
|
+
async create(resource, params, options) {
|
6
|
+
return this.resources.create({ ...resource, type: CheckoutComGateways.TYPE }, params, options);
|
7
|
+
}
|
8
|
+
async update(resource, params, options) {
|
9
|
+
return this.resources.update({ ...resource, type: CheckoutComGateways.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async delete(id, options) {
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: CheckoutComGateways.TYPE } : id, options);
|
13
|
+
}
|
14
|
+
async payment_methods(checkoutComGatewayId, params, options) {
|
15
|
+
const _checkoutComGatewayId = checkoutComGatewayId.id || checkoutComGatewayId;
|
16
|
+
return this.resources.fetch({ type: "payment_methods" }, `checkout_com_gateways/${_checkoutComGatewayId}/payment_methods`, params, options);
|
17
|
+
}
|
18
|
+
async versions(checkoutComGatewayId, params, options) {
|
19
|
+
const _checkoutComGatewayId = checkoutComGatewayId.id || checkoutComGatewayId;
|
20
|
+
return this.resources.fetch({ type: "versions" }, `checkout_com_gateways/${_checkoutComGatewayId}/versions`, params, options);
|
21
|
+
}
|
22
|
+
async checkout_com_payments(checkoutComGatewayId, params, options) {
|
23
|
+
const _checkoutComGatewayId = checkoutComGatewayId.id || checkoutComGatewayId;
|
24
|
+
return this.resources.fetch({ type: "checkout_com_payments" }, `checkout_com_gateways/${_checkoutComGatewayId}/checkout_com_payments`, params, options);
|
25
|
+
}
|
26
|
+
isCheckoutComGateway(resource) {
|
27
|
+
return resource.type && resource.type === CheckoutComGateways.TYPE;
|
28
|
+
}
|
29
|
+
relationship(id) {
|
30
|
+
return super.relationshipOneToOne(id);
|
31
|
+
}
|
32
|
+
relationshipToMany(...ids) {
|
33
|
+
return super.relationshipOneToMany(...ids);
|
34
|
+
}
|
35
|
+
type() {
|
36
|
+
return CheckoutComGateways.TYPE;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
const instance = new CheckoutComGateways();
|
40
|
+
var checkout_com_gateways_default = instance;
|
41
|
+
|
42
|
+
export { checkout_com_gateways_default as default };
|
43
|
+
//# sourceMappingURL=checkout_com_gateways.js.map
|
44
|
+
//# sourceMappingURL=checkout_com_gateways.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/checkout_com_gateways.ts"],"names":[],"mappings":";;AAgGA,MAAM,4BAA4B,WAAgC,CAAA;AAAA,EAEjE,OAAgB,IAA+B,GAAA,uBAAA;AAAA,EAE/C,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAA,CAAO,QAAoC,EAAA,MAAA,EAAkD,OAAwD,EAAA;AAC1J,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAqD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAoB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,mBAAA,CAAoB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC3G,EAEA,MAAM,eAAA,CAAgB,oBAAmD,E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,GAAA;AAC9B,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"checkout_com_gateways.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\n\n\ntype CheckoutComGatewayType = 'checkout_com_gateways'\ntype CheckoutComGatewayRel = ResourceRel & { type: CheckoutComGatewayType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\n\n\nexport type CheckoutComGatewaySort = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceSort\n// export type CheckoutComGatewayFilter = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface CheckoutComGateway extends Resource {\n\t\n\treadonly type: CheckoutComGatewayType\n\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The gateway webhook endpoint ID, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_id?: string | null\n\t/** \n\t * The gateway webhook endpoint secret, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/checkout_com_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tcheckout_com_payments?: CheckoutComPayment[] | null\n\n}\n\n\ninterface CheckoutComGatewayCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The gateway secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key: string\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key: string\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\ninterface CheckoutComGatewayUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The gateway secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key?: string | null\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\nclass CheckoutComGateways extends ApiResource<CheckoutComGateway> {\n\n\tstatic readonly TYPE: CheckoutComGatewayType = 'checkout_com_gateways' as const\n\n\tasync create(resource: CheckoutComGatewayCreate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.create<CheckoutComGatewayCreate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComGatewayUpdate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.update<CheckoutComGatewayUpdate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: CheckoutComGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `checkout_com_gateways/${_checkoutComGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_gateways/${_checkoutComGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync checkout_com_payments(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<CheckoutComPayment>, options?: ResourcesConfig): Promise<ListResponse<CheckoutComPayment>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<CheckoutComPayment>({ type: 'checkout_com_payments' }, `checkout_com_gateways/${_checkoutComGatewayId}/checkout_com_payments`, params, options) as unknown as ListResponse<CheckoutComPayment>\n\t}\n\n\n\tisCheckoutComGateway(resource: any): resource is CheckoutComGateway {\n\t\treturn resource.type && (resource.type === CheckoutComGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComGatewayRel {\n\t\treturn super.relationshipOneToOne<CheckoutComGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComGatewayRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComGatewayRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComGatewayType {\n\t\treturn CheckoutComGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new CheckoutComGateways()\nexport default instance\n\nexport type { CheckoutComGateway, CheckoutComGatewayCreate, CheckoutComGatewayUpdate, CheckoutComGatewayType }\n"]}
|