@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
@@ -5,6 +5,7 @@ import type { Package } from './packages';
5
5
  import type { ParcelLineItem } from './parcel_line_items';
6
6
  import type { Attachment } from './attachments';
7
7
  import type { Event } from './events';
8
+ import type { Version } from './versions';
8
9
  type ParcelRel = ResourceRel & {
9
10
  type: typeof Parcels.TYPE;
10
11
  };
@@ -35,15 +36,17 @@ interface Parcel extends Resource {
35
36
  tracking_status?: string;
36
37
  tracking_status_detail?: string;
37
38
  tracking_status_updated_at?: string;
38
- tracking_details?: string;
39
+ tracking_details?: object;
39
40
  carrier_weight_oz?: string;
40
41
  signed_by?: string;
41
42
  incoterm?: string;
43
+ delivery_confirmation?: string;
42
44
  shipment?: Shipment;
43
45
  package?: Package;
44
46
  parcel_line_items?: ParcelLineItem[];
45
47
  attachments?: Attachment[];
46
48
  events?: Event[];
49
+ versions?: Version[];
47
50
  }
48
51
  interface ParcelCreate extends ResourceCreate {
49
52
  weight: number;
@@ -65,10 +68,11 @@ interface ParcelCreate extends ResourceCreate {
65
68
  tracking_status?: string;
66
69
  tracking_status_detail?: string;
67
70
  tracking_status_updated_at?: string;
68
- tracking_details?: string;
71
+ tracking_details?: object;
69
72
  carrier_weight_oz?: string;
70
73
  signed_by?: string;
71
74
  incoterm?: string;
75
+ delivery_confirmation?: string;
72
76
  shipment: ShipmentRel;
73
77
  package: PackageRel;
74
78
  }
@@ -92,10 +96,11 @@ interface ParcelUpdate extends ResourceUpdate {
92
96
  tracking_status?: string;
93
97
  tracking_status_detail?: string;
94
98
  tracking_status_updated_at?: string;
95
- tracking_details?: string;
99
+ tracking_details?: object;
96
100
  carrier_weight_oz?: string;
97
101
  signed_by?: string;
98
102
  incoterm?: string;
103
+ delivery_confirmation?: string;
99
104
  shipment?: ShipmentRel;
100
105
  package?: PackageRel;
101
106
  }
@@ -111,6 +116,7 @@ declare class Parcels extends ApiResource {
111
116
  parcel_line_items(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ParcelLineItem>>;
112
117
  attachments(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
113
118
  events(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
119
+ versions(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
114
120
  isParcel(resource: any): resource is Parcel;
115
121
  relationship(id: string | ResourceId | null): ParcelRel;
116
122
  type(): string;
@@ -38,6 +38,10 @@ class Parcels extends resource_1.ApiResource {
38
38
  const _parcelId = parcelId.id || parcelId;
39
39
  return this.resources.fetch({ type: 'events' }, `parcels/${_parcelId}/events`, params, options);
40
40
  }
41
+ async versions(parcelId, params, options) {
42
+ const _parcelId = parcelId.id || parcelId;
43
+ return this.resources.fetch({ type: 'versions' }, `parcels/${_parcelId}/versions`, params, options);
44
+ }
41
45
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
42
46
  isParcel(resource) {
43
47
  return resource.type && (resource.type === Parcels.TYPE);
@@ -1,18 +1,21 @@
1
1
  import { ApiResource, Resource, 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 PaymentGatewayRel = ResourceRel & {
5
6
  type: typeof PaymentGateways.TYPE;
6
7
  };
7
8
  interface PaymentGateway extends Resource {
8
9
  name?: string;
9
10
  payment_methods?: PaymentMethod[];
11
+ versions?: Version[];
10
12
  }
11
13
  declare class PaymentGateways extends ApiResource {
12
14
  static readonly TYPE: 'payment_gateways';
13
15
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentGateway>>;
14
16
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
15
17
  payment_methods(paymentGatewayId: string | PaymentGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
18
+ versions(paymentGatewayId: string | PaymentGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
16
19
  isPaymentGateway(resource: any): resource is PaymentGateway;
17
20
  relationship(id: string | ResourceId | null): PaymentGatewayRel;
18
21
  type(): string;
@@ -13,6 +13,10 @@ class PaymentGateways extends resource_1.ApiResource {
13
13
  const _paymentGatewayId = paymentGatewayId.id || paymentGatewayId;
14
14
  return this.resources.fetch({ type: 'payment_methods' }, `payment_gateways/${_paymentGatewayId}/payment_methods`, params, options);
15
15
  }
16
+ async versions(paymentGatewayId, params, options) {
17
+ const _paymentGatewayId = paymentGatewayId.id || paymentGatewayId;
18
+ return this.resources.fetch({ type: 'versions' }, `payment_gateways/${_paymentGatewayId}/versions`, params, options);
19
+ }
16
20
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
17
21
  isPaymentGateway(resource) {
18
22
  return resource.type && (resource.type === PaymentGateways.TYPE);
@@ -3,6 +3,7 @@ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Market } from './markets';
4
4
  import type { PaymentGateway } from './payment_gateways';
5
5
  import type { Attachment } from './attachments';
6
+ import type { Version } from './versions';
6
7
  type PaymentMethodRel = ResourceRel & {
7
8
  type: typeof PaymentMethods.TYPE;
8
9
  };
@@ -13,11 +14,12 @@ type PaymentGatewayRel = ResourceRel & {
13
14
  type: 'payment_gateways';
14
15
  };
15
16
  interface PaymentMethod extends Resource {
16
- payment_source_type?: string;
17
17
  name?: string;
18
+ payment_source_type?: string;
18
19
  currency_code?: string;
19
20
  moto?: boolean;
20
21
  require_capture?: boolean;
22
+ auto_place?: boolean;
21
23
  auto_capture?: boolean;
22
24
  disabled_at?: string;
23
25
  price_amount_cents?: number;
@@ -29,13 +31,17 @@ interface PaymentMethod extends Resource {
29
31
  market?: Market;
30
32
  payment_gateway?: PaymentGateway;
31
33
  attachments?: Attachment[];
34
+ versions?: Version[];
32
35
  }
33
36
  interface PaymentMethodCreate extends ResourceCreate {
34
37
  payment_source_type: string;
35
38
  currency_code?: string;
36
39
  moto?: boolean;
37
40
  require_capture?: boolean;
41
+ auto_place?: boolean;
38
42
  auto_capture?: boolean;
43
+ _disable?: boolean;
44
+ _enable?: boolean;
39
45
  price_amount_cents: number;
40
46
  auto_capture_max_amount_cents?: number;
41
47
  market?: MarketRel;
@@ -46,6 +52,7 @@ interface PaymentMethodUpdate extends ResourceUpdate {
46
52
  currency_code?: string;
47
53
  moto?: boolean;
48
54
  require_capture?: boolean;
55
+ auto_place?: boolean;
49
56
  auto_capture?: boolean;
50
57
  _disable?: boolean;
51
58
  _enable?: boolean;
@@ -64,6 +71,7 @@ declare class PaymentMethods extends ApiResource {
64
71
  market(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
65
72
  payment_gateway(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
66
73
  attachments(paymentMethodId: string | PaymentMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
74
+ versions(paymentMethodId: string | PaymentMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
67
75
  isPaymentMethod(resource: any): resource is PaymentMethod;
68
76
  relationship(id: string | ResourceId | null): PaymentMethodRel;
69
77
  type(): string;
@@ -30,6 +30,10 @@ class PaymentMethods extends resource_1.ApiResource {
30
30
  const _paymentMethodId = paymentMethodId.id || paymentMethodId;
31
31
  return this.resources.fetch({ type: 'attachments' }, `payment_methods/${_paymentMethodId}/attachments`, params, options);
32
32
  }
33
+ async versions(paymentMethodId, params, options) {
34
+ const _paymentMethodId = paymentMethodId.id || paymentMethodId;
35
+ return this.resources.fetch({ type: 'versions' }, `payment_methods/${_paymentMethodId}/versions`, params, options);
36
+ }
33
37
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
34
38
  isPaymentMethod(resource) {
35
39
  return resource.type && (resource.type === PaymentMethods.TYPE);
@@ -0,0 +1,43 @@
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { Order } from './orders';
4
+ import type { Attachment } from './attachments';
5
+ type PaymentOptionRel = ResourceRel & {
6
+ type: typeof PaymentOptions.TYPE;
7
+ };
8
+ type OrderRel = ResourceRel & {
9
+ type: 'orders';
10
+ };
11
+ interface PaymentOption extends Resource {
12
+ name?: string;
13
+ payment_source_type?: string;
14
+ data?: object;
15
+ order?: Order;
16
+ attachments?: Attachment[];
17
+ }
18
+ interface PaymentOptionCreate extends ResourceCreate {
19
+ name?: string;
20
+ payment_source_type: string;
21
+ data: object;
22
+ order: OrderRel;
23
+ }
24
+ interface PaymentOptionUpdate extends ResourceUpdate {
25
+ name?: string;
26
+ data?: object;
27
+ order?: OrderRel;
28
+ }
29
+ declare class PaymentOptions extends ApiResource {
30
+ static readonly TYPE: 'payment_options';
31
+ list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentOption>>;
32
+ create(resource: PaymentOptionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentOption>;
33
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentOption>;
34
+ update(resource: PaymentOptionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentOption>;
35
+ delete(id: string, options?: ResourcesConfig): Promise<void>;
36
+ order(paymentOptionId: string | PaymentOption, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
37
+ attachments(paymentOptionId: string | PaymentOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
38
+ isPaymentOption(resource: any): resource is PaymentOption;
39
+ relationship(id: string | ResourceId | null): PaymentOptionRel;
40
+ type(): string;
41
+ }
42
+ export default PaymentOptions;
43
+ export { PaymentOption, PaymentOptionCreate, PaymentOptionUpdate };
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const resource_1 = require("../resource");
4
+ class PaymentOptions extends resource_1.ApiResource {
5
+ // static readonly PATH = 'payment_options'
6
+ async list(params, options) {
7
+ return this.resources.list({ type: PaymentOptions.TYPE }, params, options);
8
+ }
9
+ async create(resource, params, options) {
10
+ return this.resources.create(Object.assign(Object.assign({}, resource), { type: PaymentOptions.TYPE }), params, options);
11
+ }
12
+ async retrieve(id, params, options) {
13
+ return this.resources.retrieve({ type: PaymentOptions.TYPE, id }, params, options);
14
+ }
15
+ async update(resource, params, options) {
16
+ return this.resources.update(Object.assign(Object.assign({}, resource), { type: PaymentOptions.TYPE }), params, options);
17
+ }
18
+ async delete(id, options) {
19
+ await this.resources.delete({ type: PaymentOptions.TYPE, id }, options);
20
+ }
21
+ async order(paymentOptionId, params, options) {
22
+ const _paymentOptionId = paymentOptionId.id || paymentOptionId;
23
+ return this.resources.fetch({ type: 'orders' }, `payment_options/${_paymentOptionId}/order`, params, options);
24
+ }
25
+ async attachments(paymentOptionId, params, options) {
26
+ const _paymentOptionId = paymentOptionId.id || paymentOptionId;
27
+ return this.resources.fetch({ type: 'attachments' }, `payment_options/${_paymentOptionId}/attachments`, params, options);
28
+ }
29
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
30
+ isPaymentOption(resource) {
31
+ return resource.type && (resource.type === PaymentOptions.TYPE);
32
+ }
33
+ relationship(id) {
34
+ return ((id === null) || (typeof id === 'string')) ? { id, type: PaymentOptions.TYPE } : { id: id.id, type: PaymentOptions.TYPE };
35
+ }
36
+ type() {
37
+ return PaymentOptions.TYPE;
38
+ }
39
+ }
40
+ PaymentOptions.TYPE = 'payment_options';
41
+ exports.default = PaymentOptions;
@@ -1,6 +1,7 @@
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
  import type { PaypalPayment } from './paypal_payments';
5
6
  type PaypalGatewayRel = ResourceRel & {
6
7
  type: typeof PaypalGateways.TYPE;
@@ -8,6 +9,7 @@ type PaypalGatewayRel = ResourceRel & {
8
9
  interface PaypalGateway extends Resource {
9
10
  name?: string;
10
11
  payment_methods?: PaymentMethod[];
12
+ versions?: Version[];
11
13
  paypal_payments?: PaypalPayment[];
12
14
  }
13
15
  interface PaypalGatewayCreate extends ResourceCreate {
@@ -28,6 +30,7 @@ declare class PaypalGateways extends ApiResource {
28
30
  update(resource: PaypalGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaypalGateway>;
29
31
  delete(id: string, options?: ResourcesConfig): Promise<void>;
30
32
  payment_methods(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
33
+ versions(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
31
34
  paypal_payments(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaypalPayment>>;
32
35
  isPaypalGateway(resource: any): resource is PaypalGateway;
33
36
  relationship(id: string | ResourceId | null): PaypalGatewayRel;
@@ -22,6 +22,10 @@ class PaypalGateways extends resource_1.ApiResource {
22
22
  const _paypalGatewayId = paypalGatewayId.id || paypalGatewayId;
23
23
  return this.resources.fetch({ type: 'payment_methods' }, `paypal_gateways/${_paypalGatewayId}/payment_methods`, params, options);
24
24
  }
25
+ async versions(paypalGatewayId, params, options) {
26
+ const _paypalGatewayId = paypalGatewayId.id || paypalGatewayId;
27
+ return this.resources.fetch({ type: 'versions' }, `paypal_gateways/${_paypalGatewayId}/versions`, params, options);
28
+ }
25
29
  async paypal_payments(paypalGatewayId, params, options) {
26
30
  const _paypalGatewayId = paypalGatewayId.id || paypalGatewayId;
27
31
  return this.resources.fetch({ type: 'paypal_payments' }, `paypal_gateways/${_paypalGatewayId}/paypal_payments`, params, options);
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Order } from './orders';
4
4
  import type { PaymentGateway } from './payment_gateways';
5
+ import type { Version } from './versions';
5
6
  type PaypalPaymentRel = ResourceRel & {
6
7
  type: typeof PaypalPayments.TYPE;
7
8
  };
@@ -24,6 +25,7 @@ interface PaypalPayment extends Resource {
24
25
  payment_instrument?: object;
25
26
  order?: Order;
26
27
  payment_gateway?: PaymentGateway;
28
+ versions?: Version[];
27
29
  }
28
30
  interface PaypalPaymentCreate extends ResourceCreate {
29
31
  return_url: string;
@@ -44,6 +46,7 @@ declare class PaypalPayments extends ApiResource {
44
46
  delete(id: string, options?: ResourcesConfig): Promise<void>;
45
47
  order(paypalPaymentId: string | PaypalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
46
48
  payment_gateway(paypalPaymentId: string | PaypalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
49
+ versions(paypalPaymentId: string | PaypalPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
47
50
  isPaypalPayment(resource: any): resource is PaypalPayment;
48
51
  relationship(id: string | ResourceId | null): PaypalPaymentRel;
49
52
  type(): string;
@@ -26,6 +26,10 @@ class PaypalPayments extends resource_1.ApiResource {
26
26
  const _paypalPaymentId = paypalPaymentId.id || paypalPaymentId;
27
27
  return this.resources.fetch({ type: 'payment_gateways' }, `paypal_payments/${_paypalPaymentId}/payment_gateway`, params, options);
28
28
  }
29
+ async versions(paypalPaymentId, params, options) {
30
+ const _paypalPaymentId = paypalPaymentId.id || paypalPaymentId;
31
+ return this.resources.fetch({ type: 'versions' }, `paypal_payments/${_paypalPaymentId}/versions`, params, options);
32
+ }
29
33
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
30
34
  isPaypalPayment(resource) {
31
35
  return resource.type && (resource.type === PaypalPayments.TYPE);
@@ -5,9 +5,13 @@ import type { PromotionRule } from './promotion_rules';
5
5
  import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
6
6
  import type { SkuListPromotionRule } from './sku_list_promotion_rules';
7
7
  import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
8
+ import type { CustomPromotionRule } from './custom_promotion_rules';
9
+ import type { SkuList } from './sku_lists';
10
+ import type { Coupon } from './coupons';
8
11
  import type { Attachment } from './attachments';
9
12
  import type { Event } from './events';
10
- import type { SkuList } from './sku_lists';
13
+ import type { Tag } from './tags';
14
+ import type { Version } from './versions';
11
15
  import type { Sku } from './skus';
12
16
  type PercentageDiscountPromotionRel = ResourceRel & {
13
17
  type: typeof PercentageDiscountPromotions.TYPE;
@@ -15,9 +19,6 @@ type PercentageDiscountPromotionRel = ResourceRel & {
15
19
  type MarketRel = ResourceRel & {
16
20
  type: 'markets';
17
21
  };
18
- type PromotionRuleRel = ResourceRel & {
19
- type: 'promotion_rules';
20
- };
21
22
  type OrderAmountPromotionRuleRel = ResourceRel & {
22
23
  type: 'order_amount_promotion_rules';
23
24
  };
@@ -27,55 +28,78 @@ type SkuListPromotionRuleRel = ResourceRel & {
27
28
  type CouponCodesPromotionRuleRel = ResourceRel & {
28
29
  type: 'coupon_codes_promotion_rules';
29
30
  };
31
+ type CustomPromotionRuleRel = ResourceRel & {
32
+ type: 'custom_promotion_rules';
33
+ };
30
34
  type SkuListRel = ResourceRel & {
31
35
  type: 'sku_lists';
32
36
  };
37
+ type TagRel = ResourceRel & {
38
+ type: 'tags';
39
+ };
33
40
  interface PercentageDiscountPromotion extends Resource {
34
41
  name?: string;
35
42
  currency_code?: string;
43
+ exclusive?: boolean;
44
+ priority?: number;
36
45
  starts_at?: string;
37
46
  expires_at?: string;
38
47
  total_usage_limit?: number;
39
48
  total_usage_count?: number;
40
49
  active?: boolean;
50
+ disabled_at?: string;
41
51
  percentage?: number;
42
52
  market?: Market;
43
53
  promotion_rules?: PromotionRule[];
44
54
  order_amount_promotion_rule?: OrderAmountPromotionRule;
45
55
  sku_list_promotion_rule?: SkuListPromotionRule;
46
56
  coupon_codes_promotion_rule?: CouponCodesPromotionRule;
57
+ custom_promotion_rule?: CustomPromotionRule;
58
+ sku_list?: SkuList;
59
+ coupons?: Coupon[];
47
60
  attachments?: Attachment[];
48
61
  events?: Event[];
49
- sku_list?: SkuList;
62
+ tags?: Tag[];
63
+ versions?: Version[];
50
64
  skus?: Sku[];
51
65
  }
52
66
  interface PercentageDiscountPromotionCreate extends ResourceCreate {
53
67
  name: string;
54
68
  currency_code?: string;
69
+ exclusive?: boolean;
70
+ priority?: number;
55
71
  starts_at: string;
56
72
  expires_at: string;
57
- total_usage_limit: number;
73
+ total_usage_limit?: number;
74
+ _disable?: boolean;
75
+ _enable?: boolean;
58
76
  percentage: number;
59
77
  market?: MarketRel;
60
- promotion_rules?: PromotionRuleRel[];
61
78
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
62
79
  sku_list_promotion_rule?: SkuListPromotionRuleRel;
63
80
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
81
+ custom_promotion_rule?: CustomPromotionRuleRel;
64
82
  sku_list?: SkuListRel;
83
+ tags?: TagRel[];
65
84
  }
66
85
  interface PercentageDiscountPromotionUpdate extends ResourceUpdate {
67
86
  name?: string;
68
87
  currency_code?: string;
88
+ exclusive?: boolean;
89
+ priority?: number;
69
90
  starts_at?: string;
70
91
  expires_at?: string;
71
92
  total_usage_limit?: number;
93
+ _disable?: boolean;
94
+ _enable?: boolean;
72
95
  percentage?: number;
73
96
  market?: MarketRel;
74
- promotion_rules?: PromotionRuleRel[];
75
97
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
76
98
  sku_list_promotion_rule?: SkuListPromotionRuleRel;
77
99
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
100
+ custom_promotion_rule?: CustomPromotionRuleRel;
78
101
  sku_list?: SkuListRel;
102
+ tags?: TagRel[];
79
103
  }
80
104
  declare class PercentageDiscountPromotions extends ApiResource {
81
105
  static readonly TYPE: 'percentage_discount_promotions';
@@ -88,9 +112,13 @@ declare class PercentageDiscountPromotions extends ApiResource {
88
112
  order_amount_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
89
113
  sku_list_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
90
114
  coupon_codes_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
115
+ custom_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
116
+ sku_list(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
117
+ coupons(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
91
118
  attachments(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
92
119
  events(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
93
- sku_list(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
120
+ tags(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
121
+ versions(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
94
122
  skus(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
95
123
  isPercentageDiscountPromotion(resource: any): resource is PercentageDiscountPromotion;
96
124
  relationship(id: string | ResourceId | null): PercentageDiscountPromotionRel;
@@ -34,6 +34,18 @@ class PercentageDiscountPromotions extends resource_1.ApiResource {
34
34
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
35
35
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/coupon_codes_promotion_rule`, params, options);
36
36
  }
37
+ async custom_promotion_rule(percentageDiscountPromotionId, params, options) {
38
+ const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
39
+ return this.resources.fetch({ type: 'custom_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/custom_promotion_rule`, params, options);
40
+ }
41
+ async sku_list(percentageDiscountPromotionId, params, options) {
42
+ const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
43
+ return this.resources.fetch({ type: 'sku_lists' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/sku_list`, params, options);
44
+ }
45
+ async coupons(percentageDiscountPromotionId, params, options) {
46
+ const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
47
+ return this.resources.fetch({ type: 'coupons' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/coupons`, params, options);
48
+ }
37
49
  async attachments(percentageDiscountPromotionId, params, options) {
38
50
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
39
51
  return this.resources.fetch({ type: 'attachments' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/attachments`, params, options);
@@ -42,9 +54,13 @@ class PercentageDiscountPromotions extends resource_1.ApiResource {
42
54
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
43
55
  return this.resources.fetch({ type: 'events' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/events`, params, options);
44
56
  }
45
- async sku_list(percentageDiscountPromotionId, params, options) {
57
+ async tags(percentageDiscountPromotionId, params, options) {
46
58
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
47
- return this.resources.fetch({ type: 'sku_lists' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/sku_list`, params, options);
59
+ return this.resources.fetch({ type: 'tags' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/tags`, params, options);
60
+ }
61
+ async versions(percentageDiscountPromotionId, params, options) {
62
+ const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
63
+ return this.resources.fetch({ type: 'versions' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/versions`, params, options);
48
64
  }
49
65
  async skus(percentageDiscountPromotionId, params, options) {
50
66
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Price } from './prices';
4
4
  import type { Attachment } from './attachments';
5
+ import type { Version } from './versions';
5
6
  import type { Event } from './events';
6
7
  type PriceFrequencyTierRel = ResourceRel & {
7
8
  type: typeof PriceFrequencyTiers.TYPE;
@@ -17,6 +18,7 @@ interface PriceFrequencyTier extends Resource {
17
18
  formatted_price_amount?: string;
18
19
  price?: Price;
19
20
  attachments?: Attachment[];
21
+ versions?: Version[];
20
22
  events?: Event[];
21
23
  }
22
24
  interface PriceFrequencyTierCreate extends ResourceCreate {
@@ -40,6 +42,7 @@ declare class PriceFrequencyTiers extends ApiResource {
40
42
  delete(id: string, options?: ResourcesConfig): Promise<void>;
41
43
  price(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Price>;
42
44
  attachments(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
45
+ versions(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
43
46
  events(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
44
47
  isPriceFrequencyTier(resource: any): resource is PriceFrequencyTier;
45
48
  relationship(id: string | ResourceId | null): PriceFrequencyTierRel;
@@ -26,6 +26,10 @@ class PriceFrequencyTiers extends resource_1.ApiResource {
26
26
  const _priceFrequencyTierId = priceFrequencyTierId.id || priceFrequencyTierId;
27
27
  return this.resources.fetch({ type: 'attachments' }, `price_frequency_tiers/${_priceFrequencyTierId}/attachments`, params, options);
28
28
  }
29
+ async versions(priceFrequencyTierId, params, options) {
30
+ const _priceFrequencyTierId = priceFrequencyTierId.id || priceFrequencyTierId;
31
+ return this.resources.fetch({ type: 'versions' }, `price_frequency_tiers/${_priceFrequencyTierId}/versions`, params, options);
32
+ }
29
33
  async events(priceFrequencyTierId, params, options) {
30
34
  const _priceFrequencyTierId = priceFrequencyTierId.id || priceFrequencyTierId;
31
35
  return this.resources.fetch({ type: 'events' }, `price_frequency_tiers/${_priceFrequencyTierId}/events`, params, options);
@@ -2,23 +2,28 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Price } from './prices';
4
4
  import type { Attachment } from './attachments';
5
+ import type { Version } from './versions';
5
6
  type PriceListRel = ResourceRel & {
6
7
  type: typeof PriceLists.TYPE;
7
8
  };
8
9
  interface PriceList extends Resource {
9
10
  name?: string;
11
+ code?: string;
10
12
  currency_code?: string;
11
13
  tax_included?: boolean;
12
14
  prices?: Price[];
13
15
  attachments?: Attachment[];
16
+ versions?: Version[];
14
17
  }
15
18
  interface PriceListCreate extends ResourceCreate {
16
19
  name: string;
20
+ code?: string;
17
21
  currency_code: string;
18
22
  tax_included?: boolean;
19
23
  }
20
24
  interface PriceListUpdate extends ResourceUpdate {
21
25
  name?: string;
26
+ code?: string;
22
27
  currency_code?: string;
23
28
  tax_included?: boolean;
24
29
  }
@@ -31,6 +36,7 @@ declare class PriceLists extends ApiResource {
31
36
  delete(id: string, options?: ResourcesConfig): Promise<void>;
32
37
  prices(priceListId: string | PriceList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Price>>;
33
38
  attachments(priceListId: string | PriceList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
39
+ versions(priceListId: string | PriceList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
34
40
  isPriceList(resource: any): resource is PriceList;
35
41
  relationship(id: string | ResourceId | null): PriceListRel;
36
42
  type(): string;
@@ -26,6 +26,10 @@ class PriceLists extends resource_1.ApiResource {
26
26
  const _priceListId = priceListId.id || priceListId;
27
27
  return this.resources.fetch({ type: 'attachments' }, `price_lists/${_priceListId}/attachments`, params, options);
28
28
  }
29
+ async versions(priceListId, params, options) {
30
+ const _priceListId = priceListId.id || priceListId;
31
+ return this.resources.fetch({ type: 'versions' }, `price_lists/${_priceListId}/versions`, params, options);
32
+ }
29
33
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
30
34
  isPriceList(resource) {
31
35
  return resource.type && (resource.type === PriceLists.TYPE);
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListRe
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Price } from './prices';
4
4
  import type { Attachment } from './attachments';
5
+ import type { Version } from './versions';
5
6
  type PriceTierRel = ResourceRel & {
6
7
  type: typeof PriceTiers.TYPE;
7
8
  };
@@ -13,6 +14,7 @@ interface PriceTier extends Resource {
13
14
  formatted_price_amount?: string;
14
15
  price?: Price;
15
16
  attachments?: Attachment[];
17
+ versions?: Version[];
16
18
  }
17
19
  declare class PriceTiers extends ApiResource {
18
20
  static readonly TYPE: 'price_tiers';
@@ -20,6 +22,7 @@ declare class PriceTiers extends ApiResource {
20
22
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceTier>;
21
23
  price(priceTierId: string | PriceTier, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Price>;
22
24
  attachments(priceTierId: string | PriceTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
25
+ versions(priceTierId: string | PriceTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
23
26
  isPriceTier(resource: any): resource is PriceTier;
24
27
  relationship(id: string | ResourceId | null): PriceTierRel;
25
28
  type(): string;
@@ -17,6 +17,10 @@ class PriceTiers extends resource_1.ApiResource {
17
17
  const _priceTierId = priceTierId.id || priceTierId;
18
18
  return this.resources.fetch({ type: 'attachments' }, `price_tiers/${_priceTierId}/attachments`, params, options);
19
19
  }
20
+ async versions(priceTierId, params, options) {
21
+ const _priceTierId = priceTierId.id || priceTierId;
22
+ return this.resources.fetch({ type: 'versions' }, `price_tiers/${_priceTierId}/versions`, params, options);
23
+ }
20
24
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
21
25
  isPriceTier(resource) {
22
26
  return resource.type && (resource.type === PriceTiers.TYPE);
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Price } from './prices';
4
4
  import type { Attachment } from './attachments';
5
+ import type { Version } from './versions';
5
6
  import type { Event } from './events';
6
7
  type PriceVolumeTierRel = ResourceRel & {
7
8
  type: typeof PriceVolumeTiers.TYPE;
@@ -17,6 +18,7 @@ interface PriceVolumeTier extends Resource {
17
18
  formatted_price_amount?: string;
18
19
  price?: Price;
19
20
  attachments?: Attachment[];
21
+ versions?: Version[];
20
22
  events?: Event[];
21
23
  }
22
24
  interface PriceVolumeTierCreate extends ResourceCreate {
@@ -40,6 +42,7 @@ declare class PriceVolumeTiers extends ApiResource {
40
42
  delete(id: string, options?: ResourcesConfig): Promise<void>;
41
43
  price(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Price>;
42
44
  attachments(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
45
+ versions(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
43
46
  events(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
44
47
  isPriceVolumeTier(resource: any): resource is PriceVolumeTier;
45
48
  relationship(id: string | ResourceId | null): PriceVolumeTierRel;