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,682 @@
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, BillAddress, CreditMemoLineGroupAdd, CurrencyFilter, CurrencyRef, DataExtBill, DiscountLineAdd, LinkToTxn, ModifiedDateRangeFilter, RefNumberFilter, RefNumberRangeFilter, SalesTaxLineAdd, ShippingLineAdd, TxnDateRangeFilter } from "./types";
5
+
6
+ /** QuickBooks invoice operations: `qube.invoice.<action>(connectionId, params, { webhookUrl })`. */
7
+ export declare class Invoice {
8
+ constructor(client: Client);
9
+ /**
10
+ * Create invoice: `POST /connections/{connection_id}/invoices`, queued for QuickBooks.
11
+ *
12
+ * The answer comes to `webhookUrl` as one webhook.
13
+ * Params go in the JSON body.
14
+ *
15
+ * Fields: `ar_account_ref`, `bill_address`, `class_ref`, `customer_msg_ref`, `customer_ref` (required), `customer_sales_tax_code_ref`, `def_macro`, `discount_line_add`, `due_date`, `exchange_rate`, `external_guid`, `fob`, `include_ret_element`, `invoice_line_add`, `invoice_line_group_add`, `is_finance_charge`, `is_pending`, `is_tax_included`, `is_to_be_emailed`, `is_to_be_printed`, `item_sales_tax_ref`, `link_to_txn_id`, `memo`, `other`, `po_number`, `ref_number`, `request_id`, `sales_rep_ref`, `sales_tax_line_add`, `set_credit`, `ship_address`, `ship_date`, `ship_method_ref`, `shipping_line_add`, `template_ref`, `terms_ref`, `txn_date`.
16
+ *
17
+ * Resolves to the queued request.
18
+ * @see https://docs.qubesync.com/api-reference/v2/invoices/create-invoice
19
+ */
20
+ create(connectionId: string, params: InvoiceCreateParams, options: OperationOptions): Promise<QueuedRequest>;
21
+ /**
22
+ * List invoices: `GET /connections/{connection_id}/invoices`, 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`, `paid_status`, `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/invoices/list-invoices
31
+ */
32
+ query(connectionId: string, params: InvoiceQueryParams | undefined, options: OperationOptions): Promise<QueuedRequest>;
33
+ /**
34
+ * Update invoice: `PUT /connections/{connection_id}/invoices`, queued for QuickBooks.
35
+ *
36
+ * The answer comes to `webhookUrl` as one webhook.
37
+ * Params go in the JSON body.
38
+ *
39
+ * Fields: `ar_account_ref`, `bill_address`, `class_ref`, `customer_msg_ref`, `customer_ref`, `customer_sales_tax_code_ref`, `due_date`, `edit_sequence` (required), `exchange_rate`, `fob`, `include_ret_element`, `invoice_line_group_mod`, `invoice_line_mod`, `is_pending`, `is_tax_included`, `is_to_be_emailed`, `is_to_be_printed`, `item_sales_tax_ref`, `memo`, `other`, `po_number`, `ref_number`, `request_id`, `sales_rep_ref`, `set_credit`, `ship_address`, `ship_date`, `ship_method_ref`, `template_ref`, `terms_ref`, `txn_date`, `txn_id` (required).
40
+ *
41
+ * Resolves to the queued request.
42
+ * @see https://docs.qubesync.com/api-reference/v2/invoices/update-invoice
43
+ */
44
+ update(connectionId: string, params: InvoiceUpdateParams, options: OperationOptions): Promise<QueuedRequest>;
45
+ }
46
+
47
+ /**
48
+ * The params of `invoice.create`: Create invoice.
49
+ */
50
+ export interface InvoiceCreateParams {
51
+ /**
52
+ * `ar_account_ref` points to an Accounts Receivable account. If both `full_name` and `list_id` are provided, `full_name` is ignored.
53
+ */
54
+ ar_account_ref?: CurrencyRef;
55
+ /**
56
+ * 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 `bill_address_block`.
57
+ */
58
+ bill_address?: BillAddress;
59
+ /**
60
+ * 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.
61
+ */
62
+ class_ref?: CurrencyRef;
63
+ /**
64
+ * A standard message such as “Thank you for your business,” or “Please sign and return this estimate to indicate your approval.” A customer message can be included at the bottom of a form. A `customer_msg_ref` aggregate refers to one of the messages on the CustomerMsg list. In a request, if a `customer_msg_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
65
+ */
66
+ customer_msg_ref?: CurrencyRef;
67
+ /**
68
+ * `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.
69
+ */
70
+ customer_ref: CurrencyRef;
71
+ /**
72
+ * Refers to the sales-tax code for sales related to this customer. (That is, it refers to a member of the SalesTaxCode list.) The sales-tax code indicates whether an item is taxable or non-taxable, and why. In a request, if a `customer_sales_tax_code_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
73
+ */
74
+ customer_sales_tax_code_ref?: CurrencyRef;
75
+ /**
76
+ * `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+.
77
+ */
78
+ def_macro?: string;
79
+ discount_line_add?: DiscountLineAdd;
80
+ /**
81
+ * If `due_date` isn’t included in an InvoiceAdd request, QuickBooks might determine the due date according to the terms set for this customer.
82
+ *
83
+ * Format: date.
84
+ */
85
+ due_date?: string;
86
+ /**
87
+ * `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.
88
+ */
89
+ exchange_rate?: number;
90
+ /**
91
+ * Allows for the attachment of a user defined GUID value.
92
+ */
93
+ external_guid?: string;
94
+ /**
95
+ * QuickBooks uses the term FOB, “freight on board,” to indicate the place from which the product is shipped. The FOB has no accounting implications.
96
+ */
97
+ fob?: string;
98
+ include_ret_element?: Array<"ARAccountRef" | "AppliedAmount" | "BalanceRemaining" | "BalanceRemainingInHomeCurrency" | "BillAddress" | "BillAddressBlock" | "ClassRef" | "CurrencyRef" | "CustomerMsgRef" | "CustomerRef" | "CustomerSalesTaxCodeRef" | "DataExtRet" | "DiscountLineRet" | "DueDate" | "EditSequence" | "ExchangeRate" | "ExternalGUID" | "FOB" | "InvoiceLineGroupRet" | "InvoiceLineRet" | "IsFinanceCharge" | "IsPaid" | "IsPending" | "IsTaxIncluded" | "IsToBeEmailed" | "IsToBePrinted" | "ItemSalesTaxRef" | "LinkedTxn" | "ListID" | "Memo" | "Other" | "OwnerID" | "PONumber" | "RefNumber" | "SalesRepRef" | "SalesTaxLineRet" | "SalesTaxPercentage" | "SalesTaxTotal" | "ShipAddress" | "ShipAddressBlock" | "ShipDate" | "ShipMethodRef" | "ShippingLineRet" | "Subtotal" | "SuggestedDiscountAmount" | "SuggestedDiscountDate" | "TemplateRef" | "TermsRef" | "TimeCreated" | "TimeModified" | "TxnDate" | "TxnID" | "TxnNumber">;
99
+ /**
100
+ * Represents one line in the invoice. Compare with InvoiceLineGroup, which represents a previously defined group of lines in the invoice.
101
+ *
102
+ * `invoice_line_add` and `invoice_line_group_add` combine: any number of each. QuickBooks receives them in that order: every `invoice_line_add`, then every `invoice_line_group_add`.
103
+ */
104
+ invoice_line_add?: InvoiceLineAdd[];
105
+ /**
106
+ * Represents a previously defined group of lines in the invoice. Compare with InvoiceLine, which represents just one line in the invoice.
107
+ *
108
+ * `invoice_line_add` and `invoice_line_group_add` combine: any number of each. QuickBooks receives them in that order: every `invoice_line_add`, then every `invoice_line_group_add`.
109
+ */
110
+ invoice_line_group_add?: CreditMemoLineGroupAdd[];
111
+ /**
112
+ * If `is_finance_charge` is true, a finance-charge item has been added to the invoice.
113
+ */
114
+ is_finance_charge?: boolean;
115
+ /**
116
+ * If `is_pending` is set to true, the invoice hasn’t been completed. Pending sales might include unpaid orders, estimates, tracked hours that haven’t yet been billed, or sales of back-ordered items.
117
+ */
118
+ is_pending?: boolean;
119
+ /**
120
+ * For future use with international versions of QuickBooks.
121
+ */
122
+ is_tax_included?: boolean;
123
+ /**
124
+ * When enabled, QuickBooks validates the customer email at runtime before sending. If no valid email is available, the request fails.
125
+ */
126
+ is_to_be_emailed?: boolean;
127
+ /**
128
+ * 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.
129
+ */
130
+ is_to_be_printed?: boolean;
131
+ /**
132
+ * An ItemSalesTax entry represents one tax rate paid to one tax agency. Use it when a transaction needs a single tax calculation. For multi-rate scenarios, use a sales-tax group instead. If both `full_name` and `list_id` are provided for `item_sales_tax_ref`, `list_id` is used.
133
+ */
134
+ item_sales_tax_ref?: CurrencyRef;
135
+ link_to_txn_id?: string[];
136
+ /**
137
+ * Message that appears in reports, but not on the invoice.
138
+ */
139
+ memo?: string;
140
+ /**
141
+ * 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.
142
+ */
143
+ other?: string;
144
+ /**
145
+ * Purchase order number.
146
+ */
147
+ po_number?: string;
148
+ /**
149
+ * `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.
150
+ */
151
+ ref_number?: string;
152
+ /**
153
+ * 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`.
154
+ */
155
+ request_id?: string;
156
+ /**
157
+ * A sales representative must be on the Employee, Vendor, or Other Names list within QuickBooks. Sales representative’s names and initials appear on the Rep drop-down list on QuickBooks sales forms. A `sales_rep_ref` refers to a person on the SalesRep list. In a request, if a `sales_rep_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
158
+ */
159
+ sales_rep_ref?: CurrencyRef;
160
+ sales_tax_line_add?: SalesTaxLineAdd;
161
+ set_credit?: SetCreditInvoice[];
162
+ /**
163
+ * 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 `bill_address_block`.
164
+ */
165
+ ship_address?: BillAddress;
166
+ /**
167
+ * The date when the product was, or will be, shipped.
168
+ *
169
+ * Format: date.
170
+ */
171
+ ship_date?: string;
172
+ /**
173
+ * 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.
174
+ */
175
+ ship_method_ref?: CurrencyRef;
176
+ shipping_line_add?: ShippingLineAdd;
177
+ /**
178
+ * 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.
179
+ */
180
+ template_ref?: CurrencyRef;
181
+ /**
182
+ * 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.
183
+ */
184
+ terms_ref?: CurrencyRef;
185
+ /**
186
+ * The date of the invoice. If you leave `txn_date` out of an InvoiceAdd message, QuickBooks might prefill it with the date of the invoice that was most recently saved.
187
+ *
188
+ * Format: date.
189
+ */
190
+ txn_date?: string;
191
+ }
192
+
193
+ /**
194
+ * The params of `invoice.query`: List invoices.
195
+ */
196
+ export interface InvoiceQueryParams {
197
+ /**
198
+ * 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.
199
+ *
200
+ * 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`, `paid_status`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
201
+ */
202
+ account_filter?: AccountFilter;
203
+ /**
204
+ * Filters by the specified currency.
205
+ *
206
+ * 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`, `paid_status`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
207
+ */
208
+ currency_filter?: CurrencyFilter;
209
+ /**
210
+ * 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.
211
+ *
212
+ * 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`, `paid_status`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
213
+ */
214
+ entity_filter?: AccountFilter;
215
+ /**
216
+ * 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.
217
+ */
218
+ include_line_items?: boolean;
219
+ /**
220
+ * 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.
221
+ */
222
+ include_linked_txns?: boolean;
223
+ include_ret_element?: Array<"ARAccountRef" | "AppliedAmount" | "BalanceRemaining" | "BalanceRemainingInHomeCurrency" | "BillAddress" | "BillAddressBlock" | "ClassRef" | "CurrencyRef" | "CustomerMsgRef" | "CustomerRef" | "CustomerSalesTaxCodeRef" | "DataExtRet" | "DiscountLineRet" | "DueDate" | "EditSequence" | "ExchangeRate" | "ExternalGUID" | "FOB" | "InvoiceLineGroupRet" | "InvoiceLineRet" | "IsFinanceCharge" | "IsPaid" | "IsPending" | "IsTaxIncluded" | "IsToBeEmailed" | "IsToBePrinted" | "ItemSalesTaxRef" | "LinkedTxn" | "Memo" | "Other" | "PONumber" | "RefNumber" | "SalesRepRef" | "SalesTaxLineRet" | "SalesTaxPercentage" | "SalesTaxTotal" | "ShipAddress" | "ShipAddressBlock" | "ShipDate" | "ShipMethodRef" | "ShippingLineRet" | "Subtotal" | "SuggestedDiscountAmount" | "SuggestedDiscountDate" | "TemplateRef" | "TermsRef" | "TimeCreated" | "TimeModified" | "TxnDate" | "TxnID" | "TxnNumber">;
224
+ /**
225
+ * 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.
226
+ */
227
+ iterator?: boolean;
228
+ /**
229
+ * 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.
230
+ *
231
+ * 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.
232
+ *
233
+ * 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`, `paid_status`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
234
+ *
235
+ * Minimum 1.
236
+ */
237
+ max_returned?: number;
238
+ /**
239
+ * 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.
240
+ */
241
+ meta_data?: "MetaDataAndResponseData" | "MetaDataOnly" | "NoMetaData";
242
+ /**
243
+ * 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.
244
+ *
245
+ * 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`, `paid_status`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
246
+ */
247
+ modified_date_range_filter?: ModifiedDateRangeFilter;
248
+ /**
249
+ * `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.
250
+ */
251
+ owner_id?: string[];
252
+ /**
253
+ * Allows you to filter for transactions according to whether or not they are paid.
254
+ *
255
+ * 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`, `paid_status`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
256
+ */
257
+ paid_status?: "All" | "NotPaidOnly" | "PaidOnly";
258
+ /**
259
+ * `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.
260
+ *
261
+ * 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`, `paid_status`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
262
+ */
263
+ ref_number?: string[];
264
+ /**
265
+ * 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`, `paid_status`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
266
+ */
267
+ ref_number_case_sensitive?: string[];
268
+ /**
269
+ * Filters by `ref_number` range. Numeric-only bounds are compared numerically; otherwise comparison is lexicographic.
270
+ *
271
+ * 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`, `paid_status`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
272
+ */
273
+ ref_number_filter?: RefNumberFilter;
274
+ /**
275
+ * Filters by `ref_number` range. Numeric-only bounds are compared numerically; otherwise comparison is lexicographic.
276
+ *
277
+ * 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`, `paid_status`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
278
+ */
279
+ ref_number_range_filter?: RefNumberRangeFilter;
280
+ /**
281
+ * 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`.
282
+ */
283
+ request_id?: string;
284
+ /**
285
+ * Filters according to the original transaction dates.
286
+ *
287
+ * 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`, `paid_status`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
288
+ */
289
+ txn_date_range_filter?: TxnDateRangeFilter;
290
+ /**
291
+ * `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.
292
+ *
293
+ * 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`, `paid_status`, `ref_number_filter`, `ref_number_range_filter`, `txn_date_range_filter`). Members of a set combine with each other, not with the other choices.
294
+ */
295
+ txn_id?: string[];
296
+ }
297
+
298
+ /**
299
+ * The params of `invoice.update`: Update invoice.
300
+ */
301
+ export interface InvoiceUpdateParams {
302
+ /**
303
+ * `ar_account_ref` points to an Accounts Receivable account. If both `full_name` and `list_id` are provided, `full_name` is ignored.
304
+ */
305
+ ar_account_ref?: CurrencyRef;
306
+ /**
307
+ * 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 `bill_address_block`.
308
+ */
309
+ bill_address?: BillAddress;
310
+ /**
311
+ * 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.
312
+ */
313
+ class_ref?: CurrencyRef;
314
+ /**
315
+ * A standard message such as “Thank you for your business,” or “Please sign and return this estimate to indicate your approval.” A customer message can be included at the bottom of a form. A `customer_msg_ref` aggregate refers to one of the messages on the CustomerMsg list. In a request, if a `customer_msg_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
316
+ */
317
+ customer_msg_ref?: CurrencyRef;
318
+ /**
319
+ * `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.
320
+ */
321
+ customer_ref?: CurrencyRef;
322
+ /**
323
+ * Refers to the sales-tax code for sales related to this customer. (That is, it refers to a member of the SalesTaxCode list.) The sales-tax code indicates whether an item is taxable or non-taxable, and why. In a request, if a `customer_sales_tax_code_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
324
+ */
325
+ customer_sales_tax_code_ref?: CurrencyRef;
326
+ /**
327
+ * If `due_date` isn’t included in an InvoiceAdd request, QuickBooks might determine the due date according to the terms set for this customer.
328
+ *
329
+ * Format: date.
330
+ */
331
+ due_date?: string;
332
+ /**
333
+ * `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.
334
+ */
335
+ edit_sequence: string;
336
+ /**
337
+ * `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.
338
+ */
339
+ exchange_rate?: number;
340
+ /**
341
+ * QuickBooks uses the term FOB, “freight on board,” to indicate the place from which the product is shipped. The FOB has no accounting implications.
342
+ */
343
+ fob?: string;
344
+ include_ret_element?: Array<"ARAccountRef" | "AppliedAmount" | "BalanceRemaining" | "BalanceRemainingInHomeCurrency" | "BillAddress" | "BillAddressBlock" | "ClassRef" | "CurrencyRef" | "CustomerMsgRef" | "CustomerRef" | "CustomerSalesTaxCodeRef" | "DataExtRet" | "DiscountLineRet" | "DueDate" | "EditSequence" | "ExchangeRate" | "ExternalGUID" | "FOB" | "InvoiceLineGroupRet" | "InvoiceLineRet" | "IsFinanceCharge" | "IsPaid" | "IsPending" | "IsTaxIncluded" | "IsToBeEmailed" | "IsToBePrinted" | "ItemSalesTaxRef" | "LinkedTxn" | "ListID" | "Memo" | "Other" | "OwnerID" | "PONumber" | "RefNumber" | "SalesRepRef" | "SalesTaxLineRet" | "SalesTaxPercentage" | "SalesTaxTotal" | "ShipAddress" | "ShipAddressBlock" | "ShipDate" | "ShipMethodRef" | "ShippingLineRet" | "Subtotal" | "SuggestedDiscountAmount" | "SuggestedDiscountDate" | "TemplateRef" | "TermsRef" | "TimeCreated" | "TimeModified" | "TxnDate" | "TxnID" | "TxnNumber">;
345
+ /**
346
+ * Represents a previously defined group of lines in the invoice. Compare with InvoiceLine, which represents just one line in the invoice.
347
+ *
348
+ * `invoice_line_mod` and `invoice_line_group_mod` combine: any number of each. QuickBooks receives them in that order: every `invoice_line_mod`, then every `invoice_line_group_mod`.
349
+ */
350
+ invoice_line_group_mod?: InvoiceLineGroupMod[];
351
+ /**
352
+ * Represents one line in the invoice. Compare with InvoiceLineGroup, which represents a previously defined group of lines in the invoice.
353
+ *
354
+ * `invoice_line_mod` and `invoice_line_group_mod` combine: any number of each. QuickBooks receives them in that order: every `invoice_line_mod`, then every `invoice_line_group_mod`.
355
+ */
356
+ invoice_line_mod?: InvoiceLineMod[];
357
+ /**
358
+ * If `is_pending` is set to true, the invoice hasn’t been completed. Pending sales might include unpaid orders, estimates, tracked hours that haven’t yet been billed, or sales of back-ordered items.
359
+ */
360
+ is_pending?: boolean;
361
+ /**
362
+ * For future use with international versions of QuickBooks.
363
+ */
364
+ is_tax_included?: boolean;
365
+ /**
366
+ * When enabled, QuickBooks validates the customer email at runtime before sending. If no valid email is available, the request fails.
367
+ */
368
+ is_to_be_emailed?: boolean;
369
+ /**
370
+ * 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.
371
+ */
372
+ is_to_be_printed?: boolean;
373
+ /**
374
+ * An ItemSalesTax entry represents one tax rate paid to one tax agency. Use it when a transaction needs a single tax calculation. For multi-rate scenarios, use a sales-tax group instead. If both `full_name` and `list_id` are provided for `item_sales_tax_ref`, `list_id` is used.
375
+ */
376
+ item_sales_tax_ref?: CurrencyRef;
377
+ /**
378
+ * Message that appears in reports, but not on the invoice.
379
+ */
380
+ memo?: string;
381
+ /**
382
+ * 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.
383
+ */
384
+ other?: string;
385
+ /**
386
+ * Purchase order number.
387
+ */
388
+ po_number?: string;
389
+ /**
390
+ * `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.
391
+ */
392
+ ref_number?: string;
393
+ /**
394
+ * 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`.
395
+ */
396
+ request_id?: string;
397
+ /**
398
+ * A sales representative must be on the Employee, Vendor, or Other Names list within QuickBooks. Sales representative’s names and initials appear on the Rep drop-down list on QuickBooks sales forms. A `sales_rep_ref` refers to a person on the SalesRep list. In a request, if a `sales_rep_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
399
+ */
400
+ sales_rep_ref?: CurrencyRef;
401
+ set_credit?: SetCreditInvoice[];
402
+ /**
403
+ * 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 `bill_address_block`.
404
+ */
405
+ ship_address?: BillAddress;
406
+ /**
407
+ * The date when the product was, or will be, shipped.
408
+ *
409
+ * Format: date.
410
+ */
411
+ ship_date?: string;
412
+ /**
413
+ * 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.
414
+ */
415
+ ship_method_ref?: CurrencyRef;
416
+ /**
417
+ * 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.
418
+ */
419
+ template_ref?: CurrencyRef;
420
+ /**
421
+ * 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.
422
+ */
423
+ terms_ref?: CurrencyRef;
424
+ /**
425
+ * The date of the invoice. If you leave `txn_date` out of an InvoiceAdd message, QuickBooks might prefill it with the date of the invoice that was most recently saved.
426
+ *
427
+ * Format: date.
428
+ */
429
+ txn_date?: string;
430
+ /**
431
+ * `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.
432
+ */
433
+ txn_id: string;
434
+ }
435
+
436
+ export interface InvoiceLineAdd {
437
+ /**
438
+ * A monetary amount.
439
+ */
440
+ amount?: number;
441
+ /**
442
+ * 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.
443
+ */
444
+ class_ref?: CurrencyRef;
445
+ data_ext?: DataExtBill[];
446
+ /**
447
+ * `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+.
448
+ */
449
+ def_macro?: string;
450
+ /**
451
+ * A descriptive text field.
452
+ */
453
+ desc?: string;
454
+ /**
455
+ * Location within the Inventory Site.
456
+ */
457
+ inventory_site_location_ref?: CurrencyRef;
458
+ /**
459
+ * Site where inventory is located.
460
+ */
461
+ inventory_site_ref?: CurrencyRef;
462
+ is_taxable?: boolean;
463
+ /**
464
+ * `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.
465
+ */
466
+ item_ref?: CurrencyRef;
467
+ /**
468
+ * When used with InvoiceAdd, the transaction you are linking to via this field must be a SalesOrder; links to other transactions, such as to estimates, aren’t currently supported. When used with BillAdd or ItemReceiptAdd, the transaction you are linking to via this field must be a PurchaseOrder: links to other transactions aren’t currently supported.
469
+ */
470
+ link_to_txn?: LinkToTxn;
471
+ /**
472
+ * The lot number of the asset.
473
+ *
474
+ * Choose at most one of: `serial_number`, or `lot_number`.
475
+ */
476
+ lot_number?: string;
477
+ /**
478
+ * Flag to override price rule conflict.
479
+ */
480
+ option_for_price_rule_conflict?: "BasePrice" | "Zero";
481
+ /**
482
+ * 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.
483
+ */
484
+ other1?: string;
485
+ /**
486
+ * 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.
487
+ */
488
+ other2?: string;
489
+ /**
490
+ * Refers to a QuickBooks account. If an `override_item_account_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
491
+ */
492
+ override_item_account_ref?: CurrencyRef;
493
+ /**
494
+ * Price levels let you apply custom pricing rules for selected customers. Once assigned, QuickBooks uses those prices automatically on supported sales forms unless explicitly overridden.
495
+ *
496
+ * Choose at most one of: `rate`, or `rate_percent`, or `price_level_ref`.
497
+ */
498
+ price_level_ref?: CurrencyRef;
499
+ /**
500
+ * 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.
501
+ */
502
+ quantity?: number;
503
+ /**
504
+ * 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.)
505
+ *
506
+ * Choose at most one of: `rate`, or `rate_percent`, or `price_level_ref`.
507
+ */
508
+ rate?: number;
509
+ /**
510
+ * Indicates the price of something as a percent.
511
+ *
512
+ * Choose at most one of: `rate`, or `rate_percent`, or `price_level_ref`.
513
+ */
514
+ rate_percent?: number;
515
+ /**
516
+ * `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.
517
+ */
518
+ sales_tax_code_ref?: CurrencyRef;
519
+ /**
520
+ * The serial number of the asset.
521
+ *
522
+ * Choose at most one of: `serial_number`, or `lot_number`.
523
+ */
524
+ serial_number?: string;
525
+ /**
526
+ * Indicates the date on which the QuickBooks user performs the service for the customer.
527
+ *
528
+ * Format: date.
529
+ */
530
+ service_date?: string;
531
+ tax_amount?: number;
532
+ /**
533
+ * 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!
534
+ */
535
+ unit_of_measure?: string;
536
+ }
537
+
538
+ export interface InvoiceLineGroupMod {
539
+ /**
540
+ * Represents one line in the invoice. Compare with InvoiceLineGroup, which represents a previously defined group of lines in the invoice.
541
+ */
542
+ invoice_line_mod?: InvoiceLineMod[];
543
+ /**
544
+ * 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.
545
+ */
546
+ item_group_ref?: CurrencyRef;
547
+ /**
548
+ * 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.
549
+ */
550
+ override_uom_set_ref?: CurrencyRef;
551
+ /**
552
+ * 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.
553
+ */
554
+ quantity?: number;
555
+ /**
556
+ * 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.
557
+ */
558
+ txn_line_id: string;
559
+ /**
560
+ * 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!
561
+ */
562
+ unit_of_measure?: string;
563
+ }
564
+
565
+ export interface InvoiceLineMod {
566
+ /**
567
+ * A monetary amount.
568
+ */
569
+ amount?: number;
570
+ /**
571
+ * 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.
572
+ */
573
+ class_ref?: CurrencyRef;
574
+ /**
575
+ * A descriptive text field.
576
+ */
577
+ desc?: string;
578
+ /**
579
+ * Location within the Inventory Site.
580
+ */
581
+ inventory_site_location_ref?: CurrencyRef;
582
+ /**
583
+ * Site where inventory is located.
584
+ */
585
+ inventory_site_ref?: CurrencyRef;
586
+ /**
587
+ * `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.
588
+ */
589
+ item_ref?: CurrencyRef;
590
+ /**
591
+ * The lot number of the asset.
592
+ *
593
+ * Choose at most one of: `serial_number`, or `lot_number`.
594
+ */
595
+ lot_number?: string;
596
+ /**
597
+ * Flag to override price rule conflict.
598
+ */
599
+ option_for_price_rule_conflict?: "BasePrice" | "Zero";
600
+ /**
601
+ * 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.
602
+ */
603
+ other1?: string;
604
+ /**
605
+ * 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.
606
+ */
607
+ other2?: string;
608
+ /**
609
+ * Refers to a QuickBooks account. If an `override_item_account_ref` aggregate includes both `full_name` and `list_id`, `full_name` will be ignored.
610
+ */
611
+ override_item_account_ref?: CurrencyRef;
612
+ /**
613
+ * 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.
614
+ */
615
+ override_uom_set_ref?: CurrencyRef;
616
+ /**
617
+ * Price levels let you apply custom pricing rules for selected customers. Once assigned, QuickBooks uses those prices automatically on supported sales forms unless explicitly overridden.
618
+ *
619
+ * Choose at most one of: `rate`, or `rate_percent`, or `price_level_ref`.
620
+ */
621
+ price_level_ref?: CurrencyRef;
622
+ /**
623
+ * 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.
624
+ */
625
+ quantity?: number;
626
+ /**
627
+ * 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.)
628
+ *
629
+ * Choose at most one of: `rate`, or `rate_percent`, or `price_level_ref`.
630
+ */
631
+ rate?: number;
632
+ /**
633
+ * Indicates the price of something as a percent.
634
+ *
635
+ * Choose at most one of: `rate`, or `rate_percent`, or `price_level_ref`.
636
+ */
637
+ rate_percent?: number;
638
+ /**
639
+ * `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.
640
+ */
641
+ sales_tax_code_ref?: CurrencyRef;
642
+ /**
643
+ * The serial number of the asset.
644
+ *
645
+ * Choose at most one of: `serial_number`, or `lot_number`.
646
+ */
647
+ serial_number?: string;
648
+ /**
649
+ * Indicates the date on which the QuickBooks user performs the service for the customer.
650
+ *
651
+ * Format: date.
652
+ */
653
+ service_date?: string;
654
+ tax_amount?: number;
655
+ /**
656
+ * 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.
657
+ */
658
+ txn_line_id: string;
659
+ /**
660
+ * 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!
661
+ */
662
+ unit_of_measure?: string;
663
+ }
664
+
665
+ export interface SetCreditInvoice {
666
+ /**
667
+ * Amount of a credit that is applied to a customer’s invoice, or amount of a payment that is applied to a particular bill or vendor credit.
668
+ */
669
+ applied_amount: number;
670
+ /**
671
+ * The ID of the credit memo that you are applying to this invoice or bill.
672
+ */
673
+ credit_txn_id: string;
674
+ /**
675
+ * Option to override credit.
676
+ */
677
+ override?: boolean;
678
+ /**
679
+ * 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.
680
+ */
681
+ txn_line_id?: string;
682
+ }