@commercelayer/sdk 7.0.0-beta.1 → 7.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 (601) hide show
  1. package/lib/api-BYcswOJ0.d.cts +16784 -0
  2. package/lib/api-Cknm0QL_.d.ts +16784 -0
  3. package/lib/api.cjs +936 -0
  4. package/lib/api.d.cts +4 -0
  5. package/lib/api.d.ts +4 -0
  6. package/lib/api.js +275 -0
  7. package/lib/client.cjs +170 -0
  8. package/lib/client.d.cts +36 -0
  9. package/lib/client.d.ts +36 -0
  10. package/lib/client.js +161 -0
  11. package/lib/commercelayer.cjs +798 -0
  12. package/lib/commercelayer.d.cts +167 -0
  13. package/lib/commercelayer.d.ts +167 -0
  14. package/lib/commercelayer.js +768 -0
  15. package/lib/common.cjs +17 -0
  16. package/lib/common.d.cts +13 -0
  17. package/lib/common.d.ts +13 -0
  18. package/lib/common.js +13 -0
  19. package/lib/config.cjs +21 -0
  20. package/lib/config.d.cts +19 -0
  21. package/lib/config.d.ts +19 -0
  22. package/lib/config.js +17 -0
  23. package/lib/debug.cjs +19 -0
  24. package/lib/debug.d.cts +4 -0
  25. package/lib/debug.d.ts +4 -0
  26. package/lib/debug.js +15 -0
  27. package/lib/error.cjs +97 -0
  28. package/lib/error.d.cts +35 -0
  29. package/lib/error.d.ts +35 -0
  30. package/lib/error.js +91 -0
  31. package/lib/fetch.cjs +83 -0
  32. package/lib/fetch.d.cts +1 -0
  33. package/lib/fetch.d.ts +1 -0
  34. package/lib/fetch.js +76 -0
  35. package/lib/index.cjs +32 -2
  36. package/lib/index.d.cts +8 -16916
  37. package/lib/index.d.ts +8 -16916
  38. package/lib/index.js +3 -2
  39. package/lib/instance.cjs +272 -0
  40. package/lib/instance.d.cts +141 -0
  41. package/lib/instance.d.ts +141 -0
  42. package/lib/instance.js +139 -0
  43. package/lib/interceptor-5MISI1yn.d.cts +54 -0
  44. package/lib/interceptor-5MISI1yn.d.ts +54 -0
  45. package/lib/interceptor.cjs +2 -0
  46. package/lib/interceptor.d.cts +1 -0
  47. package/lib/interceptor.d.ts +1 -0
  48. package/lib/interceptor.js +1 -0
  49. package/lib/jsonapi.cjs +79 -0
  50. package/lib/jsonapi.d.cts +11 -0
  51. package/lib/jsonapi.d.ts +11 -0
  52. package/lib/jsonapi.js +71 -0
  53. package/lib/model.cjs +2 -0
  54. package/lib/model.d.cts +4 -0
  55. package/lib/model.d.ts +4 -0
  56. package/lib/model.js +1 -0
  57. package/lib/query.cjs +64 -0
  58. package/lib/query.d.cts +4 -0
  59. package/lib/query.d.ts +4 -0
  60. package/lib/query.js +56 -0
  61. package/lib/resource.cjs +222 -0
  62. package/lib/resource.d.cts +4 -0
  63. package/lib/resource.d.ts +4 -0
  64. package/lib/resource.js +209 -0
  65. package/lib/resources/addresses.cjs +53 -0
  66. package/lib/resources/addresses.d.cts +4 -0
  67. package/lib/resources/addresses.d.ts +4 -0
  68. package/lib/resources/addresses.js +49 -0
  69. package/lib/resources/adjustments.cjs +41 -0
  70. package/lib/resources/adjustments.d.cts +4 -0
  71. package/lib/resources/adjustments.d.ts +4 -0
  72. package/lib/resources/adjustments.js +37 -0
  73. package/lib/resources/adyen_gateways.cjs +49 -0
  74. package/lib/resources/adyen_gateways.d.cts +4 -0
  75. package/lib/resources/adyen_gateways.d.ts +4 -0
  76. package/lib/resources/adyen_gateways.js +45 -0
  77. package/lib/resources/adyen_payments.cjs +55 -0
  78. package/lib/resources/adyen_payments.d.cts +4 -0
  79. package/lib/resources/adyen_payments.d.ts +4 -0
  80. package/lib/resources/adyen_payments.js +51 -0
  81. package/lib/resources/applications.cjs +31 -0
  82. package/lib/resources/applications.d.cts +4 -0
  83. package/lib/resources/applications.d.ts +4 -0
  84. package/lib/resources/applications.js +27 -0
  85. package/lib/resources/attachments.cjs +37 -0
  86. package/lib/resources/attachments.d.cts +4 -0
  87. package/lib/resources/attachments.d.ts +4 -0
  88. package/lib/resources/attachments.js +33 -0
  89. package/lib/resources/authorizations.cjs +70 -0
  90. package/lib/resources/authorizations.d.cts +4 -0
  91. package/lib/resources/authorizations.d.ts +4 -0
  92. package/lib/resources/authorizations.js +66 -0
  93. package/lib/resources/avalara_accounts.cjs +57 -0
  94. package/lib/resources/avalara_accounts.d.cts +4 -0
  95. package/lib/resources/avalara_accounts.d.ts +4 -0
  96. package/lib/resources/avalara_accounts.js +53 -0
  97. package/lib/resources/axerve_gateways.cjs +49 -0
  98. package/lib/resources/axerve_gateways.d.cts +4 -0
  99. package/lib/resources/axerve_gateways.d.ts +4 -0
  100. package/lib/resources/axerve_gateways.js +45 -0
  101. package/lib/resources/axerve_payments.cjs +52 -0
  102. package/lib/resources/axerve_payments.d.cts +4 -0
  103. package/lib/resources/axerve_payments.d.ts +4 -0
  104. package/lib/resources/axerve_payments.js +48 -0
  105. package/lib/resources/bing_geocoders.cjs +49 -0
  106. package/lib/resources/bing_geocoders.d.cts +4 -0
  107. package/lib/resources/bing_geocoders.d.ts +4 -0
  108. package/lib/resources/bing_geocoders.js +45 -0
  109. package/lib/resources/braintree_gateways.cjs +49 -0
  110. package/lib/resources/braintree_gateways.d.cts +4 -0
  111. package/lib/resources/braintree_gateways.d.ts +4 -0
  112. package/lib/resources/braintree_gateways.js +45 -0
  113. package/lib/resources/braintree_payments.cjs +49 -0
  114. package/lib/resources/braintree_payments.d.cts +4 -0
  115. package/lib/resources/braintree_payments.d.ts +4 -0
  116. package/lib/resources/braintree_payments.js +45 -0
  117. package/lib/resources/bundles.cjs +71 -0
  118. package/lib/resources/bundles.d.cts +4 -0
  119. package/lib/resources/bundles.d.ts +4 -0
  120. package/lib/resources/bundles.js +67 -0
  121. package/lib/resources/buy_x_pay_y_promotions.cjs +91 -0
  122. package/lib/resources/buy_x_pay_y_promotions.d.cts +4 -0
  123. package/lib/resources/buy_x_pay_y_promotions.d.ts +4 -0
  124. package/lib/resources/buy_x_pay_y_promotions.js +87 -0
  125. package/lib/resources/captures.cjs +71 -0
  126. package/lib/resources/captures.d.cts +4 -0
  127. package/lib/resources/captures.d.ts +4 -0
  128. package/lib/resources/captures.js +67 -0
  129. package/lib/resources/carrier_accounts.cjs +49 -0
  130. package/lib/resources/carrier_accounts.d.cts +4 -0
  131. package/lib/resources/carrier_accounts.d.ts +4 -0
  132. package/lib/resources/carrier_accounts.js +45 -0
  133. package/lib/resources/checkout_com_gateways.cjs +49 -0
  134. package/lib/resources/checkout_com_gateways.d.cts +4 -0
  135. package/lib/resources/checkout_com_gateways.d.ts +4 -0
  136. package/lib/resources/checkout_com_gateways.js +45 -0
  137. package/lib/resources/checkout_com_payments.cjs +55 -0
  138. package/lib/resources/checkout_com_payments.d.cts +4 -0
  139. package/lib/resources/checkout_com_payments.d.ts +4 -0
  140. package/lib/resources/checkout_com_payments.js +51 -0
  141. package/lib/resources/cleanups.cjs +48 -0
  142. package/lib/resources/cleanups.d.cts +4 -0
  143. package/lib/resources/cleanups.d.ts +4 -0
  144. package/lib/resources/cleanups.js +44 -0
  145. package/lib/resources/coupon_codes_promotion_rules.cjs +45 -0
  146. package/lib/resources/coupon_codes_promotion_rules.d.cts +4 -0
  147. package/lib/resources/coupon_codes_promotion_rules.d.ts +4 -0
  148. package/lib/resources/coupon_codes_promotion_rules.js +41 -0
  149. package/lib/resources/coupon_recipients.cjs +49 -0
  150. package/lib/resources/coupon_recipients.d.cts +4 -0
  151. package/lib/resources/coupon_recipients.d.ts +4 -0
  152. package/lib/resources/coupon_recipients.js +45 -0
  153. package/lib/resources/coupons.cjs +57 -0
  154. package/lib/resources/coupons.d.cts +4 -0
  155. package/lib/resources/coupons.d.ts +4 -0
  156. package/lib/resources/coupons.js +53 -0
  157. package/lib/resources/custom_promotion_rules.cjs +41 -0
  158. package/lib/resources/custom_promotion_rules.d.cts +4 -0
  159. package/lib/resources/custom_promotion_rules.d.ts +4 -0
  160. package/lib/resources/custom_promotion_rules.js +37 -0
  161. package/lib/resources/customer_addresses.cjs +53 -0
  162. package/lib/resources/customer_addresses.d.cts +4 -0
  163. package/lib/resources/customer_addresses.d.ts +4 -0
  164. package/lib/resources/customer_addresses.js +49 -0
  165. package/lib/resources/customer_groups.cjs +53 -0
  166. package/lib/resources/customer_groups.d.cts +4 -0
  167. package/lib/resources/customer_groups.d.ts +4 -0
  168. package/lib/resources/customer_groups.js +49 -0
  169. package/lib/resources/customer_password_resets.cjs +48 -0
  170. package/lib/resources/customer_password_resets.d.cts +4 -0
  171. package/lib/resources/customer_password_resets.d.ts +4 -0
  172. package/lib/resources/customer_password_resets.js +44 -0
  173. package/lib/resources/customer_payment_sources.cjs +49 -0
  174. package/lib/resources/customer_payment_sources.d.cts +4 -0
  175. package/lib/resources/customer_payment_sources.d.ts +4 -0
  176. package/lib/resources/customer_payment_sources.js +45 -0
  177. package/lib/resources/customer_subscriptions.cjs +49 -0
  178. package/lib/resources/customer_subscriptions.d.cts +4 -0
  179. package/lib/resources/customer_subscriptions.d.ts +4 -0
  180. package/lib/resources/customer_subscriptions.js +45 -0
  181. package/lib/resources/customers.cjs +81 -0
  182. package/lib/resources/customers.d.cts +4 -0
  183. package/lib/resources/customers.d.ts +4 -0
  184. package/lib/resources/customers.js +77 -0
  185. package/lib/resources/delivery_lead_times.cjs +53 -0
  186. package/lib/resources/delivery_lead_times.d.cts +4 -0
  187. package/lib/resources/delivery_lead_times.d.ts +4 -0
  188. package/lib/resources/delivery_lead_times.js +49 -0
  189. package/lib/resources/discount_engine_items.cjs +36 -0
  190. package/lib/resources/discount_engine_items.d.cts +4 -0
  191. package/lib/resources/discount_engine_items.d.ts +4 -0
  192. package/lib/resources/discount_engine_items.js +32 -0
  193. package/lib/resources/discount_engines.cjs +44 -0
  194. package/lib/resources/discount_engines.d.cts +4 -0
  195. package/lib/resources/discount_engines.d.ts +4 -0
  196. package/lib/resources/discount_engines.js +40 -0
  197. package/lib/resources/easypost_pickups.cjs +52 -0
  198. package/lib/resources/easypost_pickups.d.cts +4 -0
  199. package/lib/resources/easypost_pickups.d.ts +4 -0
  200. package/lib/resources/easypost_pickups.js +48 -0
  201. package/lib/resources/event_callbacks.cjs +32 -0
  202. package/lib/resources/event_callbacks.d.cts +4 -0
  203. package/lib/resources/event_callbacks.d.ts +4 -0
  204. package/lib/resources/event_callbacks.js +28 -0
  205. package/lib/resources/events.cjs +42 -0
  206. package/lib/resources/events.d.cts +4 -0
  207. package/lib/resources/events.d.ts +4 -0
  208. package/lib/resources/events.js +38 -0
  209. package/lib/resources/exports.cjs +48 -0
  210. package/lib/resources/exports.d.cts +4 -0
  211. package/lib/resources/exports.d.ts +4 -0
  212. package/lib/resources/exports.js +44 -0
  213. package/lib/resources/external_gateways.cjs +52 -0
  214. package/lib/resources/external_gateways.d.cts +4 -0
  215. package/lib/resources/external_gateways.d.ts +4 -0
  216. package/lib/resources/external_gateways.js +48 -0
  217. package/lib/resources/external_payments.cjs +53 -0
  218. package/lib/resources/external_payments.d.cts +4 -0
  219. package/lib/resources/external_payments.d.ts +4 -0
  220. package/lib/resources/external_payments.js +49 -0
  221. package/lib/resources/external_promotions.cjs +94 -0
  222. package/lib/resources/external_promotions.d.cts +4 -0
  223. package/lib/resources/external_promotions.d.ts +4 -0
  224. package/lib/resources/external_promotions.js +90 -0
  225. package/lib/resources/external_tax_calculators.cjs +56 -0
  226. package/lib/resources/external_tax_calculators.d.cts +4 -0
  227. package/lib/resources/external_tax_calculators.d.ts +4 -0
  228. package/lib/resources/external_tax_calculators.js +52 -0
  229. package/lib/resources/fixed_amount_promotions.cjs +91 -0
  230. package/lib/resources/fixed_amount_promotions.d.cts +4 -0
  231. package/lib/resources/fixed_amount_promotions.d.ts +4 -0
  232. package/lib/resources/fixed_amount_promotions.js +87 -0
  233. package/lib/resources/fixed_price_promotions.cjs +91 -0
  234. package/lib/resources/fixed_price_promotions.d.cts +4 -0
  235. package/lib/resources/fixed_price_promotions.d.ts +4 -0
  236. package/lib/resources/fixed_price_promotions.js +87 -0
  237. package/lib/resources/flex_promotions.cjs +67 -0
  238. package/lib/resources/flex_promotions.d.cts +4 -0
  239. package/lib/resources/flex_promotions.d.ts +4 -0
  240. package/lib/resources/flex_promotions.js +63 -0
  241. package/lib/resources/free_gift_promotions.cjs +91 -0
  242. package/lib/resources/free_gift_promotions.d.cts +4 -0
  243. package/lib/resources/free_gift_promotions.d.ts +4 -0
  244. package/lib/resources/free_gift_promotions.js +87 -0
  245. package/lib/resources/free_shipping_promotions.cjs +87 -0
  246. package/lib/resources/free_shipping_promotions.d.cts +4 -0
  247. package/lib/resources/free_shipping_promotions.d.ts +4 -0
  248. package/lib/resources/free_shipping_promotions.js +83 -0
  249. package/lib/resources/geocoders.cjs +40 -0
  250. package/lib/resources/geocoders.d.cts +4 -0
  251. package/lib/resources/geocoders.d.ts +4 -0
  252. package/lib/resources/geocoders.js +36 -0
  253. package/lib/resources/gift_card_recipients.cjs +49 -0
  254. package/lib/resources/gift_card_recipients.d.cts +4 -0
  255. package/lib/resources/gift_card_recipients.d.ts +4 -0
  256. package/lib/resources/gift_card_recipients.js +45 -0
  257. package/lib/resources/gift_cards.cjs +73 -0
  258. package/lib/resources/gift_cards.d.cts +4 -0
  259. package/lib/resources/gift_cards.d.ts +4 -0
  260. package/lib/resources/gift_cards.js +69 -0
  261. package/lib/resources/google_geocoders.cjs +49 -0
  262. package/lib/resources/google_geocoders.d.cts +4 -0
  263. package/lib/resources/google_geocoders.d.ts +4 -0
  264. package/lib/resources/google_geocoders.js +45 -0
  265. package/lib/resources/imports.cjs +44 -0
  266. package/lib/resources/imports.d.cts +4 -0
  267. package/lib/resources/imports.d.ts +4 -0
  268. package/lib/resources/imports.js +40 -0
  269. package/lib/resources/in_stock_subscriptions.cjs +63 -0
  270. package/lib/resources/in_stock_subscriptions.d.cts +4 -0
  271. package/lib/resources/in_stock_subscriptions.d.ts +4 -0
  272. package/lib/resources/in_stock_subscriptions.js +59 -0
  273. package/lib/resources/inventory_models.cjs +53 -0
  274. package/lib/resources/inventory_models.d.cts +4 -0
  275. package/lib/resources/inventory_models.d.ts +4 -0
  276. package/lib/resources/inventory_models.js +49 -0
  277. package/lib/resources/inventory_return_locations.cjs +49 -0
  278. package/lib/resources/inventory_return_locations.d.cts +4 -0
  279. package/lib/resources/inventory_return_locations.d.ts +4 -0
  280. package/lib/resources/inventory_return_locations.js +45 -0
  281. package/lib/resources/inventory_stock_locations.cjs +49 -0
  282. package/lib/resources/inventory_stock_locations.d.cts +4 -0
  283. package/lib/resources/inventory_stock_locations.d.ts +4 -0
  284. package/lib/resources/inventory_stock_locations.js +45 -0
  285. package/lib/resources/klarna_gateways.cjs +49 -0
  286. package/lib/resources/klarna_gateways.d.cts +4 -0
  287. package/lib/resources/klarna_gateways.d.ts +4 -0
  288. package/lib/resources/klarna_gateways.js +45 -0
  289. package/lib/resources/klarna_payments.cjs +52 -0
  290. package/lib/resources/klarna_payments.d.cts +4 -0
  291. package/lib/resources/klarna_payments.d.ts +4 -0
  292. package/lib/resources/klarna_payments.js +48 -0
  293. package/lib/resources/line_item_options.cjs +53 -0
  294. package/lib/resources/line_item_options.d.cts +4 -0
  295. package/lib/resources/line_item_options.d.ts +4 -0
  296. package/lib/resources/line_item_options.js +49 -0
  297. package/lib/resources/line_items.cjs +82 -0
  298. package/lib/resources/line_items.d.cts +4 -0
  299. package/lib/resources/line_items.d.ts +4 -0
  300. package/lib/resources/line_items.js +78 -0
  301. package/lib/resources/links.cjs +47 -0
  302. package/lib/resources/links.d.cts +4 -0
  303. package/lib/resources/links.d.ts +4 -0
  304. package/lib/resources/links.js +43 -0
  305. package/lib/resources/manual_gateways.cjs +45 -0
  306. package/lib/resources/manual_gateways.d.cts +4 -0
  307. package/lib/resources/manual_gateways.d.ts +4 -0
  308. package/lib/resources/manual_gateways.js +41 -0
  309. package/lib/resources/manual_tax_calculators.cjs +57 -0
  310. package/lib/resources/manual_tax_calculators.d.cts +4 -0
  311. package/lib/resources/manual_tax_calculators.d.ts +4 -0
  312. package/lib/resources/manual_tax_calculators.js +53 -0
  313. package/lib/resources/markets.cjs +91 -0
  314. package/lib/resources/markets.d.cts +4 -0
  315. package/lib/resources/markets.d.ts +4 -0
  316. package/lib/resources/markets.js +87 -0
  317. package/lib/resources/merchants.cjs +49 -0
  318. package/lib/resources/merchants.d.cts +4 -0
  319. package/lib/resources/merchants.d.ts +4 -0
  320. package/lib/resources/merchants.js +45 -0
  321. package/lib/resources/notifications.cjs +37 -0
  322. package/lib/resources/notifications.d.cts +4 -0
  323. package/lib/resources/notifications.d.ts +4 -0
  324. package/lib/resources/notifications.js +33 -0
  325. package/lib/resources/order_amount_promotion_rules.cjs +41 -0
  326. package/lib/resources/order_amount_promotion_rules.d.cts +4 -0
  327. package/lib/resources/order_amount_promotion_rules.d.ts +4 -0
  328. package/lib/resources/order_amount_promotion_rules.js +37 -0
  329. package/lib/resources/order_copies.cjs +53 -0
  330. package/lib/resources/order_copies.d.cts +4 -0
  331. package/lib/resources/order_copies.d.ts +4 -0
  332. package/lib/resources/order_copies.js +49 -0
  333. package/lib/resources/order_factories.cjs +40 -0
  334. package/lib/resources/order_factories.d.cts +4 -0
  335. package/lib/resources/order_factories.d.ts +4 -0
  336. package/lib/resources/order_factories.js +36 -0
  337. package/lib/resources/order_subscription_items.cjs +45 -0
  338. package/lib/resources/order_subscription_items.d.cts +4 -0
  339. package/lib/resources/order_subscription_items.d.ts +4 -0
  340. package/lib/resources/order_subscription_items.js +41 -0
  341. package/lib/resources/order_subscriptions.cjs +97 -0
  342. package/lib/resources/order_subscriptions.d.cts +4 -0
  343. package/lib/resources/order_subscriptions.d.ts +4 -0
  344. package/lib/resources/order_subscriptions.js +93 -0
  345. package/lib/resources/orders.cjs +266 -0
  346. package/lib/resources/orders.d.cts +4 -0
  347. package/lib/resources/orders.d.ts +4 -0
  348. package/lib/resources/orders.js +262 -0
  349. package/lib/resources/organizations.cjs +31 -0
  350. package/lib/resources/organizations.d.cts +4 -0
  351. package/lib/resources/organizations.d.ts +4 -0
  352. package/lib/resources/organizations.js +27 -0
  353. package/lib/resources/packages.cjs +53 -0
  354. package/lib/resources/packages.d.cts +4 -0
  355. package/lib/resources/packages.d.ts +4 -0
  356. package/lib/resources/packages.js +49 -0
  357. package/lib/resources/parcel_line_items.cjs +49 -0
  358. package/lib/resources/parcel_line_items.d.cts +4 -0
  359. package/lib/resources/parcel_line_items.d.ts +4 -0
  360. package/lib/resources/parcel_line_items.js +45 -0
  361. package/lib/resources/parcels.cjs +61 -0
  362. package/lib/resources/parcels.d.cts +4 -0
  363. package/lib/resources/parcels.d.ts +4 -0
  364. package/lib/resources/parcels.js +57 -0
  365. package/lib/resources/payment_gateways.cjs +36 -0
  366. package/lib/resources/payment_gateways.d.cts +4 -0
  367. package/lib/resources/payment_gateways.d.ts +4 -0
  368. package/lib/resources/payment_gateways.js +32 -0
  369. package/lib/resources/payment_methods.cjs +67 -0
  370. package/lib/resources/payment_methods.d.cts +4 -0
  371. package/lib/resources/payment_methods.d.ts +4 -0
  372. package/lib/resources/payment_methods.js +63 -0
  373. package/lib/resources/payment_options.cjs +45 -0
  374. package/lib/resources/payment_options.d.cts +4 -0
  375. package/lib/resources/payment_options.d.ts +4 -0
  376. package/lib/resources/payment_options.js +41 -0
  377. package/lib/resources/paypal_gateways.cjs +49 -0
  378. package/lib/resources/paypal_gateways.d.cts +4 -0
  379. package/lib/resources/paypal_gateways.d.ts +4 -0
  380. package/lib/resources/paypal_gateways.js +45 -0
  381. package/lib/resources/paypal_payments.cjs +49 -0
  382. package/lib/resources/paypal_payments.d.cts +4 -0
  383. package/lib/resources/paypal_payments.d.ts +4 -0
  384. package/lib/resources/paypal_payments.js +45 -0
  385. package/lib/resources/percentage_discount_promotions.cjs +91 -0
  386. package/lib/resources/percentage_discount_promotions.d.cts +4 -0
  387. package/lib/resources/percentage_discount_promotions.d.ts +4 -0
  388. package/lib/resources/percentage_discount_promotions.js +87 -0
  389. package/lib/resources/pickups.cjs +40 -0
  390. package/lib/resources/pickups.d.cts +4 -0
  391. package/lib/resources/pickups.d.ts +4 -0
  392. package/lib/resources/pickups.js +36 -0
  393. package/lib/resources/price_frequency_tiers.cjs +53 -0
  394. package/lib/resources/price_frequency_tiers.d.cts +4 -0
  395. package/lib/resources/price_frequency_tiers.d.ts +4 -0
  396. package/lib/resources/price_frequency_tiers.js +49 -0
  397. package/lib/resources/price_list_schedulers.cjs +59 -0
  398. package/lib/resources/price_list_schedulers.d.cts +4 -0
  399. package/lib/resources/price_list_schedulers.d.ts +4 -0
  400. package/lib/resources/price_list_schedulers.js +55 -0
  401. package/lib/resources/price_lists.cjs +53 -0
  402. package/lib/resources/price_lists.d.cts +4 -0
  403. package/lib/resources/price_lists.d.ts +4 -0
  404. package/lib/resources/price_lists.js +49 -0
  405. package/lib/resources/price_tiers.cjs +40 -0
  406. package/lib/resources/price_tiers.d.cts +4 -0
  407. package/lib/resources/price_tiers.d.ts +4 -0
  408. package/lib/resources/price_tiers.js +36 -0
  409. package/lib/resources/price_volume_tiers.cjs +53 -0
  410. package/lib/resources/price_volume_tiers.d.cts +4 -0
  411. package/lib/resources/price_volume_tiers.d.ts +4 -0
  412. package/lib/resources/price_volume_tiers.js +49 -0
  413. package/lib/resources/prices.cjs +77 -0
  414. package/lib/resources/prices.d.cts +4 -0
  415. package/lib/resources/prices.d.ts +4 -0
  416. package/lib/resources/prices.js +73 -0
  417. package/lib/resources/promotion_rules.cjs +32 -0
  418. package/lib/resources/promotion_rules.d.cts +4 -0
  419. package/lib/resources/promotion_rules.d.ts +4 -0
  420. package/lib/resources/promotion_rules.js +28 -0
  421. package/lib/resources/promotions.cjs +72 -0
  422. package/lib/resources/promotions.d.cts +4 -0
  423. package/lib/resources/promotions.d.ts +4 -0
  424. package/lib/resources/promotions.js +68 -0
  425. package/lib/resources/recurring_order_copies.cjs +53 -0
  426. package/lib/resources/recurring_order_copies.d.cts +4 -0
  427. package/lib/resources/recurring_order_copies.d.ts +4 -0
  428. package/lib/resources/recurring_order_copies.js +49 -0
  429. package/lib/resources/refunds.cjs +58 -0
  430. package/lib/resources/refunds.d.cts +4 -0
  431. package/lib/resources/refunds.d.ts +4 -0
  432. package/lib/resources/refunds.js +54 -0
  433. package/lib/resources/reserved_stocks.cjs +44 -0
  434. package/lib/resources/reserved_stocks.d.cts +4 -0
  435. package/lib/resources/reserved_stocks.d.ts +4 -0
  436. package/lib/resources/reserved_stocks.js +40 -0
  437. package/lib/resources/resource_errors.cjs +28 -0
  438. package/lib/resources/resource_errors.d.cts +4 -0
  439. package/lib/resources/resource_errors.d.ts +4 -0
  440. package/lib/resources/resource_errors.js +24 -0
  441. package/lib/resources/return_line_items.cjs +48 -0
  442. package/lib/resources/return_line_items.d.cts +4 -0
  443. package/lib/resources/return_line_items.d.ts +4 -0
  444. package/lib/resources/return_line_items.js +44 -0
  445. package/lib/resources/returns.cjs +122 -0
  446. package/lib/resources/returns.d.cts +4 -0
  447. package/lib/resources/returns.d.ts +4 -0
  448. package/lib/resources/returns.js +118 -0
  449. package/lib/resources/satispay_gateways.cjs +49 -0
  450. package/lib/resources/satispay_gateways.d.cts +4 -0
  451. package/lib/resources/satispay_gateways.d.ts +4 -0
  452. package/lib/resources/satispay_gateways.js +45 -0
  453. package/lib/resources/satispay_payments.cjs +52 -0
  454. package/lib/resources/satispay_payments.d.cts +4 -0
  455. package/lib/resources/satispay_payments.d.ts +4 -0
  456. package/lib/resources/satispay_payments.js +48 -0
  457. package/lib/resources/shipments.cjs +152 -0
  458. package/lib/resources/shipments.d.cts +4 -0
  459. package/lib/resources/shipments.d.ts +4 -0
  460. package/lib/resources/shipments.js +148 -0
  461. package/lib/resources/shipping_categories.cjs +49 -0
  462. package/lib/resources/shipping_categories.d.cts +4 -0
  463. package/lib/resources/shipping_categories.d.ts +4 -0
  464. package/lib/resources/shipping_categories.js +45 -0
  465. package/lib/resources/shipping_method_tiers.cjs +40 -0
  466. package/lib/resources/shipping_method_tiers.d.cts +4 -0
  467. package/lib/resources/shipping_method_tiers.d.ts +4 -0
  468. package/lib/resources/shipping_method_tiers.js +36 -0
  469. package/lib/resources/shipping_methods.cjs +86 -0
  470. package/lib/resources/shipping_methods.d.cts +4 -0
  471. package/lib/resources/shipping_methods.d.ts +4 -0
  472. package/lib/resources/shipping_methods.js +82 -0
  473. package/lib/resources/shipping_weight_tiers.cjs +49 -0
  474. package/lib/resources/shipping_weight_tiers.d.cts +4 -0
  475. package/lib/resources/shipping_weight_tiers.d.ts +4 -0
  476. package/lib/resources/shipping_weight_tiers.js +45 -0
  477. package/lib/resources/shipping_zones.cjs +45 -0
  478. package/lib/resources/shipping_zones.d.cts +4 -0
  479. package/lib/resources/shipping_zones.d.ts +4 -0
  480. package/lib/resources/shipping_zones.js +41 -0
  481. package/lib/resources/sku_list_items.cjs +49 -0
  482. package/lib/resources/sku_list_items.d.cts +4 -0
  483. package/lib/resources/sku_list_items.d.ts +4 -0
  484. package/lib/resources/sku_list_items.js +45 -0
  485. package/lib/resources/sku_list_promotion_rules.cjs +49 -0
  486. package/lib/resources/sku_list_promotion_rules.d.cts +4 -0
  487. package/lib/resources/sku_list_promotion_rules.d.ts +4 -0
  488. package/lib/resources/sku_list_promotion_rules.js +45 -0
  489. package/lib/resources/sku_lists.cjs +65 -0
  490. package/lib/resources/sku_lists.d.cts +4 -0
  491. package/lib/resources/sku_lists.d.ts +4 -0
  492. package/lib/resources/sku_lists.js +61 -0
  493. package/lib/resources/sku_options.cjs +57 -0
  494. package/lib/resources/sku_options.d.cts +4 -0
  495. package/lib/resources/sku_options.d.ts +4 -0
  496. package/lib/resources/sku_options.js +53 -0
  497. package/lib/resources/skus.cjs +101 -0
  498. package/lib/resources/skus.d.cts +4 -0
  499. package/lib/resources/skus.d.ts +4 -0
  500. package/lib/resources/skus.js +97 -0
  501. package/lib/resources/stock_items.cjs +64 -0
  502. package/lib/resources/stock_items.d.cts +4 -0
  503. package/lib/resources/stock_items.d.ts +4 -0
  504. package/lib/resources/stock_items.js +60 -0
  505. package/lib/resources/stock_line_items.cjs +70 -0
  506. package/lib/resources/stock_line_items.d.cts +4 -0
  507. package/lib/resources/stock_line_items.d.ts +4 -0
  508. package/lib/resources/stock_line_items.js +66 -0
  509. package/lib/resources/stock_locations.cjs +69 -0
  510. package/lib/resources/stock_locations.d.cts +4 -0
  511. package/lib/resources/stock_locations.d.ts +4 -0
  512. package/lib/resources/stock_locations.js +65 -0
  513. package/lib/resources/stock_reservations.cjs +68 -0
  514. package/lib/resources/stock_reservations.d.cts +4 -0
  515. package/lib/resources/stock_reservations.d.ts +4 -0
  516. package/lib/resources/stock_reservations.js +64 -0
  517. package/lib/resources/stock_transfers.cjs +91 -0
  518. package/lib/resources/stock_transfers.d.cts +4 -0
  519. package/lib/resources/stock_transfers.d.ts +4 -0
  520. package/lib/resources/stock_transfers.js +87 -0
  521. package/lib/resources/stores.cjs +65 -0
  522. package/lib/resources/stores.d.cts +4 -0
  523. package/lib/resources/stores.d.ts +4 -0
  524. package/lib/resources/stores.js +61 -0
  525. package/lib/resources/stripe_gateways.cjs +49 -0
  526. package/lib/resources/stripe_gateways.d.cts +4 -0
  527. package/lib/resources/stripe_gateways.d.ts +4 -0
  528. package/lib/resources/stripe_gateways.js +45 -0
  529. package/lib/resources/stripe_payments.cjs +55 -0
  530. package/lib/resources/stripe_payments.d.cts +4 -0
  531. package/lib/resources/stripe_payments.d.ts +4 -0
  532. package/lib/resources/stripe_payments.js +51 -0
  533. package/lib/resources/stripe_tax_accounts.cjs +57 -0
  534. package/lib/resources/stripe_tax_accounts.d.cts +4 -0
  535. package/lib/resources/stripe_tax_accounts.d.ts +4 -0
  536. package/lib/resources/stripe_tax_accounts.js +53 -0
  537. package/lib/resources/subscription_models.cjs +49 -0
  538. package/lib/resources/subscription_models.d.cts +4 -0
  539. package/lib/resources/subscription_models.d.ts +4 -0
  540. package/lib/resources/subscription_models.js +45 -0
  541. package/lib/resources/tags.cjs +37 -0
  542. package/lib/resources/tags.d.cts +4 -0
  543. package/lib/resources/tags.d.ts +4 -0
  544. package/lib/resources/tags.js +33 -0
  545. package/lib/resources/talon_one_accounts.cjs +53 -0
  546. package/lib/resources/talon_one_accounts.d.cts +4 -0
  547. package/lib/resources/talon_one_accounts.d.ts +4 -0
  548. package/lib/resources/talon_one_accounts.js +49 -0
  549. package/lib/resources/tax_calculators.cjs +44 -0
  550. package/lib/resources/tax_calculators.d.cts +4 -0
  551. package/lib/resources/tax_calculators.d.ts +4 -0
  552. package/lib/resources/tax_calculators.js +40 -0
  553. package/lib/resources/tax_categories.cjs +49 -0
  554. package/lib/resources/tax_categories.d.cts +4 -0
  555. package/lib/resources/tax_categories.d.ts +4 -0
  556. package/lib/resources/tax_categories.js +45 -0
  557. package/lib/resources/tax_rules.cjs +45 -0
  558. package/lib/resources/tax_rules.d.cts +4 -0
  559. package/lib/resources/tax_rules.d.ts +4 -0
  560. package/lib/resources/tax_rules.js +41 -0
  561. package/lib/resources/taxjar_accounts.cjs +57 -0
  562. package/lib/resources/taxjar_accounts.d.cts +4 -0
  563. package/lib/resources/taxjar_accounts.d.ts +4 -0
  564. package/lib/resources/taxjar_accounts.js +53 -0
  565. package/lib/resources/transactions.cjs +44 -0
  566. package/lib/resources/transactions.d.cts +4 -0
  567. package/lib/resources/transactions.d.ts +4 -0
  568. package/lib/resources/transactions.js +40 -0
  569. package/lib/resources/versions.cjs +28 -0
  570. package/lib/resources/versions.d.cts +4 -0
  571. package/lib/resources/versions.d.ts +4 -0
  572. package/lib/resources/versions.js +24 -0
  573. package/lib/resources/vertex_accounts.cjs +56 -0
  574. package/lib/resources/vertex_accounts.d.cts +4 -0
  575. package/lib/resources/vertex_accounts.d.ts +4 -0
  576. package/lib/resources/vertex_accounts.js +52 -0
  577. package/lib/resources/voids.cjs +54 -0
  578. package/lib/resources/voids.d.cts +4 -0
  579. package/lib/resources/voids.d.ts +4 -0
  580. package/lib/resources/voids.js +50 -0
  581. package/lib/resources/webhooks.cjs +54 -0
  582. package/lib/resources/webhooks.d.cts +4 -0
  583. package/lib/resources/webhooks.d.ts +4 -0
  584. package/lib/resources/webhooks.js +50 -0
  585. package/lib/resources/wire_transfers.cjs +45 -0
  586. package/lib/resources/wire_transfers.d.cts +4 -0
  587. package/lib/resources/wire_transfers.d.ts +4 -0
  588. package/lib/resources/wire_transfers.js +41 -0
  589. package/lib/static.cjs +39 -0
  590. package/lib/static.d.cts +19 -0
  591. package/lib/static.d.ts +19 -0
  592. package/lib/static.js +33 -0
  593. package/lib/types.cjs +2 -0
  594. package/lib/types.d.cts +7 -0
  595. package/lib/types.d.ts +7 -0
  596. package/lib/types.js +1 -0
  597. package/lib/util.cjs +37 -0
  598. package/lib/util.d.cts +13 -0
  599. package/lib/util.d.ts +13 -0
  600. package/lib/util.js +32 -0
  601. package/package.json +12 -10
@@ -0,0 +1,93 @@
1
+ import { ApiResource } from '../resource';
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5
+ var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
6
+ const _OrderSubscriptions = class _OrderSubscriptions extends ApiResource {
7
+ async create(resource, params, options) {
8
+ return this.resources.create({ ...resource, type: _OrderSubscriptions.TYPE }, params, options);
9
+ }
10
+ async update(resource, params, options) {
11
+ return this.resources.update({ ...resource, type: _OrderSubscriptions.TYPE }, params, options);
12
+ }
13
+ async delete(id, options) {
14
+ await this.resources.delete(typeof id === "string" ? { id, type: _OrderSubscriptions.TYPE } : id, options);
15
+ }
16
+ async market(orderSubscriptionId, params, options) {
17
+ const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
18
+ return this.resources.fetch({ type: "markets" }, `order_subscriptions/${_orderSubscriptionId}/market`, params, options);
19
+ }
20
+ async subscription_model(orderSubscriptionId, params, options) {
21
+ const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
22
+ return this.resources.fetch({ type: "subscription_models" }, `order_subscriptions/${_orderSubscriptionId}/subscription_model`, params, options);
23
+ }
24
+ async source_order(orderSubscriptionId, params, options) {
25
+ const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
26
+ return this.resources.fetch({ type: "orders" }, `order_subscriptions/${_orderSubscriptionId}/source_order`, params, options);
27
+ }
28
+ async customer(orderSubscriptionId, params, options) {
29
+ const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
30
+ return this.resources.fetch({ type: "customers" }, `order_subscriptions/${_orderSubscriptionId}/customer`, params, options);
31
+ }
32
+ async customer_payment_source(orderSubscriptionId, params, options) {
33
+ const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
34
+ return this.resources.fetch({ type: "customer_payment_sources" }, `order_subscriptions/${_orderSubscriptionId}/customer_payment_source`, params, options);
35
+ }
36
+ async order_subscription_items(orderSubscriptionId, params, options) {
37
+ const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
38
+ return this.resources.fetch({ type: "order_subscription_items" }, `order_subscriptions/${_orderSubscriptionId}/order_subscription_items`, params, options);
39
+ }
40
+ async order_factories(orderSubscriptionId, params, options) {
41
+ const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
42
+ return this.resources.fetch({ type: "order_factories" }, `order_subscriptions/${_orderSubscriptionId}/order_factories`, params, options);
43
+ }
44
+ async recurring_order_copies(orderSubscriptionId, params, options) {
45
+ const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
46
+ return this.resources.fetch({ type: "recurring_order_copies" }, `order_subscriptions/${_orderSubscriptionId}/recurring_order_copies`, params, options);
47
+ }
48
+ async orders(orderSubscriptionId, params, options) {
49
+ const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
50
+ return this.resources.fetch({ type: "orders" }, `order_subscriptions/${_orderSubscriptionId}/orders`, params, options);
51
+ }
52
+ async events(orderSubscriptionId, params, options) {
53
+ const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
54
+ return this.resources.fetch({ type: "events" }, `order_subscriptions/${_orderSubscriptionId}/events`, params, options);
55
+ }
56
+ async tags(orderSubscriptionId, params, options) {
57
+ const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
58
+ return this.resources.fetch({ type: "tags" }, `order_subscriptions/${_orderSubscriptionId}/tags`, params, options);
59
+ }
60
+ async versions(orderSubscriptionId, params, options) {
61
+ const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
62
+ return this.resources.fetch({ type: "versions" }, `order_subscriptions/${_orderSubscriptionId}/versions`, params, options);
63
+ }
64
+ async _activate(id, params, options) {
65
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _OrderSubscriptions.TYPE, _activate: true }, params, options);
66
+ }
67
+ async _deactivate(id, params, options) {
68
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _OrderSubscriptions.TYPE, _deactivate: true }, params, options);
69
+ }
70
+ async _cancel(id, params, options) {
71
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _OrderSubscriptions.TYPE, _cancel: true }, params, options);
72
+ }
73
+ async _convert(id, params, options) {
74
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _OrderSubscriptions.TYPE, _convert: true }, params, options);
75
+ }
76
+ isOrderSubscription(resource) {
77
+ return resource.type && resource.type === _OrderSubscriptions.TYPE;
78
+ }
79
+ relationship(id) {
80
+ return super.relationshipOneToOne(id);
81
+ }
82
+ relationshipToMany(...ids) {
83
+ return super.relationshipOneToMany(...ids);
84
+ }
85
+ type() {
86
+ return _OrderSubscriptions.TYPE;
87
+ }
88
+ };
89
+ __publicField(_OrderSubscriptions, "TYPE", "order_subscriptions");
90
+ let OrderSubscriptions = _OrderSubscriptions;
91
+ var order_subscriptions_default = OrderSubscriptions;
92
+
93
+ export { order_subscriptions_default as default };
@@ -0,0 +1,266 @@
1
+ 'use strict';
2
+
3
+ var resource = require('../resource');
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
8
+ const _Orders = class _Orders extends resource.ApiResource {
9
+ async create(resource, params, options) {
10
+ return this.resources.create({ ...resource, type: _Orders.TYPE }, params, options);
11
+ }
12
+ async update(resource, params, options) {
13
+ return this.resources.update({ ...resource, type: _Orders.TYPE }, params, options);
14
+ }
15
+ async delete(id, options) {
16
+ await this.resources.delete(typeof id === "string" ? { id, type: _Orders.TYPE } : id, options);
17
+ }
18
+ async market(orderId, params, options) {
19
+ const _orderId = orderId.id || orderId;
20
+ return this.resources.fetch({ type: "markets" }, `orders/${_orderId}/market`, params, options);
21
+ }
22
+ async customer(orderId, params, options) {
23
+ const _orderId = orderId.id || orderId;
24
+ return this.resources.fetch({ type: "customers" }, `orders/${_orderId}/customer`, params, options);
25
+ }
26
+ async shipping_address(orderId, params, options) {
27
+ const _orderId = orderId.id || orderId;
28
+ return this.resources.fetch({ type: "addresses" }, `orders/${_orderId}/shipping_address`, params, options);
29
+ }
30
+ async billing_address(orderId, params, options) {
31
+ const _orderId = orderId.id || orderId;
32
+ return this.resources.fetch({ type: "addresses" }, `orders/${_orderId}/billing_address`, params, options);
33
+ }
34
+ async store(orderId, params, options) {
35
+ const _orderId = orderId.id || orderId;
36
+ return this.resources.fetch({ type: "stores" }, `orders/${_orderId}/store`, params, options);
37
+ }
38
+ async available_payment_methods(orderId, params, options) {
39
+ const _orderId = orderId.id || orderId;
40
+ return this.resources.fetch({ type: "payment_methods" }, `orders/${_orderId}/available_payment_methods`, params, options);
41
+ }
42
+ async available_customer_payment_sources(orderId, params, options) {
43
+ const _orderId = orderId.id || orderId;
44
+ return this.resources.fetch({ type: "customer_payment_sources" }, `orders/${_orderId}/available_customer_payment_sources`, params, options);
45
+ }
46
+ async available_free_skus(orderId, params, options) {
47
+ const _orderId = orderId.id || orderId;
48
+ return this.resources.fetch({ type: "skus" }, `orders/${_orderId}/available_free_skus`, params, options);
49
+ }
50
+ async available_free_bundles(orderId, params, options) {
51
+ const _orderId = orderId.id || orderId;
52
+ return this.resources.fetch({ type: "bundles" }, `orders/${_orderId}/available_free_bundles`, params, options);
53
+ }
54
+ async payment_method(orderId, params, options) {
55
+ const _orderId = orderId.id || orderId;
56
+ return this.resources.fetch({ type: "payment_methods" }, `orders/${_orderId}/payment_method`, params, options);
57
+ }
58
+ async line_items(orderId, params, options) {
59
+ const _orderId = orderId.id || orderId;
60
+ return this.resources.fetch({ type: "line_items" }, `orders/${_orderId}/line_items`, params, options);
61
+ }
62
+ async line_item_options(orderId, params, options) {
63
+ const _orderId = orderId.id || orderId;
64
+ return this.resources.fetch({ type: "line_item_options" }, `orders/${_orderId}/line_item_options`, params, options);
65
+ }
66
+ async stock_reservations(orderId, params, options) {
67
+ const _orderId = orderId.id || orderId;
68
+ return this.resources.fetch({ type: "stock_reservations" }, `orders/${_orderId}/stock_reservations`, params, options);
69
+ }
70
+ async stock_line_items(orderId, params, options) {
71
+ const _orderId = orderId.id || orderId;
72
+ return this.resources.fetch({ type: "stock_line_items" }, `orders/${_orderId}/stock_line_items`, params, options);
73
+ }
74
+ async stock_transfers(orderId, params, options) {
75
+ const _orderId = orderId.id || orderId;
76
+ return this.resources.fetch({ type: "stock_transfers" }, `orders/${_orderId}/stock_transfers`, params, options);
77
+ }
78
+ async shipments(orderId, params, options) {
79
+ const _orderId = orderId.id || orderId;
80
+ return this.resources.fetch({ type: "shipments" }, `orders/${_orderId}/shipments`, params, options);
81
+ }
82
+ async payment_options(orderId, params, options) {
83
+ const _orderId = orderId.id || orderId;
84
+ return this.resources.fetch({ type: "payment_options" }, `orders/${_orderId}/payment_options`, params, options);
85
+ }
86
+ async authorizations(orderId, params, options) {
87
+ const _orderId = orderId.id || orderId;
88
+ return this.resources.fetch({ type: "authorizations" }, `orders/${_orderId}/authorizations`, params, options);
89
+ }
90
+ async captures(orderId, params, options) {
91
+ const _orderId = orderId.id || orderId;
92
+ return this.resources.fetch({ type: "captures" }, `orders/${_orderId}/captures`, params, options);
93
+ }
94
+ async voids(orderId, params, options) {
95
+ const _orderId = orderId.id || orderId;
96
+ return this.resources.fetch({ type: "voids" }, `orders/${_orderId}/voids`, params, options);
97
+ }
98
+ async refunds(orderId, params, options) {
99
+ const _orderId = orderId.id || orderId;
100
+ return this.resources.fetch({ type: "refunds" }, `orders/${_orderId}/refunds`, params, options);
101
+ }
102
+ async returns(orderId, params, options) {
103
+ const _orderId = orderId.id || orderId;
104
+ return this.resources.fetch({ type: "returns" }, `orders/${_orderId}/returns`, params, options);
105
+ }
106
+ async order_subscription(orderId, params, options) {
107
+ const _orderId = orderId.id || orderId;
108
+ return this.resources.fetch({ type: "order_subscriptions" }, `orders/${_orderId}/order_subscription`, params, options);
109
+ }
110
+ async order_subscriptions(orderId, params, options) {
111
+ const _orderId = orderId.id || orderId;
112
+ return this.resources.fetch({ type: "order_subscriptions" }, `orders/${_orderId}/order_subscriptions`, params, options);
113
+ }
114
+ async order_factories(orderId, params, options) {
115
+ const _orderId = orderId.id || orderId;
116
+ return this.resources.fetch({ type: "order_factories" }, `orders/${_orderId}/order_factories`, params, options);
117
+ }
118
+ async order_copies(orderId, params, options) {
119
+ const _orderId = orderId.id || orderId;
120
+ return this.resources.fetch({ type: "order_copies" }, `orders/${_orderId}/order_copies`, params, options);
121
+ }
122
+ async recurring_order_copies(orderId, params, options) {
123
+ const _orderId = orderId.id || orderId;
124
+ return this.resources.fetch({ type: "recurring_order_copies" }, `orders/${_orderId}/recurring_order_copies`, params, options);
125
+ }
126
+ async attachments(orderId, params, options) {
127
+ const _orderId = orderId.id || orderId;
128
+ return this.resources.fetch({ type: "attachments" }, `orders/${_orderId}/attachments`, params, options);
129
+ }
130
+ async notifications(orderId, params, options) {
131
+ const _orderId = orderId.id || orderId;
132
+ return this.resources.fetch({ type: "notifications" }, `orders/${_orderId}/notifications`, params, options);
133
+ }
134
+ async links(orderId, params, options) {
135
+ const _orderId = orderId.id || orderId;
136
+ return this.resources.fetch({ type: "links" }, `orders/${_orderId}/links`, params, options);
137
+ }
138
+ async resource_errors(orderId, params, options) {
139
+ const _orderId = orderId.id || orderId;
140
+ return this.resources.fetch({ type: "resource_errors" }, `orders/${_orderId}/resource_errors`, params, options);
141
+ }
142
+ async events(orderId, params, options) {
143
+ const _orderId = orderId.id || orderId;
144
+ return this.resources.fetch({ type: "events" }, `orders/${_orderId}/events`, params, options);
145
+ }
146
+ async tags(orderId, params, options) {
147
+ const _orderId = orderId.id || orderId;
148
+ return this.resources.fetch({ type: "tags" }, `orders/${_orderId}/tags`, params, options);
149
+ }
150
+ async versions(orderId, params, options) {
151
+ const _orderId = orderId.id || orderId;
152
+ return this.resources.fetch({ type: "versions" }, `orders/${_orderId}/versions`, params, options);
153
+ }
154
+ async _archive(id, params, options) {
155
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _archive: true }, params, options);
156
+ }
157
+ async _unarchive(id, params, options) {
158
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _unarchive: true }, params, options);
159
+ }
160
+ async _pending(id, params, options) {
161
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _pending: true }, params, options);
162
+ }
163
+ async _place(id, params, options) {
164
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _place: true }, params, options);
165
+ }
166
+ async _cancel(id, params, options) {
167
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _cancel: true }, params, options);
168
+ }
169
+ async _approve(id, params, options) {
170
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _approve: true }, params, options);
171
+ }
172
+ async _approve_and_capture(id, params, options) {
173
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _approve_and_capture: true }, params, options);
174
+ }
175
+ async _authorize(id, params, options) {
176
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _authorize: true }, params, options);
177
+ }
178
+ async _authorization_amount_cents(id, triggerValue, params, options) {
179
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _authorization_amount_cents: triggerValue }, params, options);
180
+ }
181
+ async _capture(id, params, options) {
182
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _capture: true }, params, options);
183
+ }
184
+ async _refund(id, params, options) {
185
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _refund: true }, params, options);
186
+ }
187
+ async _fulfill(id, params, options) {
188
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _fulfill: true }, params, options);
189
+ }
190
+ async _update_taxes(id, params, options) {
191
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _update_taxes: true }, params, options);
192
+ }
193
+ async _nullify_payment_source(id, params, options) {
194
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _nullify_payment_source: true }, params, options);
195
+ }
196
+ async _fix_payment_source(id, params, options) {
197
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _fix_payment_source: true }, params, options);
198
+ }
199
+ async _billing_address_clone_id(id, triggerValue, params, options) {
200
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _billing_address_clone_id: triggerValue }, params, options);
201
+ }
202
+ async _shipping_address_clone_id(id, triggerValue, params, options) {
203
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _shipping_address_clone_id: triggerValue }, params, options);
204
+ }
205
+ async _customer_payment_source_id(id, triggerValue, params, options) {
206
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _customer_payment_source_id: triggerValue }, params, options);
207
+ }
208
+ async _shipping_address_same_as_billing(id, params, options) {
209
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _shipping_address_same_as_billing: true }, params, options);
210
+ }
211
+ async _billing_address_same_as_shipping(id, params, options) {
212
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _billing_address_same_as_shipping: true }, params, options);
213
+ }
214
+ async _commit_invoice(id, params, options) {
215
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _commit_invoice: true }, params, options);
216
+ }
217
+ async _refund_invoice(id, params, options) {
218
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _refund_invoice: true }, params, options);
219
+ }
220
+ async _save_payment_source_to_customer_wallet(id, params, options) {
221
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _save_payment_source_to_customer_wallet: true }, params, options);
222
+ }
223
+ async _save_shipping_address_to_customer_address_book(id, params, options) {
224
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _save_shipping_address_to_customer_address_book: true }, params, options);
225
+ }
226
+ async _save_billing_address_to_customer_address_book(id, params, options) {
227
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _save_billing_address_to_customer_address_book: true }, params, options);
228
+ }
229
+ async _refresh(id, params, options) {
230
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _refresh: true }, params, options);
231
+ }
232
+ async _validate(id, params, options) {
233
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _validate: true }, params, options);
234
+ }
235
+ async _create_subscriptions(id, params, options) {
236
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _create_subscriptions: true }, params, options);
237
+ }
238
+ async _start_editing(id, params, options) {
239
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _start_editing: true }, params, options);
240
+ }
241
+ async _stop_editing(id, params, options) {
242
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _stop_editing: true }, params, options);
243
+ }
244
+ async _reset_circuit(id, params, options) {
245
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _reset_circuit: true }, params, options);
246
+ }
247
+ isOrder(resource) {
248
+ return resource.type && resource.type === _Orders.TYPE;
249
+ }
250
+ relationship(id) {
251
+ return super.relationshipOneToOne(id);
252
+ }
253
+ relationshipToMany(...ids) {
254
+ return super.relationshipOneToMany(...ids);
255
+ }
256
+ type() {
257
+ return _Orders.TYPE;
258
+ }
259
+ };
260
+ __publicField(_Orders, "TYPE", "orders");
261
+ let Orders = _Orders;
262
+ var orders_default = Orders;
263
+
264
+ module.exports = orders_default;
265
+
266
+ module.exports = exports.default;
@@ -0,0 +1,4 @@
1
+ export { dR as Order, dS as OrderCreate, dU as OrderSort, kQ as OrderType, dT as OrderUpdate, iG as default } from '../api-BYcswOJ0.cjs';
2
+ import '../client.cjs';
3
+ import '../interceptor-5MISI1yn.cjs';
4
+ import '../types.cjs';
@@ -0,0 +1,4 @@
1
+ export { dR as Order, dS as OrderCreate, dU as OrderSort, kQ as OrderType, dT as OrderUpdate, iG as default } from '../api-Cknm0QL_.js';
2
+ import '../client.js';
3
+ import '../interceptor-5MISI1yn.js';
4
+ import '../types.js';
@@ -0,0 +1,262 @@
1
+ import { ApiResource } from '../resource';
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5
+ var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
6
+ const _Orders = class _Orders extends ApiResource {
7
+ async create(resource, params, options) {
8
+ return this.resources.create({ ...resource, type: _Orders.TYPE }, params, options);
9
+ }
10
+ async update(resource, params, options) {
11
+ return this.resources.update({ ...resource, type: _Orders.TYPE }, params, options);
12
+ }
13
+ async delete(id, options) {
14
+ await this.resources.delete(typeof id === "string" ? { id, type: _Orders.TYPE } : id, options);
15
+ }
16
+ async market(orderId, params, options) {
17
+ const _orderId = orderId.id || orderId;
18
+ return this.resources.fetch({ type: "markets" }, `orders/${_orderId}/market`, params, options);
19
+ }
20
+ async customer(orderId, params, options) {
21
+ const _orderId = orderId.id || orderId;
22
+ return this.resources.fetch({ type: "customers" }, `orders/${_orderId}/customer`, params, options);
23
+ }
24
+ async shipping_address(orderId, params, options) {
25
+ const _orderId = orderId.id || orderId;
26
+ return this.resources.fetch({ type: "addresses" }, `orders/${_orderId}/shipping_address`, params, options);
27
+ }
28
+ async billing_address(orderId, params, options) {
29
+ const _orderId = orderId.id || orderId;
30
+ return this.resources.fetch({ type: "addresses" }, `orders/${_orderId}/billing_address`, params, options);
31
+ }
32
+ async store(orderId, params, options) {
33
+ const _orderId = orderId.id || orderId;
34
+ return this.resources.fetch({ type: "stores" }, `orders/${_orderId}/store`, params, options);
35
+ }
36
+ async available_payment_methods(orderId, params, options) {
37
+ const _orderId = orderId.id || orderId;
38
+ return this.resources.fetch({ type: "payment_methods" }, `orders/${_orderId}/available_payment_methods`, params, options);
39
+ }
40
+ async available_customer_payment_sources(orderId, params, options) {
41
+ const _orderId = orderId.id || orderId;
42
+ return this.resources.fetch({ type: "customer_payment_sources" }, `orders/${_orderId}/available_customer_payment_sources`, params, options);
43
+ }
44
+ async available_free_skus(orderId, params, options) {
45
+ const _orderId = orderId.id || orderId;
46
+ return this.resources.fetch({ type: "skus" }, `orders/${_orderId}/available_free_skus`, params, options);
47
+ }
48
+ async available_free_bundles(orderId, params, options) {
49
+ const _orderId = orderId.id || orderId;
50
+ return this.resources.fetch({ type: "bundles" }, `orders/${_orderId}/available_free_bundles`, params, options);
51
+ }
52
+ async payment_method(orderId, params, options) {
53
+ const _orderId = orderId.id || orderId;
54
+ return this.resources.fetch({ type: "payment_methods" }, `orders/${_orderId}/payment_method`, params, options);
55
+ }
56
+ async line_items(orderId, params, options) {
57
+ const _orderId = orderId.id || orderId;
58
+ return this.resources.fetch({ type: "line_items" }, `orders/${_orderId}/line_items`, params, options);
59
+ }
60
+ async line_item_options(orderId, params, options) {
61
+ const _orderId = orderId.id || orderId;
62
+ return this.resources.fetch({ type: "line_item_options" }, `orders/${_orderId}/line_item_options`, params, options);
63
+ }
64
+ async stock_reservations(orderId, params, options) {
65
+ const _orderId = orderId.id || orderId;
66
+ return this.resources.fetch({ type: "stock_reservations" }, `orders/${_orderId}/stock_reservations`, params, options);
67
+ }
68
+ async stock_line_items(orderId, params, options) {
69
+ const _orderId = orderId.id || orderId;
70
+ return this.resources.fetch({ type: "stock_line_items" }, `orders/${_orderId}/stock_line_items`, params, options);
71
+ }
72
+ async stock_transfers(orderId, params, options) {
73
+ const _orderId = orderId.id || orderId;
74
+ return this.resources.fetch({ type: "stock_transfers" }, `orders/${_orderId}/stock_transfers`, params, options);
75
+ }
76
+ async shipments(orderId, params, options) {
77
+ const _orderId = orderId.id || orderId;
78
+ return this.resources.fetch({ type: "shipments" }, `orders/${_orderId}/shipments`, params, options);
79
+ }
80
+ async payment_options(orderId, params, options) {
81
+ const _orderId = orderId.id || orderId;
82
+ return this.resources.fetch({ type: "payment_options" }, `orders/${_orderId}/payment_options`, params, options);
83
+ }
84
+ async authorizations(orderId, params, options) {
85
+ const _orderId = orderId.id || orderId;
86
+ return this.resources.fetch({ type: "authorizations" }, `orders/${_orderId}/authorizations`, params, options);
87
+ }
88
+ async captures(orderId, params, options) {
89
+ const _orderId = orderId.id || orderId;
90
+ return this.resources.fetch({ type: "captures" }, `orders/${_orderId}/captures`, params, options);
91
+ }
92
+ async voids(orderId, params, options) {
93
+ const _orderId = orderId.id || orderId;
94
+ return this.resources.fetch({ type: "voids" }, `orders/${_orderId}/voids`, params, options);
95
+ }
96
+ async refunds(orderId, params, options) {
97
+ const _orderId = orderId.id || orderId;
98
+ return this.resources.fetch({ type: "refunds" }, `orders/${_orderId}/refunds`, params, options);
99
+ }
100
+ async returns(orderId, params, options) {
101
+ const _orderId = orderId.id || orderId;
102
+ return this.resources.fetch({ type: "returns" }, `orders/${_orderId}/returns`, params, options);
103
+ }
104
+ async order_subscription(orderId, params, options) {
105
+ const _orderId = orderId.id || orderId;
106
+ return this.resources.fetch({ type: "order_subscriptions" }, `orders/${_orderId}/order_subscription`, params, options);
107
+ }
108
+ async order_subscriptions(orderId, params, options) {
109
+ const _orderId = orderId.id || orderId;
110
+ return this.resources.fetch({ type: "order_subscriptions" }, `orders/${_orderId}/order_subscriptions`, params, options);
111
+ }
112
+ async order_factories(orderId, params, options) {
113
+ const _orderId = orderId.id || orderId;
114
+ return this.resources.fetch({ type: "order_factories" }, `orders/${_orderId}/order_factories`, params, options);
115
+ }
116
+ async order_copies(orderId, params, options) {
117
+ const _orderId = orderId.id || orderId;
118
+ return this.resources.fetch({ type: "order_copies" }, `orders/${_orderId}/order_copies`, params, options);
119
+ }
120
+ async recurring_order_copies(orderId, params, options) {
121
+ const _orderId = orderId.id || orderId;
122
+ return this.resources.fetch({ type: "recurring_order_copies" }, `orders/${_orderId}/recurring_order_copies`, params, options);
123
+ }
124
+ async attachments(orderId, params, options) {
125
+ const _orderId = orderId.id || orderId;
126
+ return this.resources.fetch({ type: "attachments" }, `orders/${_orderId}/attachments`, params, options);
127
+ }
128
+ async notifications(orderId, params, options) {
129
+ const _orderId = orderId.id || orderId;
130
+ return this.resources.fetch({ type: "notifications" }, `orders/${_orderId}/notifications`, params, options);
131
+ }
132
+ async links(orderId, params, options) {
133
+ const _orderId = orderId.id || orderId;
134
+ return this.resources.fetch({ type: "links" }, `orders/${_orderId}/links`, params, options);
135
+ }
136
+ async resource_errors(orderId, params, options) {
137
+ const _orderId = orderId.id || orderId;
138
+ return this.resources.fetch({ type: "resource_errors" }, `orders/${_orderId}/resource_errors`, params, options);
139
+ }
140
+ async events(orderId, params, options) {
141
+ const _orderId = orderId.id || orderId;
142
+ return this.resources.fetch({ type: "events" }, `orders/${_orderId}/events`, params, options);
143
+ }
144
+ async tags(orderId, params, options) {
145
+ const _orderId = orderId.id || orderId;
146
+ return this.resources.fetch({ type: "tags" }, `orders/${_orderId}/tags`, params, options);
147
+ }
148
+ async versions(orderId, params, options) {
149
+ const _orderId = orderId.id || orderId;
150
+ return this.resources.fetch({ type: "versions" }, `orders/${_orderId}/versions`, params, options);
151
+ }
152
+ async _archive(id, params, options) {
153
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _archive: true }, params, options);
154
+ }
155
+ async _unarchive(id, params, options) {
156
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _unarchive: true }, params, options);
157
+ }
158
+ async _pending(id, params, options) {
159
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _pending: true }, params, options);
160
+ }
161
+ async _place(id, params, options) {
162
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _place: true }, params, options);
163
+ }
164
+ async _cancel(id, params, options) {
165
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _cancel: true }, params, options);
166
+ }
167
+ async _approve(id, params, options) {
168
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _approve: true }, params, options);
169
+ }
170
+ async _approve_and_capture(id, params, options) {
171
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _approve_and_capture: true }, params, options);
172
+ }
173
+ async _authorize(id, params, options) {
174
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _authorize: true }, params, options);
175
+ }
176
+ async _authorization_amount_cents(id, triggerValue, params, options) {
177
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _authorization_amount_cents: triggerValue }, params, options);
178
+ }
179
+ async _capture(id, params, options) {
180
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _capture: true }, params, options);
181
+ }
182
+ async _refund(id, params, options) {
183
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _refund: true }, params, options);
184
+ }
185
+ async _fulfill(id, params, options) {
186
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _fulfill: true }, params, options);
187
+ }
188
+ async _update_taxes(id, params, options) {
189
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _update_taxes: true }, params, options);
190
+ }
191
+ async _nullify_payment_source(id, params, options) {
192
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _nullify_payment_source: true }, params, options);
193
+ }
194
+ async _fix_payment_source(id, params, options) {
195
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _fix_payment_source: true }, params, options);
196
+ }
197
+ async _billing_address_clone_id(id, triggerValue, params, options) {
198
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _billing_address_clone_id: triggerValue }, params, options);
199
+ }
200
+ async _shipping_address_clone_id(id, triggerValue, params, options) {
201
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _shipping_address_clone_id: triggerValue }, params, options);
202
+ }
203
+ async _customer_payment_source_id(id, triggerValue, params, options) {
204
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _customer_payment_source_id: triggerValue }, params, options);
205
+ }
206
+ async _shipping_address_same_as_billing(id, params, options) {
207
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _shipping_address_same_as_billing: true }, params, options);
208
+ }
209
+ async _billing_address_same_as_shipping(id, params, options) {
210
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _billing_address_same_as_shipping: true }, params, options);
211
+ }
212
+ async _commit_invoice(id, params, options) {
213
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _commit_invoice: true }, params, options);
214
+ }
215
+ async _refund_invoice(id, params, options) {
216
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _refund_invoice: true }, params, options);
217
+ }
218
+ async _save_payment_source_to_customer_wallet(id, params, options) {
219
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _save_payment_source_to_customer_wallet: true }, params, options);
220
+ }
221
+ async _save_shipping_address_to_customer_address_book(id, params, options) {
222
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _save_shipping_address_to_customer_address_book: true }, params, options);
223
+ }
224
+ async _save_billing_address_to_customer_address_book(id, params, options) {
225
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _save_billing_address_to_customer_address_book: true }, params, options);
226
+ }
227
+ async _refresh(id, params, options) {
228
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _refresh: true }, params, options);
229
+ }
230
+ async _validate(id, params, options) {
231
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _validate: true }, params, options);
232
+ }
233
+ async _create_subscriptions(id, params, options) {
234
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _create_subscriptions: true }, params, options);
235
+ }
236
+ async _start_editing(id, params, options) {
237
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _start_editing: true }, params, options);
238
+ }
239
+ async _stop_editing(id, params, options) {
240
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _stop_editing: true }, params, options);
241
+ }
242
+ async _reset_circuit(id, params, options) {
243
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: _Orders.TYPE, _reset_circuit: true }, params, options);
244
+ }
245
+ isOrder(resource) {
246
+ return resource.type && resource.type === _Orders.TYPE;
247
+ }
248
+ relationship(id) {
249
+ return super.relationshipOneToOne(id);
250
+ }
251
+ relationshipToMany(...ids) {
252
+ return super.relationshipOneToMany(...ids);
253
+ }
254
+ type() {
255
+ return _Orders.TYPE;
256
+ }
257
+ };
258
+ __publicField(_Orders, "TYPE", "orders");
259
+ let Orders = _Orders;
260
+ var orders_default = Orders;
261
+
262
+ export { orders_default as default };
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ var resource = require('../resource');
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
8
+ const _Organizations = class _Organizations extends resource.ApiSingleton {
9
+ isOrganization(resource) {
10
+ return resource.type && resource.type === _Organizations.TYPE;
11
+ }
12
+ relationship(id) {
13
+ return super.relationshipOneToOne(id);
14
+ }
15
+ relationshipToMany(...ids) {
16
+ return super.relationshipOneToMany(...ids);
17
+ }
18
+ type() {
19
+ return _Organizations.TYPE;
20
+ }
21
+ path() {
22
+ return "organization";
23
+ }
24
+ };
25
+ __publicField(_Organizations, "TYPE", "organizations");
26
+ let Organizations = _Organizations;
27
+ var organizations_default = Organizations;
28
+
29
+ module.exports = organizations_default;
30
+
31
+ module.exports = exports.default;