@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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * ©2023 Commerce Layer Inc.
2
+ * ©2024 Commerce Layer Inc.
3
3
  **/
4
4
  export type { Address, AddressCreate, AddressUpdate } from './resources/addresses';
5
5
  export type { Adjustment, AdjustmentCreate, AdjustmentUpdate } from './resources/adjustments';
@@ -16,6 +16,7 @@ export type { BingGeocoder, BingGeocoderCreate, BingGeocoderUpdate } from './res
16
16
  export type { BraintreeGateway, BraintreeGatewayCreate, BraintreeGatewayUpdate } from './resources/braintree_gateways';
17
17
  export type { BraintreePayment, BraintreePaymentCreate, BraintreePaymentUpdate } from './resources/braintree_payments';
18
18
  export type { Bundle, BundleCreate, BundleUpdate } from './resources/bundles';
19
+ export type { BuyXPayYPromotion, BuyXPayYPromotionCreate, BuyXPayYPromotionUpdate } from './resources/buy_x_pay_y_promotions';
19
20
  export type { Capture, CaptureUpdate } from './resources/captures';
20
21
  export type { CarrierAccount } from './resources/carrier_accounts';
21
22
  export type { CheckoutComGateway, CheckoutComGatewayCreate, CheckoutComGatewayUpdate } from './resources/checkout_com_gateways';
@@ -24,6 +25,7 @@ export type { Cleanup, CleanupCreate } from './resources/cleanups';
24
25
  export type { CouponCodesPromotionRule, CouponCodesPromotionRuleCreate, CouponCodesPromotionRuleUpdate } from './resources/coupon_codes_promotion_rules';
25
26
  export type { CouponRecipient, CouponRecipientCreate, CouponRecipientUpdate } from './resources/coupon_recipients';
26
27
  export type { Coupon, CouponCreate, CouponUpdate } from './resources/coupons';
28
+ export type { CustomPromotionRule, CustomPromotionRuleCreate, CustomPromotionRuleUpdate } from './resources/custom_promotion_rules';
27
29
  export type { CustomerAddress, CustomerAddressCreate, CustomerAddressUpdate } from './resources/customer_addresses';
28
30
  export type { CustomerGroup, CustomerGroupCreate, CustomerGroupUpdate } from './resources/customer_groups';
29
31
  export type { CustomerPasswordReset, CustomerPasswordResetCreate, CustomerPasswordResetUpdate } from './resources/customer_password_resets';
@@ -72,6 +74,7 @@ export type { ParcelLineItem, ParcelLineItemCreate, ParcelLineItemUpdate } from
72
74
  export type { Parcel, ParcelCreate, ParcelUpdate } from './resources/parcels';
73
75
  export type { PaymentGateway } from './resources/payment_gateways';
74
76
  export type { PaymentMethod, PaymentMethodCreate, PaymentMethodUpdate } from './resources/payment_methods';
77
+ export type { PaymentOption, PaymentOptionCreate, PaymentOptionUpdate } from './resources/payment_options';
75
78
  export type { PaypalGateway, PaypalGatewayCreate, PaypalGatewayUpdate } from './resources/paypal_gateways';
76
79
  export type { PaypalPayment, PaypalPaymentCreate, PaypalPaymentUpdate } from './resources/paypal_payments';
77
80
  export type { PercentageDiscountPromotion, PercentageDiscountPromotionCreate, PercentageDiscountPromotionUpdate } from './resources/percentage_discount_promotions';
@@ -84,11 +87,12 @@ export type { PromotionRule } from './resources/promotion_rules';
84
87
  export type { Promotion } from './resources/promotions';
85
88
  export type { RecurringOrderCopy, RecurringOrderCopyCreate, RecurringOrderCopyUpdate } from './resources/recurring_order_copies';
86
89
  export type { Refund } from './resources/refunds';
90
+ export type { ReservedStock } from './resources/reserved_stocks';
87
91
  export type { ReturnLineItem, ReturnLineItemCreate, ReturnLineItemUpdate } from './resources/return_line_items';
88
92
  export type { Return, ReturnCreate, ReturnUpdate } from './resources/returns';
89
93
  export type { SatispayGateway, SatispayGatewayCreate, SatispayGatewayUpdate } from './resources/satispay_gateways';
90
94
  export type { SatispayPayment, SatispayPaymentCreate, SatispayPaymentUpdate } from './resources/satispay_payments';
91
- export type { Shipment, ShipmentUpdate } from './resources/shipments';
95
+ export type { Shipment, ShipmentCreate, ShipmentUpdate } from './resources/shipments';
92
96
  export type { ShippingCategory, ShippingCategoryCreate, ShippingCategoryUpdate } from './resources/shipping_categories';
93
97
  export type { ShippingMethodTier } from './resources/shipping_method_tiers';
94
98
  export type { ShippingMethod, ShippingMethodCreate, ShippingMethodUpdate } from './resources/shipping_methods';
@@ -100,17 +104,20 @@ export type { SkuList, SkuListCreate, SkuListUpdate } from './resources/sku_list
100
104
  export type { SkuOption, SkuOptionCreate, SkuOptionUpdate } from './resources/sku_options';
101
105
  export type { Sku, SkuCreate, SkuUpdate } from './resources/skus';
102
106
  export type { StockItem, StockItemCreate, StockItemUpdate } from './resources/stock_items';
103
- export type { StockLineItem } from './resources/stock_line_items';
107
+ export type { StockLineItem, StockLineItemCreate, StockLineItemUpdate } from './resources/stock_line_items';
104
108
  export type { StockLocation, StockLocationCreate, StockLocationUpdate } from './resources/stock_locations';
109
+ export type { StockReservation, StockReservationCreate, StockReservationUpdate } from './resources/stock_reservations';
105
110
  export type { StockTransfer, StockTransferCreate, StockTransferUpdate } from './resources/stock_transfers';
106
111
  export type { StripeGateway, StripeGatewayCreate, StripeGatewayUpdate } from './resources/stripe_gateways';
107
112
  export type { StripePayment, StripePaymentCreate, StripePaymentUpdate } from './resources/stripe_payments';
108
113
  export type { SubscriptionModel, SubscriptionModelCreate, SubscriptionModelUpdate } from './resources/subscription_models';
114
+ export type { Tag, TagCreate, TagUpdate } from './resources/tags';
109
115
  export type { TaxCalculator } from './resources/tax_calculators';
110
116
  export type { TaxCategory, TaxCategoryCreate, TaxCategoryUpdate } from './resources/tax_categories';
111
117
  export type { TaxRule, TaxRuleCreate, TaxRuleUpdate } from './resources/tax_rules';
112
118
  export type { TaxjarAccount, TaxjarAccountCreate, TaxjarAccountUpdate } from './resources/taxjar_accounts';
113
119
  export type { Transaction } from './resources/transactions';
120
+ export type { Version } from './resources/versions';
114
121
  export type { Void } from './resources/voids';
115
122
  export type { Webhook, WebhookCreate, WebhookUpdate } from './resources/webhooks';
116
123
  export type { WireTransfer, WireTransferCreate, WireTransferUpdate } from './resources/wire_transfers';
@@ -1,15 +1,13 @@
1
- import { ApiClientInitConfig } from './client';
2
- import { QueryParamsRetrieve, QueryParamsList } from './query';
3
- import { ResourceTypeLock } from './api';
4
- import { InterceptorManager } from './interceptor';
5
- import { QueryParams } from '.';
1
+ import { type ApiClientInitConfig } from './client';
2
+ import { type QueryParamsRetrieve, type QueryParamsList } from './query';
3
+ import type { ResourceTypeLock } from './api';
4
+ import type { InterceptorManager } from './interceptor';
5
+ import type { QueryParams } from '.';
6
6
  type ResourceNull = {
7
7
  id: null;
8
8
  } & ResourceType;
9
9
  type ResourceRel = ResourceId | ResourceNull;
10
- type Metadata = {
11
- [key: string]: any;
12
- };
10
+ type Metadata = Record<string, any>;
13
11
  interface ResourceType {
14
12
  readonly type: ResourceTypeLock;
15
13
  }
@@ -74,4 +72,4 @@ declare abstract class ApiResource {
74
72
  update(resource: ResourceUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Resource>;
75
73
  }
76
74
  export default ResourceAdapter;
77
- export { ApiResource, ResourcesConfig, ResourcesInitConfig };
75
+ export { ApiResource, type ResourcesConfig, type ResourcesInitConfig };
@@ -1,12 +1,18 @@
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 { Geocoder } from './geocoders';
4
+ import type { Event } from './events';
5
+ import type { Tag } from './tags';
6
+ import type { Version } from './versions';
4
7
  type AddressRel = ResourceRel & {
5
8
  type: typeof Addresses.TYPE;
6
9
  };
7
10
  type GeocoderRel = ResourceRel & {
8
11
  type: 'geocoders';
9
12
  };
13
+ type TagRel = ResourceRel & {
14
+ type: 'tags';
15
+ };
10
16
  interface Address extends Resource {
11
17
  business?: boolean;
12
18
  first_name?: string;
@@ -33,6 +39,9 @@ interface Address extends Resource {
33
39
  static_map_url?: string;
34
40
  billing_info?: string;
35
41
  geocoder?: Geocoder;
42
+ events?: Event[];
43
+ tags?: Tag[];
44
+ versions?: Version[];
36
45
  }
37
46
  interface AddressCreate extends ResourceCreate {
38
47
  business?: boolean;
@@ -52,6 +61,7 @@ interface AddressCreate extends ResourceCreate {
52
61
  lng?: number;
53
62
  billing_info?: string;
54
63
  geocoder?: GeocoderRel;
64
+ tags?: TagRel[];
55
65
  }
56
66
  interface AddressUpdate extends ResourceUpdate {
57
67
  business?: boolean;
@@ -71,6 +81,7 @@ interface AddressUpdate extends ResourceUpdate {
71
81
  lng?: number;
72
82
  billing_info?: string;
73
83
  geocoder?: GeocoderRel;
84
+ tags?: TagRel[];
74
85
  }
75
86
  declare class Addresses extends ApiResource {
76
87
  static readonly TYPE: 'addresses';
@@ -80,6 +91,9 @@ declare class Addresses extends ApiResource {
80
91
  update(resource: AddressUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
81
92
  delete(id: string, options?: ResourcesConfig): Promise<void>;
82
93
  geocoder(addressId: string | Address, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Geocoder>;
94
+ events(addressId: string | Address, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
95
+ tags(addressId: string | Address, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
96
+ versions(addressId: string | Address, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
83
97
  isAddress(resource: any): resource is Address;
84
98
  relationship(id: string | ResourceId | null): AddressRel;
85
99
  type(): string;
@@ -20,6 +20,18 @@ class Addresses extends ApiResource {
20
20
  const _addressId = addressId.id || addressId;
21
21
  return this.resources.fetch({ type: 'geocoders' }, `addresses/${_addressId}/geocoder`, params, options);
22
22
  }
23
+ async events(addressId, params, options) {
24
+ const _addressId = addressId.id || addressId;
25
+ return this.resources.fetch({ type: 'events' }, `addresses/${_addressId}/events`, params, options);
26
+ }
27
+ async tags(addressId, params, options) {
28
+ const _addressId = addressId.id || addressId;
29
+ return this.resources.fetch({ type: 'tags' }, `addresses/${_addressId}/tags`, params, options);
30
+ }
31
+ async versions(addressId, params, options) {
32
+ const _addressId = addressId.id || addressId;
33
+ return this.resources.fetch({ type: 'versions' }, `addresses/${_addressId}/versions`, params, options);
34
+ }
23
35
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
24
36
  isAddress(resource) {
25
37
  return resource.type && (resource.type === Addresses.TYPE);
@@ -1,5 +1,6 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { Version } from './versions';
3
4
  type AdjustmentRel = ResourceRel & {
4
5
  type: typeof Adjustments.TYPE;
5
6
  };
@@ -9,6 +10,7 @@ interface Adjustment extends Resource {
9
10
  amount_cents?: number;
10
11
  amount_float?: number;
11
12
  formatted_amount?: string;
13
+ versions?: Version[];
12
14
  }
13
15
  interface AdjustmentCreate extends ResourceCreate {
14
16
  name: string;
@@ -27,6 +29,7 @@ declare class Adjustments extends ApiResource {
27
29
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Adjustment>;
28
30
  update(resource: AdjustmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Adjustment>;
29
31
  delete(id: string, options?: ResourcesConfig): Promise<void>;
32
+ versions(adjustmentId: string | Adjustment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
30
33
  isAdjustment(resource: any): resource is Adjustment;
31
34
  relationship(id: string | ResourceId | null): AdjustmentRel;
32
35
  type(): string;
@@ -16,6 +16,10 @@ class Adjustments extends ApiResource {
16
16
  async delete(id, options) {
17
17
  await this.resources.delete({ type: Adjustments.TYPE, id }, options);
18
18
  }
19
+ async versions(adjustmentId, params, options) {
20
+ const _adjustmentId = adjustmentId.id || adjustmentId;
21
+ return this.resources.fetch({ type: 'versions' }, `adjustments/${_adjustmentId}/versions`, params, options);
22
+ }
19
23
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
20
24
  isAdjustment(resource) {
21
25
  return resource.type && (resource.type === Adjustments.TYPE);
@@ -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 { AdyenPayment } from './adyen_payments';
5
6
  type AdyenGatewayRel = ResourceRel & {
6
7
  type: typeof AdyenGateways.TYPE;
@@ -15,6 +16,7 @@ interface AdyenGateway extends Resource {
15
16
  webhook_endpoint_secret?: string;
16
17
  webhook_endpoint_url?: string;
17
18
  payment_methods?: PaymentMethod[];
19
+ versions?: Version[];
18
20
  adyen_payments?: AdyenPayment[];
19
21
  }
20
22
  interface AdyenGatewayCreate extends ResourceCreate {
@@ -23,7 +25,7 @@ interface AdyenGatewayCreate extends ResourceCreate {
23
25
  api_key: string;
24
26
  public_key?: string;
25
27
  live_url_prefix: string;
26
- api_version?: string;
28
+ api_version?: number;
27
29
  async_api?: boolean;
28
30
  webhook_endpoint_secret?: string;
29
31
  adyen_payments?: AdyenPaymentRel[];
@@ -34,7 +36,7 @@ interface AdyenGatewayUpdate extends ResourceUpdate {
34
36
  api_key?: string;
35
37
  public_key?: string;
36
38
  live_url_prefix?: string;
37
- api_version?: string;
39
+ api_version?: number;
38
40
  async_api?: boolean;
39
41
  webhook_endpoint_secret?: string;
40
42
  adyen_payments?: AdyenPaymentRel[];
@@ -47,6 +49,7 @@ declare class AdyenGateways extends ApiResource {
47
49
  update(resource: AdyenGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
48
50
  delete(id: string, options?: ResourcesConfig): Promise<void>;
49
51
  payment_methods(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
52
+ versions(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
50
53
  adyen_payments(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>>;
51
54
  isAdyenGateway(resource: any): resource is AdyenGateway;
52
55
  relationship(id: string | ResourceId | null): AdyenGatewayRel;
@@ -20,6 +20,10 @@ class AdyenGateways extends ApiResource {
20
20
  const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
21
21
  return this.resources.fetch({ type: 'payment_methods' }, `adyen_gateways/${_adyenGatewayId}/payment_methods`, params, options);
22
22
  }
23
+ async versions(adyenGatewayId, params, options) {
24
+ const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
25
+ return this.resources.fetch({ type: 'versions' }, `adyen_gateways/${_adyenGatewayId}/versions`, params, options);
26
+ }
23
27
  async adyen_payments(adyenGatewayId, params, options) {
24
28
  const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId;
25
29
  return this.resources.fetch({ type: 'adyen_payments' }, `adyen_gateways/${_adyenGatewayId}/adyen_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 AdyenPaymentRel = ResourceRel & {
6
7
  type: typeof AdyenPayments.TYPE;
7
8
  };
@@ -18,6 +19,7 @@ interface AdyenPayment extends Resource {
18
19
  payment_instrument?: object;
19
20
  order?: Order;
20
21
  payment_gateway?: PaymentGateway;
22
+ versions?: Version[];
21
23
  }
22
24
  interface AdyenPaymentCreate extends ResourceCreate {
23
25
  order: OrderRel;
@@ -38,6 +40,7 @@ declare class AdyenPayments extends ApiResource {
38
40
  delete(id: string, options?: ResourcesConfig): Promise<void>;
39
41
  order(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
40
42
  payment_gateway(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
43
+ versions(adyenPaymentId: string | AdyenPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
41
44
  isAdyenPayment(resource: any): resource is AdyenPayment;
42
45
  relationship(id: string | ResourceId | null): AdyenPaymentRel;
43
46
  type(): string;
@@ -24,6 +24,10 @@ class AdyenPayments extends ApiResource {
24
24
  const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
25
25
  return this.resources.fetch({ type: 'payment_gateways' }, `adyen_payments/${_adyenPaymentId}/payment_gateway`, params, options);
26
26
  }
27
+ async versions(adyenPaymentId, params, options) {
28
+ const _adyenPaymentId = adyenPaymentId.id || adyenPaymentId;
29
+ return this.resources.fetch({ type: 'versions' }, `adyen_payments/${_adyenPaymentId}/versions`, params, options);
30
+ }
27
31
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
28
32
  isAdyenPayment(resource) {
29
33
  return resource.type && (resource.type === AdyenPayments.TYPE);
@@ -1,9 +1,11 @@
1
1
  import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Order } from './orders';
4
+ import type { Attachment } from './attachments';
5
+ import type { Event } from './events';
6
+ import type { Version } from './versions';
4
7
  import type { Capture } from './captures';
5
8
  import type { Void } from './voids';
6
- import type { Event } from './events';
7
9
  type AuthorizationRel = ResourceRel & {
8
10
  type: typeof Authorizations.TYPE;
9
11
  };
@@ -34,9 +36,11 @@ interface Authorization extends Resource {
34
36
  void_balance_float?: number;
35
37
  formatted_void_balance?: string;
36
38
  order?: Order;
39
+ attachments?: Attachment[];
40
+ events?: Event[];
41
+ versions?: Version[];
37
42
  captures?: Capture[];
38
43
  voids?: Void[];
39
- events?: Event[];
40
44
  }
41
45
  interface AuthorizationUpdate extends ResourceUpdate {
42
46
  _capture?: boolean;
@@ -49,9 +53,11 @@ declare class Authorizations extends ApiResource {
49
53
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
50
54
  update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
51
55
  order(authorizationId: string | Authorization, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
56
+ attachments(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
57
+ events(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
58
+ versions(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
52
59
  captures(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
53
60
  voids(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
54
- events(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
55
61
  isAuthorization(resource: any): resource is Authorization;
56
62
  relationship(id: string | ResourceId | null): AuthorizationRel;
57
63
  type(): string;
@@ -14,6 +14,18 @@ class Authorizations extends ApiResource {
14
14
  const _authorizationId = authorizationId.id || authorizationId;
15
15
  return this.resources.fetch({ type: 'orders' }, `authorizations/${_authorizationId}/order`, params, options);
16
16
  }
17
+ async attachments(authorizationId, params, options) {
18
+ const _authorizationId = authorizationId.id || authorizationId;
19
+ return this.resources.fetch({ type: 'attachments' }, `authorizations/${_authorizationId}/attachments`, params, options);
20
+ }
21
+ async events(authorizationId, params, options) {
22
+ const _authorizationId = authorizationId.id || authorizationId;
23
+ return this.resources.fetch({ type: 'events' }, `authorizations/${_authorizationId}/events`, params, options);
24
+ }
25
+ async versions(authorizationId, params, options) {
26
+ const _authorizationId = authorizationId.id || authorizationId;
27
+ return this.resources.fetch({ type: 'versions' }, `authorizations/${_authorizationId}/versions`, params, options);
28
+ }
17
29
  async captures(authorizationId, params, options) {
18
30
  const _authorizationId = authorizationId.id || authorizationId;
19
31
  return this.resources.fetch({ type: 'captures' }, `authorizations/${_authorizationId}/captures`, params, options);
@@ -22,10 +34,6 @@ class Authorizations extends ApiResource {
22
34
  const _authorizationId = authorizationId.id || authorizationId;
23
35
  return this.resources.fetch({ type: 'voids' }, `authorizations/${_authorizationId}/voids`, params, options);
24
36
  }
25
- async events(authorizationId, params, options) {
26
- const _authorizationId = authorizationId.id || authorizationId;
27
- return this.resources.fetch({ type: 'events' }, `authorizations/${_authorizationId}/events`, params, options);
28
- }
29
37
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
30
38
  isAuthorization(resource) {
31
39
  return resource.type && (resource.type === Authorizations.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 { TaxCategory } from './tax_categories';
6
7
  type AvalaraAccountRel = ResourceRel & {
7
8
  type: typeof AvalaraAccounts.TYPE;
@@ -13,10 +14,11 @@ interface AvalaraAccount extends Resource {
13
14
  name?: string;
14
15
  username?: string;
15
16
  company_code?: string;
16
- commit_invoice?: string;
17
- ddp?: string;
17
+ commit_invoice?: boolean;
18
+ ddp?: boolean;
18
19
  markets?: Market[];
19
20
  attachments?: Attachment[];
21
+ versions?: Version[];
20
22
  tax_categories?: TaxCategory[];
21
23
  }
22
24
  interface AvalaraAccountCreate extends ResourceCreate {
@@ -24,8 +26,8 @@ interface AvalaraAccountCreate extends ResourceCreate {
24
26
  username: string;
25
27
  password: string;
26
28
  company_code: string;
27
- commit_invoice?: string;
28
- ddp?: string;
29
+ commit_invoice?: boolean;
30
+ ddp?: boolean;
29
31
  tax_categories?: TaxCategoryRel[];
30
32
  }
31
33
  interface AvalaraAccountUpdate extends ResourceUpdate {
@@ -33,8 +35,8 @@ interface AvalaraAccountUpdate extends ResourceUpdate {
33
35
  username?: string;
34
36
  password?: string;
35
37
  company_code?: string;
36
- commit_invoice?: string;
37
- ddp?: string;
38
+ commit_invoice?: boolean;
39
+ ddp?: boolean;
38
40
  tax_categories?: TaxCategoryRel[];
39
41
  }
40
42
  declare class AvalaraAccounts extends ApiResource {
@@ -46,6 +48,7 @@ declare class AvalaraAccounts extends ApiResource {
46
48
  delete(id: string, options?: ResourcesConfig): Promise<void>;
47
49
  markets(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
48
50
  attachments(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
51
+ versions(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
49
52
  tax_categories(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
50
53
  isAvalaraAccount(resource: any): resource is AvalaraAccount;
51
54
  relationship(id: string | ResourceId | null): AvalaraAccountRel;
@@ -24,6 +24,10 @@ class AvalaraAccounts extends ApiResource {
24
24
  const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
25
25
  return this.resources.fetch({ type: 'attachments' }, `avalara_accounts/${_avalaraAccountId}/attachments`, params, options);
26
26
  }
27
+ async versions(avalaraAccountId, params, options) {
28
+ const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
29
+ return this.resources.fetch({ type: 'versions' }, `avalara_accounts/${_avalaraAccountId}/versions`, params, options);
30
+ }
27
31
  async tax_categories(avalaraAccountId, params, options) {
28
32
  const _avalaraAccountId = avalaraAccountId.id || avalaraAccountId;
29
33
  return this.resources.fetch({ type: 'tax_categories' }, `avalara_accounts/${_avalaraAccountId}/tax_categories`, params, options);
@@ -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 { AxervePayment } from './axerve_payments';
5
6
  type AxerveGatewayRel = ResourceRel & {
6
7
  type: typeof AxerveGateways.TYPE;
@@ -11,7 +12,9 @@ type AxervePaymentRel = ResourceRel & {
11
12
  interface AxerveGateway extends Resource {
12
13
  name?: string;
13
14
  login?: string;
15
+ webhook_endpoint_url?: string;
14
16
  payment_methods?: PaymentMethod[];
17
+ versions?: Version[];
15
18
  axerve_payments?: AxervePayment[];
16
19
  }
17
20
  interface AxerveGatewayCreate extends ResourceCreate {
@@ -34,6 +37,7 @@ declare class AxerveGateways extends ApiResource {
34
37
  update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxerveGateway>;
35
38
  delete(id: string, options?: ResourcesConfig): Promise<void>;
36
39
  payment_methods(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
40
+ versions(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
37
41
  axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>>;
38
42
  isAxerveGateway(resource: any): resource is AxerveGateway;
39
43
  relationship(id: string | ResourceId | null): AxerveGatewayRel;
@@ -20,6 +20,10 @@ class AxerveGateways extends ApiResource {
20
20
  const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId;
21
21
  return this.resources.fetch({ type: 'payment_methods' }, `axerve_gateways/${_axerveGatewayId}/payment_methods`, params, options);
22
22
  }
23
+ async versions(axerveGatewayId, params, options) {
24
+ const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId;
25
+ return this.resources.fetch({ type: 'versions' }, `axerve_gateways/${_axerveGatewayId}/versions`, params, options);
26
+ }
23
27
  async axerve_payments(axerveGatewayId, params, options) {
24
28
  const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId;
25
29
  return this.resources.fetch({ type: 'axerve_payments' }, `axerve_gateways/${_axerveGatewayId}/axerve_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 AxervePaymentRel = ResourceRel & {
6
7
  type: typeof AxervePayments.TYPE;
7
8
  };
@@ -12,6 +13,9 @@ interface AxervePayment extends Resource {
12
13
  login?: string;
13
14
  return_url?: string;
14
15
  payment_request_data?: object;
16
+ client_ip?: string;
17
+ buyer_details?: object;
18
+ request_token?: boolean;
15
19
  mismatched_amounts?: boolean;
16
20
  intent_amount_cents?: number;
17
21
  intent_amount_float?: number;
@@ -19,9 +23,13 @@ interface AxervePayment extends Resource {
19
23
  payment_instrument?: object;
20
24
  order?: Order;
21
25
  payment_gateway?: PaymentGateway;
26
+ versions?: Version[];
22
27
  }
23
28
  interface AxervePaymentCreate extends ResourceCreate {
24
29
  return_url: string;
30
+ client_ip?: string;
31
+ buyer_details?: object;
32
+ request_token?: boolean;
25
33
  order: OrderRel;
26
34
  }
27
35
  interface AxervePaymentUpdate extends ResourceUpdate {
@@ -38,6 +46,7 @@ declare class AxervePayments extends ApiResource {
38
46
  delete(id: string, options?: ResourcesConfig): Promise<void>;
39
47
  order(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
40
48
  payment_gateway(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
49
+ versions(axervePaymentId: string | AxervePayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
41
50
  isAxervePayment(resource: any): resource is AxervePayment;
42
51
  relationship(id: string | ResourceId | null): AxervePaymentRel;
43
52
  type(): string;
@@ -24,6 +24,10 @@ class AxervePayments extends ApiResource {
24
24
  const _axervePaymentId = axervePaymentId.id || axervePaymentId;
25
25
  return this.resources.fetch({ type: 'payment_gateways' }, `axerve_payments/${_axervePaymentId}/payment_gateway`, params, options);
26
26
  }
27
+ async versions(axervePaymentId, params, options) {
28
+ const _axervePaymentId = axervePaymentId.id || axervePaymentId;
29
+ return this.resources.fetch({ type: 'versions' }, `axerve_payments/${_axervePaymentId}/versions`, params, options);
30
+ }
27
31
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
28
32
  isAxervePayment(resource) {
29
33
  return resource.type && (resource.type === AxervePayments.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
  type BillingInfoValidationRuleRel = ResourceRel & {
6
7
  type: typeof BillingInfoValidationRules.TYPE;
7
8
  };
@@ -11,6 +12,7 @@ type MarketRel = ResourceRel & {
11
12
  interface BillingInfoValidationRule extends Resource {
12
13
  market?: Market;
13
14
  attachments?: Attachment[];
15
+ versions?: Version[];
14
16
  }
15
17
  interface BillingInfoValidationRuleCreate extends ResourceCreate {
16
18
  market: MarketRel;
@@ -27,6 +29,7 @@ declare class BillingInfoValidationRules extends ApiResource {
27
29
  delete(id: string, options?: ResourcesConfig): Promise<void>;
28
30
  market(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
29
31
  attachments(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
32
+ versions(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
30
33
  isBillingInfoValidationRule(resource: any): resource is BillingInfoValidationRule;
31
34
  relationship(id: string | ResourceId | null): BillingInfoValidationRuleRel;
32
35
  type(): string;
@@ -24,6 +24,10 @@ class BillingInfoValidationRules extends ApiResource {
24
24
  const _billingInfoValidationRuleId = billingInfoValidationRuleId.id || billingInfoValidationRuleId;
25
25
  return this.resources.fetch({ type: 'attachments' }, `billing_info_validation_rules/${_billingInfoValidationRuleId}/attachments`, params, options);
26
26
  }
27
+ async versions(billingInfoValidationRuleId, params, options) {
28
+ const _billingInfoValidationRuleId = billingInfoValidationRuleId.id || billingInfoValidationRuleId;
29
+ return this.resources.fetch({ type: 'versions' }, `billing_info_validation_rules/${_billingInfoValidationRuleId}/versions`, params, options);
30
+ }
27
31
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
28
32
  isBillingInfoValidationRule(resource) {
29
33
  return resource.type && (resource.type === BillingInfoValidationRules.TYPE);
@@ -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 { BraintreePayment } from './braintree_payments';
5
6
  type BraintreeGatewayRel = ResourceRel & {
6
7
  type: typeof BraintreeGateways.TYPE;
@@ -15,6 +16,7 @@ interface BraintreeGateway extends Resource {
15
16
  descriptor_url?: string;
16
17
  webhook_endpoint_url?: string;
17
18
  payment_methods?: PaymentMethod[];
19
+ versions?: Version[];
18
20
  braintree_payments?: BraintreePayment[];
19
21
  }
20
22
  interface BraintreeGatewayCreate extends ResourceCreate {
@@ -47,6 +49,7 @@ declare class BraintreeGateways extends ApiResource {
47
49
  update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
48
50
  delete(id: string, options?: ResourcesConfig): Promise<void>;
49
51
  payment_methods(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
52
+ versions(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
50
53
  braintree_payments(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>>;
51
54
  isBraintreeGateway(resource: any): resource is BraintreeGateway;
52
55
  relationship(id: string | ResourceId | null): BraintreeGatewayRel;
@@ -20,6 +20,10 @@ class BraintreeGateways extends ApiResource {
20
20
  const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
21
21
  return this.resources.fetch({ type: 'payment_methods' }, `braintree_gateways/${_braintreeGatewayId}/payment_methods`, params, options);
22
22
  }
23
+ async versions(braintreeGatewayId, params, options) {
24
+ const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
25
+ return this.resources.fetch({ type: 'versions' }, `braintree_gateways/${_braintreeGatewayId}/versions`, params, options);
26
+ }
23
27
  async braintree_payments(braintreeGatewayId, params, options) {
24
28
  const _braintreeGatewayId = braintreeGatewayId.id || braintreeGatewayId;
25
29
  return this.resources.fetch({ type: 'braintree_payments' }, `braintree_gateways/${_braintreeGatewayId}/braintree_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 BraintreePaymentRel = ResourceRel & {
6
7
  type: typeof BraintreePayments.TYPE;
7
8
  };
@@ -17,6 +18,7 @@ interface BraintreePayment extends Resource {
17
18
  payment_instrument?: object;
18
19
  order?: Order;
19
20
  payment_gateway?: PaymentGateway;
21
+ versions?: Version[];
20
22
  }
21
23
  interface BraintreePaymentCreate extends ResourceCreate {
22
24
  payment_id?: string;
@@ -40,6 +42,7 @@ declare class BraintreePayments extends ApiResource {
40
42
  delete(id: string, options?: ResourcesConfig): Promise<void>;
41
43
  order(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
42
44
  payment_gateway(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
45
+ versions(braintreePaymentId: string | BraintreePayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
43
46
  isBraintreePayment(resource: any): resource is BraintreePayment;
44
47
  relationship(id: string | ResourceId | null): BraintreePaymentRel;
45
48
  type(): string;
@@ -24,6 +24,10 @@ class BraintreePayments extends ApiResource {
24
24
  const _braintreePaymentId = braintreePaymentId.id || braintreePaymentId;
25
25
  return this.resources.fetch({ type: 'payment_gateways' }, `braintree_payments/${_braintreePaymentId}/payment_gateway`, params, options);
26
26
  }
27
+ async versions(braintreePaymentId, params, options) {
28
+ const _braintreePaymentId = braintreePaymentId.id || braintreePaymentId;
29
+ return this.resources.fetch({ type: 'versions' }, `braintree_payments/${_braintreePaymentId}/versions`, params, options);
30
+ }
27
31
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
28
32
  isBraintreePayment(resource) {
29
33
  return resource.type && (resource.type === BraintreePayments.TYPE);