@augno/sdk 0.16.1 → 0.18.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 (350) hide show
  1. package/CHANGELOG.md +7 -2
  2. package/README.md +1 -1
  3. package/client.js +1 -1
  4. package/client.mjs +1 -1
  5. package/package.json +1 -1
  6. package/resources/catalog/item-categories/actions.d.mts +8 -2
  7. package/resources/catalog/item-categories/actions.d.mts.map +1 -1
  8. package/resources/catalog/item-categories/actions.d.ts +8 -2
  9. package/resources/catalog/item-categories/actions.d.ts.map +1 -1
  10. package/resources/catalog/item-categories/actions.js +7 -2
  11. package/resources/catalog/item-categories/actions.js.map +1 -1
  12. package/resources/catalog/item-categories/actions.mjs +7 -2
  13. package/resources/catalog/item-categories/actions.mjs.map +1 -1
  14. package/resources/catalog/materials/actions.d.mts +7 -2
  15. package/resources/catalog/materials/actions.d.mts.map +1 -1
  16. package/resources/catalog/materials/actions.d.ts +7 -2
  17. package/resources/catalog/materials/actions.d.ts.map +1 -1
  18. package/resources/catalog/materials/actions.js +7 -2
  19. package/resources/catalog/materials/actions.js.map +1 -1
  20. package/resources/catalog/materials/actions.mjs +7 -2
  21. package/resources/catalog/materials/actions.mjs.map +1 -1
  22. package/resources/catalog/parts/actions.d.mts +7 -2
  23. package/resources/catalog/parts/actions.d.mts.map +1 -1
  24. package/resources/catalog/parts/actions.d.ts +7 -2
  25. package/resources/catalog/parts/actions.d.ts.map +1 -1
  26. package/resources/catalog/parts/actions.js +7 -2
  27. package/resources/catalog/parts/actions.js.map +1 -1
  28. package/resources/catalog/parts/actions.mjs +7 -2
  29. package/resources/catalog/parts/actions.mjs.map +1 -1
  30. package/resources/catalog/product-lines/actions.d.mts +8 -2
  31. package/resources/catalog/product-lines/actions.d.mts.map +1 -1
  32. package/resources/catalog/product-lines/actions.d.ts +8 -2
  33. package/resources/catalog/product-lines/actions.d.ts.map +1 -1
  34. package/resources/catalog/product-lines/actions.js +7 -2
  35. package/resources/catalog/product-lines/actions.js.map +1 -1
  36. package/resources/catalog/product-lines/actions.mjs +7 -2
  37. package/resources/catalog/product-lines/actions.mjs.map +1 -1
  38. package/resources/catalog/products/actions.d.mts +7 -2
  39. package/resources/catalog/products/actions.d.mts.map +1 -1
  40. package/resources/catalog/products/actions.d.ts +7 -2
  41. package/resources/catalog/products/actions.d.ts.map +1 -1
  42. package/resources/catalog/products/actions.js +7 -2
  43. package/resources/catalog/products/actions.js.map +1 -1
  44. package/resources/catalog/products/actions.mjs +7 -2
  45. package/resources/catalog/products/actions.mjs.map +1 -1
  46. package/resources/catalog/properties/actions.d.mts +8 -3
  47. package/resources/catalog/properties/actions.d.mts.map +1 -1
  48. package/resources/catalog/properties/actions.d.ts +8 -3
  49. package/resources/catalog/properties/actions.d.ts.map +1 -1
  50. package/resources/catalog/properties/actions.js +7 -2
  51. package/resources/catalog/properties/actions.js.map +1 -1
  52. package/resources/catalog/properties/actions.mjs +7 -2
  53. package/resources/catalog/properties/actions.mjs.map +1 -1
  54. package/resources/catalog/unit-groups/actions.d.mts +7 -2
  55. package/resources/catalog/unit-groups/actions.d.mts.map +1 -1
  56. package/resources/catalog/unit-groups/actions.d.ts +7 -2
  57. package/resources/catalog/unit-groups/actions.d.ts.map +1 -1
  58. package/resources/catalog/unit-groups/actions.js +7 -2
  59. package/resources/catalog/unit-groups/actions.js.map +1 -1
  60. package/resources/catalog/unit-groups/actions.mjs +7 -2
  61. package/resources/catalog/unit-groups/actions.mjs.map +1 -1
  62. package/resources/catalog/units/actions.d.mts +8 -2
  63. package/resources/catalog/units/actions.d.mts.map +1 -1
  64. package/resources/catalog/units/actions.d.ts +8 -2
  65. package/resources/catalog/units/actions.d.ts.map +1 -1
  66. package/resources/catalog/units/actions.js +7 -2
  67. package/resources/catalog/units/actions.js.map +1 -1
  68. package/resources/catalog/units/actions.mjs +7 -2
  69. package/resources/catalog/units/actions.mjs.map +1 -1
  70. package/resources/core/analytics.d.mts +195 -1
  71. package/resources/core/analytics.d.mts.map +1 -1
  72. package/resources/core/analytics.d.ts +195 -1
  73. package/resources/core/analytics.d.ts.map +1 -1
  74. package/resources/core/analytics.js +11 -0
  75. package/resources/core/analytics.js.map +1 -1
  76. package/resources/core/analytics.mjs +11 -0
  77. package/resources/core/analytics.mjs.map +1 -1
  78. package/resources/core/audit-events.d.mts +4 -4
  79. package/resources/core/audit-events.d.mts.map +1 -1
  80. package/resources/core/audit-events.d.ts +4 -4
  81. package/resources/core/audit-events.d.ts.map +1 -1
  82. package/resources/core/core.d.mts +6 -6
  83. package/resources/core/core.d.mts.map +1 -1
  84. package/resources/core/core.d.ts +6 -6
  85. package/resources/core/core.d.ts.map +1 -1
  86. package/resources/core/core.js.map +1 -1
  87. package/resources/core/core.mjs +1 -1
  88. package/resources/core/core.mjs.map +1 -1
  89. package/resources/core/index.d.mts +2 -2
  90. package/resources/core/index.d.mts.map +1 -1
  91. package/resources/core/index.d.ts +2 -2
  92. package/resources/core/index.d.ts.map +1 -1
  93. package/resources/core/index.js.map +1 -1
  94. package/resources/core/index.mjs.map +1 -1
  95. package/resources/core/jobs.d.mts +102 -60
  96. package/resources/core/jobs.d.mts.map +1 -1
  97. package/resources/core/jobs.d.ts +102 -60
  98. package/resources/core/jobs.d.ts.map +1 -1
  99. package/resources/core/jobs.js +12 -6
  100. package/resources/core/jobs.js.map +1 -1
  101. package/resources/core/jobs.mjs +12 -6
  102. package/resources/core/jobs.mjs.map +1 -1
  103. package/resources/finance/payment-terms.d.mts +5 -5
  104. package/resources/finance/payment-terms.d.mts.map +1 -1
  105. package/resources/finance/payment-terms.d.ts +5 -5
  106. package/resources/finance/payment-terms.d.ts.map +1 -1
  107. package/resources/finance/payment-terms.js.map +1 -1
  108. package/resources/finance/payment-terms.mjs.map +1 -1
  109. package/resources/identity/account-users/account-users.d.mts +39 -0
  110. package/resources/identity/account-users/account-users.d.mts.map +1 -1
  111. package/resources/identity/account-users/account-users.d.ts +39 -0
  112. package/resources/identity/account-users/account-users.d.ts.map +1 -1
  113. package/resources/identity/account-users/account-users.js.map +1 -1
  114. package/resources/identity/account-users/account-users.mjs.map +1 -1
  115. package/resources/messaging/blocks.d.mts +8 -0
  116. package/resources/messaging/blocks.d.mts.map +1 -1
  117. package/resources/messaging/blocks.d.ts +8 -0
  118. package/resources/messaging/blocks.d.ts.map +1 -1
  119. package/resources/messaging/conversations/conversations.d.mts +3 -3
  120. package/resources/messaging/conversations/conversations.d.mts.map +1 -1
  121. package/resources/messaging/conversations/conversations.d.ts +3 -3
  122. package/resources/messaging/conversations/conversations.d.ts.map +1 -1
  123. package/resources/messaging/conversations/conversations.js.map +1 -1
  124. package/resources/messaging/conversations/conversations.mjs.map +1 -1
  125. package/resources/messaging/conversations/links.d.mts +2 -2
  126. package/resources/messaging/conversations/links.d.mts.map +1 -1
  127. package/resources/messaging/conversations/links.d.ts +2 -2
  128. package/resources/messaging/conversations/links.d.ts.map +1 -1
  129. package/resources/messaging/conversations/messages.d.mts +2 -2
  130. package/resources/messaging/conversations/messages.d.mts.map +1 -1
  131. package/resources/messaging/conversations/messages.d.ts +2 -2
  132. package/resources/messaging/conversations/messages.d.ts.map +1 -1
  133. package/resources/messaging/notifications/notifications.d.mts +2 -2
  134. package/resources/messaging/notifications/notifications.d.mts.map +1 -1
  135. package/resources/messaging/notifications/notifications.d.ts +2 -2
  136. package/resources/messaging/notifications/notifications.d.ts.map +1 -1
  137. package/resources/messaging/notifications/notifications.js.map +1 -1
  138. package/resources/messaging/notifications/notifications.mjs.map +1 -1
  139. package/resources/operations/carriers/carriers.d.mts +5 -5
  140. package/resources/operations/carriers/carriers.d.mts.map +1 -1
  141. package/resources/operations/carriers/carriers.d.ts +5 -5
  142. package/resources/operations/carriers/carriers.d.ts.map +1 -1
  143. package/resources/operations/carriers/service-levels.d.mts +5 -5
  144. package/resources/operations/carriers/service-levels.d.mts.map +1 -1
  145. package/resources/operations/carriers/service-levels.d.ts +5 -5
  146. package/resources/operations/carriers/service-levels.d.ts.map +1 -1
  147. package/resources/operations/locations/actions.d.mts +7 -2
  148. package/resources/operations/locations/actions.d.mts.map +1 -1
  149. package/resources/operations/locations/actions.d.ts +7 -2
  150. package/resources/operations/locations/actions.d.ts.map +1 -1
  151. package/resources/operations/locations/actions.js +7 -2
  152. package/resources/operations/locations/actions.js.map +1 -1
  153. package/resources/operations/locations/actions.mjs +7 -2
  154. package/resources/operations/locations/actions.mjs.map +1 -1
  155. package/resources/operations/production-schedules/production-schedules.d.mts +5 -3
  156. package/resources/operations/production-schedules/production-schedules.d.mts.map +1 -1
  157. package/resources/operations/production-schedules/production-schedules.d.ts +5 -3
  158. package/resources/operations/production-schedules/production-schedules.d.ts.map +1 -1
  159. package/resources/operations/production-schedules/production-schedules.js +5 -3
  160. package/resources/operations/production-schedules/production-schedules.js.map +1 -1
  161. package/resources/operations/production-schedules/production-schedules.mjs +5 -3
  162. package/resources/operations/production-schedules/production-schedules.mjs.map +1 -1
  163. package/resources/operations/shipments/actions.d.mts +3 -3
  164. package/resources/operations/shipments/actions.d.mts.map +1 -1
  165. package/resources/operations/shipments/actions.d.ts +3 -3
  166. package/resources/operations/shipments/actions.d.ts.map +1 -1
  167. package/resources/operations/shipping-terms.d.mts +5 -5
  168. package/resources/operations/shipping-terms.d.mts.map +1 -1
  169. package/resources/operations/shipping-terms.d.ts +5 -5
  170. package/resources/operations/shipping-terms.d.ts.map +1 -1
  171. package/resources/operations/shipping-terms.js.map +1 -1
  172. package/resources/operations/shipping-terms.mjs.map +1 -1
  173. package/resources/sales/account-prices/account-prices.d.mts +999 -0
  174. package/resources/sales/account-prices/account-prices.d.mts.map +1 -0
  175. package/resources/sales/account-prices/account-prices.d.ts +999 -0
  176. package/resources/sales/account-prices/account-prices.d.ts.map +1 -0
  177. package/resources/sales/account-prices/account-prices.js +143 -0
  178. package/resources/sales/account-prices/account-prices.js.map +1 -0
  179. package/resources/sales/account-prices/account-prices.mjs +138 -0
  180. package/resources/sales/account-prices/account-prices.mjs.map +1 -0
  181. package/resources/sales/account-prices/actions.d.mts +58 -0
  182. package/resources/sales/account-prices/actions.d.mts.map +1 -0
  183. package/resources/sales/account-prices/actions.d.ts +58 -0
  184. package/resources/sales/account-prices/actions.d.ts.map +1 -0
  185. package/resources/sales/account-prices/actions.js +44 -0
  186. package/resources/sales/account-prices/actions.js.map +1 -0
  187. package/resources/sales/account-prices/actions.mjs +40 -0
  188. package/resources/sales/account-prices/actions.mjs.map +1 -0
  189. package/resources/sales/account-prices/index.d.mts +3 -0
  190. package/resources/sales/account-prices/index.d.mts.map +1 -0
  191. package/resources/sales/account-prices/index.d.ts +3 -0
  192. package/resources/sales/account-prices/index.d.ts.map +1 -0
  193. package/resources/sales/account-prices/index.js +9 -0
  194. package/resources/sales/account-prices/index.js.map +1 -0
  195. package/resources/sales/account-prices/index.mjs +4 -0
  196. package/resources/sales/account-prices/index.mjs.map +1 -0
  197. package/resources/sales/account-prices.d.mts +2 -0
  198. package/resources/sales/account-prices.d.mts.map +1 -0
  199. package/resources/sales/account-prices.d.ts +2 -0
  200. package/resources/sales/account-prices.d.ts.map +1 -0
  201. package/resources/sales/account-prices.js +6 -0
  202. package/resources/sales/account-prices.js.map +1 -0
  203. package/resources/sales/account-prices.mjs +3 -0
  204. package/resources/sales/account-prices.mjs.map +1 -0
  205. package/resources/sales/customers/actions.d.mts +2 -2
  206. package/resources/sales/customers/actions.d.mts.map +1 -1
  207. package/resources/sales/customers/actions.d.ts +2 -2
  208. package/resources/sales/customers/actions.d.ts.map +1 -1
  209. package/resources/sales/customers/actions.js.map +1 -1
  210. package/resources/sales/customers/actions.mjs.map +1 -1
  211. package/resources/sales/customers/customers.d.mts +6 -564
  212. package/resources/sales/customers/customers.d.mts.map +1 -1
  213. package/resources/sales/customers/customers.d.ts +6 -564
  214. package/resources/sales/customers/customers.d.ts.map +1 -1
  215. package/resources/sales/customers/customers.js.map +1 -1
  216. package/resources/sales/customers/customers.mjs.map +1 -1
  217. package/resources/sales/customers/index.d.mts +1 -1
  218. package/resources/sales/customers/index.d.mts.map +1 -1
  219. package/resources/sales/customers/index.d.ts +1 -1
  220. package/resources/sales/customers/index.d.ts.map +1 -1
  221. package/resources/sales/customers/index.js.map +1 -1
  222. package/resources/sales/customers/index.mjs.map +1 -1
  223. package/resources/sales/index.d.mts +6 -3
  224. package/resources/sales/index.d.mts.map +1 -1
  225. package/resources/sales/index.d.ts +6 -3
  226. package/resources/sales/index.d.ts.map +1 -1
  227. package/resources/sales/index.js +15 -9
  228. package/resources/sales/index.js.map +1 -1
  229. package/resources/sales/index.mjs +3 -0
  230. package/resources/sales/index.mjs.map +1 -1
  231. package/resources/sales/order-discounts/actions.d.mts +85 -0
  232. package/resources/sales/order-discounts/actions.d.mts.map +1 -0
  233. package/resources/sales/order-discounts/actions.d.ts +85 -0
  234. package/resources/sales/order-discounts/actions.d.ts.map +1 -0
  235. package/resources/sales/order-discounts/actions.js +35 -0
  236. package/resources/sales/order-discounts/actions.js.map +1 -0
  237. package/resources/sales/order-discounts/actions.mjs +31 -0
  238. package/resources/sales/order-discounts/actions.mjs.map +1 -0
  239. package/resources/sales/order-discounts/index.d.mts +3 -0
  240. package/resources/sales/order-discounts/index.d.mts.map +1 -0
  241. package/resources/sales/order-discounts/index.d.ts +3 -0
  242. package/resources/sales/order-discounts/index.d.ts.map +1 -0
  243. package/resources/sales/order-discounts/index.js +9 -0
  244. package/resources/sales/order-discounts/index.js.map +1 -0
  245. package/resources/sales/order-discounts/index.mjs +4 -0
  246. package/resources/sales/order-discounts/index.mjs.map +1 -0
  247. package/resources/sales/order-discounts/order-discounts.d.mts +365 -0
  248. package/resources/sales/order-discounts/order-discounts.d.mts.map +1 -0
  249. package/resources/sales/order-discounts/order-discounts.d.ts +365 -0
  250. package/resources/sales/order-discounts/order-discounts.d.ts.map +1 -0
  251. package/resources/sales/order-discounts/order-discounts.js +125 -0
  252. package/resources/sales/order-discounts/order-discounts.js.map +1 -0
  253. package/resources/sales/order-discounts/order-discounts.mjs +120 -0
  254. package/resources/sales/order-discounts/order-discounts.mjs.map +1 -0
  255. package/resources/sales/order-discounts.d.mts +2 -0
  256. package/resources/sales/order-discounts.d.mts.map +1 -0
  257. package/resources/sales/order-discounts.d.ts +2 -0
  258. package/resources/sales/order-discounts.d.ts.map +1 -0
  259. package/resources/sales/order-discounts.js +6 -0
  260. package/resources/sales/order-discounts.js.map +1 -0
  261. package/resources/sales/order-discounts.mjs +3 -0
  262. package/resources/sales/order-discounts.mjs.map +1 -0
  263. package/resources/sales/priorities.d.mts +4 -44
  264. package/resources/sales/priorities.d.mts.map +1 -1
  265. package/resources/sales/priorities.d.ts +4 -44
  266. package/resources/sales/priorities.d.ts.map +1 -1
  267. package/resources/sales/priorities.js.map +1 -1
  268. package/resources/sales/priorities.mjs.map +1 -1
  269. package/resources/sales/sales-orders/index.d.mts +1 -1
  270. package/resources/sales/sales-orders/index.d.mts.map +1 -1
  271. package/resources/sales/sales-orders/index.d.ts +1 -1
  272. package/resources/sales/sales-orders/index.d.ts.map +1 -1
  273. package/resources/sales/sales-orders/index.js.map +1 -1
  274. package/resources/sales/sales-orders/index.mjs.map +1 -1
  275. package/resources/sales/sales-orders/lines/lines.d.mts +2 -2
  276. package/resources/sales/sales-orders/lines/lines.d.mts.map +1 -1
  277. package/resources/sales/sales-orders/lines/lines.d.ts +2 -2
  278. package/resources/sales/sales-orders/lines/lines.d.ts.map +1 -1
  279. package/resources/sales/sales-orders/sales-orders.d.mts +10 -69
  280. package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
  281. package/resources/sales/sales-orders/sales-orders.d.ts +10 -69
  282. package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
  283. package/resources/sales/sales-orders/sales-orders.js.map +1 -1
  284. package/resources/sales/sales-orders/sales-orders.mjs.map +1 -1
  285. package/resources/sales/sales.d.mts +18 -6
  286. package/resources/sales/sales.d.mts.map +1 -1
  287. package/resources/sales/sales.d.ts +18 -6
  288. package/resources/sales/sales.d.ts.map +1 -1
  289. package/resources/sales/sales.js +12 -0
  290. package/resources/sales/sales.js.map +1 -1
  291. package/resources/sales/sales.mjs +12 -0
  292. package/resources/sales/sales.mjs.map +1 -1
  293. package/resources/sales/volume-discounts.d.mts +684 -0
  294. package/resources/sales/volume-discounts.d.mts.map +1 -0
  295. package/resources/sales/volume-discounts.d.ts +684 -0
  296. package/resources/sales/volume-discounts.d.ts.map +1 -0
  297. package/resources/sales/volume-discounts.js +152 -0
  298. package/resources/sales/volume-discounts.js.map +1 -0
  299. package/resources/sales/volume-discounts.mjs +148 -0
  300. package/resources/sales/volume-discounts.mjs.map +1 -0
  301. package/src/client.ts +1 -1
  302. package/src/resources/catalog/item-categories/actions.ts +15 -3
  303. package/src/resources/catalog/materials/actions.ts +14 -3
  304. package/src/resources/catalog/parts/actions.ts +14 -3
  305. package/src/resources/catalog/product-lines/actions.ts +15 -3
  306. package/src/resources/catalog/products/actions.ts +14 -3
  307. package/src/resources/catalog/properties/actions.ts +15 -4
  308. package/src/resources/catalog/unit-groups/actions.ts +14 -3
  309. package/src/resources/catalog/units/actions.ts +15 -3
  310. package/src/resources/core/analytics.ts +231 -0
  311. package/src/resources/core/audit-events.ts +16 -0
  312. package/src/resources/core/core.ts +30 -2
  313. package/src/resources/core/index.ts +7 -1
  314. package/src/resources/core/jobs.ts +422 -67
  315. package/src/resources/finance/payment-terms.ts +8 -5
  316. package/src/resources/identity/account-users/account-users.ts +44 -0
  317. package/src/resources/messaging/blocks.ts +9 -0
  318. package/src/resources/messaging/conversations/conversations.ts +12 -0
  319. package/src/resources/messaging/conversations/links.ts +8 -0
  320. package/src/resources/messaging/conversations/messages.ts +8 -0
  321. package/src/resources/messaging/notifications/notifications.ts +8 -0
  322. package/src/resources/operations/carriers/carriers.ts +5 -5
  323. package/src/resources/operations/carriers/service-levels.ts +5 -5
  324. package/src/resources/operations/locations/actions.ts +14 -3
  325. package/src/resources/operations/production-schedules/production-schedules.ts +5 -3
  326. package/src/resources/operations/shipments/actions.ts +3 -3
  327. package/src/resources/operations/shipping-terms.ts +8 -5
  328. package/src/resources/sales/account-prices/account-prices.ts +1191 -0
  329. package/src/resources/sales/account-prices/actions.ts +74 -0
  330. package/src/resources/sales/account-prices/index.ts +27 -0
  331. package/src/resources/sales/account-prices.ts +3 -0
  332. package/src/resources/sales/customers/actions.ts +6 -2
  333. package/src/resources/sales/customers/customers.ts +5 -658
  334. package/src/resources/sales/customers/index.ts +0 -11
  335. package/src/resources/sales/index.ts +50 -13
  336. package/src/resources/sales/order-discounts/actions.ts +102 -0
  337. package/src/resources/sales/order-discounts/index.ts +13 -0
  338. package/src/resources/sales/order-discounts/order-discounts.ts +442 -0
  339. package/src/resources/sales/order-discounts.ts +3 -0
  340. package/src/resources/sales/priorities.ts +3 -51
  341. package/src/resources/sales/sales-orders/index.ts +0 -1
  342. package/src/resources/sales/sales-orders/lines/lines.ts +2 -2
  343. package/src/resources/sales/sales-orders/sales-orders.ts +9 -79
  344. package/src/resources/sales/sales.ts +113 -26
  345. package/src/resources/sales/volume-discounts.ts +813 -0
  346. package/src/version.ts +1 -1
  347. package/version.d.mts +1 -1
  348. package/version.d.ts +1 -1
  349. package/version.js +1 -1
  350. package/version.mjs +1 -1
@@ -0,0 +1,813 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as AccountGroupsAPI from './account-groups';
5
+ import * as APIKeysAPI from '../auth/api-keys/api-keys';
6
+ import * as ItemCategoriesAPI from '../catalog/item-categories/item-categories';
7
+ import * as ProductLinesAPI from '../catalog/product-lines/product-lines';
8
+ import * as PropertiesAPI from '../catalog/properties/properties';
9
+ import * as UnitsAPI from '../catalog/units/units';
10
+ import { APIPromise } from '../../core/api-promise';
11
+ import { RequestOptions } from '../../internal/request-options';
12
+ import { path } from '../../internal/utils/path';
13
+
14
+ /**
15
+ * List and manage volume discounts.
16
+ */
17
+ export class VolumeDiscounts extends APIResource {
18
+ /**
19
+ * Returns a paginated list of volume discounts, newest first.
20
+ *
21
+ * The search term matches the discount name, the name of a customer group it is
22
+ * scoped to, or the name of a product line it is scoped to. Customer portal users
23
+ * see only discounts with no customer-group restriction plus those scoped to a
24
+ * group their own account belongs to.
25
+ *
26
+ * This endpoint requires the permissions: `discounts:read`, `customers:read`,
27
+ * `suppliers:read`.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const listVolumeDiscount =
32
+ * await client.sales.volumeDiscounts.list();
33
+ * ```
34
+ */
35
+ list(
36
+ query: VolumeDiscountListParams | null | undefined = {},
37
+ options?: RequestOptions,
38
+ ): APIPromise<ListVolumeDiscount> {
39
+ return this._client.get('/v1/sales/volume-discounts', { query, ...options });
40
+ }
41
+
42
+ /**
43
+ * Returns a volume discount by ID.
44
+ *
45
+ * This endpoint requires the permissions: `discounts:read`, `customers:read`,
46
+ * `suppliers:read`.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * const volumeDiscount =
51
+ * await client.sales.volumeDiscounts.retrieve(
52
+ * 'quds_bn7hto9s10pp',
53
+ * );
54
+ * ```
55
+ */
56
+ retrieve(
57
+ id: string,
58
+ query: VolumeDiscountRetrieveParams | null | undefined = {},
59
+ options?: RequestOptions,
60
+ ): APIPromise<VolumeDiscount> {
61
+ return this._client.get(path`/v1/sales/volume-discounts/${id}`, { query, ...options });
62
+ }
63
+
64
+ /**
65
+ * Creates a volume discount with its tiers and scoping associations.
66
+ *
67
+ * The discount name must be unique within the account; creating a discount with an
68
+ * existing name returns a conflict error.
69
+ *
70
+ * Each scoping list narrows the order lines the discount applies to, and an empty
71
+ * list places no restriction on that dimension. Because tier thresholds are
72
+ * compared against quantities converted into `unit_ids`, a discount created
73
+ * without any units never reaches a threshold above zero.
74
+ *
75
+ * This endpoint requires the permission: `discounts:create`.
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * const volumeDiscount =
80
+ * await client.sales.volumeDiscounts.create({
81
+ * name: 'Bulk Order Discount',
82
+ * tiers: [
83
+ * {
84
+ * name: '100+ Units',
85
+ * discount_percentage:
86
+ * '5.000000000000000000000000000000',
87
+ * threshold: '100.000000000000000000000000000000',
88
+ * },
89
+ * ],
90
+ * });
91
+ * ```
92
+ */
93
+ create(params: VolumeDiscountCreateParams, options?: RequestOptions): APIPromise<VolumeDiscount> {
94
+ const { include, ...body } = params;
95
+ return this._client.post('/v1/sales/volume-discounts', { query: { include }, body, ...options });
96
+ }
97
+
98
+ /**
99
+ * Partially updates a volume discount.
100
+ *
101
+ * The tier and association lists are only applied when their corresponding `has_*`
102
+ * flag is `true`, in which case they replace the existing set entirely. Tiers use
103
+ * upsert semantics: tiers with an `id` are updated, tiers without one are created,
104
+ * and existing tiers omitted from the list are deleted.
105
+ *
106
+ * The name must remain unique within the account; reusing another discount's name
107
+ * returns a conflict error. Order lines that have already been priced keep the
108
+ * unit price they were given; the revised discount applies to lines priced after
109
+ * the change.
110
+ *
111
+ * This endpoint requires the permission: `discounts:update`.
112
+ *
113
+ * @example
114
+ * ```ts
115
+ * const volumeDiscount =
116
+ * await client.sales.volumeDiscounts.update(
117
+ * 'quds_bn7hto9s10pp',
118
+ * {
119
+ * has_attributes: true,
120
+ * has_categories: true,
121
+ * has_customer_groups: true,
122
+ * has_product_lines: true,
123
+ * has_tiers: true,
124
+ * has_units: true,
125
+ * name: 'Updated Bulk Discount',
126
+ * tiers: [
127
+ * {
128
+ * name: '50+ Units',
129
+ * discount_percentage:
130
+ * '10.000000000000000000000000000000',
131
+ * threshold: '50.000000000000000000000000000000',
132
+ * },
133
+ * ],
134
+ * },
135
+ * );
136
+ * ```
137
+ */
138
+ update(
139
+ id: string,
140
+ params: VolumeDiscountUpdateParams,
141
+ options?: RequestOptions,
142
+ ): APIPromise<VolumeDiscount> {
143
+ const { include, ...body } = params;
144
+ return this._client.patch(path`/v1/sales/volume-discounts/${id}`, {
145
+ query: { include },
146
+ body,
147
+ ...options,
148
+ });
149
+ }
150
+
151
+ /**
152
+ * Deletes a volume discount along with its tiers and scoping associations.
153
+ *
154
+ * Deletion is permanent; further requests against the deleted ID return an error.
155
+ *
156
+ * Order lines that have already been priced keep the unit price they were given;
157
+ * only lines priced after the deletion lose the discount.
158
+ *
159
+ * This endpoint requires the permission: `discounts:delete`.
160
+ *
161
+ * @example
162
+ * ```ts
163
+ * const volumeDiscount =
164
+ * await client.sales.volumeDiscounts.delete(
165
+ * 'quds_bn7hto9s10pp',
166
+ * );
167
+ * ```
168
+ */
169
+ delete(id: string, options?: RequestOptions): APIPromise<VolumeDiscountDeleteResponse> {
170
+ return this._client.delete(path`/v1/sales/volume-discounts/${id}`, options);
171
+ }
172
+ }
173
+
174
+ /**
175
+ * Request to create a volume discount.
176
+ */
177
+ export interface CreateVolumeDiscountRequest {
178
+ /**
179
+ * Display name of the volume discount.
180
+ *
181
+ * Must be unique within the account.
182
+ */
183
+ name: string;
184
+
185
+ /**
186
+ * Tiers for this volume discount.
187
+ */
188
+ tiers: Array<CreateVolumeDiscountTierInput>;
189
+
190
+ /**
191
+ * Attribute IDs to scope the discount to.
192
+ *
193
+ * When set, an item qualifies only if it has every listed attribute.
194
+ */
195
+ attribute_ids?: Array<string>;
196
+
197
+ /**
198
+ * Item category IDs to scope the discount to.
199
+ *
200
+ * When empty, all categories qualify.
201
+ */
202
+ category_ids?: Array<string>;
203
+
204
+ /**
205
+ * Account group IDs to scope the discount to specific customer groups.
206
+ *
207
+ * When empty, all customers qualify. A discount scoped to a group the buyer
208
+ * belongs to is preferred over an unscoped one when both could apply to the same
209
+ * order line.
210
+ */
211
+ customer_group_ids?: Array<string>;
212
+
213
+ /**
214
+ * Product line IDs to scope the discount to.
215
+ *
216
+ * When empty, all product lines qualify.
217
+ */
218
+ product_line_ids?: Array<string>;
219
+
220
+ /**
221
+ * IDs of the units that ordered quantities are measured in when evaluating tier
222
+ * thresholds.
223
+ *
224
+ * Quantities ordered in other units are converted into one of these before being
225
+ * compared against a threshold. Leaving this empty makes the discount inert: the
226
+ * quantity always evaluates to zero, so no threshold above zero is ever reached.
227
+ */
228
+ unit_ids?: Array<string>;
229
+ }
230
+
231
+ /**
232
+ * Volume discount tier to create.
233
+ */
234
+ export interface CreateVolumeDiscountTierInput {
235
+ /**
236
+ * Fraction of the price taken off once the threshold is met, as a decimal string.
237
+ *
238
+ * This is a multiplier, not a whole percent: `0.05` takes 5% off. When an order
239
+ * meets several tiers of the same discount, their reductions compound.
240
+ */
241
+ discount_percentage: string;
242
+
243
+ /**
244
+ * Display name of the tier.
245
+ */
246
+ name: string;
247
+
248
+ /**
249
+ * Minimum ordered quantity at which this tier's discount begins to apply, as a
250
+ * decimal string.
251
+ *
252
+ * The quantity compared against the threshold is the total across every line on
253
+ * the order that falls within the discount's scope, converted into one of the
254
+ * discount's units.
255
+ */
256
+ threshold: string;
257
+
258
+ /**
259
+ * ID of another tier that this tier follows.
260
+ *
261
+ * Tier IDs are assigned when the discount is created, so a tier created in this
262
+ * same request cannot be referenced here. The link is stored with the tier but
263
+ * does not affect pricing: every tier whose threshold is met applies, regardless
264
+ * of any parent.
265
+ */
266
+ parent_tier_id?: string;
267
+ }
268
+
269
+ /**
270
+ * A single page of resources, together with the metadata needed to page through
271
+ * the rest of the result set.
272
+ */
273
+ export interface ListVolumeDiscount {
274
+ /**
275
+ * Resources in this page.
276
+ */
277
+ data: Array<VolumeDiscount>;
278
+
279
+ /**
280
+ * Resource type identifier.
281
+ */
282
+ object: 'list';
283
+
284
+ /**
285
+ * PageInfo describes where the current page sits within a paginated result set and
286
+ * how to move to the adjacent pages.
287
+ *
288
+ * Page a list by following the URLs below rather than assembling cursors yourself.
289
+ * For a top-level list endpoint the URL repeats the original request's query
290
+ * string with only the cursor swapped, so following it preserves the same filters,
291
+ * search term, and page size.
292
+ */
293
+ page_info: APIKeysAPI.PageInfo;
294
+ }
295
+
296
+ /**
297
+ * A single page of resources, together with the metadata needed to page through
298
+ * the rest of the result set.
299
+ */
300
+ export interface ListVolumeDiscountTier {
301
+ /**
302
+ * Resources in this page.
303
+ */
304
+ data: Array<VolumeDiscountTier>;
305
+
306
+ /**
307
+ * Resource type identifier.
308
+ */
309
+ object: 'list';
310
+
311
+ /**
312
+ * PageInfo describes where the current page sits within a paginated result set and
313
+ * how to move to the adjacent pages.
314
+ *
315
+ * Page a list by following the URLs below rather than assembling cursors yourself.
316
+ * For a top-level list endpoint the URL repeats the original request's query
317
+ * string with only the cursor swapped, so following it preserves the same filters,
318
+ * search term, and page size.
319
+ */
320
+ page_info: APIKeysAPI.PageInfo;
321
+ }
322
+
323
+ /**
324
+ * Request to partially update a volume discount.
325
+ */
326
+ export interface UpdateVolumeDiscountRequest {
327
+ /**
328
+ * Whether to apply the `attribute_ids` field; when `false`, it is ignored.
329
+ */
330
+ has_attributes: boolean;
331
+
332
+ /**
333
+ * Whether to apply the `category_ids` field; when `false`, it is ignored.
334
+ */
335
+ has_categories: boolean;
336
+
337
+ /**
338
+ * Whether to apply the `customer_group_ids` field; when `false`, it is ignored.
339
+ */
340
+ has_customer_groups: boolean;
341
+
342
+ /**
343
+ * Whether to apply the `product_line_ids` field; when `false`, it is ignored.
344
+ */
345
+ has_product_lines: boolean;
346
+
347
+ /**
348
+ * Whether to apply the `tiers` field.
349
+ *
350
+ * When `true`, the discount's tiers are replaced with the contents of `tiers` (an
351
+ * empty list deletes all tiers). When `false`, `tiers` is ignored.
352
+ */
353
+ has_tiers: boolean;
354
+
355
+ /**
356
+ * Whether to apply the `unit_ids` field; when `false`, it is ignored.
357
+ */
358
+ has_units: boolean;
359
+
360
+ /**
361
+ * Attribute IDs to set.
362
+ *
363
+ * Only applied when `has_attributes` is `true`, in which case they replace the
364
+ * existing set entirely.
365
+ */
366
+ attribute_ids?: Array<string>;
367
+
368
+ /**
369
+ * Item category IDs to set.
370
+ *
371
+ * Only applied when `has_categories` is `true`, in which case they replace the
372
+ * existing set entirely.
373
+ */
374
+ category_ids?: Array<string>;
375
+
376
+ /**
377
+ * Account group IDs to set as customer groups.
378
+ *
379
+ * Only applied when `has_customer_groups` is `true`, in which case they replace
380
+ * the existing set entirely.
381
+ */
382
+ customer_group_ids?: Array<string>;
383
+
384
+ /**
385
+ * Display name of the volume discount.
386
+ *
387
+ * Must be unique within the account.
388
+ */
389
+ name?: string;
390
+
391
+ /**
392
+ * Product line IDs to set.
393
+ *
394
+ * Only applied when `has_product_lines` is `true`, in which case they replace the
395
+ * existing set entirely.
396
+ */
397
+ product_line_ids?: Array<string>;
398
+
399
+ /**
400
+ * The full set of tiers for this discount.
401
+ *
402
+ * Only applied when `has_tiers` is `true`. Tiers with an `id` are updated, tiers
403
+ * without an `id` are created, and existing tiers not present in the list are
404
+ * deleted.
405
+ */
406
+ tiers?: Array<UpdateVolumeDiscountTierInput>;
407
+
408
+ /**
409
+ * IDs of the units to set as acceptable units.
410
+ *
411
+ * Only applied when `has_units` is `true`, in which case they replace the existing
412
+ * set entirely. Clearing every unit makes the discount inert, since ordered
413
+ * quantity then always evaluates to zero.
414
+ */
415
+ unit_ids?: Array<string>;
416
+ }
417
+
418
+ /**
419
+ * Volume discount tier to upsert.
420
+ *
421
+ * Each entry is written as a whole: send every value you want the tier to keep,
422
+ * since values left out are not carried over from the existing tier.
423
+ */
424
+ export interface UpdateVolumeDiscountTierInput {
425
+ /**
426
+ * ID of an existing tier to update.
427
+ *
428
+ * Omit to create a new tier.
429
+ */
430
+ id?: string;
431
+
432
+ /**
433
+ * Fraction of the price taken off once the threshold is met, as a decimal string.
434
+ *
435
+ * This is a multiplier, not a whole percent: `0.05` takes 5% off. When an order
436
+ * meets several tiers of the same discount, their reductions compound.
437
+ */
438
+ discount_percentage?: string;
439
+
440
+ /**
441
+ * Display name of the tier.
442
+ */
443
+ name?: string;
444
+
445
+ /**
446
+ * ID of another tier in this discount that this tier follows.
447
+ *
448
+ * The link is stored with the tier but does not affect pricing. Omitting it when
449
+ * updating an existing tier clears the link.
450
+ */
451
+ parent_tier_id?: string;
452
+
453
+ /**
454
+ * Minimum ordered quantity at which this tier's discount begins to apply, as a
455
+ * decimal string.
456
+ *
457
+ * The quantity compared against the threshold is the total across every line on
458
+ * the order that falls within the discount's scope, converted into one of the
459
+ * discount's units.
460
+ */
461
+ threshold?: string;
462
+ }
463
+
464
+ /**
465
+ * A quantity-based discount with tiered percentage rates.
466
+ *
467
+ * A volume discount reduces the price once the ordered quantity reaches a tier's
468
+ * threshold. The customer group associations scope which customers qualify, and
469
+ * the product line, category, and attribute associations scope which order lines
470
+ * qualify; an empty list on any of them means no restriction on that dimension.
471
+ * Acceptable units are not a scope: they are the units the ordered quantity is
472
+ * measured in, and a discount with none of them never reaches a threshold above
473
+ * zero.
474
+ *
475
+ * At most one volume discount is applied to a given order line: among the
476
+ * discounts whose scope the line matches and whose thresholds are met, those
477
+ * scoped to a customer group the buyer belongs to take precedence. An account
478
+ * price for the same line overrides the discounted price entirely.
479
+ */
480
+ export interface VolumeDiscount {
481
+ /**
482
+ * Volume discount ID.
483
+ */
484
+ id: string;
485
+
486
+ /**
487
+ * A single page of resources, together with the metadata needed to page through
488
+ * the rest of the result set.
489
+ */
490
+ acceptable_units: UnitsAPI.ListUnit | null;
491
+
492
+ /**
493
+ * A single page of resources, together with the metadata needed to page through
494
+ * the rest of the result set.
495
+ */
496
+ attributes: PropertiesAPI.ListAttribute | null;
497
+
498
+ /**
499
+ * A single page of resources, together with the metadata needed to page through
500
+ * the rest of the result set.
501
+ */
502
+ categories: ItemCategoriesAPI.ListItemCategory | null;
503
+
504
+ /**
505
+ * Creation timestamp.
506
+ */
507
+ created_at: string;
508
+
509
+ /**
510
+ * A single page of resources, together with the metadata needed to page through
511
+ * the rest of the result set.
512
+ */
513
+ customer_groups: AccountGroupsAPI.ListAccountGroup | null;
514
+
515
+ /**
516
+ * Display name of the volume discount.
517
+ *
518
+ * Must be unique within the account.
519
+ */
520
+ name: string;
521
+
522
+ /**
523
+ * Resource type identifier.
524
+ */
525
+ object: 'volume_discount';
526
+
527
+ /**
528
+ * A single page of resources, together with the metadata needed to page through
529
+ * the rest of the result set.
530
+ */
531
+ product_lines: ProductLinesAPI.ListProductLine | null;
532
+
533
+ /**
534
+ * A single page of resources, together with the metadata needed to page through
535
+ * the rest of the result set.
536
+ */
537
+ tiers: ListVolumeDiscountTier | null;
538
+
539
+ /**
540
+ * Last updated timestamp.
541
+ */
542
+ updated_at: string;
543
+ }
544
+
545
+ /**
546
+ * A quantity threshold within a volume discount, and the reduction that applies at
547
+ * or above it.
548
+ */
549
+ export interface VolumeDiscountTier {
550
+ /**
551
+ * Volume discount tier ID.
552
+ */
553
+ id: string;
554
+
555
+ /**
556
+ * Creation timestamp.
557
+ */
558
+ created_at: string;
559
+
560
+ /**
561
+ * Fraction of the price taken off once the threshold is met, as a decimal string.
562
+ *
563
+ * This is a multiplier, not a whole percent: `0.05` takes 5% off. When an order
564
+ * meets several tiers of the same discount, their reductions compound: meeting a
565
+ * `0.1` tier and a `0.2` tier multiplies the price by `0.9 × 0.8`, a 28% reduction
566
+ * overall.
567
+ */
568
+ discount_percentage: string;
569
+
570
+ /**
571
+ * Display name of the tier.
572
+ */
573
+ name: string;
574
+
575
+ /**
576
+ * Resource type identifier.
577
+ */
578
+ object: 'volume_discount_tier';
579
+
580
+ /**
581
+ * Minimum ordered quantity at which this tier's discount begins to apply, as a
582
+ * decimal string.
583
+ *
584
+ * The quantity compared against the threshold is the total across every line on
585
+ * the order that falls within the discount's scope, converted into one of the
586
+ * discount's acceptable units — not the quantity of a single line.
587
+ */
588
+ threshold: string;
589
+
590
+ /**
591
+ * Last updated timestamp.
592
+ */
593
+ updated_at: string;
594
+ }
595
+
596
+ export interface VolumeDiscountDeleteResponse {}
597
+
598
+ export interface VolumeDiscountListParams {
599
+ /**
600
+ * Opaque cursor token identifying where the page of results starts.
601
+ *
602
+ * Use the `cursor` value embedded in a previous response's `next_page_url` or
603
+ * `previous_page_url` to fetch the adjacent page. Omit to start from the first
604
+ * page.
605
+ */
606
+ cursor?: string;
607
+
608
+ /**
609
+ * Sub-objects to expand in the response. When omitted, sub-objects are returned as
610
+ * `null`.
611
+ */
612
+ include?: Array<'customer_groups' | 'product_lines' | 'categories' | 'attributes' | 'acceptable_units'>;
613
+
614
+ /**
615
+ * Maximum number of results to return in a single page.
616
+ */
617
+ limit?: number;
618
+
619
+ /**
620
+ * Free-text search term used to filter results.
621
+ *
622
+ * Which fields are matched against the term varies by endpoint.
623
+ */
624
+ q?: string;
625
+ }
626
+
627
+ export interface VolumeDiscountRetrieveParams {
628
+ /**
629
+ * Sub-objects to expand in the response. When omitted, sub-objects are returned as
630
+ * `null`.
631
+ */
632
+ include?: Array<'customer_groups' | 'product_lines' | 'categories' | 'attributes' | 'acceptable_units'>;
633
+ }
634
+
635
+ export interface VolumeDiscountCreateParams {
636
+ /**
637
+ * Body param: Display name of the volume discount.
638
+ *
639
+ * Must be unique within the account.
640
+ */
641
+ name: string;
642
+
643
+ /**
644
+ * Body param: Tiers for this volume discount.
645
+ */
646
+ tiers: Array<CreateVolumeDiscountTierInput>;
647
+
648
+ /**
649
+ * Query param: Sub-objects to expand in the response. When omitted, sub-objects
650
+ * are returned as `null`.
651
+ */
652
+ include?: Array<'customer_groups' | 'product_lines' | 'categories' | 'attributes' | 'acceptable_units'>;
653
+
654
+ /**
655
+ * Body param: Attribute IDs to scope the discount to.
656
+ *
657
+ * When set, an item qualifies only if it has every listed attribute.
658
+ */
659
+ attribute_ids?: Array<string>;
660
+
661
+ /**
662
+ * Body param: Item category IDs to scope the discount to.
663
+ *
664
+ * When empty, all categories qualify.
665
+ */
666
+ category_ids?: Array<string>;
667
+
668
+ /**
669
+ * Body param: Account group IDs to scope the discount to specific customer groups.
670
+ *
671
+ * When empty, all customers qualify. A discount scoped to a group the buyer
672
+ * belongs to is preferred over an unscoped one when both could apply to the same
673
+ * order line.
674
+ */
675
+ customer_group_ids?: Array<string>;
676
+
677
+ /**
678
+ * Body param: Product line IDs to scope the discount to.
679
+ *
680
+ * When empty, all product lines qualify.
681
+ */
682
+ product_line_ids?: Array<string>;
683
+
684
+ /**
685
+ * Body param: IDs of the units that ordered quantities are measured in when
686
+ * evaluating tier thresholds.
687
+ *
688
+ * Quantities ordered in other units are converted into one of these before being
689
+ * compared against a threshold. Leaving this empty makes the discount inert: the
690
+ * quantity always evaluates to zero, so no threshold above zero is ever reached.
691
+ */
692
+ unit_ids?: Array<string>;
693
+ }
694
+
695
+ export interface VolumeDiscountUpdateParams {
696
+ /**
697
+ * Body param: Whether to apply the `attribute_ids` field; when `false`, it is
698
+ * ignored.
699
+ */
700
+ has_attributes: boolean;
701
+
702
+ /**
703
+ * Body param: Whether to apply the `category_ids` field; when `false`, it is
704
+ * ignored.
705
+ */
706
+ has_categories: boolean;
707
+
708
+ /**
709
+ * Body param: Whether to apply the `customer_group_ids` field; when `false`, it is
710
+ * ignored.
711
+ */
712
+ has_customer_groups: boolean;
713
+
714
+ /**
715
+ * Body param: Whether to apply the `product_line_ids` field; when `false`, it is
716
+ * ignored.
717
+ */
718
+ has_product_lines: boolean;
719
+
720
+ /**
721
+ * Body param: Whether to apply the `tiers` field.
722
+ *
723
+ * When `true`, the discount's tiers are replaced with the contents of `tiers` (an
724
+ * empty list deletes all tiers). When `false`, `tiers` is ignored.
725
+ */
726
+ has_tiers: boolean;
727
+
728
+ /**
729
+ * Body param: Whether to apply the `unit_ids` field; when `false`, it is ignored.
730
+ */
731
+ has_units: boolean;
732
+
733
+ /**
734
+ * Query param: Sub-objects to expand in the response. When omitted, sub-objects
735
+ * are returned as `null`.
736
+ */
737
+ include?: Array<'customer_groups' | 'product_lines' | 'categories' | 'attributes' | 'acceptable_units'>;
738
+
739
+ /**
740
+ * Body param: Attribute IDs to set.
741
+ *
742
+ * Only applied when `has_attributes` is `true`, in which case they replace the
743
+ * existing set entirely.
744
+ */
745
+ attribute_ids?: Array<string>;
746
+
747
+ /**
748
+ * Body param: Item category IDs to set.
749
+ *
750
+ * Only applied when `has_categories` is `true`, in which case they replace the
751
+ * existing set entirely.
752
+ */
753
+ category_ids?: Array<string>;
754
+
755
+ /**
756
+ * Body param: Account group IDs to set as customer groups.
757
+ *
758
+ * Only applied when `has_customer_groups` is `true`, in which case they replace
759
+ * the existing set entirely.
760
+ */
761
+ customer_group_ids?: Array<string>;
762
+
763
+ /**
764
+ * Body param: Display name of the volume discount.
765
+ *
766
+ * Must be unique within the account.
767
+ */
768
+ name?: string;
769
+
770
+ /**
771
+ * Body param: Product line IDs to set.
772
+ *
773
+ * Only applied when `has_product_lines` is `true`, in which case they replace the
774
+ * existing set entirely.
775
+ */
776
+ product_line_ids?: Array<string>;
777
+
778
+ /**
779
+ * Body param: The full set of tiers for this discount.
780
+ *
781
+ * Only applied when `has_tiers` is `true`. Tiers with an `id` are updated, tiers
782
+ * without an `id` are created, and existing tiers not present in the list are
783
+ * deleted.
784
+ */
785
+ tiers?: Array<UpdateVolumeDiscountTierInput>;
786
+
787
+ /**
788
+ * Body param: IDs of the units to set as acceptable units.
789
+ *
790
+ * Only applied when `has_units` is `true`, in which case they replace the existing
791
+ * set entirely. Clearing every unit makes the discount inert, since ordered
792
+ * quantity then always evaluates to zero.
793
+ */
794
+ unit_ids?: Array<string>;
795
+ }
796
+
797
+ export declare namespace VolumeDiscounts {
798
+ export {
799
+ type CreateVolumeDiscountRequest as CreateVolumeDiscountRequest,
800
+ type CreateVolumeDiscountTierInput as CreateVolumeDiscountTierInput,
801
+ type ListVolumeDiscount as ListVolumeDiscount,
802
+ type ListVolumeDiscountTier as ListVolumeDiscountTier,
803
+ type UpdateVolumeDiscountRequest as UpdateVolumeDiscountRequest,
804
+ type UpdateVolumeDiscountTierInput as UpdateVolumeDiscountTierInput,
805
+ type VolumeDiscount as VolumeDiscount,
806
+ type VolumeDiscountTier as VolumeDiscountTier,
807
+ type VolumeDiscountDeleteResponse as VolumeDiscountDeleteResponse,
808
+ type VolumeDiscountListParams as VolumeDiscountListParams,
809
+ type VolumeDiscountRetrieveParams as VolumeDiscountRetrieveParams,
810
+ type VolumeDiscountCreateParams as VolumeDiscountCreateParams,
811
+ type VolumeDiscountUpdateParams as VolumeDiscountUpdateParams,
812
+ };
813
+ }