@commercelayer/sdk 5.12.4 → 5.13.0

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 (401) hide show
  1. package/lib/cjs/api.d.ts +11 -2
  2. package/lib/cjs/api.js +4 -1
  3. package/lib/cjs/commercelayer.d.ts +4 -3
  4. package/lib/cjs/commercelayer.js +6 -1
  5. package/lib/cjs/config.js +3 -1
  6. package/lib/cjs/model.d.ts +1 -0
  7. package/lib/cjs/resource.d.ts +1 -1
  8. package/lib/cjs/resource.js +6 -0
  9. package/lib/cjs/resources/addresses.d.ts +3 -0
  10. package/lib/cjs/resources/addresses.js +4 -0
  11. package/lib/cjs/resources/adjustments.d.ts +5 -2
  12. package/lib/cjs/resources/adjustments.js +4 -0
  13. package/lib/cjs/resources/adyen_gateways.d.ts +3 -0
  14. package/lib/cjs/resources/adyen_gateways.js +4 -0
  15. package/lib/cjs/resources/adyen_payments.d.ts +5 -2
  16. package/lib/cjs/resources/adyen_payments.js +4 -0
  17. package/lib/cjs/resources/authorizations.d.ts +3 -0
  18. package/lib/cjs/resources/authorizations.js +4 -0
  19. package/lib/cjs/resources/avalara_accounts.d.ts +3 -0
  20. package/lib/cjs/resources/avalara_accounts.js +4 -0
  21. package/lib/cjs/resources/axerve_gateways.d.ts +4 -0
  22. package/lib/cjs/resources/axerve_gateways.js +4 -0
  23. package/lib/cjs/resources/axerve_payments.d.ts +5 -2
  24. package/lib/cjs/resources/axerve_payments.js +4 -0
  25. package/lib/cjs/resources/billing_info_validation_rules.d.ts +3 -0
  26. package/lib/cjs/resources/billing_info_validation_rules.js +4 -0
  27. package/lib/cjs/resources/braintree_gateways.d.ts +3 -0
  28. package/lib/cjs/resources/braintree_gateways.js +4 -0
  29. package/lib/cjs/resources/braintree_payments.d.ts +5 -2
  30. package/lib/cjs/resources/braintree_payments.js +4 -0
  31. package/lib/cjs/resources/bundles.d.ts +3 -0
  32. package/lib/cjs/resources/bundles.js +4 -0
  33. package/lib/cjs/resources/captures.d.ts +3 -0
  34. package/lib/cjs/resources/captures.js +4 -0
  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 +5 -2
  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 +3 -0
  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 +3 -0
  48. package/lib/cjs/resources/coupons.js +4 -0
  49. package/lib/cjs/resources/customer_addresses.d.ts +3 -0
  50. package/lib/cjs/resources/customer_addresses.js +4 -0
  51. package/lib/cjs/resources/customer_groups.d.ts +3 -0
  52. package/lib/cjs/resources/customer_groups.js +4 -0
  53. package/lib/cjs/resources/customer_payment_sources.d.ts +8 -13
  54. package/lib/cjs/resources/customer_payment_sources.js +4 -0
  55. package/lib/cjs/resources/customer_subscriptions.d.ts +3 -0
  56. package/lib/cjs/resources/customer_subscriptions.js +4 -0
  57. package/lib/cjs/resources/delivery_lead_times.d.ts +3 -0
  58. package/lib/cjs/resources/delivery_lead_times.js +4 -0
  59. package/lib/cjs/resources/external_gateways.d.ts +3 -0
  60. package/lib/cjs/resources/external_gateways.js +4 -0
  61. package/lib/cjs/resources/external_payments.d.ts +5 -2
  62. package/lib/cjs/resources/external_payments.js +4 -0
  63. package/lib/cjs/resources/external_promotions.d.ts +3 -0
  64. package/lib/cjs/resources/external_promotions.js +4 -0
  65. package/lib/cjs/resources/external_tax_calculators.d.ts +3 -0
  66. package/lib/cjs/resources/external_tax_calculators.js +4 -0
  67. package/lib/cjs/resources/fixed_amount_promotions.d.ts +3 -0
  68. package/lib/cjs/resources/fixed_amount_promotions.js +4 -0
  69. package/lib/cjs/resources/fixed_price_promotions.d.ts +3 -0
  70. package/lib/cjs/resources/fixed_price_promotions.js +4 -0
  71. package/lib/cjs/resources/free_gift_promotions.d.ts +3 -0
  72. package/lib/cjs/resources/free_gift_promotions.js +4 -0
  73. package/lib/cjs/resources/free_shipping_promotions.d.ts +3 -0
  74. package/lib/cjs/resources/free_shipping_promotions.js +4 -0
  75. package/lib/cjs/resources/gift_card_recipients.d.ts +3 -0
  76. package/lib/cjs/resources/gift_card_recipients.js +4 -0
  77. package/lib/cjs/resources/gift_cards.d.ts +3 -0
  78. package/lib/cjs/resources/gift_cards.js +4 -0
  79. package/lib/cjs/resources/in_stock_subscriptions.d.ts +3 -0
  80. package/lib/cjs/resources/in_stock_subscriptions.js +4 -0
  81. package/lib/cjs/resources/inventory_models.d.ts +3 -0
  82. package/lib/cjs/resources/inventory_models.js +4 -0
  83. package/lib/cjs/resources/inventory_return_locations.d.ts +5 -2
  84. package/lib/cjs/resources/inventory_return_locations.js +4 -0
  85. package/lib/cjs/resources/inventory_stock_locations.d.ts +5 -2
  86. package/lib/cjs/resources/inventory_stock_locations.js +4 -0
  87. package/lib/cjs/resources/klarna_gateways.d.ts +3 -0
  88. package/lib/cjs/resources/klarna_gateways.js +4 -0
  89. package/lib/cjs/resources/klarna_payments.d.ts +5 -2
  90. package/lib/cjs/resources/klarna_payments.js +4 -0
  91. package/lib/cjs/resources/manual_gateways.d.ts +3 -0
  92. package/lib/cjs/resources/manual_gateways.js +4 -0
  93. package/lib/cjs/resources/manual_tax_calculators.d.ts +3 -0
  94. package/lib/cjs/resources/manual_tax_calculators.js +4 -0
  95. package/lib/cjs/resources/markets.d.ts +3 -0
  96. package/lib/cjs/resources/markets.js +4 -0
  97. package/lib/cjs/resources/merchants.d.ts +3 -0
  98. package/lib/cjs/resources/merchants.js +4 -0
  99. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +5 -2
  100. package/lib/cjs/resources/order_amount_promotion_rules.js +4 -0
  101. package/lib/cjs/resources/order_subscription_items.d.ts +3 -0
  102. package/lib/cjs/resources/order_subscription_items.js +4 -0
  103. package/lib/cjs/resources/order_subscriptions.d.ts +3 -0
  104. package/lib/cjs/resources/order_subscriptions.js +4 -0
  105. package/lib/cjs/resources/order_validation_rules.d.ts +3 -0
  106. package/lib/cjs/resources/order_validation_rules.js +4 -0
  107. package/lib/cjs/resources/orders.d.ts +8 -2
  108. package/lib/cjs/resources/orders.js +4 -0
  109. package/lib/cjs/resources/packages.d.ts +3 -0
  110. package/lib/cjs/resources/packages.js +4 -0
  111. package/lib/cjs/resources/parcel_line_items.d.ts +5 -2
  112. package/lib/cjs/resources/parcel_line_items.js +4 -0
  113. package/lib/cjs/resources/parcels.d.ts +3 -0
  114. package/lib/cjs/resources/parcels.js +4 -0
  115. package/lib/cjs/resources/payment_gateways.d.ts +3 -0
  116. package/lib/cjs/resources/payment_gateways.js +4 -0
  117. package/lib/cjs/resources/payment_methods.d.ts +3 -0
  118. package/lib/cjs/resources/payment_methods.js +4 -0
  119. package/lib/cjs/resources/paypal_gateways.d.ts +3 -0
  120. package/lib/cjs/resources/paypal_gateways.js +4 -0
  121. package/lib/cjs/resources/paypal_payments.d.ts +5 -2
  122. package/lib/cjs/resources/paypal_payments.js +4 -0
  123. package/lib/cjs/resources/percentage_discount_promotions.d.ts +3 -0
  124. package/lib/cjs/resources/percentage_discount_promotions.js +4 -0
  125. package/lib/cjs/resources/price_frequency_tiers.d.ts +3 -0
  126. package/lib/cjs/resources/price_frequency_tiers.js +4 -0
  127. package/lib/cjs/resources/price_lists.d.ts +3 -0
  128. package/lib/cjs/resources/price_lists.js +4 -0
  129. package/lib/cjs/resources/price_tiers.d.ts +3 -0
  130. package/lib/cjs/resources/price_tiers.js +4 -0
  131. package/lib/cjs/resources/price_volume_tiers.d.ts +3 -0
  132. package/lib/cjs/resources/price_volume_tiers.js +4 -0
  133. package/lib/cjs/resources/prices.d.ts +3 -0
  134. package/lib/cjs/resources/prices.js +4 -0
  135. package/lib/cjs/resources/promotion_rules.d.ts +5 -1
  136. package/lib/cjs/resources/promotion_rules.js +4 -0
  137. package/lib/cjs/resources/promotions.d.ts +3 -0
  138. package/lib/cjs/resources/promotions.js +4 -0
  139. package/lib/cjs/resources/refunds.d.ts +3 -0
  140. package/lib/cjs/resources/refunds.js +4 -0
  141. package/lib/cjs/resources/returns.d.ts +3 -0
  142. package/lib/cjs/resources/returns.js +4 -0
  143. package/lib/cjs/resources/satispay_gateways.d.ts +3 -0
  144. package/lib/cjs/resources/satispay_gateways.js +4 -0
  145. package/lib/cjs/resources/satispay_payments.d.ts +6 -2
  146. package/lib/cjs/resources/satispay_payments.js +4 -0
  147. package/lib/cjs/resources/shipments.d.ts +3 -0
  148. package/lib/cjs/resources/shipments.js +4 -0
  149. package/lib/cjs/resources/shipping_categories.d.ts +3 -0
  150. package/lib/cjs/resources/shipping_categories.js +4 -0
  151. package/lib/cjs/resources/shipping_method_tiers.d.ts +3 -0
  152. package/lib/cjs/resources/shipping_method_tiers.js +4 -0
  153. package/lib/cjs/resources/shipping_methods.d.ts +3 -0
  154. package/lib/cjs/resources/shipping_methods.js +4 -0
  155. package/lib/cjs/resources/shipping_weight_tiers.d.ts +3 -0
  156. package/lib/cjs/resources/shipping_weight_tiers.js +4 -0
  157. package/lib/cjs/resources/shipping_zones.d.ts +3 -0
  158. package/lib/cjs/resources/shipping_zones.js +4 -0
  159. package/lib/cjs/resources/sku_list_items.d.ts +5 -2
  160. package/lib/cjs/resources/sku_list_items.js +4 -0
  161. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +3 -0
  162. package/lib/cjs/resources/sku_list_promotion_rules.js +4 -0
  163. package/lib/cjs/resources/sku_lists.d.ts +3 -0
  164. package/lib/cjs/resources/sku_lists.js +4 -0
  165. package/lib/cjs/resources/sku_options.d.ts +3 -0
  166. package/lib/cjs/resources/sku_options.js +4 -0
  167. package/lib/cjs/resources/skus.d.ts +3 -0
  168. package/lib/cjs/resources/skus.js +4 -0
  169. package/lib/cjs/resources/stock_items.d.ts +3 -0
  170. package/lib/cjs/resources/stock_items.js +4 -0
  171. package/lib/cjs/resources/stock_line_items.d.ts +5 -2
  172. package/lib/cjs/resources/stock_line_items.js +4 -0
  173. package/lib/cjs/resources/stock_locations.d.ts +3 -0
  174. package/lib/cjs/resources/stock_locations.js +4 -0
  175. package/lib/cjs/resources/stock_transfers.d.ts +3 -0
  176. package/lib/cjs/resources/stock_transfers.js +4 -0
  177. package/lib/cjs/resources/stripe_gateways.d.ts +3 -0
  178. package/lib/cjs/resources/stripe_gateways.js +4 -0
  179. package/lib/cjs/resources/stripe_payments.d.ts +8 -2
  180. package/lib/cjs/resources/stripe_payments.js +4 -0
  181. package/lib/cjs/resources/tax_calculators.d.ts +3 -0
  182. package/lib/cjs/resources/tax_calculators.js +4 -0
  183. package/lib/cjs/resources/tax_categories.d.ts +3 -0
  184. package/lib/cjs/resources/tax_categories.js +4 -0
  185. package/lib/cjs/resources/tax_rules.d.ts +5 -2
  186. package/lib/cjs/resources/tax_rules.js +4 -0
  187. package/lib/cjs/resources/taxjar_accounts.d.ts +3 -0
  188. package/lib/cjs/resources/taxjar_accounts.js +4 -0
  189. package/lib/cjs/resources/transactions.d.ts +3 -0
  190. package/lib/cjs/resources/transactions.js +4 -0
  191. package/lib/cjs/resources/versions.d.ts +22 -0
  192. package/lib/cjs/resources/versions.js +16 -0
  193. package/lib/cjs/resources/voids.d.ts +3 -0
  194. package/lib/cjs/resources/voids.js +4 -0
  195. package/lib/cjs/resources/webhooks.d.ts +3 -0
  196. package/lib/cjs/resources/webhooks.js +4 -0
  197. package/lib/cjs/resources/wire_transfers.d.ts +5 -2
  198. package/lib/cjs/resources/wire_transfers.js +4 -0
  199. package/lib/cjs/util.d.ts +1 -1
  200. package/lib/esm/api.d.ts +11 -2
  201. package/lib/esm/api.js +2 -0
  202. package/lib/esm/commercelayer.d.ts +4 -3
  203. package/lib/esm/commercelayer.js +6 -1
  204. package/lib/esm/config.js +3 -1
  205. package/lib/esm/model.d.ts +1 -0
  206. package/lib/esm/resource.d.ts +1 -1
  207. package/lib/esm/resource.js +6 -0
  208. package/lib/esm/resources/addresses.d.ts +3 -0
  209. package/lib/esm/resources/addresses.js +4 -0
  210. package/lib/esm/resources/adjustments.d.ts +5 -2
  211. package/lib/esm/resources/adjustments.js +4 -0
  212. package/lib/esm/resources/adyen_gateways.d.ts +3 -0
  213. package/lib/esm/resources/adyen_gateways.js +4 -0
  214. package/lib/esm/resources/adyen_payments.d.ts +5 -2
  215. package/lib/esm/resources/adyen_payments.js +4 -0
  216. package/lib/esm/resources/authorizations.d.ts +3 -0
  217. package/lib/esm/resources/authorizations.js +4 -0
  218. package/lib/esm/resources/avalara_accounts.d.ts +3 -0
  219. package/lib/esm/resources/avalara_accounts.js +4 -0
  220. package/lib/esm/resources/axerve_gateways.d.ts +4 -0
  221. package/lib/esm/resources/axerve_gateways.js +4 -0
  222. package/lib/esm/resources/axerve_payments.d.ts +5 -2
  223. package/lib/esm/resources/axerve_payments.js +4 -0
  224. package/lib/esm/resources/billing_info_validation_rules.d.ts +3 -0
  225. package/lib/esm/resources/billing_info_validation_rules.js +4 -0
  226. package/lib/esm/resources/braintree_gateways.d.ts +3 -0
  227. package/lib/esm/resources/braintree_gateways.js +4 -0
  228. package/lib/esm/resources/braintree_payments.d.ts +5 -2
  229. package/lib/esm/resources/braintree_payments.js +4 -0
  230. package/lib/esm/resources/bundles.d.ts +3 -0
  231. package/lib/esm/resources/bundles.js +4 -0
  232. package/lib/esm/resources/captures.d.ts +3 -0
  233. package/lib/esm/resources/captures.js +4 -0
  234. package/lib/esm/resources/carrier_accounts.d.ts +3 -0
  235. package/lib/esm/resources/carrier_accounts.js +4 -0
  236. package/lib/esm/resources/checkout_com_gateways.d.ts +3 -0
  237. package/lib/esm/resources/checkout_com_gateways.js +4 -0
  238. package/lib/esm/resources/checkout_com_payments.d.ts +5 -2
  239. package/lib/esm/resources/checkout_com_payments.js +4 -0
  240. package/lib/esm/resources/cleanups.d.ts +3 -0
  241. package/lib/esm/resources/cleanups.js +4 -0
  242. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +3 -0
  243. package/lib/esm/resources/coupon_codes_promotion_rules.js +4 -0
  244. package/lib/esm/resources/coupon_recipients.d.ts +3 -0
  245. package/lib/esm/resources/coupon_recipients.js +4 -0
  246. package/lib/esm/resources/coupons.d.ts +3 -0
  247. package/lib/esm/resources/coupons.js +4 -0
  248. package/lib/esm/resources/customer_addresses.d.ts +3 -0
  249. package/lib/esm/resources/customer_addresses.js +4 -0
  250. package/lib/esm/resources/customer_groups.d.ts +3 -0
  251. package/lib/esm/resources/customer_groups.js +4 -0
  252. package/lib/esm/resources/customer_payment_sources.d.ts +8 -13
  253. package/lib/esm/resources/customer_payment_sources.js +4 -0
  254. package/lib/esm/resources/customer_subscriptions.d.ts +3 -0
  255. package/lib/esm/resources/customer_subscriptions.js +4 -0
  256. package/lib/esm/resources/delivery_lead_times.d.ts +3 -0
  257. package/lib/esm/resources/delivery_lead_times.js +4 -0
  258. package/lib/esm/resources/external_gateways.d.ts +3 -0
  259. package/lib/esm/resources/external_gateways.js +4 -0
  260. package/lib/esm/resources/external_payments.d.ts +5 -2
  261. package/lib/esm/resources/external_payments.js +4 -0
  262. package/lib/esm/resources/external_promotions.d.ts +3 -0
  263. package/lib/esm/resources/external_promotions.js +4 -0
  264. package/lib/esm/resources/external_tax_calculators.d.ts +3 -0
  265. package/lib/esm/resources/external_tax_calculators.js +4 -0
  266. package/lib/esm/resources/fixed_amount_promotions.d.ts +3 -0
  267. package/lib/esm/resources/fixed_amount_promotions.js +4 -0
  268. package/lib/esm/resources/fixed_price_promotions.d.ts +3 -0
  269. package/lib/esm/resources/fixed_price_promotions.js +4 -0
  270. package/lib/esm/resources/free_gift_promotions.d.ts +3 -0
  271. package/lib/esm/resources/free_gift_promotions.js +4 -0
  272. package/lib/esm/resources/free_shipping_promotions.d.ts +3 -0
  273. package/lib/esm/resources/free_shipping_promotions.js +4 -0
  274. package/lib/esm/resources/gift_card_recipients.d.ts +3 -0
  275. package/lib/esm/resources/gift_card_recipients.js +4 -0
  276. package/lib/esm/resources/gift_cards.d.ts +3 -0
  277. package/lib/esm/resources/gift_cards.js +4 -0
  278. package/lib/esm/resources/in_stock_subscriptions.d.ts +3 -0
  279. package/lib/esm/resources/in_stock_subscriptions.js +4 -0
  280. package/lib/esm/resources/inventory_models.d.ts +3 -0
  281. package/lib/esm/resources/inventory_models.js +4 -0
  282. package/lib/esm/resources/inventory_return_locations.d.ts +5 -2
  283. package/lib/esm/resources/inventory_return_locations.js +4 -0
  284. package/lib/esm/resources/inventory_stock_locations.d.ts +5 -2
  285. package/lib/esm/resources/inventory_stock_locations.js +4 -0
  286. package/lib/esm/resources/klarna_gateways.d.ts +3 -0
  287. package/lib/esm/resources/klarna_gateways.js +4 -0
  288. package/lib/esm/resources/klarna_payments.d.ts +5 -2
  289. package/lib/esm/resources/klarna_payments.js +4 -0
  290. package/lib/esm/resources/manual_gateways.d.ts +3 -0
  291. package/lib/esm/resources/manual_gateways.js +4 -0
  292. package/lib/esm/resources/manual_tax_calculators.d.ts +3 -0
  293. package/lib/esm/resources/manual_tax_calculators.js +4 -0
  294. package/lib/esm/resources/markets.d.ts +3 -0
  295. package/lib/esm/resources/markets.js +4 -0
  296. package/lib/esm/resources/merchants.d.ts +3 -0
  297. package/lib/esm/resources/merchants.js +4 -0
  298. package/lib/esm/resources/order_amount_promotion_rules.d.ts +5 -2
  299. package/lib/esm/resources/order_amount_promotion_rules.js +4 -0
  300. package/lib/esm/resources/order_subscription_items.d.ts +3 -0
  301. package/lib/esm/resources/order_subscription_items.js +4 -0
  302. package/lib/esm/resources/order_subscriptions.d.ts +3 -0
  303. package/lib/esm/resources/order_subscriptions.js +4 -0
  304. package/lib/esm/resources/order_validation_rules.d.ts +3 -0
  305. package/lib/esm/resources/order_validation_rules.js +4 -0
  306. package/lib/esm/resources/orders.d.ts +8 -2
  307. package/lib/esm/resources/orders.js +4 -0
  308. package/lib/esm/resources/packages.d.ts +3 -0
  309. package/lib/esm/resources/packages.js +4 -0
  310. package/lib/esm/resources/parcel_line_items.d.ts +5 -2
  311. package/lib/esm/resources/parcel_line_items.js +4 -0
  312. package/lib/esm/resources/parcels.d.ts +3 -0
  313. package/lib/esm/resources/parcels.js +4 -0
  314. package/lib/esm/resources/payment_gateways.d.ts +3 -0
  315. package/lib/esm/resources/payment_gateways.js +4 -0
  316. package/lib/esm/resources/payment_methods.d.ts +3 -0
  317. package/lib/esm/resources/payment_methods.js +4 -0
  318. package/lib/esm/resources/paypal_gateways.d.ts +3 -0
  319. package/lib/esm/resources/paypal_gateways.js +4 -0
  320. package/lib/esm/resources/paypal_payments.d.ts +5 -2
  321. package/lib/esm/resources/paypal_payments.js +4 -0
  322. package/lib/esm/resources/percentage_discount_promotions.d.ts +3 -0
  323. package/lib/esm/resources/percentage_discount_promotions.js +4 -0
  324. package/lib/esm/resources/price_frequency_tiers.d.ts +3 -0
  325. package/lib/esm/resources/price_frequency_tiers.js +4 -0
  326. package/lib/esm/resources/price_lists.d.ts +3 -0
  327. package/lib/esm/resources/price_lists.js +4 -0
  328. package/lib/esm/resources/price_tiers.d.ts +3 -0
  329. package/lib/esm/resources/price_tiers.js +4 -0
  330. package/lib/esm/resources/price_volume_tiers.d.ts +3 -0
  331. package/lib/esm/resources/price_volume_tiers.js +4 -0
  332. package/lib/esm/resources/prices.d.ts +3 -0
  333. package/lib/esm/resources/prices.js +4 -0
  334. package/lib/esm/resources/promotion_rules.d.ts +5 -1
  335. package/lib/esm/resources/promotion_rules.js +4 -0
  336. package/lib/esm/resources/promotions.d.ts +3 -0
  337. package/lib/esm/resources/promotions.js +4 -0
  338. package/lib/esm/resources/refunds.d.ts +3 -0
  339. package/lib/esm/resources/refunds.js +4 -0
  340. package/lib/esm/resources/returns.d.ts +3 -0
  341. package/lib/esm/resources/returns.js +4 -0
  342. package/lib/esm/resources/satispay_gateways.d.ts +3 -0
  343. package/lib/esm/resources/satispay_gateways.js +4 -0
  344. package/lib/esm/resources/satispay_payments.d.ts +6 -2
  345. package/lib/esm/resources/satispay_payments.js +4 -0
  346. package/lib/esm/resources/shipments.d.ts +3 -0
  347. package/lib/esm/resources/shipments.js +4 -0
  348. package/lib/esm/resources/shipping_categories.d.ts +3 -0
  349. package/lib/esm/resources/shipping_categories.js +4 -0
  350. package/lib/esm/resources/shipping_method_tiers.d.ts +3 -0
  351. package/lib/esm/resources/shipping_method_tiers.js +4 -0
  352. package/lib/esm/resources/shipping_methods.d.ts +3 -0
  353. package/lib/esm/resources/shipping_methods.js +4 -0
  354. package/lib/esm/resources/shipping_weight_tiers.d.ts +3 -0
  355. package/lib/esm/resources/shipping_weight_tiers.js +4 -0
  356. package/lib/esm/resources/shipping_zones.d.ts +3 -0
  357. package/lib/esm/resources/shipping_zones.js +4 -0
  358. package/lib/esm/resources/sku_list_items.d.ts +5 -2
  359. package/lib/esm/resources/sku_list_items.js +4 -0
  360. package/lib/esm/resources/sku_list_promotion_rules.d.ts +3 -0
  361. package/lib/esm/resources/sku_list_promotion_rules.js +4 -0
  362. package/lib/esm/resources/sku_lists.d.ts +3 -0
  363. package/lib/esm/resources/sku_lists.js +4 -0
  364. package/lib/esm/resources/sku_options.d.ts +3 -0
  365. package/lib/esm/resources/sku_options.js +4 -0
  366. package/lib/esm/resources/skus.d.ts +3 -0
  367. package/lib/esm/resources/skus.js +4 -0
  368. package/lib/esm/resources/stock_items.d.ts +3 -0
  369. package/lib/esm/resources/stock_items.js +4 -0
  370. package/lib/esm/resources/stock_line_items.d.ts +5 -2
  371. package/lib/esm/resources/stock_line_items.js +4 -0
  372. package/lib/esm/resources/stock_locations.d.ts +3 -0
  373. package/lib/esm/resources/stock_locations.js +4 -0
  374. package/lib/esm/resources/stock_transfers.d.ts +3 -0
  375. package/lib/esm/resources/stock_transfers.js +4 -0
  376. package/lib/esm/resources/stripe_gateways.d.ts +3 -0
  377. package/lib/esm/resources/stripe_gateways.js +4 -0
  378. package/lib/esm/resources/stripe_payments.d.ts +8 -2
  379. package/lib/esm/resources/stripe_payments.js +4 -0
  380. package/lib/esm/resources/tax_calculators.d.ts +3 -0
  381. package/lib/esm/resources/tax_calculators.js +4 -0
  382. package/lib/esm/resources/tax_categories.d.ts +3 -0
  383. package/lib/esm/resources/tax_categories.js +4 -0
  384. package/lib/esm/resources/tax_rules.d.ts +5 -2
  385. package/lib/esm/resources/tax_rules.js +4 -0
  386. package/lib/esm/resources/taxjar_accounts.d.ts +3 -0
  387. package/lib/esm/resources/taxjar_accounts.js +4 -0
  388. package/lib/esm/resources/transactions.d.ts +3 -0
  389. package/lib/esm/resources/transactions.js +4 -0
  390. package/lib/esm/resources/versions.d.ts +22 -0
  391. package/lib/esm/resources/versions.js +14 -0
  392. package/lib/esm/resources/voids.d.ts +3 -0
  393. package/lib/esm/resources/voids.js +4 -0
  394. package/lib/esm/resources/webhooks.d.ts +3 -0
  395. package/lib/esm/resources/webhooks.js +4 -0
  396. package/lib/esm/resources/wire_transfers.d.ts +5 -2
  397. package/lib/esm/resources/wire_transfers.js +4 -0
  398. package/lib/esm/util.d.ts +1 -1
  399. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  400. package/lib/tsconfig.tsbuildinfo +1 -1
  401. package/package.json +10 -10
@@ -3,6 +3,7 @@ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesCon
3
3
  import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Market } from './markets';
5
5
  import type { Attachment } from './attachments';
6
+ import type { Version } from './versions';
6
7
  import type { TaxRule, TaxRuleType } from './tax_rules';
7
8
  type ManualTaxCalculatorType = 'manual_tax_calculators';
8
9
  type ManualTaxCalculatorRel = ResourceRel & {
@@ -16,6 +17,7 @@ interface ManualTaxCalculator extends Resource {
16
17
  name: string;
17
18
  markets?: Market[] | null;
18
19
  attachments?: Attachment[] | null;
20
+ versions?: Version[] | null;
19
21
  tax_rules?: TaxRule[] | null;
20
22
  }
21
23
  interface ManualTaxCalculatorCreate extends ResourceCreate {
@@ -33,6 +35,7 @@ declare class ManualTaxCalculators extends ApiResource<ManualTaxCalculator> {
33
35
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
34
36
  markets(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
35
37
  attachments(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
38
+ versions(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
36
39
  tax_rules(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxRule>>;
37
40
  isManualTaxCalculator(resource: any): resource is ManualTaxCalculator;
38
41
  relationship(id: string | ResourceId | null): ManualTaxCalculatorRel;
@@ -19,6 +19,10 @@ class ManualTaxCalculators extends resource_1.ApiResource {
19
19
  const _manualTaxCalculatorId = manualTaxCalculatorId.id || manualTaxCalculatorId;
20
20
  return this.resources.fetch({ type: 'attachments' }, `manual_tax_calculators/${_manualTaxCalculatorId}/attachments`, params, options);
21
21
  }
22
+ async versions(manualTaxCalculatorId, params, options) {
23
+ const _manualTaxCalculatorId = manualTaxCalculatorId.id || manualTaxCalculatorId;
24
+ return this.resources.fetch({ type: 'versions' }, `manual_tax_calculators/${_manualTaxCalculatorId}/versions`, params, options);
25
+ }
22
26
  async tax_rules(manualTaxCalculatorId, params, options) {
23
27
  const _manualTaxCalculatorId = manualTaxCalculatorId.id || manualTaxCalculatorId;
24
28
  return this.resources.fetch({ type: 'tax_rules' }, `manual_tax_calculators/${_manualTaxCalculatorId}/tax_rules`, params, options);
@@ -8,6 +8,7 @@ import type { SubscriptionModel, SubscriptionModelType } from './subscription_mo
8
8
  import type { TaxCalculator, TaxCalculatorType } from './tax_calculators';
9
9
  import type { CustomerGroup, CustomerGroupType } from './customer_groups';
10
10
  import type { Attachment } from './attachments';
11
+ import type { Version } from './versions';
11
12
  type MarketType = 'markets';
12
13
  type MarketRel = ResourceRel & {
13
14
  type: MarketType;
@@ -48,6 +49,7 @@ interface Market extends Resource {
48
49
  tax_calculator?: TaxCalculator | null;
49
50
  customer_group?: CustomerGroup | null;
50
51
  attachments?: Attachment[] | null;
52
+ versions?: Version[] | null;
51
53
  }
52
54
  interface MarketCreate extends ResourceCreate {
53
55
  name: string;
@@ -89,6 +91,7 @@ declare class Markets extends ApiResource<Market> {
89
91
  tax_calculator(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCalculator>;
90
92
  customer_group(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerGroup>;
91
93
  attachments(marketId: string | Market, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
94
+ versions(marketId: string | Market, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
92
95
  _disable(id: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
93
96
  _enable(id: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
94
97
  isMarket(resource: any): resource is Market;
@@ -39,6 +39,10 @@ class Markets extends resource_1.ApiResource {
39
39
  const _marketId = marketId.id || marketId;
40
40
  return this.resources.fetch({ type: 'attachments' }, `markets/${_marketId}/attachments`, params, options);
41
41
  }
42
+ async versions(marketId, params, options) {
43
+ const _marketId = marketId.id || marketId;
44
+ return this.resources.fetch({ type: 'versions' }, `markets/${_marketId}/versions`, params, options);
45
+ }
42
46
  async _disable(id, params, options) {
43
47
  return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Markets.TYPE, _disable: true }, params, options);
44
48
  }
@@ -3,6 +3,7 @@ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesCon
3
3
  import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Address, AddressType } from './addresses';
5
5
  import type { Attachment } from './attachments';
6
+ import type { Version } from './versions';
6
7
  type MerchantType = 'merchants';
7
8
  type MerchantRel = ResourceRel & {
8
9
  type: MerchantType;
@@ -15,6 +16,7 @@ interface Merchant extends Resource {
15
16
  name: string;
16
17
  address?: Address | null;
17
18
  attachments?: Attachment[] | null;
19
+ versions?: Version[] | null;
18
20
  }
19
21
  interface MerchantCreate extends ResourceCreate {
20
22
  name: string;
@@ -31,6 +33,7 @@ declare class Merchants extends ApiResource<Merchant> {
31
33
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
32
34
  address(merchantId: string | Merchant, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
33
35
  attachments(merchantId: string | Merchant, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
36
+ versions(merchantId: string | Merchant, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
34
37
  isMerchant(resource: any): resource is Merchant;
35
38
  relationship(id: string | ResourceId | null): MerchantRel;
36
39
  type(): MerchantType;
@@ -19,6 +19,10 @@ class Merchants extends resource_1.ApiResource {
19
19
  const _merchantId = merchantId.id || merchantId;
20
20
  return this.resources.fetch({ type: 'attachments' }, `merchants/${_merchantId}/attachments`, params, options);
21
21
  }
22
+ async versions(merchantId, params, options) {
23
+ const _merchantId = merchantId.id || merchantId;
24
+ return this.resources.fetch({ type: 'versions' }, `merchants/${_merchantId}/versions`, params, options);
25
+ }
22
26
  isMerchant(resource) {
23
27
  return resource.type && (resource.type === Merchants.TYPE);
24
28
  }
@@ -1,12 +1,13 @@
1
1
  import { ApiResource } from '../resource';
2
- import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
3
- import type { QueryParamsRetrieve } from '../query';
2
+ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
+ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions';
5
5
  import type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions';
6
6
  import type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions';
7
7
  import type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions';
8
8
  import type { ExternalPromotion, ExternalPromotionType } from './external_promotions';
9
9
  import type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions';
10
+ import type { Version } from './versions';
10
11
  type OrderAmountPromotionRuleType = 'order_amount_promotion_rules';
11
12
  type OrderAmountPromotionRuleRel = ResourceRel & {
12
13
  type: OrderAmountPromotionRuleType;
@@ -36,6 +37,7 @@ interface OrderAmountPromotionRule extends Resource {
36
37
  formatted_order_amount?: string | null;
37
38
  use_subtotal?: boolean | null;
38
39
  promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null;
40
+ versions?: Version[] | null;
39
41
  }
40
42
  interface OrderAmountPromotionRuleCreate extends ResourceCreate {
41
43
  order_amount_cents?: number | null;
@@ -52,6 +54,7 @@ declare class OrderAmountPromotionRules extends ApiResource<OrderAmountPromotion
52
54
  create(resource: OrderAmountPromotionRuleCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
53
55
  update(resource: OrderAmountPromotionRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
54
56
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
57
+ versions(orderAmountPromotionRuleId: string | OrderAmountPromotionRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
55
58
  isOrderAmountPromotionRule(resource: any): resource is OrderAmountPromotionRule;
56
59
  relationship(id: string | ResourceId | null): OrderAmountPromotionRuleRel;
57
60
  type(): OrderAmountPromotionRuleType;
@@ -11,6 +11,10 @@ class OrderAmountPromotionRules extends resource_1.ApiResource {
11
11
  async delete(id, options) {
12
12
  await this.resources.delete((typeof id === 'string') ? { id, type: OrderAmountPromotionRules.TYPE } : id, options);
13
13
  }
14
+ async versions(orderAmountPromotionRuleId, params, options) {
15
+ const _orderAmountPromotionRuleId = orderAmountPromotionRuleId.id || orderAmountPromotionRuleId;
16
+ return this.resources.fetch({ type: 'versions' }, `order_amount_promotion_rules/${_orderAmountPromotionRuleId}/versions`, params, options);
17
+ }
14
18
  isOrderAmountPromotionRule(resource) {
15
19
  return resource.type && (resource.type === OrderAmountPromotionRules.TYPE);
16
20
  }
@@ -5,6 +5,7 @@ import type { OrderSubscription, OrderSubscriptionType } from './order_subscript
5
5
  import type { Adjustment, AdjustmentType } from './adjustments';
6
6
  import type { Bundle, BundleType } from './bundles';
7
7
  import type { Sku, SkuType } from './skus';
8
+ import type { LineItem } from './line_items';
8
9
  type OrderSubscriptionItemType = 'order_subscription_items';
9
10
  type OrderSubscriptionItemRel = ResourceRel & {
10
11
  type: OrderSubscriptionItemType;
@@ -32,6 +33,7 @@ interface OrderSubscriptionItem extends Resource {
32
33
  formatted_total_amount?: string | null;
33
34
  order_subscription?: OrderSubscription | null;
34
35
  item?: Adjustment | Bundle | Sku | null;
36
+ source_line_item?: LineItem | null;
35
37
  }
36
38
  interface OrderSubscriptionItemCreate extends ResourceCreate {
37
39
  sku_code?: string | null;
@@ -53,6 +55,7 @@ declare class OrderSubscriptionItems extends ApiResource<OrderSubscriptionItem>
53
55
  update(resource: OrderSubscriptionItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscriptionItem>;
54
56
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
55
57
  order_subscription(orderSubscriptionItemId: string | OrderSubscriptionItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
58
+ source_line_item(orderSubscriptionItemId: string | OrderSubscriptionItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
56
59
  isOrderSubscriptionItem(resource: any): resource is OrderSubscriptionItem;
57
60
  relationship(id: string | ResourceId | null): OrderSubscriptionItemRel;
58
61
  type(): OrderSubscriptionItemType;
@@ -15,6 +15,10 @@ class OrderSubscriptionItems extends resource_1.ApiResource {
15
15
  const _orderSubscriptionItemId = orderSubscriptionItemId.id || orderSubscriptionItemId;
16
16
  return this.resources.fetch({ type: 'order_subscriptions' }, `order_subscription_items/${_orderSubscriptionItemId}/order_subscription`, params, options);
17
17
  }
18
+ async source_line_item(orderSubscriptionItemId, params, options) {
19
+ const _orderSubscriptionItemId = orderSubscriptionItemId.id || orderSubscriptionItemId;
20
+ return this.resources.fetch({ type: 'line_items' }, `order_subscription_items/${_orderSubscriptionItemId}/source_line_item`, params, options);
21
+ }
18
22
  isOrderSubscriptionItem(resource) {
19
23
  return resource.type && (resource.type === OrderSubscriptionItems.TYPE);
20
24
  }
@@ -10,6 +10,7 @@ import type { OrderSubscriptionItem } from './order_subscription_items';
10
10
  import type { OrderFactory } from './order_factories';
11
11
  import type { RecurringOrderCopy } from './recurring_order_copies';
12
12
  import type { Event } from './events';
13
+ import type { Version } from './versions';
13
14
  type OrderSubscriptionType = 'order_subscriptions';
14
15
  type OrderSubscriptionRel = ResourceRel & {
15
16
  type: OrderSubscriptionType;
@@ -51,6 +52,7 @@ interface OrderSubscription extends Resource {
51
52
  recurring_order_copies?: RecurringOrderCopy[] | null;
52
53
  orders?: Order[] | null;
53
54
  events?: Event[] | null;
55
+ versions?: Version[] | null;
54
56
  }
55
57
  interface OrderSubscriptionCreate extends ResourceCreate {
56
58
  frequency: string;
@@ -85,6 +87,7 @@ declare class OrderSubscriptions extends ApiResource<OrderSubscription> {
85
87
  recurring_order_copies(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<RecurringOrderCopy>>;
86
88
  orders(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Order>>;
87
89
  events(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
90
+ versions(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
88
91
  _activate(id: string | OrderSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
89
92
  _deactivate(id: string | OrderSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
90
93
  _cancel(id: string | OrderSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
@@ -51,6 +51,10 @@ class OrderSubscriptions extends resource_1.ApiResource {
51
51
  const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
52
52
  return this.resources.fetch({ type: 'events' }, `order_subscriptions/${_orderSubscriptionId}/events`, params, options);
53
53
  }
54
+ async versions(orderSubscriptionId, params, options) {
55
+ const _orderSubscriptionId = orderSubscriptionId.id || orderSubscriptionId;
56
+ return this.resources.fetch({ type: 'versions' }, `order_subscriptions/${_orderSubscriptionId}/versions`, params, options);
57
+ }
54
58
  async _activate(id, params, options) {
55
59
  return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: OrderSubscriptions.TYPE, _activate: true }, params, options);
56
60
  }
@@ -3,6 +3,7 @@ import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse }
3
3
  import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Market } from './markets';
5
5
  import type { Attachment } from './attachments';
6
+ import type { Version } from './versions';
6
7
  type OrderValidationRuleType = 'order_validation_rules';
7
8
  type OrderValidationRuleRel = ResourceRel & {
8
9
  type: OrderValidationRuleType;
@@ -11,11 +12,13 @@ interface OrderValidationRule extends Resource {
11
12
  readonly type: OrderValidationRuleType;
12
13
  market?: Market | null;
13
14
  attachments?: Attachment[] | null;
15
+ versions?: Version[] | null;
14
16
  }
15
17
  declare class OrderValidationRules extends ApiResource<OrderValidationRule> {
16
18
  static readonly TYPE: OrderValidationRuleType;
17
19
  market(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
18
20
  attachments(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
21
+ versions(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
19
22
  isOrderValidationRule(resource: any): resource is OrderValidationRule;
20
23
  relationship(id: string | ResourceId | null): OrderValidationRuleRel;
21
24
  type(): OrderValidationRuleType;
@@ -10,6 +10,10 @@ class OrderValidationRules extends resource_1.ApiResource {
10
10
  const _orderValidationRuleId = orderValidationRuleId.id || orderValidationRuleId;
11
11
  return this.resources.fetch({ type: 'attachments' }, `order_validation_rules/${_orderValidationRuleId}/attachments`, params, options);
12
12
  }
13
+ async versions(orderValidationRuleId, params, options) {
14
+ const _orderValidationRuleId = orderValidationRuleId.id || orderValidationRuleId;
15
+ return this.resources.fetch({ type: 'versions' }, `order_validation_rules/${_orderValidationRuleId}/versions`, params, options);
16
+ }
13
17
  isOrderValidationRule(resource) {
14
18
  return resource.type && (resource.type === OrderValidationRules.TYPE);
15
19
  }
@@ -21,8 +21,8 @@ import type { WireTransfer, WireTransferType } from './wire_transfers';
21
21
  import type { LineItem } from './line_items';
22
22
  import type { Shipment } from './shipments';
23
23
  import type { Authorization } from './authorizations';
24
- import type { Void } from './voids';
25
24
  import type { Capture } from './captures';
25
+ import type { Void } from './voids';
26
26
  import type { Refund } from './refunds';
27
27
  import type { Return } from './returns';
28
28
  import type { OrderSubscription } from './order_subscriptions';
@@ -32,6 +32,7 @@ import type { RecurringOrderCopy } from './recurring_order_copies';
32
32
  import type { Attachment } from './attachments';
33
33
  import type { Event } from './events';
34
34
  import type { Tag, TagType } from './tags';
35
+ import type { Version } from './versions';
35
36
  type OrderType = 'orders';
36
37
  type OrderRel = ResourceRel & {
37
38
  type: OrderType;
@@ -161,6 +162,9 @@ interface Order extends Resource {
161
162
  duty_amount_cents?: number | null;
162
163
  duty_amount_float?: number | null;
163
164
  formatted_duty_amount?: string | null;
165
+ place_total_amount_cents?: number | null;
166
+ place_total_amount_float?: number | null;
167
+ formatted_place_total_amount?: string | null;
164
168
  skus_count?: number | null;
165
169
  line_item_options_count?: number | null;
166
170
  shipments_count?: number | null;
@@ -194,7 +198,7 @@ interface Order extends Resource {
194
198
  payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null;
195
199
  line_items?: LineItem[] | null;
196
200
  shipments?: Shipment[] | null;
197
- transactions?: Array<Authorization | Void | Capture | Refund> | null;
201
+ transactions?: Array<Authorization | Capture | Void | Refund> | null;
198
202
  authorizations?: Authorization[] | null;
199
203
  captures?: Capture[] | null;
200
204
  voids?: Void[] | null;
@@ -207,6 +211,7 @@ interface Order extends Resource {
207
211
  attachments?: Attachment[] | null;
208
212
  events?: Event[] | null;
209
213
  tags?: Tag[] | null;
214
+ versions?: Version[] | null;
210
215
  }
211
216
  interface OrderCreate extends ResourceCreate {
212
217
  autorefresh?: boolean | null;
@@ -305,6 +310,7 @@ declare class Orders extends ApiResource<Order> {
305
310
  attachments(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
306
311
  events(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
307
312
  tags(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
313
+ versions(orderId: string | Order, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
308
314
  _archive(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
309
315
  _unarchive(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
310
316
  _place(id: string | Order, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
@@ -103,6 +103,10 @@ class Orders extends resource_1.ApiResource {
103
103
  const _orderId = orderId.id || orderId;
104
104
  return this.resources.fetch({ type: 'tags' }, `orders/${_orderId}/tags`, params, options);
105
105
  }
106
+ async versions(orderId, params, options) {
107
+ const _orderId = orderId.id || orderId;
108
+ return this.resources.fetch({ type: 'versions' }, `orders/${_orderId}/versions`, params, options);
109
+ }
106
110
  async _archive(id, params, options) {
107
111
  return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Orders.TYPE, _archive: true }, params, options);
108
112
  }
@@ -4,6 +4,7 @@ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { StockLocation, StockLocationType } from './stock_locations';
5
5
  import type { Parcel } from './parcels';
6
6
  import type { Attachment } from './attachments';
7
+ import type { Version } from './versions';
7
8
  type PackageType = 'packages';
8
9
  type PackageRel = ResourceRel & {
9
10
  type: PackageType;
@@ -22,6 +23,7 @@ interface Package extends Resource {
22
23
  stock_location?: StockLocation | null;
23
24
  parcels?: Parcel[] | null;
24
25
  attachments?: Attachment[] | null;
26
+ versions?: Version[] | null;
25
27
  }
26
28
  interface PackageCreate extends ResourceCreate {
27
29
  name: string;
@@ -49,6 +51,7 @@ declare class Packages extends ApiResource<Package> {
49
51
  stock_location(packageId: string | Package, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
50
52
  parcels(packageId: string | Package, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Parcel>>;
51
53
  attachments(packageId: string | Package, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
54
+ versions(packageId: string | Package, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
52
55
  isPackage(resource: any): resource is Package;
53
56
  relationship(id: string | ResourceId | null): PackageRel;
54
57
  type(): PackageType;
@@ -23,6 +23,10 @@ class Packages extends resource_1.ApiResource {
23
23
  const _packageId = packageId.id || packageId;
24
24
  return this.resources.fetch({ type: 'attachments' }, `packages/${_packageId}/attachments`, params, options);
25
25
  }
26
+ async versions(packageId, params, options) {
27
+ const _packageId = packageId.id || packageId;
28
+ return this.resources.fetch({ type: 'versions' }, `packages/${_packageId}/versions`, params, options);
29
+ }
26
30
  isPackage(resource) {
27
31
  return resource.type && (resource.type === Packages.TYPE);
28
32
  }
@@ -1,8 +1,9 @@
1
1
  import { ApiResource } from '../resource';
2
- import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
3
- import type { QueryParamsRetrieve } from '../query';
2
+ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
+ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Parcel, ParcelType } from './parcels';
5
5
  import type { StockLineItem, StockLineItemType } from './stock_line_items';
6
+ import type { Version } from './versions';
6
7
  type ParcelLineItemType = 'parcel_line_items';
7
8
  type ParcelLineItemRel = ResourceRel & {
8
9
  type: ParcelLineItemType;
@@ -26,6 +27,7 @@ interface ParcelLineItem extends Resource {
26
27
  * @deprecated This field should not be used as it may be removed in the future without notice
27
28
  */
28
29
  shipment_line_item?: object;
30
+ versions?: Version[] | null;
29
31
  }
30
32
  interface ParcelLineItemCreate extends ResourceCreate {
31
33
  quantity: number;
@@ -44,6 +46,7 @@ declare class ParcelLineItems extends ApiResource<ParcelLineItem> {
44
46
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
45
47
  parcel(parcelLineItemId: string | ParcelLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Parcel>;
46
48
  stock_line_item(parcelLineItemId: string | ParcelLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLineItem>;
49
+ versions(parcelLineItemId: string | ParcelLineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
47
50
  isParcelLineItem(resource: any): resource is ParcelLineItem;
48
51
  relationship(id: string | ResourceId | null): ParcelLineItemRel;
49
52
  type(): ParcelLineItemType;
@@ -19,6 +19,10 @@ class ParcelLineItems extends resource_1.ApiResource {
19
19
  const _parcelLineItemId = parcelLineItemId.id || parcelLineItemId;
20
20
  return this.resources.fetch({ type: 'stock_line_items' }, `parcel_line_items/${_parcelLineItemId}/stock_line_item`, params, options);
21
21
  }
22
+ async versions(parcelLineItemId, params, options) {
23
+ const _parcelLineItemId = parcelLineItemId.id || parcelLineItemId;
24
+ return this.resources.fetch({ type: 'versions' }, `parcel_line_items/${_parcelLineItemId}/versions`, params, options);
25
+ }
22
26
  isParcelLineItem(resource) {
23
27
  return resource.type && (resource.type === ParcelLineItems.TYPE);
24
28
  }
@@ -6,6 +6,7 @@ import type { Package, PackageType } from './packages';
6
6
  import type { ParcelLineItem } from './parcel_line_items';
7
7
  import type { Attachment } from './attachments';
8
8
  import type { Event } from './events';
9
+ import type { Version } from './versions';
9
10
  type ParcelType = 'parcels';
10
11
  type ParcelRel = ResourceRel & {
11
12
  type: ParcelType;
@@ -48,6 +49,7 @@ interface Parcel extends Resource {
48
49
  parcel_line_items?: ParcelLineItem[] | null;
49
50
  attachments?: Attachment[] | null;
50
51
  events?: Event[] | null;
52
+ versions?: Version[] | null;
51
53
  }
52
54
  interface ParcelCreate extends ResourceCreate {
53
55
  weight: number;
@@ -115,6 +117,7 @@ declare class Parcels extends ApiResource<Parcel> {
115
117
  parcel_line_items(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ParcelLineItem>>;
116
118
  attachments(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
117
119
  events(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
120
+ versions(parcelId: string | Parcel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
118
121
  isParcel(resource: any): resource is Parcel;
119
122
  relationship(id: string | ResourceId | null): ParcelRel;
120
123
  type(): ParcelType;
@@ -31,6 +31,10 @@ class Parcels extends resource_1.ApiResource {
31
31
  const _parcelId = parcelId.id || parcelId;
32
32
  return this.resources.fetch({ type: 'events' }, `parcels/${_parcelId}/events`, params, options);
33
33
  }
34
+ async versions(parcelId, params, options) {
35
+ const _parcelId = parcelId.id || parcelId;
36
+ return this.resources.fetch({ type: 'versions' }, `parcels/${_parcelId}/versions`, params, options);
37
+ }
34
38
  isParcel(resource) {
35
39
  return resource.type && (resource.type === Parcels.TYPE);
36
40
  }
@@ -2,6 +2,7 @@ import { ApiResource } from '../resource';
2
2
  import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
3
  import type { QueryParamsList } from '../query';
4
4
  import type { PaymentMethod } from './payment_methods';
5
+ import type { Version } from './versions';
5
6
  type PaymentGatewayType = 'payment_gateways';
6
7
  type PaymentGatewayRel = ResourceRel & {
7
8
  type: PaymentGatewayType;
@@ -10,10 +11,12 @@ interface PaymentGateway extends Resource {
10
11
  readonly type: PaymentGatewayType;
11
12
  name: string;
12
13
  payment_methods?: PaymentMethod[] | null;
14
+ versions?: Version[] | null;
13
15
  }
14
16
  declare class PaymentGateways extends ApiResource<PaymentGateway> {
15
17
  static readonly TYPE: PaymentGatewayType;
16
18
  payment_methods(paymentGatewayId: string | PaymentGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
19
+ versions(paymentGatewayId: string | PaymentGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
17
20
  isPaymentGateway(resource: any): resource is PaymentGateway;
18
21
  relationship(id: string | ResourceId | null): PaymentGatewayRel;
19
22
  type(): PaymentGatewayType;
@@ -6,6 +6,10 @@ class PaymentGateways extends resource_1.ApiResource {
6
6
  const _paymentGatewayId = paymentGatewayId.id || paymentGatewayId;
7
7
  return this.resources.fetch({ type: 'payment_methods' }, `payment_gateways/${_paymentGatewayId}/payment_methods`, params, options);
8
8
  }
9
+ async versions(paymentGatewayId, params, options) {
10
+ const _paymentGatewayId = paymentGatewayId.id || paymentGatewayId;
11
+ return this.resources.fetch({ type: 'versions' }, `payment_gateways/${_paymentGatewayId}/versions`, params, options);
12
+ }
9
13
  isPaymentGateway(resource) {
10
14
  return resource.type && (resource.type === PaymentGateways.TYPE);
11
15
  }
@@ -4,6 +4,7 @@ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Market, MarketType } from './markets';
5
5
  import type { PaymentGateway, PaymentGatewayType } from './payment_gateways';
6
6
  import type { Attachment } from './attachments';
7
+ import type { Version } from './versions';
7
8
  type PaymentMethodType = 'payment_methods';
8
9
  type PaymentMethodRel = ResourceRel & {
9
10
  type: PaymentMethodType;
@@ -32,6 +33,7 @@ interface PaymentMethod extends Resource {
32
33
  market?: Market | null;
33
34
  payment_gateway?: PaymentGateway | null;
34
35
  attachments?: Attachment[] | null;
36
+ versions?: Version[] | null;
35
37
  }
36
38
  interface PaymentMethodCreate extends ResourceCreate {
37
39
  payment_source_type: string;
@@ -65,6 +67,7 @@ declare class PaymentMethods extends ApiResource<PaymentMethod> {
65
67
  market(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
66
68
  payment_gateway(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
67
69
  attachments(paymentMethodId: string | PaymentMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
70
+ versions(paymentMethodId: string | PaymentMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
68
71
  _disable(id: string | PaymentMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentMethod>;
69
72
  _enable(id: string | PaymentMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentMethod>;
70
73
  isPaymentMethod(resource: any): resource is PaymentMethod;
@@ -23,6 +23,10 @@ class PaymentMethods extends resource_1.ApiResource {
23
23
  const _paymentMethodId = paymentMethodId.id || paymentMethodId;
24
24
  return this.resources.fetch({ type: 'attachments' }, `payment_methods/${_paymentMethodId}/attachments`, params, options);
25
25
  }
26
+ async versions(paymentMethodId, params, options) {
27
+ const _paymentMethodId = paymentMethodId.id || paymentMethodId;
28
+ return this.resources.fetch({ type: 'versions' }, `payment_methods/${_paymentMethodId}/versions`, params, options);
29
+ }
26
30
  async _disable(id, params, options) {
27
31
  return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: PaymentMethods.TYPE, _disable: true }, params, options);
28
32
  }
@@ -2,6 +2,7 @@ import { ApiResource } from '../resource';
2
2
  import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
3
  import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { PaymentMethod } from './payment_methods';
5
+ import type { Version } from './versions';
5
6
  import type { PaypalPayment } from './paypal_payments';
6
7
  type PaypalGatewayType = 'paypal_gateways';
7
8
  type PaypalGatewayRel = ResourceRel & {
@@ -11,6 +12,7 @@ interface PaypalGateway extends Resource {
11
12
  readonly type: PaypalGatewayType;
12
13
  name: string;
13
14
  payment_methods?: PaymentMethod[] | null;
15
+ versions?: Version[] | null;
14
16
  paypal_payments?: PaypalPayment[] | null;
15
17
  }
16
18
  interface PaypalGatewayCreate extends ResourceCreate {
@@ -29,6 +31,7 @@ declare class PaypalGateways extends ApiResource<PaypalGateway> {
29
31
  update(resource: PaypalGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaypalGateway>;
30
32
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
31
33
  payment_methods(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
34
+ versions(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
32
35
  paypal_payments(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaypalPayment>>;
33
36
  isPaypalGateway(resource: any): resource is PaypalGateway;
34
37
  relationship(id: string | ResourceId | null): PaypalGatewayRel;
@@ -15,6 +15,10 @@ class PaypalGateways extends resource_1.ApiResource {
15
15
  const _paypalGatewayId = paypalGatewayId.id || paypalGatewayId;
16
16
  return this.resources.fetch({ type: 'payment_methods' }, `paypal_gateways/${_paypalGatewayId}/payment_methods`, params, options);
17
17
  }
18
+ async versions(paypalGatewayId, params, options) {
19
+ const _paypalGatewayId = paypalGatewayId.id || paypalGatewayId;
20
+ return this.resources.fetch({ type: 'versions' }, `paypal_gateways/${_paypalGatewayId}/versions`, params, options);
21
+ }
18
22
  async paypal_payments(paypalGatewayId, params, options) {
19
23
  const _paypalGatewayId = paypalGatewayId.id || paypalGatewayId;
20
24
  return this.resources.fetch({ type: 'paypal_payments' }, `paypal_gateways/${_paypalGatewayId}/paypal_payments`, params, options);
@@ -1,8 +1,9 @@
1
1
  import { ApiResource } from '../resource';
2
- import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
3
- import type { QueryParamsRetrieve } from '../query';
2
+ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
+ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Order, OrderType } from './orders';
5
5
  import type { PaymentGateway } from './payment_gateways';
6
+ import type { Version } from './versions';
6
7
  type PaypalPaymentType = 'paypal_payments';
7
8
  type PaypalPaymentRel = ResourceRel & {
8
9
  type: PaypalPaymentType;
@@ -27,6 +28,7 @@ interface PaypalPayment extends Resource {
27
28
  payment_instrument?: Record<string, any> | null;
28
29
  order?: Order | null;
29
30
  payment_gateway?: PaymentGateway | null;
31
+ versions?: Version[] | null;
30
32
  }
31
33
  interface PaypalPaymentCreate extends ResourceCreate {
32
34
  return_url: string;
@@ -45,6 +47,7 @@ declare class PaypalPayments extends ApiResource<PaypalPayment> {
45
47
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
46
48
  order(paypalPaymentId: string | PaypalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
47
49
  payment_gateway(paypalPaymentId: string | PaypalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
50
+ versions(paypalPaymentId: string | PaypalPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
48
51
  isPaypalPayment(resource: any): resource is PaypalPayment;
49
52
  relationship(id: string | ResourceId | null): PaypalPaymentRel;
50
53
  type(): PaypalPaymentType;
@@ -19,6 +19,10 @@ class PaypalPayments extends resource_1.ApiResource {
19
19
  const _paypalPaymentId = paypalPaymentId.id || paypalPaymentId;
20
20
  return this.resources.fetch({ type: 'payment_gateways' }, `paypal_payments/${_paypalPaymentId}/payment_gateway`, params, options);
21
21
  }
22
+ async versions(paypalPaymentId, params, options) {
23
+ const _paypalPaymentId = paypalPaymentId.id || paypalPaymentId;
24
+ return this.resources.fetch({ type: 'versions' }, `paypal_payments/${_paypalPaymentId}/versions`, params, options);
25
+ }
22
26
  isPaypalPayment(resource) {
23
27
  return resource.type && (resource.type === PaypalPayments.TYPE);
24
28
  }
@@ -10,6 +10,7 @@ import type { SkuList, SkuListType } from './sku_lists';
10
10
  import type { Attachment } from './attachments';
11
11
  import type { Event } from './events';
12
12
  import type { Tag, TagType } from './tags';
13
+ import type { Version } from './versions';
13
14
  import type { Sku } from './skus';
14
15
  type PercentageDiscountPromotionType = 'percentage_discount_promotions';
15
16
  type PercentageDiscountPromotionRel = ResourceRel & {
@@ -55,6 +56,7 @@ interface PercentageDiscountPromotion extends Resource {
55
56
  attachments?: Attachment[] | null;
56
57
  events?: Event[] | null;
57
58
  tags?: Tag[] | null;
59
+ versions?: Version[] | null;
58
60
  skus?: Sku[] | null;
59
61
  }
60
62
  interface PercentageDiscountPromotionCreate extends ResourceCreate {
@@ -100,6 +102,7 @@ declare class PercentageDiscountPromotions extends ApiResource<PercentageDiscoun
100
102
  attachments(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
101
103
  events(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
102
104
  tags(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
105
+ versions(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
103
106
  skus(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
104
107
  isPercentageDiscountPromotion(resource: any): resource is PercentageDiscountPromotion;
105
108
  relationship(id: string | ResourceId | null): PercentageDiscountPromotionRel;