@commercelayer/sdk 4.27.1 → 4.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (443) hide show
  1. package/lib/cjs/api.d.ts +10 -3
  2. package/lib/cjs/api.js +25 -4
  3. package/lib/cjs/commercelayer.d.ts +9 -2
  4. package/lib/cjs/commercelayer.js +8 -1
  5. package/lib/cjs/model.d.ts +10 -3
  6. package/lib/cjs/resource.d.ts +7 -9
  7. package/lib/cjs/resources/addresses.d.ts +14 -0
  8. package/lib/cjs/resources/addresses.js +12 -0
  9. package/lib/cjs/resources/adjustments.d.ts +3 -0
  10. package/lib/cjs/resources/adjustments.js +4 -0
  11. package/lib/cjs/resources/adyen_gateways.d.ts +5 -2
  12. package/lib/cjs/resources/adyen_gateways.js +4 -0
  13. package/lib/cjs/resources/adyen_payments.d.ts +3 -0
  14. package/lib/cjs/resources/adyen_payments.js +4 -0
  15. package/lib/cjs/resources/authorizations.d.ts +9 -3
  16. package/lib/cjs/resources/authorizations.js +12 -4
  17. package/lib/cjs/resources/avalara_accounts.d.ts +9 -6
  18. package/lib/cjs/resources/avalara_accounts.js +4 -0
  19. package/lib/cjs/resources/axerve_gateways.d.ts +4 -0
  20. package/lib/cjs/resources/axerve_gateways.js +4 -0
  21. package/lib/cjs/resources/axerve_payments.d.ts +9 -0
  22. package/lib/cjs/resources/axerve_payments.js +4 -0
  23. package/lib/cjs/resources/billing_info_validation_rules.d.ts +3 -0
  24. package/lib/cjs/resources/billing_info_validation_rules.js +4 -0
  25. package/lib/cjs/resources/braintree_gateways.d.ts +3 -0
  26. package/lib/cjs/resources/braintree_gateways.js +4 -0
  27. package/lib/cjs/resources/braintree_payments.d.ts +3 -0
  28. package/lib/cjs/resources/braintree_payments.js +4 -0
  29. package/lib/cjs/resources/bundles.d.ts +16 -2
  30. package/lib/cjs/resources/bundles.js +12 -0
  31. package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +134 -0
  32. package/lib/cjs/resources/buy_x_pay_y_promotions.js +81 -0
  33. package/lib/cjs/resources/captures.d.ts +9 -3
  34. package/lib/cjs/resources/captures.js +12 -4
  35. package/lib/cjs/resources/carrier_accounts.d.ts +3 -0
  36. package/lib/cjs/resources/carrier_accounts.js +4 -0
  37. package/lib/cjs/resources/checkout_com_gateways.d.ts +3 -0
  38. package/lib/cjs/resources/checkout_com_gateways.js +4 -0
  39. package/lib/cjs/resources/checkout_com_payments.d.ts +3 -0
  40. package/lib/cjs/resources/checkout_com_payments.js +4 -0
  41. package/lib/cjs/resources/cleanups.d.ts +3 -0
  42. package/lib/cjs/resources/cleanups.js +4 -0
  43. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +10 -3
  44. package/lib/cjs/resources/coupon_codes_promotion_rules.js +4 -0
  45. package/lib/cjs/resources/coupon_recipients.d.ts +3 -0
  46. package/lib/cjs/resources/coupon_recipients.js +4 -0
  47. package/lib/cjs/resources/coupons.d.ts +26 -1
  48. package/lib/cjs/resources/coupons.js +16 -0
  49. package/lib/cjs/resources/custom_promotion_rules.d.ts +61 -0
  50. package/lib/cjs/resources/custom_promotion_rules.js +37 -0
  51. package/lib/cjs/resources/customer_addresses.d.ts +5 -0
  52. package/lib/cjs/resources/customer_addresses.js +4 -0
  53. package/lib/cjs/resources/customer_groups.d.ts +3 -0
  54. package/lib/cjs/resources/customer_groups.js +4 -0
  55. package/lib/cjs/resources/customer_payment_sources.d.ts +18 -11
  56. package/lib/cjs/resources/customer_payment_sources.js +8 -0
  57. package/lib/cjs/resources/customer_subscriptions.d.ts +3 -0
  58. package/lib/cjs/resources/customer_subscriptions.js +4 -0
  59. package/lib/cjs/resources/customers.d.ts +9 -0
  60. package/lib/cjs/resources/customers.js +4 -0
  61. package/lib/cjs/resources/delivery_lead_times.d.ts +3 -0
  62. package/lib/cjs/resources/delivery_lead_times.js +4 -0
  63. package/lib/cjs/resources/external_gateways.d.ts +3 -0
  64. package/lib/cjs/resources/external_gateways.js +4 -0
  65. package/lib/cjs/resources/external_payments.d.ts +3 -0
  66. package/lib/cjs/resources/external_payments.js +4 -0
  67. package/lib/cjs/resources/external_promotions.d.ts +45 -6
  68. package/lib/cjs/resources/external_promotions.js +24 -0
  69. package/lib/cjs/resources/external_tax_calculators.d.ts +3 -0
  70. package/lib/cjs/resources/external_tax_calculators.js +4 -0
  71. package/lib/cjs/resources/fixed_amount_promotions.d.ts +45 -6
  72. package/lib/cjs/resources/fixed_amount_promotions.js +24 -0
  73. package/lib/cjs/resources/fixed_price_promotions.d.ts +37 -9
  74. package/lib/cjs/resources/fixed_price_promotions.js +18 -2
  75. package/lib/cjs/resources/free_gift_promotions.d.ts +37 -9
  76. package/lib/cjs/resources/free_gift_promotions.js +18 -2
  77. package/lib/cjs/resources/free_shipping_promotions.d.ts +42 -6
  78. package/lib/cjs/resources/free_shipping_promotions.js +20 -0
  79. package/lib/cjs/resources/gift_card_recipients.d.ts +3 -0
  80. package/lib/cjs/resources/gift_card_recipients.js +4 -0
  81. package/lib/cjs/resources/gift_cards.d.ts +11 -0
  82. package/lib/cjs/resources/gift_cards.js +8 -0
  83. package/lib/cjs/resources/imports.d.ts +1 -3
  84. package/lib/cjs/resources/in_stock_subscriptions.d.ts +3 -0
  85. package/lib/cjs/resources/in_stock_subscriptions.js +4 -0
  86. package/lib/cjs/resources/inventory_models.d.ts +12 -0
  87. package/lib/cjs/resources/inventory_models.js +4 -0
  88. package/lib/cjs/resources/inventory_return_locations.d.ts +3 -0
  89. package/lib/cjs/resources/inventory_return_locations.js +4 -0
  90. package/lib/cjs/resources/inventory_stock_locations.d.ts +3 -0
  91. package/lib/cjs/resources/inventory_stock_locations.js +4 -0
  92. package/lib/cjs/resources/klarna_gateways.d.ts +3 -0
  93. package/lib/cjs/resources/klarna_gateways.js +4 -0
  94. package/lib/cjs/resources/klarna_payments.d.ts +3 -0
  95. package/lib/cjs/resources/klarna_payments.js +4 -0
  96. package/lib/cjs/resources/line_item_options.d.ts +11 -0
  97. package/lib/cjs/resources/line_item_options.js +8 -0
  98. package/lib/cjs/resources/line_items.d.ts +30 -0
  99. package/lib/cjs/resources/line_items.js +16 -0
  100. package/lib/cjs/resources/manual_gateways.d.ts +3 -0
  101. package/lib/cjs/resources/manual_gateways.js +4 -0
  102. package/lib/cjs/resources/manual_tax_calculators.d.ts +3 -0
  103. package/lib/cjs/resources/manual_tax_calculators.js +4 -0
  104. package/lib/cjs/resources/markets.d.ts +8 -0
  105. package/lib/cjs/resources/markets.js +4 -0
  106. package/lib/cjs/resources/merchants.d.ts +3 -0
  107. package/lib/cjs/resources/merchants.js +4 -0
  108. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +13 -3
  109. package/lib/cjs/resources/order_amount_promotion_rules.js +4 -0
  110. package/lib/cjs/resources/order_subscription_items.d.ts +7 -0
  111. package/lib/cjs/resources/order_subscription_items.js +4 -0
  112. package/lib/cjs/resources/order_subscriptions.d.ts +4 -0
  113. package/lib/cjs/resources/order_subscriptions.js +4 -0
  114. package/lib/cjs/resources/order_validation_rules.d.ts +3 -0
  115. package/lib/cjs/resources/order_validation_rules.js +4 -0
  116. package/lib/cjs/resources/orders.d.ts +50 -6
  117. package/lib/cjs/resources/orders.js +32 -0
  118. package/lib/cjs/resources/organization.d.ts +4 -4
  119. package/lib/cjs/resources/packages.d.ts +3 -0
  120. package/lib/cjs/resources/packages.js +4 -0
  121. package/lib/cjs/resources/parcel_line_items.d.ts +4 -1
  122. package/lib/cjs/resources/parcel_line_items.js +4 -0
  123. package/lib/cjs/resources/parcels.d.ts +9 -3
  124. package/lib/cjs/resources/parcels.js +4 -0
  125. package/lib/cjs/resources/payment_gateways.d.ts +3 -0
  126. package/lib/cjs/resources/payment_gateways.js +4 -0
  127. package/lib/cjs/resources/payment_methods.d.ts +9 -1
  128. package/lib/cjs/resources/payment_methods.js +4 -0
  129. package/lib/cjs/resources/payment_options.d.ts +43 -0
  130. package/lib/cjs/resources/payment_options.js +41 -0
  131. package/lib/cjs/resources/paypal_gateways.d.ts +3 -0
  132. package/lib/cjs/resources/paypal_gateways.js +4 -0
  133. package/lib/cjs/resources/paypal_payments.d.ts +3 -0
  134. package/lib/cjs/resources/paypal_payments.js +4 -0
  135. package/lib/cjs/resources/percentage_discount_promotions.d.ts +37 -9
  136. package/lib/cjs/resources/percentage_discount_promotions.js +18 -2
  137. package/lib/cjs/resources/price_frequency_tiers.d.ts +3 -0
  138. package/lib/cjs/resources/price_frequency_tiers.js +4 -0
  139. package/lib/cjs/resources/price_lists.d.ts +6 -0
  140. package/lib/cjs/resources/price_lists.js +4 -0
  141. package/lib/cjs/resources/price_tiers.d.ts +3 -0
  142. package/lib/cjs/resources/price_tiers.js +4 -0
  143. package/lib/cjs/resources/price_volume_tiers.d.ts +3 -0
  144. package/lib/cjs/resources/price_volume_tiers.js +4 -0
  145. package/lib/cjs/resources/prices.d.ts +4 -1
  146. package/lib/cjs/resources/prices.js +4 -0
  147. package/lib/cjs/resources/promotion_rules.d.ts +5 -1
  148. package/lib/cjs/resources/promotion_rules.js +4 -0
  149. package/lib/cjs/resources/promotions.d.ts +18 -0
  150. package/lib/cjs/resources/promotions.js +20 -0
  151. package/lib/cjs/resources/refunds.d.ts +9 -3
  152. package/lib/cjs/resources/refunds.js +10 -2
  153. package/lib/cjs/resources/reserved_stocks.d.ts +27 -0
  154. package/lib/cjs/resources/reserved_stocks.js +36 -0
  155. package/lib/cjs/resources/return_line_items.d.ts +2 -1
  156. package/lib/cjs/resources/returns.d.ts +11 -0
  157. package/lib/cjs/resources/returns.js +8 -0
  158. package/lib/cjs/resources/satispay_gateways.d.ts +6 -0
  159. package/lib/cjs/resources/satispay_gateways.js +4 -0
  160. package/lib/cjs/resources/satispay_payments.d.ts +11 -3
  161. package/lib/cjs/resources/satispay_payments.js +4 -0
  162. package/lib/cjs/resources/shipments.d.ts +49 -2
  163. package/lib/cjs/resources/shipments.js +18 -0
  164. package/lib/cjs/resources/shipping_categories.d.ts +6 -0
  165. package/lib/cjs/resources/shipping_categories.js +4 -0
  166. package/lib/cjs/resources/shipping_method_tiers.d.ts +3 -0
  167. package/lib/cjs/resources/shipping_method_tiers.js +4 -0
  168. package/lib/cjs/resources/shipping_methods.d.ts +11 -0
  169. package/lib/cjs/resources/shipping_methods.js +4 -0
  170. package/lib/cjs/resources/shipping_weight_tiers.d.ts +3 -0
  171. package/lib/cjs/resources/shipping_weight_tiers.js +4 -0
  172. package/lib/cjs/resources/shipping_zones.d.ts +3 -0
  173. package/lib/cjs/resources/shipping_zones.js +4 -0
  174. package/lib/cjs/resources/sku_list_items.d.ts +3 -0
  175. package/lib/cjs/resources/sku_list_items.js +4 -0
  176. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +10 -3
  177. package/lib/cjs/resources/sku_list_promotion_rules.js +4 -0
  178. package/lib/cjs/resources/sku_lists.d.ts +3 -0
  179. package/lib/cjs/resources/sku_lists.js +4 -0
  180. package/lib/cjs/resources/sku_options.d.ts +14 -0
  181. package/lib/cjs/resources/sku_options.js +12 -0
  182. package/lib/cjs/resources/skus.d.ts +17 -0
  183. package/lib/cjs/resources/skus.js +16 -0
  184. package/lib/cjs/resources/stock_items.d.ts +9 -0
  185. package/lib/cjs/resources/stock_items.js +12 -0
  186. package/lib/cjs/resources/stock_line_items.d.ts +42 -2
  187. package/lib/cjs/resources/stock_line_items.js +17 -0
  188. package/lib/cjs/resources/stock_locations.d.ts +6 -0
  189. package/lib/cjs/resources/stock_locations.js +4 -0
  190. package/lib/cjs/resources/stock_reservations.d.ts +49 -0
  191. package/lib/cjs/resources/stock_reservations.js +53 -0
  192. package/lib/cjs/resources/stock_transfers.d.ts +5 -0
  193. package/lib/cjs/resources/stock_transfers.js +4 -0
  194. package/lib/cjs/resources/stripe_gateways.d.ts +3 -0
  195. package/lib/cjs/resources/stripe_gateways.js +4 -0
  196. package/lib/cjs/resources/stripe_payments.d.ts +12 -0
  197. package/lib/cjs/resources/stripe_payments.js +4 -0
  198. package/lib/cjs/resources/tags.d.ts +27 -0
  199. package/lib/cjs/resources/tags.js +33 -0
  200. package/lib/cjs/resources/tax_calculators.d.ts +3 -0
  201. package/lib/cjs/resources/tax_calculators.js +4 -0
  202. package/lib/cjs/resources/tax_categories.d.ts +3 -0
  203. package/lib/cjs/resources/tax_categories.js +4 -0
  204. package/lib/cjs/resources/tax_rules.d.ts +3 -0
  205. package/lib/cjs/resources/tax_rules.js +4 -0
  206. package/lib/cjs/resources/taxjar_accounts.d.ts +3 -0
  207. package/lib/cjs/resources/taxjar_accounts.js +4 -0
  208. package/lib/cjs/resources/transactions.d.ts +9 -0
  209. package/lib/cjs/resources/transactions.js +12 -0
  210. package/lib/cjs/resources/versions.d.ts +22 -0
  211. package/lib/cjs/resources/versions.js +24 -0
  212. package/lib/cjs/resources/voids.d.ts +9 -3
  213. package/lib/cjs/resources/voids.js +10 -2
  214. package/lib/cjs/resources/webhooks.d.ts +8 -0
  215. package/lib/cjs/resources/webhooks.js +4 -0
  216. package/lib/cjs/resources/wire_transfers.d.ts +3 -0
  217. package/lib/cjs/resources/wire_transfers.js +4 -0
  218. package/lib/cjs/util.d.ts +1 -0
  219. package/lib/esm/api.d.ts +10 -3
  220. package/lib/esm/api.js +15 -1
  221. package/lib/esm/commercelayer.d.ts +9 -2
  222. package/lib/esm/commercelayer.js +8 -1
  223. package/lib/esm/model.d.ts +10 -3
  224. package/lib/esm/resource.d.ts +7 -9
  225. package/lib/esm/resources/addresses.d.ts +14 -0
  226. package/lib/esm/resources/addresses.js +12 -0
  227. package/lib/esm/resources/adjustments.d.ts +3 -0
  228. package/lib/esm/resources/adjustments.js +4 -0
  229. package/lib/esm/resources/adyen_gateways.d.ts +5 -2
  230. package/lib/esm/resources/adyen_gateways.js +4 -0
  231. package/lib/esm/resources/adyen_payments.d.ts +3 -0
  232. package/lib/esm/resources/adyen_payments.js +4 -0
  233. package/lib/esm/resources/authorizations.d.ts +9 -3
  234. package/lib/esm/resources/authorizations.js +12 -4
  235. package/lib/esm/resources/avalara_accounts.d.ts +9 -6
  236. package/lib/esm/resources/avalara_accounts.js +4 -0
  237. package/lib/esm/resources/axerve_gateways.d.ts +4 -0
  238. package/lib/esm/resources/axerve_gateways.js +4 -0
  239. package/lib/esm/resources/axerve_payments.d.ts +9 -0
  240. package/lib/esm/resources/axerve_payments.js +4 -0
  241. package/lib/esm/resources/billing_info_validation_rules.d.ts +3 -0
  242. package/lib/esm/resources/billing_info_validation_rules.js +4 -0
  243. package/lib/esm/resources/braintree_gateways.d.ts +3 -0
  244. package/lib/esm/resources/braintree_gateways.js +4 -0
  245. package/lib/esm/resources/braintree_payments.d.ts +3 -0
  246. package/lib/esm/resources/braintree_payments.js +4 -0
  247. package/lib/esm/resources/bundles.d.ts +16 -2
  248. package/lib/esm/resources/bundles.js +12 -0
  249. package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +134 -0
  250. package/lib/esm/resources/buy_x_pay_y_promotions.js +79 -0
  251. package/lib/esm/resources/captures.d.ts +9 -3
  252. package/lib/esm/resources/captures.js +12 -4
  253. package/lib/esm/resources/carrier_accounts.d.ts +3 -0
  254. package/lib/esm/resources/carrier_accounts.js +4 -0
  255. package/lib/esm/resources/checkout_com_gateways.d.ts +3 -0
  256. package/lib/esm/resources/checkout_com_gateways.js +4 -0
  257. package/lib/esm/resources/checkout_com_payments.d.ts +3 -0
  258. package/lib/esm/resources/checkout_com_payments.js +4 -0
  259. package/lib/esm/resources/cleanups.d.ts +3 -0
  260. package/lib/esm/resources/cleanups.js +4 -0
  261. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +10 -3
  262. package/lib/esm/resources/coupon_codes_promotion_rules.js +4 -0
  263. package/lib/esm/resources/coupon_recipients.d.ts +3 -0
  264. package/lib/esm/resources/coupon_recipients.js +4 -0
  265. package/lib/esm/resources/coupons.d.ts +26 -1
  266. package/lib/esm/resources/coupons.js +16 -0
  267. package/lib/esm/resources/custom_promotion_rules.d.ts +61 -0
  268. package/lib/esm/resources/custom_promotion_rules.js +35 -0
  269. package/lib/esm/resources/customer_addresses.d.ts +5 -0
  270. package/lib/esm/resources/customer_addresses.js +4 -0
  271. package/lib/esm/resources/customer_groups.d.ts +3 -0
  272. package/lib/esm/resources/customer_groups.js +4 -0
  273. package/lib/esm/resources/customer_payment_sources.d.ts +18 -11
  274. package/lib/esm/resources/customer_payment_sources.js +8 -0
  275. package/lib/esm/resources/customer_subscriptions.d.ts +3 -0
  276. package/lib/esm/resources/customer_subscriptions.js +4 -0
  277. package/lib/esm/resources/customers.d.ts +9 -0
  278. package/lib/esm/resources/customers.js +4 -0
  279. package/lib/esm/resources/delivery_lead_times.d.ts +3 -0
  280. package/lib/esm/resources/delivery_lead_times.js +4 -0
  281. package/lib/esm/resources/external_gateways.d.ts +3 -0
  282. package/lib/esm/resources/external_gateways.js +4 -0
  283. package/lib/esm/resources/external_payments.d.ts +3 -0
  284. package/lib/esm/resources/external_payments.js +4 -0
  285. package/lib/esm/resources/external_promotions.d.ts +45 -6
  286. package/lib/esm/resources/external_promotions.js +24 -0
  287. package/lib/esm/resources/external_tax_calculators.d.ts +3 -0
  288. package/lib/esm/resources/external_tax_calculators.js +4 -0
  289. package/lib/esm/resources/fixed_amount_promotions.d.ts +45 -6
  290. package/lib/esm/resources/fixed_amount_promotions.js +24 -0
  291. package/lib/esm/resources/fixed_price_promotions.d.ts +37 -9
  292. package/lib/esm/resources/fixed_price_promotions.js +18 -2
  293. package/lib/esm/resources/free_gift_promotions.d.ts +37 -9
  294. package/lib/esm/resources/free_gift_promotions.js +18 -2
  295. package/lib/esm/resources/free_shipping_promotions.d.ts +42 -6
  296. package/lib/esm/resources/free_shipping_promotions.js +20 -0
  297. package/lib/esm/resources/gift_card_recipients.d.ts +3 -0
  298. package/lib/esm/resources/gift_card_recipients.js +4 -0
  299. package/lib/esm/resources/gift_cards.d.ts +11 -0
  300. package/lib/esm/resources/gift_cards.js +8 -0
  301. package/lib/esm/resources/imports.d.ts +1 -3
  302. package/lib/esm/resources/in_stock_subscriptions.d.ts +3 -0
  303. package/lib/esm/resources/in_stock_subscriptions.js +4 -0
  304. package/lib/esm/resources/inventory_models.d.ts +12 -0
  305. package/lib/esm/resources/inventory_models.js +4 -0
  306. package/lib/esm/resources/inventory_return_locations.d.ts +3 -0
  307. package/lib/esm/resources/inventory_return_locations.js +4 -0
  308. package/lib/esm/resources/inventory_stock_locations.d.ts +3 -0
  309. package/lib/esm/resources/inventory_stock_locations.js +4 -0
  310. package/lib/esm/resources/klarna_gateways.d.ts +3 -0
  311. package/lib/esm/resources/klarna_gateways.js +4 -0
  312. package/lib/esm/resources/klarna_payments.d.ts +3 -0
  313. package/lib/esm/resources/klarna_payments.js +4 -0
  314. package/lib/esm/resources/line_item_options.d.ts +11 -0
  315. package/lib/esm/resources/line_item_options.js +8 -0
  316. package/lib/esm/resources/line_items.d.ts +30 -0
  317. package/lib/esm/resources/line_items.js +16 -0
  318. package/lib/esm/resources/manual_gateways.d.ts +3 -0
  319. package/lib/esm/resources/manual_gateways.js +4 -0
  320. package/lib/esm/resources/manual_tax_calculators.d.ts +3 -0
  321. package/lib/esm/resources/manual_tax_calculators.js +4 -0
  322. package/lib/esm/resources/markets.d.ts +8 -0
  323. package/lib/esm/resources/markets.js +4 -0
  324. package/lib/esm/resources/merchants.d.ts +3 -0
  325. package/lib/esm/resources/merchants.js +4 -0
  326. package/lib/esm/resources/order_amount_promotion_rules.d.ts +13 -3
  327. package/lib/esm/resources/order_amount_promotion_rules.js +4 -0
  328. package/lib/esm/resources/order_subscription_items.d.ts +7 -0
  329. package/lib/esm/resources/order_subscription_items.js +4 -0
  330. package/lib/esm/resources/order_subscriptions.d.ts +4 -0
  331. package/lib/esm/resources/order_subscriptions.js +4 -0
  332. package/lib/esm/resources/order_validation_rules.d.ts +3 -0
  333. package/lib/esm/resources/order_validation_rules.js +4 -0
  334. package/lib/esm/resources/orders.d.ts +50 -6
  335. package/lib/esm/resources/orders.js +32 -0
  336. package/lib/esm/resources/organization.d.ts +4 -4
  337. package/lib/esm/resources/packages.d.ts +3 -0
  338. package/lib/esm/resources/packages.js +4 -0
  339. package/lib/esm/resources/parcel_line_items.d.ts +4 -1
  340. package/lib/esm/resources/parcel_line_items.js +4 -0
  341. package/lib/esm/resources/parcels.d.ts +9 -3
  342. package/lib/esm/resources/parcels.js +4 -0
  343. package/lib/esm/resources/payment_gateways.d.ts +3 -0
  344. package/lib/esm/resources/payment_gateways.js +4 -0
  345. package/lib/esm/resources/payment_methods.d.ts +9 -1
  346. package/lib/esm/resources/payment_methods.js +4 -0
  347. package/lib/esm/resources/payment_options.d.ts +43 -0
  348. package/lib/esm/resources/payment_options.js +39 -0
  349. package/lib/esm/resources/paypal_gateways.d.ts +3 -0
  350. package/lib/esm/resources/paypal_gateways.js +4 -0
  351. package/lib/esm/resources/paypal_payments.d.ts +3 -0
  352. package/lib/esm/resources/paypal_payments.js +4 -0
  353. package/lib/esm/resources/percentage_discount_promotions.d.ts +37 -9
  354. package/lib/esm/resources/percentage_discount_promotions.js +18 -2
  355. package/lib/esm/resources/price_frequency_tiers.d.ts +3 -0
  356. package/lib/esm/resources/price_frequency_tiers.js +4 -0
  357. package/lib/esm/resources/price_lists.d.ts +6 -0
  358. package/lib/esm/resources/price_lists.js +4 -0
  359. package/lib/esm/resources/price_tiers.d.ts +3 -0
  360. package/lib/esm/resources/price_tiers.js +4 -0
  361. package/lib/esm/resources/price_volume_tiers.d.ts +3 -0
  362. package/lib/esm/resources/price_volume_tiers.js +4 -0
  363. package/lib/esm/resources/prices.d.ts +4 -1
  364. package/lib/esm/resources/prices.js +4 -0
  365. package/lib/esm/resources/promotion_rules.d.ts +5 -1
  366. package/lib/esm/resources/promotion_rules.js +4 -0
  367. package/lib/esm/resources/promotions.d.ts +18 -0
  368. package/lib/esm/resources/promotions.js +20 -0
  369. package/lib/esm/resources/refunds.d.ts +9 -3
  370. package/lib/esm/resources/refunds.js +10 -2
  371. package/lib/esm/resources/reserved_stocks.d.ts +27 -0
  372. package/lib/esm/resources/reserved_stocks.js +34 -0
  373. package/lib/esm/resources/return_line_items.d.ts +2 -1
  374. package/lib/esm/resources/returns.d.ts +11 -0
  375. package/lib/esm/resources/returns.js +8 -0
  376. package/lib/esm/resources/satispay_gateways.d.ts +6 -0
  377. package/lib/esm/resources/satispay_gateways.js +4 -0
  378. package/lib/esm/resources/satispay_payments.d.ts +11 -3
  379. package/lib/esm/resources/satispay_payments.js +4 -0
  380. package/lib/esm/resources/shipments.d.ts +49 -2
  381. package/lib/esm/resources/shipments.js +18 -0
  382. package/lib/esm/resources/shipping_categories.d.ts +6 -0
  383. package/lib/esm/resources/shipping_categories.js +4 -0
  384. package/lib/esm/resources/shipping_method_tiers.d.ts +3 -0
  385. package/lib/esm/resources/shipping_method_tiers.js +4 -0
  386. package/lib/esm/resources/shipping_methods.d.ts +11 -0
  387. package/lib/esm/resources/shipping_methods.js +4 -0
  388. package/lib/esm/resources/shipping_weight_tiers.d.ts +3 -0
  389. package/lib/esm/resources/shipping_weight_tiers.js +4 -0
  390. package/lib/esm/resources/shipping_zones.d.ts +3 -0
  391. package/lib/esm/resources/shipping_zones.js +4 -0
  392. package/lib/esm/resources/sku_list_items.d.ts +3 -0
  393. package/lib/esm/resources/sku_list_items.js +4 -0
  394. package/lib/esm/resources/sku_list_promotion_rules.d.ts +10 -3
  395. package/lib/esm/resources/sku_list_promotion_rules.js +4 -0
  396. package/lib/esm/resources/sku_lists.d.ts +3 -0
  397. package/lib/esm/resources/sku_lists.js +4 -0
  398. package/lib/esm/resources/sku_options.d.ts +14 -0
  399. package/lib/esm/resources/sku_options.js +12 -0
  400. package/lib/esm/resources/skus.d.ts +17 -0
  401. package/lib/esm/resources/skus.js +16 -0
  402. package/lib/esm/resources/stock_items.d.ts +9 -0
  403. package/lib/esm/resources/stock_items.js +12 -0
  404. package/lib/esm/resources/stock_line_items.d.ts +42 -2
  405. package/lib/esm/resources/stock_line_items.js +17 -0
  406. package/lib/esm/resources/stock_locations.d.ts +6 -0
  407. package/lib/esm/resources/stock_locations.js +4 -0
  408. package/lib/esm/resources/stock_reservations.d.ts +49 -0
  409. package/lib/esm/resources/stock_reservations.js +51 -0
  410. package/lib/esm/resources/stock_transfers.d.ts +5 -0
  411. package/lib/esm/resources/stock_transfers.js +4 -0
  412. package/lib/esm/resources/stripe_gateways.d.ts +3 -0
  413. package/lib/esm/resources/stripe_gateways.js +4 -0
  414. package/lib/esm/resources/stripe_payments.d.ts +12 -0
  415. package/lib/esm/resources/stripe_payments.js +4 -0
  416. package/lib/esm/resources/tags.d.ts +27 -0
  417. package/lib/esm/resources/tags.js +31 -0
  418. package/lib/esm/resources/tax_calculators.d.ts +3 -0
  419. package/lib/esm/resources/tax_calculators.js +4 -0
  420. package/lib/esm/resources/tax_categories.d.ts +3 -0
  421. package/lib/esm/resources/tax_categories.js +4 -0
  422. package/lib/esm/resources/tax_rules.d.ts +3 -0
  423. package/lib/esm/resources/tax_rules.js +4 -0
  424. package/lib/esm/resources/taxjar_accounts.d.ts +3 -0
  425. package/lib/esm/resources/taxjar_accounts.js +4 -0
  426. package/lib/esm/resources/transactions.d.ts +9 -0
  427. package/lib/esm/resources/transactions.js +12 -0
  428. package/lib/esm/resources/versions.d.ts +22 -0
  429. package/lib/esm/resources/versions.js +22 -0
  430. package/lib/esm/resources/voids.d.ts +9 -3
  431. package/lib/esm/resources/voids.js +10 -2
  432. package/lib/esm/resources/webhooks.d.ts +8 -0
  433. package/lib/esm/resources/webhooks.js +4 -0
  434. package/lib/esm/resources/wire_transfers.d.ts +3 -0
  435. package/lib/esm/resources/wire_transfers.js +4 -0
  436. package/lib/esm/util.d.ts +1 -0
  437. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  438. package/lib/tsconfig.tsbuildinfo +1 -1
  439. package/package.json +25 -25
  440. package/lib/cjs/micro.d.ts +0 -4
  441. package/lib/cjs/micro.js +0 -13
  442. package/lib/esm/micro.d.ts +0 -4
  443. package/lib/esm/micro.js +0 -7
@@ -12,8 +12,12 @@ import type { PercentageDiscountPromotion } from './percentage_discount_promotio
12
12
  import type { Shipment } from './shipments';
13
13
  import type { Sku } from './skus';
14
14
  import type { LineItemOption } from './line_item_options';
15
+ import type { ReturnLineItem } from './return_line_items';
16
+ import type { StockReservation } from './stock_reservations';
15
17
  import type { StockLineItem } from './stock_line_items';
16
18
  import type { StockTransfer } from './stock_transfers';
19
+ import type { Event } from './events';
20
+ import type { Tag } from './tags';
17
21
  type LineItemRel = ResourceRel & {
18
22
  type: typeof LineItems.TYPE;
19
23
  };
@@ -50,14 +54,21 @@ type ShipmentRel = ResourceRel & {
50
54
  type SkuRel = ResourceRel & {
51
55
  type: 'skus';
52
56
  };
57
+ type TagRel = ResourceRel & {
58
+ type: 'tags';
59
+ };
53
60
  interface LineItem extends Resource {
54
61
  sku_code?: string;
55
62
  bundle_code?: string;
56
63
  quantity?: number;
64
+ _external_price?: boolean;
57
65
  currency_code?: string;
58
66
  unit_amount_cents?: number;
59
67
  unit_amount_float?: number;
60
68
  formatted_unit_amount?: string;
69
+ compare_at_amount_cents?: number;
70
+ compare_at_amount_float?: number;
71
+ formatted_compare_at_amount?: string;
61
72
  options_amount_cents?: number;
62
73
  options_amount_float?: number;
63
74
  formatted_options_amount?: string;
@@ -77,15 +88,22 @@ interface LineItem extends Resource {
77
88
  tax_breakdown?: object;
78
89
  item_type?: string;
79
90
  frequency?: string;
91
+ coupon_code?: string;
80
92
  order?: Order;
81
93
  item?: Adjustment | Bundle | ExternalPromotion | FixedAmountPromotion | FreeShippingPromotion | GiftCard | PaymentMethod | PercentageDiscountPromotion | Shipment | Sku;
94
+ sku?: Sku;
95
+ bundle?: Bundle;
82
96
  line_item_options?: LineItemOption[];
97
+ return_line_items?: ReturnLineItem[];
83
98
  /**
84
99
  * @deprecated This field should not be used as it may be removed in the future without notice
85
100
  */
86
101
  shipment_line_items?: object[];
102
+ stock_reservations?: StockReservation[];
87
103
  stock_line_items?: StockLineItem[];
88
104
  stock_transfers?: StockTransfer[];
105
+ events?: Event[];
106
+ tags?: Tag[];
89
107
  }
90
108
  interface LineItemCreate extends ResourceCreate {
91
109
  sku_code?: string;
@@ -93,22 +111,30 @@ interface LineItemCreate extends ResourceCreate {
93
111
  quantity: number;
94
112
  _external_price?: boolean;
95
113
  _update_quantity?: boolean;
114
+ _reserve_stock?: boolean;
96
115
  unit_amount_cents?: number;
116
+ compare_at_amount_cents?: number;
97
117
  name?: string;
98
118
  image_url?: string;
99
119
  item_type?: string;
100
120
  frequency?: string;
101
121
  order: OrderRel;
102
122
  item?: AdjustmentRel | BundleRel | ExternalPromotionRel | FixedAmountPromotionRel | FreeShippingPromotionRel | GiftCardRel | PaymentMethodRel | PercentageDiscountPromotionRel | ShipmentRel | SkuRel;
123
+ sku?: SkuRel;
124
+ bundle?: BundleRel;
125
+ tags?: TagRel[];
103
126
  }
104
127
  interface LineItemUpdate extends ResourceUpdate {
105
128
  sku_code?: string;
106
129
  bundle_code?: string;
107
130
  quantity?: number;
108
131
  _external_price?: boolean;
132
+ _reserve_stock?: boolean;
133
+ compare_at_amount_cents?: number;
109
134
  name?: string;
110
135
  image_url?: string;
111
136
  frequency?: string;
137
+ tags?: TagRel[];
112
138
  }
113
139
  declare class LineItems extends ApiResource {
114
140
  static readonly TYPE: 'line_items';
@@ -119,8 +145,12 @@ declare class LineItems extends ApiResource {
119
145
  delete(id: string, options?: ResourcesConfig): Promise<void>;
120
146
  order(lineItemId: string | LineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
121
147
  line_item_options(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>>;
148
+ return_line_items(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>>;
149
+ stock_reservations(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockReservation>>;
122
150
  stock_line_items(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
123
151
  stock_transfers(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
152
+ events(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
153
+ tags(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
124
154
  isLineItem(resource: any): resource is LineItem;
125
155
  relationship(id: string | ResourceId | null): LineItemRel;
126
156
  type(): string;
@@ -24,6 +24,14 @@ class LineItems extends ApiResource {
24
24
  const _lineItemId = lineItemId.id || lineItemId;
25
25
  return this.resources.fetch({ type: 'line_item_options' }, `line_items/${_lineItemId}/line_item_options`, params, options);
26
26
  }
27
+ async return_line_items(lineItemId, params, options) {
28
+ const _lineItemId = lineItemId.id || lineItemId;
29
+ return this.resources.fetch({ type: 'return_line_items' }, `line_items/${_lineItemId}/return_line_items`, params, options);
30
+ }
31
+ async stock_reservations(lineItemId, params, options) {
32
+ const _lineItemId = lineItemId.id || lineItemId;
33
+ return this.resources.fetch({ type: 'stock_reservations' }, `line_items/${_lineItemId}/stock_reservations`, params, options);
34
+ }
27
35
  async stock_line_items(lineItemId, params, options) {
28
36
  const _lineItemId = lineItemId.id || lineItemId;
29
37
  return this.resources.fetch({ type: 'stock_line_items' }, `line_items/${_lineItemId}/stock_line_items`, params, options);
@@ -32,6 +40,14 @@ class LineItems extends ApiResource {
32
40
  const _lineItemId = lineItemId.id || lineItemId;
33
41
  return this.resources.fetch({ type: 'stock_transfers' }, `line_items/${_lineItemId}/stock_transfers`, params, options);
34
42
  }
43
+ async events(lineItemId, params, options) {
44
+ const _lineItemId = lineItemId.id || lineItemId;
45
+ return this.resources.fetch({ type: 'events' }, `line_items/${_lineItemId}/events`, params, options);
46
+ }
47
+ async tags(lineItemId, params, options) {
48
+ const _lineItemId = lineItemId.id || lineItemId;
49
+ return this.resources.fetch({ type: 'tags' }, `line_items/${_lineItemId}/tags`, params, options);
50
+ }
35
51
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
36
52
  isLineItem(resource) {
37
53
  return resource.type && (resource.type === LineItems.TYPE);
@@ -1,12 +1,14 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { PaymentMethod } from './payment_methods';
4
+ import type { Version } from './versions';
4
5
  type ManualGatewayRel = ResourceRel & {
5
6
  type: typeof ManualGateways.TYPE;
6
7
  };
7
8
  interface ManualGateway extends Resource {
8
9
  name?: string;
9
10
  payment_methods?: PaymentMethod[];
11
+ versions?: Version[];
10
12
  }
11
13
  interface ManualGatewayCreate extends ResourceCreate {
12
14
  name: string;
@@ -22,6 +24,7 @@ declare class ManualGateways extends ApiResource {
22
24
  update(resource: ManualGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualGateway>;
23
25
  delete(id: string, options?: ResourcesConfig): Promise<void>;
24
26
  payment_methods(manualGatewayId: string | ManualGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
27
+ versions(manualGatewayId: string | ManualGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
25
28
  isManualGateway(resource: any): resource is ManualGateway;
26
29
  relationship(id: string | ResourceId | null): ManualGatewayRel;
27
30
  type(): string;
@@ -20,6 +20,10 @@ class ManualGateways extends ApiResource {
20
20
  const _manualGatewayId = manualGatewayId.id || manualGatewayId;
21
21
  return this.resources.fetch({ type: 'payment_methods' }, `manual_gateways/${_manualGatewayId}/payment_methods`, params, options);
22
22
  }
23
+ async versions(manualGatewayId, params, options) {
24
+ const _manualGatewayId = manualGatewayId.id || manualGatewayId;
25
+ return this.resources.fetch({ type: 'versions' }, `manual_gateways/${_manualGatewayId}/versions`, params, options);
26
+ }
23
27
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
24
28
  isManualGateway(resource) {
25
29
  return resource.type && (resource.type === ManualGateways.TYPE);
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Market } from './markets';
4
4
  import type { Attachment } from './attachments';
5
+ import type { Version } from './versions';
5
6
  import type { TaxRule } from './tax_rules';
6
7
  type ManualTaxCalculatorRel = ResourceRel & {
7
8
  type: typeof ManualTaxCalculators.TYPE;
@@ -13,6 +14,7 @@ interface ManualTaxCalculator extends Resource {
13
14
  name?: string;
14
15
  markets?: Market[];
15
16
  attachments?: Attachment[];
17
+ versions?: Version[];
16
18
  tax_rules?: TaxRule[];
17
19
  }
18
20
  interface ManualTaxCalculatorCreate extends ResourceCreate {
@@ -32,6 +34,7 @@ declare class ManualTaxCalculators extends ApiResource {
32
34
  delete(id: string, options?: ResourcesConfig): Promise<void>;
33
35
  markets(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
34
36
  attachments(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
37
+ versions(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
35
38
  tax_rules(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxRule>>;
36
39
  isManualTaxCalculator(resource: any): resource is ManualTaxCalculator;
37
40
  relationship(id: string | ResourceId | null): ManualTaxCalculatorRel;
@@ -24,6 +24,10 @@ class ManualTaxCalculators extends ApiResource {
24
24
  const _manualTaxCalculatorId = manualTaxCalculatorId.id || manualTaxCalculatorId;
25
25
  return this.resources.fetch({ type: 'attachments' }, `manual_tax_calculators/${_manualTaxCalculatorId}/attachments`, params, options);
26
26
  }
27
+ async versions(manualTaxCalculatorId, params, options) {
28
+ const _manualTaxCalculatorId = manualTaxCalculatorId.id || manualTaxCalculatorId;
29
+ return this.resources.fetch({ type: 'versions' }, `manual_tax_calculators/${_manualTaxCalculatorId}/versions`, params, options);
30
+ }
27
31
  async tax_rules(manualTaxCalculatorId, params, options) {
28
32
  const _manualTaxCalculatorId = manualTaxCalculatorId.id || manualTaxCalculatorId;
29
33
  return this.resources.fetch({ type: 'tax_rules' }, `manual_tax_calculators/${_manualTaxCalculatorId}/tax_rules`, params, options);
@@ -7,6 +7,7 @@ import type { SubscriptionModel } from './subscription_models';
7
7
  import type { TaxCalculator } from './tax_calculators';
8
8
  import type { CustomerGroup } from './customer_groups';
9
9
  import type { Attachment } from './attachments';
10
+ import type { Version } from './versions';
10
11
  type MarketRel = ResourceRel & {
11
12
  type: typeof Markets.TYPE;
12
13
  };
@@ -31,6 +32,7 @@ type CustomerGroupRel = ResourceRel & {
31
32
  interface Market extends Resource {
32
33
  number?: number;
33
34
  name?: string;
35
+ code?: string;
34
36
  facebook_pixel_id?: string;
35
37
  checkout_url?: string;
36
38
  external_prices_url?: string;
@@ -45,13 +47,17 @@ interface Market extends Resource {
45
47
  tax_calculator?: TaxCalculator;
46
48
  customer_group?: CustomerGroup;
47
49
  attachments?: Attachment[];
50
+ versions?: Version[];
48
51
  }
49
52
  interface MarketCreate extends ResourceCreate {
50
53
  name: string;
54
+ code?: string;
51
55
  facebook_pixel_id?: string;
52
56
  checkout_url?: string;
53
57
  external_prices_url?: string;
54
58
  external_order_validation_url?: string;
59
+ _disable?: boolean;
60
+ _enable?: boolean;
55
61
  merchant: MerchantRel;
56
62
  price_list: PriceListRel;
57
63
  inventory_model: InventoryModelRel;
@@ -61,6 +67,7 @@ interface MarketCreate extends ResourceCreate {
61
67
  }
62
68
  interface MarketUpdate extends ResourceUpdate {
63
69
  name?: string;
70
+ code?: string;
64
71
  facebook_pixel_id?: string;
65
72
  checkout_url?: string;
66
73
  external_prices_url?: string;
@@ -88,6 +95,7 @@ declare class Markets extends ApiResource {
88
95
  tax_calculator(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCalculator>;
89
96
  customer_group(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerGroup>;
90
97
  attachments(marketId: string | Market, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
98
+ versions(marketId: string | Market, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
91
99
  isMarket(resource: any): resource is Market;
92
100
  relationship(id: string | ResourceId | null): MarketRel;
93
101
  type(): string;
@@ -44,6 +44,10 @@ class Markets extends ApiResource {
44
44
  const _marketId = marketId.id || marketId;
45
45
  return this.resources.fetch({ type: 'attachments' }, `markets/${_marketId}/attachments`, params, options);
46
46
  }
47
+ async versions(marketId, params, options) {
48
+ const _marketId = marketId.id || marketId;
49
+ return this.resources.fetch({ type: 'versions' }, `markets/${_marketId}/versions`, params, options);
50
+ }
47
51
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
48
52
  isMarket(resource) {
49
53
  return resource.type && (resource.type === Markets.TYPE);
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Address } from './addresses';
4
4
  import type { Attachment } from './attachments';
5
+ import type { Version } from './versions';
5
6
  type MerchantRel = ResourceRel & {
6
7
  type: typeof Merchants.TYPE;
7
8
  };
@@ -12,6 +13,7 @@ interface Merchant extends Resource {
12
13
  name?: string;
13
14
  address?: Address;
14
15
  attachments?: Attachment[];
16
+ versions?: Version[];
15
17
  }
16
18
  interface MerchantCreate extends ResourceCreate {
17
19
  name: string;
@@ -30,6 +32,7 @@ declare class Merchants extends ApiResource {
30
32
  delete(id: string, options?: ResourcesConfig): Promise<void>;
31
33
  address(merchantId: string | Merchant, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
32
34
  attachments(merchantId: string | Merchant, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
35
+ versions(merchantId: string | Merchant, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
33
36
  isMerchant(resource: any): resource is Merchant;
34
37
  relationship(id: string | ResourceId | null): MerchantRel;
35
38
  type(): string;
@@ -24,6 +24,10 @@ class Merchants extends ApiResource {
24
24
  const _merchantId = merchantId.id || merchantId;
25
25
  return this.resources.fetch({ type: 'attachments' }, `merchants/${_merchantId}/attachments`, params, options);
26
26
  }
27
+ async versions(merchantId, params, options) {
28
+ const _merchantId = merchantId.id || merchantId;
29
+ return this.resources.fetch({ type: 'versions' }, `merchants/${_merchantId}/versions`, params, options);
30
+ }
27
31
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
28
32
  isMerchant(resource) {
29
33
  return resource.type && (resource.type === Merchants.TYPE);
@@ -2,10 +2,12 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { PercentageDiscountPromotion } from './percentage_discount_promotions';
4
4
  import type { FreeShippingPromotion } from './free_shipping_promotions';
5
+ import type { BuyXPayYPromotion } from './buy_x_pay_y_promotions';
5
6
  import type { FreeGiftPromotion } from './free_gift_promotions';
6
7
  import type { FixedPricePromotion } from './fixed_price_promotions';
7
8
  import type { ExternalPromotion } from './external_promotions';
8
9
  import type { FixedAmountPromotion } from './fixed_amount_promotions';
10
+ import type { Version } from './versions';
9
11
  type OrderAmountPromotionRuleRel = ResourceRel & {
10
12
  type: typeof OrderAmountPromotionRules.TYPE;
11
13
  };
@@ -15,6 +17,9 @@ type PercentageDiscountPromotionRel = ResourceRel & {
15
17
  type FreeShippingPromotionRel = ResourceRel & {
16
18
  type: 'free_shipping_promotions';
17
19
  };
20
+ type BuyXPayYPromotionRel = ResourceRel & {
21
+ type: 'buy_x_pay_y_promotions';
22
+ };
18
23
  type FreeGiftPromotionRel = ResourceRel & {
19
24
  type: 'free_gift_promotions';
20
25
  };
@@ -31,15 +36,19 @@ interface OrderAmountPromotionRule extends Resource {
31
36
  order_amount_cents?: number;
32
37
  order_amount_float?: number;
33
38
  formatted_order_amount?: string;
34
- promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion;
39
+ use_subtotal?: boolean;
40
+ promotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion;
41
+ versions?: Version[];
35
42
  }
36
43
  interface OrderAmountPromotionRuleCreate extends ResourceCreate {
37
44
  order_amount_cents?: number;
38
- promotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
45
+ use_subtotal?: boolean;
46
+ promotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
39
47
  }
40
48
  interface OrderAmountPromotionRuleUpdate extends ResourceUpdate {
41
49
  order_amount_cents?: number;
42
- promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
50
+ use_subtotal?: boolean;
51
+ promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
43
52
  }
44
53
  declare class OrderAmountPromotionRules extends ApiResource {
45
54
  static readonly TYPE: 'order_amount_promotion_rules';
@@ -48,6 +57,7 @@ declare class OrderAmountPromotionRules extends ApiResource {
48
57
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
49
58
  update(resource: OrderAmountPromotionRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
50
59
  delete(id: string, options?: ResourcesConfig): Promise<void>;
60
+ versions(orderAmountPromotionRuleId: string | OrderAmountPromotionRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
51
61
  isOrderAmountPromotionRule(resource: any): resource is OrderAmountPromotionRule;
52
62
  relationship(id: string | ResourceId | null): OrderAmountPromotionRuleRel;
53
63
  type(): string;
@@ -16,6 +16,10 @@ class OrderAmountPromotionRules extends ApiResource {
16
16
  async delete(id, options) {
17
17
  await this.resources.delete({ type: OrderAmountPromotionRules.TYPE, id }, options);
18
18
  }
19
+ async versions(orderAmountPromotionRuleId, params, options) {
20
+ const _orderAmountPromotionRuleId = orderAmountPromotionRuleId.id || orderAmountPromotionRuleId;
21
+ return this.resources.fetch({ type: 'versions' }, `order_amount_promotion_rules/${_orderAmountPromotionRuleId}/versions`, params, options);
22
+ }
19
23
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
20
24
  isOrderAmountPromotionRule(resource) {
21
25
  return resource.type && (resource.type === OrderAmountPromotionRules.TYPE);
@@ -4,6 +4,7 @@ import type { OrderSubscription } from './order_subscriptions';
4
4
  import type { Adjustment } from './adjustments';
5
5
  import type { Bundle } from './bundles';
6
6
  import type { Sku } from './skus';
7
+ import type { LineItem } from './line_items';
7
8
  type OrderSubscriptionItemRel = ResourceRel & {
8
9
  type: typeof OrderSubscriptionItems.TYPE;
9
10
  };
@@ -29,6 +30,9 @@ interface OrderSubscriptionItem extends Resource {
29
30
  formatted_total_amount?: string;
30
31
  order_subscription?: OrderSubscription;
31
32
  item?: Adjustment | Bundle | Sku;
33
+ sku?: Sku;
34
+ bundle?: Bundle;
35
+ source_line_item?: LineItem;
32
36
  }
33
37
  interface OrderSubscriptionItemCreate extends ResourceCreate {
34
38
  sku_code?: string;
@@ -37,6 +41,8 @@ interface OrderSubscriptionItemCreate extends ResourceCreate {
37
41
  unit_amount_cents?: number;
38
42
  order_subscription: OrderSubscriptionRel;
39
43
  item: AdjustmentRel | BundleRel | SkuRel;
44
+ sku?: SkuRel;
45
+ bundle?: BundleRel;
40
46
  }
41
47
  interface OrderSubscriptionItemUpdate extends ResourceUpdate {
42
48
  sku_code?: string;
@@ -52,6 +58,7 @@ declare class OrderSubscriptionItems extends ApiResource {
52
58
  update(resource: OrderSubscriptionItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscriptionItem>;
53
59
  delete(id: string, options?: ResourcesConfig): Promise<void>;
54
60
  order_subscription(orderSubscriptionItemId: string | OrderSubscriptionItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
61
+ source_line_item(orderSubscriptionItemId: string | OrderSubscriptionItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
55
62
  isOrderSubscriptionItem(resource: any): resource is OrderSubscriptionItem;
56
63
  relationship(id: string | ResourceId | null): OrderSubscriptionItemRel;
57
64
  type(): string;
@@ -20,6 +20,10 @@ class OrderSubscriptionItems extends ApiResource {
20
20
  const _orderSubscriptionItemId = orderSubscriptionItemId.id || orderSubscriptionItemId;
21
21
  return this.resources.fetch({ type: 'order_subscriptions' }, `order_subscription_items/${_orderSubscriptionItemId}/order_subscription`, params, options);
22
22
  }
23
+ async source_line_item(orderSubscriptionItemId, params, options) {
24
+ const _orderSubscriptionItemId = orderSubscriptionItemId.id || orderSubscriptionItemId;
25
+ return this.resources.fetch({ type: 'line_items' }, `order_subscription_items/${_orderSubscriptionItemId}/source_line_item`, params, options);
26
+ }
23
27
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
24
28
  isOrderSubscriptionItem(resource) {
25
29
  return resource.type && (resource.type === OrderSubscriptionItems.TYPE);
@@ -9,6 +9,7 @@ import type { OrderSubscriptionItem } from './order_subscription_items';
9
9
  import type { OrderFactory } from './order_factories';
10
10
  import type { RecurringOrderCopy } from './recurring_order_copies';
11
11
  import type { Event } from './events';
12
+ import type { Version } from './versions';
12
13
  type OrderSubscriptionRel = ResourceRel & {
13
14
  type: typeof OrderSubscriptions.TYPE;
14
15
  };
@@ -29,6 +30,7 @@ interface OrderSubscription extends Resource {
29
30
  customer_email?: string;
30
31
  starts_at?: string;
31
32
  expires_at?: string;
33
+ last_run_at?: string;
32
34
  next_run_at?: string;
33
35
  occurrencies?: number;
34
36
  errors_count?: number;
@@ -48,6 +50,7 @@ interface OrderSubscription extends Resource {
48
50
  recurring_order_copies?: RecurringOrderCopy[];
49
51
  orders?: Order[];
50
52
  events?: Event[];
53
+ versions?: Version[];
51
54
  }
52
55
  interface OrderSubscriptionCreate extends ResourceCreate {
53
56
  frequency: string;
@@ -84,6 +87,7 @@ declare class OrderSubscriptions extends ApiResource {
84
87
  recurring_order_copies(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<RecurringOrderCopy>>;
85
88
  orders(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Order>>;
86
89
  events(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
90
+ versions(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
87
91
  isOrderSubscription(resource: any): resource is OrderSubscription;
88
92
  relationship(id: string | ResourceId | null): OrderSubscriptionRel;
89
93
  type(): string;
@@ -56,6 +56,10 @@ class OrderSubscriptions extends ApiResource {
56
56
  const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
57
57
  return this.resources.fetch({ type: 'events' }, `order_subscriptions/${_orderSubscriptionId}/events`, params, options);
58
58
  }
59
+ async versions(orderSubscriptionId, params, options) {
60
+ const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
61
+ return this.resources.fetch({ type: 'versions' }, `order_subscriptions/${_orderSubscriptionId}/versions`, params, options);
62
+ }
59
63
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
60
64
  isOrderSubscription(resource) {
61
65
  return resource.type && (resource.type === OrderSubscriptions.TYPE);
@@ -2,12 +2,14 @@ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListRe
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Market } from './markets';
4
4
  import type { Attachment } from './attachments';
5
+ import type { Version } from './versions';
5
6
  type OrderValidationRuleRel = ResourceRel & {
6
7
  type: typeof OrderValidationRules.TYPE;
7
8
  };
8
9
  interface OrderValidationRule extends Resource {
9
10
  market?: Market;
10
11
  attachments?: Attachment[];
12
+ versions?: Version[];
11
13
  }
12
14
  declare class OrderValidationRules extends ApiResource {
13
15
  static readonly TYPE: 'order_validation_rules';
@@ -15,6 +17,7 @@ declare class OrderValidationRules extends ApiResource {
15
17
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderValidationRule>;
16
18
  market(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
17
19
  attachments(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
20
+ versions(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
18
21
  isOrderValidationRule(resource: any): resource is OrderValidationRule;
19
22
  relationship(id: string | ResourceId | null): OrderValidationRuleRel;
20
23
  type(): string;
@@ -15,6 +15,10 @@ class OrderValidationRules extends ApiResource {
15
15
  const _orderValidationRuleId = orderValidationRuleId.id || orderValidationRuleId;
16
16
  return this.resources.fetch({ type: 'attachments' }, `order_validation_rules/${_orderValidationRuleId}/attachments`, params, options);
17
17
  }
18
+ async versions(orderValidationRuleId, params, options) {
19
+ const _orderValidationRuleId = orderValidationRuleId.id || orderValidationRuleId;
20
+ return this.resources.fetch({ type: 'versions' }, `order_validation_rules/${_orderValidationRuleId}/versions`, params, options);
21
+ }
18
22
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
19
23
  isOrderValidationRule(resource) {
20
24
  return resource.type && (resource.type === OrderValidationRules.TYPE);