@commercelayer/sdk 2.3.1 → 2.3.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{api.d.ts → cjs/api.d.ts} +101 -101
- package/lib/cjs/api.js +406 -0
- package/lib/{client.d.ts → cjs/client.d.ts} +30 -30
- package/lib/cjs/client.js +101 -0
- package/lib/{commercelayer.d.ts → cjs/commercelayer.d.ts} +118 -118
- package/lib/cjs/commercelayer.js +201 -0
- package/lib/{common.d.ts → cjs/common.d.ts} +4 -4
- package/lib/cjs/common.js +13 -0
- package/lib/{config.d.ts → cjs/config.d.ts} +7 -7
- package/lib/cjs/config.js +9 -0
- package/lib/{error.d.ts → cjs/error.d.ts} +26 -23
- package/lib/cjs/error.js +40 -0
- package/lib/{index.d.ts → cjs/index.d.ts} +6 -6
- package/lib/cjs/index.js +24 -0
- package/lib/{interceptor.d.ts → cjs/interceptor.d.ts} +19 -19
- package/lib/cjs/interceptor.js +2 -0
- package/lib/{jsonapi.d.ts → cjs/jsonapi.d.ts} +7 -7
- package/lib/cjs/jsonapi.js +63 -0
- package/lib/{model.d.ts → cjs/model.d.ts} +99 -99
- package/lib/cjs/model.js +3 -0
- package/lib/{query.d.ts → cjs/query.d.ts} +57 -57
- package/lib/cjs/query.js +172 -0
- package/lib/{resource.d.ts → cjs/resource.d.ts} +69 -69
- package/lib/cjs/resource.js +114 -0
- package/lib/{resources → cjs/resources}/addresses.d.ts +91 -91
- package/lib/cjs/resources/addresses.js +47 -0
- package/lib/{resources → cjs/resources}/adjustments.d.ts +39 -39
- package/lib/cjs/resources/adjustments.js +47 -0
- package/lib/{resources → cjs/resources}/adyen_gateways.d.ts +49 -49
- package/lib/cjs/resources/adyen_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/adyen_payments.d.ts +47 -47
- package/lib/cjs/resources/adyen_payments.js +47 -0
- package/lib/{resources → cjs/resources}/application.d.ts +25 -25
- package/lib/cjs/resources/application.js +35 -0
- package/lib/{resources → cjs/resources}/attachments.d.ts +160 -160
- package/lib/cjs/resources/attachments.js +47 -0
- package/lib/{resources → cjs/resources}/authorizations.d.ts +58 -58
- package/lib/cjs/resources/authorizations.js +41 -0
- package/lib/{resources → cjs/resources}/avalara_accounts.d.ts +53 -53
- package/lib/cjs/resources/avalara_accounts.js +47 -0
- package/lib/{resources → cjs/resources}/billing_info_validation_rules.d.ts +35 -35
- package/lib/cjs/resources/billing_info_validation_rules.js +47 -0
- package/lib/{resources → cjs/resources}/bing_geocoders.d.ts +37 -37
- package/lib/cjs/resources/bing_geocoders.js +47 -0
- package/lib/{resources → cjs/resources}/braintree_gateways.d.ts +58 -58
- package/lib/cjs/resources/braintree_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/braintree_payments.d.ts +49 -49
- package/lib/cjs/resources/braintree_payments.js +47 -0
- package/lib/{resources → cjs/resources}/bundles.d.ts +69 -69
- package/lib/cjs/resources/bundles.js +47 -0
- package/lib/{resources → cjs/resources}/captures.d.ts +49 -49
- package/lib/cjs/resources/captures.js +41 -0
- package/lib/{resources → cjs/resources}/carrier_accounts.d.ts +28 -28
- package/lib/cjs/resources/carrier_accounts.js +38 -0
- package/lib/{resources → cjs/resources}/checkout_com_gateways.d.ts +47 -47
- package/lib/cjs/resources/checkout_com_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/checkout_com_payments.d.ts +53 -53
- package/lib/cjs/resources/checkout_com_payments.js +47 -0
- package/lib/{resources → cjs/resources}/coupon_codes_promotion_rules.d.ts +62 -62
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +47 -0
- package/lib/{resources → cjs/resources}/coupon_recipients.d.ts +46 -46
- package/lib/cjs/resources/coupon_recipients.js +47 -0
- package/lib/{resources → cjs/resources}/coupons.d.ts +45 -45
- package/lib/cjs/resources/coupons.js +47 -0
- package/lib/{resources → cjs/resources}/customer_addresses.d.ts +43 -43
- package/lib/cjs/resources/customer_addresses.js +47 -0
- package/lib/{resources → cjs/resources}/customer_groups.d.ts +37 -37
- package/lib/cjs/resources/customer_groups.js +47 -0
- package/lib/{resources → cjs/resources}/customer_password_resets.d.ts +36 -36
- package/lib/cjs/resources/customer_password_resets.js +47 -0
- package/lib/{resources → cjs/resources}/customer_payment_sources.d.ts +69 -69
- package/lib/cjs/resources/customer_payment_sources.js +47 -0
- package/lib/{resources → cjs/resources}/customer_subscriptions.d.ts +31 -31
- package/lib/cjs/resources/customer_subscriptions.js +47 -0
- package/lib/{resources → cjs/resources}/customers.d.ts +56 -56
- package/lib/cjs/resources/customers.js +47 -0
- package/lib/{resources → cjs/resources}/delivery_lead_times.d.ts +52 -52
- package/lib/cjs/resources/delivery_lead_times.js +47 -0
- package/lib/{resources → cjs/resources}/event_callbacks.d.ts +27 -27
- package/lib/cjs/resources/event_callbacks.js +38 -0
- package/lib/{resources → cjs/resources}/external_gateways.d.ts +48 -48
- package/lib/cjs/resources/external_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/external_payments.d.ts +42 -42
- package/lib/cjs/resources/external_payments.js +47 -0
- package/lib/{resources → cjs/resources}/external_promotions.d.ts +82 -82
- package/lib/cjs/resources/external_promotions.js +47 -0
- package/lib/{resources → cjs/resources}/external_tax_calculators.d.ts +45 -45
- package/lib/cjs/resources/external_tax_calculators.js +47 -0
- package/lib/{resources → cjs/resources}/fixed_amount_promotions.d.ts +84 -84
- package/lib/cjs/resources/fixed_amount_promotions.js +47 -0
- package/lib/{resources → cjs/resources}/fixed_price_promotions.d.ts +93 -93
- package/lib/cjs/resources/fixed_price_promotions.js +47 -0
- package/lib/{resources → cjs/resources}/free_gift_promotions.d.ts +91 -91
- package/lib/cjs/resources/free_gift_promotions.js +47 -0
- package/lib/{resources → cjs/resources}/free_shipping_promotions.d.ts +79 -79
- package/lib/cjs/resources/free_shipping_promotions.js +47 -0
- package/lib/{resources → cjs/resources}/geocoders.d.ts +25 -25
- package/lib/cjs/resources/geocoders.js +35 -0
- package/lib/{resources → cjs/resources}/gift_card_recipients.d.ts +46 -46
- package/lib/cjs/resources/gift_card_recipients.js +47 -0
- package/lib/{resources → cjs/resources}/gift_cards.d.ts +84 -84
- package/lib/cjs/resources/gift_cards.js +47 -0
- package/lib/{resources → cjs/resources}/google_geocoders.d.ts +37 -37
- package/lib/cjs/resources/google_geocoders.js +47 -0
- package/lib/{resources → cjs/resources}/imports.d.ts +44 -44
- package/lib/cjs/resources/imports.js +44 -0
- package/lib/{resources → cjs/resources}/in_stock_subscriptions.d.ts +60 -60
- package/lib/cjs/resources/in_stock_subscriptions.js +47 -0
- package/lib/{resources → cjs/resources}/inventory_models.d.ts +43 -43
- package/lib/cjs/resources/inventory_models.js +47 -0
- package/lib/{resources → cjs/resources}/inventory_return_locations.d.ts +45 -45
- package/lib/cjs/resources/inventory_return_locations.js +47 -0
- package/lib/{resources → cjs/resources}/inventory_stock_locations.d.ts +48 -48
- package/lib/cjs/resources/inventory_stock_locations.js +47 -0
- package/lib/{resources → cjs/resources}/line_item_options.d.ts +59 -59
- package/lib/cjs/resources/line_item_options.js +47 -0
- package/lib/{resources → cjs/resources}/line_items.d.ts +125 -125
- package/lib/cjs/resources/line_items.js +47 -0
- package/lib/{resources → cjs/resources}/manual_gateways.d.ts +36 -36
- package/lib/cjs/resources/manual_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/manual_tax_calculators.d.ts +49 -49
- package/lib/cjs/resources/manual_tax_calculators.js +47 -0
- package/lib/{resources → cjs/resources}/markets.d.ts +79 -79
- package/lib/cjs/resources/markets.js +47 -0
- package/lib/{resources → cjs/resources}/merchants.d.ts +40 -40
- package/lib/cjs/resources/merchants.js +47 -0
- package/lib/{resources → cjs/resources}/order_amount_promotion_rules.d.ts +60 -60
- package/lib/cjs/resources/order_amount_promotion_rules.js +47 -0
- package/lib/{resources → cjs/resources}/order_copies.d.ts +46 -46
- package/lib/cjs/resources/order_copies.js +44 -0
- package/lib/{resources → cjs/resources}/order_subscriptions.d.ts +66 -66
- package/lib/cjs/resources/order_subscriptions.js +47 -0
- package/lib/{resources → cjs/resources}/order_validation_rules.d.ts +22 -22
- package/lib/cjs/resources/order_validation_rules.js +35 -0
- package/lib/{resources → cjs/resources}/orders.d.ts +255 -255
- package/lib/cjs/resources/orders.js +47 -0
- package/lib/{resources → cjs/resources}/organization.d.ts +34 -34
- package/lib/cjs/resources/organization.js +35 -0
- package/lib/{resources → cjs/resources}/packages.d.ts +57 -57
- package/lib/cjs/resources/packages.js +47 -0
- package/lib/{resources → cjs/resources}/parcel_line_items.d.ts +51 -51
- package/lib/cjs/resources/parcel_line_items.js +47 -0
- package/lib/{resources → cjs/resources}/parcels.d.ts +108 -108
- package/lib/cjs/resources/parcels.js +47 -0
- package/lib/{resources → cjs/resources}/payment_gateways.d.ts +33 -33
- package/lib/cjs/resources/payment_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/payment_methods.d.ts +54 -54
- package/lib/cjs/resources/payment_methods.js +47 -0
- package/lib/{resources → cjs/resources}/paypal_gateways.d.ts +41 -41
- package/lib/cjs/resources/paypal_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/paypal_payments.d.ts +49 -49
- package/lib/cjs/resources/paypal_payments.js +47 -0
- package/lib/{resources → cjs/resources}/percentage_discount_promotions.d.ts +91 -91
- package/lib/cjs/resources/percentage_discount_promotions.js +47 -0
- package/lib/{resources → cjs/resources}/price_lists.d.ts +41 -41
- package/lib/cjs/resources/price_lists.js +47 -0
- package/lib/{resources → cjs/resources}/prices.d.ts +58 -58
- package/lib/cjs/resources/prices.js +47 -0
- package/lib/{resources → cjs/resources}/promotion_rules.d.ts +27 -27
- package/lib/cjs/resources/promotion_rules.js +35 -0
- package/lib/{resources → cjs/resources}/promotions.d.ts +38 -38
- package/lib/cjs/resources/promotions.js +35 -0
- package/lib/{resources → cjs/resources}/refunds.d.ts +36 -36
- package/lib/cjs/resources/refunds.js +38 -0
- package/lib/{resources → cjs/resources}/return_line_items.d.ts +51 -51
- package/lib/cjs/resources/return_line_items.js +47 -0
- package/lib/{resources → cjs/resources}/returns.d.ts +69 -69
- package/lib/cjs/resources/returns.js +47 -0
- package/lib/{resources → cjs/resources}/shipments.d.ts +80 -80
- package/lib/cjs/resources/shipments.js +41 -0
- package/lib/{resources → cjs/resources}/shipping_categories.d.ts +35 -35
- package/lib/cjs/resources/shipping_categories.js +47 -0
- package/lib/{resources → cjs/resources}/shipping_methods.d.ts +71 -71
- package/lib/cjs/resources/shipping_methods.js +47 -0
- package/lib/{resources → cjs/resources}/shipping_zones.d.ts +51 -51
- package/lib/cjs/resources/shipping_zones.js +47 -0
- package/lib/{resources → cjs/resources}/sku_list_items.d.ts +46 -46
- package/lib/cjs/resources/sku_list_items.js +47 -0
- package/lib/{resources → cjs/resources}/sku_list_promotion_rules.d.ts +70 -70
- package/lib/cjs/resources/sku_list_promotion_rules.js +47 -0
- package/lib/{resources → cjs/resources}/sku_lists.d.ts +50 -50
- package/lib/cjs/resources/sku_lists.js +47 -0
- package/lib/{resources → cjs/resources}/sku_options.d.ts +55 -55
- package/lib/cjs/resources/sku_options.js +47 -0
- package/lib/{resources → cjs/resources}/skus.d.ts +76 -76
- package/lib/cjs/resources/skus.js +47 -0
- package/lib/{resources → cjs/resources}/stock_items.d.ts +50 -50
- package/lib/cjs/resources/stock_items.js +47 -0
- package/lib/{resources → cjs/resources}/stock_line_items.d.ts +30 -30
- package/lib/cjs/resources/stock_line_items.js +38 -0
- package/lib/{resources → cjs/resources}/stock_locations.d.ts +55 -55
- package/lib/cjs/resources/stock_locations.js +47 -0
- package/lib/{resources → cjs/resources}/stock_transfers.d.ts +70 -70
- package/lib/cjs/resources/stock_transfers.js +47 -0
- package/lib/{resources → cjs/resources}/stripe_gateways.d.ts +40 -40
- package/lib/cjs/resources/stripe_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/stripe_payments.d.ts +44 -44
- package/lib/cjs/resources/stripe_payments.js +47 -0
- package/lib/{resources → cjs/resources}/tax_calculators.d.ts +27 -27
- package/lib/cjs/resources/tax_calculators.js +35 -0
- package/lib/{resources → cjs/resources}/tax_categories.d.ts +61 -61
- package/lib/cjs/resources/tax_categories.js +47 -0
- package/lib/{resources → cjs/resources}/tax_rules.d.ts +72 -72
- package/lib/cjs/resources/tax_rules.js +47 -0
- package/lib/{resources → cjs/resources}/taxjar_accounts.d.ts +44 -44
- package/lib/cjs/resources/taxjar_accounts.js +47 -0
- package/lib/{resources → cjs/resources}/transactions.d.ts +33 -33
- package/lib/cjs/resources/transactions.js +35 -0
- package/lib/{resources → cjs/resources}/voids.d.ts +36 -36
- package/lib/cjs/resources/voids.js +38 -0
- package/lib/{resources → cjs/resources}/webhooks.d.ts +45 -45
- package/lib/cjs/resources/webhooks.js +47 -0
- package/lib/{resources → cjs/resources}/wire_transfers.d.ts +35 -35
- package/lib/cjs/resources/wire_transfers.js +47 -0
- package/lib/{static.d.ts → cjs/static.d.ts} +6 -5
- package/lib/cjs/static.js +36 -0
- package/lib/{util.d.ts → cjs/util.d.ts} +3 -3
- package/lib/cjs/util.js +7 -0
- package/lib/esm/api.d.ts +101 -0
- package/lib/esm/api.js +304 -0
- package/lib/esm/client.d.ts +30 -0
- package/lib/esm/client.js +96 -0
- package/lib/esm/commercelayer.d.ts +118 -0
- package/lib/esm/commercelayer.js +177 -0
- package/lib/esm/common.d.ts +4 -0
- package/lib/esm/common.js +9 -0
- package/lib/esm/config.d.ts +7 -0
- package/lib/esm/config.js +7 -0
- package/lib/esm/error.d.ts +26 -0
- package/lib/esm/error.js +35 -0
- package/lib/esm/index.d.ts +6 -0
- package/lib/esm/index.js +6 -0
- package/lib/esm/interceptor.d.ts +19 -0
- package/lib/esm/interceptor.js +1 -0
- package/lib/esm/jsonapi.d.ts +7 -0
- package/lib/esm/jsonapi.js +59 -0
- package/lib/esm/model.d.ts +99 -0
- package/lib/esm/model.js +2 -0
- package/lib/esm/query.d.ts +57 -0
- package/lib/esm/query.js +168 -0
- package/lib/esm/resource.d.ts +69 -0
- package/lib/esm/resource.js +108 -0
- package/lib/esm/resources/addresses.d.ts +91 -0
- package/lib/esm/resources/addresses.js +45 -0
- package/lib/esm/resources/adjustments.d.ts +39 -0
- package/lib/esm/resources/adjustments.js +45 -0
- package/lib/esm/resources/adyen_gateways.d.ts +49 -0
- package/lib/esm/resources/adyen_gateways.js +45 -0
- package/lib/esm/resources/adyen_payments.d.ts +47 -0
- package/lib/esm/resources/adyen_payments.js +45 -0
- package/lib/esm/resources/application.d.ts +25 -0
- package/lib/esm/resources/application.js +33 -0
- package/lib/esm/resources/attachments.d.ts +160 -0
- package/lib/esm/resources/attachments.js +45 -0
- package/lib/esm/resources/authorizations.d.ts +58 -0
- package/lib/esm/resources/authorizations.js +39 -0
- package/lib/esm/resources/avalara_accounts.d.ts +53 -0
- package/lib/esm/resources/avalara_accounts.js +45 -0
- package/lib/esm/resources/billing_info_validation_rules.d.ts +35 -0
- package/lib/esm/resources/billing_info_validation_rules.js +45 -0
- package/lib/esm/resources/bing_geocoders.d.ts +37 -0
- package/lib/esm/resources/bing_geocoders.js +45 -0
- package/lib/esm/resources/braintree_gateways.d.ts +58 -0
- package/lib/esm/resources/braintree_gateways.js +45 -0
- package/lib/esm/resources/braintree_payments.d.ts +49 -0
- package/lib/esm/resources/braintree_payments.js +45 -0
- package/lib/esm/resources/bundles.d.ts +69 -0
- package/lib/esm/resources/bundles.js +45 -0
- package/lib/esm/resources/captures.d.ts +49 -0
- package/lib/esm/resources/captures.js +39 -0
- package/lib/esm/resources/carrier_accounts.d.ts +28 -0
- package/lib/esm/resources/carrier_accounts.js +36 -0
- package/lib/esm/resources/checkout_com_gateways.d.ts +47 -0
- package/lib/esm/resources/checkout_com_gateways.js +45 -0
- package/lib/esm/resources/checkout_com_payments.d.ts +53 -0
- package/lib/esm/resources/checkout_com_payments.js +45 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +62 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.js +45 -0
- package/lib/esm/resources/coupon_recipients.d.ts +46 -0
- package/lib/esm/resources/coupon_recipients.js +45 -0
- package/lib/esm/resources/coupons.d.ts +45 -0
- package/lib/esm/resources/coupons.js +45 -0
- package/lib/esm/resources/customer_addresses.d.ts +43 -0
- package/lib/esm/resources/customer_addresses.js +45 -0
- package/lib/esm/resources/customer_groups.d.ts +37 -0
- package/lib/esm/resources/customer_groups.js +45 -0
- package/lib/esm/resources/customer_password_resets.d.ts +36 -0
- package/lib/esm/resources/customer_password_resets.js +45 -0
- package/lib/esm/resources/customer_payment_sources.d.ts +69 -0
- package/lib/esm/resources/customer_payment_sources.js +45 -0
- package/lib/esm/resources/customer_subscriptions.d.ts +31 -0
- package/lib/esm/resources/customer_subscriptions.js +45 -0
- package/lib/esm/resources/customers.d.ts +56 -0
- package/lib/esm/resources/customers.js +45 -0
- package/lib/esm/resources/delivery_lead_times.d.ts +52 -0
- package/lib/esm/resources/delivery_lead_times.js +45 -0
- package/lib/esm/resources/event_callbacks.d.ts +27 -0
- package/lib/esm/resources/event_callbacks.js +36 -0
- package/lib/esm/resources/external_gateways.d.ts +48 -0
- package/lib/esm/resources/external_gateways.js +45 -0
- package/lib/esm/resources/external_payments.d.ts +42 -0
- package/lib/esm/resources/external_payments.js +45 -0
- package/lib/esm/resources/external_promotions.d.ts +82 -0
- package/lib/esm/resources/external_promotions.js +45 -0
- package/lib/esm/resources/external_tax_calculators.d.ts +45 -0
- package/lib/esm/resources/external_tax_calculators.js +45 -0
- package/lib/esm/resources/fixed_amount_promotions.d.ts +84 -0
- package/lib/esm/resources/fixed_amount_promotions.js +45 -0
- package/lib/esm/resources/fixed_price_promotions.d.ts +93 -0
- package/lib/esm/resources/fixed_price_promotions.js +45 -0
- package/lib/esm/resources/free_gift_promotions.d.ts +91 -0
- package/lib/esm/resources/free_gift_promotions.js +45 -0
- package/lib/esm/resources/free_shipping_promotions.d.ts +79 -0
- package/lib/esm/resources/free_shipping_promotions.js +45 -0
- package/lib/esm/resources/geocoders.d.ts +25 -0
- package/lib/esm/resources/geocoders.js +33 -0
- package/lib/esm/resources/gift_card_recipients.d.ts +46 -0
- package/lib/esm/resources/gift_card_recipients.js +45 -0
- package/lib/esm/resources/gift_cards.d.ts +84 -0
- package/lib/esm/resources/gift_cards.js +45 -0
- package/lib/esm/resources/google_geocoders.d.ts +37 -0
- package/lib/esm/resources/google_geocoders.js +45 -0
- package/lib/esm/resources/imports.d.ts +44 -0
- package/lib/esm/resources/imports.js +42 -0
- package/lib/esm/resources/in_stock_subscriptions.d.ts +60 -0
- package/lib/esm/resources/in_stock_subscriptions.js +45 -0
- package/lib/esm/resources/inventory_models.d.ts +43 -0
- package/lib/esm/resources/inventory_models.js +45 -0
- package/lib/esm/resources/inventory_return_locations.d.ts +45 -0
- package/lib/esm/resources/inventory_return_locations.js +45 -0
- package/lib/esm/resources/inventory_stock_locations.d.ts +48 -0
- package/lib/esm/resources/inventory_stock_locations.js +45 -0
- package/lib/esm/resources/line_item_options.d.ts +59 -0
- package/lib/esm/resources/line_item_options.js +45 -0
- package/lib/esm/resources/line_items.d.ts +125 -0
- package/lib/esm/resources/line_items.js +45 -0
- package/lib/esm/resources/manual_gateways.d.ts +36 -0
- package/lib/esm/resources/manual_gateways.js +45 -0
- package/lib/esm/resources/manual_tax_calculators.d.ts +49 -0
- package/lib/esm/resources/manual_tax_calculators.js +45 -0
- package/lib/esm/resources/markets.d.ts +79 -0
- package/lib/esm/resources/markets.js +45 -0
- package/lib/esm/resources/merchants.d.ts +40 -0
- package/lib/esm/resources/merchants.js +45 -0
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +60 -0
- package/lib/esm/resources/order_amount_promotion_rules.js +45 -0
- package/lib/esm/resources/order_copies.d.ts +46 -0
- package/lib/esm/resources/order_copies.js +42 -0
- package/lib/esm/resources/order_subscriptions.d.ts +66 -0
- package/lib/esm/resources/order_subscriptions.js +45 -0
- package/lib/esm/resources/order_validation_rules.d.ts +22 -0
- package/lib/esm/resources/order_validation_rules.js +33 -0
- package/lib/esm/resources/orders.d.ts +255 -0
- package/lib/esm/resources/orders.js +45 -0
- package/lib/esm/resources/organization.d.ts +34 -0
- package/lib/esm/resources/organization.js +33 -0
- package/lib/esm/resources/packages.d.ts +57 -0
- package/lib/esm/resources/packages.js +45 -0
- package/lib/esm/resources/parcel_line_items.d.ts +51 -0
- package/lib/esm/resources/parcel_line_items.js +45 -0
- package/lib/esm/resources/parcels.d.ts +108 -0
- package/lib/esm/resources/parcels.js +45 -0
- package/lib/esm/resources/payment_gateways.d.ts +33 -0
- package/lib/esm/resources/payment_gateways.js +45 -0
- package/lib/esm/resources/payment_methods.d.ts +54 -0
- package/lib/esm/resources/payment_methods.js +45 -0
- package/lib/esm/resources/paypal_gateways.d.ts +41 -0
- package/lib/esm/resources/paypal_gateways.js +45 -0
- package/lib/esm/resources/paypal_payments.d.ts +49 -0
- package/lib/esm/resources/paypal_payments.js +45 -0
- package/lib/esm/resources/percentage_discount_promotions.d.ts +91 -0
- package/lib/esm/resources/percentage_discount_promotions.js +45 -0
- package/lib/esm/resources/price_lists.d.ts +41 -0
- package/lib/esm/resources/price_lists.js +45 -0
- package/lib/esm/resources/prices.d.ts +58 -0
- package/lib/esm/resources/prices.js +45 -0
- package/lib/esm/resources/promotion_rules.d.ts +27 -0
- package/lib/esm/resources/promotion_rules.js +33 -0
- package/lib/esm/resources/promotions.d.ts +38 -0
- package/lib/esm/resources/promotions.js +33 -0
- package/lib/esm/resources/refunds.d.ts +36 -0
- package/lib/esm/resources/refunds.js +36 -0
- package/lib/esm/resources/return_line_items.d.ts +51 -0
- package/lib/esm/resources/return_line_items.js +45 -0
- package/lib/esm/resources/returns.d.ts +69 -0
- package/lib/esm/resources/returns.js +45 -0
- package/lib/esm/resources/shipments.d.ts +80 -0
- package/lib/esm/resources/shipments.js +39 -0
- package/lib/esm/resources/shipping_categories.d.ts +35 -0
- package/lib/esm/resources/shipping_categories.js +45 -0
- package/lib/esm/resources/shipping_methods.d.ts +71 -0
- package/lib/esm/resources/shipping_methods.js +45 -0
- package/lib/esm/resources/shipping_zones.d.ts +51 -0
- package/lib/esm/resources/shipping_zones.js +45 -0
- package/lib/esm/resources/sku_list_items.d.ts +46 -0
- package/lib/esm/resources/sku_list_items.js +45 -0
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +70 -0
- package/lib/esm/resources/sku_list_promotion_rules.js +45 -0
- package/lib/esm/resources/sku_lists.d.ts +50 -0
- package/lib/esm/resources/sku_lists.js +45 -0
- package/lib/esm/resources/sku_options.d.ts +55 -0
- package/lib/esm/resources/sku_options.js +45 -0
- package/lib/esm/resources/skus.d.ts +76 -0
- package/lib/esm/resources/skus.js +45 -0
- package/lib/esm/resources/stock_items.d.ts +50 -0
- package/lib/esm/resources/stock_items.js +45 -0
- package/lib/esm/resources/stock_line_items.d.ts +30 -0
- package/lib/esm/resources/stock_line_items.js +36 -0
- package/lib/esm/resources/stock_locations.d.ts +55 -0
- package/lib/esm/resources/stock_locations.js +45 -0
- package/lib/esm/resources/stock_transfers.d.ts +70 -0
- package/lib/esm/resources/stock_transfers.js +45 -0
- package/lib/esm/resources/stripe_gateways.d.ts +40 -0
- package/lib/esm/resources/stripe_gateways.js +45 -0
- package/lib/esm/resources/stripe_payments.d.ts +44 -0
- package/lib/esm/resources/stripe_payments.js +45 -0
- package/lib/esm/resources/tax_calculators.d.ts +27 -0
- package/lib/esm/resources/tax_calculators.js +33 -0
- package/lib/esm/resources/tax_categories.d.ts +61 -0
- package/lib/esm/resources/tax_categories.js +45 -0
- package/lib/esm/resources/tax_rules.d.ts +72 -0
- package/lib/esm/resources/tax_rules.js +45 -0
- package/lib/esm/resources/taxjar_accounts.d.ts +44 -0
- package/lib/esm/resources/taxjar_accounts.js +45 -0
- package/lib/esm/resources/transactions.d.ts +33 -0
- package/lib/esm/resources/transactions.js +33 -0
- package/lib/esm/resources/voids.d.ts +36 -0
- package/lib/esm/resources/voids.js +36 -0
- package/lib/esm/resources/webhooks.d.ts +45 -0
- package/lib/esm/resources/webhooks.js +45 -0
- package/lib/esm/resources/wire_transfers.d.ts +35 -0
- package/lib/esm/resources/wire_transfers.js +45 -0
- package/lib/esm/static.d.ts +6 -0
- package/lib/esm/static.js +14 -0
- package/lib/esm/util.d.ts +3 -0
- package/lib/esm/util.js +4 -0
- package/lib/tsconfig.esm.tsbuildinfo +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/package.json +70 -57
- package/lib/index.js +0 -8
- package/lib/sdk.cjs.development.js +0 -17132
- package/lib/sdk.cjs.development.js.map +0 -1
- package/lib/sdk.cjs.production.min.js +0 -2
- package/lib/sdk.cjs.production.min.js.map +0 -1
- package/lib/sdk.esm.js +0 -17126
- package/lib/sdk.esm.js.map +0 -1
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ©2021 Commerce Layer Inc.
|
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
|
4
|
-
**/
|
|
5
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
|
6
|
-
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
7
|
-
import { Sku } from './skus';
|
|
8
|
-
import { AvalaraAccount } from './avalara_accounts';
|
|
9
|
-
import { TaxjarAccount } from './taxjar_accounts';
|
|
10
|
-
import { ManualTaxCalculator } from './manual_tax_calculators';
|
|
11
|
-
import { ExternalTaxCalculator } from './external_tax_calculators';
|
|
12
|
-
import { Attachment } from './attachments';
|
|
13
|
-
declare type TaxCategoryRel = ResourceId & {
|
|
14
|
-
type: typeof TaxCategories.TYPE;
|
|
15
|
-
};
|
|
16
|
-
declare type SkuRel = ResourceId & {
|
|
17
|
-
type: 'skus';
|
|
18
|
-
};
|
|
19
|
-
declare type AvalaraAccountRel = ResourceId & {
|
|
20
|
-
type: 'avalara_accounts';
|
|
21
|
-
};
|
|
22
|
-
declare type TaxjarAccountRel = ResourceId & {
|
|
23
|
-
type: 'taxjar_accounts';
|
|
24
|
-
};
|
|
25
|
-
declare type ManualTaxCalculatorRel = ResourceId & {
|
|
26
|
-
type: 'manual_tax_calculators';
|
|
27
|
-
};
|
|
28
|
-
declare type ExternalTaxCalculatorRel = ResourceId & {
|
|
29
|
-
type: 'external_tax_calculators';
|
|
30
|
-
};
|
|
31
|
-
interface TaxCategory extends Resource {
|
|
32
|
-
code?: string;
|
|
33
|
-
sku_code?: string;
|
|
34
|
-
sku?: Sku;
|
|
35
|
-
tax_calculator?: AvalaraAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator;
|
|
36
|
-
attachments?: Attachment[];
|
|
37
|
-
}
|
|
38
|
-
interface TaxCategoryCreate extends ResourceCreate {
|
|
39
|
-
code: string;
|
|
40
|
-
sku_code?: string;
|
|
41
|
-
sku?: SkuRel;
|
|
42
|
-
tax_calculator?: AvalaraAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel;
|
|
43
|
-
}
|
|
44
|
-
interface TaxCategoryUpdate extends ResourceUpdate {
|
|
45
|
-
code?: string;
|
|
46
|
-
sku_code?: string;
|
|
47
|
-
sku?: SkuRel;
|
|
48
|
-
}
|
|
49
|
-
declare class TaxCategories extends ApiResource {
|
|
50
|
-
static readonly TYPE: 'tax_categories';
|
|
51
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
|
52
|
-
create(resource: TaxCategoryCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
|
|
53
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
|
|
54
|
-
update(resource: TaxCategoryUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
|
|
55
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
|
56
|
-
isTaxCategory(resource: any): resource is TaxCategory;
|
|
57
|
-
relationship(id: string | ResourceId): TaxCategoryRel;
|
|
58
|
-
type(): string;
|
|
59
|
-
}
|
|
60
|
-
export default TaxCategories;
|
|
61
|
-
export { TaxCategory, TaxCategoryCreate, TaxCategoryUpdate };
|
|
1
|
+
/**
|
|
2
|
+
* ©2021 Commerce Layer Inc.
|
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
|
4
|
+
**/
|
|
5
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
7
|
+
import { Sku } from './skus';
|
|
8
|
+
import { AvalaraAccount } from './avalara_accounts';
|
|
9
|
+
import { TaxjarAccount } from './taxjar_accounts';
|
|
10
|
+
import { ManualTaxCalculator } from './manual_tax_calculators';
|
|
11
|
+
import { ExternalTaxCalculator } from './external_tax_calculators';
|
|
12
|
+
import { Attachment } from './attachments';
|
|
13
|
+
declare type TaxCategoryRel = ResourceId & {
|
|
14
|
+
type: typeof TaxCategories.TYPE;
|
|
15
|
+
};
|
|
16
|
+
declare type SkuRel = ResourceId & {
|
|
17
|
+
type: 'skus';
|
|
18
|
+
};
|
|
19
|
+
declare type AvalaraAccountRel = ResourceId & {
|
|
20
|
+
type: 'avalara_accounts';
|
|
21
|
+
};
|
|
22
|
+
declare type TaxjarAccountRel = ResourceId & {
|
|
23
|
+
type: 'taxjar_accounts';
|
|
24
|
+
};
|
|
25
|
+
declare type ManualTaxCalculatorRel = ResourceId & {
|
|
26
|
+
type: 'manual_tax_calculators';
|
|
27
|
+
};
|
|
28
|
+
declare type ExternalTaxCalculatorRel = ResourceId & {
|
|
29
|
+
type: 'external_tax_calculators';
|
|
30
|
+
};
|
|
31
|
+
interface TaxCategory extends Resource {
|
|
32
|
+
code?: string;
|
|
33
|
+
sku_code?: string;
|
|
34
|
+
sku?: Sku;
|
|
35
|
+
tax_calculator?: AvalaraAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator;
|
|
36
|
+
attachments?: Attachment[];
|
|
37
|
+
}
|
|
38
|
+
interface TaxCategoryCreate extends ResourceCreate {
|
|
39
|
+
code: string;
|
|
40
|
+
sku_code?: string;
|
|
41
|
+
sku?: SkuRel;
|
|
42
|
+
tax_calculator?: AvalaraAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel;
|
|
43
|
+
}
|
|
44
|
+
interface TaxCategoryUpdate extends ResourceUpdate {
|
|
45
|
+
code?: string;
|
|
46
|
+
sku_code?: string;
|
|
47
|
+
sku?: SkuRel;
|
|
48
|
+
}
|
|
49
|
+
declare class TaxCategories extends ApiResource {
|
|
50
|
+
static readonly TYPE: 'tax_categories';
|
|
51
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
|
52
|
+
create(resource: TaxCategoryCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
|
|
53
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
|
|
54
|
+
update(resource: TaxCategoryUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
|
|
55
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
|
56
|
+
isTaxCategory(resource: any): resource is TaxCategory;
|
|
57
|
+
relationship(id: string | ResourceId): TaxCategoryRel;
|
|
58
|
+
type(): string;
|
|
59
|
+
}
|
|
60
|
+
export default TaxCategories;
|
|
61
|
+
export { TaxCategory, TaxCategoryCreate, TaxCategoryUpdate };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ©2021 Commerce Layer Inc.
|
|
4
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
|
5
|
+
**/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const resource_1 = require("../resource");
|
|
8
|
+
class TaxCategories extends resource_1.ApiResource {
|
|
9
|
+
// static readonly PATH = 'tax_categories'
|
|
10
|
+
async list(params, options) {
|
|
11
|
+
return this.resources.list({ type: TaxCategories.TYPE }, params, options);
|
|
12
|
+
}
|
|
13
|
+
async create(resource, params, options) {
|
|
14
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: TaxCategories.TYPE }), params, options);
|
|
15
|
+
}
|
|
16
|
+
async retrieve(id, params, options) {
|
|
17
|
+
return this.resources.retrieve({ type: TaxCategories.TYPE, id }, params, options);
|
|
18
|
+
}
|
|
19
|
+
async update(resource, params, options) {
|
|
20
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: TaxCategories.TYPE }), params, options);
|
|
21
|
+
}
|
|
22
|
+
async delete(id, options) {
|
|
23
|
+
await this.resources.delete({ type: TaxCategories.TYPE, id }, options);
|
|
24
|
+
}
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
26
|
+
isTaxCategory(resource) {
|
|
27
|
+
return resource.type && (resource.type === TaxCategories.TYPE);
|
|
28
|
+
}
|
|
29
|
+
/*
|
|
30
|
+
filter(): QueryBuilderRetrieve {
|
|
31
|
+
return new QueryBuilderRetrieve(TaxCategories.TYPE)
|
|
32
|
+
}
|
|
33
|
+
*/
|
|
34
|
+
/*
|
|
35
|
+
filterList(): QueryBuilderList {
|
|
36
|
+
return new QueryBuilderList(TaxCategories.TYPE)
|
|
37
|
+
}
|
|
38
|
+
*/
|
|
39
|
+
relationship(id) {
|
|
40
|
+
return (typeof id === 'string') ? { id, type: TaxCategories.TYPE } : { id: id.id, type: TaxCategories.TYPE };
|
|
41
|
+
}
|
|
42
|
+
type() {
|
|
43
|
+
return TaxCategories.TYPE;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
TaxCategories.TYPE = 'tax_categories';
|
|
47
|
+
exports.default = TaxCategories;
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ©2021 Commerce Layer Inc.
|
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
|
4
|
-
**/
|
|
5
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
|
6
|
-
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
7
|
-
import { ManualTaxCalculator } from './manual_tax_calculators';
|
|
8
|
-
declare type TaxRuleRel = ResourceId & {
|
|
9
|
-
type: typeof TaxRules.TYPE;
|
|
10
|
-
};
|
|
11
|
-
declare type ManualTaxCalculatorRel = ResourceId & {
|
|
12
|
-
type: 'manual_tax_calculators';
|
|
13
|
-
};
|
|
14
|
-
interface TaxRule extends Resource {
|
|
15
|
-
name?: string;
|
|
16
|
-
tax_rate?: number;
|
|
17
|
-
country_code_regex?: string;
|
|
18
|
-
not_country_code_regex?: string;
|
|
19
|
-
state_code_regex?: string;
|
|
20
|
-
not_state_code_regex?: string;
|
|
21
|
-
zip_code_regex?: string;
|
|
22
|
-
not_zip_code_regex?: string;
|
|
23
|
-
freight_taxable?: boolean;
|
|
24
|
-
payment_method_taxable?: boolean;
|
|
25
|
-
gift_card_taxable?: boolean;
|
|
26
|
-
adjustment_taxable?: boolean;
|
|
27
|
-
breakdown?: object;
|
|
28
|
-
manual_tax_calculator?: ManualTaxCalculator;
|
|
29
|
-
}
|
|
30
|
-
interface TaxRuleCreate extends ResourceCreate {
|
|
31
|
-
name: string;
|
|
32
|
-
tax_rate?: number;
|
|
33
|
-
country_code_regex?: string;
|
|
34
|
-
not_country_code_regex?: string;
|
|
35
|
-
state_code_regex?: string;
|
|
36
|
-
not_state_code_regex?: string;
|
|
37
|
-
zip_code_regex?: string;
|
|
38
|
-
not_zip_code_regex?: string;
|
|
39
|
-
freight_taxable?: boolean;
|
|
40
|
-
payment_method_taxable?: boolean;
|
|
41
|
-
gift_card_taxable?: boolean;
|
|
42
|
-
adjustment_taxable?: boolean;
|
|
43
|
-
manual_tax_calculator?: ManualTaxCalculatorRel;
|
|
44
|
-
}
|
|
45
|
-
interface TaxRuleUpdate extends ResourceUpdate {
|
|
46
|
-
name?: string;
|
|
47
|
-
tax_rate?: number;
|
|
48
|
-
country_code_regex?: string;
|
|
49
|
-
not_country_code_regex?: string;
|
|
50
|
-
state_code_regex?: string;
|
|
51
|
-
not_state_code_regex?: string;
|
|
52
|
-
zip_code_regex?: string;
|
|
53
|
-
not_zip_code_regex?: string;
|
|
54
|
-
freight_taxable?: boolean;
|
|
55
|
-
payment_method_taxable?: boolean;
|
|
56
|
-
gift_card_taxable?: boolean;
|
|
57
|
-
adjustment_taxable?: boolean;
|
|
58
|
-
manual_tax_calculator?: ManualTaxCalculatorRel;
|
|
59
|
-
}
|
|
60
|
-
declare class TaxRules extends ApiResource {
|
|
61
|
-
static readonly TYPE: 'tax_rules';
|
|
62
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxRule>>;
|
|
63
|
-
create(resource: TaxRuleCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
|
|
64
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
|
|
65
|
-
update(resource: TaxRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
|
|
66
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
|
67
|
-
isTaxRule(resource: any): resource is TaxRule;
|
|
68
|
-
relationship(id: string | ResourceId): TaxRuleRel;
|
|
69
|
-
type(): string;
|
|
70
|
-
}
|
|
71
|
-
export default TaxRules;
|
|
72
|
-
export { TaxRule, TaxRuleCreate, TaxRuleUpdate };
|
|
1
|
+
/**
|
|
2
|
+
* ©2021 Commerce Layer Inc.
|
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
|
4
|
+
**/
|
|
5
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
7
|
+
import { ManualTaxCalculator } from './manual_tax_calculators';
|
|
8
|
+
declare type TaxRuleRel = ResourceId & {
|
|
9
|
+
type: typeof TaxRules.TYPE;
|
|
10
|
+
};
|
|
11
|
+
declare type ManualTaxCalculatorRel = ResourceId & {
|
|
12
|
+
type: 'manual_tax_calculators';
|
|
13
|
+
};
|
|
14
|
+
interface TaxRule extends Resource {
|
|
15
|
+
name?: string;
|
|
16
|
+
tax_rate?: number;
|
|
17
|
+
country_code_regex?: string;
|
|
18
|
+
not_country_code_regex?: string;
|
|
19
|
+
state_code_regex?: string;
|
|
20
|
+
not_state_code_regex?: string;
|
|
21
|
+
zip_code_regex?: string;
|
|
22
|
+
not_zip_code_regex?: string;
|
|
23
|
+
freight_taxable?: boolean;
|
|
24
|
+
payment_method_taxable?: boolean;
|
|
25
|
+
gift_card_taxable?: boolean;
|
|
26
|
+
adjustment_taxable?: boolean;
|
|
27
|
+
breakdown?: object;
|
|
28
|
+
manual_tax_calculator?: ManualTaxCalculator;
|
|
29
|
+
}
|
|
30
|
+
interface TaxRuleCreate extends ResourceCreate {
|
|
31
|
+
name: string;
|
|
32
|
+
tax_rate?: number;
|
|
33
|
+
country_code_regex?: string;
|
|
34
|
+
not_country_code_regex?: string;
|
|
35
|
+
state_code_regex?: string;
|
|
36
|
+
not_state_code_regex?: string;
|
|
37
|
+
zip_code_regex?: string;
|
|
38
|
+
not_zip_code_regex?: string;
|
|
39
|
+
freight_taxable?: boolean;
|
|
40
|
+
payment_method_taxable?: boolean;
|
|
41
|
+
gift_card_taxable?: boolean;
|
|
42
|
+
adjustment_taxable?: boolean;
|
|
43
|
+
manual_tax_calculator?: ManualTaxCalculatorRel;
|
|
44
|
+
}
|
|
45
|
+
interface TaxRuleUpdate extends ResourceUpdate {
|
|
46
|
+
name?: string;
|
|
47
|
+
tax_rate?: number;
|
|
48
|
+
country_code_regex?: string;
|
|
49
|
+
not_country_code_regex?: string;
|
|
50
|
+
state_code_regex?: string;
|
|
51
|
+
not_state_code_regex?: string;
|
|
52
|
+
zip_code_regex?: string;
|
|
53
|
+
not_zip_code_regex?: string;
|
|
54
|
+
freight_taxable?: boolean;
|
|
55
|
+
payment_method_taxable?: boolean;
|
|
56
|
+
gift_card_taxable?: boolean;
|
|
57
|
+
adjustment_taxable?: boolean;
|
|
58
|
+
manual_tax_calculator?: ManualTaxCalculatorRel;
|
|
59
|
+
}
|
|
60
|
+
declare class TaxRules extends ApiResource {
|
|
61
|
+
static readonly TYPE: 'tax_rules';
|
|
62
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxRule>>;
|
|
63
|
+
create(resource: TaxRuleCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
|
|
64
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
|
|
65
|
+
update(resource: TaxRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
|
|
66
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
|
67
|
+
isTaxRule(resource: any): resource is TaxRule;
|
|
68
|
+
relationship(id: string | ResourceId): TaxRuleRel;
|
|
69
|
+
type(): string;
|
|
70
|
+
}
|
|
71
|
+
export default TaxRules;
|
|
72
|
+
export { TaxRule, TaxRuleCreate, TaxRuleUpdate };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ©2021 Commerce Layer Inc.
|
|
4
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
|
5
|
+
**/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const resource_1 = require("../resource");
|
|
8
|
+
class TaxRules extends resource_1.ApiResource {
|
|
9
|
+
// static readonly PATH = 'tax_rules'
|
|
10
|
+
async list(params, options) {
|
|
11
|
+
return this.resources.list({ type: TaxRules.TYPE }, params, options);
|
|
12
|
+
}
|
|
13
|
+
async create(resource, params, options) {
|
|
14
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: TaxRules.TYPE }), params, options);
|
|
15
|
+
}
|
|
16
|
+
async retrieve(id, params, options) {
|
|
17
|
+
return this.resources.retrieve({ type: TaxRules.TYPE, id }, params, options);
|
|
18
|
+
}
|
|
19
|
+
async update(resource, params, options) {
|
|
20
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: TaxRules.TYPE }), params, options);
|
|
21
|
+
}
|
|
22
|
+
async delete(id, options) {
|
|
23
|
+
await this.resources.delete({ type: TaxRules.TYPE, id }, options);
|
|
24
|
+
}
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
26
|
+
isTaxRule(resource) {
|
|
27
|
+
return resource.type && (resource.type === TaxRules.TYPE);
|
|
28
|
+
}
|
|
29
|
+
/*
|
|
30
|
+
filter(): QueryBuilderRetrieve {
|
|
31
|
+
return new QueryBuilderRetrieve(TaxRules.TYPE)
|
|
32
|
+
}
|
|
33
|
+
*/
|
|
34
|
+
/*
|
|
35
|
+
filterList(): QueryBuilderList {
|
|
36
|
+
return new QueryBuilderList(TaxRules.TYPE)
|
|
37
|
+
}
|
|
38
|
+
*/
|
|
39
|
+
relationship(id) {
|
|
40
|
+
return (typeof id === 'string') ? { id, type: TaxRules.TYPE } : { id: id.id, type: TaxRules.TYPE };
|
|
41
|
+
}
|
|
42
|
+
type() {
|
|
43
|
+
return TaxRules.TYPE;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
TaxRules.TYPE = 'tax_rules';
|
|
47
|
+
exports.default = TaxRules;
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ©2021 Commerce Layer Inc.
|
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
|
4
|
-
**/
|
|
5
|
-
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
|
6
|
-
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
7
|
-
import { TaxCategory } from './tax_categories';
|
|
8
|
-
import { Market } from './markets';
|
|
9
|
-
import { Attachment } from './attachments';
|
|
10
|
-
declare type TaxjarAccountRel = ResourceId & {
|
|
11
|
-
type: typeof TaxjarAccounts.TYPE;
|
|
12
|
-
};
|
|
13
|
-
declare type TaxCategoryRel = ResourceId & {
|
|
14
|
-
type: 'tax_categories';
|
|
15
|
-
};
|
|
16
|
-
interface TaxjarAccount extends Resource {
|
|
17
|
-
name?: string;
|
|
18
|
-
tax_categories?: TaxCategory[];
|
|
19
|
-
markets?: Market[];
|
|
20
|
-
attachments?: Attachment[];
|
|
21
|
-
}
|
|
22
|
-
interface TaxjarAccountCreate extends ResourceCreate {
|
|
23
|
-
name: string;
|
|
24
|
-
api_key: string;
|
|
25
|
-
tax_categories?: TaxCategoryRel[];
|
|
26
|
-
}
|
|
27
|
-
interface TaxjarAccountUpdate extends ResourceUpdate {
|
|
28
|
-
name?: string;
|
|
29
|
-
api_key?: string;
|
|
30
|
-
tax_categories?: TaxCategoryRel[];
|
|
31
|
-
}
|
|
32
|
-
declare class TaxjarAccounts extends ApiResource {
|
|
33
|
-
static readonly TYPE: 'taxjar_accounts';
|
|
34
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxjarAccount>>;
|
|
35
|
-
create(resource: TaxjarAccountCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
|
36
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
|
37
|
-
update(resource: TaxjarAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
|
38
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
|
39
|
-
isTaxjarAccount(resource: any): resource is TaxjarAccount;
|
|
40
|
-
relationship(id: string | ResourceId): TaxjarAccountRel;
|
|
41
|
-
type(): string;
|
|
42
|
-
}
|
|
43
|
-
export default TaxjarAccounts;
|
|
44
|
-
export { TaxjarAccount, TaxjarAccountCreate, TaxjarAccountUpdate };
|
|
1
|
+
/**
|
|
2
|
+
* ©2021 Commerce Layer Inc.
|
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
|
4
|
+
**/
|
|
5
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
7
|
+
import { TaxCategory } from './tax_categories';
|
|
8
|
+
import { Market } from './markets';
|
|
9
|
+
import { Attachment } from './attachments';
|
|
10
|
+
declare type TaxjarAccountRel = ResourceId & {
|
|
11
|
+
type: typeof TaxjarAccounts.TYPE;
|
|
12
|
+
};
|
|
13
|
+
declare type TaxCategoryRel = ResourceId & {
|
|
14
|
+
type: 'tax_categories';
|
|
15
|
+
};
|
|
16
|
+
interface TaxjarAccount extends Resource {
|
|
17
|
+
name?: string;
|
|
18
|
+
tax_categories?: TaxCategory[];
|
|
19
|
+
markets?: Market[];
|
|
20
|
+
attachments?: Attachment[];
|
|
21
|
+
}
|
|
22
|
+
interface TaxjarAccountCreate extends ResourceCreate {
|
|
23
|
+
name: string;
|
|
24
|
+
api_key: string;
|
|
25
|
+
tax_categories?: TaxCategoryRel[];
|
|
26
|
+
}
|
|
27
|
+
interface TaxjarAccountUpdate extends ResourceUpdate {
|
|
28
|
+
name?: string;
|
|
29
|
+
api_key?: string;
|
|
30
|
+
tax_categories?: TaxCategoryRel[];
|
|
31
|
+
}
|
|
32
|
+
declare class TaxjarAccounts extends ApiResource {
|
|
33
|
+
static readonly TYPE: 'taxjar_accounts';
|
|
34
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxjarAccount>>;
|
|
35
|
+
create(resource: TaxjarAccountCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
|
36
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
|
37
|
+
update(resource: TaxjarAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
|
38
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
|
39
|
+
isTaxjarAccount(resource: any): resource is TaxjarAccount;
|
|
40
|
+
relationship(id: string | ResourceId): TaxjarAccountRel;
|
|
41
|
+
type(): string;
|
|
42
|
+
}
|
|
43
|
+
export default TaxjarAccounts;
|
|
44
|
+
export { TaxjarAccount, TaxjarAccountCreate, TaxjarAccountUpdate };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ©2021 Commerce Layer Inc.
|
|
4
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
|
5
|
+
**/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const resource_1 = require("../resource");
|
|
8
|
+
class TaxjarAccounts extends resource_1.ApiResource {
|
|
9
|
+
// static readonly PATH = 'taxjar_accounts'
|
|
10
|
+
async list(params, options) {
|
|
11
|
+
return this.resources.list({ type: TaxjarAccounts.TYPE }, params, options);
|
|
12
|
+
}
|
|
13
|
+
async create(resource, params, options) {
|
|
14
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: TaxjarAccounts.TYPE }), params, options);
|
|
15
|
+
}
|
|
16
|
+
async retrieve(id, params, options) {
|
|
17
|
+
return this.resources.retrieve({ type: TaxjarAccounts.TYPE, id }, params, options);
|
|
18
|
+
}
|
|
19
|
+
async update(resource, params, options) {
|
|
20
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: TaxjarAccounts.TYPE }), params, options);
|
|
21
|
+
}
|
|
22
|
+
async delete(id, options) {
|
|
23
|
+
await this.resources.delete({ type: TaxjarAccounts.TYPE, id }, options);
|
|
24
|
+
}
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
26
|
+
isTaxjarAccount(resource) {
|
|
27
|
+
return resource.type && (resource.type === TaxjarAccounts.TYPE);
|
|
28
|
+
}
|
|
29
|
+
/*
|
|
30
|
+
filter(): QueryBuilderRetrieve {
|
|
31
|
+
return new QueryBuilderRetrieve(TaxjarAccounts.TYPE)
|
|
32
|
+
}
|
|
33
|
+
*/
|
|
34
|
+
/*
|
|
35
|
+
filterList(): QueryBuilderList {
|
|
36
|
+
return new QueryBuilderList(TaxjarAccounts.TYPE)
|
|
37
|
+
}
|
|
38
|
+
*/
|
|
39
|
+
relationship(id) {
|
|
40
|
+
return (typeof id === 'string') ? { id, type: TaxjarAccounts.TYPE } : { id: id.id, type: TaxjarAccounts.TYPE };
|
|
41
|
+
}
|
|
42
|
+
type() {
|
|
43
|
+
return TaxjarAccounts.TYPE;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
TaxjarAccounts.TYPE = 'taxjar_accounts';
|
|
47
|
+
exports.default = TaxjarAccounts;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ©2021 Commerce Layer Inc.
|
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
|
4
|
-
**/
|
|
5
|
-
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
|
6
|
-
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList } from '../query';
|
|
7
|
-
import { Order } from './orders';
|
|
8
|
-
declare type TransactionRel = ResourceId & {
|
|
9
|
-
type: typeof Transactions.TYPE;
|
|
10
|
-
};
|
|
11
|
-
interface Transaction extends Resource {
|
|
12
|
-
number?: string;
|
|
13
|
-
currency_code?: string;
|
|
14
|
-
amount_cents?: number;
|
|
15
|
-
amount_float?: number;
|
|
16
|
-
formatted_amount?: string;
|
|
17
|
-
succeeded?: boolean;
|
|
18
|
-
message?: string;
|
|
19
|
-
error_code?: string;
|
|
20
|
-
error_detail?: string;
|
|
21
|
-
token?: string;
|
|
22
|
-
gateway_transaction_id?: string;
|
|
23
|
-
order?: Order;
|
|
24
|
-
}
|
|
25
|
-
declare class Transactions extends ApiResource {
|
|
26
|
-
static readonly TYPE: 'transactions';
|
|
27
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Transaction>>;
|
|
28
|
-
isTransaction(resource: any): resource is Transaction;
|
|
29
|
-
relationship(id: string | ResourceId): TransactionRel;
|
|
30
|
-
type(): string;
|
|
31
|
-
}
|
|
32
|
-
export default Transactions;
|
|
33
|
-
export { Transaction };
|
|
1
|
+
/**
|
|
2
|
+
* ©2021 Commerce Layer Inc.
|
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
|
4
|
+
**/
|
|
5
|
+
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList } from '../query';
|
|
7
|
+
import { Order } from './orders';
|
|
8
|
+
declare type TransactionRel = ResourceId & {
|
|
9
|
+
type: typeof Transactions.TYPE;
|
|
10
|
+
};
|
|
11
|
+
interface Transaction extends Resource {
|
|
12
|
+
number?: string;
|
|
13
|
+
currency_code?: string;
|
|
14
|
+
amount_cents?: number;
|
|
15
|
+
amount_float?: number;
|
|
16
|
+
formatted_amount?: string;
|
|
17
|
+
succeeded?: boolean;
|
|
18
|
+
message?: string;
|
|
19
|
+
error_code?: string;
|
|
20
|
+
error_detail?: string;
|
|
21
|
+
token?: string;
|
|
22
|
+
gateway_transaction_id?: string;
|
|
23
|
+
order?: Order;
|
|
24
|
+
}
|
|
25
|
+
declare class Transactions extends ApiResource {
|
|
26
|
+
static readonly TYPE: 'transactions';
|
|
27
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Transaction>>;
|
|
28
|
+
isTransaction(resource: any): resource is Transaction;
|
|
29
|
+
relationship(id: string | ResourceId): TransactionRel;
|
|
30
|
+
type(): string;
|
|
31
|
+
}
|
|
32
|
+
export default Transactions;
|
|
33
|
+
export { Transaction };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ©2021 Commerce Layer Inc.
|
|
4
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
|
5
|
+
**/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const resource_1 = require("../resource");
|
|
8
|
+
class Transactions extends resource_1.ApiResource {
|
|
9
|
+
// static readonly PATH = 'transactions'
|
|
10
|
+
async list(params, options) {
|
|
11
|
+
return this.resources.list({ type: Transactions.TYPE }, params, options);
|
|
12
|
+
}
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
14
|
+
isTransaction(resource) {
|
|
15
|
+
return resource.type && (resource.type === Transactions.TYPE);
|
|
16
|
+
}
|
|
17
|
+
/*
|
|
18
|
+
filter(): QueryBuilderRetrieve {
|
|
19
|
+
return new QueryBuilderRetrieve(Transactions.TYPE)
|
|
20
|
+
}
|
|
21
|
+
*/
|
|
22
|
+
/*
|
|
23
|
+
filterList(): QueryBuilderList {
|
|
24
|
+
return new QueryBuilderList(Transactions.TYPE)
|
|
25
|
+
}
|
|
26
|
+
*/
|
|
27
|
+
relationship(id) {
|
|
28
|
+
return (typeof id === 'string') ? { id, type: Transactions.TYPE } : { id: id.id, type: Transactions.TYPE };
|
|
29
|
+
}
|
|
30
|
+
type() {
|
|
31
|
+
return Transactions.TYPE;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
Transactions.TYPE = 'transactions';
|
|
35
|
+
exports.default = Transactions;
|