@commercelayer/sdk 5.0.0-alpha.5 → 5.0.0-beta.10

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 +128 -0
  3. package/lib/cjs/api.js +342 -0
  4. package/lib/cjs/client.d.ts +33 -0
  5. package/lib/cjs/client.js +126 -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 +12 -0
  10. package/lib/cjs/config.d.ts +12 -0
  11. package/lib/cjs/config.js +14 -0
  12. package/lib/cjs/debug.d.ts +3 -0
  13. package/lib/cjs/debug.js +38 -0
  14. package/lib/cjs/error.d.ts +28 -0
  15. package/lib/cjs/error.js +40 -0
  16. package/lib/cjs/index.d.ts +8 -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 +86 -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 +25 -0
  25. package/lib/cjs/query.js +52 -0
  26. package/lib/cjs/resource.d.ts +87 -0
  27. package/lib/cjs/resource.js +170 -0
  28. package/lib/cjs/resources/addresses.d.ts +88 -0
  29. package/lib/cjs/resources/addresses.js +29 -0
  30. package/lib/cjs/resources/adjustments.d.ts +35 -0
  31. package/lib/cjs/resources/adjustments.js +25 -0
  32. package/lib/cjs/resources/adyen_gateways.d.ts +56 -0
  33. package/lib/cjs/resources/adyen_gateways.js +33 -0
  34. package/lib/cjs/resources/adyen_payments.d.ts +46 -0
  35. package/lib/cjs/resources/adyen_payments.js +33 -0
  36. package/lib/cjs/resources/application.d.ts +21 -0
  37. package/lib/cjs/resources/application.js +16 -0
  38. package/lib/cjs/resources/attachments.d.ts +156 -0
  39. package/lib/cjs/resources/attachments.js +25 -0
  40. package/lib/cjs/resources/authorizations.d.ts +60 -0
  41. package/lib/cjs/resources/authorizations.js +35 -0
  42. package/lib/cjs/resources/avalara_accounts.d.ts +55 -0
  43. package/lib/cjs/resources/avalara_accounts.js +37 -0
  44. package/lib/cjs/resources/axerve_gateways.d.ts +43 -0
  45. package/lib/cjs/resources/axerve_gateways.js +33 -0
  46. package/lib/cjs/resources/axerve_payments.d.ts +46 -0
  47. package/lib/cjs/resources/axerve_payments.js +33 -0
  48. package/lib/cjs/resources/billing_info_validation_rules.d.ts +35 -0
  49. package/lib/cjs/resources/billing_info_validation_rules.js +33 -0
  50. package/lib/cjs/resources/bing_geocoders.d.ts +35 -0
  51. package/lib/cjs/resources/bing_geocoders.js +33 -0
  52. package/lib/cjs/resources/braintree_gateways.d.ts +56 -0
  53. package/lib/cjs/resources/braintree_gateways.js +33 -0
  54. package/lib/cjs/resources/braintree_payments.d.ts +48 -0
  55. package/lib/cjs/resources/braintree_payments.js +33 -0
  56. package/lib/cjs/resources/bundles.d.ts +76 -0
  57. package/lib/cjs/resources/bundles.js +41 -0
  58. package/lib/cjs/resources/captures.d.ts +51 -0
  59. package/lib/cjs/resources/captures.js +35 -0
  60. package/lib/cjs/resources/carrier_accounts.d.ts +26 -0
  61. package/lib/cjs/resources/carrier_accounts.js +24 -0
  62. package/lib/cjs/resources/checkout_com_gateways.d.ts +45 -0
  63. package/lib/cjs/resources/checkout_com_gateways.js +33 -0
  64. package/lib/cjs/resources/checkout_com_payments.d.ts +59 -0
  65. package/lib/cjs/resources/checkout_com_payments.js +33 -0
  66. package/lib/cjs/resources/cleanups.d.ts +36 -0
  67. package/lib/cjs/resources/cleanups.js +26 -0
  68. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +59 -0
  69. package/lib/cjs/resources/coupon_codes_promotion_rules.js +29 -0
  70. package/lib/cjs/resources/coupon_recipients.d.ts +44 -0
  71. package/lib/cjs/resources/coupon_recipients.js +33 -0
  72. package/lib/cjs/resources/coupons.d.ts +45 -0
  73. package/lib/cjs/resources/coupons.js +29 -0
  74. package/lib/cjs/resources/customer_addresses.d.ts +44 -0
  75. package/lib/cjs/resources/customer_addresses.js +37 -0
  76. package/lib/cjs/resources/customer_groups.d.ts +36 -0
  77. package/lib/cjs/resources/customer_groups.js +37 -0
  78. package/lib/cjs/resources/customer_password_resets.d.ts +36 -0
  79. package/lib/cjs/resources/customer_password_resets.js +33 -0
  80. package/lib/cjs/resources/customer_payment_sources.d.ts +78 -0
  81. package/lib/cjs/resources/customer_payment_sources.js +29 -0
  82. package/lib/cjs/resources/customer_subscriptions.d.ts +31 -0
  83. package/lib/cjs/resources/customer_subscriptions.js +33 -0
  84. package/lib/cjs/resources/customers.d.ts +66 -0
  85. package/lib/cjs/resources/customers.js +65 -0
  86. package/lib/cjs/resources/delivery_lead_times.d.ts +51 -0
  87. package/lib/cjs/resources/delivery_lead_times.js +37 -0
  88. package/lib/cjs/resources/event_callbacks.d.ts +24 -0
  89. package/lib/cjs/resources/event_callbacks.js +20 -0
  90. package/lib/cjs/resources/events.d.ts +24 -0
  91. package/lib/cjs/resources/events.js +24 -0
  92. package/lib/cjs/resources/exports.d.ts +40 -0
  93. package/lib/cjs/resources/exports.js +26 -0
  94. package/lib/cjs/resources/external_gateways.d.ts +49 -0
  95. package/lib/cjs/resources/external_gateways.js +33 -0
  96. package/lib/cjs/resources/external_payments.d.ts +44 -0
  97. package/lib/cjs/resources/external_payments.js +37 -0
  98. package/lib/cjs/resources/external_promotions.d.ts +90 -0
  99. package/lib/cjs/resources/external_promotions.js +49 -0
  100. package/lib/cjs/resources/external_tax_calculators.d.ts +37 -0
  101. package/lib/cjs/resources/external_tax_calculators.js +33 -0
  102. package/lib/cjs/resources/fixed_amount_promotions.d.ts +91 -0
  103. package/lib/cjs/resources/fixed_amount_promotions.js +49 -0
  104. package/lib/cjs/resources/fixed_price_promotions.d.ts +102 -0
  105. package/lib/cjs/resources/fixed_price_promotions.js +57 -0
  106. package/lib/cjs/resources/free_gift_promotions.d.ts +100 -0
  107. package/lib/cjs/resources/free_gift_promotions.js +57 -0
  108. package/lib/cjs/resources/free_shipping_promotions.d.ts +83 -0
  109. package/lib/cjs/resources/free_shipping_promotions.js +45 -0
  110. package/lib/cjs/resources/geocoders.d.ts +24 -0
  111. package/lib/cjs/resources/geocoders.js +24 -0
  112. package/lib/cjs/resources/gift_card_recipients.d.ts +44 -0
  113. package/lib/cjs/resources/gift_card_recipients.js +33 -0
  114. package/lib/cjs/resources/gift_cards.d.ts +85 -0
  115. package/lib/cjs/resources/gift_cards.js +41 -0
  116. package/lib/cjs/resources/google_geocoders.d.ts +35 -0
  117. package/lib/cjs/resources/google_geocoders.js +33 -0
  118. package/lib/cjs/resources/imports.d.ts +45 -0
  119. package/lib/cjs/resources/imports.js +26 -0
  120. package/lib/cjs/resources/in_stock_subscriptions.d.ts +62 -0
  121. package/lib/cjs/resources/in_stock_subscriptions.js +41 -0
  122. package/lib/cjs/resources/inventory_models.d.ts +42 -0
  123. package/lib/cjs/resources/inventory_models.js +37 -0
  124. package/lib/cjs/resources/inventory_return_locations.d.ts +43 -0
  125. package/lib/cjs/resources/inventory_return_locations.js +33 -0
  126. package/lib/cjs/resources/inventory_stock_locations.d.ts +46 -0
  127. package/lib/cjs/resources/inventory_stock_locations.js +33 -0
  128. package/lib/cjs/resources/klarna_gateways.d.ts +44 -0
  129. package/lib/cjs/resources/klarna_gateways.js +33 -0
  130. package/lib/cjs/resources/klarna_payments.d.ts +46 -0
  131. package/lib/cjs/resources/klarna_payments.js +33 -0
  132. package/lib/cjs/resources/line_item_options.d.ts +57 -0
  133. package/lib/cjs/resources/line_item_options.js +33 -0
  134. package/lib/cjs/resources/line_items.d.ts +126 -0
  135. package/lib/cjs/resources/line_items.js +41 -0
  136. package/lib/cjs/resources/manual_gateways.d.ts +30 -0
  137. package/lib/cjs/resources/manual_gateways.js +29 -0
  138. package/lib/cjs/resources/manual_tax_calculators.d.ts +41 -0
  139. package/lib/cjs/resources/manual_tax_calculators.js +37 -0
  140. package/lib/cjs/resources/markets.d.ts +88 -0
  141. package/lib/cjs/resources/markets.js +49 -0
  142. package/lib/cjs/resources/merchants.d.ts +38 -0
  143. package/lib/cjs/resources/merchants.js +33 -0
  144. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +56 -0
  145. package/lib/cjs/resources/order_amount_promotion_rules.js +25 -0
  146. package/lib/cjs/resources/order_copies.d.ts +48 -0
  147. package/lib/cjs/resources/order_copies.js +38 -0
  148. package/lib/cjs/resources/order_subscriptions.d.ts +70 -0
  149. package/lib/cjs/resources/order_subscriptions.js +49 -0
  150. package/lib/cjs/resources/order_validation_rules.d.ts +23 -0
  151. package/lib/cjs/resources/order_validation_rules.js +24 -0
  152. package/lib/cjs/resources/orders.d.ts +296 -0
  153. package/lib/cjs/resources/orders.js +105 -0
  154. package/lib/cjs/resources/organization.d.ts +32 -0
  155. package/lib/cjs/resources/organization.js +16 -0
  156. package/lib/cjs/resources/packages.d.ts +56 -0
  157. package/lib/cjs/resources/packages.js +37 -0
  158. package/lib/cjs/resources/parcel_line_items.d.ts +51 -0
  159. package/lib/cjs/resources/parcel_line_items.js +33 -0
  160. package/lib/cjs/resources/parcels.d.ts +119 -0
  161. package/lib/cjs/resources/parcels.js +45 -0
  162. package/lib/cjs/resources/payment_gateways.d.ts +21 -0
  163. package/lib/cjs/resources/payment_gateways.js +20 -0
  164. package/lib/cjs/resources/payment_methods.d.ts +72 -0
  165. package/lib/cjs/resources/payment_methods.js +37 -0
  166. package/lib/cjs/resources/paypal_gateways.d.ts +37 -0
  167. package/lib/cjs/resources/paypal_gateways.js +33 -0
  168. package/lib/cjs/resources/paypal_payments.d.ts +52 -0
  169. package/lib/cjs/resources/paypal_payments.js +33 -0
  170. package/lib/cjs/resources/percentage_discount_promotions.d.ts +100 -0
  171. package/lib/cjs/resources/percentage_discount_promotions.js +57 -0
  172. package/lib/cjs/resources/price_lists.d.ts +39 -0
  173. package/lib/cjs/resources/price_lists.js +33 -0
  174. package/lib/cjs/resources/price_tiers.d.ts +28 -0
  175. package/lib/cjs/resources/price_tiers.js +24 -0
  176. package/lib/cjs/resources/price_volume_tiers.d.ts +46 -0
  177. package/lib/cjs/resources/price_volume_tiers.js +33 -0
  178. package/lib/cjs/resources/prices.d.ts +68 -0
  179. package/lib/cjs/resources/prices.js +45 -0
  180. package/lib/cjs/resources/promotion_rules.d.ts +23 -0
  181. package/lib/cjs/resources/promotion_rules.js +16 -0
  182. package/lib/cjs/resources/promotions.d.ts +41 -0
  183. package/lib/cjs/resources/promotions.js +36 -0
  184. package/lib/cjs/resources/refunds.d.ts +37 -0
  185. package/lib/cjs/resources/refunds.js +28 -0
  186. package/lib/cjs/resources/return_line_items.d.ts +49 -0
  187. package/lib/cjs/resources/return_line_items.js +33 -0
  188. package/lib/cjs/resources/returns.d.ts +75 -0
  189. package/lib/cjs/resources/returns.js +57 -0
  190. package/lib/cjs/resources/satispay_gateways.d.ts +39 -0
  191. package/lib/cjs/resources/satispay_gateways.js +33 -0
  192. package/lib/cjs/resources/satispay_payments.d.ts +43 -0
  193. package/lib/cjs/resources/satispay_payments.js +33 -0
  194. package/lib/cjs/resources/shipments.d.ts +93 -0
  195. package/lib/cjs/resources/shipments.js +75 -0
  196. package/lib/cjs/resources/shipping_categories.d.ts +33 -0
  197. package/lib/cjs/resources/shipping_categories.js +33 -0
  198. package/lib/cjs/resources/shipping_method_tiers.d.ts +28 -0
  199. package/lib/cjs/resources/shipping_method_tiers.js +24 -0
  200. package/lib/cjs/resources/shipping_methods.d.ts +107 -0
  201. package/lib/cjs/resources/shipping_methods.js +57 -0
  202. package/lib/cjs/resources/shipping_weight_tiers.d.ts +46 -0
  203. package/lib/cjs/resources/shipping_weight_tiers.js +33 -0
  204. package/lib/cjs/resources/shipping_zones.d.ts +48 -0
  205. package/lib/cjs/resources/shipping_zones.js +29 -0
  206. package/lib/cjs/resources/sku_list_items.d.ts +47 -0
  207. package/lib/cjs/resources/sku_list_items.js +33 -0
  208. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +68 -0
  209. package/lib/cjs/resources/sku_list_promotion_rules.js +33 -0
  210. package/lib/cjs/resources/sku_lists.d.ts +60 -0
  211. package/lib/cjs/resources/sku_lists.js +45 -0
  212. package/lib/cjs/resources/sku_options.d.ts +56 -0
  213. package/lib/cjs/resources/sku_options.js +33 -0
  214. package/lib/cjs/resources/skus.d.ts +78 -0
  215. package/lib/cjs/resources/skus.js +49 -0
  216. package/lib/cjs/resources/stock_items.d.ts +49 -0
  217. package/lib/cjs/resources/stock_items.js +37 -0
  218. package/lib/cjs/resources/stock_line_items.d.ts +29 -0
  219. package/lib/cjs/resources/stock_line_items.js +28 -0
  220. package/lib/cjs/resources/stock_locations.d.ts +57 -0
  221. package/lib/cjs/resources/stock_locations.js +49 -0
  222. package/lib/cjs/resources/stock_transfers.d.ts +74 -0
  223. package/lib/cjs/resources/stock_transfers.js +49 -0
  224. package/lib/cjs/resources/stripe_gateways.d.ts +41 -0
  225. package/lib/cjs/resources/stripe_gateways.js +33 -0
  226. package/lib/cjs/resources/stripe_payments.d.ts +47 -0
  227. package/lib/cjs/resources/stripe_payments.js +33 -0
  228. package/lib/cjs/resources/tax_calculators.d.ts +24 -0
  229. package/lib/cjs/resources/tax_calculators.js +24 -0
  230. package/lib/cjs/resources/tax_categories.d.ts +59 -0
  231. package/lib/cjs/resources/tax_categories.js +33 -0
  232. package/lib/cjs/resources/tax_rules.d.ts +69 -0
  233. package/lib/cjs/resources/tax_rules.js +29 -0
  234. package/lib/cjs/resources/taxjar_accounts.d.ts +43 -0
  235. package/lib/cjs/resources/taxjar_accounts.js +37 -0
  236. package/lib/cjs/resources/transactions.d.ts +31 -0
  237. package/lib/cjs/resources/transactions.js +20 -0
  238. package/lib/cjs/resources/voids.d.ts +37 -0
  239. package/lib/cjs/resources/voids.js +28 -0
  240. package/lib/cjs/resources/webhooks.d.ts +43 -0
  241. package/lib/cjs/resources/webhooks.js +29 -0
  242. package/lib/cjs/resources/wire_transfers.d.ts +33 -0
  243. package/lib/cjs/resources/wire_transfers.js +29 -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 +128 -0
  249. package/lib/esm/api.js +226 -0
  250. package/lib/esm/client.d.ts +33 -0
  251. package/lib/esm/client.js +121 -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 +8 -0
  256. package/lib/esm/config.d.ts +12 -0
  257. package/lib/esm/config.js +12 -0
  258. package/lib/esm/debug.d.ts +3 -0
  259. package/lib/esm/debug.js +36 -0
  260. package/lib/esm/error.d.ts +28 -0
  261. package/lib/esm/error.js +35 -0
  262. package/lib/esm/index.d.ts +8 -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 +79 -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 +25 -0
  271. package/lib/esm/query.js +45 -0
  272. package/lib/esm/resource.d.ts +87 -0
  273. package/lib/esm/resource.js +163 -0
  274. package/lib/esm/resources/addresses.d.ts +88 -0
  275. package/lib/esm/resources/addresses.js +27 -0
  276. package/lib/esm/resources/adjustments.d.ts +35 -0
  277. package/lib/esm/resources/adjustments.js +23 -0
  278. package/lib/esm/resources/adyen_gateways.d.ts +56 -0
  279. package/lib/esm/resources/adyen_gateways.js +31 -0
  280. package/lib/esm/resources/adyen_payments.d.ts +46 -0
  281. package/lib/esm/resources/adyen_payments.js +31 -0
  282. package/lib/esm/resources/application.d.ts +21 -0
  283. package/lib/esm/resources/application.js +14 -0
  284. package/lib/esm/resources/attachments.d.ts +156 -0
  285. package/lib/esm/resources/attachments.js +23 -0
  286. package/lib/esm/resources/authorizations.d.ts +60 -0
  287. package/lib/esm/resources/authorizations.js +33 -0
  288. package/lib/esm/resources/avalara_accounts.d.ts +55 -0
  289. package/lib/esm/resources/avalara_accounts.js +35 -0
  290. package/lib/esm/resources/axerve_gateways.d.ts +43 -0
  291. package/lib/esm/resources/axerve_gateways.js +31 -0
  292. package/lib/esm/resources/axerve_payments.d.ts +46 -0
  293. package/lib/esm/resources/axerve_payments.js +31 -0
  294. package/lib/esm/resources/billing_info_validation_rules.d.ts +35 -0
  295. package/lib/esm/resources/billing_info_validation_rules.js +31 -0
  296. package/lib/esm/resources/bing_geocoders.d.ts +35 -0
  297. package/lib/esm/resources/bing_geocoders.js +31 -0
  298. package/lib/esm/resources/braintree_gateways.d.ts +56 -0
  299. package/lib/esm/resources/braintree_gateways.js +31 -0
  300. package/lib/esm/resources/braintree_payments.d.ts +48 -0
  301. package/lib/esm/resources/braintree_payments.js +31 -0
  302. package/lib/esm/resources/bundles.d.ts +76 -0
  303. package/lib/esm/resources/bundles.js +39 -0
  304. package/lib/esm/resources/captures.d.ts +51 -0
  305. package/lib/esm/resources/captures.js +33 -0
  306. package/lib/esm/resources/carrier_accounts.d.ts +26 -0
  307. package/lib/esm/resources/carrier_accounts.js +22 -0
  308. package/lib/esm/resources/checkout_com_gateways.d.ts +45 -0
  309. package/lib/esm/resources/checkout_com_gateways.js +31 -0
  310. package/lib/esm/resources/checkout_com_payments.d.ts +59 -0
  311. package/lib/esm/resources/checkout_com_payments.js +31 -0
  312. package/lib/esm/resources/cleanups.d.ts +36 -0
  313. package/lib/esm/resources/cleanups.js +24 -0
  314. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +59 -0
  315. package/lib/esm/resources/coupon_codes_promotion_rules.js +27 -0
  316. package/lib/esm/resources/coupon_recipients.d.ts +44 -0
  317. package/lib/esm/resources/coupon_recipients.js +31 -0
  318. package/lib/esm/resources/coupons.d.ts +45 -0
  319. package/lib/esm/resources/coupons.js +27 -0
  320. package/lib/esm/resources/customer_addresses.d.ts +44 -0
  321. package/lib/esm/resources/customer_addresses.js +35 -0
  322. package/lib/esm/resources/customer_groups.d.ts +36 -0
  323. package/lib/esm/resources/customer_groups.js +35 -0
  324. package/lib/esm/resources/customer_password_resets.d.ts +36 -0
  325. package/lib/esm/resources/customer_password_resets.js +31 -0
  326. package/lib/esm/resources/customer_payment_sources.d.ts +78 -0
  327. package/lib/esm/resources/customer_payment_sources.js +27 -0
  328. package/lib/esm/resources/customer_subscriptions.d.ts +31 -0
  329. package/lib/esm/resources/customer_subscriptions.js +31 -0
  330. package/lib/esm/resources/customers.d.ts +66 -0
  331. package/lib/esm/resources/customers.js +63 -0
  332. package/lib/esm/resources/delivery_lead_times.d.ts +51 -0
  333. package/lib/esm/resources/delivery_lead_times.js +35 -0
  334. package/lib/esm/resources/event_callbacks.d.ts +24 -0
  335. package/lib/esm/resources/event_callbacks.js +18 -0
  336. package/lib/esm/resources/events.d.ts +24 -0
  337. package/lib/esm/resources/events.js +22 -0
  338. package/lib/esm/resources/exports.d.ts +40 -0
  339. package/lib/esm/resources/exports.js +24 -0
  340. package/lib/esm/resources/external_gateways.d.ts +49 -0
  341. package/lib/esm/resources/external_gateways.js +31 -0
  342. package/lib/esm/resources/external_payments.d.ts +44 -0
  343. package/lib/esm/resources/external_payments.js +35 -0
  344. package/lib/esm/resources/external_promotions.d.ts +90 -0
  345. package/lib/esm/resources/external_promotions.js +47 -0
  346. package/lib/esm/resources/external_tax_calculators.d.ts +37 -0
  347. package/lib/esm/resources/external_tax_calculators.js +31 -0
  348. package/lib/esm/resources/fixed_amount_promotions.d.ts +91 -0
  349. package/lib/esm/resources/fixed_amount_promotions.js +47 -0
  350. package/lib/esm/resources/fixed_price_promotions.d.ts +102 -0
  351. package/lib/esm/resources/fixed_price_promotions.js +55 -0
  352. package/lib/esm/resources/free_gift_promotions.d.ts +100 -0
  353. package/lib/esm/resources/free_gift_promotions.js +55 -0
  354. package/lib/esm/resources/free_shipping_promotions.d.ts +83 -0
  355. package/lib/esm/resources/free_shipping_promotions.js +43 -0
  356. package/lib/esm/resources/geocoders.d.ts +24 -0
  357. package/lib/esm/resources/geocoders.js +22 -0
  358. package/lib/esm/resources/gift_card_recipients.d.ts +44 -0
  359. package/lib/esm/resources/gift_card_recipients.js +31 -0
  360. package/lib/esm/resources/gift_cards.d.ts +85 -0
  361. package/lib/esm/resources/gift_cards.js +39 -0
  362. package/lib/esm/resources/google_geocoders.d.ts +35 -0
  363. package/lib/esm/resources/google_geocoders.js +31 -0
  364. package/lib/esm/resources/imports.d.ts +45 -0
  365. package/lib/esm/resources/imports.js +24 -0
  366. package/lib/esm/resources/in_stock_subscriptions.d.ts +62 -0
  367. package/lib/esm/resources/in_stock_subscriptions.js +39 -0
  368. package/lib/esm/resources/inventory_models.d.ts +42 -0
  369. package/lib/esm/resources/inventory_models.js +35 -0
  370. package/lib/esm/resources/inventory_return_locations.d.ts +43 -0
  371. package/lib/esm/resources/inventory_return_locations.js +31 -0
  372. package/lib/esm/resources/inventory_stock_locations.d.ts +46 -0
  373. package/lib/esm/resources/inventory_stock_locations.js +31 -0
  374. package/lib/esm/resources/klarna_gateways.d.ts +44 -0
  375. package/lib/esm/resources/klarna_gateways.js +31 -0
  376. package/lib/esm/resources/klarna_payments.d.ts +46 -0
  377. package/lib/esm/resources/klarna_payments.js +31 -0
  378. package/lib/esm/resources/line_item_options.d.ts +57 -0
  379. package/lib/esm/resources/line_item_options.js +31 -0
  380. package/lib/esm/resources/line_items.d.ts +126 -0
  381. package/lib/esm/resources/line_items.js +39 -0
  382. package/lib/esm/resources/manual_gateways.d.ts +30 -0
  383. package/lib/esm/resources/manual_gateways.js +27 -0
  384. package/lib/esm/resources/manual_tax_calculators.d.ts +41 -0
  385. package/lib/esm/resources/manual_tax_calculators.js +35 -0
  386. package/lib/esm/resources/markets.d.ts +88 -0
  387. package/lib/esm/resources/markets.js +47 -0
  388. package/lib/esm/resources/merchants.d.ts +38 -0
  389. package/lib/esm/resources/merchants.js +31 -0
  390. package/lib/esm/resources/order_amount_promotion_rules.d.ts +56 -0
  391. package/lib/esm/resources/order_amount_promotion_rules.js +23 -0
  392. package/lib/esm/resources/order_copies.d.ts +48 -0
  393. package/lib/esm/resources/order_copies.js +36 -0
  394. package/lib/esm/resources/order_subscriptions.d.ts +70 -0
  395. package/lib/esm/resources/order_subscriptions.js +47 -0
  396. package/lib/esm/resources/order_validation_rules.d.ts +23 -0
  397. package/lib/esm/resources/order_validation_rules.js +22 -0
  398. package/lib/esm/resources/orders.d.ts +296 -0
  399. package/lib/esm/resources/orders.js +103 -0
  400. package/lib/esm/resources/organization.d.ts +32 -0
  401. package/lib/esm/resources/organization.js +14 -0
  402. package/lib/esm/resources/packages.d.ts +56 -0
  403. package/lib/esm/resources/packages.js +35 -0
  404. package/lib/esm/resources/parcel_line_items.d.ts +51 -0
  405. package/lib/esm/resources/parcel_line_items.js +31 -0
  406. package/lib/esm/resources/parcels.d.ts +119 -0
  407. package/lib/esm/resources/parcels.js +43 -0
  408. package/lib/esm/resources/payment_gateways.d.ts +21 -0
  409. package/lib/esm/resources/payment_gateways.js +18 -0
  410. package/lib/esm/resources/payment_methods.d.ts +72 -0
  411. package/lib/esm/resources/payment_methods.js +35 -0
  412. package/lib/esm/resources/paypal_gateways.d.ts +37 -0
  413. package/lib/esm/resources/paypal_gateways.js +31 -0
  414. package/lib/esm/resources/paypal_payments.d.ts +52 -0
  415. package/lib/esm/resources/paypal_payments.js +31 -0
  416. package/lib/esm/resources/percentage_discount_promotions.d.ts +100 -0
  417. package/lib/esm/resources/percentage_discount_promotions.js +55 -0
  418. package/lib/esm/resources/price_lists.d.ts +39 -0
  419. package/lib/esm/resources/price_lists.js +31 -0
  420. package/lib/esm/resources/price_tiers.d.ts +28 -0
  421. package/lib/esm/resources/price_tiers.js +22 -0
  422. package/lib/esm/resources/price_volume_tiers.d.ts +46 -0
  423. package/lib/esm/resources/price_volume_tiers.js +31 -0
  424. package/lib/esm/resources/prices.d.ts +68 -0
  425. package/lib/esm/resources/prices.js +43 -0
  426. package/lib/esm/resources/promotion_rules.d.ts +23 -0
  427. package/lib/esm/resources/promotion_rules.js +14 -0
  428. package/lib/esm/resources/promotions.d.ts +41 -0
  429. package/lib/esm/resources/promotions.js +34 -0
  430. package/lib/esm/resources/refunds.d.ts +37 -0
  431. package/lib/esm/resources/refunds.js +26 -0
  432. package/lib/esm/resources/return_line_items.d.ts +49 -0
  433. package/lib/esm/resources/return_line_items.js +31 -0
  434. package/lib/esm/resources/returns.d.ts +75 -0
  435. package/lib/esm/resources/returns.js +55 -0
  436. package/lib/esm/resources/satispay_gateways.d.ts +39 -0
  437. package/lib/esm/resources/satispay_gateways.js +31 -0
  438. package/lib/esm/resources/satispay_payments.d.ts +43 -0
  439. package/lib/esm/resources/satispay_payments.js +31 -0
  440. package/lib/esm/resources/shipments.d.ts +93 -0
  441. package/lib/esm/resources/shipments.js +73 -0
  442. package/lib/esm/resources/shipping_categories.d.ts +33 -0
  443. package/lib/esm/resources/shipping_categories.js +31 -0
  444. package/lib/esm/resources/shipping_method_tiers.d.ts +28 -0
  445. package/lib/esm/resources/shipping_method_tiers.js +22 -0
  446. package/lib/esm/resources/shipping_methods.d.ts +107 -0
  447. package/lib/esm/resources/shipping_methods.js +55 -0
  448. package/lib/esm/resources/shipping_weight_tiers.d.ts +46 -0
  449. package/lib/esm/resources/shipping_weight_tiers.js +31 -0
  450. package/lib/esm/resources/shipping_zones.d.ts +48 -0
  451. package/lib/esm/resources/shipping_zones.js +27 -0
  452. package/lib/esm/resources/sku_list_items.d.ts +47 -0
  453. package/lib/esm/resources/sku_list_items.js +31 -0
  454. package/lib/esm/resources/sku_list_promotion_rules.d.ts +68 -0
  455. package/lib/esm/resources/sku_list_promotion_rules.js +31 -0
  456. package/lib/esm/resources/sku_lists.d.ts +60 -0
  457. package/lib/esm/resources/sku_lists.js +43 -0
  458. package/lib/esm/resources/sku_options.d.ts +56 -0
  459. package/lib/esm/resources/sku_options.js +31 -0
  460. package/lib/esm/resources/skus.d.ts +78 -0
  461. package/lib/esm/resources/skus.js +47 -0
  462. package/lib/esm/resources/stock_items.d.ts +49 -0
  463. package/lib/esm/resources/stock_items.js +35 -0
  464. package/lib/esm/resources/stock_line_items.d.ts +29 -0
  465. package/lib/esm/resources/stock_line_items.js +26 -0
  466. package/lib/esm/resources/stock_locations.d.ts +57 -0
  467. package/lib/esm/resources/stock_locations.js +47 -0
  468. package/lib/esm/resources/stock_transfers.d.ts +74 -0
  469. package/lib/esm/resources/stock_transfers.js +47 -0
  470. package/lib/esm/resources/stripe_gateways.d.ts +41 -0
  471. package/lib/esm/resources/stripe_gateways.js +31 -0
  472. package/lib/esm/resources/stripe_payments.d.ts +47 -0
  473. package/lib/esm/resources/stripe_payments.js +31 -0
  474. package/lib/esm/resources/tax_calculators.d.ts +24 -0
  475. package/lib/esm/resources/tax_calculators.js +22 -0
  476. package/lib/esm/resources/tax_categories.d.ts +59 -0
  477. package/lib/esm/resources/tax_categories.js +31 -0
  478. package/lib/esm/resources/tax_rules.d.ts +69 -0
  479. package/lib/esm/resources/tax_rules.js +27 -0
  480. package/lib/esm/resources/taxjar_accounts.d.ts +43 -0
  481. package/lib/esm/resources/taxjar_accounts.js +35 -0
  482. package/lib/esm/resources/transactions.d.ts +31 -0
  483. package/lib/esm/resources/transactions.js +18 -0
  484. package/lib/esm/resources/voids.d.ts +37 -0
  485. package/lib/esm/resources/voids.js +26 -0
  486. package/lib/esm/resources/webhooks.d.ts +43 -0
  487. package/lib/esm/resources/webhooks.js +27 -0
  488. package/lib/esm/resources/wire_transfers.d.ts +33 -0
  489. package/lib/esm/resources/wire_transfers.js +27 -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 +27 -36
  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 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;
@@ -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 PercentageDiscountPromotionRel=ResourceRel&{type:typeof PercentageDiscountPromotions.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 PercentageDiscountPromotion extends Resource{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;total_usage_count?:number;active?:boolean;percentage?: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 PercentageDiscountPromotionCreate extends ResourceCreate{name:string;currency_code?:string;starts_at:string;expires_at:string;total_usage_limit:number;percentage: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 PercentageDiscountPromotionUpdate extends ResourceUpdate{name?:string;currency_code?:string;starts_at?:string;expires_at?:string;total_usage_limit?:number;percentage?: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 PercentageDiscountPromotions extends ApiResource{static readonly TYPE:'percentage_discount_promotions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PercentageDiscountPromotion>>;create(resource:PercentageDiscountPromotionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PercentageDiscountPromotion>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PercentageDiscountPromotion>;update(resource:PercentageDiscountPromotionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PercentageDiscountPromotion>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;attachments(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;sku_list(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;skus(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;isPercentageDiscountPromotion(resource:any):resource is PercentageDiscountPromotion;relationship(id:string|ResourceId|null):PercentageDiscountPromotionRel;type():string;}export default PercentageDiscountPromotions;export{PercentageDiscountPromotion,PercentageDiscountPromotionCreate,PercentageDiscountPromotionUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class o extends n{static TYPE="percentage_discount_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"},`percentage_discount_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"},`percentage_discount_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"},`percentage_discount_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"},`percentage_discount_promotions/${r}/coupon_codes_promotion_rule`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`percentage_discount_promotions/${r}/attachments`,t,s)}async sku_list(e,t,s){const r=e.id||e;return this.resources.fetch({type:"sku_lists"},`percentage_discount_promotions/${r}/sku_list`,t,s)}async skus(e,t,s){const r=e.id||e;return this.resources.fetch({type:"skus"},`percentage_discount_promotions/${r}/skus`,t,s)}isPercentageDiscountPromotion(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{Price}from'./prices';import type{Attachment}from'./attachments';declare type PriceListRel=ResourceRel&{type:typeof PriceLists.TYPE;};interface PriceList extends Resource{name?:string;currency_code?:string;tax_included?:boolean;prices?:Price[];attachments?:Attachment[];}interface PriceListCreate extends ResourceCreate{name:string;currency_code:string;tax_included?:boolean;}interface PriceListUpdate extends ResourceUpdate{name?:string;currency_code?:string;tax_included?:boolean;}declare class PriceLists extends ApiResource{static readonly TYPE:'price_lists';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PriceList>>;create(resource:PriceListCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PriceList>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PriceList>;update(resource:PriceListUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PriceList>;delete(id:string,options?:ResourcesConfig):Promise<void>;prices(priceListId:string|PriceList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Price>>;attachments(priceListId:string|PriceList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isPriceList(resource:any):resource is PriceList;relationship(id:string|ResourceId|null):PriceListRel;type():string;}export default PriceLists;export{PriceList,PriceListCreate,PriceListUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class r extends c{static TYPE="price_lists";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 prices(e,t,s){const i=e.id||e;return this.resources.fetch({type:"prices"},`price_lists/${i}/prices`,t,s)}async attachments(e,t,s){const i=e.id||e;return this.resources.fetch({type:"attachments"},`price_lists/${i}/attachments`,t,s)}isPriceList(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{PriceList}from'./price_lists';import type{Sku}from'./skus';import type{Attachment}from'./attachments';declare type PriceRel=ResourceRel&{type:typeof Prices.TYPE;};declare type PriceListRel=ResourceRel&{type:'price_lists';};declare type SkuRel=ResourceRel&{type:'skus';};interface Price extends Resource{currency_code?:string;sku_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;compare_at_amount_cents?:number;compare_at_amount_float?:number;formatted_compare_at_amount?:string;price_list?:PriceList;sku?:Sku;attachments?:Attachment[];}interface PriceCreate extends ResourceCreate{sku_code?:string;amount_cents:number;compare_at_amount_cents:number;price_list:PriceListRel;sku?:SkuRel;}interface PriceUpdate extends ResourceUpdate{sku_code?:string;amount_cents?:number;compare_at_amount_cents?:number;price_list?:PriceListRel;sku?:SkuRel;}declare class Prices extends ApiResource{static readonly TYPE:'prices';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Price>>;create(resource:PriceCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Price>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Price>;update(resource:PriceUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Price>;delete(id:string,options?:ResourcesConfig):Promise<void>;price_list(priceId:string|Price,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PriceList>;sku(priceId:string|Price,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;attachments(priceId:string|Price,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isPrice(resource:any):resource is Price;relationship(id:string|ResourceId|null):PriceRel;type():string;}export default Prices;export{Price,PriceCreate,PriceUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class r extends i{static TYPE="prices";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 price_list(e,t,s){const c=e.id||e;return this.resources.fetch({type:"price_lists"},`prices/${c}/price_list`,t,s)}async sku(e,t,s){const c=e.id||e;return this.resources.fetch({type:"skus"},`prices/${c}/sku`,t,s)}async attachments(e,t,s){const c=e.id||e;return this.resources.fetch({type:"attachments"},`prices/${c}/attachments`,t,s)}isPrice(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{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 PromotionRuleRel=ResourceRel&{type:typeof PromotionRules.TYPE;};interface PromotionRule extends Resource{promotion?:PercentageDiscountPromotion|FreeShippingPromotion|FixedAmountPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion;}declare class PromotionRules extends ApiResource{static readonly TYPE:'promotion_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PromotionRule>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PromotionRule>;isPromotionRule(resource:any):resource is PromotionRule;relationship(id:string|ResourceId|null):PromotionRuleRel;type():string;}export default PromotionRules;export{PromotionRule};
@@ -1 +0,0 @@
1
- import{ApiResource as s}from"../resource";class e extends s{static TYPE="promotion_rules";async list(t,r){return this.resources.list({type:e.TYPE},t,r)}async retrieve(t,r,i){return this.resources.retrieve({type:e.TYPE,id:t},r,i)}isPromotionRule(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,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 PromotionRel=ResourceRel&{type:typeof Promotions.TYPE;};interface Promotion 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[];}declare class Promotions extends ApiResource{static readonly TYPE:'promotions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Promotion>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Promotion>;market(promotionId:string|Promotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(promotionId:string|Promotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(promotionId:string|Promotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(promotionId:string|Promotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;attachments(promotionId:string|Promotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isPromotion(resource:any):resource is Promotion;relationship(id:string|ResourceId|null):PromotionRel;type():string;}export default Promotions;export{Promotion};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class s extends n{static TYPE="promotions";async list(t,e){return this.resources.list({type:s.TYPE},t,e)}async retrieve(t,e,r){return this.resources.retrieve({type:s.TYPE,id:t},e,r)}async market(t,e,r){const o=t.id||t;return this.resources.fetch({type:"markets"},`promotions/${o}/market`,e,r)}async order_amount_promotion_rule(t,e,r){const o=t.id||t;return this.resources.fetch({type:"order_amount_promotion_rules"},`promotions/${o}/order_amount_promotion_rule`,e,r)}async sku_list_promotion_rule(t,e,r){const o=t.id||t;return this.resources.fetch({type:"sku_list_promotion_rules"},`promotions/${o}/sku_list_promotion_rule`,e,r)}async coupon_codes_promotion_rule(t,e,r){const o=t.id||t;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`promotions/${o}/coupon_codes_promotion_rule`,e,r)}async attachments(t,e,r){const o=t.id||t;return this.resources.fetch({type:"attachments"},`promotions/${o}/attachments`,e,r)}isPromotion(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,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Capture}from'./captures';declare type RefundRel=ResourceRel&{type:typeof Refunds.TYPE;};interface Refund extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;order?:Order;reference_capture?:Capture;}declare class Refunds extends ApiResource{static readonly TYPE:'refunds';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Refund>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Refund>;order(refundId:string|Refund,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;reference_capture(refundId:string|Refund,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;isRefund(resource:any):resource is Refund;relationship(id:string|ResourceId|null):RefundRel;type():string;}export default Refunds;export{Refund};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class r extends c{static TYPE="refunds";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async order(e,t,s){const n=e.id||e;return this.resources.fetch({type:"orders"},`refunds/${n}/order`,t,s)}async reference_capture(e,t,s){const n=e.id||e;return this.resources.fetch({type:"captures"},`refunds/${n}/reference_capture`,t,s)}isRefund(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{Return}from'./returns';import type{LineItem}from'./line_items';declare type ReturnLineItemRel=ResourceRel&{type:typeof ReturnLineItems.TYPE;};declare type ReturnRel=ResourceRel&{type:'returns';};declare type LineItemRel=ResourceRel&{type:'line_items';};interface ReturnLineItem extends Resource{sku_code?:string;bundle_code?:string;name?:string;quantity?:number;return_reason?:object;restocked_at?:string;return?:Return;line_item?:LineItem;}interface ReturnLineItemCreate extends ResourceCreate{quantity:number;return_reason?:object;return:ReturnRel;line_item:LineItemRel;}interface ReturnLineItemUpdate extends ResourceUpdate{quantity?:number;_restock?:boolean;return_reason?:object;}declare class ReturnLineItems extends ApiResource{static readonly TYPE:'return_line_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ReturnLineItem>>;create(resource:ReturnLineItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;update(resource:ReturnLineItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;delete(id:string,options?:ResourcesConfig):Promise<void>;return(returnLineItemId:string|ReturnLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;line_item(returnLineItemId:string|ReturnLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;isReturnLineItem(resource:any):resource is ReturnLineItem;relationship(id:string|ResourceId|null):ReturnLineItemRel;type():string;}export default ReturnLineItems;export{ReturnLineItem,ReturnLineItemCreate,ReturnLineItemUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class r extends n{static TYPE="return_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 return(e,t,s){const i=e.id||e;return this.resources.fetch({type:"returns"},`return_line_items/${i}/return`,t,s)}async line_item(e,t,s){const i=e.id||e;return this.resources.fetch({type:"line_items"},`return_line_items/${i}/line_item`,t,s)}isReturnLineItem(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{Customer}from'./customers';import type{StockLocation}from'./stock_locations';import type{Address}from'./addresses';import type{ReturnLineItem}from'./return_line_items';import type{Attachment}from'./attachments';declare type ReturnRel=ResourceRel&{type:typeof Returns.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};interface Return extends Resource{number?:string;status?:string;customer_email?:string;skus_count?:number;approved_at?:string;cancelled_at?:string;shipped_at?:string;rejected_at?:string;received_at?:string;archived_at?:string;order?:Order;customer?:Customer;stock_location?:StockLocation;origin_address?:Address;destination_address?:Address;return_line_items?:ReturnLineItem[];attachments?:Attachment[];}interface ReturnCreate extends ResourceCreate{order:OrderRel;stock_location?:StockLocationRel;}interface ReturnUpdate extends ResourceUpdate{_request?:boolean;_approve?:boolean;_cancel?:boolean;_ship?:boolean;_reject?:boolean;_receive?:boolean;_restock?:boolean;_archive?:boolean;_unarchive?:boolean;stock_location?:StockLocationRel;}declare class Returns extends ApiResource{static readonly TYPE:'returns';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Return>>;create(resource:ReturnCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;update(resource:ReturnUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;customer(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;stock_location(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;origin_address(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;destination_address(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;return_line_items(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ReturnLineItem>>;attachments(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isReturn(resource:any):resource is Return;relationship(id:string|ResourceId|null):ReturnRel;type():string;}export default Returns;export{Return,ReturnCreate,ReturnUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class n extends i{static TYPE="returns";async list(e,t){return this.resources.list({type:n.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:n.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:n.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:n.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:n.TYPE,id:e},t)}async order(e,t,s){const r=e.id||e;return this.resources.fetch({type:"orders"},`returns/${r}/order`,t,s)}async customer(e,t,s){const r=e.id||e;return this.resources.fetch({type:"customers"},`returns/${r}/customer`,t,s)}async stock_location(e,t,s){const r=e.id||e;return this.resources.fetch({type:"stock_locations"},`returns/${r}/stock_location`,t,s)}async origin_address(e,t,s){const r=e.id||e;return this.resources.fetch({type:"addresses"},`returns/${r}/origin_address`,t,s)}async destination_address(e,t,s){const r=e.id||e;return this.resources.fetch({type:"addresses"},`returns/${r}/destination_address`,t,s)}async return_line_items(e,t,s){const r=e.id||e;return this.resources.fetch({type:"return_line_items"},`returns/${r}/return_line_items`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`returns/${r}/attachments`,t,s)}isReturn(e){return e.type&&e.type===n.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:n.TYPE}:{id:e.id,type:n.TYPE}}type(){return n.TYPE}}export default n;