conductor-node 11.10.0 → 12.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (510) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/LICENSE +201 -21
  3. package/README.md +330 -63
  4. package/_shims/MultipartBody.d.ts +9 -0
  5. package/_shims/MultipartBody.d.ts.map +1 -0
  6. package/_shims/MultipartBody.js +16 -0
  7. package/_shims/MultipartBody.js.map +1 -0
  8. package/_shims/MultipartBody.mjs +12 -0
  9. package/_shims/MultipartBody.mjs.map +1 -0
  10. package/_shims/README.md +46 -0
  11. package/_shims/auto/runtime-bun.d.ts +5 -0
  12. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  13. package/_shims/auto/runtime-bun.js +21 -0
  14. package/_shims/auto/runtime-bun.js.map +1 -0
  15. package/_shims/auto/runtime-bun.mjs +2 -0
  16. package/_shims/auto/runtime-bun.mjs.map +1 -0
  17. package/_shims/auto/runtime-node.d.ts +5 -0
  18. package/_shims/auto/runtime-node.d.ts.map +1 -0
  19. package/_shims/auto/runtime-node.js +21 -0
  20. package/_shims/auto/runtime-node.js.map +1 -0
  21. package/_shims/auto/runtime-node.mjs +2 -0
  22. package/_shims/auto/runtime-node.mjs.map +1 -0
  23. package/_shims/auto/runtime.d.ts +5 -0
  24. package/_shims/auto/runtime.d.ts.map +1 -0
  25. package/_shims/auto/runtime.js +21 -0
  26. package/_shims/auto/runtime.js.map +1 -0
  27. package/_shims/auto/runtime.mjs +2 -0
  28. package/_shims/auto/runtime.mjs.map +1 -0
  29. package/_shims/auto/types-node.d.ts +5 -0
  30. package/_shims/auto/types-node.d.ts.map +1 -0
  31. package/_shims/auto/types-node.js +21 -0
  32. package/_shims/auto/types-node.js.map +1 -0
  33. package/_shims/auto/types-node.mjs +2 -0
  34. package/_shims/auto/types-node.mjs.map +1 -0
  35. package/_shims/auto/types.d.ts +101 -0
  36. package/_shims/auto/types.js +3 -0
  37. package/_shims/auto/types.mjs +3 -0
  38. package/_shims/bun-runtime.d.ts +6 -0
  39. package/_shims/bun-runtime.d.ts.map +1 -0
  40. package/_shims/bun-runtime.js +14 -0
  41. package/_shims/bun-runtime.js.map +1 -0
  42. package/_shims/bun-runtime.mjs +10 -0
  43. package/_shims/bun-runtime.mjs.map +1 -0
  44. package/_shims/index.d.ts +81 -0
  45. package/_shims/index.js +13 -0
  46. package/_shims/index.mjs +7 -0
  47. package/_shims/manual-types.d.ts +12 -0
  48. package/_shims/manual-types.js +3 -0
  49. package/_shims/manual-types.mjs +3 -0
  50. package/_shims/node-runtime.d.ts +3 -0
  51. package/_shims/node-runtime.d.ts.map +1 -0
  52. package/_shims/node-runtime.js +89 -0
  53. package/_shims/node-runtime.js.map +1 -0
  54. package/_shims/node-runtime.mjs +56 -0
  55. package/_shims/node-runtime.mjs.map +1 -0
  56. package/_shims/node-types.d.ts +42 -0
  57. package/_shims/node-types.js +3 -0
  58. package/_shims/node-types.mjs +3 -0
  59. package/_shims/registry.d.ts +37 -0
  60. package/_shims/registry.d.ts.map +1 -0
  61. package/_shims/registry.js +41 -0
  62. package/_shims/registry.js.map +1 -0
  63. package/_shims/registry.mjs +37 -0
  64. package/_shims/registry.mjs.map +1 -0
  65. package/_shims/web-runtime.d.ts +5 -0
  66. package/_shims/web-runtime.d.ts.map +1 -0
  67. package/_shims/web-runtime.js +78 -0
  68. package/_shims/web-runtime.js.map +1 -0
  69. package/_shims/web-runtime.mjs +71 -0
  70. package/_shims/web-runtime.mjs.map +1 -0
  71. package/_shims/web-types.d.ts +83 -0
  72. package/_shims/web-types.js +3 -0
  73. package/_shims/web-types.mjs +3 -0
  74. package/core.d.ts +241 -0
  75. package/core.d.ts.map +1 -0
  76. package/core.js +914 -0
  77. package/core.js.map +1 -0
  78. package/core.mjs +882 -0
  79. package/core.mjs.map +1 -0
  80. package/error.d.ts +47 -0
  81. package/error.d.ts.map +1 -0
  82. package/error.js +113 -0
  83. package/error.js.map +1 -0
  84. package/error.mjs +97 -0
  85. package/error.mjs.map +1 -0
  86. package/index.d.mts +121 -0
  87. package/index.d.ts +121 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +133 -0
  90. package/index.js.map +1 -0
  91. package/index.mjs +90 -0
  92. package/index.mjs.map +1 -0
  93. package/internal/qs/formats.d.ts +6 -0
  94. package/internal/qs/formats.d.ts.map +1 -0
  95. package/internal/qs/formats.js +11 -0
  96. package/internal/qs/formats.js.map +1 -0
  97. package/internal/qs/formats.mjs +8 -0
  98. package/internal/qs/formats.mjs.map +1 -0
  99. package/internal/qs/index.d.ts +10 -0
  100. package/internal/qs/index.d.ts.map +1 -0
  101. package/internal/qs/index.js +14 -0
  102. package/internal/qs/index.js.map +1 -0
  103. package/internal/qs/index.mjs +10 -0
  104. package/internal/qs/index.mjs.map +1 -0
  105. package/internal/qs/stringify.d.ts +3 -0
  106. package/internal/qs/stringify.d.ts.map +1 -0
  107. package/internal/qs/stringify.js +280 -0
  108. package/internal/qs/stringify.js.map +1 -0
  109. package/internal/qs/stringify.mjs +276 -0
  110. package/internal/qs/stringify.mjs.map +1 -0
  111. package/internal/qs/types.d.ts +57 -0
  112. package/internal/qs/types.d.ts.map +1 -0
  113. package/{dist/src/resources → internal/qs}/types.js +1 -0
  114. package/internal/qs/types.js.map +1 -0
  115. package/internal/qs/types.mjs +2 -0
  116. package/internal/qs/types.mjs.map +1 -0
  117. package/internal/qs/utils.d.ts +14 -0
  118. package/internal/qs/utils.d.ts.map +1 -0
  119. package/internal/qs/utils.js +229 -0
  120. package/internal/qs/utils.js.map +1 -0
  121. package/internal/qs/utils.mjs +217 -0
  122. package/internal/qs/utils.mjs.map +1 -0
  123. package/package.json +111 -35
  124. package/pagination.d.ts +18 -0
  125. package/pagination.d.ts.map +1 -0
  126. package/pagination.js +40 -0
  127. package/pagination.js.map +1 -0
  128. package/pagination.mjs +36 -0
  129. package/pagination.mjs.map +1 -0
  130. package/resource.d.ts +6 -0
  131. package/resource.d.ts.map +1 -0
  132. package/resource.js +11 -0
  133. package/resource.js.map +1 -0
  134. package/resource.mjs +7 -0
  135. package/resource.mjs.map +1 -0
  136. package/resources/auth-sessions.d.ts +79 -0
  137. package/resources/auth-sessions.d.ts.map +1 -0
  138. package/resources/auth-sessions.js +23 -0
  139. package/resources/auth-sessions.js.map +1 -0
  140. package/resources/auth-sessions.mjs +19 -0
  141. package/resources/auth-sessions.mjs.map +1 -0
  142. package/resources/end-users.d.ts +154 -0
  143. package/resources/end-users.d.ts.map +1 -0
  144. package/resources/end-users.js +48 -0
  145. package/resources/end-users.js.map +1 -0
  146. package/resources/end-users.mjs +44 -0
  147. package/resources/end-users.mjs.map +1 -0
  148. package/resources/index.d.ts +4 -0
  149. package/resources/index.d.ts.map +1 -0
  150. package/resources/index.js +11 -0
  151. package/resources/index.js.map +1 -0
  152. package/resources/index.mjs +5 -0
  153. package/resources/index.mjs.map +1 -0
  154. package/resources/qbd/accounts.d.ts +579 -0
  155. package/resources/qbd/accounts.d.ts.map +1 -0
  156. package/resources/qbd/accounts.js +54 -0
  157. package/resources/qbd/accounts.js.map +1 -0
  158. package/resources/qbd/accounts.mjs +50 -0
  159. package/resources/qbd/accounts.mjs.map +1 -0
  160. package/resources/qbd/bill-check-payments.d.ts +831 -0
  161. package/resources/qbd/bill-check-payments.d.ts.map +1 -0
  162. package/resources/qbd/bill-check-payments.js +70 -0
  163. package/resources/qbd/bill-check-payments.js.map +1 -0
  164. package/resources/qbd/bill-check-payments.mjs +65 -0
  165. package/resources/qbd/bill-check-payments.mjs.map +1 -0
  166. package/resources/qbd/bill-credit-card-payments.d.ts +641 -0
  167. package/resources/qbd/bill-credit-card-payments.d.ts.map +1 -0
  168. package/resources/qbd/bill-credit-card-payments.js +55 -0
  169. package/resources/qbd/bill-credit-card-payments.js.map +1 -0
  170. package/resources/qbd/bill-credit-card-payments.mjs +50 -0
  171. package/resources/qbd/bill-credit-card-payments.mjs.map +1 -0
  172. package/resources/qbd/bills.d.ts +2561 -0
  173. package/resources/qbd/bills.d.ts.map +1 -0
  174. package/resources/qbd/bills.js +69 -0
  175. package/resources/qbd/bills.js.map +1 -0
  176. package/resources/qbd/bills.mjs +64 -0
  177. package/resources/qbd/bills.mjs.map +1 -0
  178. package/resources/qbd/checks.d.ts +2528 -0
  179. package/resources/qbd/checks.d.ts.map +1 -0
  180. package/resources/qbd/checks.js +69 -0
  181. package/resources/qbd/checks.js.map +1 -0
  182. package/resources/qbd/checks.mjs +64 -0
  183. package/resources/qbd/checks.mjs.map +1 -0
  184. package/resources/qbd/classes.d.ts +289 -0
  185. package/resources/qbd/classes.d.ts.map +1 -0
  186. package/resources/qbd/classes.js +54 -0
  187. package/resources/qbd/classes.js.map +1 -0
  188. package/resources/qbd/classes.mjs +50 -0
  189. package/resources/qbd/classes.mjs.map +1 -0
  190. package/resources/qbd/credit-card-charges.d.ts +2236 -0
  191. package/resources/qbd/credit-card-charges.d.ts.map +1 -0
  192. package/resources/qbd/credit-card-charges.js +69 -0
  193. package/resources/qbd/credit-card-charges.js.map +1 -0
  194. package/resources/qbd/credit-card-charges.mjs +64 -0
  195. package/resources/qbd/credit-card-charges.mjs.map +1 -0
  196. package/resources/qbd/credit-card-credits.d.ts +2233 -0
  197. package/resources/qbd/credit-card-credits.d.ts.map +1 -0
  198. package/resources/qbd/credit-card-credits.js +69 -0
  199. package/resources/qbd/credit-card-credits.js.map +1 -0
  200. package/resources/qbd/credit-card-credits.mjs +64 -0
  201. package/resources/qbd/credit-card-credits.mjs.map +1 -0
  202. package/resources/qbd/credit-memos.d.ts +2649 -0
  203. package/resources/qbd/credit-memos.d.ts.map +1 -0
  204. package/resources/qbd/credit-memos.js +69 -0
  205. package/resources/qbd/credit-memos.js.map +1 -0
  206. package/resources/qbd/credit-memos.mjs +64 -0
  207. package/resources/qbd/credit-memos.mjs.map +1 -0
  208. package/resources/qbd/customers.d.ts +2106 -0
  209. package/resources/qbd/customers.d.ts.map +1 -0
  210. package/resources/qbd/customers.js +58 -0
  211. package/resources/qbd/customers.js.map +1 -0
  212. package/resources/qbd/customers.mjs +53 -0
  213. package/resources/qbd/customers.mjs.map +1 -0
  214. package/resources/qbd/date-driven-terms.d.ts +242 -0
  215. package/resources/qbd/date-driven-terms.d.ts.map +1 -0
  216. package/resources/qbd/date-driven-terms.js +43 -0
  217. package/resources/qbd/date-driven-terms.js.map +1 -0
  218. package/resources/qbd/date-driven-terms.mjs +39 -0
  219. package/resources/qbd/date-driven-terms.mjs.map +1 -0
  220. package/resources/qbd/discount-items.d.ts +576 -0
  221. package/resources/qbd/discount-items.d.ts.map +1 -0
  222. package/resources/qbd/discount-items.js +58 -0
  223. package/resources/qbd/discount-items.js.map +1 -0
  224. package/resources/qbd/discount-items.mjs +53 -0
  225. package/resources/qbd/discount-items.mjs.map +1 -0
  226. package/resources/qbd/employees.d.ts +1669 -0
  227. package/resources/qbd/employees.d.ts.map +1 -0
  228. package/resources/qbd/employees.js +58 -0
  229. package/resources/qbd/employees.js.map +1 -0
  230. package/resources/qbd/employees.mjs +53 -0
  231. package/resources/qbd/employees.mjs.map +1 -0
  232. package/resources/qbd/estimates.d.ts +2493 -0
  233. package/resources/qbd/estimates.d.ts.map +1 -0
  234. package/resources/qbd/estimates.js +69 -0
  235. package/resources/qbd/estimates.js.map +1 -0
  236. package/resources/qbd/estimates.mjs +64 -0
  237. package/resources/qbd/estimates.mjs.map +1 -0
  238. package/resources/qbd/index.d.ts +37 -0
  239. package/resources/qbd/index.d.ts.map +1 -0
  240. package/resources/qbd/index.js +105 -0
  241. package/resources/qbd/index.js.map +1 -0
  242. package/resources/qbd/index.mjs +38 -0
  243. package/resources/qbd/index.mjs.map +1 -0
  244. package/resources/qbd/inventory-adjustments.d.ts +814 -0
  245. package/resources/qbd/inventory-adjustments.d.ts.map +1 -0
  246. package/resources/qbd/inventory-adjustments.js +66 -0
  247. package/resources/qbd/inventory-adjustments.js.map +1 -0
  248. package/resources/qbd/inventory-adjustments.mjs +62 -0
  249. package/resources/qbd/inventory-adjustments.mjs.map +1 -0
  250. package/resources/qbd/inventory-assembly-items.d.ts +931 -0
  251. package/resources/qbd/inventory-assembly-items.d.ts.map +1 -0
  252. package/resources/qbd/inventory-assembly-items.js +54 -0
  253. package/resources/qbd/inventory-assembly-items.js.map +1 -0
  254. package/resources/qbd/inventory-assembly-items.mjs +49 -0
  255. package/resources/qbd/inventory-assembly-items.mjs.map +1 -0
  256. package/resources/qbd/inventory-items.d.ts +844 -0
  257. package/resources/qbd/inventory-items.d.ts.map +1 -0
  258. package/resources/qbd/inventory-items.js +58 -0
  259. package/resources/qbd/inventory-items.js.map +1 -0
  260. package/resources/qbd/inventory-items.mjs +53 -0
  261. package/resources/qbd/inventory-items.mjs.map +1 -0
  262. package/resources/qbd/inventory-sites.d.ts +477 -0
  263. package/resources/qbd/inventory-sites.d.ts.map +1 -0
  264. package/resources/qbd/inventory-sites.js +54 -0
  265. package/resources/qbd/inventory-sites.js.map +1 -0
  266. package/resources/qbd/inventory-sites.mjs +50 -0
  267. package/resources/qbd/inventory-sites.mjs.map +1 -0
  268. package/resources/qbd/invoices.d.ts +2873 -0
  269. package/resources/qbd/invoices.d.ts.map +1 -0
  270. package/resources/qbd/invoices.js +69 -0
  271. package/resources/qbd/invoices.js.map +1 -0
  272. package/resources/qbd/invoices.mjs +64 -0
  273. package/resources/qbd/invoices.mjs.map +1 -0
  274. package/resources/qbd/journal-entries.d.ts +856 -0
  275. package/resources/qbd/journal-entries.d.ts.map +1 -0
  276. package/resources/qbd/journal-entries.js +69 -0
  277. package/resources/qbd/journal-entries.js.map +1 -0
  278. package/resources/qbd/journal-entries.mjs +64 -0
  279. package/resources/qbd/journal-entries.mjs.map +1 -0
  280. package/resources/qbd/non-inventory-items.d.ts +950 -0
  281. package/resources/qbd/non-inventory-items.d.ts.map +1 -0
  282. package/resources/qbd/non-inventory-items.js +58 -0
  283. package/resources/qbd/non-inventory-items.js.map +1 -0
  284. package/resources/qbd/non-inventory-items.mjs +53 -0
  285. package/resources/qbd/non-inventory-items.mjs.map +1 -0
  286. package/resources/qbd/payroll-wage-items.d.ts +215 -0
  287. package/resources/qbd/payroll-wage-items.d.ts.map +1 -0
  288. package/resources/qbd/payroll-wage-items.js +47 -0
  289. package/resources/qbd/payroll-wage-items.js.map +1 -0
  290. package/resources/qbd/payroll-wage-items.mjs +42 -0
  291. package/resources/qbd/payroll-wage-items.mjs.map +1 -0
  292. package/resources/qbd/purchase-orders.d.ts +2554 -0
  293. package/resources/qbd/purchase-orders.d.ts.map +1 -0
  294. package/resources/qbd/purchase-orders.js +69 -0
  295. package/resources/qbd/purchase-orders.js.map +1 -0
  296. package/resources/qbd/purchase-orders.mjs +64 -0
  297. package/resources/qbd/purchase-orders.mjs.map +1 -0
  298. package/resources/qbd/qbd.d.ts +146 -0
  299. package/resources/qbd/qbd.d.ts.map +1 -0
  300. package/resources/qbd/qbd.js +202 -0
  301. package/resources/qbd/qbd.js.map +1 -0
  302. package/resources/qbd/qbd.mjs +175 -0
  303. package/resources/qbd/qbd.mjs.map +1 -0
  304. package/resources/qbd/receive-payments.d.ts +1282 -0
  305. package/resources/qbd/receive-payments.d.ts.map +1 -0
  306. package/resources/qbd/receive-payments.js +70 -0
  307. package/resources/qbd/receive-payments.js.map +1 -0
  308. package/resources/qbd/receive-payments.mjs +65 -0
  309. package/resources/qbd/receive-payments.mjs.map +1 -0
  310. package/resources/qbd/sales-orders.d.ts +2628 -0
  311. package/resources/qbd/sales-orders.d.ts.map +1 -0
  312. package/resources/qbd/sales-orders.js +69 -0
  313. package/resources/qbd/sales-orders.js.map +1 -0
  314. package/resources/qbd/sales-orders.mjs +64 -0
  315. package/resources/qbd/sales-orders.mjs.map +1 -0
  316. package/resources/qbd/sales-receipts.d.ts +3373 -0
  317. package/resources/qbd/sales-receipts.d.ts.map +1 -0
  318. package/resources/qbd/sales-receipts.js +69 -0
  319. package/resources/qbd/sales-receipts.js.map +1 -0
  320. package/resources/qbd/sales-receipts.mjs +64 -0
  321. package/resources/qbd/sales-receipts.mjs.map +1 -0
  322. package/resources/qbd/sales-representatives.d.ts +251 -0
  323. package/resources/qbd/sales-representatives.d.ts.map +1 -0
  324. package/resources/qbd/sales-representatives.js +54 -0
  325. package/resources/qbd/sales-representatives.js.map +1 -0
  326. package/resources/qbd/sales-representatives.mjs +50 -0
  327. package/resources/qbd/sales-representatives.mjs.map +1 -0
  328. package/resources/qbd/sales-tax-codes.d.ts +306 -0
  329. package/resources/qbd/sales-tax-codes.d.ts.map +1 -0
  330. package/resources/qbd/sales-tax-codes.js +54 -0
  331. package/resources/qbd/sales-tax-codes.js.map +1 -0
  332. package/resources/qbd/sales-tax-codes.mjs +50 -0
  333. package/resources/qbd/sales-tax-codes.mjs.map +1 -0
  334. package/resources/qbd/sales-tax-items.d.ts +458 -0
  335. package/resources/qbd/sales-tax-items.d.ts.map +1 -0
  336. package/resources/qbd/sales-tax-items.js +58 -0
  337. package/resources/qbd/sales-tax-items.js.map +1 -0
  338. package/resources/qbd/sales-tax-items.mjs +53 -0
  339. package/resources/qbd/sales-tax-items.mjs.map +1 -0
  340. package/resources/qbd/service-items.d.ts +923 -0
  341. package/resources/qbd/service-items.d.ts.map +1 -0
  342. package/resources/qbd/service-items.js +58 -0
  343. package/resources/qbd/service-items.js.map +1 -0
  344. package/resources/qbd/service-items.mjs +53 -0
  345. package/resources/qbd/service-items.mjs.map +1 -0
  346. package/resources/qbd/standard-terms.d.ts +225 -0
  347. package/resources/qbd/standard-terms.d.ts.map +1 -0
  348. package/resources/qbd/standard-terms.js +43 -0
  349. package/resources/qbd/standard-terms.js.map +1 -0
  350. package/resources/qbd/standard-terms.mjs +39 -0
  351. package/resources/qbd/standard-terms.mjs.map +1 -0
  352. package/resources/qbd/subtotal-items.d.ts +323 -0
  353. package/resources/qbd/subtotal-items.d.ts.map +1 -0
  354. package/resources/qbd/subtotal-items.js +58 -0
  355. package/resources/qbd/subtotal-items.js.map +1 -0
  356. package/resources/qbd/subtotal-items.mjs +53 -0
  357. package/resources/qbd/subtotal-items.mjs.map +1 -0
  358. package/resources/qbd/transfers.d.ts +269 -0
  359. package/resources/qbd/transfers.d.ts.map +1 -0
  360. package/resources/qbd/transfers.js +58 -0
  361. package/resources/qbd/transfers.js.map +1 -0
  362. package/resources/qbd/transfers.mjs +53 -0
  363. package/resources/qbd/transfers.mjs.map +1 -0
  364. package/resources/qbd/vendor-credits.d.ts +2298 -0
  365. package/resources/qbd/vendor-credits.d.ts.map +1 -0
  366. package/resources/qbd/vendor-credits.js +69 -0
  367. package/resources/qbd/vendor-credits.js.map +1 -0
  368. package/resources/qbd/vendor-credits.mjs +64 -0
  369. package/resources/qbd/vendor-credits.mjs.map +1 -0
  370. package/resources/qbd/vendors.d.ts +1677 -0
  371. package/resources/qbd/vendors.d.ts.map +1 -0
  372. package/resources/qbd/vendors.js +58 -0
  373. package/resources/qbd/vendors.js.map +1 -0
  374. package/resources/qbd/vendors.mjs +53 -0
  375. package/resources/qbd/vendors.mjs.map +1 -0
  376. package/shims/node.d.ts +30 -0
  377. package/shims/node.d.ts.map +1 -0
  378. package/shims/node.js +31 -0
  379. package/shims/node.js.map +1 -0
  380. package/shims/node.mjs +5 -0
  381. package/shims/node.mjs.map +1 -0
  382. package/shims/web.d.ts +26 -0
  383. package/shims/web.d.ts.map +1 -0
  384. package/shims/web.js +31 -0
  385. package/shims/web.js.map +1 -0
  386. package/shims/web.mjs +5 -0
  387. package/shims/web.mjs.map +1 -0
  388. package/src/_shims/MultipartBody.ts +9 -0
  389. package/src/_shims/README.md +46 -0
  390. package/src/_shims/auto/runtime-bun.ts +4 -0
  391. package/src/_shims/auto/runtime-node.ts +4 -0
  392. package/src/_shims/auto/runtime.ts +4 -0
  393. package/src/_shims/auto/types-node.ts +4 -0
  394. package/src/_shims/auto/types.d.ts +101 -0
  395. package/src/_shims/auto/types.js +3 -0
  396. package/src/_shims/auto/types.mjs +3 -0
  397. package/src/_shims/bun-runtime.ts +14 -0
  398. package/src/_shims/index.d.ts +81 -0
  399. package/src/_shims/index.js +13 -0
  400. package/src/_shims/index.mjs +7 -0
  401. package/src/_shims/manual-types.d.ts +12 -0
  402. package/src/_shims/manual-types.js +3 -0
  403. package/src/_shims/manual-types.mjs +3 -0
  404. package/src/_shims/node-runtime.ts +81 -0
  405. package/src/_shims/node-types.d.ts +42 -0
  406. package/src/_shims/node-types.js +3 -0
  407. package/src/_shims/node-types.mjs +3 -0
  408. package/src/_shims/registry.ts +67 -0
  409. package/src/_shims/web-runtime.ts +103 -0
  410. package/src/_shims/web-types.d.ts +83 -0
  411. package/src/_shims/web-types.js +3 -0
  412. package/src/_shims/web-types.mjs +3 -0
  413. package/src/core.ts +1208 -0
  414. package/src/error.ts +130 -0
  415. package/src/index.ts +227 -0
  416. package/src/internal/qs/LICENSE.md +13 -0
  417. package/src/internal/qs/README.md +3 -0
  418. package/src/internal/qs/formats.ts +9 -0
  419. package/src/internal/qs/index.ts +13 -0
  420. package/src/internal/qs/stringify.ts +388 -0
  421. package/src/internal/qs/types.ts +71 -0
  422. package/src/internal/qs/utils.ts +265 -0
  423. package/src/lib/.keep +4 -0
  424. package/src/pagination.ts +60 -0
  425. package/src/resource.ts +11 -0
  426. package/src/resources/auth-sessions.ts +99 -0
  427. package/src/resources/end-users.ts +216 -0
  428. package/src/resources/index.ts +14 -0
  429. package/src/resources/qbd/accounts.ts +797 -0
  430. package/src/resources/qbd/bill-check-payments.ts +1086 -0
  431. package/src/resources/qbd/bill-credit-card-payments.ts +851 -0
  432. package/src/resources/qbd/bills.ts +3039 -0
  433. package/src/resources/qbd/checks.ts +3003 -0
  434. package/src/resources/qbd/classes.ts +366 -0
  435. package/src/resources/qbd/credit-card-charges.ts +2646 -0
  436. package/src/resources/qbd/credit-card-credits.ts +2643 -0
  437. package/src/resources/qbd/credit-memos.ts +3157 -0
  438. package/src/resources/qbd/customers.ts +2518 -0
  439. package/src/resources/qbd/date-driven-terms.ts +314 -0
  440. package/src/resources/qbd/discount-items.ts +712 -0
  441. package/src/resources/qbd/employees.ts +2266 -0
  442. package/src/resources/qbd/estimates.ts +2975 -0
  443. package/src/resources/qbd/index.ts +346 -0
  444. package/src/resources/qbd/inventory-adjustments.ts +1008 -0
  445. package/src/resources/qbd/inventory-assembly-items.ts +1126 -0
  446. package/src/resources/qbd/inventory-items.ts +1026 -0
  447. package/src/resources/qbd/inventory-sites.ts +605 -0
  448. package/src/resources/qbd/invoices.ts +3398 -0
  449. package/src/resources/qbd/journal-entries.ts +1051 -0
  450. package/src/resources/qbd/non-inventory-items.ts +1138 -0
  451. package/src/resources/qbd/payroll-wage-items.ts +304 -0
  452. package/src/resources/qbd/purchase-orders.ts +3045 -0
  453. package/src/resources/qbd/qbd.ts +876 -0
  454. package/src/resources/qbd/receive-payments.ts +1609 -0
  455. package/src/resources/qbd/sales-orders.ts +3141 -0
  456. package/src/resources/qbd/sales-receipts.ts +3977 -0
  457. package/src/resources/qbd/sales-representatives.ts +340 -0
  458. package/src/resources/qbd/sales-tax-codes.ts +398 -0
  459. package/src/resources/qbd/sales-tax-items.ts +583 -0
  460. package/src/resources/qbd/service-items.ts +1105 -0
  461. package/src/resources/qbd/standard-terms.ts +295 -0
  462. package/src/resources/qbd/subtotal-items.ts +430 -0
  463. package/src/resources/qbd/transfers.ts +359 -0
  464. package/src/resources/qbd/vendor-credits.ts +2742 -0
  465. package/src/resources/qbd/vendors.ts +2017 -0
  466. package/src/shims/node.ts +50 -0
  467. package/src/shims/web.ts +50 -0
  468. package/src/tsconfig.json +11 -0
  469. package/src/uploads.ts +255 -0
  470. package/src/version.ts +1 -0
  471. package/uploads.d.ts +75 -0
  472. package/uploads.d.ts.map +1 -0
  473. package/uploads.js +171 -0
  474. package/uploads.js.map +1 -0
  475. package/uploads.mjs +158 -0
  476. package/uploads.mjs.map +1 -0
  477. package/version.d.ts +2 -0
  478. package/version.d.ts.map +1 -0
  479. package/version.js +5 -0
  480. package/version.js.map +1 -0
  481. package/version.mjs +2 -0
  482. package/version.mjs.map +1 -0
  483. package/dist/package.json +0 -48
  484. package/dist/src/Client.d.ts +0 -21
  485. package/dist/src/Client.js +0 -54
  486. package/dist/src/index.d.ts +0 -11
  487. package/dist/src/index.js +0 -59
  488. package/dist/src/integrations/BaseIntegration.d.ts +0 -9
  489. package/dist/src/integrations/BaseIntegration.js +0 -14
  490. package/dist/src/integrations/qbd/QbdIntegration.d.ts +0 -3120
  491. package/dist/src/integrations/qbd/QbdIntegration.js +0 -3147
  492. package/dist/src/integrations/qbd/qbdTypes.d.ts +0 -14076
  493. package/dist/src/integrations/qbd/qbdTypes.js +0 -2
  494. package/dist/src/interceptors/errorHandling.d.ts +0 -2
  495. package/dist/src/interceptors/errorHandling.js +0 -53
  496. package/dist/src/interceptors/logging.d.ts +0 -18
  497. package/dist/src/interceptors/logging.js +0 -70
  498. package/dist/src/resources/AuthSessionsResource.d.ts +0 -77
  499. package/dist/src/resources/AuthSessionsResource.js +0 -26
  500. package/dist/src/resources/BaseResource.d.ts +0 -6
  501. package/dist/src/resources/BaseResource.js +0 -9
  502. package/dist/src/resources/EndUsersResource.d.ts +0 -84
  503. package/dist/src/resources/EndUsersResource.js +0 -57
  504. package/dist/src/resources/types.d.ts +0 -40
  505. package/dist/src/utils/checkForUpdates.d.ts +0 -2
  506. package/dist/src/utils/checkForUpdates.js +0 -62
  507. package/dist/src/utils/env.d.ts +0 -1
  508. package/dist/src/utils/env.js +0 -15
  509. package/dist/src/utils/error.d.ts +0 -184
  510. package/dist/src/utils/error.js +0 -254
@@ -0,0 +1,3398 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+ import { CursorPage, type CursorPageParams } from '../../pagination';
6
+
7
+ export class Invoices extends APIResource {
8
+ /**
9
+ * Creates a new invoice.
10
+ */
11
+ create(params: InvoiceCreateParams, options?: Core.RequestOptions): Core.APIPromise<Invoice> {
12
+ const { conductorEndUserId, ...body } = params;
13
+ return this._client.post('/quickbooks-desktop/invoices', {
14
+ body,
15
+ ...options,
16
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
17
+ });
18
+ }
19
+
20
+ /**
21
+ * Retrieves an invoice by ID.
22
+ */
23
+ retrieve(
24
+ id: string,
25
+ params: InvoiceRetrieveParams,
26
+ options?: Core.RequestOptions,
27
+ ): Core.APIPromise<Invoice> {
28
+ const { conductorEndUserId } = params;
29
+ return this._client.get(`/quickbooks-desktop/invoices/${id}`, {
30
+ ...options,
31
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
32
+ });
33
+ }
34
+
35
+ /**
36
+ * Updates an existing invoice.
37
+ */
38
+ update(id: string, params: InvoiceUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Invoice> {
39
+ const { conductorEndUserId, ...body } = params;
40
+ return this._client.post(`/quickbooks-desktop/invoices/${id}`, {
41
+ body,
42
+ ...options,
43
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
44
+ });
45
+ }
46
+
47
+ /**
48
+ * Returns a list of invoices. Use the `cursor` parameter to paginate through the
49
+ * results.
50
+ */
51
+ list(
52
+ params: InvoiceListParams,
53
+ options?: Core.RequestOptions,
54
+ ): Core.PagePromise<InvoicesCursorPage, Invoice> {
55
+ const { conductorEndUserId, ...query } = params;
56
+ return this._client.getAPIList('/quickbooks-desktop/invoices', InvoicesCursorPage, {
57
+ query,
58
+ ...options,
59
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
60
+ });
61
+ }
62
+
63
+ /**
64
+ * Permanently deletes a an invoice. The deletion will fail if the invoice is
65
+ * currently in use or has any linked transactions that are in use.
66
+ */
67
+ delete(
68
+ id: string,
69
+ params: InvoiceDeleteParams,
70
+ options?: Core.RequestOptions,
71
+ ): Core.APIPromise<InvoiceDeleteResponse> {
72
+ const { conductorEndUserId } = params;
73
+ return this._client.delete(`/quickbooks-desktop/invoices/${id}`, {
74
+ ...options,
75
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
76
+ });
77
+ }
78
+ }
79
+
80
+ export class InvoicesCursorPage extends CursorPage<Invoice> {}
81
+
82
+ export interface Invoice {
83
+ /**
84
+ * The unique identifier assigned by QuickBooks to this invoice. This ID is unique
85
+ * across all transaction types.
86
+ */
87
+ id: string;
88
+
89
+ /**
90
+ * The amount of credit applied to this invoice. This could include customer
91
+ * deposits, payments, or credits. Represented as a decimal string.
92
+ */
93
+ appliedAmount: string | null;
94
+
95
+ /**
96
+ * The outstanding balance of this invoice after applying any credits or payments.
97
+ * Calculated as `subtotal` + `salesTaxTotal` - `appliedAmount`. Represented as a
98
+ * decimal string.
99
+ */
100
+ balanceRemaining: string | null;
101
+
102
+ /**
103
+ * The outstanding balance of this invoice converted to the home currency of the
104
+ * QuickBooks company file. Represented as a decimal string.
105
+ */
106
+ balanceRemainingInHomeCurrency: string | null;
107
+
108
+ /**
109
+ * The invoice's billing address.
110
+ */
111
+ billingAddress: Invoice.BillingAddress | null;
112
+
113
+ /**
114
+ * The invoice's class. Classes can be used to categorize objects into meaningful
115
+ * segments, such as department, location, or type of work. In QuickBooks, class
116
+ * tracking is off by default. A class defined here is automatically used in this
117
+ * invoice's line items unless overridden at the line item level.
118
+ */
119
+ class: Invoice.Class | null;
120
+
121
+ /**
122
+ * The date and time when this invoice was created, in ISO 8601 format
123
+ * (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
124
+ * in QuickBooks.
125
+ */
126
+ createdAt: string;
127
+
128
+ /**
129
+ * The invoice's currency. For built-in currencies, the name and code are standard
130
+ * international values. For user-defined currencies, all values are editable.
131
+ */
132
+ currency: Invoice.Currency | null;
133
+
134
+ /**
135
+ * The customer or customer-job associated with this invoice.
136
+ */
137
+ customer: Invoice.Customer;
138
+
139
+ /**
140
+ * The message to display to the customer on the invoice.
141
+ */
142
+ customerMessage: Invoice.CustomerMessage | null;
143
+
144
+ /**
145
+ * The custom fields for the invoice object, added as user-defined data extensions,
146
+ * not included in the standard QuickBooks object.
147
+ */
148
+ customFields: Array<Invoice.CustomField>;
149
+
150
+ /**
151
+ * The predefined template in QuickBooks that determines the layout and formatting
152
+ * for this invoice when printed or displayed.
153
+ */
154
+ documentTemplate: Invoice.DocumentTemplate | null;
155
+
156
+ /**
157
+ * The date by which this invoice must be paid, in ISO 8601 format (YYYY-MM-DD).
158
+ */
159
+ dueDate: string | null;
160
+
161
+ /**
162
+ * The market exchange rate between this invoice's currency and the home currency
163
+ * in QuickBooks at the time of this transaction. Represented as a decimal value
164
+ * (e.g., 1.2345 for 1 EUR = 1.2345 USD if USD is the home currency).
165
+ */
166
+ exchangeRate: number | null;
167
+
168
+ /**
169
+ * A globally unique identifier (GUID) you, the developer, can provide for tracking
170
+ * this object in your external system. This field is immutable and can only be set
171
+ * during object creation.
172
+ */
173
+ externalId: string | null;
174
+
175
+ /**
176
+ * Whether this invoice includes a finance charge. This field is immutable and can
177
+ * only be set during invoice creation.
178
+ */
179
+ isFinanceCharge: boolean | null;
180
+
181
+ /**
182
+ * Indicates whether this invoice has been paid in full. When `true`, `openAmount`
183
+ * will be 0.
184
+ */
185
+ isPaid: boolean | null;
186
+
187
+ /**
188
+ * Indicates whether this invoice has not been completed or is in a draft version.
189
+ */
190
+ isPending: boolean | null;
191
+
192
+ /**
193
+ * Indicates whether this invoice is included in the queue of documents for
194
+ * QuickBooks to email to the customer.
195
+ */
196
+ isQueuedForEmail: boolean | null;
197
+
198
+ /**
199
+ * Indicates whether this invoice is included in the queue of documents for
200
+ * QuickBooks to print.
201
+ */
202
+ isQueuedForPrint: boolean | null;
203
+
204
+ /**
205
+ * The invoice's line item groups, each representing a predefined set of related
206
+ * items.
207
+ */
208
+ lineGroups: Array<Invoice.LineGroup>;
209
+
210
+ /**
211
+ * The invoice's line items, each representing a single product or service sold.
212
+ */
213
+ lines: Array<Invoice.Line>;
214
+
215
+ /**
216
+ * The invoice's linked transactions, such as payments applied, credits used, or
217
+ * associated purchase orders.
218
+ *
219
+ * **IMPORTANT**: You must specify the parameter `includeLinkedTransactions` when
220
+ * fetching a list of invoices to receive this field because it is not returned by
221
+ * default.
222
+ */
223
+ linkedTransactions: Array<Invoice.LinkedTransaction>;
224
+
225
+ /**
226
+ * A memo or note for this invoice that appears in reports, but not on the invoice.
227
+ * Use `customerMessage` to add a note to this invoice.
228
+ */
229
+ memo: string | null;
230
+
231
+ /**
232
+ * The type of object. This value is always `"qbd_invoice"`.
233
+ */
234
+ objectType: 'qbd_invoice';
235
+
236
+ /**
237
+ * A built-in custom field for additional information specific to this invoice.
238
+ * Unlike the user-defined fields in the `customFields` array, this is a standard
239
+ * QuickBooks field that exists for all invoices for convenience. Developers often
240
+ * use this field for tracking information that doesn't fit into other standard
241
+ * QuickBooks fields. Unlike `otherCustomField1` and `otherCustomField2`, which are
242
+ * line item fields, this exists at the transaction level. Hidden by default in the
243
+ * QuickBooks UI.
244
+ */
245
+ otherCustomField: string | null;
246
+
247
+ /**
248
+ * The customer's Purchase Order (PO) number associated with this invoice. This
249
+ * field is often used to cross-reference the invoice with the customer's
250
+ * purchasing system.
251
+ */
252
+ purchaseOrderNumber: string | null;
253
+
254
+ /**
255
+ * The Accounts-Receivable (A/R) account to which this invoice is assigned, used to
256
+ * track the amount owed. If not specified, QuickBooks Desktop will use its default
257
+ * A/R account.
258
+ *
259
+ * **IMPORTANT**: If this invoice is linked to other transactions, this A/R account
260
+ * must match the `receivablesAccount` used in all linked transactions. For
261
+ * example, when refunding a credit card payment, the A/R account must match the
262
+ * one used in the original credit transactions being refunded.
263
+ */
264
+ receivablesAccount: Invoice.ReceivablesAccount | null;
265
+
266
+ /**
267
+ * The case-sensitive user-defined reference number for this invoice, which can be
268
+ * used to identify the transaction in QuickBooks. This value is not required to be
269
+ * unique and can be arbitrarily changed by the QuickBooks user.
270
+ */
271
+ refNumber: string | null;
272
+
273
+ /**
274
+ * The current QuickBooks-assigned revision number of this invoice object, which
275
+ * changes each time the object is modified. When updating this object, you must
276
+ * provide the most recent `revisionNumber` to ensure you're working with the
277
+ * latest data; otherwise, the update will return an error.
278
+ */
279
+ revisionNumber: string;
280
+
281
+ /**
282
+ * The invoice's sales representative. Sales representatives can be employees,
283
+ * vendors, or other names in QuickBooks.
284
+ */
285
+ salesRepresentative: Invoice.SalesRepresentative | null;
286
+
287
+ /**
288
+ * The sales-tax code for this invoice, determining whether it is taxable or
289
+ * non-taxable. This can be overridden at the transaction-line level.
290
+ *
291
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
292
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
293
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
294
+ * non-taxable code to all sales.
295
+ */
296
+ salesTaxCode: Invoice.SalesTaxCode | null;
297
+
298
+ /**
299
+ * The sales-tax item used to calculate the actual tax amount for this invoice's
300
+ * transactions by applying a specific tax rate collected for a single tax agency.
301
+ * Unlike `salesTaxCode`, which only indicates general taxability, this field
302
+ * drives the actual tax calculation and reporting.
303
+ *
304
+ * For invoices, while using this field to specify a single tax item/group that
305
+ * applies uniformly is recommended, complex tax scenarios may require alternative
306
+ * approaches. In such cases, you can set this field to a 0% tax item
307
+ * (conventionally named "Tax Calculated On Invoice") and handle tax calculations
308
+ * through line items instead. When using line items for taxes, note that only
309
+ * individual tax items (not tax groups) can be used, subtotals can help apply a
310
+ * tax to multiple items but only the first tax line after a subtotal is calculated
311
+ * automatically (subsequent tax lines require manual amounts), and the rate column
312
+ * will always display the actual tax amount rather than the rate percentage.
313
+ */
314
+ salesTaxItem: Invoice.SalesTaxItem | null;
315
+
316
+ /**
317
+ * The sales tax percentage applied to this invoice, represented as a decimal
318
+ * string.
319
+ */
320
+ salesTaxPercentage: string | null;
321
+
322
+ /**
323
+ * The total amount of sales tax charged for this invoice, represented as a decimal
324
+ * string.
325
+ */
326
+ salesTaxTotal: string;
327
+
328
+ /**
329
+ * The origin location from where the product associated with this invoice is
330
+ * shipped. This is the point at which ownership and liability for goods transfer
331
+ * from seller to buyer. Internally, QuickBooks uses the term "FOB" for this field,
332
+ * which stands for "freight on board". This field is informational and has no
333
+ * accounting implications.
334
+ */
335
+ shipmentOrigin: string | null;
336
+
337
+ /**
338
+ * The invoice's shipping address.
339
+ */
340
+ shippingAddress: Invoice.ShippingAddress | null;
341
+
342
+ /**
343
+ * The date when the products or services for this invoice were shipped or are
344
+ * expected to be shipped, in ISO 8601 format (YYYY-MM-DD).
345
+ */
346
+ shippingDate: string | null;
347
+
348
+ /**
349
+ * The shipping method used for this invoice, such as standard mail or overnight
350
+ * delivery.
351
+ */
352
+ shippingMethod: Invoice.ShippingMethod | null;
353
+
354
+ /**
355
+ * The subtotal of this invoice, which is the sum of all invoice lines before taxes
356
+ * and payments are applied, represented as a decimal string.
357
+ */
358
+ subtotal: string;
359
+
360
+ /**
361
+ * The suggested discount amount for this invoice, represented as a decimal string.
362
+ */
363
+ suggestedDiscountAmount: string | null;
364
+
365
+ /**
366
+ * The date when the `suggestedDiscountAmount` for this invoice would apply, in ISO
367
+ * 8601 format (YYYY-MM-DD).
368
+ */
369
+ suggestedDiscountDate: string | null;
370
+
371
+ /**
372
+ * The invoice's payment terms, defining when payment is due and any applicable
373
+ * discounts.
374
+ */
375
+ terms: Invoice.Terms | null;
376
+
377
+ /**
378
+ * The date of this invoice, in ISO 8601 format (YYYY-MM-DD).
379
+ */
380
+ transactionDate: string;
381
+
382
+ /**
383
+ * The date and time when this invoice was last updated, in ISO 8601 format
384
+ * (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
385
+ * in QuickBooks.
386
+ */
387
+ updatedAt: string;
388
+ }
389
+
390
+ export namespace Invoice {
391
+ /**
392
+ * The invoice's billing address.
393
+ */
394
+ export interface BillingAddress {
395
+ /**
396
+ * The city, district, suburb, town, or village name of the address.
397
+ */
398
+ city: string | null;
399
+
400
+ /**
401
+ * The country name of the address.
402
+ */
403
+ country: string | null;
404
+
405
+ /**
406
+ * The first line of the address (e.g., street, PO Box, or company name).
407
+ */
408
+ line1: string | null;
409
+
410
+ /**
411
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
412
+ * building).
413
+ */
414
+ line2: string | null;
415
+
416
+ /**
417
+ * The third line of the address, if needed.
418
+ */
419
+ line3: string | null;
420
+
421
+ /**
422
+ * The fourth line of the address, if needed.
423
+ */
424
+ line4: string | null;
425
+
426
+ /**
427
+ * The fifth line of the address, if needed.
428
+ */
429
+ line5: string | null;
430
+
431
+ /**
432
+ * A note written at the bottom of the address in the form in which it appears,
433
+ * such as the invoice form.
434
+ */
435
+ note: string | null;
436
+
437
+ /**
438
+ * The postal code or ZIP code of the address.
439
+ */
440
+ postalCode: string | null;
441
+
442
+ /**
443
+ * The state, county, province, or region name of the address.
444
+ */
445
+ state: string | null;
446
+ }
447
+
448
+ /**
449
+ * The invoice's class. Classes can be used to categorize objects into meaningful
450
+ * segments, such as department, location, or type of work. In QuickBooks, class
451
+ * tracking is off by default. A class defined here is automatically used in this
452
+ * invoice's line items unless overridden at the line item level.
453
+ */
454
+ export interface Class {
455
+ /**
456
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
457
+ * across all objects of the same type, but not across different QuickBooks object
458
+ * types.
459
+ */
460
+ id: string | null;
461
+
462
+ /**
463
+ * The fully-qualified unique name for this object, formed by combining the names
464
+ * of its parent objects with its own `name`, separated by colons. Not
465
+ * case-sensitive.
466
+ */
467
+ fullName: string | null;
468
+ }
469
+
470
+ /**
471
+ * The invoice's currency. For built-in currencies, the name and code are standard
472
+ * international values. For user-defined currencies, all values are editable.
473
+ */
474
+ export interface Currency {
475
+ /**
476
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
477
+ * across all objects of the same type, but not across different QuickBooks object
478
+ * types.
479
+ */
480
+ id: string | null;
481
+
482
+ /**
483
+ * The fully-qualified unique name for this object, formed by combining the names
484
+ * of its parent objects with its own `name`, separated by colons. Not
485
+ * case-sensitive.
486
+ */
487
+ fullName: string | null;
488
+ }
489
+
490
+ /**
491
+ * The customer or customer-job associated with this invoice.
492
+ */
493
+ export interface Customer {
494
+ /**
495
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
496
+ * across all objects of the same type, but not across different QuickBooks object
497
+ * types.
498
+ */
499
+ id: string | null;
500
+
501
+ /**
502
+ * The fully-qualified unique name for this object, formed by combining the names
503
+ * of its parent objects with its own `name`, separated by colons. Not
504
+ * case-sensitive.
505
+ */
506
+ fullName: string | null;
507
+ }
508
+
509
+ /**
510
+ * The message to display to the customer on the invoice.
511
+ */
512
+ export interface CustomerMessage {
513
+ /**
514
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
515
+ * across all objects of the same type, but not across different QuickBooks object
516
+ * types.
517
+ */
518
+ id: string | null;
519
+
520
+ /**
521
+ * The fully-qualified unique name for this object, formed by combining the names
522
+ * of its parent objects with its own `name`, separated by colons. Not
523
+ * case-sensitive.
524
+ */
525
+ fullName: string | null;
526
+ }
527
+
528
+ export interface CustomField {
529
+ /**
530
+ * The name of the custom field, unique for the specified `ownerId`. For public
531
+ * custom fields, this name is visible as a label in the QuickBooks UI.
532
+ */
533
+ name: string;
534
+
535
+ /**
536
+ * The identifier of the owner of the custom field, which QuickBooks internally
537
+ * calls a "data extension". For public custom fields visible in the UI, such as
538
+ * those added by the QuickBooks user, this is always "0". For private custom
539
+ * fields that are only visible to the application that created them, this is a
540
+ * valid GUID identifying the owning application. Internally, Conductor always
541
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
542
+ * objects.
543
+ */
544
+ ownerId: string;
545
+
546
+ /**
547
+ * The data type of this custom field.
548
+ */
549
+ type:
550
+ | 'amount_type'
551
+ | 'date_time_type'
552
+ | 'integer_type'
553
+ | 'percent_type'
554
+ | 'price_type'
555
+ | 'quantity_type'
556
+ | 'string_1024_type'
557
+ | 'string_255_type';
558
+
559
+ /**
560
+ * The value of this custom field. The maximum length depends on the field's data
561
+ * type.
562
+ */
563
+ value: string;
564
+ }
565
+
566
+ /**
567
+ * The predefined template in QuickBooks that determines the layout and formatting
568
+ * for this invoice when printed or displayed.
569
+ */
570
+ export interface DocumentTemplate {
571
+ /**
572
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
573
+ * across all objects of the same type, but not across different QuickBooks object
574
+ * types.
575
+ */
576
+ id: string | null;
577
+
578
+ /**
579
+ * The fully-qualified unique name for this object, formed by combining the names
580
+ * of its parent objects with its own `name`, separated by colons. Not
581
+ * case-sensitive.
582
+ */
583
+ fullName: string | null;
584
+ }
585
+
586
+ export interface LineGroup {
587
+ /**
588
+ * The unique identifier assigned by QuickBooks to this invoice line group. This ID
589
+ * is unique across all transaction line types.
590
+ */
591
+ id: string;
592
+
593
+ /**
594
+ * The custom fields for the invoice line group object, added as user-defined data
595
+ * extensions, not included in the standard QuickBooks object.
596
+ */
597
+ customFields: Array<LineGroup.CustomField>;
598
+
599
+ /**
600
+ * A description of this invoice line group.
601
+ */
602
+ description: string | null;
603
+
604
+ /**
605
+ * The invoice line group's item group, representing a predefined set of items
606
+ * bundled because they are commonly purchased together or grouped for faster
607
+ * entry.
608
+ */
609
+ itemGroup: LineGroup.ItemGroup;
610
+
611
+ /**
612
+ * The invoice line group's line items, each representing a single product or
613
+ * service sold.
614
+ */
615
+ lines: Array<LineGroup.Line>;
616
+
617
+ /**
618
+ * The type of object. This value is always `"qbd_invoice_line_group"`.
619
+ */
620
+ objectType: 'qbd_invoice_line_group';
621
+
622
+ /**
623
+ * Specifies an alternative unit-of-measure set when updating this invoice line
624
+ * group's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to
625
+ * select units from a different set than the item's default unit-of-measure set,
626
+ * which remains unchanged on the item itself. The override applies only to this
627
+ * specific line. For example, you can sell an item typically measured in volume
628
+ * units using weight units in a specific transaction by specifying a different
629
+ * unit-of-measure set with this field.
630
+ */
631
+ overrideUnitOfMeasureSet: LineGroup.OverrideUnitOfMeasureSet | null;
632
+
633
+ /**
634
+ * The quantity of the item group associated with this invoice line group. This
635
+ * field cannot be cleared.
636
+ *
637
+ * **NOTE**: Do not use this field if the associated item group is a discount item
638
+ * group.
639
+ */
640
+ quantity: number | null;
641
+
642
+ /**
643
+ * Indicates whether the individual items in this invoice line group and their
644
+ * separate amounts appear on printed forms.
645
+ */
646
+ shouldPrintItemsInGroup: boolean;
647
+
648
+ /**
649
+ * The total monetary amount of this invoice line group, equivalent to the sum of
650
+ * the amounts in `lines`, represented as a decimal string.
651
+ */
652
+ totalAmount: string;
653
+
654
+ /**
655
+ * The unit-of-measure used for the `quantity` in this invoice line group. Must be
656
+ * a valid unit within the item's available units of measure.
657
+ */
658
+ unitOfMeasure: string | null;
659
+ }
660
+
661
+ export namespace LineGroup {
662
+ export interface CustomField {
663
+ /**
664
+ * The name of the custom field, unique for the specified `ownerId`. For public
665
+ * custom fields, this name is visible as a label in the QuickBooks UI.
666
+ */
667
+ name: string;
668
+
669
+ /**
670
+ * The identifier of the owner of the custom field, which QuickBooks internally
671
+ * calls a "data extension". For public custom fields visible in the UI, such as
672
+ * those added by the QuickBooks user, this is always "0". For private custom
673
+ * fields that are only visible to the application that created them, this is a
674
+ * valid GUID identifying the owning application. Internally, Conductor always
675
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
676
+ * objects.
677
+ */
678
+ ownerId: string;
679
+
680
+ /**
681
+ * The data type of this custom field.
682
+ */
683
+ type:
684
+ | 'amount_type'
685
+ | 'date_time_type'
686
+ | 'integer_type'
687
+ | 'percent_type'
688
+ | 'price_type'
689
+ | 'quantity_type'
690
+ | 'string_1024_type'
691
+ | 'string_255_type';
692
+
693
+ /**
694
+ * The value of this custom field. The maximum length depends on the field's data
695
+ * type.
696
+ */
697
+ value: string;
698
+ }
699
+
700
+ /**
701
+ * The invoice line group's item group, representing a predefined set of items
702
+ * bundled because they are commonly purchased together or grouped for faster
703
+ * entry.
704
+ */
705
+ export interface ItemGroup {
706
+ /**
707
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
708
+ * across all objects of the same type, but not across different QuickBooks object
709
+ * types.
710
+ */
711
+ id: string | null;
712
+
713
+ /**
714
+ * The fully-qualified unique name for this object, formed by combining the names
715
+ * of its parent objects with its own `name`, separated by colons. Not
716
+ * case-sensitive.
717
+ */
718
+ fullName: string | null;
719
+ }
720
+
721
+ export interface Line {
722
+ /**
723
+ * The unique identifier assigned by QuickBooks to this invoice line. This ID is
724
+ * unique across all transaction line types.
725
+ */
726
+ id: string;
727
+
728
+ /**
729
+ * The monetary amount of this invoice line, represented as a decimal string. If
730
+ * both `quantity` and `rate` are specified but not `amount`, QuickBooks will use
731
+ * them to calculate `amount`. If `amount`, `rate`, and `quantity` are all
732
+ * unspecified, then QuickBooks will calculate `amount` based on a `quantity` of
733
+ * `1` and the suggested `rate`. This field cannot be cleared.
734
+ */
735
+ amount: string | null;
736
+
737
+ /**
738
+ * The invoice line's class. Classes can be used to categorize objects into
739
+ * meaningful segments, such as department, location, or type of work. In
740
+ * QuickBooks, class tracking is off by default. If a class is specified for the
741
+ * entire parent transaction, it is automatically applied to all invoice lines
742
+ * unless overridden here, at the transaction line level.
743
+ */
744
+ class: Line.Class | null;
745
+
746
+ /**
747
+ * The custom fields for the invoice line object, added as user-defined data
748
+ * extensions, not included in the standard QuickBooks object.
749
+ */
750
+ customFields: Array<Line.CustomField>;
751
+
752
+ /**
753
+ * A description of this invoice line.
754
+ */
755
+ description: string | null;
756
+
757
+ /**
758
+ * The expiration date for the serial number or lot number of the item associated
759
+ * with this invoice line, in ISO 8601 format (YYYY-MM-DD). This is particularly
760
+ * relevant for perishable or time-sensitive inventory items. Note that this field
761
+ * is only supported on QuickBooks Desktop 2023 or later.
762
+ */
763
+ expirationDate: string | null;
764
+
765
+ /**
766
+ * The site location where inventory for the item associated with this invoice line
767
+ * is stored.
768
+ */
769
+ inventorySite: Line.InventorySite | null;
770
+
771
+ /**
772
+ * The specific location (e.g., bin or shelf) within the inventory site where the
773
+ * item associated with this invoice line is stored.
774
+ */
775
+ inventorySiteLocation: Line.InventorySiteLocation | null;
776
+
777
+ /**
778
+ * The item associated with this invoice line. This can refer to any good or
779
+ * service that the business buys or sells, including item types such as a service
780
+ * item, inventory item, or special calculation item like a discount item or
781
+ * sales-tax item.
782
+ */
783
+ item: Line.Item | null;
784
+
785
+ /**
786
+ * The lot number of the item associated with this invoice line. Used for tracking
787
+ * groups of inventory items that are purchased or manufactured together.
788
+ */
789
+ lotNumber: string | null;
790
+
791
+ /**
792
+ * The type of object. This value is always `"qbd_invoice_line"`.
793
+ */
794
+ objectType: 'qbd_invoice_line';
795
+
796
+ /**
797
+ * A built-in custom field for additional information specific to this invoice
798
+ * line. Unlike the user-defined fields in the `customFields` array, this is a
799
+ * standard QuickBooks field that exists for all invoice lines for convenience.
800
+ * Developers often use this field for tracking information that doesn't fit into
801
+ * other standard QuickBooks fields. Hidden by default in the QuickBooks UI.
802
+ */
803
+ otherCustomField1: string | null;
804
+
805
+ /**
806
+ * A second built-in custom field for additional information specific to this
807
+ * invoice line. Unlike the user-defined fields in the `customFields` array, this
808
+ * is a standard QuickBooks field that exists for all invoice lines for
809
+ * convenience. Like `otherCustomField1`, developers often use this field for
810
+ * tracking information that doesn't fit into other standard QuickBooks fields.
811
+ * Hidden by default in the QuickBooks UI.
812
+ */
813
+ otherCustomField2: string | null;
814
+
815
+ /**
816
+ * Specifies an alternative unit-of-measure set when updating this invoice line's
817
+ * `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to select
818
+ * units from a different set than the item's default unit-of-measure set, which
819
+ * remains unchanged on the item itself. The override applies only to this specific
820
+ * line. For example, you can sell an item typically measured in volume units using
821
+ * weight units in a specific transaction by specifying a different unit-of-measure
822
+ * set with this field.
823
+ */
824
+ overrideUnitOfMeasureSet: Line.OverrideUnitOfMeasureSet | null;
825
+
826
+ /**
827
+ * The quantity of the item associated with this invoice line. This field cannot be
828
+ * cleared.
829
+ *
830
+ * **NOTE**: Do not use this field if the associated item is a discount item.
831
+ */
832
+ quantity: number | null;
833
+
834
+ /**
835
+ * The price per unit for this invoice line. If both `rate` and `amount` are
836
+ * specified, `rate` will be ignored. If both `quantity` and `amount` are specified
837
+ * but not `rate`, QuickBooks will use them to calculate `rate`. Represented as a
838
+ * decimal string. This field cannot be cleared.
839
+ */
840
+ rate: string | null;
841
+
842
+ /**
843
+ * The price of this invoice line expressed as a percentage. Typically used for
844
+ * discount or markup items.
845
+ */
846
+ ratePercent: string | null;
847
+
848
+ /**
849
+ * The sales-tax code for this invoice line, determining whether it is taxable or
850
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
851
+ * transaction or the associated item.
852
+ *
853
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
854
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
855
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
856
+ * non-taxable code to all sales.
857
+ */
858
+ salesTaxCode: Line.SalesTaxCode | null;
859
+
860
+ /**
861
+ * The serial number of the item associated with this invoice line. This is used
862
+ * for tracking individual units of serialized inventory items.
863
+ */
864
+ serialNumber: string | null;
865
+
866
+ /**
867
+ * The date on which the service for this invoice line was or will be performed, in
868
+ * ISO 8601 format (YYYY-MM-DD). This is particularly relevant for service items.
869
+ */
870
+ serviceDate: string | null;
871
+
872
+ /**
873
+ * The unit-of-measure used for the `quantity` in this invoice line. Must be a
874
+ * valid unit within the item's available units of measure.
875
+ */
876
+ unitOfMeasure: string | null;
877
+ }
878
+
879
+ export namespace Line {
880
+ /**
881
+ * The invoice line's class. Classes can be used to categorize objects into
882
+ * meaningful segments, such as department, location, or type of work. In
883
+ * QuickBooks, class tracking is off by default. If a class is specified for the
884
+ * entire parent transaction, it is automatically applied to all invoice lines
885
+ * unless overridden here, at the transaction line level.
886
+ */
887
+ export interface Class {
888
+ /**
889
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
890
+ * across all objects of the same type, but not across different QuickBooks object
891
+ * types.
892
+ */
893
+ id: string | null;
894
+
895
+ /**
896
+ * The fully-qualified unique name for this object, formed by combining the names
897
+ * of its parent objects with its own `name`, separated by colons. Not
898
+ * case-sensitive.
899
+ */
900
+ fullName: string | null;
901
+ }
902
+
903
+ export interface CustomField {
904
+ /**
905
+ * The name of the custom field, unique for the specified `ownerId`. For public
906
+ * custom fields, this name is visible as a label in the QuickBooks UI.
907
+ */
908
+ name: string;
909
+
910
+ /**
911
+ * The identifier of the owner of the custom field, which QuickBooks internally
912
+ * calls a "data extension". For public custom fields visible in the UI, such as
913
+ * those added by the QuickBooks user, this is always "0". For private custom
914
+ * fields that are only visible to the application that created them, this is a
915
+ * valid GUID identifying the owning application. Internally, Conductor always
916
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
917
+ * objects.
918
+ */
919
+ ownerId: string;
920
+
921
+ /**
922
+ * The data type of this custom field.
923
+ */
924
+ type:
925
+ | 'amount_type'
926
+ | 'date_time_type'
927
+ | 'integer_type'
928
+ | 'percent_type'
929
+ | 'price_type'
930
+ | 'quantity_type'
931
+ | 'string_1024_type'
932
+ | 'string_255_type';
933
+
934
+ /**
935
+ * The value of this custom field. The maximum length depends on the field's data
936
+ * type.
937
+ */
938
+ value: string;
939
+ }
940
+
941
+ /**
942
+ * The site location where inventory for the item associated with this invoice line
943
+ * is stored.
944
+ */
945
+ export interface InventorySite {
946
+ /**
947
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
948
+ * across all objects of the same type, but not across different QuickBooks object
949
+ * types.
950
+ */
951
+ id: string | null;
952
+
953
+ /**
954
+ * The fully-qualified unique name for this object, formed by combining the names
955
+ * of its parent objects with its own `name`, separated by colons. Not
956
+ * case-sensitive.
957
+ */
958
+ fullName: string | null;
959
+ }
960
+
961
+ /**
962
+ * The specific location (e.g., bin or shelf) within the inventory site where the
963
+ * item associated with this invoice line is stored.
964
+ */
965
+ export interface InventorySiteLocation {
966
+ /**
967
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
968
+ * across all objects of the same type, but not across different QuickBooks object
969
+ * types.
970
+ */
971
+ id: string | null;
972
+
973
+ /**
974
+ * The fully-qualified unique name for this object, formed by combining the names
975
+ * of its parent objects with its own `name`, separated by colons. Not
976
+ * case-sensitive.
977
+ */
978
+ fullName: string | null;
979
+ }
980
+
981
+ /**
982
+ * The item associated with this invoice line. This can refer to any good or
983
+ * service that the business buys or sells, including item types such as a service
984
+ * item, inventory item, or special calculation item like a discount item or
985
+ * sales-tax item.
986
+ */
987
+ export interface Item {
988
+ /**
989
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
990
+ * across all objects of the same type, but not across different QuickBooks object
991
+ * types.
992
+ */
993
+ id: string | null;
994
+
995
+ /**
996
+ * The fully-qualified unique name for this object, formed by combining the names
997
+ * of its parent objects with its own `name`, separated by colons. Not
998
+ * case-sensitive.
999
+ */
1000
+ fullName: string | null;
1001
+ }
1002
+
1003
+ /**
1004
+ * Specifies an alternative unit-of-measure set when updating this invoice line's
1005
+ * `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to select
1006
+ * units from a different set than the item's default unit-of-measure set, which
1007
+ * remains unchanged on the item itself. The override applies only to this specific
1008
+ * line. For example, you can sell an item typically measured in volume units using
1009
+ * weight units in a specific transaction by specifying a different unit-of-measure
1010
+ * set with this field.
1011
+ */
1012
+ export interface OverrideUnitOfMeasureSet {
1013
+ /**
1014
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1015
+ * across all objects of the same type, but not across different QuickBooks object
1016
+ * types.
1017
+ */
1018
+ id: string | null;
1019
+
1020
+ /**
1021
+ * The fully-qualified unique name for this object, formed by combining the names
1022
+ * of its parent objects with its own `name`, separated by colons. Not
1023
+ * case-sensitive.
1024
+ */
1025
+ fullName: string | null;
1026
+ }
1027
+
1028
+ /**
1029
+ * The sales-tax code for this invoice line, determining whether it is taxable or
1030
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
1031
+ * transaction or the associated item.
1032
+ *
1033
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1034
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1035
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1036
+ * non-taxable code to all sales.
1037
+ */
1038
+ export interface SalesTaxCode {
1039
+ /**
1040
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1041
+ * across all objects of the same type, but not across different QuickBooks object
1042
+ * types.
1043
+ */
1044
+ id: string | null;
1045
+
1046
+ /**
1047
+ * The fully-qualified unique name for this object, formed by combining the names
1048
+ * of its parent objects with its own `name`, separated by colons. Not
1049
+ * case-sensitive.
1050
+ */
1051
+ fullName: string | null;
1052
+ }
1053
+ }
1054
+
1055
+ /**
1056
+ * Specifies an alternative unit-of-measure set when updating this invoice line
1057
+ * group's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to
1058
+ * select units from a different set than the item's default unit-of-measure set,
1059
+ * which remains unchanged on the item itself. The override applies only to this
1060
+ * specific line. For example, you can sell an item typically measured in volume
1061
+ * units using weight units in a specific transaction by specifying a different
1062
+ * unit-of-measure set with this field.
1063
+ */
1064
+ export interface OverrideUnitOfMeasureSet {
1065
+ /**
1066
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1067
+ * across all objects of the same type, but not across different QuickBooks object
1068
+ * types.
1069
+ */
1070
+ id: string | null;
1071
+
1072
+ /**
1073
+ * The fully-qualified unique name for this object, formed by combining the names
1074
+ * of its parent objects with its own `name`, separated by colons. Not
1075
+ * case-sensitive.
1076
+ */
1077
+ fullName: string | null;
1078
+ }
1079
+ }
1080
+
1081
+ export interface Line {
1082
+ /**
1083
+ * The unique identifier assigned by QuickBooks to this invoice line. This ID is
1084
+ * unique across all transaction line types.
1085
+ */
1086
+ id: string;
1087
+
1088
+ /**
1089
+ * The monetary amount of this invoice line, represented as a decimal string. If
1090
+ * both `quantity` and `rate` are specified but not `amount`, QuickBooks will use
1091
+ * them to calculate `amount`. If `amount`, `rate`, and `quantity` are all
1092
+ * unspecified, then QuickBooks will calculate `amount` based on a `quantity` of
1093
+ * `1` and the suggested `rate`. This field cannot be cleared.
1094
+ */
1095
+ amount: string | null;
1096
+
1097
+ /**
1098
+ * The invoice line's class. Classes can be used to categorize objects into
1099
+ * meaningful segments, such as department, location, or type of work. In
1100
+ * QuickBooks, class tracking is off by default. If a class is specified for the
1101
+ * entire parent transaction, it is automatically applied to all invoice lines
1102
+ * unless overridden here, at the transaction line level.
1103
+ */
1104
+ class: Line.Class | null;
1105
+
1106
+ /**
1107
+ * The custom fields for the invoice line object, added as user-defined data
1108
+ * extensions, not included in the standard QuickBooks object.
1109
+ */
1110
+ customFields: Array<Line.CustomField>;
1111
+
1112
+ /**
1113
+ * A description of this invoice line.
1114
+ */
1115
+ description: string | null;
1116
+
1117
+ /**
1118
+ * The expiration date for the serial number or lot number of the item associated
1119
+ * with this invoice line, in ISO 8601 format (YYYY-MM-DD). This is particularly
1120
+ * relevant for perishable or time-sensitive inventory items. Note that this field
1121
+ * is only supported on QuickBooks Desktop 2023 or later.
1122
+ */
1123
+ expirationDate: string | null;
1124
+
1125
+ /**
1126
+ * The site location where inventory for the item associated with this invoice line
1127
+ * is stored.
1128
+ */
1129
+ inventorySite: Line.InventorySite | null;
1130
+
1131
+ /**
1132
+ * The specific location (e.g., bin or shelf) within the inventory site where the
1133
+ * item associated with this invoice line is stored.
1134
+ */
1135
+ inventorySiteLocation: Line.InventorySiteLocation | null;
1136
+
1137
+ /**
1138
+ * The item associated with this invoice line. This can refer to any good or
1139
+ * service that the business buys or sells, including item types such as a service
1140
+ * item, inventory item, or special calculation item like a discount item or
1141
+ * sales-tax item.
1142
+ */
1143
+ item: Line.Item | null;
1144
+
1145
+ /**
1146
+ * The lot number of the item associated with this invoice line. Used for tracking
1147
+ * groups of inventory items that are purchased or manufactured together.
1148
+ */
1149
+ lotNumber: string | null;
1150
+
1151
+ /**
1152
+ * The type of object. This value is always `"qbd_invoice_line"`.
1153
+ */
1154
+ objectType: 'qbd_invoice_line';
1155
+
1156
+ /**
1157
+ * A built-in custom field for additional information specific to this invoice
1158
+ * line. Unlike the user-defined fields in the `customFields` array, this is a
1159
+ * standard QuickBooks field that exists for all invoice lines for convenience.
1160
+ * Developers often use this field for tracking information that doesn't fit into
1161
+ * other standard QuickBooks fields. Hidden by default in the QuickBooks UI.
1162
+ */
1163
+ otherCustomField1: string | null;
1164
+
1165
+ /**
1166
+ * A second built-in custom field for additional information specific to this
1167
+ * invoice line. Unlike the user-defined fields in the `customFields` array, this
1168
+ * is a standard QuickBooks field that exists for all invoice lines for
1169
+ * convenience. Like `otherCustomField1`, developers often use this field for
1170
+ * tracking information that doesn't fit into other standard QuickBooks fields.
1171
+ * Hidden by default in the QuickBooks UI.
1172
+ */
1173
+ otherCustomField2: string | null;
1174
+
1175
+ /**
1176
+ * Specifies an alternative unit-of-measure set when updating this invoice line's
1177
+ * `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to select
1178
+ * units from a different set than the item's default unit-of-measure set, which
1179
+ * remains unchanged on the item itself. The override applies only to this specific
1180
+ * line. For example, you can sell an item typically measured in volume units using
1181
+ * weight units in a specific transaction by specifying a different unit-of-measure
1182
+ * set with this field.
1183
+ */
1184
+ overrideUnitOfMeasureSet: Line.OverrideUnitOfMeasureSet | null;
1185
+
1186
+ /**
1187
+ * The quantity of the item associated with this invoice line. This field cannot be
1188
+ * cleared.
1189
+ *
1190
+ * **NOTE**: Do not use this field if the associated item is a discount item.
1191
+ */
1192
+ quantity: number | null;
1193
+
1194
+ /**
1195
+ * The price per unit for this invoice line. If both `rate` and `amount` are
1196
+ * specified, `rate` will be ignored. If both `quantity` and `amount` are specified
1197
+ * but not `rate`, QuickBooks will use them to calculate `rate`. Represented as a
1198
+ * decimal string. This field cannot be cleared.
1199
+ */
1200
+ rate: string | null;
1201
+
1202
+ /**
1203
+ * The price of this invoice line expressed as a percentage. Typically used for
1204
+ * discount or markup items.
1205
+ */
1206
+ ratePercent: string | null;
1207
+
1208
+ /**
1209
+ * The sales-tax code for this invoice line, determining whether it is taxable or
1210
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
1211
+ * transaction or the associated item.
1212
+ *
1213
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1214
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1215
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1216
+ * non-taxable code to all sales.
1217
+ */
1218
+ salesTaxCode: Line.SalesTaxCode | null;
1219
+
1220
+ /**
1221
+ * The serial number of the item associated with this invoice line. This is used
1222
+ * for tracking individual units of serialized inventory items.
1223
+ */
1224
+ serialNumber: string | null;
1225
+
1226
+ /**
1227
+ * The date on which the service for this invoice line was or will be performed, in
1228
+ * ISO 8601 format (YYYY-MM-DD). This is particularly relevant for service items.
1229
+ */
1230
+ serviceDate: string | null;
1231
+
1232
+ /**
1233
+ * The unit-of-measure used for the `quantity` in this invoice line. Must be a
1234
+ * valid unit within the item's available units of measure.
1235
+ */
1236
+ unitOfMeasure: string | null;
1237
+ }
1238
+
1239
+ export namespace Line {
1240
+ /**
1241
+ * The invoice line's class. Classes can be used to categorize objects into
1242
+ * meaningful segments, such as department, location, or type of work. In
1243
+ * QuickBooks, class tracking is off by default. If a class is specified for the
1244
+ * entire parent transaction, it is automatically applied to all invoice lines
1245
+ * unless overridden here, at the transaction line level.
1246
+ */
1247
+ export interface Class {
1248
+ /**
1249
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1250
+ * across all objects of the same type, but not across different QuickBooks object
1251
+ * types.
1252
+ */
1253
+ id: string | null;
1254
+
1255
+ /**
1256
+ * The fully-qualified unique name for this object, formed by combining the names
1257
+ * of its parent objects with its own `name`, separated by colons. Not
1258
+ * case-sensitive.
1259
+ */
1260
+ fullName: string | null;
1261
+ }
1262
+
1263
+ export interface CustomField {
1264
+ /**
1265
+ * The name of the custom field, unique for the specified `ownerId`. For public
1266
+ * custom fields, this name is visible as a label in the QuickBooks UI.
1267
+ */
1268
+ name: string;
1269
+
1270
+ /**
1271
+ * The identifier of the owner of the custom field, which QuickBooks internally
1272
+ * calls a "data extension". For public custom fields visible in the UI, such as
1273
+ * those added by the QuickBooks user, this is always "0". For private custom
1274
+ * fields that are only visible to the application that created them, this is a
1275
+ * valid GUID identifying the owning application. Internally, Conductor always
1276
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
1277
+ * objects.
1278
+ */
1279
+ ownerId: string;
1280
+
1281
+ /**
1282
+ * The data type of this custom field.
1283
+ */
1284
+ type:
1285
+ | 'amount_type'
1286
+ | 'date_time_type'
1287
+ | 'integer_type'
1288
+ | 'percent_type'
1289
+ | 'price_type'
1290
+ | 'quantity_type'
1291
+ | 'string_1024_type'
1292
+ | 'string_255_type';
1293
+
1294
+ /**
1295
+ * The value of this custom field. The maximum length depends on the field's data
1296
+ * type.
1297
+ */
1298
+ value: string;
1299
+ }
1300
+
1301
+ /**
1302
+ * The site location where inventory for the item associated with this invoice line
1303
+ * is stored.
1304
+ */
1305
+ export interface InventorySite {
1306
+ /**
1307
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1308
+ * across all objects of the same type, but not across different QuickBooks object
1309
+ * types.
1310
+ */
1311
+ id: string | null;
1312
+
1313
+ /**
1314
+ * The fully-qualified unique name for this object, formed by combining the names
1315
+ * of its parent objects with its own `name`, separated by colons. Not
1316
+ * case-sensitive.
1317
+ */
1318
+ fullName: string | null;
1319
+ }
1320
+
1321
+ /**
1322
+ * The specific location (e.g., bin or shelf) within the inventory site where the
1323
+ * item associated with this invoice line is stored.
1324
+ */
1325
+ export interface InventorySiteLocation {
1326
+ /**
1327
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1328
+ * across all objects of the same type, but not across different QuickBooks object
1329
+ * types.
1330
+ */
1331
+ id: string | null;
1332
+
1333
+ /**
1334
+ * The fully-qualified unique name for this object, formed by combining the names
1335
+ * of its parent objects with its own `name`, separated by colons. Not
1336
+ * case-sensitive.
1337
+ */
1338
+ fullName: string | null;
1339
+ }
1340
+
1341
+ /**
1342
+ * The item associated with this invoice line. This can refer to any good or
1343
+ * service that the business buys or sells, including item types such as a service
1344
+ * item, inventory item, or special calculation item like a discount item or
1345
+ * sales-tax item.
1346
+ */
1347
+ export interface Item {
1348
+ /**
1349
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1350
+ * across all objects of the same type, but not across different QuickBooks object
1351
+ * types.
1352
+ */
1353
+ id: string | null;
1354
+
1355
+ /**
1356
+ * The fully-qualified unique name for this object, formed by combining the names
1357
+ * of its parent objects with its own `name`, separated by colons. Not
1358
+ * case-sensitive.
1359
+ */
1360
+ fullName: string | null;
1361
+ }
1362
+
1363
+ /**
1364
+ * Specifies an alternative unit-of-measure set when updating this invoice line's
1365
+ * `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to select
1366
+ * units from a different set than the item's default unit-of-measure set, which
1367
+ * remains unchanged on the item itself. The override applies only to this specific
1368
+ * line. For example, you can sell an item typically measured in volume units using
1369
+ * weight units in a specific transaction by specifying a different unit-of-measure
1370
+ * set with this field.
1371
+ */
1372
+ export interface OverrideUnitOfMeasureSet {
1373
+ /**
1374
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1375
+ * across all objects of the same type, but not across different QuickBooks object
1376
+ * types.
1377
+ */
1378
+ id: string | null;
1379
+
1380
+ /**
1381
+ * The fully-qualified unique name for this object, formed by combining the names
1382
+ * of its parent objects with its own `name`, separated by colons. Not
1383
+ * case-sensitive.
1384
+ */
1385
+ fullName: string | null;
1386
+ }
1387
+
1388
+ /**
1389
+ * The sales-tax code for this invoice line, determining whether it is taxable or
1390
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
1391
+ * transaction or the associated item.
1392
+ *
1393
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1394
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1395
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1396
+ * non-taxable code to all sales.
1397
+ */
1398
+ export interface SalesTaxCode {
1399
+ /**
1400
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1401
+ * across all objects of the same type, but not across different QuickBooks object
1402
+ * types.
1403
+ */
1404
+ id: string | null;
1405
+
1406
+ /**
1407
+ * The fully-qualified unique name for this object, formed by combining the names
1408
+ * of its parent objects with its own `name`, separated by colons. Not
1409
+ * case-sensitive.
1410
+ */
1411
+ fullName: string | null;
1412
+ }
1413
+ }
1414
+
1415
+ export interface LinkedTransaction {
1416
+ /**
1417
+ * The unique identifier assigned by QuickBooks to this linked transaction. This ID
1418
+ * is unique across all transaction types.
1419
+ */
1420
+ id: string;
1421
+
1422
+ /**
1423
+ * The monetary amount of this linked transaction, represented as a decimal string.
1424
+ */
1425
+ amount: string | null;
1426
+
1427
+ /**
1428
+ * Indicates the nature of the link between the transactions: `amount` denotes an
1429
+ * amount-based link (e.g., an invoice linked to a payment), and `quantity` denotes
1430
+ * a quantity-based link (e.g., an invoice created from a sales order based on the
1431
+ * quantity of items received).
1432
+ */
1433
+ linkType: 'amount' | 'quantity' | null;
1434
+
1435
+ /**
1436
+ * The type of object. This value is always `"qbd_linked_transaction"`.
1437
+ */
1438
+ objectType: 'qbd_linked_transaction';
1439
+
1440
+ /**
1441
+ * The case-sensitive user-defined reference number for this linked transaction,
1442
+ * which can be used to identify the transaction in QuickBooks. This value is not
1443
+ * required to be unique and can be arbitrarily changed by the QuickBooks user.
1444
+ */
1445
+ refNumber: string | null;
1446
+
1447
+ /**
1448
+ * The date of this linked transaction, in ISO 8601 format (YYYY-MM-DD).
1449
+ */
1450
+ transactionDate: string;
1451
+
1452
+ /**
1453
+ * The type of transaction for this linked transaction.
1454
+ */
1455
+ transactionType:
1456
+ | 'ar_refund_credit_card'
1457
+ | 'bill'
1458
+ | 'bill_payment_check'
1459
+ | 'bill_payment_credit_card'
1460
+ | 'build_assembly'
1461
+ | 'charge'
1462
+ | 'check'
1463
+ | 'credit_card_charge'
1464
+ | 'credit_card_credit'
1465
+ | 'credit_memo'
1466
+ | 'deposit'
1467
+ | 'estimate'
1468
+ | 'inventory_adjustment'
1469
+ | 'invoice'
1470
+ | 'item_receipt'
1471
+ | 'journal_entry'
1472
+ | 'liability_adjustment'
1473
+ | 'paycheck'
1474
+ | 'payroll_liability_check'
1475
+ | 'purchase_order'
1476
+ | 'receive_payment'
1477
+ | 'sales_order'
1478
+ | 'sales_receipt'
1479
+ | 'sales_tax_payment_check'
1480
+ | 'transfer'
1481
+ | 'vendor_credit'
1482
+ | 'ytd_adjustment';
1483
+ }
1484
+
1485
+ /**
1486
+ * The Accounts-Receivable (A/R) account to which this invoice is assigned, used to
1487
+ * track the amount owed. If not specified, QuickBooks Desktop will use its default
1488
+ * A/R account.
1489
+ *
1490
+ * **IMPORTANT**: If this invoice is linked to other transactions, this A/R account
1491
+ * must match the `receivablesAccount` used in all linked transactions. For
1492
+ * example, when refunding a credit card payment, the A/R account must match the
1493
+ * one used in the original credit transactions being refunded.
1494
+ */
1495
+ export interface ReceivablesAccount {
1496
+ /**
1497
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1498
+ * across all objects of the same type, but not across different QuickBooks object
1499
+ * types.
1500
+ */
1501
+ id: string | null;
1502
+
1503
+ /**
1504
+ * The fully-qualified unique name for this object, formed by combining the names
1505
+ * of its parent objects with its own `name`, separated by colons. Not
1506
+ * case-sensitive.
1507
+ */
1508
+ fullName: string | null;
1509
+ }
1510
+
1511
+ /**
1512
+ * The invoice's sales representative. Sales representatives can be employees,
1513
+ * vendors, or other names in QuickBooks.
1514
+ */
1515
+ export interface SalesRepresentative {
1516
+ /**
1517
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1518
+ * across all objects of the same type, but not across different QuickBooks object
1519
+ * types.
1520
+ */
1521
+ id: string | null;
1522
+
1523
+ /**
1524
+ * The fully-qualified unique name for this object, formed by combining the names
1525
+ * of its parent objects with its own `name`, separated by colons. Not
1526
+ * case-sensitive.
1527
+ */
1528
+ fullName: string | null;
1529
+ }
1530
+
1531
+ /**
1532
+ * The sales-tax code for this invoice, determining whether it is taxable or
1533
+ * non-taxable. This can be overridden at the transaction-line level.
1534
+ *
1535
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1536
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1537
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1538
+ * non-taxable code to all sales.
1539
+ */
1540
+ export interface SalesTaxCode {
1541
+ /**
1542
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1543
+ * across all objects of the same type, but not across different QuickBooks object
1544
+ * types.
1545
+ */
1546
+ id: string | null;
1547
+
1548
+ /**
1549
+ * The fully-qualified unique name for this object, formed by combining the names
1550
+ * of its parent objects with its own `name`, separated by colons. Not
1551
+ * case-sensitive.
1552
+ */
1553
+ fullName: string | null;
1554
+ }
1555
+
1556
+ /**
1557
+ * The sales-tax item used to calculate the actual tax amount for this invoice's
1558
+ * transactions by applying a specific tax rate collected for a single tax agency.
1559
+ * Unlike `salesTaxCode`, which only indicates general taxability, this field
1560
+ * drives the actual tax calculation and reporting.
1561
+ *
1562
+ * For invoices, while using this field to specify a single tax item/group that
1563
+ * applies uniformly is recommended, complex tax scenarios may require alternative
1564
+ * approaches. In such cases, you can set this field to a 0% tax item
1565
+ * (conventionally named "Tax Calculated On Invoice") and handle tax calculations
1566
+ * through line items instead. When using line items for taxes, note that only
1567
+ * individual tax items (not tax groups) can be used, subtotals can help apply a
1568
+ * tax to multiple items but only the first tax line after a subtotal is calculated
1569
+ * automatically (subsequent tax lines require manual amounts), and the rate column
1570
+ * will always display the actual tax amount rather than the rate percentage.
1571
+ */
1572
+ export interface SalesTaxItem {
1573
+ /**
1574
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1575
+ * across all objects of the same type, but not across different QuickBooks object
1576
+ * types.
1577
+ */
1578
+ id: string | null;
1579
+
1580
+ /**
1581
+ * The fully-qualified unique name for this object, formed by combining the names
1582
+ * of its parent objects with its own `name`, separated by colons. Not
1583
+ * case-sensitive.
1584
+ */
1585
+ fullName: string | null;
1586
+ }
1587
+
1588
+ /**
1589
+ * The invoice's shipping address.
1590
+ */
1591
+ export interface ShippingAddress {
1592
+ /**
1593
+ * The city, district, suburb, town, or village name of the address.
1594
+ */
1595
+ city: string | null;
1596
+
1597
+ /**
1598
+ * The country name of the address.
1599
+ */
1600
+ country: string | null;
1601
+
1602
+ /**
1603
+ * The first line of the address (e.g., street, PO Box, or company name).
1604
+ */
1605
+ line1: string | null;
1606
+
1607
+ /**
1608
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
1609
+ * building).
1610
+ */
1611
+ line2: string | null;
1612
+
1613
+ /**
1614
+ * The third line of the address, if needed.
1615
+ */
1616
+ line3: string | null;
1617
+
1618
+ /**
1619
+ * The fourth line of the address, if needed.
1620
+ */
1621
+ line4: string | null;
1622
+
1623
+ /**
1624
+ * The fifth line of the address, if needed.
1625
+ */
1626
+ line5: string | null;
1627
+
1628
+ /**
1629
+ * A note written at the bottom of the address in the form in which it appears,
1630
+ * such as the invoice form.
1631
+ */
1632
+ note: string | null;
1633
+
1634
+ /**
1635
+ * The postal code or ZIP code of the address.
1636
+ */
1637
+ postalCode: string | null;
1638
+
1639
+ /**
1640
+ * The state, county, province, or region name of the address.
1641
+ */
1642
+ state: string | null;
1643
+ }
1644
+
1645
+ /**
1646
+ * The shipping method used for this invoice, such as standard mail or overnight
1647
+ * delivery.
1648
+ */
1649
+ export interface ShippingMethod {
1650
+ /**
1651
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1652
+ * across all objects of the same type, but not across different QuickBooks object
1653
+ * types.
1654
+ */
1655
+ id: string | null;
1656
+
1657
+ /**
1658
+ * The fully-qualified unique name for this object, formed by combining the names
1659
+ * of its parent objects with its own `name`, separated by colons. Not
1660
+ * case-sensitive.
1661
+ */
1662
+ fullName: string | null;
1663
+ }
1664
+
1665
+ /**
1666
+ * The invoice's payment terms, defining when payment is due and any applicable
1667
+ * discounts.
1668
+ */
1669
+ export interface Terms {
1670
+ /**
1671
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1672
+ * across all objects of the same type, but not across different QuickBooks object
1673
+ * types.
1674
+ */
1675
+ id: string | null;
1676
+
1677
+ /**
1678
+ * The fully-qualified unique name for this object, formed by combining the names
1679
+ * of its parent objects with its own `name`, separated by colons. Not
1680
+ * case-sensitive.
1681
+ */
1682
+ fullName: string | null;
1683
+ }
1684
+ }
1685
+
1686
+ export interface InvoiceDeleteResponse {
1687
+ /**
1688
+ * The QuickBooks-assigned unique identifier of the deleted invoice.
1689
+ */
1690
+ id: string;
1691
+
1692
+ /**
1693
+ * Indicates whether the invoice was deleted.
1694
+ */
1695
+ deleted: boolean;
1696
+
1697
+ /**
1698
+ * The type of object. This value is always `"qbd_invoice"`.
1699
+ */
1700
+ objectType: 'qbd_invoice';
1701
+
1702
+ /**
1703
+ * The case-sensitive user-defined reference number of the deleted invoice.
1704
+ */
1705
+ refNumber: string | null;
1706
+ }
1707
+
1708
+ export interface InvoiceCreateParams {
1709
+ /**
1710
+ * Body param: The customer or customer-job associated with this invoice.
1711
+ */
1712
+ customerId: string;
1713
+
1714
+ /**
1715
+ * Body param: The date of this invoice, in ISO 8601 format (YYYY-MM-DD).
1716
+ */
1717
+ transactionDate: string;
1718
+
1719
+ /**
1720
+ * Header param: The ID of the EndUser to receive this request (e.g.,
1721
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
1722
+ */
1723
+ conductorEndUserId: string;
1724
+
1725
+ /**
1726
+ * Body param: Credit memos to apply to this invoice, reducing its balance. This
1727
+ * creates a link between this invoice and the specified credit memos.
1728
+ *
1729
+ * **IMPORTANT**: By default, QuickBooks will not return any information about the
1730
+ * linked transactions in this endpoint's response even when this request is
1731
+ * successful. To see the transactions linked via this field, refetch the invoice
1732
+ * and check the `linkedTransactions` response field. If fetching a list of
1733
+ * invoices, you must also specify the parameter `includeLinkedTransactions=true`
1734
+ * to see the `linkedTransactions` response field.
1735
+ */
1736
+ applyCredits?: Array<InvoiceCreateParams.ApplyCredit>;
1737
+
1738
+ /**
1739
+ * Body param: The invoice's billing address.
1740
+ */
1741
+ billingAddress?: InvoiceCreateParams.BillingAddress;
1742
+
1743
+ /**
1744
+ * Body param: The invoice's class. Classes can be used to categorize objects into
1745
+ * meaningful segments, such as department, location, or type of work. In
1746
+ * QuickBooks, class tracking is off by default. A class defined here is
1747
+ * automatically used in this invoice's line items unless overridden at the line
1748
+ * item level.
1749
+ */
1750
+ classId?: string;
1751
+
1752
+ /**
1753
+ * Body param: The message to display to the customer on the invoice.
1754
+ */
1755
+ customerMessageId?: string;
1756
+
1757
+ /**
1758
+ * Body param: The predefined template in QuickBooks that determines the layout and
1759
+ * formatting for this invoice when printed or displayed.
1760
+ */
1761
+ documentTemplateId?: string;
1762
+
1763
+ /**
1764
+ * Body param: The date by which this invoice must be paid, in ISO 8601 format
1765
+ * (YYYY-MM-DD).
1766
+ *
1767
+ * **NOTE**: If `dueDate` is excluded when creating this invoice, QuickBooks might
1768
+ * determine the due date according to the terms set for this customer.
1769
+ */
1770
+ dueDate?: string;
1771
+
1772
+ /**
1773
+ * Body param: The market exchange rate between this invoice's currency and the
1774
+ * home currency in QuickBooks at the time of this transaction. Represented as a
1775
+ * decimal value (e.g., 1.2345 for 1 EUR = 1.2345 USD if USD is the home currency).
1776
+ */
1777
+ exchangeRate?: number;
1778
+
1779
+ /**
1780
+ * Body param: A globally unique identifier (GUID) you, the developer, can provide
1781
+ * for tracking this object in your external system. This field is immutable and
1782
+ * can only be set during object creation.
1783
+ *
1784
+ * **IMPORTANT**: This field must be formatted as a valid GUID; otherwise,
1785
+ * QuickBooks will return an error.
1786
+ */
1787
+ externalId?: string;
1788
+
1789
+ /**
1790
+ * Body param: Whether this invoice includes a finance charge. This field is
1791
+ * immutable and can only be set during invoice creation.
1792
+ */
1793
+ isFinanceCharge?: boolean;
1794
+
1795
+ /**
1796
+ * Body param: Indicates whether this invoice has not been completed or is in a
1797
+ * draft version.
1798
+ */
1799
+ isPending?: boolean;
1800
+
1801
+ /**
1802
+ * Body param: Indicates whether this invoice is included in the queue of documents
1803
+ * for QuickBooks to email to the customer.
1804
+ */
1805
+ isQueuedForEmail?: boolean;
1806
+
1807
+ /**
1808
+ * Body param: Indicates whether this invoice is included in the queue of documents
1809
+ * for QuickBooks to print.
1810
+ */
1811
+ isQueuedForPrint?: boolean;
1812
+
1813
+ /**
1814
+ * Body param: The invoice's line item groups, each representing a predefined set
1815
+ * of related items.
1816
+ */
1817
+ lineGroups?: Array<InvoiceCreateParams.LineGroup>;
1818
+
1819
+ /**
1820
+ * Body param: The invoice's line items, each representing a single product or
1821
+ * service sold.
1822
+ */
1823
+ lines?: Array<InvoiceCreateParams.Line>;
1824
+
1825
+ /**
1826
+ * Body param: IDs of existing transactions that you wish to link to this invoice,
1827
+ * such as payments applied, credits used, or associated purchase orders. Note that
1828
+ * this links entire transactions, not individual transaction lines. If you want to
1829
+ * link individual lines in a transaction, instead use the field
1830
+ * `linkToTransactionLine` on this invoice's lines, if available.
1831
+ *
1832
+ * Transactions can only be linked when creating this invoice and cannot be
1833
+ * unlinked later.
1834
+ *
1835
+ * You can use both `linkToTransactionIds` (on this invoice) and
1836
+ * `linkToTransactionLine` (on its transaction lines) as long as they do NOT link
1837
+ * to the same transaction (otherwise, QuickBooks will return an error). QuickBooks
1838
+ * will also return an error if you attempt to link a transaction that is empty or
1839
+ * already closed.
1840
+ *
1841
+ * **IMPORTANT**: By default, QuickBooks will not return any information about the
1842
+ * linked transactions in this endpoint's response even when this request is
1843
+ * successful. To see the transactions linked via this field, refetch the invoice
1844
+ * and check the `linkedTransactions` response field. If fetching a list of
1845
+ * invoices, you must also specify the parameter `includeLinkedTransactions=true`
1846
+ * to see the `linkedTransactions` response field.
1847
+ */
1848
+ linkToTransactionIds?: Array<string>;
1849
+
1850
+ /**
1851
+ * Body param: A memo or note for this invoice that appears in reports, but not on
1852
+ * the invoice. Use `customerMessage` to add a note to this invoice.
1853
+ */
1854
+ memo?: string;
1855
+
1856
+ /**
1857
+ * Body param: A built-in custom field for additional information specific to this
1858
+ * invoice. Unlike the user-defined fields in the `customFields` array, this is a
1859
+ * standard QuickBooks field that exists for all invoices for convenience.
1860
+ * Developers often use this field for tracking information that doesn't fit into
1861
+ * other standard QuickBooks fields. Unlike `otherCustomField1` and
1862
+ * `otherCustomField2`, which are line item fields, this exists at the transaction
1863
+ * level. Hidden by default in the QuickBooks UI.
1864
+ */
1865
+ otherCustomField?: string;
1866
+
1867
+ /**
1868
+ * Body param: The customer's Purchase Order (PO) number associated with this
1869
+ * invoice. This field is often used to cross-reference the invoice with the
1870
+ * customer's purchasing system.
1871
+ */
1872
+ purchaseOrderNumber?: string;
1873
+
1874
+ /**
1875
+ * Body param: The Accounts-Receivable (A/R) account to which this invoice is
1876
+ * assigned, used to track the amount owed. If not specified, QuickBooks Desktop
1877
+ * will use its default A/R account.
1878
+ *
1879
+ * **IMPORTANT**: If this invoice is linked to other transactions, this A/R account
1880
+ * must match the `receivablesAccount` used in all linked transactions. For
1881
+ * example, when refunding a credit card payment, the A/R account must match the
1882
+ * one used in the original credit transactions being refunded.
1883
+ */
1884
+ receivablesAccountId?: string;
1885
+
1886
+ /**
1887
+ * Body param: The case-sensitive user-defined reference number for this invoice,
1888
+ * which can be used to identify the transaction in QuickBooks. This value is not
1889
+ * required to be unique and can be arbitrarily changed by the QuickBooks user.
1890
+ * When left blank in this create request, this field will be left blank in
1891
+ * QuickBooks (i.e., it does _not_ auto-increment).
1892
+ */
1893
+ refNumber?: string;
1894
+
1895
+ /**
1896
+ * Body param: The invoice's sales representative. Sales representatives can be
1897
+ * employees, vendors, or other names in QuickBooks.
1898
+ */
1899
+ salesRepresentativeId?: string;
1900
+
1901
+ /**
1902
+ * Body param: The sales-tax code for this invoice, determining whether it is
1903
+ * taxable or non-taxable. This can be overridden at the transaction-line level.
1904
+ *
1905
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1906
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1907
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1908
+ * non-taxable code to all sales.
1909
+ */
1910
+ salesTaxCodeId?: string;
1911
+
1912
+ /**
1913
+ * Body param: The sales-tax item used to calculate the actual tax amount for this
1914
+ * invoice's transactions by applying a specific tax rate collected for a single
1915
+ * tax agency. Unlike `salesTaxCode`, which only indicates general taxability, this
1916
+ * field drives the actual tax calculation and reporting.
1917
+ *
1918
+ * For invoices, while using this field to specify a single tax item/group that
1919
+ * applies uniformly is recommended, complex tax scenarios may require alternative
1920
+ * approaches. In such cases, you can set this field to a 0% tax item
1921
+ * (conventionally named "Tax Calculated On Invoice") and handle tax calculations
1922
+ * through line items instead. When using line items for taxes, note that only
1923
+ * individual tax items (not tax groups) can be used, subtotals can help apply a
1924
+ * tax to multiple items but only the first tax line after a subtotal is calculated
1925
+ * automatically (subsequent tax lines require manual amounts), and the rate column
1926
+ * will always display the actual tax amount rather than the rate percentage.
1927
+ */
1928
+ salesTaxItemId?: string;
1929
+
1930
+ /**
1931
+ * Body param: The origin location from where the product associated with this
1932
+ * invoice is shipped. This is the point at which ownership and liability for goods
1933
+ * transfer from seller to buyer. Internally, QuickBooks uses the term "FOB" for
1934
+ * this field, which stands for "freight on board". This field is informational and
1935
+ * has no accounting implications.
1936
+ */
1937
+ shipmentOrigin?: string;
1938
+
1939
+ /**
1940
+ * Body param: The invoice's shipping address.
1941
+ */
1942
+ shippingAddress?: InvoiceCreateParams.ShippingAddress;
1943
+
1944
+ /**
1945
+ * Body param: The date when the products or services for this invoice were shipped
1946
+ * or are expected to be shipped, in ISO 8601 format (YYYY-MM-DD).
1947
+ */
1948
+ shippingDate?: string;
1949
+
1950
+ /**
1951
+ * Body param: The shipping method used for this invoice, such as standard mail or
1952
+ * overnight delivery.
1953
+ */
1954
+ shippingMethodId?: string;
1955
+
1956
+ /**
1957
+ * Body param: The invoice's payment terms, defining when payment is due and any
1958
+ * applicable discounts.
1959
+ */
1960
+ termsId?: string;
1961
+ }
1962
+
1963
+ export namespace InvoiceCreateParams {
1964
+ export interface ApplyCredit {
1965
+ /**
1966
+ * The amount of credit applied to this transaction. This could include customer
1967
+ * deposits, payments, or credits. Represented as a decimal string.
1968
+ */
1969
+ appliedAmount: string;
1970
+
1971
+ /**
1972
+ * The unique identifier of the credit transaction (credit memo or vendor credit)
1973
+ * to apply to this transaction.
1974
+ */
1975
+ creditTransactionId: string;
1976
+
1977
+ /**
1978
+ * Indicates whether to override the credit.
1979
+ */
1980
+ overrideCreditApplication?: boolean;
1981
+ }
1982
+
1983
+ /**
1984
+ * The invoice's billing address.
1985
+ */
1986
+ export interface BillingAddress {
1987
+ /**
1988
+ * The city, district, suburb, town, or village name of the address.
1989
+ *
1990
+ * Maximum length: 31 characters.
1991
+ */
1992
+ city?: string;
1993
+
1994
+ /**
1995
+ * The country name of the address.
1996
+ */
1997
+ country?: string;
1998
+
1999
+ /**
2000
+ * The first line of the address (e.g., street, PO Box, or company name).
2001
+ *
2002
+ * Maximum length: 41 characters.
2003
+ */
2004
+ line1?: string;
2005
+
2006
+ /**
2007
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
2008
+ * building).
2009
+ *
2010
+ * Maximum length: 41 characters.
2011
+ */
2012
+ line2?: string;
2013
+
2014
+ /**
2015
+ * The third line of the address, if needed.
2016
+ *
2017
+ * Maximum length: 41 characters.
2018
+ */
2019
+ line3?: string;
2020
+
2021
+ /**
2022
+ * The fourth line of the address, if needed.
2023
+ *
2024
+ * Maximum length: 41 characters.
2025
+ */
2026
+ line4?: string;
2027
+
2028
+ /**
2029
+ * The fifth line of the address, if needed.
2030
+ *
2031
+ * Maximum length: 41 characters.
2032
+ */
2033
+ line5?: string;
2034
+
2035
+ /**
2036
+ * A note written at the bottom of the address in the form in which it appears,
2037
+ * such as the invoice form.
2038
+ */
2039
+ note?: string;
2040
+
2041
+ /**
2042
+ * The postal code or ZIP code of the address.
2043
+ *
2044
+ * Maximum length: 13 characters.
2045
+ */
2046
+ postalCode?: string;
2047
+
2048
+ /**
2049
+ * The state, county, province, or region name of the address.
2050
+ *
2051
+ * Maximum length: 21 characters.
2052
+ */
2053
+ state?: string;
2054
+ }
2055
+
2056
+ export interface LineGroup {
2057
+ /**
2058
+ * The invoice line group's item group, representing a predefined set of items
2059
+ * bundled because they are commonly purchased together or grouped for faster
2060
+ * entry.
2061
+ */
2062
+ itemGroupId: string;
2063
+
2064
+ /**
2065
+ * The custom fields for the invoice line group object, added as user-defined data
2066
+ * extensions, not included in the standard QuickBooks object.
2067
+ */
2068
+ customFields?: Array<LineGroup.CustomField>;
2069
+
2070
+ /**
2071
+ * The site location where inventory for the item group associated with this
2072
+ * invoice line group is stored.
2073
+ */
2074
+ inventorySiteId?: string;
2075
+
2076
+ /**
2077
+ * The specific location (e.g., bin or shelf) within the inventory site where the
2078
+ * item group associated with this invoice line group is stored.
2079
+ */
2080
+ inventorySiteLocationId?: string;
2081
+
2082
+ /**
2083
+ * The quantity of the item group associated with this invoice line group. This
2084
+ * field cannot be cleared.
2085
+ *
2086
+ * **NOTE**: Do not use this field if the associated item group is a discount item
2087
+ * group.
2088
+ */
2089
+ quantity?: number;
2090
+
2091
+ /**
2092
+ * The unit-of-measure used for the `quantity` in this invoice line group. Must be
2093
+ * a valid unit within the item's available units of measure.
2094
+ */
2095
+ unitOfMeasure?: string;
2096
+ }
2097
+
2098
+ export namespace LineGroup {
2099
+ export interface CustomField {
2100
+ /**
2101
+ * The name of the custom field, unique for the specified `ownerId`. For public
2102
+ * custom fields, this name is visible as a label in the QuickBooks UI.
2103
+ */
2104
+ name: string;
2105
+
2106
+ /**
2107
+ * The identifier of the owner of the custom field, which QuickBooks internally
2108
+ * calls a "data extension". For public custom fields visible in the UI, such as
2109
+ * those added by the QuickBooks user, this is always "0". For private custom
2110
+ * fields that are only visible to the application that created them, this is a
2111
+ * valid GUID identifying the owning application. Internally, Conductor always
2112
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
2113
+ * objects.
2114
+ */
2115
+ ownerId: string;
2116
+
2117
+ /**
2118
+ * The value of this custom field. The maximum length depends on the field's data
2119
+ * type.
2120
+ */
2121
+ value: string;
2122
+ }
2123
+ }
2124
+
2125
+ export interface Line {
2126
+ /**
2127
+ * The monetary amount of this invoice line, represented as a decimal string. If
2128
+ * both `quantity` and `rate` are specified but not `amount`, QuickBooks will use
2129
+ * them to calculate `amount`. If `amount`, `rate`, and `quantity` are all
2130
+ * unspecified, then QuickBooks will calculate `amount` based on a `quantity` of
2131
+ * `1` and the suggested `rate`. This field cannot be cleared.
2132
+ */
2133
+ amount?: string;
2134
+
2135
+ /**
2136
+ * The invoice line's class. Classes can be used to categorize objects into
2137
+ * meaningful segments, such as department, location, or type of work. In
2138
+ * QuickBooks, class tracking is off by default. If a class is specified for the
2139
+ * entire parent transaction, it is automatically applied to all invoice lines
2140
+ * unless overridden here, at the transaction line level.
2141
+ */
2142
+ classId?: string;
2143
+
2144
+ /**
2145
+ * The custom fields for the invoice line object, added as user-defined data
2146
+ * extensions, not included in the standard QuickBooks object.
2147
+ */
2148
+ customFields?: Array<Line.CustomField>;
2149
+
2150
+ /**
2151
+ * A description of this invoice line.
2152
+ */
2153
+ description?: string;
2154
+
2155
+ /**
2156
+ * The site location where inventory for the item associated with this invoice line
2157
+ * is stored.
2158
+ */
2159
+ inventorySiteId?: string;
2160
+
2161
+ /**
2162
+ * The specific location (e.g., bin or shelf) within the inventory site where the
2163
+ * item associated with this invoice line is stored.
2164
+ */
2165
+ inventorySiteLocationId?: string;
2166
+
2167
+ /**
2168
+ * The item associated with this invoice line. This can refer to any good or
2169
+ * service that the business buys or sells, including item types such as a service
2170
+ * item, inventory item, or special calculation item like a discount item or
2171
+ * sales-tax item.
2172
+ */
2173
+ itemId?: string;
2174
+
2175
+ /**
2176
+ * An existing transaction line that you wish to link to this invoice line. Note
2177
+ * that this only links to a single transaction line item, not an entire
2178
+ * transaction. If you want to link an entire transaction and bring in all its
2179
+ * lines, instead use the field `linkToTransactionIds` on the parent transaction,
2180
+ * if available. For invoice lines, you can only link to sales orders; QuickBooks
2181
+ * does not support linking invoice lines to other transaction types.
2182
+ *
2183
+ * Transaction lines can only be linked when creating this invoice line and cannot
2184
+ * be unlinked later.
2185
+ *
2186
+ * **IMPORTANT**: If you use `linkToTransactionLine` on this invoice line, you
2187
+ * cannot use the field `item` on this line (QuickBooks will return an error)
2188
+ * because this field brings in all of the item information you need. You can,
2189
+ * however, specify whatever `quantity` or `rate` that you want, or any other
2190
+ * transaction line element other than `item`.
2191
+ *
2192
+ * If the parent transaction supports the `linkToTransactionIds` field, you can use
2193
+ * both `linkToTransactionLine` (on this invoice line) and `linkToTransactionIds`
2194
+ * (on its parent transaction) in the same request as long as they do NOT link to
2195
+ * the same transaction (otherwise, QuickBooks will return an error). QuickBooks
2196
+ * will also return an error if you attempt to link a transaction that is empty or
2197
+ * already closed.
2198
+ *
2199
+ * **IMPORTANT**: By default, QuickBooks will not return any information about the
2200
+ * linked transaction line in this endpoint's response even when this request is
2201
+ * successful. To see the transaction line linked via this field, refetch the
2202
+ * parent invoice and check the `linkedTransactions` response field. If fetching a
2203
+ * list of invoices, you must also specify the parameter
2204
+ * `includeLinkedTransactions=true` to see the `linkedTransactions` response field.
2205
+ */
2206
+ linkToTransactionLine?: Line.LinkToTransactionLine;
2207
+
2208
+ /**
2209
+ * The lot number of the item associated with this invoice line. Used for tracking
2210
+ * groups of inventory items that are purchased or manufactured together.
2211
+ */
2212
+ lotNumber?: string;
2213
+
2214
+ /**
2215
+ * A built-in custom field for additional information specific to this invoice
2216
+ * line. Unlike the user-defined fields in the `customFields` array, this is a
2217
+ * standard QuickBooks field that exists for all invoice lines for convenience.
2218
+ * Developers often use this field for tracking information that doesn't fit into
2219
+ * other standard QuickBooks fields. Hidden by default in the QuickBooks UI.
2220
+ */
2221
+ otherCustomField1?: string;
2222
+
2223
+ /**
2224
+ * A second built-in custom field for additional information specific to this
2225
+ * invoice line. Unlike the user-defined fields in the `customFields` array, this
2226
+ * is a standard QuickBooks field that exists for all invoice lines for
2227
+ * convenience. Like `otherCustomField1`, developers often use this field for
2228
+ * tracking information that doesn't fit into other standard QuickBooks fields.
2229
+ * Hidden by default in the QuickBooks UI.
2230
+ */
2231
+ otherCustomField2?: string;
2232
+
2233
+ /**
2234
+ * The account to use for this invoice line, overriding the default account
2235
+ * associated with the item.
2236
+ */
2237
+ overrideItemAccountId?: string;
2238
+
2239
+ /**
2240
+ * The price level applied to this invoice line. This overrides any price level set
2241
+ * on the corresponding customer. The resulting invoice line will not show this
2242
+ * price level, only the final `rate` calculated from it.
2243
+ */
2244
+ priceLevelId?: string;
2245
+
2246
+ /**
2247
+ * Specifies how to resolve price rule conflicts when adding or modifying this
2248
+ * invoice line.
2249
+ */
2250
+ priceRuleConflictStrategy?: 'base_price' | 'zero';
2251
+
2252
+ /**
2253
+ * The quantity of the item associated with this invoice line. This field cannot be
2254
+ * cleared.
2255
+ *
2256
+ * **NOTE**: Do not use this field if the associated item is a discount item.
2257
+ */
2258
+ quantity?: number;
2259
+
2260
+ /**
2261
+ * The price per unit for this invoice line. If both `rate` and `amount` are
2262
+ * specified, `rate` will be ignored. If both `quantity` and `amount` are specified
2263
+ * but not `rate`, QuickBooks will use them to calculate `rate`. Represented as a
2264
+ * decimal string. This field cannot be cleared.
2265
+ */
2266
+ rate?: string;
2267
+
2268
+ /**
2269
+ * The price of this invoice line expressed as a percentage. Typically used for
2270
+ * discount or markup items.
2271
+ */
2272
+ ratePercent?: string;
2273
+
2274
+ /**
2275
+ * The sales-tax code for this invoice line, determining whether it is taxable or
2276
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
2277
+ * transaction or the associated item.
2278
+ *
2279
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
2280
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
2281
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
2282
+ * non-taxable code to all sales.
2283
+ */
2284
+ salesTaxCodeId?: string;
2285
+
2286
+ /**
2287
+ * The serial number of the item associated with this invoice line. This is used
2288
+ * for tracking individual units of serialized inventory items.
2289
+ */
2290
+ serialNumber?: string;
2291
+
2292
+ /**
2293
+ * The date on which the service for this invoice line was or will be performed, in
2294
+ * ISO 8601 format (YYYY-MM-DD). This is particularly relevant for service items.
2295
+ */
2296
+ serviceDate?: string;
2297
+
2298
+ /**
2299
+ * The unit-of-measure used for the `quantity` in this invoice line. Must be a
2300
+ * valid unit within the item's available units of measure.
2301
+ */
2302
+ unitOfMeasure?: string;
2303
+ }
2304
+
2305
+ export namespace Line {
2306
+ export interface CustomField {
2307
+ /**
2308
+ * The name of the custom field, unique for the specified `ownerId`. For public
2309
+ * custom fields, this name is visible as a label in the QuickBooks UI.
2310
+ */
2311
+ name: string;
2312
+
2313
+ /**
2314
+ * The identifier of the owner of the custom field, which QuickBooks internally
2315
+ * calls a "data extension". For public custom fields visible in the UI, such as
2316
+ * those added by the QuickBooks user, this is always "0". For private custom
2317
+ * fields that are only visible to the application that created them, this is a
2318
+ * valid GUID identifying the owning application. Internally, Conductor always
2319
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
2320
+ * objects.
2321
+ */
2322
+ ownerId: string;
2323
+
2324
+ /**
2325
+ * The value of this custom field. The maximum length depends on the field's data
2326
+ * type.
2327
+ */
2328
+ value: string;
2329
+ }
2330
+
2331
+ /**
2332
+ * An existing transaction line that you wish to link to this invoice line. Note
2333
+ * that this only links to a single transaction line item, not an entire
2334
+ * transaction. If you want to link an entire transaction and bring in all its
2335
+ * lines, instead use the field `linkToTransactionIds` on the parent transaction,
2336
+ * if available. For invoice lines, you can only link to sales orders; QuickBooks
2337
+ * does not support linking invoice lines to other transaction types.
2338
+ *
2339
+ * Transaction lines can only be linked when creating this invoice line and cannot
2340
+ * be unlinked later.
2341
+ *
2342
+ * **IMPORTANT**: If you use `linkToTransactionLine` on this invoice line, you
2343
+ * cannot use the field `item` on this line (QuickBooks will return an error)
2344
+ * because this field brings in all of the item information you need. You can,
2345
+ * however, specify whatever `quantity` or `rate` that you want, or any other
2346
+ * transaction line element other than `item`.
2347
+ *
2348
+ * If the parent transaction supports the `linkToTransactionIds` field, you can use
2349
+ * both `linkToTransactionLine` (on this invoice line) and `linkToTransactionIds`
2350
+ * (on its parent transaction) in the same request as long as they do NOT link to
2351
+ * the same transaction (otherwise, QuickBooks will return an error). QuickBooks
2352
+ * will also return an error if you attempt to link a transaction that is empty or
2353
+ * already closed.
2354
+ *
2355
+ * **IMPORTANT**: By default, QuickBooks will not return any information about the
2356
+ * linked transaction line in this endpoint's response even when this request is
2357
+ * successful. To see the transaction line linked via this field, refetch the
2358
+ * parent invoice and check the `linkedTransactions` response field. If fetching a
2359
+ * list of invoices, you must also specify the parameter
2360
+ * `includeLinkedTransactions=true` to see the `linkedTransactions` response field.
2361
+ */
2362
+ export interface LinkToTransactionLine {
2363
+ /**
2364
+ * The ID of the transaction to which to link this transaction.
2365
+ */
2366
+ transactionId: string;
2367
+
2368
+ /**
2369
+ * The ID of the transaction line to which to link this transaction.
2370
+ */
2371
+ transactionLineId: string;
2372
+ }
2373
+ }
2374
+
2375
+ /**
2376
+ * The invoice's shipping address.
2377
+ */
2378
+ export interface ShippingAddress {
2379
+ /**
2380
+ * The city, district, suburb, town, or village name of the address.
2381
+ *
2382
+ * Maximum length: 31 characters.
2383
+ */
2384
+ city?: string;
2385
+
2386
+ /**
2387
+ * The country name of the address.
2388
+ */
2389
+ country?: string;
2390
+
2391
+ /**
2392
+ * The first line of the address (e.g., street, PO Box, or company name).
2393
+ *
2394
+ * Maximum length: 41 characters.
2395
+ */
2396
+ line1?: string;
2397
+
2398
+ /**
2399
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
2400
+ * building).
2401
+ *
2402
+ * Maximum length: 41 characters.
2403
+ */
2404
+ line2?: string;
2405
+
2406
+ /**
2407
+ * The third line of the address, if needed.
2408
+ *
2409
+ * Maximum length: 41 characters.
2410
+ */
2411
+ line3?: string;
2412
+
2413
+ /**
2414
+ * The fourth line of the address, if needed.
2415
+ *
2416
+ * Maximum length: 41 characters.
2417
+ */
2418
+ line4?: string;
2419
+
2420
+ /**
2421
+ * The fifth line of the address, if needed.
2422
+ *
2423
+ * Maximum length: 41 characters.
2424
+ */
2425
+ line5?: string;
2426
+
2427
+ /**
2428
+ * A note written at the bottom of the address in the form in which it appears,
2429
+ * such as the invoice form.
2430
+ */
2431
+ note?: string;
2432
+
2433
+ /**
2434
+ * The postal code or ZIP code of the address.
2435
+ *
2436
+ * Maximum length: 13 characters.
2437
+ */
2438
+ postalCode?: string;
2439
+
2440
+ /**
2441
+ * The state, county, province, or region name of the address.
2442
+ *
2443
+ * Maximum length: 21 characters.
2444
+ */
2445
+ state?: string;
2446
+ }
2447
+ }
2448
+
2449
+ export interface InvoiceRetrieveParams {
2450
+ /**
2451
+ * The ID of the EndUser to receive this request (e.g.,
2452
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
2453
+ */
2454
+ conductorEndUserId: string;
2455
+ }
2456
+
2457
+ export interface InvoiceUpdateParams {
2458
+ /**
2459
+ * Body param: The current QuickBooks-assigned revision number of the invoice
2460
+ * object you are updating, which you can get by fetching the object first. Provide
2461
+ * the most recent `revisionNumber` to ensure you're working with the latest data;
2462
+ * otherwise, the update will return an error.
2463
+ */
2464
+ revisionNumber: string;
2465
+
2466
+ /**
2467
+ * Header param: The ID of the EndUser to receive this request (e.g.,
2468
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
2469
+ */
2470
+ conductorEndUserId: string;
2471
+
2472
+ /**
2473
+ * Body param: Credit memos to apply to this invoice, reducing its balance. This
2474
+ * creates a link between this invoice and the specified credit memos.
2475
+ *
2476
+ * **IMPORTANT**: By default, QuickBooks will not return any information about the
2477
+ * linked transactions in this endpoint's response even when this request is
2478
+ * successful. To see the transactions linked via this field, refetch the invoice
2479
+ * and check the `linkedTransactions` response field. If fetching a list of
2480
+ * invoices, you must also specify the parameter `includeLinkedTransactions=true`
2481
+ * to see the `linkedTransactions` response field.
2482
+ */
2483
+ applyCredits?: Array<InvoiceUpdateParams.ApplyCredit>;
2484
+
2485
+ /**
2486
+ * Body param: The invoice's billing address.
2487
+ */
2488
+ billingAddress?: InvoiceUpdateParams.BillingAddress;
2489
+
2490
+ /**
2491
+ * Body param: The invoice's class. Classes can be used to categorize objects into
2492
+ * meaningful segments, such as department, location, or type of work. In
2493
+ * QuickBooks, class tracking is off by default. A class defined here is
2494
+ * automatically used in this invoice's line items unless overridden at the line
2495
+ * item level.
2496
+ */
2497
+ classId?: string;
2498
+
2499
+ /**
2500
+ * Body param: The customer or customer-job associated with this invoice.
2501
+ */
2502
+ customerId?: string;
2503
+
2504
+ /**
2505
+ * Body param: The message to display to the customer on the invoice.
2506
+ */
2507
+ customerMessageId?: string;
2508
+
2509
+ /**
2510
+ * Body param: The predefined template in QuickBooks that determines the layout and
2511
+ * formatting for this invoice when printed or displayed.
2512
+ */
2513
+ documentTemplateId?: string;
2514
+
2515
+ /**
2516
+ * Body param: The date by which this invoice must be paid, in ISO 8601 format
2517
+ * (YYYY-MM-DD).
2518
+ */
2519
+ dueDate?: string;
2520
+
2521
+ /**
2522
+ * Body param: The market exchange rate between this invoice's currency and the
2523
+ * home currency in QuickBooks at the time of this transaction. Represented as a
2524
+ * decimal value (e.g., 1.2345 for 1 EUR = 1.2345 USD if USD is the home currency).
2525
+ */
2526
+ exchangeRate?: number;
2527
+
2528
+ /**
2529
+ * Body param: Indicates whether this invoice has not been completed or is in a
2530
+ * draft version.
2531
+ */
2532
+ isPending?: boolean;
2533
+
2534
+ /**
2535
+ * Body param: Indicates whether this invoice is included in the queue of documents
2536
+ * for QuickBooks to email to the customer.
2537
+ */
2538
+ isQueuedForEmail?: boolean;
2539
+
2540
+ /**
2541
+ * Body param: Indicates whether this invoice is included in the queue of documents
2542
+ * for QuickBooks to print.
2543
+ */
2544
+ isQueuedForPrint?: boolean;
2545
+
2546
+ /**
2547
+ * Body param: The invoice's line item groups, each representing a predefined set
2548
+ * of related items.
2549
+ *
2550
+ * **IMPORTANT**:
2551
+ *
2552
+ * 1. Including this array in your update request will **REPLACE** all existing
2553
+ * line item groups for the invoice with this array. To keep any existing line
2554
+ * item groups, you must include them in this array even if they have not
2555
+ * changed. **Any line item groups not included will be removed.**
2556
+ *
2557
+ * 2. To add a new line item group, include it here with the `id` field set to
2558
+ * `-1`.
2559
+ *
2560
+ * 3. If you do not wish to modify any line item groups, omit this field entirely
2561
+ * to keep them unchanged.
2562
+ */
2563
+ lineGroups?: Array<InvoiceUpdateParams.LineGroup>;
2564
+
2565
+ /**
2566
+ * Body param: The invoice's line items, each representing a single product or
2567
+ * service sold.
2568
+ *
2569
+ * **IMPORTANT**:
2570
+ *
2571
+ * 1. Including this array in your update request will **REPLACE** all existing
2572
+ * line items for the invoice with this array. To keep any existing line items,
2573
+ * you must include them in this array even if they have not changed. **Any line
2574
+ * items not included will be removed.**
2575
+ *
2576
+ * 2. To add a new line item, include it here with the `id` field set to `-1`.
2577
+ *
2578
+ * 3. If you do not wish to modify any line items, omit this field entirely to keep
2579
+ * them unchanged.
2580
+ */
2581
+ lines?: Array<InvoiceUpdateParams.Line>;
2582
+
2583
+ /**
2584
+ * Body param: A memo or note for this invoice that appears in reports, but not on
2585
+ * the invoice. Use `customerMessage` to add a note to this invoice.
2586
+ */
2587
+ memo?: string;
2588
+
2589
+ /**
2590
+ * Body param: A built-in custom field for additional information specific to this
2591
+ * invoice. Unlike the user-defined fields in the `customFields` array, this is a
2592
+ * standard QuickBooks field that exists for all invoices for convenience.
2593
+ * Developers often use this field for tracking information that doesn't fit into
2594
+ * other standard QuickBooks fields. Unlike `otherCustomField1` and
2595
+ * `otherCustomField2`, which are line item fields, this exists at the transaction
2596
+ * level. Hidden by default in the QuickBooks UI.
2597
+ */
2598
+ otherCustomField?: string;
2599
+
2600
+ /**
2601
+ * Body param: The customer's Purchase Order (PO) number associated with this
2602
+ * invoice. This field is often used to cross-reference the invoice with the
2603
+ * customer's purchasing system.
2604
+ */
2605
+ purchaseOrderNumber?: string;
2606
+
2607
+ /**
2608
+ * Body param: The Accounts-Receivable (A/R) account to which this invoice is
2609
+ * assigned, used to track the amount owed. If not specified, QuickBooks Desktop
2610
+ * will use its default A/R account.
2611
+ *
2612
+ * **IMPORTANT**: If this invoice is linked to other transactions, this A/R account
2613
+ * must match the `receivablesAccount` used in all linked transactions. For
2614
+ * example, when refunding a credit card payment, the A/R account must match the
2615
+ * one used in the original credit transactions being refunded.
2616
+ */
2617
+ receivablesAccountId?: string;
2618
+
2619
+ /**
2620
+ * Body param: The case-sensitive user-defined reference number for this invoice,
2621
+ * which can be used to identify the transaction in QuickBooks. This value is not
2622
+ * required to be unique and can be arbitrarily changed by the QuickBooks user.
2623
+ */
2624
+ refNumber?: string;
2625
+
2626
+ /**
2627
+ * Body param: The invoice's sales representative. Sales representatives can be
2628
+ * employees, vendors, or other names in QuickBooks.
2629
+ */
2630
+ salesRepresentativeId?: string;
2631
+
2632
+ /**
2633
+ * Body param: The sales-tax code for this invoice, determining whether it is
2634
+ * taxable or non-taxable. This can be overridden at the transaction-line level.
2635
+ *
2636
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
2637
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
2638
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
2639
+ * non-taxable code to all sales.
2640
+ */
2641
+ salesTaxCodeId?: string;
2642
+
2643
+ /**
2644
+ * Body param: The sales-tax item used to calculate the actual tax amount for this
2645
+ * invoice's transactions by applying a specific tax rate collected for a single
2646
+ * tax agency. Unlike `salesTaxCode`, which only indicates general taxability, this
2647
+ * field drives the actual tax calculation and reporting.
2648
+ *
2649
+ * For invoices, while using this field to specify a single tax item/group that
2650
+ * applies uniformly is recommended, complex tax scenarios may require alternative
2651
+ * approaches. In such cases, you can set this field to a 0% tax item
2652
+ * (conventionally named "Tax Calculated On Invoice") and handle tax calculations
2653
+ * through line items instead. When using line items for taxes, note that only
2654
+ * individual tax items (not tax groups) can be used, subtotals can help apply a
2655
+ * tax to multiple items but only the first tax line after a subtotal is calculated
2656
+ * automatically (subsequent tax lines require manual amounts), and the rate column
2657
+ * will always display the actual tax amount rather than the rate percentage.
2658
+ */
2659
+ salesTaxItemId?: string;
2660
+
2661
+ /**
2662
+ * Body param: The origin location from where the product associated with this
2663
+ * invoice is shipped. This is the point at which ownership and liability for goods
2664
+ * transfer from seller to buyer. Internally, QuickBooks uses the term "FOB" for
2665
+ * this field, which stands for "freight on board". This field is informational and
2666
+ * has no accounting implications.
2667
+ */
2668
+ shipmentOrigin?: string;
2669
+
2670
+ /**
2671
+ * Body param: The invoice's shipping address.
2672
+ */
2673
+ shippingAddress?: InvoiceUpdateParams.ShippingAddress;
2674
+
2675
+ /**
2676
+ * Body param: The date when the products or services for this invoice were shipped
2677
+ * or are expected to be shipped, in ISO 8601 format (YYYY-MM-DD).
2678
+ */
2679
+ shippingDate?: string;
2680
+
2681
+ /**
2682
+ * Body param: The shipping method used for this invoice, such as standard mail or
2683
+ * overnight delivery.
2684
+ */
2685
+ shippingMethodId?: string;
2686
+
2687
+ /**
2688
+ * Body param: The invoice's payment terms, defining when payment is due and any
2689
+ * applicable discounts.
2690
+ */
2691
+ termsId?: string;
2692
+
2693
+ /**
2694
+ * Body param: The date of this invoice, in ISO 8601 format (YYYY-MM-DD).
2695
+ */
2696
+ transactionDate?: string;
2697
+ }
2698
+
2699
+ export namespace InvoiceUpdateParams {
2700
+ export interface ApplyCredit {
2701
+ /**
2702
+ * The amount of credit applied to this transaction. This could include customer
2703
+ * deposits, payments, or credits. Represented as a decimal string.
2704
+ */
2705
+ appliedAmount: string;
2706
+
2707
+ /**
2708
+ * The unique identifier of the credit transaction (credit memo or vendor credit)
2709
+ * to apply to this transaction.
2710
+ */
2711
+ creditTransactionId: string;
2712
+
2713
+ /**
2714
+ * Indicates whether to override the credit.
2715
+ */
2716
+ overrideCreditApplication?: boolean;
2717
+ }
2718
+
2719
+ /**
2720
+ * The invoice's billing address.
2721
+ */
2722
+ export interface BillingAddress {
2723
+ /**
2724
+ * The city, district, suburb, town, or village name of the address.
2725
+ *
2726
+ * Maximum length: 31 characters.
2727
+ */
2728
+ city?: string;
2729
+
2730
+ /**
2731
+ * The country name of the address.
2732
+ */
2733
+ country?: string;
2734
+
2735
+ /**
2736
+ * The first line of the address (e.g., street, PO Box, or company name).
2737
+ *
2738
+ * Maximum length: 41 characters.
2739
+ */
2740
+ line1?: string;
2741
+
2742
+ /**
2743
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
2744
+ * building).
2745
+ *
2746
+ * Maximum length: 41 characters.
2747
+ */
2748
+ line2?: string;
2749
+
2750
+ /**
2751
+ * The third line of the address, if needed.
2752
+ *
2753
+ * Maximum length: 41 characters.
2754
+ */
2755
+ line3?: string;
2756
+
2757
+ /**
2758
+ * The fourth line of the address, if needed.
2759
+ *
2760
+ * Maximum length: 41 characters.
2761
+ */
2762
+ line4?: string;
2763
+
2764
+ /**
2765
+ * The fifth line of the address, if needed.
2766
+ *
2767
+ * Maximum length: 41 characters.
2768
+ */
2769
+ line5?: string;
2770
+
2771
+ /**
2772
+ * A note written at the bottom of the address in the form in which it appears,
2773
+ * such as the invoice form.
2774
+ */
2775
+ note?: string;
2776
+
2777
+ /**
2778
+ * The postal code or ZIP code of the address.
2779
+ *
2780
+ * Maximum length: 13 characters.
2781
+ */
2782
+ postalCode?: string;
2783
+
2784
+ /**
2785
+ * The state, county, province, or region name of the address.
2786
+ *
2787
+ * Maximum length: 21 characters.
2788
+ */
2789
+ state?: string;
2790
+ }
2791
+
2792
+ export interface LineGroup {
2793
+ /**
2794
+ * The QuickBooks-assigned unique identifier of an existing invoice line group you
2795
+ * wish to retain or update.
2796
+ *
2797
+ * **IMPORTANT**: Set this field to `-1` for new invoice line groups you wish to
2798
+ * add.
2799
+ */
2800
+ id: string;
2801
+
2802
+ /**
2803
+ * The invoice line group's item group, representing a predefined set of items
2804
+ * bundled because they are commonly purchased together or grouped for faster
2805
+ * entry.
2806
+ */
2807
+ itemGroupId?: string;
2808
+
2809
+ /**
2810
+ * The invoice line group's line items, each representing a single product or
2811
+ * service sold.
2812
+ *
2813
+ * **IMPORTANT**:
2814
+ *
2815
+ * 1. Including this array in your update request will **REPLACE** all existing
2816
+ * line items for the invoice line group with this array. To keep any existing
2817
+ * line items, you must include them in this array even if they have not
2818
+ * changed. **Any line items not included will be removed.**
2819
+ *
2820
+ * 2. To add a new line item, include it here with the `id` field set to `-1`.
2821
+ *
2822
+ * 3. If you do not wish to modify any line items, omit this field entirely to keep
2823
+ * them unchanged.
2824
+ */
2825
+ lines?: Array<LineGroup.Line>;
2826
+
2827
+ /**
2828
+ * Specifies an alternative unit-of-measure set when updating this invoice line
2829
+ * group's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to
2830
+ * select units from a different set than the item's default unit-of-measure set,
2831
+ * which remains unchanged on the item itself. The override applies only to this
2832
+ * specific line. For example, you can sell an item typically measured in volume
2833
+ * units using weight units in a specific transaction by specifying a different
2834
+ * unit-of-measure set with this field.
2835
+ */
2836
+ overrideUnitOfMeasureSetId?: string;
2837
+
2838
+ /**
2839
+ * The quantity of the item group associated with this invoice line group. This
2840
+ * field cannot be cleared.
2841
+ *
2842
+ * **NOTE**: Do not use this field if the associated item group is a discount item
2843
+ * group.
2844
+ */
2845
+ quantity?: number;
2846
+
2847
+ /**
2848
+ * The unit-of-measure used for the `quantity` in this invoice line group. Must be
2849
+ * a valid unit within the item's available units of measure.
2850
+ */
2851
+ unitOfMeasure?: string;
2852
+ }
2853
+
2854
+ export namespace LineGroup {
2855
+ export interface Line {
2856
+ /**
2857
+ * The QuickBooks-assigned unique identifier of an existing invoice line you wish
2858
+ * to retain or update.
2859
+ *
2860
+ * **IMPORTANT**: Set this field to `-1` for new invoice lines you wish to add.
2861
+ */
2862
+ id: string;
2863
+
2864
+ /**
2865
+ * The monetary amount of this invoice line, represented as a decimal string. If
2866
+ * both `quantity` and `rate` are specified but not `amount`, QuickBooks will use
2867
+ * them to calculate `amount`. If `amount`, `rate`, and `quantity` are all
2868
+ * unspecified, then QuickBooks will calculate `amount` based on a `quantity` of
2869
+ * `1` and the suggested `rate`. This field cannot be cleared.
2870
+ */
2871
+ amount?: string;
2872
+
2873
+ /**
2874
+ * The invoice line's class. Classes can be used to categorize objects into
2875
+ * meaningful segments, such as department, location, or type of work. In
2876
+ * QuickBooks, class tracking is off by default. If a class is specified for the
2877
+ * entire parent transaction, it is automatically applied to all invoice lines
2878
+ * unless overridden here, at the transaction line level.
2879
+ */
2880
+ classId?: string;
2881
+
2882
+ /**
2883
+ * A description of this invoice line.
2884
+ */
2885
+ description?: string;
2886
+
2887
+ /**
2888
+ * The site location where inventory for the item associated with this invoice line
2889
+ * is stored.
2890
+ */
2891
+ inventorySiteId?: string;
2892
+
2893
+ /**
2894
+ * The specific location (e.g., bin or shelf) within the inventory site where the
2895
+ * item associated with this invoice line is stored.
2896
+ */
2897
+ inventorySiteLocationId?: string;
2898
+
2899
+ /**
2900
+ * The item associated with this invoice line. This can refer to any good or
2901
+ * service that the business buys or sells, including item types such as a service
2902
+ * item, inventory item, or special calculation item like a discount item or
2903
+ * sales-tax item.
2904
+ */
2905
+ itemId?: string;
2906
+
2907
+ /**
2908
+ * The lot number of the item associated with this invoice line. Used for tracking
2909
+ * groups of inventory items that are purchased or manufactured together.
2910
+ */
2911
+ lotNumber?: string;
2912
+
2913
+ /**
2914
+ * A built-in custom field for additional information specific to this invoice
2915
+ * line. Unlike the user-defined fields in the `customFields` array, this is a
2916
+ * standard QuickBooks field that exists for all invoice lines for convenience.
2917
+ * Developers often use this field for tracking information that doesn't fit into
2918
+ * other standard QuickBooks fields. Hidden by default in the QuickBooks UI.
2919
+ */
2920
+ otherCustomField1?: string;
2921
+
2922
+ /**
2923
+ * A second built-in custom field for additional information specific to this
2924
+ * invoice line. Unlike the user-defined fields in the `customFields` array, this
2925
+ * is a standard QuickBooks field that exists for all invoice lines for
2926
+ * convenience. Like `otherCustomField1`, developers often use this field for
2927
+ * tracking information that doesn't fit into other standard QuickBooks fields.
2928
+ * Hidden by default in the QuickBooks UI.
2929
+ */
2930
+ otherCustomField2?: string;
2931
+
2932
+ /**
2933
+ * The account to use for this invoice line, overriding the default account
2934
+ * associated with the item.
2935
+ */
2936
+ overrideItemAccountId?: string;
2937
+
2938
+ /**
2939
+ * Specifies an alternative unit-of-measure set when updating this invoice line's
2940
+ * `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to select
2941
+ * units from a different set than the item's default unit-of-measure set, which
2942
+ * remains unchanged on the item itself. The override applies only to this specific
2943
+ * line. For example, you can sell an item typically measured in volume units using
2944
+ * weight units in a specific transaction by specifying a different unit-of-measure
2945
+ * set with this field.
2946
+ */
2947
+ overrideUnitOfMeasureSetId?: string;
2948
+
2949
+ /**
2950
+ * The price level applied to this invoice line. This overrides any price level set
2951
+ * on the corresponding customer. The resulting invoice line will not show this
2952
+ * price level, only the final `rate` calculated from it.
2953
+ */
2954
+ priceLevelId?: string;
2955
+
2956
+ /**
2957
+ * Specifies how to resolve price rule conflicts when adding or modifying this
2958
+ * invoice line.
2959
+ */
2960
+ priceRuleConflictStrategy?: 'base_price' | 'zero';
2961
+
2962
+ /**
2963
+ * The quantity of the item associated with this invoice line. This field cannot be
2964
+ * cleared.
2965
+ *
2966
+ * **NOTE**: Do not use this field if the associated item is a discount item.
2967
+ */
2968
+ quantity?: number;
2969
+
2970
+ /**
2971
+ * The price per unit for this invoice line. If both `rate` and `amount` are
2972
+ * specified, `rate` will be ignored. If both `quantity` and `amount` are specified
2973
+ * but not `rate`, QuickBooks will use them to calculate `rate`. Represented as a
2974
+ * decimal string. This field cannot be cleared.
2975
+ */
2976
+ rate?: string;
2977
+
2978
+ /**
2979
+ * The price of this invoice line expressed as a percentage. Typically used for
2980
+ * discount or markup items.
2981
+ */
2982
+ ratePercent?: string;
2983
+
2984
+ /**
2985
+ * The sales-tax code for this invoice line, determining whether it is taxable or
2986
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
2987
+ * transaction or the associated item.
2988
+ *
2989
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
2990
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
2991
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
2992
+ * non-taxable code to all sales.
2993
+ */
2994
+ salesTaxCodeId?: string;
2995
+
2996
+ /**
2997
+ * The serial number of the item associated with this invoice line. This is used
2998
+ * for tracking individual units of serialized inventory items.
2999
+ */
3000
+ serialNumber?: string;
3001
+
3002
+ /**
3003
+ * The date on which the service for this invoice line was or will be performed, in
3004
+ * ISO 8601 format (YYYY-MM-DD). This is particularly relevant for service items.
3005
+ */
3006
+ serviceDate?: string;
3007
+
3008
+ /**
3009
+ * The unit-of-measure used for the `quantity` in this invoice line. Must be a
3010
+ * valid unit within the item's available units of measure.
3011
+ */
3012
+ unitOfMeasure?: string;
3013
+ }
3014
+ }
3015
+
3016
+ export interface Line {
3017
+ /**
3018
+ * The QuickBooks-assigned unique identifier of an existing invoice line you wish
3019
+ * to retain or update.
3020
+ *
3021
+ * **IMPORTANT**: Set this field to `-1` for new invoice lines you wish to add.
3022
+ */
3023
+ id: string;
3024
+
3025
+ /**
3026
+ * The monetary amount of this invoice line, represented as a decimal string. If
3027
+ * both `quantity` and `rate` are specified but not `amount`, QuickBooks will use
3028
+ * them to calculate `amount`. If `amount`, `rate`, and `quantity` are all
3029
+ * unspecified, then QuickBooks will calculate `amount` based on a `quantity` of
3030
+ * `1` and the suggested `rate`. This field cannot be cleared.
3031
+ */
3032
+ amount?: string;
3033
+
3034
+ /**
3035
+ * The invoice line's class. Classes can be used to categorize objects into
3036
+ * meaningful segments, such as department, location, or type of work. In
3037
+ * QuickBooks, class tracking is off by default. If a class is specified for the
3038
+ * entire parent transaction, it is automatically applied to all invoice lines
3039
+ * unless overridden here, at the transaction line level.
3040
+ */
3041
+ classId?: string;
3042
+
3043
+ /**
3044
+ * A description of this invoice line.
3045
+ */
3046
+ description?: string;
3047
+
3048
+ /**
3049
+ * The site location where inventory for the item associated with this invoice line
3050
+ * is stored.
3051
+ */
3052
+ inventorySiteId?: string;
3053
+
3054
+ /**
3055
+ * The specific location (e.g., bin or shelf) within the inventory site where the
3056
+ * item associated with this invoice line is stored.
3057
+ */
3058
+ inventorySiteLocationId?: string;
3059
+
3060
+ /**
3061
+ * The item associated with this invoice line. This can refer to any good or
3062
+ * service that the business buys or sells, including item types such as a service
3063
+ * item, inventory item, or special calculation item like a discount item or
3064
+ * sales-tax item.
3065
+ */
3066
+ itemId?: string;
3067
+
3068
+ /**
3069
+ * The lot number of the item associated with this invoice line. Used for tracking
3070
+ * groups of inventory items that are purchased or manufactured together.
3071
+ */
3072
+ lotNumber?: string;
3073
+
3074
+ /**
3075
+ * A built-in custom field for additional information specific to this invoice
3076
+ * line. Unlike the user-defined fields in the `customFields` array, this is a
3077
+ * standard QuickBooks field that exists for all invoice lines for convenience.
3078
+ * Developers often use this field for tracking information that doesn't fit into
3079
+ * other standard QuickBooks fields. Hidden by default in the QuickBooks UI.
3080
+ */
3081
+ otherCustomField1?: string;
3082
+
3083
+ /**
3084
+ * A second built-in custom field for additional information specific to this
3085
+ * invoice line. Unlike the user-defined fields in the `customFields` array, this
3086
+ * is a standard QuickBooks field that exists for all invoice lines for
3087
+ * convenience. Like `otherCustomField1`, developers often use this field for
3088
+ * tracking information that doesn't fit into other standard QuickBooks fields.
3089
+ * Hidden by default in the QuickBooks UI.
3090
+ */
3091
+ otherCustomField2?: string;
3092
+
3093
+ /**
3094
+ * The account to use for this invoice line, overriding the default account
3095
+ * associated with the item.
3096
+ */
3097
+ overrideItemAccountId?: string;
3098
+
3099
+ /**
3100
+ * Specifies an alternative unit-of-measure set when updating this invoice line's
3101
+ * `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to select
3102
+ * units from a different set than the item's default unit-of-measure set, which
3103
+ * remains unchanged on the item itself. The override applies only to this specific
3104
+ * line. For example, you can sell an item typically measured in volume units using
3105
+ * weight units in a specific transaction by specifying a different unit-of-measure
3106
+ * set with this field.
3107
+ */
3108
+ overrideUnitOfMeasureSetId?: string;
3109
+
3110
+ /**
3111
+ * The price level applied to this invoice line. This overrides any price level set
3112
+ * on the corresponding customer. The resulting invoice line will not show this
3113
+ * price level, only the final `rate` calculated from it.
3114
+ */
3115
+ priceLevelId?: string;
3116
+
3117
+ /**
3118
+ * Specifies how to resolve price rule conflicts when adding or modifying this
3119
+ * invoice line.
3120
+ */
3121
+ priceRuleConflictStrategy?: 'base_price' | 'zero';
3122
+
3123
+ /**
3124
+ * The quantity of the item associated with this invoice line. This field cannot be
3125
+ * cleared.
3126
+ *
3127
+ * **NOTE**: Do not use this field if the associated item is a discount item.
3128
+ */
3129
+ quantity?: number;
3130
+
3131
+ /**
3132
+ * The price per unit for this invoice line. If both `rate` and `amount` are
3133
+ * specified, `rate` will be ignored. If both `quantity` and `amount` are specified
3134
+ * but not `rate`, QuickBooks will use them to calculate `rate`. Represented as a
3135
+ * decimal string. This field cannot be cleared.
3136
+ */
3137
+ rate?: string;
3138
+
3139
+ /**
3140
+ * The price of this invoice line expressed as a percentage. Typically used for
3141
+ * discount or markup items.
3142
+ */
3143
+ ratePercent?: string;
3144
+
3145
+ /**
3146
+ * The sales-tax code for this invoice line, determining whether it is taxable or
3147
+ * non-taxable. If set, this overrides any sales-tax codes defined on the parent
3148
+ * transaction or the associated item.
3149
+ *
3150
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
3151
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
3152
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
3153
+ * non-taxable code to all sales.
3154
+ */
3155
+ salesTaxCodeId?: string;
3156
+
3157
+ /**
3158
+ * The serial number of the item associated with this invoice line. This is used
3159
+ * for tracking individual units of serialized inventory items.
3160
+ */
3161
+ serialNumber?: string;
3162
+
3163
+ /**
3164
+ * The date on which the service for this invoice line was or will be performed, in
3165
+ * ISO 8601 format (YYYY-MM-DD). This is particularly relevant for service items.
3166
+ */
3167
+ serviceDate?: string;
3168
+
3169
+ /**
3170
+ * The unit-of-measure used for the `quantity` in this invoice line. Must be a
3171
+ * valid unit within the item's available units of measure.
3172
+ */
3173
+ unitOfMeasure?: string;
3174
+ }
3175
+
3176
+ /**
3177
+ * The invoice's shipping address.
3178
+ */
3179
+ export interface ShippingAddress {
3180
+ /**
3181
+ * The city, district, suburb, town, or village name of the address.
3182
+ *
3183
+ * Maximum length: 31 characters.
3184
+ */
3185
+ city?: string;
3186
+
3187
+ /**
3188
+ * The country name of the address.
3189
+ */
3190
+ country?: string;
3191
+
3192
+ /**
3193
+ * The first line of the address (e.g., street, PO Box, or company name).
3194
+ *
3195
+ * Maximum length: 41 characters.
3196
+ */
3197
+ line1?: string;
3198
+
3199
+ /**
3200
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
3201
+ * building).
3202
+ *
3203
+ * Maximum length: 41 characters.
3204
+ */
3205
+ line2?: string;
3206
+
3207
+ /**
3208
+ * The third line of the address, if needed.
3209
+ *
3210
+ * Maximum length: 41 characters.
3211
+ */
3212
+ line3?: string;
3213
+
3214
+ /**
3215
+ * The fourth line of the address, if needed.
3216
+ *
3217
+ * Maximum length: 41 characters.
3218
+ */
3219
+ line4?: string;
3220
+
3221
+ /**
3222
+ * The fifth line of the address, if needed.
3223
+ *
3224
+ * Maximum length: 41 characters.
3225
+ */
3226
+ line5?: string;
3227
+
3228
+ /**
3229
+ * A note written at the bottom of the address in the form in which it appears,
3230
+ * such as the invoice form.
3231
+ */
3232
+ note?: string;
3233
+
3234
+ /**
3235
+ * The postal code or ZIP code of the address.
3236
+ *
3237
+ * Maximum length: 13 characters.
3238
+ */
3239
+ postalCode?: string;
3240
+
3241
+ /**
3242
+ * The state, county, province, or region name of the address.
3243
+ *
3244
+ * Maximum length: 21 characters.
3245
+ */
3246
+ state?: string;
3247
+ }
3248
+ }
3249
+
3250
+ export interface InvoiceListParams extends CursorPageParams {
3251
+ /**
3252
+ * Header param: The ID of the EndUser to receive this request (e.g.,
3253
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
3254
+ */
3255
+ conductorEndUserId: string;
3256
+
3257
+ /**
3258
+ * Query param: Filter for invoices associated with these accounts.
3259
+ */
3260
+ accountIds?: Array<string>;
3261
+
3262
+ /**
3263
+ * Query param: Filter for invoices in these currencies.
3264
+ */
3265
+ currencyIds?: Array<string>;
3266
+
3267
+ /**
3268
+ * Query param: Filter for invoices created for these customers.
3269
+ */
3270
+ customerIds?: Array<string>;
3271
+
3272
+ /**
3273
+ * Query param: Filter for specific invoices by their QuickBooks-assigned unique
3274
+ * identifier(s).
3275
+ *
3276
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
3277
+ * query parameters for this request.
3278
+ *
3279
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
3280
+ * request will return an error.
3281
+ */
3282
+ ids?: Array<string>;
3283
+
3284
+ /**
3285
+ * Query param: Whether to include line items in the response. Defaults to `true`.
3286
+ */
3287
+ includeLineItems?: boolean;
3288
+
3289
+ /**
3290
+ * Query param: Whether to include linked transactions in the response. Defaults to
3291
+ * `false`. For example, a payment linked to the corresponding invoice.
3292
+ */
3293
+ includeLinkedTransactions?: boolean;
3294
+
3295
+ /**
3296
+ * Query param: Filter for invoices that are paid, not paid, or both.
3297
+ */
3298
+ paymentStatus?: 'all' | 'paid' | 'not_paid';
3299
+
3300
+ /**
3301
+ * Query param: Filter for invoices whose `refNumber` contains this substring.
3302
+ * NOTE: If you use this parameter, you cannot also use `refNumberStartsWith` or
3303
+ * `refNumberEndsWith`.
3304
+ */
3305
+ refNumberContains?: string;
3306
+
3307
+ /**
3308
+ * Query param: Filter for invoices whose `refNumber` ends with this substring.
3309
+ * NOTE: If you use this parameter, you cannot also use `refNumberContains` or
3310
+ * `refNumberStartsWith`.
3311
+ */
3312
+ refNumberEndsWith?: string;
3313
+
3314
+ /**
3315
+ * Query param: Filter for invoices whose `refNumber` is greater than or equal to
3316
+ * this value. If omitted, the range will begin with the first number of the list.
3317
+ * Uses a numerical comparison for values that contain only digits; otherwise, uses
3318
+ * a lexicographical comparison.
3319
+ */
3320
+ refNumberFrom?: string;
3321
+
3322
+ /**
3323
+ * Query param: Filter for specific invoices by their ref-number(s),
3324
+ * case-sensitive. In QuickBooks, ref-numbers are not required to be unique and can
3325
+ * be arbitrarily changed by the QuickBooks user.
3326
+ *
3327
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
3328
+ * query parameters for this request.
3329
+ *
3330
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
3331
+ * request will return an error.
3332
+ */
3333
+ refNumbers?: Array<string>;
3334
+
3335
+ /**
3336
+ * Query param: Filter for invoices whose `refNumber` starts with this substring.
3337
+ * NOTE: If you use this parameter, you cannot also use `refNumberContains` or
3338
+ * `refNumberEndsWith`.
3339
+ */
3340
+ refNumberStartsWith?: string;
3341
+
3342
+ /**
3343
+ * Query param: Filter for invoices whose `refNumber` is less than or equal to this
3344
+ * value. If omitted, the range will end with the last number of the list. Uses a
3345
+ * numerical comparison for values that contain only digits; otherwise, uses a
3346
+ * lexicographical comparison.
3347
+ */
3348
+ refNumberTo?: string;
3349
+
3350
+ /**
3351
+ * Query param: Filter for invoices created on or after this date, in ISO 8601
3352
+ * format (YYYY-MM-DD).
3353
+ */
3354
+ transactionDateFrom?: string;
3355
+
3356
+ /**
3357
+ * Query param: Filter for invoices created on or before this date, in ISO 8601
3358
+ * format (YYYY-MM-DD).
3359
+ */
3360
+ transactionDateTo?: string;
3361
+
3362
+ /**
3363
+ * Query param: Filter for invoices updated on or after this date and time, in ISO
3364
+ * 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date (YYYY-MM-DD), the
3365
+ * time is assumed to be 00:00:00 of that day.
3366
+ */
3367
+ updatedAfter?: string;
3368
+
3369
+ /**
3370
+ * Query param: Filter for invoices updated on or before this date and time, in ISO
3371
+ * 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date (YYYY-MM-DD), the
3372
+ * time is assumed to be 23:59:59 of that day.
3373
+ */
3374
+ updatedBefore?: string;
3375
+ }
3376
+
3377
+ export interface InvoiceDeleteParams {
3378
+ /**
3379
+ * The ID of the EndUser to receive this request (e.g.,
3380
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
3381
+ */
3382
+ conductorEndUserId: string;
3383
+ }
3384
+
3385
+ Invoices.InvoicesCursorPage = InvoicesCursorPage;
3386
+
3387
+ export declare namespace Invoices {
3388
+ export {
3389
+ type Invoice as Invoice,
3390
+ type InvoiceDeleteResponse as InvoiceDeleteResponse,
3391
+ InvoicesCursorPage as InvoicesCursorPage,
3392
+ type InvoiceCreateParams as InvoiceCreateParams,
3393
+ type InvoiceRetrieveParams as InvoiceRetrieveParams,
3394
+ type InvoiceUpdateParams as InvoiceUpdateParams,
3395
+ type InvoiceListParams as InvoiceListParams,
3396
+ type InvoiceDeleteParams as InvoiceDeleteParams,
3397
+ };
3398
+ }