@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,4 @@
|
|
1
|
+
export { gC as PriceFrequencyTier, gD as PriceFrequencyTierCreate, gF as PriceFrequencyTierSort, kO as PriceFrequencyTierType, gE as PriceFrequencyTierUpdate, b1 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 { gC as PriceFrequencyTier, gD as PriceFrequencyTierCreate, gF as PriceFrequencyTierSort, kO as PriceFrequencyTierType, gE as PriceFrequencyTierUpdate, b1 as default } from '../api-DDgIE2i8.js';
|
2
|
+
import '../client.js';
|
3
|
+
import '../interceptor-5MISI1yn.js';
|
4
|
+
import '../types.js';
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
class PriceFrequencyTiers extends ApiResource {
|
4
|
+
static TYPE = "price_frequency_tiers";
|
5
|
+
async create(resource, params, options) {
|
6
|
+
return this.resources.create({ ...resource, type: PriceFrequencyTiers.TYPE }, params, options);
|
7
|
+
}
|
8
|
+
async update(resource, params, options) {
|
9
|
+
return this.resources.update({ ...resource, type: PriceFrequencyTiers.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async delete(id, options) {
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: PriceFrequencyTiers.TYPE } : id, options);
|
13
|
+
}
|
14
|
+
async price(priceFrequencyTierId, params, options) {
|
15
|
+
const _priceFrequencyTierId = priceFrequencyTierId.id || priceFrequencyTierId;
|
16
|
+
return this.resources.fetch({ type: "prices" }, `price_frequency_tiers/${_priceFrequencyTierId}/price`, params, options);
|
17
|
+
}
|
18
|
+
async attachments(priceFrequencyTierId, params, options) {
|
19
|
+
const _priceFrequencyTierId = priceFrequencyTierId.id || priceFrequencyTierId;
|
20
|
+
return this.resources.fetch({ type: "attachments" }, `price_frequency_tiers/${_priceFrequencyTierId}/attachments`, params, options);
|
21
|
+
}
|
22
|
+
async versions(priceFrequencyTierId, params, options) {
|
23
|
+
const _priceFrequencyTierId = priceFrequencyTierId.id || priceFrequencyTierId;
|
24
|
+
return this.resources.fetch({ type: "versions" }, `price_frequency_tiers/${_priceFrequencyTierId}/versions`, params, options);
|
25
|
+
}
|
26
|
+
async events(priceFrequencyTierId, params, options) {
|
27
|
+
const _priceFrequencyTierId = priceFrequencyTierId.id || priceFrequencyTierId;
|
28
|
+
return this.resources.fetch({ type: "events" }, `price_frequency_tiers/${_priceFrequencyTierId}/events`, params, options);
|
29
|
+
}
|
30
|
+
isPriceFrequencyTier(resource) {
|
31
|
+
return resource.type && resource.type === PriceFrequencyTiers.TYPE;
|
32
|
+
}
|
33
|
+
relationship(id) {
|
34
|
+
return super.relationshipOneToOne(id);
|
35
|
+
}
|
36
|
+
relationshipToMany(...ids) {
|
37
|
+
return super.relationshipOneToMany(...ids);
|
38
|
+
}
|
39
|
+
type() {
|
40
|
+
return PriceFrequencyTiers.TYPE;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
const instance = new PriceFrequencyTiers();
|
44
|
+
var price_frequency_tiers_default = instance;
|
45
|
+
|
46
|
+
export { price_frequency_tiers_default as default };
|
47
|
+
//# sourceMappingURL=price_frequency_tiers.js.map
|
48
|
+
//# sourceMappingURL=price_frequency_tiers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/price_frequency_tiers.ts"],"names":[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Q,GAAA","file":"price_frequency_tiers.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 { Price, PriceType } from './prices'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { Event } from './events'\n\n\ntype PriceFrequencyTierType = 'price_frequency_tiers'\ntype PriceFrequencyTierRel = ResourceRel & { type: PriceFrequencyTierType }\ntype PriceRel = ResourceRel & { type: PriceType }\n\n\nexport type PriceFrequencyTierSort = Pick<PriceFrequencyTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type PriceFrequencyTierFilter = Pick<PriceFrequencyTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface PriceFrequencyTier extends Resource {\n\t\n\treadonly type: PriceFrequencyTierType\n\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit, expressed as the line item frequency in days (or frequency label, ie 'monthly'). When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```7```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this price tier, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this price tier, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\n\tprice?: Price | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\tevents?: Event[] | null\n\n}\n\n\ninterface PriceFrequencyTierCreate extends ResourceCreate {\n\t\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit, expressed as the line item frequency in days (or frequency label, ie 'monthly'). When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```7```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\n\tprice: PriceRel\n\n}\n\n\ninterface PriceFrequencyTierUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The tier upper limit, expressed as the line item frequency in days (or frequency label, ie 'monthly'). When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```7```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\n\tprice?: PriceRel | null\n\n}\n\n\nclass PriceFrequencyTiers extends ApiResource<PriceFrequencyTier> {\n\n\tstatic readonly TYPE: PriceFrequencyTierType = 'price_frequency_tiers' as const\n\n\tasync create(resource: PriceFrequencyTierCreate, params?: QueryParamsRetrieve<PriceFrequencyTier>, options?: ResourcesConfig): Promise<PriceFrequencyTier> {\n\t\treturn this.resources.create<PriceFrequencyTierCreate, PriceFrequencyTier>({ ...resource, type: PriceFrequencyTiers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceFrequencyTierUpdate, params?: QueryParamsRetrieve<PriceFrequencyTier>, options?: ResourcesConfig): Promise<PriceFrequencyTier> {\n\t\treturn this.resources.update<PriceFrequencyTierUpdate, PriceFrequencyTier>({ ...resource, type: PriceFrequencyTiers.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: PriceFrequencyTiers.TYPE } : id, options)\n\t}\n\n\tasync price(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsRetrieve<Price>, options?: ResourcesConfig): Promise<Price> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_frequency_tiers/${_priceFrequencyTierId}/price`, params, options) as unknown as Price\n\t}\n\n\tasync attachments(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_frequency_tiers/${_priceFrequencyTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_frequency_tiers/${_priceFrequencyTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync events(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `price_frequency_tiers/${_priceFrequencyTierId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\n\tisPriceFrequencyTier(resource: any): resource is PriceFrequencyTier {\n\t\treturn resource.type && (resource.type === PriceFrequencyTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceFrequencyTierRel {\n\t\treturn super.relationshipOneToOne<PriceFrequencyTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceFrequencyTierRel[] {\n\t\treturn super.relationshipOneToMany<PriceFrequencyTierRel>(...ids)\n\t}\n\n\n\ttype(): PriceFrequencyTierType {\n\t\treturn PriceFrequencyTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceFrequencyTiers()\nexport default instance\n\nexport type { PriceFrequencyTier, PriceFrequencyTierCreate, PriceFrequencyTierUpdate, PriceFrequencyTierType }\n"]}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class PriceListSchedulers extends resource.ApiResource {
|
6
|
+
static TYPE = "price_list_schedulers";
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: PriceListSchedulers.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: PriceListSchedulers.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: PriceListSchedulers.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async market(priceListSchedulerId, params, options) {
|
17
|
+
const _priceListSchedulerId = priceListSchedulerId.id || priceListSchedulerId;
|
18
|
+
return this.resources.fetch({ type: "markets" }, `price_list_schedulers/${_priceListSchedulerId}/market`, params, options);
|
19
|
+
}
|
20
|
+
async price_list(priceListSchedulerId, params, options) {
|
21
|
+
const _priceListSchedulerId = priceListSchedulerId.id || priceListSchedulerId;
|
22
|
+
return this.resources.fetch({ type: "price_lists" }, `price_list_schedulers/${_priceListSchedulerId}/price_list`, params, options);
|
23
|
+
}
|
24
|
+
async events(priceListSchedulerId, params, options) {
|
25
|
+
const _priceListSchedulerId = priceListSchedulerId.id || priceListSchedulerId;
|
26
|
+
return this.resources.fetch({ type: "events" }, `price_list_schedulers/${_priceListSchedulerId}/events`, params, options);
|
27
|
+
}
|
28
|
+
async versions(priceListSchedulerId, params, options) {
|
29
|
+
const _priceListSchedulerId = priceListSchedulerId.id || priceListSchedulerId;
|
30
|
+
return this.resources.fetch({ type: "versions" }, `price_list_schedulers/${_priceListSchedulerId}/versions`, params, options);
|
31
|
+
}
|
32
|
+
async _disable(id, params, options) {
|
33
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: PriceListSchedulers.TYPE, _disable: true }, params, options);
|
34
|
+
}
|
35
|
+
async _enable(id, params, options) {
|
36
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: PriceListSchedulers.TYPE, _enable: true }, params, options);
|
37
|
+
}
|
38
|
+
isPriceListScheduler(resource) {
|
39
|
+
return resource.type && resource.type === PriceListSchedulers.TYPE;
|
40
|
+
}
|
41
|
+
relationship(id) {
|
42
|
+
return super.relationshipOneToOne(id);
|
43
|
+
}
|
44
|
+
relationshipToMany(...ids) {
|
45
|
+
return super.relationshipOneToMany(...ids);
|
46
|
+
}
|
47
|
+
type() {
|
48
|
+
return PriceListSchedulers.TYPE;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
const instance = new PriceListSchedulers();
|
52
|
+
var price_list_schedulers_default = instance;
|
53
|
+
|
54
|
+
module.exports = price_list_schedulers_default;
|
55
|
+
//# sourceMappingURL=price_list_schedulers.cjs.map
|
56
|
+
|
57
|
+
module.exports = exports.default;
|
58
|
+
//# sourceMappingURL=price_list_schedulers.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/price_list_schedulers.ts"],"names":["ApiResource"],"mappings":";;;;AAmIA,MAAM,4BAA4BA,oBAAgC,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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,IAAA,OAAO,mBAAoB,CAAA,IAAA;AAAA;AAG7B;AAGA,MAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"price_list_schedulers.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 { PriceList, PriceListType } from './price_lists'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype PriceListSchedulerType = 'price_list_schedulers'\ntype PriceListSchedulerRel = ResourceRel & { type: PriceListSchedulerType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype PriceListRel = ResourceRel & { type: PriceListType }\n\n\nexport type PriceListSchedulerSort = Pick<PriceListScheduler, 'id' | 'name' | 'starts_at' | 'expires_at' | 'disabled_at'> & ResourceSort\n// export type PriceListSchedulerFilter = Pick<PriceListScheduler, 'id' | 'name' | 'starts_at' | 'expires_at' | 'disabled_at'> & ResourceFilter\n\n\ninterface PriceListScheduler extends Resource {\n\t\n\treadonly type: PriceListSchedulerType\n\n\t/** \n\t * The price list scheduler's internal name.\n\t * @example ```\"FW SALE 2023\"```\n\t */\n\tname: string\n\t/** \n\t * The activation date/time of this price list scheduler.\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 price list scheduler (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * Indicates if the price list scheduler is active (enabled and not expired).\n\t * @example ```true```\n\t */\n\tactive?: boolean | null\n\t/** \n\t * The price list scheduler status. One of 'disabled', 'expired', 'pending', or 'active'.\n\t * @example ```\"pending\"```\n\t */\n\tstatus?: 'disabled' | 'expired' | 'pending' | 'active' | 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\n\tmarket?: Market | null\n\tprice_list?: PriceList | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PriceListSchedulerCreate extends ResourceCreate {\n\t\n\t/** \n\t * The price list scheduler's internal name.\n\t * @example ```\"FW SALE 2023\"```\n\t */\n\tname: string\n\t/** \n\t * The activation date/time of this price list scheduler.\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 price list scheduler (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\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\n\tmarket: MarketRel\n\tprice_list: PriceListRel\n\n}\n\n\ninterface PriceListSchedulerUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The price list scheduler's internal name.\n\t * @example ```\"FW SALE 2023\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The activation date/time of this price list scheduler.\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 price list scheduler (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 * 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\n\tmarket?: MarketRel | null\n\tprice_list?: PriceListRel | null\n\n}\n\n\nclass PriceListSchedulers extends ApiResource<PriceListScheduler> {\n\n\tstatic readonly TYPE: PriceListSchedulerType = 'price_list_schedulers' as const\n\n\tasync create(resource: PriceListSchedulerCreate, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.create<PriceListSchedulerCreate, PriceListScheduler>({ ...resource, type: PriceListSchedulers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceListSchedulerUpdate, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.update<PriceListSchedulerUpdate, PriceListScheduler>({ ...resource, type: PriceListSchedulers.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: PriceListSchedulers.TYPE } : id, options)\n\t}\n\n\tasync market(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `price_list_schedulers/${_priceListSchedulerId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync price_list(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `price_list_schedulers/${_priceListSchedulerId}/price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync events(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `price_list_schedulers/${_priceListSchedulerId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_list_schedulers/${_priceListSchedulerId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | PriceListScheduler, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.update<PriceListSchedulerUpdate, PriceListScheduler>({ id: (typeof id === 'string')? id: id.id, type: PriceListSchedulers.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | PriceListScheduler, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.update<PriceListSchedulerUpdate, PriceListScheduler>({ id: (typeof id === 'string')? id: id.id, type: PriceListSchedulers.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisPriceListScheduler(resource: any): resource is PriceListScheduler {\n\t\treturn resource.type && (resource.type === PriceListSchedulers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceListSchedulerRel {\n\t\treturn super.relationshipOneToOne<PriceListSchedulerRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceListSchedulerRel[] {\n\t\treturn super.relationshipOneToMany<PriceListSchedulerRel>(...ids)\n\t}\n\n\n\ttype(): PriceListSchedulerType {\n\t\treturn PriceListSchedulers.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceListSchedulers()\nexport default instance\n\nexport type { PriceListScheduler, PriceListSchedulerCreate, PriceListSchedulerUpdate, PriceListSchedulerType }\n"]}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export { gG as PriceListScheduler, gH as PriceListSchedulerCreate, gJ as PriceListSchedulerSort, kQ as PriceListSchedulerType, gI as PriceListSchedulerUpdate, b2 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 { gG as PriceListScheduler, gH as PriceListSchedulerCreate, gJ as PriceListSchedulerSort, kQ as PriceListSchedulerType, gI as PriceListSchedulerUpdate, b2 as default } from '../api-DDgIE2i8.js';
|
2
|
+
import '../client.js';
|
3
|
+
import '../interceptor-5MISI1yn.js';
|
4
|
+
import '../types.js';
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
class PriceListSchedulers extends ApiResource {
|
4
|
+
static TYPE = "price_list_schedulers";
|
5
|
+
async create(resource, params, options) {
|
6
|
+
return this.resources.create({ ...resource, type: PriceListSchedulers.TYPE }, params, options);
|
7
|
+
}
|
8
|
+
async update(resource, params, options) {
|
9
|
+
return this.resources.update({ ...resource, type: PriceListSchedulers.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async delete(id, options) {
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: PriceListSchedulers.TYPE } : id, options);
|
13
|
+
}
|
14
|
+
async market(priceListSchedulerId, params, options) {
|
15
|
+
const _priceListSchedulerId = priceListSchedulerId.id || priceListSchedulerId;
|
16
|
+
return this.resources.fetch({ type: "markets" }, `price_list_schedulers/${_priceListSchedulerId}/market`, params, options);
|
17
|
+
}
|
18
|
+
async price_list(priceListSchedulerId, params, options) {
|
19
|
+
const _priceListSchedulerId = priceListSchedulerId.id || priceListSchedulerId;
|
20
|
+
return this.resources.fetch({ type: "price_lists" }, `price_list_schedulers/${_priceListSchedulerId}/price_list`, params, options);
|
21
|
+
}
|
22
|
+
async events(priceListSchedulerId, params, options) {
|
23
|
+
const _priceListSchedulerId = priceListSchedulerId.id || priceListSchedulerId;
|
24
|
+
return this.resources.fetch({ type: "events" }, `price_list_schedulers/${_priceListSchedulerId}/events`, params, options);
|
25
|
+
}
|
26
|
+
async versions(priceListSchedulerId, params, options) {
|
27
|
+
const _priceListSchedulerId = priceListSchedulerId.id || priceListSchedulerId;
|
28
|
+
return this.resources.fetch({ type: "versions" }, `price_list_schedulers/${_priceListSchedulerId}/versions`, params, options);
|
29
|
+
}
|
30
|
+
async _disable(id, params, options) {
|
31
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: PriceListSchedulers.TYPE, _disable: true }, params, options);
|
32
|
+
}
|
33
|
+
async _enable(id, params, options) {
|
34
|
+
return this.resources.update({ id: typeof id === "string" ? id : id.id, type: PriceListSchedulers.TYPE, _enable: true }, params, options);
|
35
|
+
}
|
36
|
+
isPriceListScheduler(resource) {
|
37
|
+
return resource.type && resource.type === PriceListSchedulers.TYPE;
|
38
|
+
}
|
39
|
+
relationship(id) {
|
40
|
+
return super.relationshipOneToOne(id);
|
41
|
+
}
|
42
|
+
relationshipToMany(...ids) {
|
43
|
+
return super.relationshipOneToMany(...ids);
|
44
|
+
}
|
45
|
+
type() {
|
46
|
+
return PriceListSchedulers.TYPE;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
const instance = new PriceListSchedulers();
|
50
|
+
var price_list_schedulers_default = instance;
|
51
|
+
|
52
|
+
export { price_list_schedulers_default as default };
|
53
|
+
//# sourceMappingURL=price_list_schedulers.js.map
|
54
|
+
//# sourceMappingURL=price_list_schedulers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/price_list_schedulers.ts"],"names":[],"mappings":";;AAmIA,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,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AAwC,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":"price_list_schedulers.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 { PriceList, PriceListType } from './price_lists'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype PriceListSchedulerType = 'price_list_schedulers'\ntype PriceListSchedulerRel = ResourceRel & { type: PriceListSchedulerType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype PriceListRel = ResourceRel & { type: PriceListType }\n\n\nexport type PriceListSchedulerSort = Pick<PriceListScheduler, 'id' | 'name' | 'starts_at' | 'expires_at' | 'disabled_at'> & ResourceSort\n// export type PriceListSchedulerFilter = Pick<PriceListScheduler, 'id' | 'name' | 'starts_at' | 'expires_at' | 'disabled_at'> & ResourceFilter\n\n\ninterface PriceListScheduler extends Resource {\n\t\n\treadonly type: PriceListSchedulerType\n\n\t/** \n\t * The price list scheduler's internal name.\n\t * @example ```\"FW SALE 2023\"```\n\t */\n\tname: string\n\t/** \n\t * The activation date/time of this price list scheduler.\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 price list scheduler (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * Indicates if the price list scheduler is active (enabled and not expired).\n\t * @example ```true```\n\t */\n\tactive?: boolean | null\n\t/** \n\t * The price list scheduler status. One of 'disabled', 'expired', 'pending', or 'active'.\n\t * @example ```\"pending\"```\n\t */\n\tstatus?: 'disabled' | 'expired' | 'pending' | 'active' | 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\n\tmarket?: Market | null\n\tprice_list?: PriceList | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PriceListSchedulerCreate extends ResourceCreate {\n\t\n\t/** \n\t * The price list scheduler's internal name.\n\t * @example ```\"FW SALE 2023\"```\n\t */\n\tname: string\n\t/** \n\t * The activation date/time of this price list scheduler.\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 price list scheduler (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\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\n\tmarket: MarketRel\n\tprice_list: PriceListRel\n\n}\n\n\ninterface PriceListSchedulerUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The price list scheduler's internal name.\n\t * @example ```\"FW SALE 2023\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The activation date/time of this price list scheduler.\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 price list scheduler (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 * 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\n\tmarket?: MarketRel | null\n\tprice_list?: PriceListRel | null\n\n}\n\n\nclass PriceListSchedulers extends ApiResource<PriceListScheduler> {\n\n\tstatic readonly TYPE: PriceListSchedulerType = 'price_list_schedulers' as const\n\n\tasync create(resource: PriceListSchedulerCreate, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.create<PriceListSchedulerCreate, PriceListScheduler>({ ...resource, type: PriceListSchedulers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceListSchedulerUpdate, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.update<PriceListSchedulerUpdate, PriceListScheduler>({ ...resource, type: PriceListSchedulers.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: PriceListSchedulers.TYPE } : id, options)\n\t}\n\n\tasync market(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `price_list_schedulers/${_priceListSchedulerId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync price_list(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `price_list_schedulers/${_priceListSchedulerId}/price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync events(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `price_list_schedulers/${_priceListSchedulerId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(priceListSchedulerId: string | PriceListScheduler, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceListSchedulerId = (priceListSchedulerId as PriceListScheduler).id || priceListSchedulerId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_list_schedulers/${_priceListSchedulerId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | PriceListScheduler, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.update<PriceListSchedulerUpdate, PriceListScheduler>({ id: (typeof id === 'string')? id: id.id, type: PriceListSchedulers.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | PriceListScheduler, params?: QueryParamsRetrieve<PriceListScheduler>, options?: ResourcesConfig): Promise<PriceListScheduler> {\n\t\treturn this.resources.update<PriceListSchedulerUpdate, PriceListScheduler>({ id: (typeof id === 'string')? id: id.id, type: PriceListSchedulers.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisPriceListScheduler(resource: any): resource is PriceListScheduler {\n\t\treturn resource.type && (resource.type === PriceListSchedulers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceListSchedulerRel {\n\t\treturn super.relationshipOneToOne<PriceListSchedulerRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceListSchedulerRel[] {\n\t\treturn super.relationshipOneToMany<PriceListSchedulerRel>(...ids)\n\t}\n\n\n\ttype(): PriceListSchedulerType {\n\t\treturn PriceListSchedulers.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceListSchedulers()\nexport default instance\n\nexport type { PriceListScheduler, PriceListSchedulerCreate, PriceListSchedulerUpdate, PriceListSchedulerType }\n"]}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class PriceLists extends resource.ApiResource {
|
6
|
+
static TYPE = "price_lists";
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: PriceLists.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: PriceLists.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: PriceLists.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async prices(priceListId, params, options) {
|
17
|
+
const _priceListId = priceListId.id || priceListId;
|
18
|
+
return this.resources.fetch({ type: "prices" }, `price_lists/${_priceListId}/prices`, params, options);
|
19
|
+
}
|
20
|
+
async price_list_schedulers(priceListId, params, options) {
|
21
|
+
const _priceListId = priceListId.id || priceListId;
|
22
|
+
return this.resources.fetch({ type: "price_list_schedulers" }, `price_lists/${_priceListId}/price_list_schedulers`, params, options);
|
23
|
+
}
|
24
|
+
async attachments(priceListId, params, options) {
|
25
|
+
const _priceListId = priceListId.id || priceListId;
|
26
|
+
return this.resources.fetch({ type: "attachments" }, `price_lists/${_priceListId}/attachments`, params, options);
|
27
|
+
}
|
28
|
+
async versions(priceListId, params, options) {
|
29
|
+
const _priceListId = priceListId.id || priceListId;
|
30
|
+
return this.resources.fetch({ type: "versions" }, `price_lists/${_priceListId}/versions`, params, options);
|
31
|
+
}
|
32
|
+
isPriceList(resource) {
|
33
|
+
return resource.type && resource.type === PriceLists.TYPE;
|
34
|
+
}
|
35
|
+
relationship(id) {
|
36
|
+
return super.relationshipOneToOne(id);
|
37
|
+
}
|
38
|
+
relationshipToMany(...ids) {
|
39
|
+
return super.relationshipOneToMany(...ids);
|
40
|
+
}
|
41
|
+
type() {
|
42
|
+
return PriceLists.TYPE;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
const instance = new PriceLists();
|
46
|
+
var price_lists_default = instance;
|
47
|
+
|
48
|
+
module.exports = price_lists_default;
|
49
|
+
//# sourceMappingURL=price_lists.cjs.map
|
50
|
+
|
51
|
+
module.exports = exports.default;
|
52
|
+
//# sourceMappingURL=price_lists.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/price_lists.ts"],"names":["ApiResource"],"mappings":";;;;AAgIA,MAAM,mBAAmBA,oBAAuB,CAAA;AAAA,EAE/C,OAAgB,IAAsB,GAAA,aAAA;AAAA,EAEtC,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,UAAW,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjH,EAEA,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,UAAW,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjH,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,UAAA,CAAW,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAClG,EAEA,MAAM,MAAA,CAAO,WAAiC,EAAA,MAAA,EAAiC,OAAyD,EAAA;AACvI,IAAM,MAAA,YAAA,GAAgB,YAA0B,EAAM,IAAA,WAAA;AACtD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAe,YAAA,EAAA,YAAY,CAAW,OAAA,CAAA,EA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G,GAAG,CAAA;AAAA;AACxD,EAGA,IAAsB,GAAA;AACrB,IAAA,OAAO,UAAW,CAAA,IAAA;AAAA;AAGpB;AAGA,MAAM,QAAA,GAAW,IAAI,UAAW,EAAA;AAChC,IAAO,mBAAQ,GAAA","file":"price_lists.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 { Price } from './prices'\nimport type { PriceListScheduler } from './price_list_schedulers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype PriceListType = 'price_lists'\ntype PriceListRel = ResourceRel & { type: PriceListType }\n\n\nexport type PriceListSort = Pick<PriceList, 'id' | 'name' | 'code' | 'currency_code' | 'tax_included'> & ResourceSort\n// export type PriceListFilter = Pick<PriceList, 'id' | 'name' | 'code' | 'currency_code' | 'tax_included' | 'rules'> & ResourceFilter\n\n\ninterface PriceList extends Resource {\n\t\n\treadonly type: PriceListType\n\n\t/** \n\t * The price list's internal name.\n\t * @example ```\"EU Price list\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the price list (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: 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\n\t/** \n\t * Indicates if the associated prices include taxes.\n\t * @example ```true```\n\t */\n\ttax_included?: boolean | null\n\t/** \n\t * The rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\t/** \n\t * The rule outcomes.\n\t * @example ```{}```\n\t */\n\trule_outcomes?: Record<string, any> | null\n\t/** \n\t * The payload used to evaluate the rules.\n\t * @example ```{}```\n\t */\n\tresource_payload?: Record<string, any> | null\n\n\tprices?: Price[] | null\n\tprice_list_schedulers?: PriceListScheduler[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PriceListCreate extends ResourceCreate {\n\t\n\t/** \n\t * The price list's internal name.\n\t * @example ```\"EU Price list\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the price list (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: 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\n\t/** \n\t * Indicates if the associated prices include taxes.\n\t * @example ```true```\n\t */\n\ttax_included?: boolean | null\n\t/** \n\t * The rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\t\n}\n\n\ninterface PriceListUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The price list's internal name.\n\t * @example ```\"EU Price list\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the price list (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: 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 associated prices include taxes.\n\t * @example ```true```\n\t */\n\ttax_included?: boolean | null\n\t/** \n\t * The rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\t\n}\n\n\nclass PriceLists extends ApiResource<PriceList> {\n\n\tstatic readonly TYPE: PriceListType = 'price_lists' as const\n\n\tasync create(resource: PriceListCreate, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\treturn this.resources.create<PriceListCreate, PriceList>({ ...resource, type: PriceLists.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceListUpdate, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\treturn this.resources.update<PriceListUpdate, PriceList>({ ...resource, type: PriceLists.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: PriceLists.TYPE } : id, options)\n\t}\n\n\tasync prices(priceListId: string | PriceList, params?: QueryParamsList<Price>, options?: ResourcesConfig): Promise<ListResponse<Price>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_lists/${_priceListId}/prices`, params, options) as unknown as ListResponse<Price>\n\t}\n\n\tasync price_list_schedulers(priceListId: string | PriceList, params?: QueryParamsList<PriceListScheduler>, options?: ResourcesConfig): Promise<ListResponse<PriceListScheduler>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<PriceListScheduler>({ type: 'price_list_schedulers' }, `price_lists/${_priceListId}/price_list_schedulers`, params, options) as unknown as ListResponse<PriceListScheduler>\n\t}\n\n\tasync attachments(priceListId: string | PriceList, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_lists/${_priceListId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceListId: string | PriceList, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_lists/${_priceListId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPriceList(resource: any): resource is PriceList {\n\t\treturn resource.type && (resource.type === PriceLists.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceListRel {\n\t\treturn super.relationshipOneToOne<PriceListRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceListRel[] {\n\t\treturn super.relationshipOneToMany<PriceListRel>(...ids)\n\t}\n\n\n\ttype(): PriceListType {\n\t\treturn PriceLists.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceLists()\nexport default instance\n\nexport type { PriceList, PriceListCreate, PriceListUpdate, PriceListType }\n"]}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
class PriceLists extends ApiResource {
|
4
|
+
static TYPE = "price_lists";
|
5
|
+
async create(resource, params, options) {
|
6
|
+
return this.resources.create({ ...resource, type: PriceLists.TYPE }, params, options);
|
7
|
+
}
|
8
|
+
async update(resource, params, options) {
|
9
|
+
return this.resources.update({ ...resource, type: PriceLists.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async delete(id, options) {
|
12
|
+
await this.resources.delete(typeof id === "string" ? { id, type: PriceLists.TYPE } : id, options);
|
13
|
+
}
|
14
|
+
async prices(priceListId, params, options) {
|
15
|
+
const _priceListId = priceListId.id || priceListId;
|
16
|
+
return this.resources.fetch({ type: "prices" }, `price_lists/${_priceListId}/prices`, params, options);
|
17
|
+
}
|
18
|
+
async price_list_schedulers(priceListId, params, options) {
|
19
|
+
const _priceListId = priceListId.id || priceListId;
|
20
|
+
return this.resources.fetch({ type: "price_list_schedulers" }, `price_lists/${_priceListId}/price_list_schedulers`, params, options);
|
21
|
+
}
|
22
|
+
async attachments(priceListId, params, options) {
|
23
|
+
const _priceListId = priceListId.id || priceListId;
|
24
|
+
return this.resources.fetch({ type: "attachments" }, `price_lists/${_priceListId}/attachments`, params, options);
|
25
|
+
}
|
26
|
+
async versions(priceListId, params, options) {
|
27
|
+
const _priceListId = priceListId.id || priceListId;
|
28
|
+
return this.resources.fetch({ type: "versions" }, `price_lists/${_priceListId}/versions`, params, options);
|
29
|
+
}
|
30
|
+
isPriceList(resource) {
|
31
|
+
return resource.type && resource.type === PriceLists.TYPE;
|
32
|
+
}
|
33
|
+
relationship(id) {
|
34
|
+
return super.relationshipOneToOne(id);
|
35
|
+
}
|
36
|
+
relationshipToMany(...ids) {
|
37
|
+
return super.relationshipOneToMany(...ids);
|
38
|
+
}
|
39
|
+
type() {
|
40
|
+
return PriceLists.TYPE;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
const instance = new PriceLists();
|
44
|
+
var price_lists_default = instance;
|
45
|
+
|
46
|
+
export { price_lists_default as default };
|
47
|
+
//# sourceMappingURL=price_lists.js.map
|
48
|
+
//# sourceMappingURL=price_lists.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/price_lists.ts"],"names":[],"mappings":";;AAgIA,MAAM,mBAAmB,WAAuB,CAAA;AAAA,EAE/C,OAAgB,IAAsB,GAAA,aAAA;AAAA,EAEtC,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,UAAW,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjH,EAEA,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,UAAW,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjH,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,UAAA,CAAW,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAClG,EAEA,MAAM,MAAA,CAAO,WAAiC,EAAA,MAAA,EAAiC,OAAyD,EAAA;AACvI,IAAM,MAAA,YAAA,GAAgB,YAA0B,EAAM,IAAA,WAAA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1D,IAAO,OAAA,KAAA,CAAM,qBAAmC,EAAE,CAAA;AAAA;AACnD,EAEA,sBAAsB,GAA+B,EAAA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAAoC,CAAA,GAAG,GAAG,CAAA;AAAA;AACxD,EAGA,IAAsB,GAAA;AACrB,IAAA,OAAO,UAAW,CAAA,IAAA;AAAA;AAGpB;AAGA,MAAM,QAAA,GAAW,IAAI,UAAW,EAAA;AAChC,IAAO,mBAAQ,GAAA","file":"price_lists.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 { Price } from './prices'\nimport type { PriceListScheduler } from './price_list_schedulers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype PriceListType = 'price_lists'\ntype PriceListRel = ResourceRel & { type: PriceListType }\n\n\nexport type PriceListSort = Pick<PriceList, 'id' | 'name' | 'code' | 'currency_code' | 'tax_included'> & ResourceSort\n// export type PriceListFilter = Pick<PriceList, 'id' | 'name' | 'code' | 'currency_code' | 'tax_included' | 'rules'> & ResourceFilter\n\n\ninterface PriceList extends Resource {\n\t\n\treadonly type: PriceListType\n\n\t/** \n\t * The price list's internal name.\n\t * @example ```\"EU Price list\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the price list (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: 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\n\t/** \n\t * Indicates if the associated prices include taxes.\n\t * @example ```true```\n\t */\n\ttax_included?: boolean | null\n\t/** \n\t * The rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\t/** \n\t * The rule outcomes.\n\t * @example ```{}```\n\t */\n\trule_outcomes?: Record<string, any> | null\n\t/** \n\t * The payload used to evaluate the rules.\n\t * @example ```{}```\n\t */\n\tresource_payload?: Record<string, any> | null\n\n\tprices?: Price[] | null\n\tprice_list_schedulers?: PriceListScheduler[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PriceListCreate extends ResourceCreate {\n\t\n\t/** \n\t * The price list's internal name.\n\t * @example ```\"EU Price list\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the price list (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: 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\n\t/** \n\t * Indicates if the associated prices include taxes.\n\t * @example ```true```\n\t */\n\ttax_included?: boolean | null\n\t/** \n\t * The rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\t\n}\n\n\ninterface PriceListUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The price list's internal name.\n\t * @example ```\"EU Price list\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the price list (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: 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 associated prices include taxes.\n\t * @example ```true```\n\t */\n\ttax_included?: boolean | null\n\t/** \n\t * The rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\t\n}\n\n\nclass PriceLists extends ApiResource<PriceList> {\n\n\tstatic readonly TYPE: PriceListType = 'price_lists' as const\n\n\tasync create(resource: PriceListCreate, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\treturn this.resources.create<PriceListCreate, PriceList>({ ...resource, type: PriceLists.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceListUpdate, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\treturn this.resources.update<PriceListUpdate, PriceList>({ ...resource, type: PriceLists.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: PriceLists.TYPE } : id, options)\n\t}\n\n\tasync prices(priceListId: string | PriceList, params?: QueryParamsList<Price>, options?: ResourcesConfig): Promise<ListResponse<Price>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_lists/${_priceListId}/prices`, params, options) as unknown as ListResponse<Price>\n\t}\n\n\tasync price_list_schedulers(priceListId: string | PriceList, params?: QueryParamsList<PriceListScheduler>, options?: ResourcesConfig): Promise<ListResponse<PriceListScheduler>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<PriceListScheduler>({ type: 'price_list_schedulers' }, `price_lists/${_priceListId}/price_list_schedulers`, params, options) as unknown as ListResponse<PriceListScheduler>\n\t}\n\n\tasync attachments(priceListId: string | PriceList, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_lists/${_priceListId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceListId: string | PriceList, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_lists/${_priceListId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPriceList(resource: any): resource is PriceList {\n\t\treturn resource.type && (resource.type === PriceLists.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceListRel {\n\t\treturn super.relationshipOneToOne<PriceListRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceListRel[] {\n\t\treturn super.relationshipOneToMany<PriceListRel>(...ids)\n\t}\n\n\n\ttype(): PriceListType {\n\t\treturn PriceLists.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceLists()\nexport default instance\n\nexport type { PriceList, PriceListCreate, PriceListUpdate, PriceListType }\n"]}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class PriceTiers extends resource.ApiResource {
|
6
|
+
static TYPE = "price_tiers";
|
7
|
+
async price(priceTierId, params, options) {
|
8
|
+
const _priceTierId = priceTierId.id || priceTierId;
|
9
|
+
return this.resources.fetch({ type: "prices" }, `price_tiers/${_priceTierId}/price`, params, options);
|
10
|
+
}
|
11
|
+
async attachments(priceTierId, params, options) {
|
12
|
+
const _priceTierId = priceTierId.id || priceTierId;
|
13
|
+
return this.resources.fetch({ type: "attachments" }, `price_tiers/${_priceTierId}/attachments`, params, options);
|
14
|
+
}
|
15
|
+
async versions(priceTierId, params, options) {
|
16
|
+
const _priceTierId = priceTierId.id || priceTierId;
|
17
|
+
return this.resources.fetch({ type: "versions" }, `price_tiers/${_priceTierId}/versions`, params, options);
|
18
|
+
}
|
19
|
+
isPriceTier(resource) {
|
20
|
+
return resource.type && resource.type === PriceTiers.TYPE;
|
21
|
+
}
|
22
|
+
relationship(id) {
|
23
|
+
return super.relationshipOneToOne(id);
|
24
|
+
}
|
25
|
+
relationshipToMany(...ids) {
|
26
|
+
return super.relationshipOneToMany(...ids);
|
27
|
+
}
|
28
|
+
type() {
|
29
|
+
return PriceTiers.TYPE;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
const instance = new PriceTiers();
|
33
|
+
var price_tiers_default = instance;
|
34
|
+
|
35
|
+
module.exports = price_tiers_default;
|
36
|
+
//# sourceMappingURL=price_tiers.cjs.map
|
37
|
+
|
38
|
+
module.exports = exports.default;
|
39
|
+
//# sourceMappingURL=price_tiers.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/price_tiers.ts"],"names":["ApiResource"],"mappings":";;;;AAsDA,MAAM,mBAAmBA,oBAAuB,CAAA;AAAA,EAE/C,OAAgB,IAAsB,GAAA,aAAA;AAAA,EAEtC,MAAM,KAAA,CAAM,WAAiC,EAAA,MAAA,EAAqC,OAA2C,EAAA;AAC5H,IAAM,MAAA,YAAA,GAAgB,YAA0B,EAAM,IAAA,WAAA;AACtD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAe,YAAA,EAAA,YAAY,CAAU,MAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5G,EAEA,MAAM,WAAA,CAAY,WAAiC,EAAA,MAAA,EAAsC,OAA8D,EAAA;AACtJ,IAAM,MAAA,YAAA,GAAgB,YAA0B,EAAM,IAAA,WAAA;AACtD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAe,YAAA,EAAA,YAAY,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5H,EAEA,MAAM,QAAA,CAAS,WAAiC,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC7I,IAAM,MAAA,YAAA,GAAgB,YAA0B,EAAM,IAAA,WAAA;AACtD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAe,YAAA,EAAA,YAAY,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnH,EAGA,YAAY,QAAsC,EAAA;AACjD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,UAAW,CAAA,IAAA;AAAA;AACvD,EAGA,aAAa,EAA8C,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAAmC,EAAE,CAAA;AAAA;AACnD,EAEA,sBAAsB,GAA+B,EAAA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAAoC,CAAA,GAAG,GAAG,CAAA;AAAA;AACxD,EAGA,IAAsB,GAAA;AACrB,IAAA,OAAO,UAAW,CAAA,IAAA;AAAA;AAGpB;AAGA,MAAM,QAAA,GAAW,IAAI,UAAW,EAAA;AAChC,IAAO,mBAAQ,GAAA","file":"price_tiers.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Price } from './prices'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype PriceTierType = 'price_tiers'\ntype PriceTierRel = ResourceRel & { type: PriceTierType }\n\n\nexport type PriceTierSort = Pick<PriceTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type PriceTierFilter = Pick<PriceTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface PriceTier extends Resource {\n\t\n\treadonly type: PriceTierType\n\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit. When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```20.5```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this price tier, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this price tier, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\n\tprice?: Price | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass PriceTiers extends ApiResource<PriceTier> {\n\n\tstatic readonly TYPE: PriceTierType = 'price_tiers' as const\n\n\tasync price(priceTierId: string | PriceTier, params?: QueryParamsRetrieve<Price>, options?: ResourcesConfig): Promise<Price> {\n\t\tconst _priceTierId = (priceTierId as PriceTier).id || priceTierId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_tiers/${_priceTierId}/price`, params, options) as unknown as Price\n\t}\n\n\tasync attachments(priceTierId: string | PriceTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceTierId = (priceTierId as PriceTier).id || priceTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_tiers/${_priceTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceTierId: string | PriceTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceTierId = (priceTierId as PriceTier).id || priceTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_tiers/${_priceTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPriceTier(resource: any): resource is PriceTier {\n\t\treturn resource.type && (resource.type === PriceTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceTierRel {\n\t\treturn super.relationshipOneToOne<PriceTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceTierRel[] {\n\t\treturn super.relationshipOneToMany<PriceTierRel>(...ids)\n\t}\n\n\n\ttype(): PriceTierType {\n\t\treturn PriceTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceTiers()\nexport default instance\n\nexport type { PriceTier, PriceTierType }\n"]}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { ApiResource } from '../resource';
|
2
|
+
|
3
|
+
class PriceTiers extends ApiResource {
|
4
|
+
static TYPE = "price_tiers";
|
5
|
+
async price(priceTierId, params, options) {
|
6
|
+
const _priceTierId = priceTierId.id || priceTierId;
|
7
|
+
return this.resources.fetch({ type: "prices" }, `price_tiers/${_priceTierId}/price`, params, options);
|
8
|
+
}
|
9
|
+
async attachments(priceTierId, params, options) {
|
10
|
+
const _priceTierId = priceTierId.id || priceTierId;
|
11
|
+
return this.resources.fetch({ type: "attachments" }, `price_tiers/${_priceTierId}/attachments`, params, options);
|
12
|
+
}
|
13
|
+
async versions(priceTierId, params, options) {
|
14
|
+
const _priceTierId = priceTierId.id || priceTierId;
|
15
|
+
return this.resources.fetch({ type: "versions" }, `price_tiers/${_priceTierId}/versions`, params, options);
|
16
|
+
}
|
17
|
+
isPriceTier(resource) {
|
18
|
+
return resource.type && resource.type === PriceTiers.TYPE;
|
19
|
+
}
|
20
|
+
relationship(id) {
|
21
|
+
return super.relationshipOneToOne(id);
|
22
|
+
}
|
23
|
+
relationshipToMany(...ids) {
|
24
|
+
return super.relationshipOneToMany(...ids);
|
25
|
+
}
|
26
|
+
type() {
|
27
|
+
return PriceTiers.TYPE;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
const instance = new PriceTiers();
|
31
|
+
var price_tiers_default = instance;
|
32
|
+
|
33
|
+
export { price_tiers_default as default };
|
34
|
+
//# sourceMappingURL=price_tiers.js.map
|
35
|
+
//# sourceMappingURL=price_tiers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/price_tiers.ts"],"names":[],"mappings":";;AAsDA,MAAM,mBAAmB,WAAuB,CAAA;AAAA,EAE/C,OAAgB,IAAsB,GAAA,aAAA;AAAA,EAEtC,MAAM,KAAA,CAAM,WAAiC,EAAA,MAAA,EAAqC,OAA2C,EAAA;AAC5H,IAAM,MAAA,YAAA,GAAgB,YAA0B,EAAM,IAAA,WAAA;AACtD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAe,YAAA,EAAA,YAAY,CAAU,MAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5G,EAEA,MAAM,WAAA,CAAY,WAAiC,EAAA,MAAA,EAAsC,OAA8D,EAAA;AACtJ,IAAM,MAAA,YAAA,GAAgB,YAA0B,EAAM,IAAA,WAAA;AACtD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAe,YAAA,EAAA,YAAY,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5H,EAEA,MAAM,QAAA,CAAS,WAAiC,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC7I,IAAM,MAAA,YAAA,GAAgB,YAA0B,EAAM,IAAA,WAAA;AACtD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAe,YAAA,EAAA,YAAY,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnH,EAGA,YAAY,QAAsC,EAAA;AACjD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,UAAW,CAAA,IAAA;AAAA;AACvD,EAGA,aAAa,EAA8C,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAAmC,EAAE,CAAA;AAAA;AACnD,EAEA,sBAAsB,GAA+B,EAAA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAAoC,CAAA,GAAG,GAAG,CAAA;AAAA;AACxD,EAGA,IAAsB,GAAA;AACrB,IAAA,OAAO,UAAW,CAAA,IAAA;AAAA;AAGpB;AAGA,MAAM,QAAA,GAAW,IAAI,UAAW,EAAA;AAChC,IAAO,mBAAQ,GAAA","file":"price_tiers.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Price } from './prices'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype PriceTierType = 'price_tiers'\ntype PriceTierRel = ResourceRel & { type: PriceTierType }\n\n\nexport type PriceTierSort = Pick<PriceTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type PriceTierFilter = Pick<PriceTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface PriceTier extends Resource {\n\t\n\treadonly type: PriceTierType\n\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit. When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```20.5```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this price tier, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this price tier, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\n\tprice?: Price | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass PriceTiers extends ApiResource<PriceTier> {\n\n\tstatic readonly TYPE: PriceTierType = 'price_tiers' as const\n\n\tasync price(priceTierId: string | PriceTier, params?: QueryParamsRetrieve<Price>, options?: ResourcesConfig): Promise<Price> {\n\t\tconst _priceTierId = (priceTierId as PriceTier).id || priceTierId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_tiers/${_priceTierId}/price`, params, options) as unknown as Price\n\t}\n\n\tasync attachments(priceTierId: string | PriceTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceTierId = (priceTierId as PriceTier).id || priceTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_tiers/${_priceTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceTierId: string | PriceTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceTierId = (priceTierId as PriceTier).id || priceTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_tiers/${_priceTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPriceTier(resource: any): resource is PriceTier {\n\t\treturn resource.type && (resource.type === PriceTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceTierRel {\n\t\treturn super.relationshipOneToOne<PriceTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceTierRel[] {\n\t\treturn super.relationshipOneToMany<PriceTierRel>(...ids)\n\t}\n\n\n\ttype(): PriceTierType {\n\t\treturn PriceTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceTiers()\nexport default instance\n\nexport type { PriceTier, PriceTierType }\n"]}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var resource = require('../resource');
|
4
|
+
|
5
|
+
class PriceVolumeTiers extends resource.ApiResource {
|
6
|
+
static TYPE = "price_volume_tiers";
|
7
|
+
async create(resource, params, options) {
|
8
|
+
return this.resources.create({ ...resource, type: PriceVolumeTiers.TYPE }, params, options);
|
9
|
+
}
|
10
|
+
async update(resource, params, options) {
|
11
|
+
return this.resources.update({ ...resource, type: PriceVolumeTiers.TYPE }, params, options);
|
12
|
+
}
|
13
|
+
async delete(id, options) {
|
14
|
+
await this.resources.delete(typeof id === "string" ? { id, type: PriceVolumeTiers.TYPE } : id, options);
|
15
|
+
}
|
16
|
+
async price(priceVolumeTierId, params, options) {
|
17
|
+
const _priceVolumeTierId = priceVolumeTierId.id || priceVolumeTierId;
|
18
|
+
return this.resources.fetch({ type: "prices" }, `price_volume_tiers/${_priceVolumeTierId}/price`, params, options);
|
19
|
+
}
|
20
|
+
async attachments(priceVolumeTierId, params, options) {
|
21
|
+
const _priceVolumeTierId = priceVolumeTierId.id || priceVolumeTierId;
|
22
|
+
return this.resources.fetch({ type: "attachments" }, `price_volume_tiers/${_priceVolumeTierId}/attachments`, params, options);
|
23
|
+
}
|
24
|
+
async versions(priceVolumeTierId, params, options) {
|
25
|
+
const _priceVolumeTierId = priceVolumeTierId.id || priceVolumeTierId;
|
26
|
+
return this.resources.fetch({ type: "versions" }, `price_volume_tiers/${_priceVolumeTierId}/versions`, params, options);
|
27
|
+
}
|
28
|
+
async events(priceVolumeTierId, params, options) {
|
29
|
+
const _priceVolumeTierId = priceVolumeTierId.id || priceVolumeTierId;
|
30
|
+
return this.resources.fetch({ type: "events" }, `price_volume_tiers/${_priceVolumeTierId}/events`, params, options);
|
31
|
+
}
|
32
|
+
isPriceVolumeTier(resource) {
|
33
|
+
return resource.type && resource.type === PriceVolumeTiers.TYPE;
|
34
|
+
}
|
35
|
+
relationship(id) {
|
36
|
+
return super.relationshipOneToOne(id);
|
37
|
+
}
|
38
|
+
relationshipToMany(...ids) {
|
39
|
+
return super.relationshipOneToMany(...ids);
|
40
|
+
}
|
41
|
+
type() {
|
42
|
+
return PriceVolumeTiers.TYPE;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
const instance = new PriceVolumeTiers();
|
46
|
+
var price_volume_tiers_default = instance;
|
47
|
+
|
48
|
+
module.exports = price_volume_tiers_default;
|
49
|
+
//# sourceMappingURL=price_volume_tiers.cjs.map
|
50
|
+
|
51
|
+
module.exports = exports.default;
|
52
|
+
//# sourceMappingURL=price_volume_tiers.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/resources/price_volume_tiers.ts"],"names":["ApiResource"],"mappings":";;;;AAuGA,MAAM,yBAAyBA,oBAA6B,CAAA;AAAA,EAE3D,OAAgB,IAA4B,GAAA,oBAAA;AAAA,EAE5C,MAAM,MAAA,CAAO,QAAiC,EAAA,MAAA,EAA+C,OAAqD,EAAA;AACjJ,IAAO,OAAA,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,CAAS,iBAA6C,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACzJ,IAAM,MAAA,kBAAA,GAAsB,kBAAsC,EAAM,IAAA,iBAAA;AACxE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAsB,mBAAA,EAAA,kBAAkB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAA,CAAO,iBAA6C,EAAA,MAAA,EAAiC,OAAyD,EAAA;AACnJ,IAAM,MAAA,kBAAA,GAAsB,kBAAsC,EAAM,IAAA,iBAAA;AACxE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAsB,mBAAA,EAAA,kBAAkB,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAGA,kBAAkB,QAA4C,EAAA;AAC7D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,gBAAiB,CAAA,IAAA;AAAA;AAC7D,EAGA,aAAa,EAAoD,EAAA;AAChE,IAAO,OAAA,KAAA,CAAM,qBAAyC,EAAE,CAAA;AAAA;AACzD,EAEA,sBAAsB,GAAqC,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAA0C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC9D,EAGA,IAA4B,GAAA;AAC3B,IAAA,OAAO,gBAAiB,CAAA,IAAA;AAAA;AAG1B;AAGA,MAAM,QAAA,GAAW,IAAI,gBAAiB,EAAA;AACtC,IAAO,0BAAQ,GAAA","file":"price_volume_tiers.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 { Price, PriceType } from './prices'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { Event } from './events'\n\n\ntype PriceVolumeTierType = 'price_volume_tiers'\ntype PriceVolumeTierRel = ResourceRel & { type: PriceVolumeTierType }\ntype PriceRel = ResourceRel & { type: PriceType }\n\n\nexport type PriceVolumeTierSort = Pick<PriceVolumeTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type PriceVolumeTierFilter = Pick<PriceVolumeTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface PriceVolumeTier extends Resource {\n\t\n\treadonly type: PriceVolumeTierType\n\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit, expressed as the line item quantity. When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```15```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The price of this price tier, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this price tier, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\n\tprice?: Price | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\tevents?: Event[] | null\n\n}\n\n\ninterface PriceVolumeTierCreate extends ResourceCreate {\n\t\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname: string\n\t/** \n\t * The tier upper limit, expressed as the line item quantity. When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```15```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents: number\n\n\tprice: PriceRel\n\n}\n\n\ninterface PriceVolumeTierUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The price tier's name.\n\t * @example ```\"six pack\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The tier upper limit, expressed as the line item quantity. When 'null' it means infinity (useful to have an always matching tier).\n\t * @example ```15```\n\t */\n\tup_to?: number | null\n\t/** \n\t * The price of this price tier, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\n\tprice?: PriceRel | null\n\n}\n\n\nclass PriceVolumeTiers extends ApiResource<PriceVolumeTier> {\n\n\tstatic readonly TYPE: PriceVolumeTierType = 'price_volume_tiers' as const\n\n\tasync create(resource: PriceVolumeTierCreate, params?: QueryParamsRetrieve<PriceVolumeTier>, options?: ResourcesConfig): Promise<PriceVolumeTier> {\n\t\treturn this.resources.create<PriceVolumeTierCreate, PriceVolumeTier>({ ...resource, type: PriceVolumeTiers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceVolumeTierUpdate, params?: QueryParamsRetrieve<PriceVolumeTier>, options?: ResourcesConfig): Promise<PriceVolumeTier> {\n\t\treturn this.resources.update<PriceVolumeTierUpdate, PriceVolumeTier>({ ...resource, type: PriceVolumeTiers.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: PriceVolumeTiers.TYPE } : id, options)\n\t}\n\n\tasync price(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsRetrieve<Price>, options?: ResourcesConfig): Promise<Price> {\n\t\tconst _priceVolumeTierId = (priceVolumeTierId as PriceVolumeTier).id || priceVolumeTierId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_volume_tiers/${_priceVolumeTierId}/price`, params, options) as unknown as Price\n\t}\n\n\tasync attachments(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceVolumeTierId = (priceVolumeTierId as PriceVolumeTier).id || priceVolumeTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_volume_tiers/${_priceVolumeTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceVolumeTierId = (priceVolumeTierId as PriceVolumeTier).id || priceVolumeTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_volume_tiers/${_priceVolumeTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync events(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _priceVolumeTierId = (priceVolumeTierId as PriceVolumeTier).id || priceVolumeTierId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `price_volume_tiers/${_priceVolumeTierId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\n\tisPriceVolumeTier(resource: any): resource is PriceVolumeTier {\n\t\treturn resource.type && (resource.type === PriceVolumeTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceVolumeTierRel {\n\t\treturn super.relationshipOneToOne<PriceVolumeTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceVolumeTierRel[] {\n\t\treturn super.relationshipOneToMany<PriceVolumeTierRel>(...ids)\n\t}\n\n\n\ttype(): PriceVolumeTierType {\n\t\treturn PriceVolumeTiers.TYPE\n\t}\n\n}\n\n\nconst instance = new PriceVolumeTiers()\nexport default instance\n\nexport type { PriceVolumeTier, PriceVolumeTierCreate, PriceVolumeTierUpdate, PriceVolumeTierType }\n"]}
|