@commercelayer/sdk 5.0.0-alpha.4 → 5.0.0-beta.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.
Files changed (720) hide show
  1. package/README.md +201 -123
  2. package/lib/cjs/api.d.ts +113 -0
  3. package/lib/cjs/api.js +355 -0
  4. package/lib/cjs/client.d.ts +33 -0
  5. package/lib/cjs/client.js +123 -0
  6. package/lib/cjs/commercelayer.d.ts +139 -0
  7. package/lib/cjs/commercelayer.js +230 -0
  8. package/lib/cjs/common.d.ts +4 -0
  9. package/lib/cjs/common.js +14 -0
  10. package/lib/cjs/config.d.ts +11 -0
  11. package/lib/cjs/config.js +13 -0
  12. package/lib/cjs/debug.d.ts +3 -0
  13. package/lib/cjs/debug.js +42 -0
  14. package/lib/cjs/error.d.ts +28 -0
  15. package/lib/cjs/error.js +43 -0
  16. package/lib/cjs/index.d.ts +7 -0
  17. package/lib/cjs/index.js +29 -0
  18. package/lib/cjs/interceptor.d.ts +25 -0
  19. package/lib/cjs/interceptor.js +2 -0
  20. package/lib/cjs/jsonapi.d.ts +5 -0
  21. package/lib/cjs/jsonapi.js +82 -0
  22. package/lib/cjs/model.d.ts +111 -0
  23. package/lib/cjs/model.js +3 -0
  24. package/lib/cjs/query.d.ts +24 -0
  25. package/lib/cjs/query.js +51 -0
  26. package/lib/cjs/resource.d.ts +90 -0
  27. package/lib/cjs/resource.js +167 -0
  28. package/lib/cjs/resources/addresses.d.ts +89 -0
  29. package/lib/cjs/resources/addresses.js +33 -0
  30. package/lib/cjs/resources/adjustments.d.ts +36 -0
  31. package/lib/cjs/resources/adjustments.js +29 -0
  32. package/lib/cjs/resources/adyen_gateways.d.ts +57 -0
  33. package/lib/cjs/resources/adyen_gateways.js +37 -0
  34. package/lib/cjs/resources/adyen_payments.d.ts +47 -0
  35. package/lib/cjs/resources/adyen_payments.js +37 -0
  36. package/lib/cjs/resources/application.d.ts +21 -0
  37. package/lib/cjs/resources/application.js +17 -0
  38. package/lib/cjs/resources/attachments.d.ts +157 -0
  39. package/lib/cjs/resources/attachments.js +29 -0
  40. package/lib/cjs/resources/authorizations.d.ts +61 -0
  41. package/lib/cjs/resources/authorizations.js +39 -0
  42. package/lib/cjs/resources/avalara_accounts.d.ts +56 -0
  43. package/lib/cjs/resources/avalara_accounts.js +41 -0
  44. package/lib/cjs/resources/axerve_gateways.d.ts +44 -0
  45. package/lib/cjs/resources/axerve_gateways.js +37 -0
  46. package/lib/cjs/resources/axerve_payments.d.ts +47 -0
  47. package/lib/cjs/resources/axerve_payments.js +37 -0
  48. package/lib/cjs/resources/billing_info_validation_rules.d.ts +36 -0
  49. package/lib/cjs/resources/billing_info_validation_rules.js +37 -0
  50. package/lib/cjs/resources/bing_geocoders.d.ts +36 -0
  51. package/lib/cjs/resources/bing_geocoders.js +37 -0
  52. package/lib/cjs/resources/braintree_gateways.d.ts +57 -0
  53. package/lib/cjs/resources/braintree_gateways.js +37 -0
  54. package/lib/cjs/resources/braintree_payments.d.ts +49 -0
  55. package/lib/cjs/resources/braintree_payments.js +37 -0
  56. package/lib/cjs/resources/bundles.d.ts +77 -0
  57. package/lib/cjs/resources/bundles.js +45 -0
  58. package/lib/cjs/resources/captures.d.ts +52 -0
  59. package/lib/cjs/resources/captures.js +39 -0
  60. package/lib/cjs/resources/carrier_accounts.d.ts +27 -0
  61. package/lib/cjs/resources/carrier_accounts.js +28 -0
  62. package/lib/cjs/resources/checkout_com_gateways.d.ts +46 -0
  63. package/lib/cjs/resources/checkout_com_gateways.js +37 -0
  64. package/lib/cjs/resources/checkout_com_payments.d.ts +60 -0
  65. package/lib/cjs/resources/checkout_com_payments.js +37 -0
  66. package/lib/cjs/resources/cleanups.d.ts +37 -0
  67. package/lib/cjs/resources/cleanups.js +30 -0
  68. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +60 -0
  69. package/lib/cjs/resources/coupon_codes_promotion_rules.js +33 -0
  70. package/lib/cjs/resources/coupon_recipients.d.ts +45 -0
  71. package/lib/cjs/resources/coupon_recipients.js +37 -0
  72. package/lib/cjs/resources/coupons.d.ts +46 -0
  73. package/lib/cjs/resources/coupons.js +33 -0
  74. package/lib/cjs/resources/customer_addresses.d.ts +45 -0
  75. package/lib/cjs/resources/customer_addresses.js +41 -0
  76. package/lib/cjs/resources/customer_groups.d.ts +37 -0
  77. package/lib/cjs/resources/customer_groups.js +41 -0
  78. package/lib/cjs/resources/customer_password_resets.d.ts +37 -0
  79. package/lib/cjs/resources/customer_password_resets.js +37 -0
  80. package/lib/cjs/resources/customer_payment_sources.d.ts +79 -0
  81. package/lib/cjs/resources/customer_payment_sources.js +33 -0
  82. package/lib/cjs/resources/customer_subscriptions.d.ts +32 -0
  83. package/lib/cjs/resources/customer_subscriptions.js +37 -0
  84. package/lib/cjs/resources/customers.d.ts +67 -0
  85. package/lib/cjs/resources/customers.js +69 -0
  86. package/lib/cjs/resources/delivery_lead_times.d.ts +52 -0
  87. package/lib/cjs/resources/delivery_lead_times.js +41 -0
  88. package/lib/cjs/resources/event_callbacks.d.ts +25 -0
  89. package/lib/cjs/resources/event_callbacks.js +24 -0
  90. package/lib/cjs/resources/events.d.ts +25 -0
  91. package/lib/cjs/resources/events.js +28 -0
  92. package/lib/cjs/resources/exports.d.ts +41 -0
  93. package/lib/cjs/resources/exports.js +30 -0
  94. package/lib/cjs/resources/external_gateways.d.ts +50 -0
  95. package/lib/cjs/resources/external_gateways.js +37 -0
  96. package/lib/cjs/resources/external_payments.d.ts +45 -0
  97. package/lib/cjs/resources/external_payments.js +41 -0
  98. package/lib/cjs/resources/external_promotions.d.ts +91 -0
  99. package/lib/cjs/resources/external_promotions.js +53 -0
  100. package/lib/cjs/resources/external_tax_calculators.d.ts +38 -0
  101. package/lib/cjs/resources/external_tax_calculators.js +37 -0
  102. package/lib/cjs/resources/fixed_amount_promotions.d.ts +92 -0
  103. package/lib/cjs/resources/fixed_amount_promotions.js +53 -0
  104. package/lib/cjs/resources/fixed_price_promotions.d.ts +103 -0
  105. package/lib/cjs/resources/fixed_price_promotions.js +61 -0
  106. package/lib/cjs/resources/free_gift_promotions.d.ts +101 -0
  107. package/lib/cjs/resources/free_gift_promotions.js +61 -0
  108. package/lib/cjs/resources/free_shipping_promotions.d.ts +84 -0
  109. package/lib/cjs/resources/free_shipping_promotions.js +49 -0
  110. package/lib/cjs/resources/geocoders.d.ts +25 -0
  111. package/lib/cjs/resources/geocoders.js +28 -0
  112. package/lib/cjs/resources/gift_card_recipients.d.ts +45 -0
  113. package/lib/cjs/resources/gift_card_recipients.js +37 -0
  114. package/lib/cjs/resources/gift_cards.d.ts +86 -0
  115. package/lib/cjs/resources/gift_cards.js +45 -0
  116. package/lib/cjs/resources/google_geocoders.d.ts +36 -0
  117. package/lib/cjs/resources/google_geocoders.js +37 -0
  118. package/lib/cjs/resources/imports.d.ts +46 -0
  119. package/lib/cjs/resources/imports.js +30 -0
  120. package/lib/cjs/resources/in_stock_subscriptions.d.ts +63 -0
  121. package/lib/cjs/resources/in_stock_subscriptions.js +45 -0
  122. package/lib/cjs/resources/inventory_models.d.ts +43 -0
  123. package/lib/cjs/resources/inventory_models.js +41 -0
  124. package/lib/cjs/resources/inventory_return_locations.d.ts +44 -0
  125. package/lib/cjs/resources/inventory_return_locations.js +37 -0
  126. package/lib/cjs/resources/inventory_stock_locations.d.ts +47 -0
  127. package/lib/cjs/resources/inventory_stock_locations.js +37 -0
  128. package/lib/cjs/resources/klarna_gateways.d.ts +45 -0
  129. package/lib/cjs/resources/klarna_gateways.js +37 -0
  130. package/lib/cjs/resources/klarna_payments.d.ts +47 -0
  131. package/lib/cjs/resources/klarna_payments.js +37 -0
  132. package/lib/cjs/resources/line_item_options.d.ts +58 -0
  133. package/lib/cjs/resources/line_item_options.js +37 -0
  134. package/lib/cjs/resources/line_items.d.ts +127 -0
  135. package/lib/cjs/resources/line_items.js +45 -0
  136. package/lib/cjs/resources/manual_gateways.d.ts +31 -0
  137. package/lib/cjs/resources/manual_gateways.js +33 -0
  138. package/lib/cjs/resources/manual_tax_calculators.d.ts +42 -0
  139. package/lib/cjs/resources/manual_tax_calculators.js +41 -0
  140. package/lib/cjs/resources/markets.d.ts +89 -0
  141. package/lib/cjs/resources/markets.js +53 -0
  142. package/lib/cjs/resources/merchants.d.ts +39 -0
  143. package/lib/cjs/resources/merchants.js +37 -0
  144. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +57 -0
  145. package/lib/cjs/resources/order_amount_promotion_rules.js +29 -0
  146. package/lib/cjs/resources/order_copies.d.ts +49 -0
  147. package/lib/cjs/resources/order_copies.js +42 -0
  148. package/lib/cjs/resources/order_subscriptions.d.ts +71 -0
  149. package/lib/cjs/resources/order_subscriptions.js +53 -0
  150. package/lib/cjs/resources/order_validation_rules.d.ts +24 -0
  151. package/lib/cjs/resources/order_validation_rules.js +28 -0
  152. package/lib/cjs/resources/orders.d.ts +297 -0
  153. package/lib/cjs/resources/orders.js +109 -0
  154. package/lib/cjs/resources/organization.d.ts +32 -0
  155. package/lib/cjs/resources/organization.js +17 -0
  156. package/lib/cjs/resources/packages.d.ts +57 -0
  157. package/lib/cjs/resources/packages.js +41 -0
  158. package/lib/cjs/resources/parcel_line_items.d.ts +52 -0
  159. package/lib/cjs/resources/parcel_line_items.js +37 -0
  160. package/lib/cjs/resources/parcels.d.ts +120 -0
  161. package/lib/cjs/resources/parcels.js +49 -0
  162. package/lib/cjs/resources/payment_gateways.d.ts +22 -0
  163. package/lib/cjs/resources/payment_gateways.js +24 -0
  164. package/lib/cjs/resources/payment_methods.d.ts +73 -0
  165. package/lib/cjs/resources/payment_methods.js +41 -0
  166. package/lib/cjs/resources/paypal_gateways.d.ts +38 -0
  167. package/lib/cjs/resources/paypal_gateways.js +37 -0
  168. package/lib/cjs/resources/paypal_payments.d.ts +53 -0
  169. package/lib/cjs/resources/paypal_payments.js +37 -0
  170. package/lib/cjs/resources/percentage_discount_promotions.d.ts +101 -0
  171. package/lib/cjs/resources/percentage_discount_promotions.js +61 -0
  172. package/lib/cjs/resources/price_lists.d.ts +40 -0
  173. package/lib/cjs/resources/price_lists.js +37 -0
  174. package/lib/cjs/resources/price_tiers.d.ts +29 -0
  175. package/lib/cjs/resources/price_tiers.js +28 -0
  176. package/lib/cjs/resources/price_volume_tiers.d.ts +47 -0
  177. package/lib/cjs/resources/price_volume_tiers.js +37 -0
  178. package/lib/cjs/resources/prices.d.ts +69 -0
  179. package/lib/cjs/resources/prices.js +49 -0
  180. package/lib/cjs/resources/promotion_rules.d.ts +25 -0
  181. package/lib/cjs/resources/promotion_rules.js +20 -0
  182. package/lib/cjs/resources/promotions.d.ts +42 -0
  183. package/lib/cjs/resources/promotions.js +40 -0
  184. package/lib/cjs/resources/refunds.d.ts +38 -0
  185. package/lib/cjs/resources/refunds.js +32 -0
  186. package/lib/cjs/resources/return_line_items.d.ts +50 -0
  187. package/lib/cjs/resources/return_line_items.js +37 -0
  188. package/lib/cjs/resources/returns.d.ts +76 -0
  189. package/lib/cjs/resources/returns.js +61 -0
  190. package/lib/cjs/resources/satispay_gateways.d.ts +40 -0
  191. package/lib/cjs/resources/satispay_gateways.js +37 -0
  192. package/lib/cjs/resources/satispay_payments.d.ts +44 -0
  193. package/lib/cjs/resources/satispay_payments.js +37 -0
  194. package/lib/cjs/resources/shipments.d.ts +94 -0
  195. package/lib/cjs/resources/shipments.js +79 -0
  196. package/lib/cjs/resources/shipping_categories.d.ts +34 -0
  197. package/lib/cjs/resources/shipping_categories.js +37 -0
  198. package/lib/cjs/resources/shipping_method_tiers.d.ts +29 -0
  199. package/lib/cjs/resources/shipping_method_tiers.js +28 -0
  200. package/lib/cjs/resources/shipping_methods.d.ts +108 -0
  201. package/lib/cjs/resources/shipping_methods.js +61 -0
  202. package/lib/cjs/resources/shipping_weight_tiers.d.ts +47 -0
  203. package/lib/cjs/resources/shipping_weight_tiers.js +37 -0
  204. package/lib/cjs/resources/shipping_zones.d.ts +49 -0
  205. package/lib/cjs/resources/shipping_zones.js +33 -0
  206. package/lib/cjs/resources/sku_list_items.d.ts +48 -0
  207. package/lib/cjs/resources/sku_list_items.js +37 -0
  208. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +69 -0
  209. package/lib/cjs/resources/sku_list_promotion_rules.js +37 -0
  210. package/lib/cjs/resources/sku_lists.d.ts +61 -0
  211. package/lib/cjs/resources/sku_lists.js +49 -0
  212. package/lib/cjs/resources/sku_options.d.ts +57 -0
  213. package/lib/cjs/resources/sku_options.js +37 -0
  214. package/lib/cjs/resources/skus.d.ts +79 -0
  215. package/lib/cjs/resources/skus.js +53 -0
  216. package/lib/cjs/resources/stock_items.d.ts +50 -0
  217. package/lib/cjs/resources/stock_items.js +41 -0
  218. package/lib/cjs/resources/stock_line_items.d.ts +30 -0
  219. package/lib/cjs/resources/stock_line_items.js +32 -0
  220. package/lib/cjs/resources/stock_locations.d.ts +58 -0
  221. package/lib/cjs/resources/stock_locations.js +53 -0
  222. package/lib/cjs/resources/stock_transfers.d.ts +75 -0
  223. package/lib/cjs/resources/stock_transfers.js +53 -0
  224. package/lib/cjs/resources/stripe_gateways.d.ts +42 -0
  225. package/lib/cjs/resources/stripe_gateways.js +37 -0
  226. package/lib/cjs/resources/stripe_payments.d.ts +48 -0
  227. package/lib/cjs/resources/stripe_payments.js +37 -0
  228. package/lib/cjs/resources/tax_calculators.d.ts +25 -0
  229. package/lib/cjs/resources/tax_calculators.js +28 -0
  230. package/lib/cjs/resources/tax_categories.d.ts +60 -0
  231. package/lib/cjs/resources/tax_categories.js +37 -0
  232. package/lib/cjs/resources/tax_rules.d.ts +70 -0
  233. package/lib/cjs/resources/tax_rules.js +33 -0
  234. package/lib/cjs/resources/taxjar_accounts.d.ts +44 -0
  235. package/lib/cjs/resources/taxjar_accounts.js +41 -0
  236. package/lib/cjs/resources/transactions.d.ts +32 -0
  237. package/lib/cjs/resources/transactions.js +24 -0
  238. package/lib/cjs/resources/voids.d.ts +38 -0
  239. package/lib/cjs/resources/voids.js +32 -0
  240. package/lib/cjs/resources/webhooks.d.ts +44 -0
  241. package/lib/cjs/resources/webhooks.js +33 -0
  242. package/lib/cjs/resources/wire_transfers.d.ts +34 -0
  243. package/lib/cjs/resources/wire_transfers.js +33 -0
  244. package/lib/cjs/static.d.ts +9 -0
  245. package/lib/cjs/static.js +45 -0
  246. package/lib/cjs/util.d.ts +10 -0
  247. package/lib/cjs/util.js +15 -0
  248. package/lib/esm/api.d.ts +113 -0
  249. package/lib/esm/api.js +239 -0
  250. package/lib/esm/client.d.ts +33 -0
  251. package/lib/esm/client.js +118 -0
  252. package/lib/esm/commercelayer.d.ts +139 -0
  253. package/lib/esm/commercelayer.js +201 -0
  254. package/lib/esm/common.d.ts +4 -0
  255. package/lib/esm/common.js +10 -0
  256. package/lib/esm/config.d.ts +11 -0
  257. package/lib/esm/config.js +11 -0
  258. package/lib/esm/debug.d.ts +3 -0
  259. package/lib/esm/debug.js +40 -0
  260. package/lib/esm/error.d.ts +28 -0
  261. package/lib/esm/error.js +38 -0
  262. package/lib/esm/index.d.ts +7 -0
  263. package/lib/esm/index.js +6 -0
  264. package/lib/esm/interceptor.d.ts +25 -0
  265. package/lib/esm/interceptor.js +1 -0
  266. package/lib/esm/jsonapi.d.ts +5 -0
  267. package/lib/esm/jsonapi.js +75 -0
  268. package/lib/esm/model.d.ts +111 -0
  269. package/lib/esm/model.js +2 -0
  270. package/lib/esm/query.d.ts +24 -0
  271. package/lib/esm/query.js +45 -0
  272. package/lib/esm/resource.d.ts +90 -0
  273. package/lib/esm/resource.js +160 -0
  274. package/lib/esm/resources/addresses.d.ts +89 -0
  275. package/lib/esm/resources/addresses.js +31 -0
  276. package/lib/esm/resources/adjustments.d.ts +36 -0
  277. package/lib/esm/resources/adjustments.js +27 -0
  278. package/lib/esm/resources/adyen_gateways.d.ts +57 -0
  279. package/lib/esm/resources/adyen_gateways.js +35 -0
  280. package/lib/esm/resources/adyen_payments.d.ts +47 -0
  281. package/lib/esm/resources/adyen_payments.js +35 -0
  282. package/lib/esm/resources/application.d.ts +21 -0
  283. package/lib/esm/resources/application.js +15 -0
  284. package/lib/esm/resources/attachments.d.ts +157 -0
  285. package/lib/esm/resources/attachments.js +27 -0
  286. package/lib/esm/resources/authorizations.d.ts +61 -0
  287. package/lib/esm/resources/authorizations.js +37 -0
  288. package/lib/esm/resources/avalara_accounts.d.ts +56 -0
  289. package/lib/esm/resources/avalara_accounts.js +39 -0
  290. package/lib/esm/resources/axerve_gateways.d.ts +44 -0
  291. package/lib/esm/resources/axerve_gateways.js +35 -0
  292. package/lib/esm/resources/axerve_payments.d.ts +47 -0
  293. package/lib/esm/resources/axerve_payments.js +35 -0
  294. package/lib/esm/resources/billing_info_validation_rules.d.ts +36 -0
  295. package/lib/esm/resources/billing_info_validation_rules.js +35 -0
  296. package/lib/esm/resources/bing_geocoders.d.ts +36 -0
  297. package/lib/esm/resources/bing_geocoders.js +35 -0
  298. package/lib/esm/resources/braintree_gateways.d.ts +57 -0
  299. package/lib/esm/resources/braintree_gateways.js +35 -0
  300. package/lib/esm/resources/braintree_payments.d.ts +49 -0
  301. package/lib/esm/resources/braintree_payments.js +35 -0
  302. package/lib/esm/resources/bundles.d.ts +77 -0
  303. package/lib/esm/resources/bundles.js +43 -0
  304. package/lib/esm/resources/captures.d.ts +52 -0
  305. package/lib/esm/resources/captures.js +37 -0
  306. package/lib/esm/resources/carrier_accounts.d.ts +27 -0
  307. package/lib/esm/resources/carrier_accounts.js +26 -0
  308. package/lib/esm/resources/checkout_com_gateways.d.ts +46 -0
  309. package/lib/esm/resources/checkout_com_gateways.js +35 -0
  310. package/lib/esm/resources/checkout_com_payments.d.ts +60 -0
  311. package/lib/esm/resources/checkout_com_payments.js +35 -0
  312. package/lib/esm/resources/cleanups.d.ts +37 -0
  313. package/lib/esm/resources/cleanups.js +28 -0
  314. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +60 -0
  315. package/lib/esm/resources/coupon_codes_promotion_rules.js +31 -0
  316. package/lib/esm/resources/coupon_recipients.d.ts +45 -0
  317. package/lib/esm/resources/coupon_recipients.js +35 -0
  318. package/lib/esm/resources/coupons.d.ts +46 -0
  319. package/lib/esm/resources/coupons.js +31 -0
  320. package/lib/esm/resources/customer_addresses.d.ts +45 -0
  321. package/lib/esm/resources/customer_addresses.js +39 -0
  322. package/lib/esm/resources/customer_groups.d.ts +37 -0
  323. package/lib/esm/resources/customer_groups.js +39 -0
  324. package/lib/esm/resources/customer_password_resets.d.ts +37 -0
  325. package/lib/esm/resources/customer_password_resets.js +35 -0
  326. package/lib/esm/resources/customer_payment_sources.d.ts +79 -0
  327. package/lib/esm/resources/customer_payment_sources.js +31 -0
  328. package/lib/esm/resources/customer_subscriptions.d.ts +32 -0
  329. package/lib/esm/resources/customer_subscriptions.js +35 -0
  330. package/lib/esm/resources/customers.d.ts +67 -0
  331. package/lib/esm/resources/customers.js +67 -0
  332. package/lib/esm/resources/delivery_lead_times.d.ts +52 -0
  333. package/lib/esm/resources/delivery_lead_times.js +39 -0
  334. package/lib/esm/resources/event_callbacks.d.ts +25 -0
  335. package/lib/esm/resources/event_callbacks.js +22 -0
  336. package/lib/esm/resources/events.d.ts +25 -0
  337. package/lib/esm/resources/events.js +26 -0
  338. package/lib/esm/resources/exports.d.ts +41 -0
  339. package/lib/esm/resources/exports.js +28 -0
  340. package/lib/esm/resources/external_gateways.d.ts +50 -0
  341. package/lib/esm/resources/external_gateways.js +35 -0
  342. package/lib/esm/resources/external_payments.d.ts +45 -0
  343. package/lib/esm/resources/external_payments.js +39 -0
  344. package/lib/esm/resources/external_promotions.d.ts +91 -0
  345. package/lib/esm/resources/external_promotions.js +51 -0
  346. package/lib/esm/resources/external_tax_calculators.d.ts +38 -0
  347. package/lib/esm/resources/external_tax_calculators.js +35 -0
  348. package/lib/esm/resources/fixed_amount_promotions.d.ts +92 -0
  349. package/lib/esm/resources/fixed_amount_promotions.js +51 -0
  350. package/lib/esm/resources/fixed_price_promotions.d.ts +103 -0
  351. package/lib/esm/resources/fixed_price_promotions.js +59 -0
  352. package/lib/esm/resources/free_gift_promotions.d.ts +101 -0
  353. package/lib/esm/resources/free_gift_promotions.js +59 -0
  354. package/lib/esm/resources/free_shipping_promotions.d.ts +84 -0
  355. package/lib/esm/resources/free_shipping_promotions.js +47 -0
  356. package/lib/esm/resources/geocoders.d.ts +25 -0
  357. package/lib/esm/resources/geocoders.js +26 -0
  358. package/lib/esm/resources/gift_card_recipients.d.ts +45 -0
  359. package/lib/esm/resources/gift_card_recipients.js +35 -0
  360. package/lib/esm/resources/gift_cards.d.ts +86 -0
  361. package/lib/esm/resources/gift_cards.js +43 -0
  362. package/lib/esm/resources/google_geocoders.d.ts +36 -0
  363. package/lib/esm/resources/google_geocoders.js +35 -0
  364. package/lib/esm/resources/imports.d.ts +46 -0
  365. package/lib/esm/resources/imports.js +28 -0
  366. package/lib/esm/resources/in_stock_subscriptions.d.ts +63 -0
  367. package/lib/esm/resources/in_stock_subscriptions.js +43 -0
  368. package/lib/esm/resources/inventory_models.d.ts +43 -0
  369. package/lib/esm/resources/inventory_models.js +39 -0
  370. package/lib/esm/resources/inventory_return_locations.d.ts +44 -0
  371. package/lib/esm/resources/inventory_return_locations.js +35 -0
  372. package/lib/esm/resources/inventory_stock_locations.d.ts +47 -0
  373. package/lib/esm/resources/inventory_stock_locations.js +35 -0
  374. package/lib/esm/resources/klarna_gateways.d.ts +45 -0
  375. package/lib/esm/resources/klarna_gateways.js +35 -0
  376. package/lib/esm/resources/klarna_payments.d.ts +47 -0
  377. package/lib/esm/resources/klarna_payments.js +35 -0
  378. package/lib/esm/resources/line_item_options.d.ts +58 -0
  379. package/lib/esm/resources/line_item_options.js +35 -0
  380. package/lib/esm/resources/line_items.d.ts +127 -0
  381. package/lib/esm/resources/line_items.js +43 -0
  382. package/lib/esm/resources/manual_gateways.d.ts +31 -0
  383. package/lib/esm/resources/manual_gateways.js +31 -0
  384. package/lib/esm/resources/manual_tax_calculators.d.ts +42 -0
  385. package/lib/esm/resources/manual_tax_calculators.js +39 -0
  386. package/lib/esm/resources/markets.d.ts +89 -0
  387. package/lib/esm/resources/markets.js +51 -0
  388. package/lib/esm/resources/merchants.d.ts +39 -0
  389. package/lib/esm/resources/merchants.js +35 -0
  390. package/lib/esm/resources/order_amount_promotion_rules.d.ts +57 -0
  391. package/lib/esm/resources/order_amount_promotion_rules.js +27 -0
  392. package/lib/esm/resources/order_copies.d.ts +49 -0
  393. package/lib/esm/resources/order_copies.js +40 -0
  394. package/lib/esm/resources/order_subscriptions.d.ts +71 -0
  395. package/lib/esm/resources/order_subscriptions.js +51 -0
  396. package/lib/esm/resources/order_validation_rules.d.ts +24 -0
  397. package/lib/esm/resources/order_validation_rules.js +26 -0
  398. package/lib/esm/resources/orders.d.ts +297 -0
  399. package/lib/esm/resources/orders.js +107 -0
  400. package/lib/esm/resources/organization.d.ts +32 -0
  401. package/lib/esm/resources/organization.js +15 -0
  402. package/lib/esm/resources/packages.d.ts +57 -0
  403. package/lib/esm/resources/packages.js +39 -0
  404. package/lib/esm/resources/parcel_line_items.d.ts +52 -0
  405. package/lib/esm/resources/parcel_line_items.js +35 -0
  406. package/lib/esm/resources/parcels.d.ts +120 -0
  407. package/lib/esm/resources/parcels.js +47 -0
  408. package/lib/esm/resources/payment_gateways.d.ts +22 -0
  409. package/lib/esm/resources/payment_gateways.js +22 -0
  410. package/lib/esm/resources/payment_methods.d.ts +73 -0
  411. package/lib/esm/resources/payment_methods.js +39 -0
  412. package/lib/esm/resources/paypal_gateways.d.ts +38 -0
  413. package/lib/esm/resources/paypal_gateways.js +35 -0
  414. package/lib/esm/resources/paypal_payments.d.ts +53 -0
  415. package/lib/esm/resources/paypal_payments.js +35 -0
  416. package/lib/esm/resources/percentage_discount_promotions.d.ts +101 -0
  417. package/lib/esm/resources/percentage_discount_promotions.js +59 -0
  418. package/lib/esm/resources/price_lists.d.ts +40 -0
  419. package/lib/esm/resources/price_lists.js +35 -0
  420. package/lib/esm/resources/price_tiers.d.ts +29 -0
  421. package/lib/esm/resources/price_tiers.js +26 -0
  422. package/lib/esm/resources/price_volume_tiers.d.ts +47 -0
  423. package/lib/esm/resources/price_volume_tiers.js +35 -0
  424. package/lib/esm/resources/prices.d.ts +69 -0
  425. package/lib/esm/resources/prices.js +47 -0
  426. package/lib/esm/resources/promotion_rules.d.ts +25 -0
  427. package/lib/esm/resources/promotion_rules.js +18 -0
  428. package/lib/esm/resources/promotions.d.ts +42 -0
  429. package/lib/esm/resources/promotions.js +38 -0
  430. package/lib/esm/resources/refunds.d.ts +38 -0
  431. package/lib/esm/resources/refunds.js +30 -0
  432. package/lib/esm/resources/return_line_items.d.ts +50 -0
  433. package/lib/esm/resources/return_line_items.js +35 -0
  434. package/lib/esm/resources/returns.d.ts +76 -0
  435. package/lib/esm/resources/returns.js +59 -0
  436. package/lib/esm/resources/satispay_gateways.d.ts +40 -0
  437. package/lib/esm/resources/satispay_gateways.js +35 -0
  438. package/lib/esm/resources/satispay_payments.d.ts +44 -0
  439. package/lib/esm/resources/satispay_payments.js +35 -0
  440. package/lib/esm/resources/shipments.d.ts +94 -0
  441. package/lib/esm/resources/shipments.js +77 -0
  442. package/lib/esm/resources/shipping_categories.d.ts +34 -0
  443. package/lib/esm/resources/shipping_categories.js +35 -0
  444. package/lib/esm/resources/shipping_method_tiers.d.ts +29 -0
  445. package/lib/esm/resources/shipping_method_tiers.js +26 -0
  446. package/lib/esm/resources/shipping_methods.d.ts +108 -0
  447. package/lib/esm/resources/shipping_methods.js +59 -0
  448. package/lib/esm/resources/shipping_weight_tiers.d.ts +47 -0
  449. package/lib/esm/resources/shipping_weight_tiers.js +35 -0
  450. package/lib/esm/resources/shipping_zones.d.ts +49 -0
  451. package/lib/esm/resources/shipping_zones.js +31 -0
  452. package/lib/esm/resources/sku_list_items.d.ts +48 -0
  453. package/lib/esm/resources/sku_list_items.js +35 -0
  454. package/lib/esm/resources/sku_list_promotion_rules.d.ts +69 -0
  455. package/lib/esm/resources/sku_list_promotion_rules.js +35 -0
  456. package/lib/esm/resources/sku_lists.d.ts +61 -0
  457. package/lib/esm/resources/sku_lists.js +47 -0
  458. package/lib/esm/resources/sku_options.d.ts +57 -0
  459. package/lib/esm/resources/sku_options.js +35 -0
  460. package/lib/esm/resources/skus.d.ts +79 -0
  461. package/lib/esm/resources/skus.js +51 -0
  462. package/lib/esm/resources/stock_items.d.ts +50 -0
  463. package/lib/esm/resources/stock_items.js +39 -0
  464. package/lib/esm/resources/stock_line_items.d.ts +30 -0
  465. package/lib/esm/resources/stock_line_items.js +30 -0
  466. package/lib/esm/resources/stock_locations.d.ts +58 -0
  467. package/lib/esm/resources/stock_locations.js +51 -0
  468. package/lib/esm/resources/stock_transfers.d.ts +75 -0
  469. package/lib/esm/resources/stock_transfers.js +51 -0
  470. package/lib/esm/resources/stripe_gateways.d.ts +42 -0
  471. package/lib/esm/resources/stripe_gateways.js +35 -0
  472. package/lib/esm/resources/stripe_payments.d.ts +48 -0
  473. package/lib/esm/resources/stripe_payments.js +35 -0
  474. package/lib/esm/resources/tax_calculators.d.ts +25 -0
  475. package/lib/esm/resources/tax_calculators.js +26 -0
  476. package/lib/esm/resources/tax_categories.d.ts +60 -0
  477. package/lib/esm/resources/tax_categories.js +35 -0
  478. package/lib/esm/resources/tax_rules.d.ts +70 -0
  479. package/lib/esm/resources/tax_rules.js +31 -0
  480. package/lib/esm/resources/taxjar_accounts.d.ts +44 -0
  481. package/lib/esm/resources/taxjar_accounts.js +39 -0
  482. package/lib/esm/resources/transactions.d.ts +32 -0
  483. package/lib/esm/resources/transactions.js +22 -0
  484. package/lib/esm/resources/voids.d.ts +38 -0
  485. package/lib/esm/resources/voids.js +30 -0
  486. package/lib/esm/resources/webhooks.d.ts +44 -0
  487. package/lib/esm/resources/webhooks.js +31 -0
  488. package/lib/esm/resources/wire_transfers.d.ts +34 -0
  489. package/lib/esm/resources/wire_transfers.js +31 -0
  490. package/lib/esm/static.d.ts +9 -0
  491. package/lib/esm/static.js +19 -0
  492. package/lib/esm/util.d.ts +10 -0
  493. package/lib/esm/util.js +11 -0
  494. package/lib/tsconfig.esm.tsbuildinfo +1 -0
  495. package/lib/tsconfig.tsbuildinfo +1 -0
  496. package/package.json +28 -37
  497. package/lib/api.d.ts +0 -1
  498. package/lib/api.js +0 -1
  499. package/lib/client.d.ts +0 -2
  500. package/lib/client.js +0 -1
  501. package/lib/commercelayer.d.ts +0 -1
  502. package/lib/commercelayer.js +0 -1
  503. package/lib/common.d.ts +0 -1
  504. package/lib/common.js +0 -1
  505. package/lib/config.d.ts +0 -1
  506. package/lib/config.js +0 -1
  507. package/lib/debug.d.ts +0 -1
  508. package/lib/debug.js +0 -1
  509. package/lib/error.d.ts +0 -1
  510. package/lib/error.js +0 -1
  511. package/lib/index.d.ts +0 -1
  512. package/lib/index.js +0 -1
  513. package/lib/interceptor.d.ts +0 -1
  514. package/lib/interceptor.js +0 -1
  515. package/lib/jsonapi.d.ts +0 -1
  516. package/lib/jsonapi.js +0 -1
  517. package/lib/model.d.ts +0 -1
  518. package/lib/model.js +0 -1
  519. package/lib/query.d.ts +0 -1
  520. package/lib/query.js +0 -1
  521. package/lib/resource.d.ts +0 -1
  522. package/lib/resource.js +0 -1
  523. package/lib/resources/addresses.d.ts +0 -1
  524. package/lib/resources/addresses.js +0 -1
  525. package/lib/resources/adjustments.d.ts +0 -1
  526. package/lib/resources/adjustments.js +0 -1
  527. package/lib/resources/adyen_gateways.d.ts +0 -1
  528. package/lib/resources/adyen_gateways.js +0 -1
  529. package/lib/resources/adyen_payments.d.ts +0 -1
  530. package/lib/resources/adyen_payments.js +0 -1
  531. package/lib/resources/application.d.ts +0 -1
  532. package/lib/resources/application.js +0 -1
  533. package/lib/resources/attachments.d.ts +0 -1
  534. package/lib/resources/attachments.js +0 -1
  535. package/lib/resources/authorizations.d.ts +0 -1
  536. package/lib/resources/authorizations.js +0 -1
  537. package/lib/resources/avalara_accounts.d.ts +0 -1
  538. package/lib/resources/avalara_accounts.js +0 -1
  539. package/lib/resources/billing_info_validation_rules.d.ts +0 -1
  540. package/lib/resources/billing_info_validation_rules.js +0 -1
  541. package/lib/resources/bing_geocoders.d.ts +0 -1
  542. package/lib/resources/bing_geocoders.js +0 -1
  543. package/lib/resources/braintree_gateways.d.ts +0 -1
  544. package/lib/resources/braintree_gateways.js +0 -1
  545. package/lib/resources/braintree_payments.d.ts +0 -1
  546. package/lib/resources/braintree_payments.js +0 -1
  547. package/lib/resources/bundles.d.ts +0 -1
  548. package/lib/resources/bundles.js +0 -1
  549. package/lib/resources/captures.d.ts +0 -1
  550. package/lib/resources/captures.js +0 -1
  551. package/lib/resources/carrier_accounts.d.ts +0 -1
  552. package/lib/resources/carrier_accounts.js +0 -1
  553. package/lib/resources/checkout_com_gateways.d.ts +0 -1
  554. package/lib/resources/checkout_com_gateways.js +0 -1
  555. package/lib/resources/checkout_com_payments.d.ts +0 -1
  556. package/lib/resources/checkout_com_payments.js +0 -1
  557. package/lib/resources/coupon_codes_promotion_rules.d.ts +0 -1
  558. package/lib/resources/coupon_codes_promotion_rules.js +0 -1
  559. package/lib/resources/coupon_recipients.d.ts +0 -1
  560. package/lib/resources/coupon_recipients.js +0 -1
  561. package/lib/resources/coupons.d.ts +0 -1
  562. package/lib/resources/coupons.js +0 -1
  563. package/lib/resources/customer_addresses.d.ts +0 -1
  564. package/lib/resources/customer_addresses.js +0 -1
  565. package/lib/resources/customer_groups.d.ts +0 -1
  566. package/lib/resources/customer_groups.js +0 -1
  567. package/lib/resources/customer_password_resets.d.ts +0 -1
  568. package/lib/resources/customer_password_resets.js +0 -1
  569. package/lib/resources/customer_payment_sources.d.ts +0 -1
  570. package/lib/resources/customer_payment_sources.js +0 -1
  571. package/lib/resources/customer_subscriptions.d.ts +0 -1
  572. package/lib/resources/customer_subscriptions.js +0 -1
  573. package/lib/resources/customers.d.ts +0 -1
  574. package/lib/resources/customers.js +0 -1
  575. package/lib/resources/delivery_lead_times.d.ts +0 -1
  576. package/lib/resources/delivery_lead_times.js +0 -1
  577. package/lib/resources/event_callbacks.d.ts +0 -1
  578. package/lib/resources/event_callbacks.js +0 -1
  579. package/lib/resources/external_gateways.d.ts +0 -1
  580. package/lib/resources/external_gateways.js +0 -1
  581. package/lib/resources/external_payments.d.ts +0 -1
  582. package/lib/resources/external_payments.js +0 -1
  583. package/lib/resources/external_promotions.d.ts +0 -1
  584. package/lib/resources/external_promotions.js +0 -1
  585. package/lib/resources/external_tax_calculators.d.ts +0 -1
  586. package/lib/resources/external_tax_calculators.js +0 -1
  587. package/lib/resources/fixed_amount_promotions.d.ts +0 -1
  588. package/lib/resources/fixed_amount_promotions.js +0 -1
  589. package/lib/resources/fixed_price_promotions.d.ts +0 -1
  590. package/lib/resources/fixed_price_promotions.js +0 -1
  591. package/lib/resources/free_gift_promotions.d.ts +0 -1
  592. package/lib/resources/free_gift_promotions.js +0 -1
  593. package/lib/resources/free_shipping_promotions.d.ts +0 -1
  594. package/lib/resources/free_shipping_promotions.js +0 -1
  595. package/lib/resources/geocoders.d.ts +0 -1
  596. package/lib/resources/geocoders.js +0 -1
  597. package/lib/resources/gift_card_recipients.d.ts +0 -1
  598. package/lib/resources/gift_card_recipients.js +0 -1
  599. package/lib/resources/gift_cards.d.ts +0 -1
  600. package/lib/resources/gift_cards.js +0 -1
  601. package/lib/resources/google_geocoders.d.ts +0 -1
  602. package/lib/resources/google_geocoders.js +0 -1
  603. package/lib/resources/imports.d.ts +0 -1
  604. package/lib/resources/imports.js +0 -1
  605. package/lib/resources/in_stock_subscriptions.d.ts +0 -1
  606. package/lib/resources/in_stock_subscriptions.js +0 -1
  607. package/lib/resources/inventory_models.d.ts +0 -1
  608. package/lib/resources/inventory_models.js +0 -1
  609. package/lib/resources/inventory_return_locations.d.ts +0 -1
  610. package/lib/resources/inventory_return_locations.js +0 -1
  611. package/lib/resources/inventory_stock_locations.d.ts +0 -1
  612. package/lib/resources/inventory_stock_locations.js +0 -1
  613. package/lib/resources/klarna_gateways.d.ts +0 -1
  614. package/lib/resources/klarna_gateways.js +0 -1
  615. package/lib/resources/klarna_payments.d.ts +0 -1
  616. package/lib/resources/klarna_payments.js +0 -1
  617. package/lib/resources/line_item_options.d.ts +0 -1
  618. package/lib/resources/line_item_options.js +0 -1
  619. package/lib/resources/line_items.d.ts +0 -1
  620. package/lib/resources/line_items.js +0 -1
  621. package/lib/resources/manual_gateways.d.ts +0 -1
  622. package/lib/resources/manual_gateways.js +0 -1
  623. package/lib/resources/manual_tax_calculators.d.ts +0 -1
  624. package/lib/resources/manual_tax_calculators.js +0 -1
  625. package/lib/resources/markets.d.ts +0 -1
  626. package/lib/resources/markets.js +0 -1
  627. package/lib/resources/merchants.d.ts +0 -1
  628. package/lib/resources/merchants.js +0 -1
  629. package/lib/resources/order_amount_promotion_rules.d.ts +0 -1
  630. package/lib/resources/order_amount_promotion_rules.js +0 -1
  631. package/lib/resources/order_copies.d.ts +0 -1
  632. package/lib/resources/order_copies.js +0 -1
  633. package/lib/resources/order_subscriptions.d.ts +0 -1
  634. package/lib/resources/order_subscriptions.js +0 -1
  635. package/lib/resources/order_validation_rules.d.ts +0 -1
  636. package/lib/resources/order_validation_rules.js +0 -1
  637. package/lib/resources/orders.d.ts +0 -1
  638. package/lib/resources/orders.js +0 -1
  639. package/lib/resources/organization.d.ts +0 -1
  640. package/lib/resources/organization.js +0 -1
  641. package/lib/resources/packages.d.ts +0 -1
  642. package/lib/resources/packages.js +0 -1
  643. package/lib/resources/parcel_line_items.d.ts +0 -1
  644. package/lib/resources/parcel_line_items.js +0 -1
  645. package/lib/resources/parcels.d.ts +0 -1
  646. package/lib/resources/parcels.js +0 -1
  647. package/lib/resources/payment_gateways.d.ts +0 -1
  648. package/lib/resources/payment_gateways.js +0 -1
  649. package/lib/resources/payment_methods.d.ts +0 -1
  650. package/lib/resources/payment_methods.js +0 -1
  651. package/lib/resources/paypal_gateways.d.ts +0 -1
  652. package/lib/resources/paypal_gateways.js +0 -1
  653. package/lib/resources/paypal_payments.d.ts +0 -1
  654. package/lib/resources/paypal_payments.js +0 -1
  655. package/lib/resources/percentage_discount_promotions.d.ts +0 -1
  656. package/lib/resources/percentage_discount_promotions.js +0 -1
  657. package/lib/resources/price_lists.d.ts +0 -1
  658. package/lib/resources/price_lists.js +0 -1
  659. package/lib/resources/prices.d.ts +0 -1
  660. package/lib/resources/prices.js +0 -1
  661. package/lib/resources/promotion_rules.d.ts +0 -1
  662. package/lib/resources/promotion_rules.js +0 -1
  663. package/lib/resources/promotions.d.ts +0 -1
  664. package/lib/resources/promotions.js +0 -1
  665. package/lib/resources/refunds.d.ts +0 -1
  666. package/lib/resources/refunds.js +0 -1
  667. package/lib/resources/return_line_items.d.ts +0 -1
  668. package/lib/resources/return_line_items.js +0 -1
  669. package/lib/resources/returns.d.ts +0 -1
  670. package/lib/resources/returns.js +0 -1
  671. package/lib/resources/shipments.d.ts +0 -1
  672. package/lib/resources/shipments.js +0 -1
  673. package/lib/resources/shipping_categories.d.ts +0 -1
  674. package/lib/resources/shipping_categories.js +0 -1
  675. package/lib/resources/shipping_methods.d.ts +0 -1
  676. package/lib/resources/shipping_methods.js +0 -1
  677. package/lib/resources/shipping_zones.d.ts +0 -1
  678. package/lib/resources/shipping_zones.js +0 -1
  679. package/lib/resources/sku_list_items.d.ts +0 -1
  680. package/lib/resources/sku_list_items.js +0 -1
  681. package/lib/resources/sku_list_promotion_rules.d.ts +0 -1
  682. package/lib/resources/sku_list_promotion_rules.js +0 -1
  683. package/lib/resources/sku_lists.d.ts +0 -1
  684. package/lib/resources/sku_lists.js +0 -1
  685. package/lib/resources/sku_options.d.ts +0 -1
  686. package/lib/resources/sku_options.js +0 -1
  687. package/lib/resources/skus.d.ts +0 -1
  688. package/lib/resources/skus.js +0 -1
  689. package/lib/resources/stock_items.d.ts +0 -1
  690. package/lib/resources/stock_items.js +0 -1
  691. package/lib/resources/stock_line_items.d.ts +0 -1
  692. package/lib/resources/stock_line_items.js +0 -1
  693. package/lib/resources/stock_locations.d.ts +0 -1
  694. package/lib/resources/stock_locations.js +0 -1
  695. package/lib/resources/stock_transfers.d.ts +0 -1
  696. package/lib/resources/stock_transfers.js +0 -1
  697. package/lib/resources/stripe_gateways.d.ts +0 -1
  698. package/lib/resources/stripe_gateways.js +0 -1
  699. package/lib/resources/stripe_payments.d.ts +0 -1
  700. package/lib/resources/stripe_payments.js +0 -1
  701. package/lib/resources/tax_calculators.d.ts +0 -1
  702. package/lib/resources/tax_calculators.js +0 -1
  703. package/lib/resources/tax_categories.d.ts +0 -1
  704. package/lib/resources/tax_categories.js +0 -1
  705. package/lib/resources/tax_rules.d.ts +0 -1
  706. package/lib/resources/tax_rules.js +0 -1
  707. package/lib/resources/taxjar_accounts.d.ts +0 -1
  708. package/lib/resources/taxjar_accounts.js +0 -1
  709. package/lib/resources/transactions.d.ts +0 -1
  710. package/lib/resources/transactions.js +0 -1
  711. package/lib/resources/voids.d.ts +0 -1
  712. package/lib/resources/voids.js +0 -1
  713. package/lib/resources/webhooks.d.ts +0 -1
  714. package/lib/resources/webhooks.js +0 -1
  715. package/lib/resources/wire_transfers.d.ts +0 -1
  716. package/lib/resources/wire_transfers.js +0 -1
  717. package/lib/static.d.ts +0 -1
  718. package/lib/static.js +0 -1
  719. package/lib/util.d.ts +0 -2
  720. package/lib/util.js +0 -1
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{ExternalPayment}from'./external_payments';declare type ExternalGatewayRel=ResourceRel&{type:typeof ExternalGateways.TYPE;};interface ExternalGateway extends Resource{name?:string;shared_secret?:string;authorize_url?:string;capture_url?:string;void_url?:string;refund_url?:string;token_url?:string;payment_methods?:PaymentMethod[];external_payments?:ExternalPayment[];}interface ExternalGatewayCreate extends ResourceCreate{name:string;authorize_url?:string;capture_url?:string;void_url?:string;refund_url?:string;token_url?:string;}interface ExternalGatewayUpdate extends ResourceUpdate{name?:string;authorize_url?:string;capture_url?:string;void_url?:string;refund_url?:string;token_url?:string;}declare class ExternalGateways extends ApiResource{static readonly TYPE:'external_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ExternalGateway>>;create(resource:ExternalGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalGateway>;update(resource:ExternalGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(externalGatewayId:string|ExternalGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;external_payments(externalGatewayId:string|ExternalGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ExternalPayment>>;isExternalGateway(resource:any):resource is ExternalGateway;relationship(id:string|ResourceId|null):ExternalGatewayRel;type():string;}export default ExternalGateways;export{ExternalGateway,ExternalGatewayCreate,ExternalGatewayUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class r extends n{static TYPE="external_gateways";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async payment_methods(e,t,s){const a=e.id||e;return this.resources.fetch({type:"payment_methods"},`external_gateways/${a}/payment_methods`,t,s)}async external_payments(e,t,s){const a=e.id||e;return this.resources.fetch({type:"external_payments"},`external_gateways/${a}/external_payments`,t,s)}isExternalGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';import type{CustomerPaymentSource}from'./customer_payment_sources';declare type ExternalPaymentRel=ResourceRel&{type:typeof ExternalPayments.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface ExternalPayment extends Resource{payment_source_token?:string;options?:object;order?:Order;payment_gateway?:PaymentGateway;wallet?:CustomerPaymentSource;}interface ExternalPaymentCreate extends ResourceCreate{payment_source_token:string;options?:object;order:OrderRel;}interface ExternalPaymentUpdate extends ResourceUpdate{options?:object;order?:OrderRel;}declare class ExternalPayments extends ApiResource{static readonly TYPE:'external_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ExternalPayment>>;create(resource:ExternalPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalPayment>;update(resource:ExternalPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(externalPaymentId:string|ExternalPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(externalPaymentId:string|ExternalPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;wallet(externalPaymentId:string|ExternalPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerPaymentSource>;isExternalPayment(resource:any):resource is ExternalPayment;relationship(id:string|ResourceId|null):ExternalPaymentRel;type():string;}export default ExternalPayments;export{ExternalPayment,ExternalPaymentCreate,ExternalPaymentUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class s extends n{static TYPE="external_payments";async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async order(e,t,r){const a=e.id||e;return this.resources.fetch({type:"orders"},`external_payments/${a}/order`,t,r)}async payment_gateway(e,t,r){const a=e.id||e;return this.resources.fetch({type:"payment_gateways"},`external_payments/${a}/payment_gateway`,t,r)}async wallet(e,t,r){const a=e.id||e;return this.resources.fetch({type:"customer_payment_sources"},`external_payments/${a}/wallet`,t,r)}isExternalPayment(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{PromotionRule}from'./promotion_rules';import type{OrderAmountPromotionRule}from'./order_amount_promotion_rules';import type{SkuListPromotionRule}from'./sku_list_promotion_rules';import type{CouponCodesPromotionRule}from'./coupon_codes_promotion_rules';import type{Attachment}from'./attachments';declare type ExternalPromotionRel=ResourceRel&{type:typeof ExternalPromotions.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type PromotionRuleRel=ResourceRel&{type:'promotion_rules';};declare type OrderAmountPromotionRuleRel=ResourceRel&{type:'order_amount_promotion_rules';};declare type SkuListPromotionRuleRel=ResourceRel&{type:'sku_list_promotion_rules';};declare type CouponCodesPromotionRuleRel=ResourceRel&{type:'coupon_codes_promotion_rules';};interface ExternalPromotion extends Resource{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;total_usage_count?:number;active?:boolean;promotion_url?:string;market?:Market;promotion_rules?:PromotionRule[];order_amount_promotion_rule?:OrderAmountPromotionRule;sku_list_promotion_rule?:SkuListPromotionRule;coupon_codes_promotion_rule?:CouponCodesPromotionRule;attachments?:Attachment[];}interface ExternalPromotionCreate extends ResourceCreate{name:string;currency_code?:string;starts_at:string;expires_at:string;total_usage_limit:number;promotion_url:string;market?:MarketRel;promotion_rules?:PromotionRuleRel[];order_amount_promotion_rule?:OrderAmountPromotionRuleRel;sku_list_promotion_rule?:SkuListPromotionRuleRel;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel;}interface ExternalPromotionUpdate extends ResourceUpdate{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;promotion_url?:string;market?:MarketRel;promotion_rules?:PromotionRuleRel[];order_amount_promotion_rule?:OrderAmountPromotionRuleRel;sku_list_promotion_rule?:SkuListPromotionRuleRel;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel;}declare class ExternalPromotions extends ApiResource{static readonly TYPE:'external_promotions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ExternalPromotion>>;create(resource:ExternalPromotionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalPromotion>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalPromotion>;update(resource:ExternalPromotionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalPromotion>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(externalPromotionId:string|ExternalPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(externalPromotionId:string|ExternalPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(externalPromotionId:string|ExternalPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(externalPromotionId:string|ExternalPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;attachments(externalPromotionId:string|ExternalPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isExternalPromotion(resource:any):resource is ExternalPromotion;relationship(id:string|ResourceId|null):ExternalPromotionRel;type():string;}export default ExternalPromotions;export{ExternalPromotion,ExternalPromotionCreate,ExternalPromotionUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class s extends n{static TYPE="external_promotions";async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async market(e,t,r){const o=e.id||e;return this.resources.fetch({type:"markets"},`external_promotions/${o}/market`,t,r)}async order_amount_promotion_rule(e,t,r){const o=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`external_promotions/${o}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){const o=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`external_promotions/${o}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){const o=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`external_promotions/${o}/coupon_codes_promotion_rule`,t,r)}async attachments(e,t,r){const o=e.id||e;return this.resources.fetch({type:"attachments"},`external_promotions/${o}/attachments`,t,r)}isExternalPromotion(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{TaxCategory}from'./tax_categories';import type{Market}from'./markets';import type{Attachment}from'./attachments';declare type ExternalTaxCalculatorRel=ResourceRel&{type:typeof ExternalTaxCalculators.TYPE;};declare type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface ExternalTaxCalculator extends Resource{name?:string;tax_calculator_url?:string;tax_categories?:TaxCategory[];markets?:Market[];attachments?:Attachment[];}interface ExternalTaxCalculatorCreate extends ResourceCreate{name:string;tax_calculator_url:string;tax_categories?:TaxCategoryRel[];}interface ExternalTaxCalculatorUpdate extends ResourceUpdate{name?:string;tax_calculator_url?:string;tax_categories?:TaxCategoryRel[];}declare class ExternalTaxCalculators extends ApiResource{static readonly TYPE:'external_tax_calculators';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ExternalTaxCalculator>>;create(resource:ExternalTaxCalculatorCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalTaxCalculator>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalTaxCalculator>;update(resource:ExternalTaxCalculatorUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalTaxCalculator>;delete(id:string,options?:ResourcesConfig):Promise<void>;tax_categories(externalTaxCalculatorId:string|ExternalTaxCalculator,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;markets(externalTaxCalculatorId:string|ExternalTaxCalculator,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(externalTaxCalculatorId:string|ExternalTaxCalculator,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isExternalTaxCalculator(resource:any):resource is ExternalTaxCalculator;relationship(id:string|ResourceId|null):ExternalTaxCalculatorRel;type():string;}export default ExternalTaxCalculators;export{ExternalTaxCalculator,ExternalTaxCalculatorCreate,ExternalTaxCalculatorUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class a extends c{static TYPE="external_tax_calculators";async list(e,t){return this.resources.list({type:a.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:a.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:a.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:a.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:a.TYPE,id:e},t)}async tax_categories(e,t,s){const r=e.id||e;return this.resources.fetch({type:"tax_categories"},`external_tax_calculators/${r}/tax_categories`,t,s)}async markets(e,t,s){const r=e.id||e;return this.resources.fetch({type:"markets"},`external_tax_calculators/${r}/markets`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`external_tax_calculators/${r}/attachments`,t,s)}isExternalTaxCalculator(e){return e.type&&e.type===a.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:a.TYPE}:{id:e.id,type:a.TYPE}}type(){return a.TYPE}}export default a;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{PromotionRule}from'./promotion_rules';import type{OrderAmountPromotionRule}from'./order_amount_promotion_rules';import type{SkuListPromotionRule}from'./sku_list_promotion_rules';import type{CouponCodesPromotionRule}from'./coupon_codes_promotion_rules';import type{Attachment}from'./attachments';declare type FixedAmountPromotionRel=ResourceRel&{type:typeof FixedAmountPromotions.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type PromotionRuleRel=ResourceRel&{type:'promotion_rules';};declare type OrderAmountPromotionRuleRel=ResourceRel&{type:'order_amount_promotion_rules';};declare type SkuListPromotionRuleRel=ResourceRel&{type:'sku_list_promotion_rules';};declare type CouponCodesPromotionRuleRel=ResourceRel&{type:'coupon_codes_promotion_rules';};interface FixedAmountPromotion extends Resource{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;total_usage_count?:number;active?:boolean;fixed_amount_cents?:number;fixed_amount_float?:number;formatted_fixed_amount?:string;market?:Market;promotion_rules?:PromotionRule[];order_amount_promotion_rule?:OrderAmountPromotionRule;sku_list_promotion_rule?:SkuListPromotionRule;coupon_codes_promotion_rule?:CouponCodesPromotionRule;attachments?:Attachment[];}interface FixedAmountPromotionCreate extends ResourceCreate{name:string;currency_code?:string;starts_at:string;expires_at:string;total_usage_limit:number;fixed_amount_cents:number;market?:MarketRel;promotion_rules?:PromotionRuleRel[];order_amount_promotion_rule?:OrderAmountPromotionRuleRel;sku_list_promotion_rule?:SkuListPromotionRuleRel;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel;}interface FixedAmountPromotionUpdate extends ResourceUpdate{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;fixed_amount_cents?:number;market?:MarketRel;promotion_rules?:PromotionRuleRel[];order_amount_promotion_rule?:OrderAmountPromotionRuleRel;sku_list_promotion_rule?:SkuListPromotionRuleRel;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel;}declare class FixedAmountPromotions extends ApiResource{static readonly TYPE:'fixed_amount_promotions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<FixedAmountPromotion>>;create(resource:FixedAmountPromotionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FixedAmountPromotion>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FixedAmountPromotion>;update(resource:FixedAmountPromotionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FixedAmountPromotion>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;attachments(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isFixedAmountPromotion(resource:any):resource is FixedAmountPromotion;relationship(id:string|ResourceId|null):FixedAmountPromotionRel;type():string;}export default FixedAmountPromotions;export{FixedAmountPromotion,FixedAmountPromotionCreate,FixedAmountPromotionUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class s extends n{static TYPE="fixed_amount_promotions";async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,o){return this.resources.create({...e,type:s.TYPE},t,o)}async retrieve(e,t,o){return this.resources.retrieve({type:s.TYPE,id:e},t,o)}async update(e,t,o){return this.resources.update({...e,type:s.TYPE},t,o)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async market(e,t,o){const r=e.id||e;return this.resources.fetch({type:"markets"},`fixed_amount_promotions/${r}/market`,t,o)}async order_amount_promotion_rule(e,t,o){const r=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`fixed_amount_promotions/${r}/order_amount_promotion_rule`,t,o)}async sku_list_promotion_rule(e,t,o){const r=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`fixed_amount_promotions/${r}/sku_list_promotion_rule`,t,o)}async coupon_codes_promotion_rule(e,t,o){const r=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`fixed_amount_promotions/${r}/coupon_codes_promotion_rule`,t,o)}async attachments(e,t,o){const r=e.id||e;return this.resources.fetch({type:"attachments"},`fixed_amount_promotions/${r}/attachments`,t,o)}isFixedAmountPromotion(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{PromotionRule}from'./promotion_rules';import type{OrderAmountPromotionRule}from'./order_amount_promotion_rules';import type{SkuListPromotionRule}from'./sku_list_promotion_rules';import type{CouponCodesPromotionRule}from'./coupon_codes_promotion_rules';import type{Attachment}from'./attachments';import type{SkuList}from'./sku_lists';import type{Sku}from'./skus';declare type FixedPricePromotionRel=ResourceRel&{type:typeof FixedPricePromotions.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type PromotionRuleRel=ResourceRel&{type:'promotion_rules';};declare type OrderAmountPromotionRuleRel=ResourceRel&{type:'order_amount_promotion_rules';};declare type SkuListPromotionRuleRel=ResourceRel&{type:'sku_list_promotion_rules';};declare type CouponCodesPromotionRuleRel=ResourceRel&{type:'coupon_codes_promotion_rules';};declare type SkuListRel=ResourceRel&{type:'sku_lists';};interface FixedPricePromotion extends Resource{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;total_usage_count?:number;active?:boolean;fixed_amount_cents?:number;fixed_amount_float?:number;formatted_fixed_amount?:string;market?:Market;promotion_rules?:PromotionRule[];order_amount_promotion_rule?:OrderAmountPromotionRule;sku_list_promotion_rule?:SkuListPromotionRule;coupon_codes_promotion_rule?:CouponCodesPromotionRule;attachments?:Attachment[];sku_list?:SkuList;skus?:Sku[];}interface FixedPricePromotionCreate extends ResourceCreate{name:string;currency_code?:string;starts_at:string;expires_at:string;total_usage_limit:number;fixed_amount_cents:number;market?:MarketRel;promotion_rules?:PromotionRuleRel[];order_amount_promotion_rule?:OrderAmountPromotionRuleRel;sku_list_promotion_rule?:SkuListPromotionRuleRel;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel;sku_list:SkuListRel;}interface FixedPricePromotionUpdate extends ResourceUpdate{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;fixed_amount_cents?:number;market?:MarketRel;promotion_rules?:PromotionRuleRel[];order_amount_promotion_rule?:OrderAmountPromotionRuleRel;sku_list_promotion_rule?:SkuListPromotionRuleRel;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel;sku_list?:SkuListRel;}declare class FixedPricePromotions extends ApiResource{static readonly TYPE:'fixed_price_promotions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<FixedPricePromotion>>;create(resource:FixedPricePromotionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FixedPricePromotion>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FixedPricePromotion>;update(resource:FixedPricePromotionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FixedPricePromotion>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;attachments(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;sku_list(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;skus(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;isFixedPricePromotion(resource:any):resource is FixedPricePromotion;relationship(id:string|ResourceId|null):FixedPricePromotionRel;type():string;}export default FixedPricePromotions;export{FixedPricePromotion,FixedPricePromotionCreate,FixedPricePromotionUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class o extends i{static TYPE="fixed_price_promotions";async list(e,t){return this.resources.list({type:o.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:o.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:o.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:o.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:o.TYPE,id:e},t)}async market(e,t,s){const r=e.id||e;return this.resources.fetch({type:"markets"},`fixed_price_promotions/${r}/market`,t,s)}async order_amount_promotion_rule(e,t,s){const r=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`fixed_price_promotions/${r}/order_amount_promotion_rule`,t,s)}async sku_list_promotion_rule(e,t,s){const r=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`fixed_price_promotions/${r}/sku_list_promotion_rule`,t,s)}async coupon_codes_promotion_rule(e,t,s){const r=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`fixed_price_promotions/${r}/coupon_codes_promotion_rule`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`fixed_price_promotions/${r}/attachments`,t,s)}async sku_list(e,t,s){const r=e.id||e;return this.resources.fetch({type:"sku_lists"},`fixed_price_promotions/${r}/sku_list`,t,s)}async skus(e,t,s){const r=e.id||e;return this.resources.fetch({type:"skus"},`fixed_price_promotions/${r}/skus`,t,s)}isFixedPricePromotion(e){return e.type&&e.type===o.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:o.TYPE}:{id:e.id,type:o.TYPE}}type(){return o.TYPE}}export default o;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{PromotionRule}from'./promotion_rules';import type{OrderAmountPromotionRule}from'./order_amount_promotion_rules';import type{SkuListPromotionRule}from'./sku_list_promotion_rules';import type{CouponCodesPromotionRule}from'./coupon_codes_promotion_rules';import type{Attachment}from'./attachments';import type{SkuList}from'./sku_lists';import type{Sku}from'./skus';declare type FreeGiftPromotionRel=ResourceRel&{type:typeof FreeGiftPromotions.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type PromotionRuleRel=ResourceRel&{type:'promotion_rules';};declare type OrderAmountPromotionRuleRel=ResourceRel&{type:'order_amount_promotion_rules';};declare type SkuListPromotionRuleRel=ResourceRel&{type:'sku_list_promotion_rules';};declare type CouponCodesPromotionRuleRel=ResourceRel&{type:'coupon_codes_promotion_rules';};declare type SkuListRel=ResourceRel&{type:'sku_lists';};interface FreeGiftPromotion extends Resource{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;total_usage_count?:number;active?:boolean;max_quantity?:number;market?:Market;promotion_rules?:PromotionRule[];order_amount_promotion_rule?:OrderAmountPromotionRule;sku_list_promotion_rule?:SkuListPromotionRule;coupon_codes_promotion_rule?:CouponCodesPromotionRule;attachments?:Attachment[];sku_list?:SkuList;skus?:Sku[];}interface FreeGiftPromotionCreate extends ResourceCreate{name:string;currency_code?:string;starts_at:string;expires_at:string;total_usage_limit:number;max_quantity?:number;market?:MarketRel;promotion_rules?:PromotionRuleRel[];order_amount_promotion_rule?:OrderAmountPromotionRuleRel;sku_list_promotion_rule?:SkuListPromotionRuleRel;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel;sku_list:SkuListRel;}interface FreeGiftPromotionUpdate extends ResourceUpdate{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;max_quantity?:number;market?:MarketRel;promotion_rules?:PromotionRuleRel[];order_amount_promotion_rule?:OrderAmountPromotionRuleRel;sku_list_promotion_rule?:SkuListPromotionRuleRel;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel;sku_list?:SkuListRel;}declare class FreeGiftPromotions extends ApiResource{static readonly TYPE:'free_gift_promotions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<FreeGiftPromotion>>;create(resource:FreeGiftPromotionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FreeGiftPromotion>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FreeGiftPromotion>;update(resource:FreeGiftPromotionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FreeGiftPromotion>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;attachments(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;sku_list(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;skus(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;isFreeGiftPromotion(resource:any):resource is FreeGiftPromotion;relationship(id:string|ResourceId|null):FreeGiftPromotionRel;type():string;}export default FreeGiftPromotions;export{FreeGiftPromotion,FreeGiftPromotionCreate,FreeGiftPromotionUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class o extends i{static TYPE="free_gift_promotions";async list(e,t){return this.resources.list({type:o.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:o.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:o.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:o.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:o.TYPE,id:e},t)}async market(e,t,s){const r=e.id||e;return this.resources.fetch({type:"markets"},`free_gift_promotions/${r}/market`,t,s)}async order_amount_promotion_rule(e,t,s){const r=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`free_gift_promotions/${r}/order_amount_promotion_rule`,t,s)}async sku_list_promotion_rule(e,t,s){const r=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`free_gift_promotions/${r}/sku_list_promotion_rule`,t,s)}async coupon_codes_promotion_rule(e,t,s){const r=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`free_gift_promotions/${r}/coupon_codes_promotion_rule`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`free_gift_promotions/${r}/attachments`,t,s)}async sku_list(e,t,s){const r=e.id||e;return this.resources.fetch({type:"sku_lists"},`free_gift_promotions/${r}/sku_list`,t,s)}async skus(e,t,s){const r=e.id||e;return this.resources.fetch({type:"skus"},`free_gift_promotions/${r}/skus`,t,s)}isFreeGiftPromotion(e){return e.type&&e.type===o.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:o.TYPE}:{id:e.id,type:o.TYPE}}type(){return o.TYPE}}export default o;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{PromotionRule}from'./promotion_rules';import type{OrderAmountPromotionRule}from'./order_amount_promotion_rules';import type{SkuListPromotionRule}from'./sku_list_promotion_rules';import type{CouponCodesPromotionRule}from'./coupon_codes_promotion_rules';import type{Attachment}from'./attachments';declare type FreeShippingPromotionRel=ResourceRel&{type:typeof FreeShippingPromotions.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type PromotionRuleRel=ResourceRel&{type:'promotion_rules';};declare type OrderAmountPromotionRuleRel=ResourceRel&{type:'order_amount_promotion_rules';};declare type SkuListPromotionRuleRel=ResourceRel&{type:'sku_list_promotion_rules';};declare type CouponCodesPromotionRuleRel=ResourceRel&{type:'coupon_codes_promotion_rules';};interface FreeShippingPromotion extends Resource{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;total_usage_count?:number;active?:boolean;market?:Market;promotion_rules?:PromotionRule[];order_amount_promotion_rule?:OrderAmountPromotionRule;sku_list_promotion_rule?:SkuListPromotionRule;coupon_codes_promotion_rule?:CouponCodesPromotionRule;attachments?:Attachment[];}interface FreeShippingPromotionCreate extends ResourceCreate{name:string;currency_code?:string;starts_at:string;expires_at:string;total_usage_limit:number;market?:MarketRel;promotion_rules?:PromotionRuleRel[];order_amount_promotion_rule?:OrderAmountPromotionRuleRel;sku_list_promotion_rule?:SkuListPromotionRuleRel;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel;}interface FreeShippingPromotionUpdate extends ResourceUpdate{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;market?:MarketRel;promotion_rules?:PromotionRuleRel[];order_amount_promotion_rule?:OrderAmountPromotionRuleRel;sku_list_promotion_rule?:SkuListPromotionRuleRel;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel;}declare class FreeShippingPromotions extends ApiResource{static readonly TYPE:'free_shipping_promotions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<FreeShippingPromotion>>;create(resource:FreeShippingPromotionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FreeShippingPromotion>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FreeShippingPromotion>;update(resource:FreeShippingPromotionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FreeShippingPromotion>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;attachments(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isFreeShippingPromotion(resource:any):resource is FreeShippingPromotion;relationship(id:string|ResourceId|null):FreeShippingPromotionRel;type():string;}export default FreeShippingPromotions;export{FreeShippingPromotion,FreeShippingPromotionCreate,FreeShippingPromotionUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class s extends i{static TYPE="free_shipping_promotions";async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async market(e,t,r){const o=e.id||e;return this.resources.fetch({type:"markets"},`free_shipping_promotions/${o}/market`,t,r)}async order_amount_promotion_rule(e,t,r){const o=e.id||e;return this.resources.fetch({type:"order_amount_promotion_rules"},`free_shipping_promotions/${o}/order_amount_promotion_rule`,t,r)}async sku_list_promotion_rule(e,t,r){const o=e.id||e;return this.resources.fetch({type:"sku_list_promotion_rules"},`free_shipping_promotions/${o}/sku_list_promotion_rule`,t,r)}async coupon_codes_promotion_rule(e,t,r){const o=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`free_shipping_promotions/${o}/coupon_codes_promotion_rule`,t,r)}async attachments(e,t,r){const o=e.id||e;return this.resources.fetch({type:"attachments"},`free_shipping_promotions/${o}/attachments`,t,r)}isFreeShippingPromotion(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Address}from'./addresses';import type{Attachment}from'./attachments';declare type GeocoderRel=ResourceRel&{type:typeof Geocoders.TYPE;};interface Geocoder extends Resource{name?:string;addresses?:Address[];attachments?:Attachment[];}declare class Geocoders extends ApiResource{static readonly TYPE:'geocoders';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Geocoder>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Geocoder>;addresses(geocoderId:string|Geocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;attachments(geocoderId:string|Geocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isGeocoder(resource:any):resource is Geocoder;relationship(id:string|ResourceId|null):GeocoderRel;type():string;}export default Geocoders;export{Geocoder};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class t extends i{static TYPE="geocoders";async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async addresses(e,r,s){const c=e.id||e;return this.resources.fetch({type:"addresses"},`geocoders/${c}/addresses`,r,s)}async attachments(e,r,s){const c=e.id||e;return this.resources.fetch({type:"attachments"},`geocoders/${c}/attachments`,r,s)}isGeocoder(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}export default t;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Customer}from'./customers';import type{Attachment}from'./attachments';declare type GiftCardRecipientRel=ResourceRel&{type:typeof GiftCardRecipients.TYPE;};declare type CustomerRel=ResourceRel&{type:'customers';};interface GiftCardRecipient extends Resource{email?:string;first_name?:string;last_name?:string;customer?:Customer;attachments?:Attachment[];}interface GiftCardRecipientCreate extends ResourceCreate{email:string;first_name?:string;last_name?:string;customer?:CustomerRel;}interface GiftCardRecipientUpdate extends ResourceUpdate{email?:string;first_name?:string;last_name?:string;customer?:CustomerRel;}declare class GiftCardRecipients extends ApiResource{static readonly TYPE:'gift_card_recipients';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<GiftCardRecipient>>;create(resource:GiftCardRecipientCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<GiftCardRecipient>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<GiftCardRecipient>;update(resource:GiftCardRecipientUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<GiftCardRecipient>;delete(id:string,options?:ResourcesConfig):Promise<void>;customer(giftCardRecipientId:string|GiftCardRecipient,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;attachments(giftCardRecipientId:string|GiftCardRecipient,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isGiftCardRecipient(resource:any):resource is GiftCardRecipient;relationship(id:string|ResourceId|null):GiftCardRecipientRel;type():string;}export default GiftCardRecipients;export{GiftCardRecipient,GiftCardRecipientCreate,GiftCardRecipientUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class r extends c{static TYPE="gift_card_recipients";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async customer(e,t,s){const i=e.id||e;return this.resources.fetch({type:"customers"},`gift_card_recipients/${i}/customer`,t,s)}async attachments(e,t,s){const i=e.id||e;return this.resources.fetch({type:"attachments"},`gift_card_recipients/${i}/attachments`,t,s)}isGiftCardRecipient(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{GiftCardRecipient}from'./gift_card_recipients';import type{Attachment}from'./attachments';declare type GiftCardRel=ResourceRel&{type:typeof GiftCards.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type GiftCardRecipientRel=ResourceRel&{type:'gift_card_recipients';};interface GiftCard extends Resource{status?:string;code?:string;currency_code?:string;initial_balance_cents?:number;initial_balance_float?:number;formatted_initial_balance?:string;balance_cents?:number;balance_float?:number;formatted_balance?:string;balance_max_cents?:string;balance_max_float?:number;formatted_balance_max?:string;balance_log?:object[];single_use?:boolean;rechargeable?:boolean;image_url?:string;expires_at?:string;recipient_email?:string;market?:Market;gift_card_recipient?:GiftCardRecipient;attachments?:Attachment[];}interface GiftCardCreate extends ResourceCreate{code?:string;currency_code?:string;balance_cents:number;balance_max_cents?:string;single_use?:boolean;rechargeable?:boolean;image_url?:string;expires_at?:string;recipient_email?:string;market?:MarketRel;gift_card_recipient?:GiftCardRecipientRel;}interface GiftCardUpdate extends ResourceUpdate{currency_code?:string;balance_cents?:number;balance_max_cents?:string;single_use?:boolean;rechargeable?:boolean;image_url?:string;expires_at?:string;recipient_email?:string;_purchase?:boolean;_activate?:boolean;_deactivate?:boolean;_balance_change_cents?:number;market?:MarketRel;gift_card_recipient?:GiftCardRecipientRel;}declare class GiftCards extends ApiResource{static readonly TYPE:'gift_cards';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<GiftCard>>;create(resource:GiftCardCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<GiftCard>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<GiftCard>;update(resource:GiftCardUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<GiftCard>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(giftCardId:string|GiftCard,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;gift_card_recipient(giftCardId:string|GiftCard,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<GiftCardRecipient>;attachments(giftCardId:string|GiftCard,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isGiftCard(resource:any):resource is GiftCard;relationship(id:string|ResourceId|null):GiftCardRel;type():string;}export default GiftCards;export{GiftCard,GiftCardCreate,GiftCardUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class s extends i{static TYPE="gift_cards";async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async market(e,t,r){const c=e.id||e;return this.resources.fetch({type:"markets"},`gift_cards/${c}/market`,t,r)}async gift_card_recipient(e,t,r){const c=e.id||e;return this.resources.fetch({type:"gift_card_recipients"},`gift_cards/${c}/gift_card_recipient`,t,r)}async attachments(e,t,r){const c=e.id||e;return this.resources.fetch({type:"attachments"},`gift_cards/${c}/attachments`,t,r)}isGiftCard(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Address}from'./addresses';import type{Attachment}from'./attachments';declare type GoogleGeocoderRel=ResourceRel&{type:typeof GoogleGeocoders.TYPE;};interface GoogleGeocoder extends Resource{name?:string;addresses?:Address[];attachments?:Attachment[];}interface GoogleGeocoderCreate extends ResourceCreate{name:string;api_key:string;}interface GoogleGeocoderUpdate extends ResourceUpdate{name?:string;api_key?:string;}declare class GoogleGeocoders extends ApiResource{static readonly TYPE:'google_geocoders';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<GoogleGeocoder>>;create(resource:GoogleGeocoderCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<GoogleGeocoder>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<GoogleGeocoder>;update(resource:GoogleGeocoderUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<GoogleGeocoder>;delete(id:string,options?:ResourcesConfig):Promise<void>;addresses(googleGeocoderId:string|GoogleGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;attachments(googleGeocoderId:string|GoogleGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isGoogleGeocoder(resource:any):resource is GoogleGeocoder;relationship(id:string|ResourceId|null):GoogleGeocoderRel;type():string;}export default GoogleGeocoders;export{GoogleGeocoder,GoogleGeocoderCreate,GoogleGeocoderUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class s extends c{static TYPE="google_geocoders";async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async addresses(e,t,r){const o=e.id||e;return this.resources.fetch({type:"addresses"},`google_geocoders/${o}/addresses`,t,r)}async attachments(e,t,r){const o=e.id||e;return this.resources.fetch({type:"attachments"},`google_geocoders/${o}/attachments`,t,r)}isGoogleGeocoder(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';declare type ImportRel=ResourceRel&{type:typeof Imports.TYPE;};interface Import extends Resource{resource_type?:string;parent_resource_id?:string;status?:string;started_at?:string;completed_at?:string;interrupted_at?:string;inputs?:object[];inputs_size?:number;errors_count?:number;warnings_count?:number;destroyed_count?:number;processed_count?:number;errors_log?:object;warnings_log?:object;cleanup_records?:boolean;}interface ImportCreate extends ResourceCreate{resource_type:string;parent_resource_id?:string;inputs:object[];cleanup_records?:boolean;}declare class Imports extends ApiResource{static readonly TYPE:'imports';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Import>>;create(resource:ImportCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Import>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Import>;delete(id:string,options?:ResourcesConfig):Promise<void>;isImport(resource:any):resource is Import;relationship(id:string|ResourceId|null):ImportRel;type():string;}export default Imports;export{Import,ImportCreate};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class t extends i{static TYPE="imports";async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create({...e,type:t.TYPE},s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isImport(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}export default t;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{Customer}from'./customers';import type{Sku}from'./skus';declare type InStockSubscriptionRel=ResourceRel&{type:typeof InStockSubscriptions.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type CustomerRel=ResourceRel&{type:'customers';};declare type SkuRel=ResourceRel&{type:'skus';};interface InStockSubscription extends Resource{status?:string;customer_email?:string;sku_code?:string;stock_threshold?:number;market?:Market;customer?:Customer;sku?:Sku;}interface InStockSubscriptionCreate extends ResourceCreate{customer_email?:string;sku_code?:string;stock_threshold?:number;market:MarketRel;customer:CustomerRel;sku:SkuRel;}interface InStockSubscriptionUpdate extends ResourceUpdate{sku_code?:string;stock_threshold?:number;_activate?:boolean;_deactivate?:boolean;market?:MarketRel;customer?:CustomerRel;sku?:SkuRel;}declare class InStockSubscriptions extends ApiResource{static readonly TYPE:'in_stock_subscriptions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<InStockSubscription>>;create(resource:InStockSubscriptionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InStockSubscription>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InStockSubscription>;update(resource:InStockSubscriptionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InStockSubscription>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(inStockSubscriptionId:string|InStockSubscription,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;customer(inStockSubscriptionId:string|InStockSubscription,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;sku(inStockSubscriptionId:string|InStockSubscription,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;isInStockSubscription(resource:any):resource is InStockSubscription;relationship(id:string|ResourceId|null):InStockSubscriptionRel;type():string;}export default InStockSubscriptions;export{InStockSubscription,InStockSubscriptionCreate,InStockSubscriptionUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class r extends c{static TYPE="in_stock_subscriptions";async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create({...e,type:r.TYPE},s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update({...e,type:r.TYPE},s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}async market(e,s,t){const i=e.id||e;return this.resources.fetch({type:"markets"},`in_stock_subscriptions/${i}/market`,s,t)}async customer(e,s,t){const i=e.id||e;return this.resources.fetch({type:"customers"},`in_stock_subscriptions/${i}/customer`,s,t)}async sku(e,s,t){const i=e.id||e;return this.resources.fetch({type:"skus"},`in_stock_subscriptions/${i}/sku`,s,t)}isInStockSubscription(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{InventoryStockLocation}from'./inventory_stock_locations';import type{InventoryReturnLocation}from'./inventory_return_locations';import type{Attachment}from'./attachments';declare type InventoryModelRel=ResourceRel&{type:typeof InventoryModels.TYPE;};interface InventoryModel extends Resource{name?:string;strategy?:string;stock_locations_cutoff?:number;inventory_stock_locations?:InventoryStockLocation[];inventory_return_locations?:InventoryReturnLocation[];attachments?:Attachment[];}interface InventoryModelCreate extends ResourceCreate{name:string;strategy:string;stock_locations_cutoff?:number;}interface InventoryModelUpdate extends ResourceUpdate{name?:string;strategy?:string;stock_locations_cutoff?:number;}declare class InventoryModels extends ApiResource{static readonly TYPE:'inventory_models';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<InventoryModel>>;create(resource:InventoryModelCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryModel>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryModel>;update(resource:InventoryModelUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryModel>;delete(id:string,options?:ResourcesConfig):Promise<void>;inventory_stock_locations(inventoryModelId:string|InventoryModel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<InventoryStockLocation>>;inventory_return_locations(inventoryModelId:string|InventoryModel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<InventoryReturnLocation>>;attachments(inventoryModelId:string|InventoryModel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isInventoryModel(resource:any):resource is InventoryModel;relationship(id:string|ResourceId|null):InventoryModelRel;type():string;}export default InventoryModels;export{InventoryModel,InventoryModelCreate,InventoryModelUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as o}from"../resource";class s extends o{static TYPE="inventory_models";async list(t,e){return this.resources.list({type:s.TYPE},t,e)}async create(t,e,r){return this.resources.create({...t,type:s.TYPE},e,r)}async retrieve(t,e,r){return this.resources.retrieve({type:s.TYPE,id:t},e,r)}async update(t,e,r){return this.resources.update({...t,type:s.TYPE},e,r)}async delete(t,e){await this.resources.delete({type:s.TYPE,id:t},e)}async inventory_stock_locations(t,e,r){const n=t.id||t;return this.resources.fetch({type:"inventory_stock_locations"},`inventory_models/${n}/inventory_stock_locations`,e,r)}async inventory_return_locations(t,e,r){const n=t.id||t;return this.resources.fetch({type:"inventory_return_locations"},`inventory_models/${n}/inventory_return_locations`,e,r)}async attachments(t,e,r){const n=t.id||t;return this.resources.fetch({type:"attachments"},`inventory_models/${n}/attachments`,e,r)}isInventoryModel(t){return t.type&&t.type===s.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:s.TYPE}:{id:t.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{StockLocation}from'./stock_locations';import type{InventoryModel}from'./inventory_models';declare type InventoryReturnLocationRel=ResourceRel&{type:typeof InventoryReturnLocations.TYPE;};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};declare type InventoryModelRel=ResourceRel&{type:'inventory_models';};interface InventoryReturnLocation extends Resource{priority?:number;stock_location?:StockLocation;inventory_model?:InventoryModel;}interface InventoryReturnLocationCreate extends ResourceCreate{priority:number;stock_location:StockLocationRel;inventory_model:InventoryModelRel;}interface InventoryReturnLocationUpdate extends ResourceUpdate{priority?:number;stock_location?:StockLocationRel;inventory_model?:InventoryModelRel;}declare class InventoryReturnLocations extends ApiResource{static readonly TYPE:'inventory_return_locations';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<InventoryReturnLocation>>;create(resource:InventoryReturnLocationCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryReturnLocation>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryReturnLocation>;update(resource:InventoryReturnLocationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryReturnLocation>;delete(id:string,options?:ResourcesConfig):Promise<void>;stock_location(inventoryReturnLocationId:string|InventoryReturnLocation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;inventory_model(inventoryReturnLocationId:string|InventoryReturnLocation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryModel>;isInventoryReturnLocation(resource:any):resource is InventoryReturnLocation;relationship(id:string|ResourceId|null):InventoryReturnLocationRel;type():string;}export default InventoryReturnLocations;export{InventoryReturnLocation,InventoryReturnLocationCreate,InventoryReturnLocationUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as o}from"../resource";class r extends o{static TYPE="inventory_return_locations";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,n){return this.resources.create({...e,type:r.TYPE},t,n)}async retrieve(e,t,n){return this.resources.retrieve({type:r.TYPE,id:e},t,n)}async update(e,t,n){return this.resources.update({...e,type:r.TYPE},t,n)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async stock_location(e,t,n){const s=e.id||e;return this.resources.fetch({type:"stock_locations"},`inventory_return_locations/${s}/stock_location`,t,n)}async inventory_model(e,t,n){const s=e.id||e;return this.resources.fetch({type:"inventory_models"},`inventory_return_locations/${s}/inventory_model`,t,n)}isInventoryReturnLocation(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{StockLocation}from'./stock_locations';import type{InventoryModel}from'./inventory_models';declare type InventoryStockLocationRel=ResourceRel&{type:typeof InventoryStockLocations.TYPE;};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};declare type InventoryModelRel=ResourceRel&{type:'inventory_models';};interface InventoryStockLocation extends Resource{priority?:number;on_hold?:boolean;stock_location?:StockLocation;inventory_model?:InventoryModel;}interface InventoryStockLocationCreate extends ResourceCreate{priority:number;on_hold?:boolean;stock_location:StockLocationRel;inventory_model:InventoryModelRel;}interface InventoryStockLocationUpdate extends ResourceUpdate{priority?:number;on_hold?:boolean;stock_location?:StockLocationRel;inventory_model?:InventoryModelRel;}declare class InventoryStockLocations extends ApiResource{static readonly TYPE:'inventory_stock_locations';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<InventoryStockLocation>>;create(resource:InventoryStockLocationCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryStockLocation>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryStockLocation>;update(resource:InventoryStockLocationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryStockLocation>;delete(id:string,options?:ResourcesConfig):Promise<void>;stock_location(inventoryStockLocationId:string|InventoryStockLocation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;inventory_model(inventoryStockLocationId:string|InventoryStockLocation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryModel>;isInventoryStockLocation(resource:any):resource is InventoryStockLocation;relationship(id:string|ResourceId|null):InventoryStockLocationRel;type():string;}export default InventoryStockLocations;export{InventoryStockLocation,InventoryStockLocationCreate,InventoryStockLocationUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as r}from"../resource";class s extends r{static TYPE="inventory_stock_locations";async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,o){return this.resources.create({...e,type:s.TYPE},t,o)}async retrieve(e,t,o){return this.resources.retrieve({type:s.TYPE,id:e},t,o)}async update(e,t,o){return this.resources.update({...e,type:s.TYPE},t,o)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async stock_location(e,t,o){const n=e.id||e;return this.resources.fetch({type:"stock_locations"},`inventory_stock_locations/${n}/stock_location`,t,o)}async inventory_model(e,t,o){const n=e.id||e;return this.resources.fetch({type:"inventory_models"},`inventory_stock_locations/${n}/inventory_model`,t,o)}isInventoryStockLocation(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{KlarnaPayment}from'./klarna_payments';declare type KlarnaGatewayRel=ResourceRel&{type:typeof KlarnaGateways.TYPE;};declare type KlarnaPaymentRel=ResourceRel&{type:'klarna_payments';};interface KlarnaGateway extends Resource{name?:string;payment_methods?:PaymentMethod[];klarna_payments?:KlarnaPayment[];}interface KlarnaGatewayCreate extends ResourceCreate{name:string;country_code:string;api_key:string;api_secret:string;klarna_payments?:KlarnaPaymentRel[];}interface KlarnaGatewayUpdate extends ResourceUpdate{name?:string;country_code?:string;api_key?:string;api_secret?:string;klarna_payments?:KlarnaPaymentRel[];}declare class KlarnaGateways extends ApiResource{static readonly TYPE:'klarna_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<KlarnaGateway>>;create(resource:KlarnaGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaGateway>;update(resource:KlarnaGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(klarnaGatewayId:string|KlarnaGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;klarna_payments(klarnaGatewayId:string|KlarnaGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<KlarnaPayment>>;isKlarnaGateway(resource:any):resource is KlarnaGateway;relationship(id:string|ResourceId|null):KlarnaGatewayRel;type():string;}export default KlarnaGateways;export{KlarnaGateway,KlarnaGatewayCreate,KlarnaGatewayUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class r extends n{static TYPE="klarna_gateways";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,a){return this.resources.create({...e,type:r.TYPE},t,a)}async retrieve(e,t,a){return this.resources.retrieve({type:r.TYPE,id:e},t,a)}async update(e,t,a){return this.resources.update({...e,type:r.TYPE},t,a)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async payment_methods(e,t,a){const s=e.id||e;return this.resources.fetch({type:"payment_methods"},`klarna_gateways/${s}/payment_methods`,t,a)}async klarna_payments(e,t,a){const s=e.id||e;return this.resources.fetch({type:"klarna_payments"},`klarna_gateways/${s}/klarna_payments`,t,a)}isKlarnaGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';declare type KlarnaPaymentRel=ResourceRel&{type:typeof KlarnaPayments.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface KlarnaPayment extends Resource{session_id?:string;client_token?:string;payment_methods?:object[];auth_token?:string;order?:Order;payment_gateway?:PaymentGateway;}interface KlarnaPaymentCreate extends ResourceCreate{order:OrderRel;}interface KlarnaPaymentUpdate extends ResourceUpdate{auth_token?:string;_update?:boolean;order?:OrderRel;}declare class KlarnaPayments extends ApiResource{static readonly TYPE:'klarna_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<KlarnaPayment>>;create(resource:KlarnaPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaPayment>;update(resource:KlarnaPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<KlarnaPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(klarnaPaymentId:string|KlarnaPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(klarnaPaymentId:string|KlarnaPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isKlarnaPayment(resource:any):resource is KlarnaPayment;relationship(id:string|ResourceId|null):KlarnaPaymentRel;type():string;}export default KlarnaPayments;export{KlarnaPayment,KlarnaPaymentCreate,KlarnaPaymentUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class r extends n{static TYPE="klarna_payments";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){const a=e.id||e;return this.resources.fetch({type:"orders"},`klarna_payments/${a}/order`,t,s)}async payment_gateway(e,t,s){const a=e.id||e;return this.resources.fetch({type:"payment_gateways"},`klarna_payments/${a}/payment_gateway`,t,s)}isKlarnaPayment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{LineItem}from'./line_items';import type{SkuOption}from'./sku_options';declare type LineItemOptionRel=ResourceRel&{type:typeof LineItemOptions.TYPE;};declare type LineItemRel=ResourceRel&{type:'line_items';};declare type SkuOptionRel=ResourceRel&{type:'sku_options';};interface LineItemOption extends Resource{name?:string;quantity?:number;currency_code?:string;unit_amount_cents?:number;unit_amount_float?:number;formatted_unit_amount?:string;total_amount_cents?:number;total_amount_float?:number;formatted_total_amount?:string;delay_hours?:number;delay_days?:number;options?:object;line_item?:LineItem;sku_option?:SkuOption;}interface LineItemOptionCreate extends ResourceCreate{name?:string;quantity:number;options:object;line_item:LineItemRel;sku_option:SkuOptionRel;}interface LineItemOptionUpdate extends ResourceUpdate{name?:string;quantity?:number;options?:object;sku_option?:SkuOptionRel;}declare class LineItemOptions extends ApiResource{static readonly TYPE:'line_item_options';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItemOption>>;create(resource:LineItemOptionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItemOption>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItemOption>;update(resource:LineItemOptionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItemOption>;delete(id:string,options?:ResourcesConfig):Promise<void>;line_item(lineItemOptionId:string|LineItemOption,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;sku_option(lineItemOptionId:string|LineItemOption,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuOption>;isLineItemOption(resource:any):resource is LineItemOption;relationship(id:string|ResourceId|null):LineItemOptionRel;type():string;}export default LineItemOptions;export{LineItemOption,LineItemOptionCreate,LineItemOptionUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class i extends n{static TYPE="line_item_options";async list(e,t){return this.resources.list({type:i.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:i.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:i.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:i.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:i.TYPE,id:e},t)}async line_item(e,t,r){const s=e.id||e;return this.resources.fetch({type:"line_items"},`line_item_options/${s}/line_item`,t,r)}async sku_option(e,t,r){const s=e.id||e;return this.resources.fetch({type:"sku_options"},`line_item_options/${s}/sku_option`,t,r)}isLineItemOption(e){return e.type&&e.type===i.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:i.TYPE}:{id:e.id,type:i.TYPE}}type(){return i.TYPE}}export default i;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Adjustment}from'./adjustments';import type{Bundle}from'./bundles';import type{ExternalPromotion}from'./external_promotions';import type{FixedAmountPromotion}from'./fixed_amount_promotions';import type{FreeShippingPromotion}from'./free_shipping_promotions';import type{GiftCard}from'./gift_cards';import type{PaymentMethod}from'./payment_methods';import type{PercentageDiscountPromotion}from'./percentage_discount_promotions';import type{Shipment}from'./shipments';import type{Sku}from'./skus';import type{LineItemOption}from'./line_item_options';import type{StockLineItem}from'./stock_line_items';import type{StockTransfer}from'./stock_transfers';declare type LineItemRel=ResourceRel&{type:typeof LineItems.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};declare type AdjustmentRel=ResourceRel&{type:'adjustments';};declare type BundleRel=ResourceRel&{type:'bundles';};declare type ExternalPromotionRel=ResourceRel&{type:'external_promotions';};declare type FixedAmountPromotionRel=ResourceRel&{type:'fixed_amount_promotions';};declare type FreeShippingPromotionRel=ResourceRel&{type:'free_shipping_promotions';};declare type GiftCardRel=ResourceRel&{type:'gift_cards';};declare type PaymentMethodRel=ResourceRel&{type:'payment_methods';};declare type PercentageDiscountPromotionRel=ResourceRel&{type:'percentage_discount_promotions';};declare type ShipmentRel=ResourceRel&{type:'shipments';};declare type SkuRel=ResourceRel&{type:'skus';};interface LineItem extends Resource{sku_code?:string;bundle_code?:string;quantity?:number;currency_code?:string;unit_amount_cents?:number;unit_amount_float?:number;formatted_unit_amount?:string;options_amount_cents?:number;options_amount_float?:number;formatted_options_amount?:string;discount_cents?:number;discount_float?:number;formatted_discount?:string;total_amount_cents?:number;total_amount_float?:number;formatted_total_amount?:string;tax_amount_cents?:number;tax_amount_float?:number;formatted_tax_amount?:string;name?:string;image_url?:string;discount_breakdown?:object;tax_rate?:number;tax_breakdown?:object;item_type?:string;order?:Order;item?:Adjustment|Bundle|ExternalPromotion|FixedAmountPromotion|FreeShippingPromotion|GiftCard|PaymentMethod|PercentageDiscountPromotion|Shipment|Sku;line_item_options?:LineItemOption[];shipment_line_items?:object[];stock_line_items?:StockLineItem[];stock_transfers?:StockTransfer[];}interface LineItemCreate extends ResourceCreate{sku_code?:string;bundle_code?:string;quantity:number;_external_price?:boolean;_update_quantity?:boolean;unit_amount_cents?:number;name?:string;image_url?:string;item_type?:string;order:OrderRel;item?:AdjustmentRel|BundleRel|ExternalPromotionRel|FixedAmountPromotionRel|FreeShippingPromotionRel|GiftCardRel|PaymentMethodRel|PercentageDiscountPromotionRel|ShipmentRel|SkuRel;}interface LineItemUpdate extends ResourceUpdate{sku_code?:string;bundle_code?:string;quantity?:number;name?:string;image_url?:string;}declare class LineItems extends ApiResource{static readonly TYPE:'line_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItem>>;create(resource:LineItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;update(resource:LineItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(lineItemId:string|LineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;line_item_options(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItemOption>>;stock_line_items(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLineItem>>;stock_transfers(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;isLineItem(resource:any):resource is LineItem;relationship(id:string|ResourceId|null):LineItemRel;type():string;}export default LineItems;export{LineItem,LineItemCreate,LineItemUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class r extends n{static TYPE="line_items";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){const i=e.id||e;return this.resources.fetch({type:"orders"},`line_items/${i}/order`,t,s)}async line_item_options(e,t,s){const i=e.id||e;return this.resources.fetch({type:"line_item_options"},`line_items/${i}/line_item_options`,t,s)}async stock_line_items(e,t,s){const i=e.id||e;return this.resources.fetch({type:"stock_line_items"},`line_items/${i}/stock_line_items`,t,s)}async stock_transfers(e,t,s){const i=e.id||e;return this.resources.fetch({type:"stock_transfers"},`line_items/${i}/stock_transfers`,t,s)}isLineItem(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';declare type ManualGatewayRel=ResourceRel&{type:typeof ManualGateways.TYPE;};interface ManualGateway extends Resource{name?:string;require_capture?:boolean;payment_methods?:PaymentMethod[];}interface ManualGatewayCreate extends ResourceCreate{name:string;require_capture?:boolean;}interface ManualGatewayUpdate extends ResourceUpdate{name?:string;require_capture?:boolean;}declare class ManualGateways extends ApiResource{static readonly TYPE:'manual_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ManualGateway>>;create(resource:ManualGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualGateway>;update(resource:ManualGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(manualGatewayId:string|ManualGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;isManualGateway(resource:any):resource is ManualGateway;relationship(id:string|ResourceId|null):ManualGatewayRel;type():string;}export default ManualGateways;export{ManualGateway,ManualGatewayCreate,ManualGatewayUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class r extends n{static TYPE="manual_gateways";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async payment_methods(e,t,s){const a=e.id||e;return this.resources.fetch({type:"payment_methods"},`manual_gateways/${a}/payment_methods`,t,s)}isManualGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{TaxCategory}from'./tax_categories';import type{Market}from'./markets';import type{Attachment}from'./attachments';import type{TaxRule}from'./tax_rules';declare type ManualTaxCalculatorRel=ResourceRel&{type:typeof ManualTaxCalculators.TYPE;};declare type TaxCategoryRel=ResourceRel&{type:'tax_categories';};declare type TaxRuleRel=ResourceRel&{type:'tax_rules';};interface ManualTaxCalculator extends Resource{name?:string;tax_categories?:TaxCategory[];markets?:Market[];attachments?:Attachment[];tax_rules?:TaxRule[];}interface ManualTaxCalculatorCreate extends ResourceCreate{name:string;tax_categories?:TaxCategoryRel[];tax_rules?:TaxRuleRel[];}interface ManualTaxCalculatorUpdate extends ResourceUpdate{name?:string;tax_categories?:TaxCategoryRel[];tax_rules?:TaxRuleRel[];}declare class ManualTaxCalculators extends ApiResource{static readonly TYPE:'manual_tax_calculators';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ManualTaxCalculator>>;create(resource:ManualTaxCalculatorCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualTaxCalculator>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualTaxCalculator>;update(resource:ManualTaxCalculatorUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualTaxCalculator>;delete(id:string,options?:ResourcesConfig):Promise<void>;tax_categories(manualTaxCalculatorId:string|ManualTaxCalculator,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;markets(manualTaxCalculatorId:string|ManualTaxCalculator,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(manualTaxCalculatorId:string|ManualTaxCalculator,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;tax_rules(manualTaxCalculatorId:string|ManualTaxCalculator,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxRule>>;isManualTaxCalculator(resource:any):resource is ManualTaxCalculator;relationship(id:string|ResourceId|null):ManualTaxCalculatorRel;type():string;}export default ManualTaxCalculators;export{ManualTaxCalculator,ManualTaxCalculatorCreate,ManualTaxCalculatorUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class a extends c{static TYPE="manual_tax_calculators";async list(e,t){return this.resources.list({type:a.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:a.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:a.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:a.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:a.TYPE,id:e},t)}async tax_categories(e,t,r){const s=e.id||e;return this.resources.fetch({type:"tax_categories"},`manual_tax_calculators/${s}/tax_categories`,t,r)}async markets(e,t,r){const s=e.id||e;return this.resources.fetch({type:"markets"},`manual_tax_calculators/${s}/markets`,t,r)}async attachments(e,t,r){const s=e.id||e;return this.resources.fetch({type:"attachments"},`manual_tax_calculators/${s}/attachments`,t,r)}async tax_rules(e,t,r){const s=e.id||e;return this.resources.fetch({type:"tax_rules"},`manual_tax_calculators/${s}/tax_rules`,t,r)}isManualTaxCalculator(e){return e.type&&e.type===a.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:a.TYPE}:{id:e.id,type:a.TYPE}}type(){return a.TYPE}}export default a;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Merchant}from'./merchants';import type{PriceList}from'./price_lists';import type{InventoryModel}from'./inventory_models';import type{TaxCalculator}from'./tax_calculators';import type{CustomerGroup}from'./customer_groups';import type{Attachment}from'./attachments';declare type MarketRel=ResourceRel&{type:typeof Markets.TYPE;};declare type MerchantRel=ResourceRel&{type:'merchants';};declare type PriceListRel=ResourceRel&{type:'price_lists';};declare type InventoryModelRel=ResourceRel&{type:'inventory_models';};declare type TaxCalculatorRel=ResourceRel&{type:'tax_calculators';};declare type CustomerGroupRel=ResourceRel&{type:'customer_groups';};interface Market extends Resource{number?:number;name?:string;facebook_pixel_id?:string;checkout_url?:string;external_prices_url?:string;private?:boolean;merchant?:Merchant;price_list?:PriceList;inventory_model?:InventoryModel;tax_calculator?:TaxCalculator;customer_group?:CustomerGroup;attachments?:Attachment[];}interface MarketCreate extends ResourceCreate{name:string;facebook_pixel_id?:string;checkout_url?:string;external_prices_url?:string;merchant:MerchantRel;price_list:PriceListRel;inventory_model:InventoryModelRel;tax_calculator?:TaxCalculatorRel;customer_group?:CustomerGroupRel;}interface MarketUpdate extends ResourceUpdate{name?:string;facebook_pixel_id?:string;checkout_url?:string;external_prices_url?:string;merchant?:MerchantRel;price_list?:PriceListRel;inventory_model?:InventoryModelRel;tax_calculator?:TaxCalculatorRel;customer_group?:CustomerGroupRel;}declare class Markets extends ApiResource{static readonly TYPE:'markets';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;create(resource:MarketCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;update(resource:MarketUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;delete(id:string,options?:ResourcesConfig):Promise<void>;merchant(marketId:string|Market,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Merchant>;price_list(marketId:string|Market,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PriceList>;inventory_model(marketId:string|Market,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryModel>;tax_calculator(marketId:string|Market,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxCalculator>;customer_group(marketId:string|Market,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerGroup>;attachments(marketId:string|Market,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isMarket(resource:any):resource is Market;relationship(id:string|ResourceId|null):MarketRel;type():string;}export default Markets;export{Market,MarketCreate,MarketUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class a extends c{static TYPE="markets";async list(e,t){return this.resources.list({type:a.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:a.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:a.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:a.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:a.TYPE,id:e},t)}async merchant(e,t,r){const s=e.id||e;return this.resources.fetch({type:"merchants"},`markets/${s}/merchant`,t,r)}async price_list(e,t,r){const s=e.id||e;return this.resources.fetch({type:"price_lists"},`markets/${s}/price_list`,t,r)}async inventory_model(e,t,r){const s=e.id||e;return this.resources.fetch({type:"inventory_models"},`markets/${s}/inventory_model`,t,r)}async tax_calculator(e,t,r){const s=e.id||e;return this.resources.fetch({type:"tax_calculators"},`markets/${s}/tax_calculator`,t,r)}async customer_group(e,t,r){const s=e.id||e;return this.resources.fetch({type:"customer_groups"},`markets/${s}/customer_group`,t,r)}async attachments(e,t,r){const s=e.id||e;return this.resources.fetch({type:"attachments"},`markets/${s}/attachments`,t,r)}isMarket(e){return e.type&&e.type===a.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:a.TYPE}:{id:e.id,type:a.TYPE}}type(){return a.TYPE}}export default a;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Address}from'./addresses';import type{Attachment}from'./attachments';declare type MerchantRel=ResourceRel&{type:typeof Merchants.TYPE;};declare type AddressRel=ResourceRel&{type:'addresses';};interface Merchant extends Resource{name?:string;address?:Address;attachments?:Attachment[];}interface MerchantCreate extends ResourceCreate{name:string;address:AddressRel;}interface MerchantUpdate extends ResourceUpdate{name?:string;address?:AddressRel;}declare class Merchants extends ApiResource{static readonly TYPE:'merchants';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Merchant>>;create(resource:MerchantCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Merchant>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Merchant>;update(resource:MerchantUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Merchant>;delete(id:string,options?:ResourcesConfig):Promise<void>;address(merchantId:string|Merchant,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;attachments(merchantId:string|Merchant,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isMerchant(resource:any):resource is Merchant;relationship(id:string|ResourceId|null):MerchantRel;type():string;}export default Merchants;export{Merchant,MerchantCreate,MerchantUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class s extends c{static TYPE="merchants";async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async address(e,t,r){const a=e.id||e;return this.resources.fetch({type:"addresses"},`merchants/${a}/address`,t,r)}async attachments(e,t,r){const a=e.id||e;return this.resources.fetch({type:"attachments"},`merchants/${a}/attachments`,t,r)}isMerchant(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PercentageDiscountPromotion}from'./percentage_discount_promotions';import type{FreeShippingPromotion}from'./free_shipping_promotions';import type{FixedAmountPromotion}from'./fixed_amount_promotions';import type{FreeGiftPromotion}from'./free_gift_promotions';import type{FixedPricePromotion}from'./fixed_price_promotions';import type{ExternalPromotion}from'./external_promotions';declare type OrderAmountPromotionRuleRel=ResourceRel&{type:typeof OrderAmountPromotionRules.TYPE;};declare type PercentageDiscountPromotionRel=ResourceRel&{type:'percentage_discount_promotions';};declare type FreeShippingPromotionRel=ResourceRel&{type:'free_shipping_promotions';};declare type FixedAmountPromotionRel=ResourceRel&{type:'fixed_amount_promotions';};declare type FreeGiftPromotionRel=ResourceRel&{type:'free_gift_promotions';};declare type FixedPricePromotionRel=ResourceRel&{type:'fixed_price_promotions';};declare type ExternalPromotionRel=ResourceRel&{type:'external_promotions';};interface OrderAmountPromotionRule extends Resource{order_amount_cents?:number;order_amount_float?:number;formatted_order_amount?:string;promotion?:PercentageDiscountPromotion|FreeShippingPromotion|FixedAmountPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion;}interface OrderAmountPromotionRuleCreate extends ResourceCreate{order_amount_cents?:number;promotion:PercentageDiscountPromotionRel|FreeShippingPromotionRel|FixedAmountPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel;}interface OrderAmountPromotionRuleUpdate extends ResourceUpdate{order_amount_cents?:number;promotion?:PercentageDiscountPromotionRel|FreeShippingPromotionRel|FixedAmountPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel;}declare class OrderAmountPromotionRules extends ApiResource{static readonly TYPE:'order_amount_promotion_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderAmountPromotionRule>>;create(resource:OrderAmountPromotionRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;update(resource:OrderAmountPromotionRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;delete(id:string,options?:ResourcesConfig):Promise<void>;isOrderAmountPromotionRule(resource:any):resource is OrderAmountPromotionRule;relationship(id:string|ResourceId|null):OrderAmountPromotionRuleRel;type():string;}export default OrderAmountPromotionRules;export{OrderAmountPromotionRule,OrderAmountPromotionRuleCreate,OrderAmountPromotionRuleUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class t extends i{static TYPE="order_amount_promotion_rules";async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create({...e,type:t.TYPE},r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update({...e,type:t.TYPE},r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isOrderAmountPromotionRule(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}export default t;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{OrderSubscription}from'./order_subscriptions';declare type OrderCopyRel=ResourceRel&{type:typeof OrderCopies.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface OrderCopy extends Resource{status?:string;started_at?:string;completed_at?:string;failed_at?:string;place_target_order?:boolean;cancel_source_order?:boolean;reuse_wallet?:boolean;errors_log?:object;errors_count?:number;source_order?:Order;target_order?:Order;order_subscription?:OrderSubscription;}interface OrderCopyCreate extends ResourceCreate{place_target_order?:boolean;cancel_source_order?:boolean;reuse_wallet?:boolean;source_order:OrderRel;}declare class OrderCopies extends ApiResource{static readonly TYPE:'order_copies';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderCopy>>;create(resource:OrderCopyCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderCopy>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderCopy>;delete(id:string,options?:ResourcesConfig):Promise<void>;source_order(orderCopyId:string|OrderCopy,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;target_order(orderCopyId:string|OrderCopy,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;order_subscription(orderCopyId:string|OrderCopy,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;isOrderCopy(resource:any):resource is OrderCopy;relationship(id:string|ResourceId|null):OrderCopyRel;type():string;}export default OrderCopies;export{OrderCopy,OrderCopyCreate};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class t extends i{static TYPE="order_copies";async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create({...e,type:t.TYPE},r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}async source_order(e,r,s){const o=e.id||e;return this.resources.fetch({type:"orders"},`order_copies/${o}/source_order`,r,s)}async target_order(e,r,s){const o=e.id||e;return this.resources.fetch({type:"orders"},`order_copies/${o}/target_order`,r,s)}async order_subscription(e,r,s){const o=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`order_copies/${o}/order_subscription`,r,s)}isOrderCopy(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}export default t;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{Order}from'./orders';import type{Customer}from'./customers';import type{OrderCopy}from'./order_copies';declare type OrderSubscriptionRel=ResourceRel&{type:typeof OrderSubscriptions.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type OrderRel=ResourceRel&{type:'orders';};interface OrderSubscription extends Resource{number?:string;status?:string;frequency?:string;activate_by_source_order?:boolean;customer_email?:string;starts_at?:string;expires_at?:string;next_run_at?:string;occurrencies?:number;errors_count?:number;succeeded_on_last_run?:boolean;options?:object;market?:Market;source_order?:Order;customer?:Customer;order_copies?:OrderCopy[];orders?:Order[];}interface OrderSubscriptionCreate extends ResourceCreate{frequency:string;activate_by_source_order?:boolean;starts_at?:string;expires_at?:string;options?:object;market?:MarketRel;source_order:OrderRel;}interface OrderSubscriptionUpdate extends ResourceUpdate{expires_at?:string;_activate?:boolean;_deactivate?:boolean;_cancel?:boolean;}declare class OrderSubscriptions extends ApiResource{static readonly TYPE:'order_subscriptions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderSubscription>>;create(resource:OrderSubscriptionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;update(resource:OrderSubscriptionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;source_order(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;customer(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;order_copies(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderCopy>>;orders(orderSubscriptionId:string|OrderSubscription,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Order>>;isOrderSubscription(resource:any):resource is OrderSubscription;relationship(id:string|ResourceId|null):OrderSubscriptionRel;type():string;}export default OrderSubscriptions;export{OrderSubscription,OrderSubscriptionCreate,OrderSubscriptionUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class t extends c{static TYPE="order_subscriptions";async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create({...e,type:t.TYPE},r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update({...e,type:t.TYPE},r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}async market(e,r,s){const o=e.id||e;return this.resources.fetch({type:"markets"},`order_subscriptions/${o}/market`,r,s)}async source_order(e,r,s){const o=e.id||e;return this.resources.fetch({type:"orders"},`order_subscriptions/${o}/source_order`,r,s)}async customer(e,r,s){const o=e.id||e;return this.resources.fetch({type:"customers"},`order_subscriptions/${o}/customer`,r,s)}async order_copies(e,r,s){const o=e.id||e;return this.resources.fetch({type:"order_copies"},`order_subscriptions/${o}/order_copies`,r,s)}async orders(e,r,s){const o=e.id||e;return this.resources.fetch({type:"orders"},`order_subscriptions/${o}/orders`,r,s)}isOrderSubscription(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}export default t;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';declare type OrderValidationRuleRel=ResourceRel&{type:typeof OrderValidationRules.TYPE;};interface OrderValidationRule extends Resource{market?:Market;}declare class OrderValidationRules extends ApiResource{static readonly TYPE:'order_validation_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderValidationRule>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderValidationRule>;market(orderValidationRuleId:string|OrderValidationRule,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;isOrderValidationRule(resource:any):resource is OrderValidationRule;relationship(id:string|ResourceId|null):OrderValidationRuleRel;type():string;}export default OrderValidationRules;export{OrderValidationRule};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class t extends n{static TYPE="order_validation_rules";async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async market(e,r,s){const i=e.id||e;return this.resources.fetch({type:"markets"},`order_validation_rules/${i}/market`,r,s)}isOrderValidationRule(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}export default t;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{Customer}from'./customers';import type{Address}from'./addresses';import type{PaymentMethod}from'./payment_methods';import type{CustomerPaymentSource}from'./customer_payment_sources';import type{AdyenPayment}from'./adyen_payments';import type{BraintreePayment}from'./braintree_payments';import type{CheckoutComPayment}from'./checkout_com_payments';import type{ExternalPayment}from'./external_payments';import type{KlarnaPayment}from'./klarna_payments';import type{PaypalPayment}from'./paypal_payments';import type{StripePayment}from'./stripe_payments';import type{WireTransfer}from'./wire_transfers';import type{LineItem}from'./line_items';import type{Shipment}from'./shipments';import type{Authorization}from'./authorizations';import type{Void}from'./voids';import type{Capture}from'./captures';import type{Refund}from'./refunds';import type{OrderSubscription}from'./order_subscriptions';import type{OrderCopy}from'./order_copies';import type{Attachment}from'./attachments';declare type OrderRel=ResourceRel&{type:typeof Orders.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type CustomerRel=ResourceRel&{type:'customers';};declare type AddressRel=ResourceRel&{type:'addresses';};declare type PaymentMethodRel=ResourceRel&{type:'payment_methods';};declare type AdyenPaymentRel=ResourceRel&{type:'adyen_payments';};declare type BraintreePaymentRel=ResourceRel&{type:'braintree_payments';};declare type CheckoutComPaymentRel=ResourceRel&{type:'checkout_com_payments';};declare type ExternalPaymentRel=ResourceRel&{type:'external_payments';};declare type KlarnaPaymentRel=ResourceRel&{type:'klarna_payments';};declare type PaypalPaymentRel=ResourceRel&{type:'paypal_payments';};declare type StripePaymentRel=ResourceRel&{type:'stripe_payments';};declare type WireTransferRel=ResourceRel&{type:'wire_transfers';};interface Order extends Resource{number?:number;autorefresh?:boolean;status?:string;payment_status?:string;fulfillment_status?:string;guest?:boolean;editable?:boolean;customer_email?:string;language_code?:string;currency_code?:string;tax_included?:boolean;tax_rate?:number;freight_taxable?:boolean;requires_billing_info?:boolean;country_code?:string;shipping_country_code_lock?:string;coupon_code?:string;gift_card_code?:string;gift_card_or_coupon_code?:string;subtotal_amount_cents?:number;subtotal_amount_float?:number;formatted_subtotal_amount?:string;shipping_amount_cents?:number;shipping_amount_float?:number;formatted_shipping_amount?:string;payment_method_amount_cents?:number;payment_method_amount_float?:number;formatted_payment_method_amount?:string;discount_amount_cents?:number;discount_amount_float?:number;formatted_discount_amount?:string;adjustment_amount_cents?:number;adjustment_amount_float?:number;formatted_adjustment_amount?:string;gift_card_amount_cents?:number;gift_card_amount_float?:number;formatted_gift_card_amount?:string;total_tax_amount_cents?:number;total_tax_amount_float?:number;formatted_total_tax_amount?:string;subtotal_tax_amount_cents?:number;subtotal_tax_amount_float?:number;formatted_subtotal_tax_amount?:string;shipping_tax_amount_cents?:number;shipping_tax_amount_float?:number;formatted_shipping_tax_amount?:string;payment_method_tax_amount_cents?:number;payment_method_tax_amount_float?:number;formatted_payment_method_tax_amount?:string;adjustment_tax_amount_cents?:number;adjustment_tax_amount_float?:number;formatted_adjustment_tax_amount?:string;total_amount_cents?:number;total_amount_float?:number;formatted_total_amount?:string;total_taxable_amount_cents?:number;total_taxable_amount_float?:number;formatted_total_taxable_amount?:string;subtotal_taxable_amount_cents?:number;subtotal_taxable_amount_float?:number;formatted_subtotal_taxable_amount?:string;shipping_taxable_amount_cents?:number;shipping_taxable_amount_float?:number;formatted_shipping_taxable_amount?:string;payment_method_taxable_amount_cents?:number;payment_method_taxable_amount_float?:number;formatted_payment_method_taxable_amount?:string;adjustment_taxable_amount_cents?:number;adjustment_taxable_amount_float?:number;formatted_adjustment_taxable_amount?:string;total_amount_with_taxes_cents?:number;total_amount_with_taxes_float?:number;formatted_total_amount_with_taxes?:string;fees_amount_cents?:number;fees_amount_float?:number;formatted_fees_amount?:string;duty_amount_cents?:number;duty_amount_float?:number;formatted_duty_amount?:string;skus_count?:number;line_item_options_count?:number;shipments_count?:number;payment_source_details?:object;token?:string;cart_url?:string;return_url?:string;terms_url?:string;privacy_url?:string;checkout_url?:string;placed_at?:string;approved_at?:string;cancelled_at?:string;payment_updated_at?:string;fulfillment_updated_at?:string;refreshed_at?:string;archived_at?:string;expires_at?:string;market?:Market;customer?:Customer;shipping_address?:Address;billing_address?:Address;available_payment_methods?:PaymentMethod[];available_customer_payment_sources?:CustomerPaymentSource[];payment_method?:PaymentMethod;payment_source?:AdyenPayment|BraintreePayment|CheckoutComPayment|ExternalPayment|KlarnaPayment|PaypalPayment|StripePayment|WireTransfer;line_items?:LineItem[];shipments?:Shipment[];transactions?:(Authorization|Void|Capture|Refund)[];authorizations?:Authorization[];captures?:Capture[];voids?:Void[];refunds?:Refund[];order_subscriptions?:OrderSubscription[];order_copies?:OrderCopy[];attachments?:Attachment[];}interface OrderCreate extends ResourceCreate{autorefresh?:boolean;guest?:boolean;customer_email?:string;customer_password?:string;language_code?:string;shipping_country_code_lock?:string;coupon_code?:string;gift_card_code?:string;gift_card_or_coupon_code?:string;cart_url?:string;return_url?:string;terms_url?:string;privacy_url?:string;market?:MarketRel;customer?:CustomerRel;shipping_address?:AddressRel;billing_address?:AddressRel;payment_method?:PaymentMethodRel;payment_source?:AdyenPaymentRel|BraintreePaymentRel|CheckoutComPaymentRel|ExternalPaymentRel|KlarnaPaymentRel|PaypalPaymentRel|StripePaymentRel|WireTransferRel;}interface OrderUpdate extends ResourceUpdate{autorefresh?:boolean;guest?:boolean;customer_email?:string;customer_password?:string;language_code?:string;shipping_country_code_lock?:string;coupon_code?:string;gift_card_code?:string;gift_card_or_coupon_code?:string;cart_url?:string;return_url?:string;terms_url?:string;privacy_url?:string;_archive?:boolean;_unarchive?:boolean;_place?:boolean;_cancel?:boolean;_approve?:boolean;_approve_and_capture?:boolean;_authorize?:boolean;_authorization_amount_cents?:number;_capture?:boolean;_refund?:boolean;_update_taxes?:boolean;_billing_address_clone_id?:string;_shipping_address_clone_id?:string;_customer_payment_source_id?:string;_shipping_address_same_as_billing?:boolean;_billing_address_same_as_shipping?:boolean;_save_payment_source_to_customer_wallet?:boolean;_save_shipping_address_to_customer_address_book?:boolean;_save_billing_address_to_customer_address_book?:boolean;_refresh?:boolean;market?:MarketRel;customer?:CustomerRel;shipping_address?:AddressRel;billing_address?:AddressRel;payment_method?:PaymentMethodRel;payment_source?:AdyenPaymentRel|BraintreePaymentRel|CheckoutComPaymentRel|ExternalPaymentRel|KlarnaPaymentRel|PaypalPaymentRel|StripePaymentRel|WireTransferRel;}declare class Orders extends ApiResource{static readonly TYPE:'orders';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Order>>;create(resource:OrderCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;update(resource:OrderUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;customer(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;shipping_address(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;billing_address(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;available_payment_methods(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;available_customer_payment_sources(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CustomerPaymentSource>>;payment_method(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentMethod>;line_items(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItem>>;shipments(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Shipment>>;authorizations(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Authorization>>;captures(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;voids(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;refunds(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Refund>>;order_subscriptions(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderSubscription>>;order_copies(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderCopy>>;attachments(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isOrder(resource:any):resource is Order;relationship(id:string|ResourceId|null):OrderRel;type():string;}export default Orders;export{Order,OrderCreate,OrderUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as o}from"../resource";class c extends o{static TYPE="orders";async list(e,t){return this.resources.list({type:c.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:c.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:c.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:c.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:c.TYPE,id:e},t)}async market(e,t,r){const s=e.id||e;return this.resources.fetch({type:"markets"},`orders/${s}/market`,t,r)}async customer(e,t,r){const s=e.id||e;return this.resources.fetch({type:"customers"},`orders/${s}/customer`,t,r)}async shipping_address(e,t,r){const s=e.id||e;return this.resources.fetch({type:"addresses"},`orders/${s}/shipping_address`,t,r)}async billing_address(e,t,r){const s=e.id||e;return this.resources.fetch({type:"addresses"},`orders/${s}/billing_address`,t,r)}async available_payment_methods(e,t,r){const s=e.id||e;return this.resources.fetch({type:"payment_methods"},`orders/${s}/available_payment_methods`,t,r)}async available_customer_payment_sources(e,t,r){const s=e.id||e;return this.resources.fetch({type:"customer_payment_sources"},`orders/${s}/available_customer_payment_sources`,t,r)}async payment_method(e,t,r){const s=e.id||e;return this.resources.fetch({type:"payment_methods"},`orders/${s}/payment_method`,t,r)}async line_items(e,t,r){const s=e.id||e;return this.resources.fetch({type:"line_items"},`orders/${s}/line_items`,t,r)}async shipments(e,t,r){const s=e.id||e;return this.resources.fetch({type:"shipments"},`orders/${s}/shipments`,t,r)}async authorizations(e,t,r){const s=e.id||e;return this.resources.fetch({type:"authorizations"},`orders/${s}/authorizations`,t,r)}async captures(e,t,r){const s=e.id||e;return this.resources.fetch({type:"captures"},`orders/${s}/captures`,t,r)}async voids(e,t,r){const s=e.id||e;return this.resources.fetch({type:"voids"},`orders/${s}/voids`,t,r)}async refunds(e,t,r){const s=e.id||e;return this.resources.fetch({type:"refunds"},`orders/${s}/refunds`,t,r)}async order_subscriptions(e,t,r){const s=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`orders/${s}/order_subscriptions`,t,r)}async order_copies(e,t,r){const s=e.id||e;return this.resources.fetch({type:"order_copies"},`orders/${s}/order_copies`,t,r)}async attachments(e,t,r){const s=e.id||e;return this.resources.fetch({type:"attachments"},`orders/${s}/attachments`,t,r)}isOrder(e){return e.type&&e.type===c.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:c.TYPE}:{id:e.id,type:c.TYPE}}type(){return c.TYPE}}export default c;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';declare type OrganizationRel=ResourceRel&{type:typeof Organizations.TYPE;};interface Organization extends Resource{name?:string;slug?:string;domain?:string;support_phone?:string;support_email?:string;logo_url?:string;favicon_url?:string;primary_color?:string;contrast_color?:string;gtm_id?:string;gtm_id_test?:string;discount_disabled?:boolean;account_disabled?:boolean;acceptance_disabled?:boolean;max_concurrent_promotions?:number;max_concurrent_imports?:number;}declare class Organizations extends ApiResource{static readonly TYPE:'organization';retrieve(params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Organization>;isOrganization(resource:any):resource is Organization;relationship(id:string|ResourceId|null):OrganizationRel;type():string;}export default Organizations;export{Organization};
@@ -1 +0,0 @@
1
- import{ApiResource as r}from"../resource";class e extends r{static TYPE="organization";async retrieve(t,i){return this.resources.singleton({type:e.TYPE},t,i)}isOrganization(t){return t.type&&t.type===e.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:e.TYPE}:{id:t.id,type:e.TYPE}}type(){return e.TYPE}}export default e;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{StockLocation}from'./stock_locations';import type{Parcel}from'./parcels';import type{Attachment}from'./attachments';declare type PackageRel=ResourceRel&{type:typeof Packages.TYPE;};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};interface Package extends Resource{name?:string;code?:string;length?:number;width?:number;height?:number;unit_of_length?:string;stock_location?:StockLocation;parcels?:Parcel[];attachments?:Attachment[];}interface PackageCreate extends ResourceCreate{name:string;code?:string;length:number;width:number;height:number;unit_of_length:string;stock_location:StockLocationRel;}interface PackageUpdate extends ResourceUpdate{name?:string;code?:string;length?:number;width?:number;height?:number;unit_of_length?:string;stock_location?:StockLocationRel;}declare class Packages extends ApiResource{static readonly TYPE:'packages';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Package>>;create(resource:PackageCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Package>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Package>;update(resource:PackageUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Package>;delete(id:string,options?:ResourcesConfig):Promise<void>;stock_location(packageId:string|Package,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;parcels(packageId:string|Package,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Parcel>>;attachments(packageId:string|Package,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isPackage(resource:any):resource is Package;relationship(id:string|ResourceId|null):PackageRel;type():string;}export default Packages;export{Package,PackageCreate,PackageUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class r extends c{static TYPE="packages";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async stock_location(e,t,s){const a=e.id||e;return this.resources.fetch({type:"stock_locations"},`packages/${a}/stock_location`,t,s)}async parcels(e,t,s){const a=e.id||e;return this.resources.fetch({type:"parcels"},`packages/${a}/parcels`,t,s)}async attachments(e,t,s){const a=e.id||e;return this.resources.fetch({type:"attachments"},`packages/${a}/attachments`,t,s)}isPackage(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Parcel}from'./parcels';import type{StockLineItem}from'./stock_line_items';declare type ParcelLineItemRel=ResourceRel&{type:typeof ParcelLineItems.TYPE;};declare type ParcelRel=ResourceRel&{type:'parcels';};declare type StockLineItemRel=ResourceRel&{type:'stock_line_items';};interface ParcelLineItem extends Resource{sku_code?:string;quantity?:number;parcel?:Parcel;stock_line_item?:StockLineItem;shipment_line_item?:object;}interface ParcelLineItemCreate extends ResourceCreate{sku_code?:string;quantity:number;parcel:ParcelRel;stock_line_item:StockLineItemRel;shipment_line_item?:object;}declare type ParcelLineItemUpdate=ResourceUpdate;declare class ParcelLineItems extends ApiResource{static readonly TYPE:'parcel_line_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ParcelLineItem>>;create(resource:ParcelLineItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ParcelLineItem>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ParcelLineItem>;update(resource:ParcelLineItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ParcelLineItem>;delete(id:string,options?:ResourcesConfig):Promise<void>;parcel(parcelLineItemId:string|ParcelLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Parcel>;stock_line_item(parcelLineItemId:string|ParcelLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLineItem>;isParcelLineItem(resource:any):resource is ParcelLineItem;relationship(id:string|ResourceId|null):ParcelLineItemRel;type():string;}export default ParcelLineItems;export{ParcelLineItem,ParcelLineItemCreate,ParcelLineItemUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class r extends c{static TYPE="parcel_line_items";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,i){return this.resources.create({...e,type:r.TYPE},t,i)}async retrieve(e,t,i){return this.resources.retrieve({type:r.TYPE,id:e},t,i)}async update(e,t,i){return this.resources.update({...e,type:r.TYPE},t,i)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async parcel(e,t,i){const s=e.id||e;return this.resources.fetch({type:"parcels"},`parcel_line_items/${s}/parcel`,t,i)}async stock_line_item(e,t,i){const s=e.id||e;return this.resources.fetch({type:"stock_line_items"},`parcel_line_items/${s}/stock_line_item`,t,i)}isParcelLineItem(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Shipment}from'./shipments';import type{Package}from'./packages';import type{ParcelLineItem}from'./parcel_line_items';import type{Attachment}from'./attachments';declare type ParcelRel=ResourceRel&{type:typeof Parcels.TYPE;};declare type ShipmentRel=ResourceRel&{type:'shipments';};declare type PackageRel=ResourceRel&{type:'packages';};interface Parcel extends Resource{number?:string;weight?:number;unit_of_weight?:string;eel_pfc?:string;contents_type?:string;contents_explanation?:string;customs_certify?:boolean;customs_signer?:string;non_delivery_option?:string;restriction_type?:string;restriction_comments?:string;customs_info_required?:boolean;shipping_label_url?:string;shipping_label_file_type?:string;shipping_label_size?:string;shipping_label_resolution?:string;tracking_number?:string;tracking_status?:string;tracking_status_detail?:string;tracking_status_updated_at?:string;tracking_details?:string;carrier_weight_oz?:string;signed_by?:string;incoterm?:string;shipment?:Shipment;package?:Package;parcel_line_items?:ParcelLineItem[];attachments?:Attachment[];}interface ParcelCreate extends ResourceCreate{weight?:number;unit_of_weight?:string;eel_pfc?:string;contents_type?:string;contents_explanation?:string;customs_certify?:boolean;customs_signer?:string;non_delivery_option?:string;restriction_type?:string;restriction_comments?:string;customs_info_required?:boolean;tracking_number?:string;tracking_status?:string;tracking_status_detail?:string;tracking_status_updated_at?:string;tracking_details?:string;carrier_weight_oz?:string;signed_by?:string;incoterm?:string;shipment:ShipmentRel;package:PackageRel;}interface ParcelUpdate extends ResourceUpdate{weight?:number;unit_of_weight?:string;eel_pfc?:string;contents_type?:string;contents_explanation?:string;customs_certify?:boolean;customs_signer?:string;non_delivery_option?:string;restriction_type?:string;restriction_comments?:string;customs_info_required?:boolean;tracking_number?:string;tracking_status?:string;tracking_status_detail?:string;tracking_status_updated_at?:string;tracking_details?:string;carrier_weight_oz?:string;signed_by?:string;incoterm?:string;shipment?:ShipmentRel;package?:PackageRel;}declare class Parcels extends ApiResource{static readonly TYPE:'parcels';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Parcel>>;create(resource:ParcelCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Parcel>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Parcel>;update(resource:ParcelUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Parcel>;delete(id:string,options?:ResourcesConfig):Promise<void>;shipment(parcelId:string|Parcel,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;package(parcelId:string|Parcel,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Package>;parcel_line_items(parcelId:string|Parcel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ParcelLineItem>>;attachments(parcelId:string|Parcel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isParcel(resource:any):resource is Parcel;relationship(id:string|ResourceId|null):ParcelRel;type():string;}export default Parcels;export{Parcel,ParcelCreate,ParcelUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as a}from"../resource";class r extends a{static TYPE="parcels";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async shipment(e,t,s){const c=e.id||e;return this.resources.fetch({type:"shipments"},`parcels/${c}/shipment`,t,s)}async package(e,t,s){const c=e.id||e;return this.resources.fetch({type:"packages"},`parcels/${c}/package`,t,s)}async parcel_line_items(e,t,s){const c=e.id||e;return this.resources.fetch({type:"parcel_line_items"},`parcels/${c}/parcel_line_items`,t,s)}async attachments(e,t,s){const c=e.id||e;return this.resources.fetch({type:"attachments"},`parcels/${c}/attachments`,t,s)}isParcel(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';declare type PaymentGatewayRel=ResourceRel&{type:typeof PaymentGateways.TYPE;};interface PaymentGateway extends Resource{name?:string;payment_methods?:PaymentMethod[];}declare class PaymentGateways extends ApiResource{static readonly TYPE:'payment_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentGateway>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;payment_methods(paymentGatewayId:string|PaymentGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;isPaymentGateway(resource:any):resource is PaymentGateway;relationship(id:string|ResourceId|null):PaymentGatewayRel;type():string;}export default PaymentGateways;export{PaymentGateway};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class t extends n{static TYPE="payment_gateways";async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async payment_methods(e,s,r){const y=e.id||e;return this.resources.fetch({type:"payment_methods"},`payment_gateways/${y}/payment_methods`,s,r)}isPaymentGateway(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}export default t;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{PaymentGateway}from'./payment_gateways';import type{Attachment}from'./attachments';declare type PaymentMethodRel=ResourceRel&{type:typeof PaymentMethods.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type PaymentGatewayRel=ResourceRel&{type:'payment_gateways';};interface PaymentMethod extends Resource{payment_source_type?:string;name?:string;currency_code?:string;moto?:boolean;disabled_at?:string;price_amount_cents?:number;price_amount_float?:number;formatted_price_amount?:string;market?:Market;payment_gateway?:PaymentGateway;attachments?:Attachment[];}interface PaymentMethodCreate extends ResourceCreate{payment_source_type:string;currency_code?:string;moto?:boolean;price_amount_cents:number;market?:MarketRel;payment_gateway:PaymentGatewayRel;}interface PaymentMethodUpdate extends ResourceUpdate{payment_source_type?:string;currency_code?:string;moto?:boolean;price_amount_cents?:number;market?:MarketRel;payment_gateway?:PaymentGatewayRel;}declare class PaymentMethods extends ApiResource{static readonly TYPE:'payment_methods';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;create(resource:PaymentMethodCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentMethod>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentMethod>;update(resource:PaymentMethodUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentMethod>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(paymentMethodId:string|PaymentMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;payment_gateway(paymentMethodId:string|PaymentMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;attachments(paymentMethodId:string|PaymentMethod,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isPaymentMethod(resource:any):resource is PaymentMethod;relationship(id:string|ResourceId|null):PaymentMethodRel;type():string;}export default PaymentMethods;export{PaymentMethod,PaymentMethodCreate,PaymentMethodUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class s extends n{static TYPE="payment_methods";async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async market(e,t,r){const a=e.id||e;return this.resources.fetch({type:"markets"},`payment_methods/${a}/market`,t,r)}async payment_gateway(e,t,r){const a=e.id||e;return this.resources.fetch({type:"payment_gateways"},`payment_methods/${a}/payment_gateway`,t,r)}async attachments(e,t,r){const a=e.id||e;return this.resources.fetch({type:"attachments"},`payment_methods/${a}/attachments`,t,r)}isPaymentMethod(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{PaypalPayment}from'./paypal_payments';declare type PaypalGatewayRel=ResourceRel&{type:typeof PaypalGateways.TYPE;};interface PaypalGateway extends Resource{name?:string;payment_methods?:PaymentMethod[];paypal_payments?:PaypalPayment[];}interface PaypalGatewayCreate extends ResourceCreate{name:string;client_id:string;client_secret:string;}interface PaypalGatewayUpdate extends ResourceUpdate{name?:string;client_id?:string;client_secret?:string;}declare class PaypalGateways extends ApiResource{static readonly TYPE:'paypal_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaypalGateway>>;create(resource:PaypalGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaypalGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaypalGateway>;update(resource:PaypalGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaypalGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(paypalGatewayId:string|PaypalGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;paypal_payments(paypalGatewayId:string|PaypalGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaypalPayment>>;isPaypalGateway(resource:any):resource is PaypalGateway;relationship(id:string|ResourceId|null):PaypalGatewayRel;type():string;}export default PaypalGateways;export{PaypalGateway,PaypalGatewayCreate,PaypalGatewayUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as p}from"../resource";class a extends p{static TYPE="paypal_gateways";async list(e,t){return this.resources.list({type:a.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:a.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:a.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:a.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:a.TYPE,id:e},t)}async payment_methods(e,t,r){const s=e.id||e;return this.resources.fetch({type:"payment_methods"},`paypal_gateways/${s}/payment_methods`,t,r)}async paypal_payments(e,t,r){const s=e.id||e;return this.resources.fetch({type:"paypal_payments"},`paypal_gateways/${s}/paypal_payments`,t,r)}isPaypalGateway(e){return e.type&&e.type===a.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:a.TYPE}:{id:e.id,type:a.TYPE}}type(){return a.TYPE}}export default a;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';declare type PaypalPaymentRel=ResourceRel&{type:typeof PaypalPayments.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface PaypalPayment extends Resource{return_url?:string;cancel_url?:string;note_to_payer?:string;paypal_payer_id?:string;name?:string;paypal_id?:string;status?:string;approval_url?:string;mismatched_amounts?:boolean;intent_amount_cents?:number;intent_amount_float?:number;formatted_intent_amount?:string;order?:Order;payment_gateway?:PaymentGateway;}interface PaypalPaymentCreate extends ResourceCreate{return_url:string;cancel_url:string;note_to_payer?:string;order:OrderRel;}interface PaypalPaymentUpdate extends ResourceUpdate{paypal_payer_id?:string;order?:OrderRel;}declare class PaypalPayments extends ApiResource{static readonly TYPE:'paypal_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaypalPayment>>;create(resource:PaypalPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaypalPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaypalPayment>;update(resource:PaypalPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaypalPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(paypalPaymentId:string|PaypalPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(paypalPaymentId:string|PaypalPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isPaypalPayment(resource:any):resource is PaypalPayment;relationship(id:string|ResourceId|null):PaypalPaymentRel;type():string;}export default PaypalPayments;export{PaypalPayment,PaypalPaymentCreate,PaypalPaymentUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as y}from"../resource";class r extends y{static TYPE="paypal_payments";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,a){return this.resources.create({...e,type:r.TYPE},t,a)}async retrieve(e,t,a){return this.resources.retrieve({type:r.TYPE,id:e},t,a)}async update(e,t,a){return this.resources.update({...e,type:r.TYPE},t,a)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,a){const s=e.id||e;return this.resources.fetch({type:"orders"},`paypal_payments/${s}/order`,t,a)}async payment_gateway(e,t,a){const s=e.id||e;return this.resources.fetch({type:"payment_gateways"},`paypal_payments/${s}/payment_gateway`,t,a)}isPaypalPayment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;