qubesync 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/CHANGELOG.md +38 -2
  2. package/README.md +188 -5
  3. package/client.js +660 -0
  4. package/index.d.ts +211 -1
  5. package/index.js +5 -1
  6. package/index.mjs +2 -0
  7. package/operations/account.d.ts +263 -0
  8. package/operations/account.js +50 -0
  9. package/operations/account_tax_line_info.d.ts +31 -0
  10. package/operations/account_tax_line_info.js +26 -0
  11. package/operations/aging_report.d.ts +100 -0
  12. package/operations/aging_report.js +26 -0
  13. package/operations/alert.d.ts +118 -0
  14. package/operations/alert.js +50 -0
  15. package/operations/ar_refund_credit_card.d.ts +201 -0
  16. package/operations/ar_refund_credit_card.js +38 -0
  17. package/operations/bar_code.d.ts +40 -0
  18. package/operations/bar_code.js +26 -0
  19. package/operations/bill.d.ts +612 -0
  20. package/operations/bill.js +50 -0
  21. package/operations/bill_payment_check.d.ts +276 -0
  22. package/operations/bill_payment_check.js +50 -0
  23. package/operations/bill_payment_credit_card.d.ts +178 -0
  24. package/operations/bill_payment_credit_card.js +38 -0
  25. package/operations/bill_to_pay.d.ts +54 -0
  26. package/operations/bill_to_pay.js +26 -0
  27. package/operations/billing_rate.d.ts +159 -0
  28. package/operations/billing_rate.js +38 -0
  29. package/operations/budget_summary_report.d.ts +71 -0
  30. package/operations/budget_summary_report.js +26 -0
  31. package/operations/build_assembly.d.ts +264 -0
  32. package/operations/build_assembly.js +50 -0
  33. package/operations/charge.d.ts +330 -0
  34. package/operations/charge.js +50 -0
  35. package/operations/check.d.ts +394 -0
  36. package/operations/check.js +50 -0
  37. package/operations/class.d.ts +170 -0
  38. package/operations/class.js +50 -0
  39. package/operations/cleared_status.d.ts +43 -0
  40. package/operations/cleared_status.js +26 -0
  41. package/operations/client.d.ts +254 -0
  42. package/operations/company.d.ts +36 -0
  43. package/operations/company.js +26 -0
  44. package/operations/company_activity.d.ts +32 -0
  45. package/operations/company_activity.js +26 -0
  46. package/operations/credit_card_charge.d.ts +280 -0
  47. package/operations/credit_card_charge.js +50 -0
  48. package/operations/credit_card_credit.d.ts +280 -0
  49. package/operations/credit_card_credit.js +50 -0
  50. package/operations/credit_memo.d.ts +642 -0
  51. package/operations/credit_memo.js +50 -0
  52. package/operations/currency.d.ts +195 -0
  53. package/operations/currency.js +50 -0
  54. package/operations/custom_detail_report.d.ts +108 -0
  55. package/operations/custom_detail_report.js +26 -0
  56. package/operations/custom_summary_report.d.ts +119 -0
  57. package/operations/custom_summary_report.js +26 -0
  58. package/operations/customer.d.ts +639 -0
  59. package/operations/customer.js +50 -0
  60. package/operations/customer_msg.d.ts +121 -0
  61. package/operations/customer_msg.js +38 -0
  62. package/operations/customer_type.d.ts +127 -0
  63. package/operations/customer_type.js +38 -0
  64. package/operations/data_event_recovery_info.d.ts +61 -0
  65. package/operations/data_event_recovery_info.js +38 -0
  66. package/operations/data_ext.d.ts +197 -0
  67. package/operations/data_ext.js +50 -0
  68. package/operations/data_ext_def.d.ts +173 -0
  69. package/operations/data_ext_def.js +62 -0
  70. package/operations/date_driven_terms.d.ts +141 -0
  71. package/operations/date_driven_terms.js +38 -0
  72. package/operations/deposit.d.ts +402 -0
  73. package/operations/deposit.js +50 -0
  74. package/operations/employee.d.ts +683 -0
  75. package/operations/employee.js +50 -0
  76. package/operations/employee_default.d.ts +133 -0
  77. package/operations/employee_default.js +38 -0
  78. package/operations/entity.d.ts +96 -0
  79. package/operations/entity.js +26 -0
  80. package/operations/estimate.d.ts +590 -0
  81. package/operations/estimate.js +50 -0
  82. package/operations/form1099_category_account_mapping.d.ts +89 -0
  83. package/operations/form1099_category_account_mapping.js +38 -0
  84. package/operations/general_detail_report.d.ts +108 -0
  85. package/operations/general_detail_report.js +26 -0
  86. package/operations/general_summary_report.d.ts +115 -0
  87. package/operations/general_summary_report.js +26 -0
  88. package/operations/host.d.ts +43 -0
  89. package/operations/host.js +26 -0
  90. package/operations/index.js +397 -0
  91. package/operations/inventory_adjustment.d.ts +389 -0
  92. package/operations/inventory_adjustment.js +50 -0
  93. package/operations/inventory_site.d.ts +247 -0
  94. package/operations/inventory_site.js +50 -0
  95. package/operations/invoice.d.ts +682 -0
  96. package/operations/invoice.js +50 -0
  97. package/operations/item.d.ts +100 -0
  98. package/operations/item.js +26 -0
  99. package/operations/item_assemblies_can_build.d.ts +41 -0
  100. package/operations/item_assemblies_can_build.js +26 -0
  101. package/operations/item_discount.d.ts +256 -0
  102. package/operations/item_discount.js +50 -0
  103. package/operations/item_fixed_asset.d.ts +382 -0
  104. package/operations/item_fixed_asset.js +50 -0
  105. package/operations/item_group.d.ts +236 -0
  106. package/operations/item_group.js +50 -0
  107. package/operations/item_inventory.d.ts +350 -0
  108. package/operations/item_inventory.js +50 -0
  109. package/operations/item_inventory_assembly.d.ts +368 -0
  110. package/operations/item_inventory_assembly.js +50 -0
  111. package/operations/item_non_inventory.d.ts +264 -0
  112. package/operations/item_non_inventory.js +50 -0
  113. package/operations/item_other_charge.d.ts +244 -0
  114. package/operations/item_other_charge.js +50 -0
  115. package/operations/item_payment.d.ts +220 -0
  116. package/operations/item_payment.js +50 -0
  117. package/operations/item_receipt.d.ts +362 -0
  118. package/operations/item_receipt.js +50 -0
  119. package/operations/item_sales_tax.d.ts +228 -0
  120. package/operations/item_sales_tax.js +50 -0
  121. package/operations/item_sales_tax_group.d.ts +192 -0
  122. package/operations/item_sales_tax_group.js +50 -0
  123. package/operations/item_service.d.ts +256 -0
  124. package/operations/item_service.js +50 -0
  125. package/operations/item_sites.d.ts +81 -0
  126. package/operations/item_sites.js +26 -0
  127. package/operations/item_subtotal.d.ts +188 -0
  128. package/operations/item_subtotal.js +50 -0
  129. package/operations/job_report.d.ts +99 -0
  130. package/operations/job_report.js +26 -0
  131. package/operations/job_type.d.ts +127 -0
  132. package/operations/job_type.js +38 -0
  133. package/operations/journal_entry.d.ts +339 -0
  134. package/operations/journal_entry.js +50 -0
  135. package/operations/lead.d.ts +291 -0
  136. package/operations/lead.js +50 -0
  137. package/operations/list.d.ts +39 -0
  138. package/operations/list.js +26 -0
  139. package/operations/list_deleted.d.ts +44 -0
  140. package/operations/list_deleted.js +26 -0
  141. package/operations/list_display.d.ts +65 -0
  142. package/operations/list_display.js +38 -0
  143. package/operations/list_merge.d.ts +58 -0
  144. package/operations/list_merge.js +26 -0
  145. package/operations/other_name.d.ts +280 -0
  146. package/operations/other_name.js +50 -0
  147. package/operations/paycheck.d.ts +82 -0
  148. package/operations/paycheck.js +26 -0
  149. package/operations/payment_method.d.ts +131 -0
  150. package/operations/payment_method.js +38 -0
  151. package/operations/payroll_detail_report.d.ts +97 -0
  152. package/operations/payroll_detail_report.js +26 -0
  153. package/operations/payroll_item.d.ts +83 -0
  154. package/operations/payroll_item.js +26 -0
  155. package/operations/payroll_item_addition.d.ts +95 -0
  156. package/operations/payroll_item_addition.js +38 -0
  157. package/operations/payroll_item_company_contribution.d.ts +105 -0
  158. package/operations/payroll_item_company_contribution.js +38 -0
  159. package/operations/payroll_item_deduction.d.ts +101 -0
  160. package/operations/payroll_item_deduction.js +38 -0
  161. package/operations/payroll_item_direct_deposit.d.ts +65 -0
  162. package/operations/payroll_item_direct_deposit.js +38 -0
  163. package/operations/payroll_item_non_wage.d.ts +92 -0
  164. package/operations/payroll_item_non_wage.js +26 -0
  165. package/operations/payroll_item_tax.d.ts +108 -0
  166. package/operations/payroll_item_tax.js +38 -0
  167. package/operations/payroll_item_wage.d.ts +169 -0
  168. package/operations/payroll_item_wage.js +50 -0
  169. package/operations/payroll_item_workers_compensation.d.ts +77 -0
  170. package/operations/payroll_item_workers_compensation.js +38 -0
  171. package/operations/payroll_last_period.d.ts +31 -0
  172. package/operations/payroll_last_period.js +26 -0
  173. package/operations/payroll_liability_adjustment.d.ts +137 -0
  174. package/operations/payroll_liability_adjustment.js +38 -0
  175. package/operations/payroll_liability_check.d.ts +82 -0
  176. package/operations/payroll_liability_check.js +26 -0
  177. package/operations/payroll_prior_payment.d.ts +126 -0
  178. package/operations/payroll_prior_payment.js +38 -0
  179. package/operations/payroll_summary_report.d.ts +107 -0
  180. package/operations/payroll_summary_report.js +26 -0
  181. package/operations/payroll_year_to_date_adjustment.d.ts +156 -0
  182. package/operations/payroll_year_to_date_adjustment.js +38 -0
  183. package/operations/preferences.d.ts +64 -0
  184. package/operations/preferences.js +38 -0
  185. package/operations/price_level.d.ts +234 -0
  186. package/operations/price_level.js +50 -0
  187. package/operations/purchase_order.d.ts +620 -0
  188. package/operations/purchase_order.js +50 -0
  189. package/operations/qb_command_exec.d.ts +49 -0
  190. package/operations/qb_command_exec.js +26 -0
  191. package/operations/receive_payment.d.ts +450 -0
  192. package/operations/receive_payment.js +50 -0
  193. package/operations/receive_payment_to_deposit.d.ts +36 -0
  194. package/operations/receive_payment_to_deposit.js +26 -0
  195. package/operations/sales_order.d.ts +612 -0
  196. package/operations/sales_order.js +50 -0
  197. package/operations/sales_receipt.d.ts +650 -0
  198. package/operations/sales_receipt.js +50 -0
  199. package/operations/sales_rep.d.ts +170 -0
  200. package/operations/sales_rep.js +50 -0
  201. package/operations/sales_tax_code.d.ts +194 -0
  202. package/operations/sales_tax_code.js +50 -0
  203. package/operations/sales_tax_payable.d.ts +42 -0
  204. package/operations/sales_tax_payable.js +26 -0
  205. package/operations/sales_tax_payment_check.d.ts +254 -0
  206. package/operations/sales_tax_payment_check.js +50 -0
  207. package/operations/sales_tax_return.d.ts +35 -0
  208. package/operations/sales_tax_return.js +26 -0
  209. package/operations/sales_tax_return_line.d.ts +36 -0
  210. package/operations/sales_tax_return_line.js +26 -0
  211. package/operations/ship_method.d.ts +121 -0
  212. package/operations/ship_method.js +38 -0
  213. package/operations/special_account.d.ts +40 -0
  214. package/operations/special_account.js +26 -0
  215. package/operations/special_item.d.ts +44 -0
  216. package/operations/special_item.js +26 -0
  217. package/operations/standard_terms.d.ts +133 -0
  218. package/operations/standard_terms.js +38 -0
  219. package/operations/template.d.ts +36 -0
  220. package/operations/template.js +26 -0
  221. package/operations/terms.d.ts +90 -0
  222. package/operations/terms.js +26 -0
  223. package/operations/time_report.d.ts +84 -0
  224. package/operations/time_report.js +26 -0
  225. package/operations/time_tracking.d.ts +214 -0
  226. package/operations/time_tracking.js +50 -0
  227. package/operations/to_do.d.ts +254 -0
  228. package/operations/to_do.js +50 -0
  229. package/operations/transaction.d.ts +244 -0
  230. package/operations/transaction.js +26 -0
  231. package/operations/transfer.d.ts +178 -0
  232. package/operations/transfer.js +50 -0
  233. package/operations/transfer_inventory.d.ts +290 -0
  234. package/operations/transfer_inventory.js +50 -0
  235. package/operations/txn.d.ts +39 -0
  236. package/operations/txn.js +26 -0
  237. package/operations/txn_deleted.d.ts +44 -0
  238. package/operations/txn_deleted.js +26 -0
  239. package/operations/txn_display.d.ts +69 -0
  240. package/operations/txn_display.js +38 -0
  241. package/operations/txn_void.d.ts +39 -0
  242. package/operations/txn_void.js +26 -0
  243. package/operations/types.d.ts +1259 -0
  244. package/operations/unit_of_measure_set.d.ts +168 -0
  245. package/operations/unit_of_measure_set.js +38 -0
  246. package/operations/vehicle.d.ts +168 -0
  247. package/operations/vehicle.js +50 -0
  248. package/operations/vehicle_mileage.d.ts +147 -0
  249. package/operations/vehicle_mileage.js +38 -0
  250. package/operations/vendor.d.ts +541 -0
  251. package/operations/vendor.js +50 -0
  252. package/operations/vendor_credit.d.ts +365 -0
  253. package/operations/vendor_credit.js +50 -0
  254. package/operations/vendor_type.d.ts +127 -0
  255. package/operations/vendor_type.js +38 -0
  256. package/operations/workers_comp_code.d.ts +199 -0
  257. package/operations/workers_comp_code.js +50 -0
  258. package/package.json +14 -4
@@ -0,0 +1,620 @@
1
+ // Generated from operations.json by scripts/generate-operations.js: don't edit.
2
+
3
+ import type { Client } from "../index";
4
+ import type { OperationOptions, QueuedRequest, AccountFilter, CurrencyFilter, CurrencyRef, DataExtBill, ModifiedDateRangeFilter, RefNumberFilter, RefNumberRangeFilter, ShipAddress, TxnDateRangeFilter } from "./types";
5
+
6
+ /** QuickBooks purchase order operations: `qube.purchaseOrder.<action>(connectionId, params, { webhookUrl })`. */
7
+ export declare class PurchaseOrder {
8
+ constructor(client: Client);
9
+ /**
10
+ * Create purchase order: `POST /connections/{connection_id}/purchase-orders`, queued for QuickBooks.
11
+ *
12
+ * The answer comes to `webhookUrl` as one webhook.
13
+ * Params go in the JSON body.
14
+ *
15
+ * Fields: `class_ref`, `def_macro`, `due_date`, `exchange_rate`, `expected_date`, `external_guid`, `fob`, `include_ret_element`, `inventory_site_ref`, `is_tax_included`, `is_to_be_emailed`, `is_to_be_printed`, `memo`, `other1`, `other2`, `purchase_order_line_add`, `purchase_order_line_group_add`, `ref_number`, `request_id`, `sales_tax_code_ref`, `ship_address`, `ship_method_ref`, `ship_to_entity_ref`, `template_ref`, `terms_ref`, `txn_date`, `vendor_address`, `vendor_msg`, `vendor_ref`.
16
+ *
17
+ * Resolves to the queued request.
18
+ * @see https://docs.qubesync.com/api-reference/v2/purchase-orders/create-purchase-order
19
+ */
20
+ create(connectionId: string, params: PurchaseOrderCreateParams | undefined, options: OperationOptions): Promise<QueuedRequest>;
21
+ /**
22
+ * List purchase orders: `GET /connections/{connection_id}/purchase-orders`, queued for QuickBooks.
23
+ *
24
+ * QuickBooks answers in pages: each page comes to `webhookUrl` as its own webhook.
25
+ * Params go in the query string.
26
+ *
27
+ * Fields: `account_filter`, `currency_filter`, `entity_filter`, `include_line_items`, `include_linked_txns`, `include_ret_element`, `iterator`, `max_returned`, `meta_data`, `modified_date_range_filter`, `owner_id`, `ref_number`, `ref_number_case_sensitive`, `ref_number_filter`, `ref_number_range_filter`, `request_id`, `txn_date_range_filter`, `txn_id`.
28
+ *
29
+ * Resolves to the queued request.
30
+ * @see https://docs.qubesync.com/api-reference/v2/purchase-orders/list-purchase-orders
31
+ */
32
+ query(connectionId: string, params: PurchaseOrderQueryParams | undefined, options: OperationOptions): Promise<QueuedRequest>;
33
+ /**
34
+ * Update purchase order: `PUT /connections/{connection_id}/purchase-orders`, queued for QuickBooks.
35
+ *
36
+ * The answer comes to `webhookUrl` as one webhook.
37
+ * Params go in the JSON body.
38
+ *
39
+ * Fields: `class_ref`, `due_date`, `edit_sequence` (required), `exchange_rate`, `expected_date`, `fob`, `include_ret_element`, `inventory_site_ref`, `is_manually_closed`, `is_tax_included`, `is_to_be_emailed`, `is_to_be_printed`, `memo`, `other1`, `other2`, `purchase_order_line_group_mod`, `purchase_order_line_mod`, `ref_number`, `request_id`, `sales_tax_code_ref`, `ship_address`, `ship_method_ref`, `ship_to_entity_ref`, `template_ref`, `terms_ref`, `txn_date`, `txn_id` (required), `vendor_address`, `vendor_msg`, `vendor_ref`.
40
+ *
41
+ * Resolves to the queued request.
42
+ * @see https://docs.qubesync.com/api-reference/v2/purchase-orders/update-purchase-order
43
+ */
44
+ update(connectionId: string, params: PurchaseOrderUpdateParams, options: OperationOptions): Promise<QueuedRequest>;
45
+ }
46
+
47
+ /**
48
+ * The params of `purchase_order.create`: Create purchase order.
49
+ */
50
+ export interface PurchaseOrderCreateParams {
51
+ /**
52
+ * Use classes to categorize transactions (for example, by department, location, or work type). Class tracking is off by default in QuickBooks. A `class_ref` points to one class; if both `full_name` and `list_id` are provided, `full_name` is ignored. In InvoiceAdd, a header-level `class_ref` is applied to line items unless you override or clear it on individual lines.
53
+ */
54
+ class_ref?: CurrencyRef;
55
+ /**
56
+ * `def_macro` lets you assign a reusable name to a returned `txn_id` or `txn_line_id` so later requests can reference it with `useMacro`. This feature requires SDK 2.0+.
57
+ */
58
+ def_macro?: string;
59
+ /**
60
+ * The date on which payment is due.
61
+ *
62
+ * Format: date.
63
+ */
64
+ due_date?: string;
65
+ /**
66
+ * `exchange_rate` is the rate from this currency to the company’s home currency at AsOfDate. You can supply a rate when adding transactions, but QuickBooks does not provide rates through the SDK. If your home currency is USD and internet access is available, rates can be downloaded in the QuickBooks UI via Lists > Currency > Activities > Download Latest Exchange Rates.
67
+ */
68
+ exchange_rate?: number;
69
+ /**
70
+ * The date on which shipment is expected.
71
+ *
72
+ * Format: date.
73
+ */
74
+ expected_date?: string;
75
+ /**
76
+ * Allows for the attachment of a user defined GUID value.
77
+ */
78
+ external_guid?: string;
79
+ /**
80
+ * QuickBooks uses the term FOB, “freight on board,” to indicate the place from which the product is shipped. The FOB has no accounting implications.
81
+ */
82
+ fob?: string;
83
+ include_ret_element?: Array<"ClassRef" | "CurrencyRef" | "DataExtRet" | "DueDate" | "EditSequence" | "ExchangeRate" | "ExpectedDate" | "ExternalGUID" | "FOB" | "InventorySiteRef" | "IsFullyReceived" | "IsManuallyClosed" | "IsTaxIncluded" | "IsToBeEmailed" | "IsToBePrinted" | "LinkedTxn" | "ListID" | "Memo" | "Other1" | "Other2" | "OwnerID" | "PurchaseOrderLineGroupRet" | "PurchaseOrderLineRet" | "RefNumber" | "SalesTaxCodeRef" | "ShipAddress" | "ShipAddressBlock" | "ShipMethodRef" | "ShipToEntityRef" | "TemplateRef" | "TermsRef" | "TimeCreated" | "TimeModified" | "TotalAmount" | "TotalAmountInHomeCurrency" | "TxnDate" | "TxnID" | "TxnNumber" | "VendorAddress" | "VendorAddressBlock" | "VendorMsg" | "VendorRef">;
84
+ /**
85
+ * Site where inventory is located.
86
+ *
87
+ * Choose at most one of: `inventory_site_ref`, or `ship_to_entity_ref`.
88
+ */
89
+ inventory_site_ref?: CurrencyRef;
90
+ /**
91
+ * For future use with international versions of QuickBooks.
92
+ */
93
+ is_tax_included?: boolean;
94
+ /**
95
+ * When enabled, QuickBooks validates the customer email at runtime before sending. If no valid email is available, the request fails.
96
+ */
97
+ is_to_be_emailed?: boolean;
98
+ /**
99
+ * If `is_to_be_printed` is true, QuickBooks queues the form for later printing. It does not print immediately; printing is still a user action in QuickBooks.
100
+ */
101
+ is_to_be_printed?: boolean;
102
+ /**
103
+ * This can be included in reports, but it doesn’t appear on the printed purchase order.
104
+ */
105
+ memo?: string;
106
+ /**
107
+ * Other, Other1, and Other2 are built-in transaction custom fields. Other is transaction-level; Other1 and Other2 are line-level. These fields are always available through the SDK and do not require DataExtDef setup. Template labels in the UI can be renamed, but SDK names remain fixed as Other, Other1, and Other2.
108
+ */
109
+ other1?: string;
110
+ /**
111
+ * Other, Other1, and Other2 are built-in transaction custom fields. Other is transaction-level; Other1 and Other2 are line-level. These fields are always available through the SDK and do not require DataExtDef setup. Template labels in the UI can be renamed, but SDK names remain fixed as Other, Other1, and Other2.
112
+ */
113
+ other2?: string;
114
+ /**
115
+ * One line of the purchase order. Compare with PurchaseOrderLineGroup, which represents a previously defined group of lines in the purchase order.
116
+ *
117
+ * At least one entry is required across `purchase_order_line_add` and `purchase_order_line_group_add`; they combine, any number of each. QuickBooks receives them in that order: every `purchase_order_line_add`, then every `purchase_order_line_group_add`.
118
+ */
119
+ purchase_order_line_add?: PurchaseOrderLineAdd[];
120
+ /**
121
+ * Represents a previously defined group of lines in the purchase order. Compare with PurchaseOrderLine, which represents just one line in the purchase order.
122
+ *
123
+ * At least one entry is required across `purchase_order_line_add` and `purchase_order_line_group_add`; they combine, any number of each. QuickBooks receives them in that order: every `purchase_order_line_add`, then every `purchase_order_line_group_add`.
124
+ */
125
+ purchase_order_line_group_add?: PurchaseOrderLineGroupAdd[];
126
+ /**
127
+ * `ref_number` is a user-managed transaction reference (for example, a check number). It can be edited and is not guaranteed to be globally unique. Some transaction types auto-populate `ref_number` when omitted, based on QuickBooks preferences and numbering state.
128
+ */
129
+ ref_number?: string;
130
+ /**
131
+ * Your own label for the request, sent to QuickBooks as its qbXML `requestID` and echoed in the raw answer (`response_xml`); optional, since the answer's webhook already carries the request's `id`.
132
+ */
133
+ request_id?: string;
134
+ /**
135
+ * `sales_tax_code_ref` points to the sales-tax code used for an item or customer context. QuickBooks includes default TAX and NON codes, and a code can be deleted only when nothing references it. If sales tax is disabled, QuickBooks assigns the default non-taxable code. If both `full_name` and `list_id` are provided in `sales_tax_code_ref`, `full_name` is ignored.
136
+ */
137
+ sales_tax_code_ref?: CurrencyRef;
138
+ /**
139
+ * This aggregate supports at most five address lines. You can provide a structured address (Addr1-Addr3 plus City/State/`postal_code`/etc.) or use block mode (Addr1-Addr5 only). Do not mix block mode with other address fields. In block mode, each Addr line prints as its own line and is returned in `ship_address_block` or BillAddressBlock.
140
+ */
141
+ ship_address?: ShipAddress;
142
+ /**
143
+ * A shipping method, for example, standard mail or overnight delivery. A `ship_method_ref` aggregate refers to an item on the ShipMethod list. In a request, if a `ship_method_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
144
+ */
145
+ ship_method_ref?: CurrencyRef;
146
+ /**
147
+ * Refers to a customer, vendor, employee, or person on the “other names” list to whom this order is to be shipped. If a `ship_to_entity_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
148
+ *
149
+ * Choose at most one of: `inventory_site_ref`, or `ship_to_entity_ref`.
150
+ */
151
+ ship_to_entity_ref?: CurrencyRef;
152
+ /**
153
+ * QuickBooks templates specify how to print certain transactions. A template query returns the names of all templates that have been defined in QuickBooks. A `template_ref` element refers to one of these templates.
154
+ */
155
+ template_ref?: CurrencyRef;
156
+ /**
157
+ * Refers to the payment terms associated with this entity. (This will be an item on the DateDrivenTerms or StandardTerms list.) If a `terms_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
158
+ */
159
+ terms_ref?: CurrencyRef;
160
+ /**
161
+ * The date of the transaction. In some cases, if you leave `txn_date` out of an -Add message, QuickBooks will prefill `txn_date` with the date of the last-saved transaction of the same type.
162
+ *
163
+ * Format: date.
164
+ */
165
+ txn_date?: string;
166
+ /**
167
+ * If an address request fails, some combination of address fields might be too long.
168
+ */
169
+ vendor_address?: ShipAddress;
170
+ /**
171
+ * Message to be printed on a purchase order for the vendor to read.
172
+ */
173
+ vendor_msg?: string;
174
+ /**
175
+ * A vendor is any person or company from whom a small business owner buys goods and services. (Banks and tax agencies usually are included on the vendor list.) A company’s vendor list contains information such as account balance and contact information about each vendor. A `vendor_ref` aggregate refers to one of the vendors on the list.
176
+ */
177
+ vendor_ref?: CurrencyRef;
178
+ }
179
+
180
+ /**
181
+ * The params of `purchase_order.query`: List purchase orders.
182
+ */
183
+ export interface PurchaseOrderQueryParams {
184
+ /**
185
+ * Filters according to the account name or `list_id`. If the “Use account numbers” preference is enabled in the QuickBooks company file, you can specify an account number (instead of an account name) for `full_name` and get the account you’re looking for. But if numbers have been used as account names, confusion could arise.
186
+ *
187
+ * Choose at most one of: `txn_id`, or `ref_number`, or `ref_number_case_sensitive`, or the set (`account_filter`, `currency_filter`, `entity_filter`, `max_returned`, `modified_date_range_filter`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
188
+ */
189
+ account_filter?: AccountFilter;
190
+ /**
191
+ * Filters by the specified currency.
192
+ *
193
+ * Choose at most one of: `txn_id`, or `ref_number`, or `ref_number_case_sensitive`, or the set (`account_filter`, `currency_filter`, `entity_filter`, `max_returned`, `modified_date_range_filter`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
194
+ */
195
+ currency_filter?: CurrencyFilter;
196
+ /**
197
+ * An entity refers to a person on the QuickBooks Customer list, Vendor list, Employee list, or Other Names list. You can use an EntityQuery request to get information about all the entities that are set up in the QuickBooks file. In an ARRefundCreditCard query, this must be a customer/customer job.
198
+ *
199
+ * Choose at most one of: `txn_id`, or `ref_number`, or `ref_number_case_sensitive`, or the set (`account_filter`, `currency_filter`, `entity_filter`, `max_returned`, `modified_date_range_filter`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
200
+ */
201
+ entity_filter?: AccountFilter;
202
+ /**
203
+ * This filter allows you to omit line items from a query response to get a smaller result. The default value is false, so line items are omitted by default. Set `include_line_items` to true to include line items in the response if you don’t mind getting a larger result.
204
+ */
205
+ include_line_items?: boolean;
206
+ /**
207
+ * If you set `include_linked_txns` to true, then the returned object will include a list of all the transactions linked to the queried object. (This list is similar to the History view of a transaction in the user interface, but not identical, as the SDK list contains only linked transactions, not items.) Each linked transaction will be represented by a `linked_txn` aggregate.
208
+ */
209
+ include_linked_txns?: boolean;
210
+ include_ret_element?: Array<"ClassRef" | "CurrencyRef" | "DataExtRet" | "DueDate" | "EditSequence" | "ExchangeRate" | "ExpectedDate" | "ExternalGUID" | "FOB" | "InventorySiteRef" | "IsFullyReceived" | "IsManuallyClosed" | "IsTaxIncluded" | "IsToBeEmailed" | "IsToBePrinted" | "LinkedTxn" | "Memo" | "Other1" | "Other2" | "PurchaseOrderLineGroupRet" | "PurchaseOrderLineRet" | "RefNumber" | "SalesTaxCodeRef" | "ShipAddress" | "ShipAddressBlock" | "ShipMethodRef" | "ShipToEntityRef" | "TemplateRef" | "TermsRef" | "TimeCreated" | "TimeModified" | "TotalAmount" | "TotalAmountInHomeCurrency" | "TxnDate" | "TxnID" | "TxnNumber" | "VendorAddress" | "VendorAddressBlock" | "VendorMsg" | "VendorRef">;
211
+ /**
212
+ * Page through every match: QuBe Sync asks QuickBooks for each page in turn and sends each to your `webhook_url` as it arrives, all with the same `id`. On by default, with pages of 100 records (25 with `include_line_items` or `include_linked_txns`); send `iterator=true` with `max_returned` for another size. Off when you send `iterator=false` (every match in one answer) or `max_returned` alone (at most that many, in one answer). It pages a filtered query only: with `ref_number`, `ref_number_case_sensitive` or `txn_id` every match comes back in one answer, so leave `iterator` out.
213
+ */
214
+ iterator?: boolean;
215
+ /**
216
+ * Limits the number of objects that a query returns. (To get a count of how many objects could possibly be returned, use the `meta_data` query attribute.) If you include a `max_returned` value, it must be at least 1.
217
+ *
218
+ * The page size, with `iterator=true`. Sent without `iterator`, or with `iterator=false`, it's a cap instead: at most this many records come back, in one answer, and QuickBooks doesn't say whether more matched.
219
+ *
220
+ * Choose at most one of: `txn_id`, or `ref_number`, or `ref_number_case_sensitive`, or the set (`account_filter`, `currency_filter`, `entity_filter`, `max_returned`, `modified_date_range_filter`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
221
+ *
222
+ * Minimum 1.
223
+ */
224
+ max_returned?: number;
225
+ /**
226
+ * Use the `meta_data` attribute to control whether query responses include counts. Options are NoMetaData (default), MetaDataOnly (count only), and MetaDataAndResponseData (count plus objects). Counts are approximate and may vary slightly if records are created or deleted during processing.
227
+ */
228
+ meta_data?: "MetaDataAndResponseData" | "MetaDataOnly" | "NoMetaData";
229
+ /**
230
+ * Filters according to the dates when transactions were last modified. The `modified_date_range_filter` aggregate isn’t required to contain any elements, but if it is empty, we recommend that you leave it out altogether. Note that the time portion of the `from_modified_date` and `to_modified_date` fields wasn’t supported in qbXML version 1.0 or 1.1.
231
+ *
232
+ * Choose at most one of: `txn_id`, or `ref_number`, or `ref_number_case_sensitive`, or the set (`account_filter`, `currency_filter`, `entity_filter`, `max_returned`, `modified_date_range_filter`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
233
+ */
234
+ modified_date_range_filter?: ModifiedDateRangeFilter;
235
+ /**
236
+ * `owner_id` identifies who owns the data extension. Use 0 for QuickBooks custom fields that appear in the UI, or use a GUID for private extensions owned by an app. Keep private GUIDs confidential unless you intentionally share extensions across apps. If you do share them, both apps must use the same `owner_id` and `data_ext_name`, because that pair uniquely identifies the extension.
237
+ */
238
+ owner_id?: string[];
239
+ /**
240
+ * `ref_number` is a user-managed transaction reference (for example, a check number). It can be edited and is not guaranteed to be globally unique. Some transaction types auto-populate `ref_number` when omitted, based on QuickBooks preferences and numbering state.
241
+ *
242
+ * Choose at most one of: `txn_id`, or `ref_number`, or `ref_number_case_sensitive`, or the set (`account_filter`, `currency_filter`, `entity_filter`, `max_returned`, `modified_date_range_filter`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
243
+ */
244
+ ref_number?: string[];
245
+ /**
246
+ * Choose at most one of: `txn_id`, or `ref_number`, or `ref_number_case_sensitive`, or the set (`account_filter`, `currency_filter`, `entity_filter`, `max_returned`, `modified_date_range_filter`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
247
+ */
248
+ ref_number_case_sensitive?: string[];
249
+ /**
250
+ * Filters by `ref_number` range. Numeric-only bounds are compared numerically; otherwise comparison is lexicographic.
251
+ *
252
+ * Choose at most one of: `txn_id`, or `ref_number`, or `ref_number_case_sensitive`, or the set (`account_filter`, `currency_filter`, `entity_filter`, `max_returned`, `modified_date_range_filter`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
253
+ */
254
+ ref_number_filter?: RefNumberFilter;
255
+ /**
256
+ * Filters by `ref_number` range. Numeric-only bounds are compared numerically; otherwise comparison is lexicographic.
257
+ *
258
+ * Choose at most one of: `txn_id`, or `ref_number`, or `ref_number_case_sensitive`, or the set (`account_filter`, `currency_filter`, `entity_filter`, `max_returned`, `modified_date_range_filter`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
259
+ */
260
+ ref_number_range_filter?: RefNumberRangeFilter;
261
+ /**
262
+ * Your own label for the request, sent to QuickBooks as its qbXML `requestID` and echoed in the raw answer (`response_xml`); optional, since the answer's webhook already carries the request's `id`.
263
+ */
264
+ request_id?: string;
265
+ /**
266
+ * Filters according to the original transaction dates.
267
+ *
268
+ * Choose at most one of: `txn_id`, or `ref_number`, or `ref_number_case_sensitive`, or the set (`account_filter`, `currency_filter`, `entity_filter`, `max_returned`, `modified_date_range_filter`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
269
+ */
270
+ txn_date_range_filter?: TxnDateRangeFilter;
271
+ /**
272
+ * `txn_id` is the unique QuickBooks identifier for a transaction. Use it to reference that transaction in later requests. `txn_id` values are transaction-specific and should not be reused across unrelated transaction types.
273
+ *
274
+ * Choose at most one of: `txn_id`, or `ref_number`, or `ref_number_case_sensitive`, or the set (`account_filter`, `currency_filter`, `entity_filter`, `max_returned`, `modified_date_range_filter`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
275
+ */
276
+ txn_id?: string[];
277
+ }
278
+
279
+ /**
280
+ * The params of `purchase_order.update`: Update purchase order.
281
+ */
282
+ export interface PurchaseOrderUpdateParams {
283
+ /**
284
+ * Use classes to categorize transactions (for example, by department, location, or work type). Class tracking is off by default in QuickBooks. A `class_ref` points to one class; if both `full_name` and `list_id` are provided, `full_name` is ignored. In InvoiceAdd, a header-level `class_ref` is applied to line items unless you override or clear it on individual lines.
285
+ */
286
+ class_ref?: CurrencyRef;
287
+ /**
288
+ * The date on which payment is due.
289
+ *
290
+ * Format: date.
291
+ */
292
+ due_date?: string;
293
+ /**
294
+ * `edit_sequence` is a server-generated revision token. It changes each time the object is updated. To modify an existing object, you must send the current `edit_sequence`. If your value is stale, the update is rejected to prevent overwriting newer changes.
295
+ */
296
+ edit_sequence: string;
297
+ /**
298
+ * `exchange_rate` is the rate from this currency to the company’s home currency at AsOfDate. You can supply a rate when adding transactions, but QuickBooks does not provide rates through the SDK. If your home currency is USD and internet access is available, rates can be downloaded in the QuickBooks UI via Lists > Currency > Activities > Download Latest Exchange Rates.
299
+ */
300
+ exchange_rate?: number;
301
+ /**
302
+ * The date on which shipment is expected.
303
+ *
304
+ * Format: date.
305
+ */
306
+ expected_date?: string;
307
+ /**
308
+ * QuickBooks uses the term FOB, “freight on board,” to indicate the place from which the product is shipped. The FOB has no accounting implications.
309
+ */
310
+ fob?: string;
311
+ include_ret_element?: Array<"ClassRef" | "CurrencyRef" | "DataExtRet" | "DueDate" | "EditSequence" | "ExchangeRate" | "ExpectedDate" | "ExternalGUID" | "FOB" | "InventorySiteRef" | "IsFullyReceived" | "IsManuallyClosed" | "IsTaxIncluded" | "IsToBeEmailed" | "IsToBePrinted" | "LinkedTxn" | "ListID" | "Memo" | "Other1" | "Other2" | "OwnerID" | "PurchaseOrderLineGroupRet" | "PurchaseOrderLineRet" | "RefNumber" | "SalesTaxCodeRef" | "ShipAddress" | "ShipAddressBlock" | "ShipMethodRef" | "ShipToEntityRef" | "TemplateRef" | "TermsRef" | "TimeCreated" | "TimeModified" | "TotalAmount" | "TotalAmountInHomeCurrency" | "TxnDate" | "TxnID" | "TxnNumber" | "VendorAddress" | "VendorAddressBlock" | "VendorMsg" | "VendorRef">;
312
+ /**
313
+ * Site where inventory is located.
314
+ *
315
+ * Choose at most one of: `inventory_site_ref`, or `ship_to_entity_ref`.
316
+ */
317
+ inventory_site_ref?: CurrencyRef;
318
+ /**
319
+ * If `is_manually_closed` is true, this purchase order has been closed, even if all the items haven’t been received or the sale hasn’t been cancelled. Once the purchase order is marked as closed, all the line items within it become closed as well. You can’t change `is_manually_closed` to false after the purchase order has been fully received.
320
+ */
321
+ is_manually_closed?: boolean;
322
+ /**
323
+ * For future use with international versions of QuickBooks.
324
+ */
325
+ is_tax_included?: boolean;
326
+ /**
327
+ * When enabled, QuickBooks validates the customer email at runtime before sending. If no valid email is available, the request fails.
328
+ */
329
+ is_to_be_emailed?: boolean;
330
+ /**
331
+ * If `is_to_be_printed` is true, QuickBooks queues the form for later printing. It does not print immediately; printing is still a user action in QuickBooks.
332
+ */
333
+ is_to_be_printed?: boolean;
334
+ /**
335
+ * This can be included in reports, but it doesn’t appear on the printed purchase order.
336
+ */
337
+ memo?: string;
338
+ /**
339
+ * Other, Other1, and Other2 are built-in transaction custom fields. Other is transaction-level; Other1 and Other2 are line-level. These fields are always available through the SDK and do not require DataExtDef setup. Template labels in the UI can be renamed, but SDK names remain fixed as Other, Other1, and Other2.
340
+ */
341
+ other1?: string;
342
+ /**
343
+ * Other, Other1, and Other2 are built-in transaction custom fields. Other is transaction-level; Other1 and Other2 are line-level. These fields are always available through the SDK and do not require DataExtDef setup. Template labels in the UI can be renamed, but SDK names remain fixed as Other, Other1, and Other2.
344
+ */
345
+ other2?: string;
346
+ /**
347
+ * Represents a previously defined group of lines in the purchase order. Compare with PurchaseOrderLine, which represents just one line in the purchase order.
348
+ *
349
+ * `purchase_order_line_mod` and `purchase_order_line_group_mod` combine: any number of each. QuickBooks receives them in that order: every `purchase_order_line_mod`, then every `purchase_order_line_group_mod`.
350
+ */
351
+ purchase_order_line_group_mod?: PurchaseOrderLineGroupMod[];
352
+ /**
353
+ * One line of the purchase order. Compare with PurchaseOrderLineGroup, which represents a previously defined group of lines in the purchase order.
354
+ *
355
+ * `purchase_order_line_mod` and `purchase_order_line_group_mod` combine: any number of each. QuickBooks receives them in that order: every `purchase_order_line_mod`, then every `purchase_order_line_group_mod`.
356
+ */
357
+ purchase_order_line_mod?: PurchaseOrderLineMod[];
358
+ /**
359
+ * `ref_number` is a user-managed transaction reference (for example, a check number). It can be edited and is not guaranteed to be globally unique. Some transaction types auto-populate `ref_number` when omitted, based on QuickBooks preferences and numbering state.
360
+ */
361
+ ref_number?: string;
362
+ /**
363
+ * Your own label for the request, sent to QuickBooks as its qbXML `requestID` and echoed in the raw answer (`response_xml`); optional, since the answer's webhook already carries the request's `id`.
364
+ */
365
+ request_id?: string;
366
+ /**
367
+ * `sales_tax_code_ref` points to the sales-tax code used for an item or customer context. QuickBooks includes default TAX and NON codes, and a code can be deleted only when nothing references it. If sales tax is disabled, QuickBooks assigns the default non-taxable code. If both `full_name` and `list_id` are provided in `sales_tax_code_ref`, `full_name` is ignored.
368
+ */
369
+ sales_tax_code_ref?: CurrencyRef;
370
+ /**
371
+ * This aggregate supports at most five address lines. You can provide a structured address (Addr1-Addr3 plus City/State/`postal_code`/etc.) or use block mode (Addr1-Addr5 only). Do not mix block mode with other address fields. In block mode, each Addr line prints as its own line and is returned in `ship_address_block` or BillAddressBlock.
372
+ */
373
+ ship_address?: ShipAddress;
374
+ /**
375
+ * A shipping method, for example, standard mail or overnight delivery. A `ship_method_ref` aggregate refers to an item on the ShipMethod list. In a request, if a `ship_method_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
376
+ */
377
+ ship_method_ref?: CurrencyRef;
378
+ /**
379
+ * Refers to a customer, vendor, employee, or person on the “other names” list to whom this order is to be shipped. If a `ship_to_entity_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
380
+ *
381
+ * Choose at most one of: `inventory_site_ref`, or `ship_to_entity_ref`.
382
+ */
383
+ ship_to_entity_ref?: CurrencyRef;
384
+ /**
385
+ * QuickBooks templates specify how to print certain transactions. A template query returns the names of all templates that have been defined in QuickBooks. A `template_ref` element refers to one of these templates.
386
+ */
387
+ template_ref?: CurrencyRef;
388
+ /**
389
+ * Refers to the payment terms associated with this entity. (This will be an item on the DateDrivenTerms or StandardTerms list.) If a `terms_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
390
+ */
391
+ terms_ref?: CurrencyRef;
392
+ /**
393
+ * The date of the transaction. In some cases, if you leave `txn_date` out of an -Add message, QuickBooks will prefill `txn_date` with the date of the last-saved transaction of the same type.
394
+ *
395
+ * Format: date.
396
+ */
397
+ txn_date?: string;
398
+ /**
399
+ * `txn_id` is the unique QuickBooks identifier for a transaction. Use it to reference that transaction in later requests. `txn_id` values are transaction-specific and should not be reused across unrelated transaction types.
400
+ */
401
+ txn_id: string;
402
+ /**
403
+ * If an address request fails, some combination of address fields might be too long.
404
+ */
405
+ vendor_address?: ShipAddress;
406
+ /**
407
+ * Message to be printed on a purchase order for the vendor to read.
408
+ */
409
+ vendor_msg?: string;
410
+ /**
411
+ * A vendor is any person or company from whom a small business owner buys goods and services. (Banks and tax agencies usually are included on the vendor list.) A company’s vendor list contains information such as account balance and contact information about each vendor. A `vendor_ref` aggregate refers to one of the vendors on the list.
412
+ */
413
+ vendor_ref?: CurrencyRef;
414
+ }
415
+
416
+ export interface PurchaseOrderLineAdd {
417
+ /**
418
+ * A monetary amount.
419
+ */
420
+ amount?: number;
421
+ /**
422
+ * Use classes to categorize transactions (for example, by department, location, or work type). Class tracking is off by default in QuickBooks. A `class_ref` points to one class; if both `full_name` and `list_id` are provided, `full_name` is ignored. In InvoiceAdd, a header-level `class_ref` is applied to line items unless you override or clear it on individual lines.
423
+ */
424
+ class_ref?: CurrencyRef;
425
+ /**
426
+ * `customer_ref` identifies a customer or customer job. If both `full_name` and `list_id` are provided, `full_name` is ignored. In SalesReceipt and ReceivePayment, it identifies who receives credit. In TimeTracking, it identifies who the time can be billed to and is required in TimeTrackingAdd when IsBillable is true.
427
+ */
428
+ customer_ref?: CurrencyRef;
429
+ data_ext?: DataExtBill[];
430
+ /**
431
+ * `def_macro` lets you assign a reusable name to a returned `txn_id` or `txn_line_id` so later requests can reference it with `useMacro`. This feature requires SDK 2.0+.
432
+ */
433
+ def_macro?: string;
434
+ /**
435
+ * Description that appears on the purchase order for this line item.
436
+ */
437
+ desc?: string;
438
+ /**
439
+ * Location within the Inventory Site.
440
+ */
441
+ inventory_site_location_ref?: CurrencyRef;
442
+ /**
443
+ * `item_ref` may accept all item types or a restricted subset, depending on the request. Examples: PurchaseOrder and Bill do not allow discount or sales-tax items; VehicleMileageAdd requires a service or other-charge item; BillingRateAdd requires a service item. If both `full_name` and `list_id` are provided, `full_name` is ignored.
444
+ */
445
+ item_ref?: CurrencyRef;
446
+ /**
447
+ * The part number used by the manufacturer of the item.
448
+ */
449
+ manufacturer_part_number?: string;
450
+ /**
451
+ * Other, Other1, and Other2 are built-in transaction custom fields. Other is transaction-level; Other1 and Other2 are line-level. These fields are always available through the SDK and do not require DataExtDef setup. Template labels in the UI can be renamed, but SDK names remain fixed as Other, Other1, and Other2.
452
+ */
453
+ other1?: string;
454
+ /**
455
+ * Other, Other1, and Other2 are built-in transaction custom fields. Other is transaction-level; Other1 and Other2 are line-level. These fields are always available through the SDK and do not require DataExtDef setup. Template labels in the UI can be renamed, but SDK names remain fixed as Other, Other1, and Other2.
456
+ */
457
+ other2?: string;
458
+ /**
459
+ * Refers to a QuickBooks account. If an `override_item_account_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
460
+ */
461
+ override_item_account_ref?: CurrencyRef;
462
+ /**
463
+ * On transaction lines, QuickBooks can derive one value from the other two among Quantity, Rate, and Amount. If you supply Quantity and Amount, QuickBooks calculates Rate. If you supply Quantity and Rate, QuickBooks calculates Amount.
464
+ */
465
+ quantity?: number;
466
+ /**
467
+ * If you specify both Rate and Amount in a request, the Rate you provide will be ignored, and you will receive a warning. If you specify both Quantity and Amount in an Add or Mod request, QuickBooks will use them to calculate Rate. (Rate, Amount, and Quantity can’t be cleared.)
468
+ */
469
+ rate?: number;
470
+ /**
471
+ * `sales_tax_code_ref` points to the sales-tax code used for an item or customer context. QuickBooks includes default TAX and NON codes, and a code can be deleted only when nothing references it. If sales tax is disabled, QuickBooks assigns the default non-taxable code. If both `full_name` and `list_id` are provided in `sales_tax_code_ref`, `full_name` is ignored.
472
+ */
473
+ sales_tax_code_ref?: CurrencyRef;
474
+ /**
475
+ * Indicates the date on which the QuickBooks user performs the service for the customer.
476
+ *
477
+ * Format: date.
478
+ */
479
+ service_date?: string;
480
+ tax_amount?: number;
481
+ /**
482
+ * In a transaction line item, the name of the unit of measure selected from within the item’s available units. If the company file is enabled only for single unit of measure per item, this must be the base unit!
483
+ */
484
+ unit_of_measure?: string;
485
+ }
486
+
487
+ export interface PurchaseOrderLineGroupAdd {
488
+ data_ext?: DataExtBill[];
489
+ /**
490
+ * Description that appears on the purchase order for this line item.
491
+ */
492
+ desc?: string;
493
+ /**
494
+ * Location within the Inventory Site.
495
+ */
496
+ inventory_site_location_ref?: CurrencyRef;
497
+ /**
498
+ * ItemGroup objects represent items that are grouped together for fast entry, and an `item_group_ref` aggregate refers to one of these item groups. In a request, if an `item_group_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored. You can use an ItemGroupQuery request to get information about all the item groups that are set up in the QuickBooks file.
499
+ */
500
+ item_group_ref: CurrencyRef;
501
+ /**
502
+ * On transaction lines, QuickBooks can derive one value from the other two among Quantity, Rate, and Amount. If you supply Quantity and Amount, QuickBooks calculates Rate. If you supply Quantity and Rate, QuickBooks calculates Amount.
503
+ */
504
+ quantity?: number;
505
+ /**
506
+ * Indicates the date on which the QuickBooks user performs the service for the customer.
507
+ *
508
+ * Format: date.
509
+ */
510
+ service_date?: string;
511
+ /**
512
+ * In a transaction line item, the name of the unit of measure selected from within the item’s available units. If the company file is enabled only for single unit of measure per item, this must be the base unit!
513
+ */
514
+ unit_of_measure?: string;
515
+ }
516
+
517
+ export interface PurchaseOrderLineGroupMod {
518
+ /**
519
+ * ItemGroup objects represent items that are grouped together for fast entry, and an `item_group_ref` aggregate refers to one of these item groups. In a request, if an `item_group_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored. You can use an ItemGroupQuery request to get information about all the item groups that are set up in the QuickBooks file.
520
+ */
521
+ item_group_ref?: CurrencyRef;
522
+ /**
523
+ * When you modify a transaction line to change the unit of measure used in that line, you use this aggregate to specify the UOM set within which you are choosing an available unit of measure. The “override” here refers to the unit within the set, not the UOM Set itself, which you can’t change or override–the UOM set that can be set or changed only in the item itself via an Item Mod request.
524
+ */
525
+ override_uom_set_ref?: CurrencyRef;
526
+ /**
527
+ * One line of the purchase order. Compare with PurchaseOrderLineGroup, which represents a previously defined group of lines in the purchase order.
528
+ */
529
+ purchase_order_line_mod?: PurchaseOrderLineMod[];
530
+ /**
531
+ * On transaction lines, QuickBooks can derive one value from the other two among Quantity, Rate, and Amount. If you supply Quantity and Amount, QuickBooks calculates Rate. If you supply Quantity and Rate, QuickBooks calculates Amount.
532
+ */
533
+ quantity?: number;
534
+ /**
535
+ * Identification number of the transaction line. (`txn_line_id` is supported as of v2.0 of the SDK. With qbXML v1.0 and v1.1, `txn_line_id` is always returned as zero.) If you need to add a new transaction line in a transaction Mod request, you can do so by setting the `txn_line_id` to -1.
536
+ */
537
+ txn_line_id: string;
538
+ /**
539
+ * In a transaction line item, the name of the unit of measure selected from within the item’s available units. If the company file is enabled only for single unit of measure per item, this must be the base unit!
540
+ */
541
+ unit_of_measure?: string;
542
+ }
543
+
544
+ export interface PurchaseOrderLineMod {
545
+ /**
546
+ * A monetary amount.
547
+ */
548
+ amount?: number;
549
+ /**
550
+ * Use classes to categorize transactions (for example, by department, location, or work type). Class tracking is off by default in QuickBooks. A `class_ref` points to one class; if both `full_name` and `list_id` are provided, `full_name` is ignored. In InvoiceAdd, a header-level `class_ref` is applied to line items unless you override or clear it on individual lines.
551
+ */
552
+ class_ref?: CurrencyRef;
553
+ /**
554
+ * `customer_ref` identifies a customer or customer job. If both `full_name` and `list_id` are provided, `full_name` is ignored. In SalesReceipt and ReceivePayment, it identifies who receives credit. In TimeTracking, it identifies who the time can be billed to and is required in TimeTrackingAdd when IsBillable is true.
555
+ */
556
+ customer_ref?: CurrencyRef;
557
+ /**
558
+ * Description that appears on the purchase order for this line item.
559
+ */
560
+ desc?: string;
561
+ /**
562
+ * Location within the Inventory Site.
563
+ */
564
+ inventory_site_location_ref?: CurrencyRef;
565
+ /**
566
+ * If `is_manually_closed` is true, this purchase order has been closed, even if all the items haven’t been received or the sale hasn’t been cancelled. Once the purchase order is marked as closed, all the line items within it become closed as well. You can’t change `is_manually_closed` to false after the purchase order has been fully received.
567
+ */
568
+ is_manually_closed?: boolean;
569
+ /**
570
+ * `item_ref` may accept all item types or a restricted subset, depending on the request. Examples: PurchaseOrder and Bill do not allow discount or sales-tax items; VehicleMileageAdd requires a service or other-charge item; BillingRateAdd requires a service item. If both `full_name` and `list_id` are provided, `full_name` is ignored.
571
+ */
572
+ item_ref?: CurrencyRef;
573
+ /**
574
+ * The part number used by the manufacturer of the item.
575
+ */
576
+ manufacturer_part_number?: string;
577
+ /**
578
+ * Other, Other1, and Other2 are built-in transaction custom fields. Other is transaction-level; Other1 and Other2 are line-level. These fields are always available through the SDK and do not require DataExtDef setup. Template labels in the UI can be renamed, but SDK names remain fixed as Other, Other1, and Other2.
579
+ */
580
+ other1?: string;
581
+ /**
582
+ * Other, Other1, and Other2 are built-in transaction custom fields. Other is transaction-level; Other1 and Other2 are line-level. These fields are always available through the SDK and do not require DataExtDef setup. Template labels in the UI can be renamed, but SDK names remain fixed as Other, Other1, and Other2.
583
+ */
584
+ other2?: string;
585
+ /**
586
+ * Refers to a QuickBooks account. If an `override_item_account_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
587
+ */
588
+ override_item_account_ref?: CurrencyRef;
589
+ /**
590
+ * When you modify a transaction line to change the unit of measure used in that line, you use this aggregate to specify the UOM set within which you are choosing an available unit of measure. The “override” here refers to the unit within the set, not the UOM Set itself, which you can’t change or override–the UOM set that can be set or changed only in the item itself via an Item Mod request.
591
+ */
592
+ override_uom_set_ref?: CurrencyRef;
593
+ /**
594
+ * On transaction lines, QuickBooks can derive one value from the other two among Quantity, Rate, and Amount. If you supply Quantity and Amount, QuickBooks calculates Rate. If you supply Quantity and Rate, QuickBooks calculates Amount.
595
+ */
596
+ quantity?: number;
597
+ /**
598
+ * If you specify both Rate and Amount in a request, the Rate you provide will be ignored, and you will receive a warning. If you specify both Quantity and Amount in an Add or Mod request, QuickBooks will use them to calculate Rate. (Rate, Amount, and Quantity can’t be cleared.)
599
+ */
600
+ rate?: number;
601
+ /**
602
+ * `sales_tax_code_ref` points to the sales-tax code used for an item or customer context. QuickBooks includes default TAX and NON codes, and a code can be deleted only when nothing references it. If sales tax is disabled, QuickBooks assigns the default non-taxable code. If both `full_name` and `list_id` are provided in `sales_tax_code_ref`, `full_name` is ignored.
603
+ */
604
+ sales_tax_code_ref?: CurrencyRef;
605
+ /**
606
+ * Indicates the date on which the QuickBooks user performs the service for the customer.
607
+ *
608
+ * Format: date.
609
+ */
610
+ service_date?: string;
611
+ tax_amount?: number;
612
+ /**
613
+ * Identification number of the transaction line. (`txn_line_id` is supported as of v2.0 of the SDK. With qbXML v1.0 and v1.1, `txn_line_id` is always returned as zero.) If you need to add a new transaction line in a transaction Mod request, you can do so by setting the `txn_line_id` to -1.
614
+ */
615
+ txn_line_id: string;
616
+ /**
617
+ * In a transaction line item, the name of the unit of measure selected from within the item’s available units. If the company file is enabled only for single unit of measure per item, this must be the base unit!
618
+ */
619
+ unit_of_measure?: string;
620
+ }