qube_sync 0.3.0 → 0.5.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 (268) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +84 -0
  3. data/README.md +291 -75
  4. data/Rakefile +12 -0
  5. data/exe/qube_sync +11 -0
  6. data/lib/qube_sync/client.rb +614 -0
  7. data/lib/qube_sync/operations/account.rb +338 -0
  8. data/lib/qube_sync/operations/account_tax_line_info.rb +30 -0
  9. data/lib/qube_sync/operations/aging_report.rb +160 -0
  10. data/lib/qube_sync/operations/alert.rb +91 -0
  11. data/lib/qube_sync/operations/ar_refund_credit_card.rb +402 -0
  12. data/lib/qube_sync/operations/bar_code.rb +37 -0
  13. data/lib/qube_sync/operations/bill.rb +1117 -0
  14. data/lib/qube_sync/operations/bill_payment_check.rb +420 -0
  15. data/lib/qube_sync/operations/bill_payment_credit_card.rb +320 -0
  16. data/lib/qube_sync/operations/bill_to_pay.rb +67 -0
  17. data/lib/qube_sync/operations/billing_rate.rb +173 -0
  18. data/lib/qube_sync/operations/budget_summary_report.rb +80 -0
  19. data/lib/qube_sync/operations/build_assembly.rb +319 -0
  20. data/lib/qube_sync/operations/charge.rb +454 -0
  21. data/lib/qube_sync/operations/check.rb +1099 -0
  22. data/lib/qube_sync/operations/class.rb +176 -0
  23. data/lib/qube_sync/operations/cleared_status.rb +39 -0
  24. data/lib/qube_sync/operations/company.rb +39 -0
  25. data/lib/qube_sync/operations/company_activity.rb +31 -0
  26. data/lib/qube_sync/operations/credit_card_charge.rb +1044 -0
  27. data/lib/qube_sync/operations/credit_card_credit.rb +1044 -0
  28. data/lib/qube_sync/operations/credit_memo.rb +1277 -0
  29. data/lib/qube_sync/operations/currency.rb +195 -0
  30. data/lib/qube_sync/operations/custom_detail_report.rb +176 -0
  31. data/lib/qube_sync/operations/custom_summary_report.rb +180 -0
  32. data/lib/qube_sync/operations/customer.rb +745 -0
  33. data/lib/qube_sync/operations/customer_msg.rb +117 -0
  34. data/lib/qube_sync/operations/customer_type.rb +133 -0
  35. data/lib/qube_sync/operations/data_event_recovery_info.rb +54 -0
  36. data/lib/qube_sync/operations/data_ext.rb +202 -0
  37. data/lib/qube_sync/operations/data_ext_def.rb +179 -0
  38. data/lib/qube_sync/operations/date_driven_terms.rb +131 -0
  39. data/lib/qube_sync/operations/deposit.rb +570 -0
  40. data/lib/qube_sync/operations/employee.rb +581 -0
  41. data/lib/qube_sync/operations/employee_default.rb +100 -0
  42. data/lib/qube_sync/operations/entity.rb +118 -0
  43. data/lib/qube_sync/operations/estimate.rb +1084 -0
  44. data/lib/qube_sync/operations/fields.rb +4058 -0
  45. data/lib/qube_sync/operations/form1099_category_account_mapping.rb +91 -0
  46. data/lib/qube_sync/operations/general_detail_report.rb +185 -0
  47. data/lib/qube_sync/operations/general_summary_report.rb +180 -0
  48. data/lib/qube_sync/operations/host.rb +36 -0
  49. data/lib/qube_sync/operations/inventory_adjustment.rb +491 -0
  50. data/lib/qube_sync/operations/inventory_site.rb +214 -0
  51. data/lib/qube_sync/operations/invoice.rb +1242 -0
  52. data/lib/qube_sync/operations/item.rb +115 -0
  53. data/lib/qube_sync/operations/item_assemblies_can_build.rb +44 -0
  54. data/lib/qube_sync/operations/item_discount.rb +320 -0
  55. data/lib/qube_sync/operations/item_fixed_asset.rb +318 -0
  56. data/lib/qube_sync/operations/item_group.rb +255 -0
  57. data/lib/qube_sync/operations/item_inventory.rb +447 -0
  58. data/lib/qube_sync/operations/item_inventory_assembly.rb +486 -0
  59. data/lib/qube_sync/operations/item_non_inventory.rb +472 -0
  60. data/lib/qube_sync/operations/item_other_charge.rb +445 -0
  61. data/lib/qube_sync/operations/item_payment.rb +269 -0
  62. data/lib/qube_sync/operations/item_receipt.rb +1055 -0
  63. data/lib/qube_sync/operations/item_sales_tax.rb +271 -0
  64. data/lib/qube_sync/operations/item_sales_tax_group.rb +200 -0
  65. data/lib/qube_sync/operations/item_service.rb +466 -0
  66. data/lib/qube_sync/operations/item_sites.rb +98 -0
  67. data/lib/qube_sync/operations/item_subtotal.rb +182 -0
  68. data/lib/qube_sync/operations/job_report.rb +156 -0
  69. data/lib/qube_sync/operations/job_type.rb +131 -0
  70. data/lib/qube_sync/operations/journal_entry.rb +533 -0
  71. data/lib/qube_sync/operations/lead.rb +216 -0
  72. data/lib/qube_sync/operations/list.rb +42 -0
  73. data/lib/qube_sync/operations/list_deleted.rb +57 -0
  74. data/lib/qube_sync/operations/list_display.rb +59 -0
  75. data/lib/qube_sync/operations/list_merge.rb +57 -0
  76. data/lib/qube_sync/operations/other_name.rb +245 -0
  77. data/lib/qube_sync/operations/paycheck.rb +139 -0
  78. data/lib/qube_sync/operations/payment_method.rb +129 -0
  79. data/lib/qube_sync/operations/payroll_detail_report.rb +161 -0
  80. data/lib/qube_sync/operations/payroll_item.rb +75 -0
  81. data/lib/qube_sync/operations/payroll_item_addition.rb +98 -0
  82. data/lib/qube_sync/operations/payroll_item_company_contribution.rb +134 -0
  83. data/lib/qube_sync/operations/payroll_item_deduction.rb +124 -0
  84. data/lib/qube_sync/operations/payroll_item_direct_deposit.rb +70 -0
  85. data/lib/qube_sync/operations/payroll_item_non_wage.rb +93 -0
  86. data/lib/qube_sync/operations/payroll_item_tax.rb +123 -0
  87. data/lib/qube_sync/operations/payroll_item_wage.rb +168 -0
  88. data/lib/qube_sync/operations/payroll_item_workers_compensation.rb +108 -0
  89. data/lib/qube_sync/operations/payroll_last_period.rb +30 -0
  90. data/lib/qube_sync/operations/payroll_liability_adjustment.rb +204 -0
  91. data/lib/qube_sync/operations/payroll_liability_check.rb +137 -0
  92. data/lib/qube_sync/operations/payroll_prior_payment.rb +178 -0
  93. data/lib/qube_sync/operations/payroll_summary_report.rb +157 -0
  94. data/lib/qube_sync/operations/payroll_year_to_date_adjustment.rb +211 -0
  95. data/lib/qube_sync/operations/preferences.rb +61 -0
  96. data/lib/qube_sync/operations/price_level.rb +309 -0
  97. data/lib/qube_sync/operations/purchase_order.rb +1065 -0
  98. data/lib/qube_sync/operations/qb_command_exec.rb +37 -0
  99. data/lib/qube_sync/operations/receive_payment.rb +634 -0
  100. data/lib/qube_sync/operations/receive_payment_to_deposit.rb +38 -0
  101. data/lib/qube_sync/operations/sales_order.rb +1072 -0
  102. data/lib/qube_sync/operations/sales_receipt.rb +1371 -0
  103. data/lib/qube_sync/operations/sales_rep.rb +172 -0
  104. data/lib/qube_sync/operations/sales_tax_code.rb +205 -0
  105. data/lib/qube_sync/operations/sales_tax_payable.rb +37 -0
  106. data/lib/qube_sync/operations/sales_tax_payment_check.rb +379 -0
  107. data/lib/qube_sync/operations/sales_tax_return.rb +35 -0
  108. data/lib/qube_sync/operations/sales_tax_return_line.rb +43 -0
  109. data/lib/qube_sync/operations/ship_method.rb +116 -0
  110. data/lib/qube_sync/operations/special_account.rb +55 -0
  111. data/lib/qube_sync/operations/special_item.rb +44 -0
  112. data/lib/qube_sync/operations/standard_terms.rb +125 -0
  113. data/lib/qube_sync/operations/template.rb +36 -0
  114. data/lib/qube_sync/operations/terms.rb +91 -0
  115. data/lib/qube_sync/operations/time_report.rb +127 -0
  116. data/lib/qube_sync/operations/time_tracking.rb +304 -0
  117. data/lib/qube_sync/operations/to_do.rb +260 -0
  118. data/lib/qube_sync/operations/transaction.rb +361 -0
  119. data/lib/qube_sync/operations/transfer.rb +213 -0
  120. data/lib/qube_sync/operations/transfer_inventory.rb +393 -0
  121. data/lib/qube_sync/operations/txn.rb +38 -0
  122. data/lib/qube_sync/operations/txn_deleted.rb +54 -0
  123. data/lib/qube_sync/operations/txn_display.rb +76 -0
  124. data/lib/qube_sync/operations/txn_void.rb +36 -0
  125. data/lib/qube_sync/operations/unit_of_measure_set.rb +149 -0
  126. data/lib/qube_sync/operations/vehicle.rb +152 -0
  127. data/lib/qube_sync/operations/vehicle_mileage.rb +191 -0
  128. data/lib/qube_sync/operations/vendor.rb +663 -0
  129. data/lib/qube_sync/operations/vendor_credit.rb +1052 -0
  130. data/lib/qube_sync/operations/vendor_type.rb +131 -0
  131. data/lib/qube_sync/operations/workers_comp_code.rb +184 -0
  132. data/lib/qube_sync/operations.rb +1169 -0
  133. data/lib/qube_sync/version.rb +1 -1
  134. data/lib/qube_sync/workflow_types/cli.rb +120 -0
  135. data/lib/qube_sync/workflow_types/rbs_renderer.rb +290 -0
  136. data/lib/qube_sync/workflow_types/ruby_renderer.rb +391 -0
  137. data/lib/qube_sync/workflow_types/workflow.rb +153 -0
  138. data/lib/qube_sync/workflow_types.rb +219 -0
  139. data/lib/qube_sync.rb +1 -0
  140. data/sig/qube_sync/client.rbs +85 -0
  141. data/sig/qube_sync/operations/account.rbs +65 -0
  142. data/sig/qube_sync/operations/account_tax_line_info.rbs +13 -0
  143. data/sig/qube_sync/operations/aging_report.rbs +29 -0
  144. data/sig/qube_sync/operations/alert.rbs +53 -0
  145. data/sig/qube_sync/operations/ar_refund_credit_card.rbs +53 -0
  146. data/sig/qube_sync/operations/bar_code.rbs +16 -0
  147. data/sig/qube_sync/operations/bill.rbs +78 -0
  148. data/sig/qube_sync/operations/bill_payment_check.rbs +62 -0
  149. data/sig/qube_sync/operations/bill_payment_credit_card.rbs +45 -0
  150. data/sig/qube_sync/operations/bill_to_pay.rbs +19 -0
  151. data/sig/qube_sync/operations/billing_rate.rbs +40 -0
  152. data/sig/qube_sync/operations/budget_summary_report.rbs +22 -0
  153. data/sig/qube_sync/operations/build_assembly.rbs +64 -0
  154. data/sig/qube_sync/operations/charge.rbs +80 -0
  155. data/sig/qube_sync/operations/check.rbs +81 -0
  156. data/sig/qube_sync/operations/class.rbs +43 -0
  157. data/sig/qube_sync/operations/cleared_status.rbs +16 -0
  158. data/sig/qube_sync/operations/company.rbs +15 -0
  159. data/sig/qube_sync/operations/company_activity.rbs +14 -0
  160. data/sig/qube_sync/operations/credit_card_charge.rbs +69 -0
  161. data/sig/qube_sync/operations/credit_card_credit.rbs +69 -0
  162. data/sig/qube_sync/operations/credit_memo.rbs +162 -0
  163. data/sig/qube_sync/operations/currency.rbs +52 -0
  164. data/sig/qube_sync/operations/custom_detail_report.rbs +31 -0
  165. data/sig/qube_sync/operations/custom_summary_report.rbs +33 -0
  166. data/sig/qube_sync/operations/customer.rbs +174 -0
  167. data/sig/qube_sync/operations/customer_msg.rbs +31 -0
  168. data/sig/qube_sync/operations/customer_type.rbs +32 -0
  169. data/sig/qube_sync/operations/data_event_recovery_info.rbs +20 -0
  170. data/sig/qube_sync/operations/data_ext.rbs +53 -0
  171. data/sig/qube_sync/operations/data_ext_def.rbs +51 -0
  172. data/sig/qube_sync/operations/date_driven_terms.rbs +35 -0
  173. data/sig/qube_sync/operations/deposit.rbs +100 -0
  174. data/sig/qube_sync/operations/employee.rbs +173 -0
  175. data/sig/qube_sync/operations/employee_default.rbs +68 -0
  176. data/sig/qube_sync/operations/entity.rbs +24 -0
  177. data/sig/qube_sync/operations/estimate.rbs +148 -0
  178. data/sig/qube_sync/operations/form1099_category_account_mapping.rbs +33 -0
  179. data/sig/qube_sync/operations/general_detail_report.rbs +31 -0
  180. data/sig/qube_sync/operations/general_summary_report.rbs +32 -0
  181. data/sig/qube_sync/operations/host.rbs +19 -0
  182. data/sig/qube_sync/operations/inventory_adjustment.rbs +105 -0
  183. data/sig/qube_sync/operations/inventory_site.rbs +66 -0
  184. data/sig/qube_sync/operations/invoice.rbs +144 -0
  185. data/sig/qube_sync/operations/item.rbs +25 -0
  186. data/sig/qube_sync/operations/item_assemblies_can_build.rbs +15 -0
  187. data/sig/qube_sync/operations/item_discount.rbs +62 -0
  188. data/sig/qube_sync/operations/item_fixed_asset.rbs +97 -0
  189. data/sig/qube_sync/operations/item_group.rbs +62 -0
  190. data/sig/qube_sync/operations/item_inventory.rbs +87 -0
  191. data/sig/qube_sync/operations/item_inventory_assembly.rbs +94 -0
  192. data/sig/qube_sync/operations/item_non_inventory.rbs +64 -0
  193. data/sig/qube_sync/operations/item_other_charge.rbs +59 -0
  194. data/sig/qube_sync/operations/item_payment.rbs +55 -0
  195. data/sig/qube_sync/operations/item_receipt.rbs +71 -0
  196. data/sig/qube_sync/operations/item_sales_tax.rbs +57 -0
  197. data/sig/qube_sync/operations/item_sales_tax_group.rbs +50 -0
  198. data/sig/qube_sync/operations/item_service.rbs +62 -0
  199. data/sig/qube_sync/operations/item_sites.rbs +26 -0
  200. data/sig/qube_sync/operations/item_subtotal.rbs +48 -0
  201. data/sig/qube_sync/operations/job_report.rbs +28 -0
  202. data/sig/qube_sync/operations/job_type.rbs +32 -0
  203. data/sig/qube_sync/operations/journal_entry.rbs +88 -0
  204. data/sig/qube_sync/operations/lead.rbs +91 -0
  205. data/sig/qube_sync/operations/list.rbs +15 -0
  206. data/sig/qube_sync/operations/list_deleted.rbs +17 -0
  207. data/sig/qube_sync/operations/list_display.rbs +21 -0
  208. data/sig/qube_sync/operations/list_merge.rbs +22 -0
  209. data/sig/qube_sync/operations/other_name.rbs +71 -0
  210. data/sig/qube_sync/operations/paycheck.rbs +27 -0
  211. data/sig/qube_sync/operations/payment_method.rbs +33 -0
  212. data/sig/qube_sync/operations/payroll_detail_report.rbs +29 -0
  213. data/sig/qube_sync/operations/payroll_item.rbs +23 -0
  214. data/sig/qube_sync/operations/payroll_item_addition.rbs +48 -0
  215. data/sig/qube_sync/operations/payroll_item_company_contribution.rbs +58 -0
  216. data/sig/qube_sync/operations/payroll_item_deduction.rbs +54 -0
  217. data/sig/qube_sync/operations/payroll_item_direct_deposit.rbs +30 -0
  218. data/sig/qube_sync/operations/payroll_item_non_wage.rbs +23 -0
  219. data/sig/qube_sync/operations/payroll_item_tax.rbs +58 -0
  220. data/sig/qube_sync/operations/payroll_item_wage.rbs +48 -0
  221. data/sig/qube_sync/operations/payroll_item_workers_compensation.rbs +42 -0
  222. data/sig/qube_sync/operations/payroll_last_period.rbs +13 -0
  223. data/sig/qube_sync/operations/payroll_liability_adjustment.rbs +59 -0
  224. data/sig/qube_sync/operations/payroll_liability_check.rbs +27 -0
  225. data/sig/qube_sync/operations/payroll_prior_payment.rbs +48 -0
  226. data/sig/qube_sync/operations/payroll_summary_report.rbs +30 -0
  227. data/sig/qube_sync/operations/payroll_year_to_date_adjustment.rbs +66 -0
  228. data/sig/qube_sync/operations/preferences.rbs +26 -0
  229. data/sig/qube_sync/operations/price_level.rbs +57 -0
  230. data/sig/qube_sync/operations/purchase_order.rbs +159 -0
  231. data/sig/qube_sync/operations/qb_command_exec.rbs +22 -0
  232. data/sig/qube_sync/operations/receive_payment.rbs +102 -0
  233. data/sig/qube_sync/operations/receive_payment_to_deposit.rbs +15 -0
  234. data/sig/qube_sync/operations/sales_order.rbs +153 -0
  235. data/sig/qube_sync/operations/sales_receipt.rbs +139 -0
  236. data/sig/qube_sync/operations/sales_rep.rbs +43 -0
  237. data/sig/qube_sync/operations/sales_tax_code.rbs +49 -0
  238. data/sig/qube_sync/operations/sales_tax_payable.rbs +16 -0
  239. data/sig/qube_sync/operations/sales_tax_payment_check.rbs +64 -0
  240. data/sig/qube_sync/operations/sales_tax_return.rbs +14 -0
  241. data/sig/qube_sync/operations/sales_tax_return_line.rbs +15 -0
  242. data/sig/qube_sync/operations/ship_method.rbs +31 -0
  243. data/sig/qube_sync/operations/special_account.rbs +16 -0
  244. data/sig/qube_sync/operations/special_item.rbs +17 -0
  245. data/sig/qube_sync/operations/standard_terms.rbs +34 -0
  246. data/sig/qube_sync/operations/template.rbs +15 -0
  247. data/sig/qube_sync/operations/terms.rbs +23 -0
  248. data/sig/qube_sync/operations/time_report.rbs +26 -0
  249. data/sig/qube_sync/operations/time_tracking.rbs +57 -0
  250. data/sig/qube_sync/operations/to_do.rbs +59 -0
  251. data/sig/qube_sync/operations/transaction.rbs +39 -0
  252. data/sig/qube_sync/operations/transfer.rbs +47 -0
  253. data/sig/qube_sync/operations/transfer_inventory.rbs +76 -0
  254. data/sig/qube_sync/operations/txn.rbs +15 -0
  255. data/sig/qube_sync/operations/txn_deleted.rbs +17 -0
  256. data/sig/qube_sync/operations/txn_display.rbs +22 -0
  257. data/sig/qube_sync/operations/txn_void.rbs +15 -0
  258. data/sig/qube_sync/operations/types.rbs +434 -0
  259. data/sig/qube_sync/operations/unit_of_measure_set.rbs +51 -0
  260. data/sig/qube_sync/operations/vehicle.rbs +43 -0
  261. data/sig/qube_sync/operations/vehicle_mileage.rbs +38 -0
  262. data/sig/qube_sync/operations/vendor.rbs +142 -0
  263. data/sig/qube_sync/operations/vendor_credit.rbs +70 -0
  264. data/sig/qube_sync/operations/vendor_type.rbs +32 -0
  265. data/sig/qube_sync/operations/workers_comp_code.rbs +52 -0
  266. data/sig/qube_sync/operations.rbs +148 -0
  267. data/sig/qube_sync/workflow_types.rbs +59 -0
  268. metadata +265 -3
@@ -0,0 +1,309 @@
1
+ # Generated from operations.json by bin/generate-operations: don't edit.
2
+ # frozen_string_literal: true
3
+
4
+ module QubeSync
5
+ module Operations
6
+ # QuickBooks price level operations, reached as `client.price_level`. Each queues a request and
7
+ # returns it (the response's `data`); the answer comes to `webhook_url`.
8
+ class PriceLevel < Base
9
+ # Create price level: POST /connections/{connection_id}/price-levels (`price_level.create`).
10
+ #
11
+ # QuickBooks answers in one webhook.
12
+ #
13
+ # Params, sent as the JSON body:
14
+ # Give at most one of: `price_level_fixed_percentage`, or `currency_ref` with
15
+ # `price_level_per_item`.
16
+ # - `currency_ref` (Hash): A currency record defines how QuickBooks stores and displays a
17
+ # currency. Built-in currency name/code values are fixed; formatting and active status can
18
+ # vary by settings and workflow.
19
+ # - `full_name` (String): `full_name` (along with `list_id`) is a way to identify a list
20
+ # object. The `full_name` is the name prefixed by the names of each ancestor, for example
21
+ # Jones:Kitchen:Cabinets. `full_name` values aren’t case-sensitive.
22
+ # - `list_id` (String): `list_id` and `full_name` both identify a list object. QuickBooks
23
+ # assigns `list_id` when the object is created. `list_id` values are unique within a list
24
+ # family, not across the company file: customers, vendors, employees and other names share
25
+ # one sequence, every item type shares another, and each other list has its own.
26
+ # - `include_ret_element` (Array<one of "CurrencyRef", "EditSequence", "ExternalGUID",
27
+ # "IsActive", "ListID", "Name", "OwnerID", "PriceLevelFixedPercentage",
28
+ # "PriceLevelPerItemRet", "PriceLevelType", "TimeCreated", "TimeModified", "TxnID",
29
+ # "TxnNumber">)
30
+ # - `is_active` (Boolean): If `is_active` is true, this object is currently enabled for use by
31
+ # QuickBooks. The default value is true.
32
+ # - `name` (String, required): Name is the case-insensitive short name of a list object
33
+ # (without ancestors). It must be unique within its hierarchy scope. Hierarchical lists can
34
+ # reuse the same Name in different branches because `full_name` remains distinct.
35
+ # - `price_level_fixed_percentage` (Numeric): When you create a price level, you must specify
36
+ # whether it is a fixed percentage or a per item price level. Once you create the price
37
+ # level, you can’t change this. QuickBooks Pro and greater versions support fixed
38
+ # percentages, but only QuickBooks Premier and Enterprise support the per item price level.
39
+ # Where is this discount applied if Price Levels are enabled in QuickBooks preferences?
40
+ # - `price_level_per_item` (Array<Hash>)
41
+ # - `adjust_percentage` (Numeric): If you don’t want to apply a custom price (for price
42
+ # levels) or custom rate (for billing rates), you can apply an adjusted price discount
43
+ # using the pair of fields `adjust_percentage` and `adjust_relative_to`
44
+ # (AdjustBillingRateRelativeTo for billing rates). Choose exactly one of: the set
45
+ # (`custom_price`, `custom_price_percent`), or the set (`adjust_percentage`,
46
+ # `adjust_relative_to`). Members of a set combine with each other, not with the other
47
+ # choices.
48
+ # - `adjust_relative_to` (one of "Cost", "CurrentCustomPrice", "StandardPrice"): When you
49
+ # create a price level, you have the option to create it with a flat custom price (flat
50
+ # amount or percentage) or you could use PriceLevelAdjustment to apply a price discount
51
+ # based on either the current custom price, the standard price of the item, or the cost of
52
+ # the item. Choose exactly one of: the set (`custom_price`, `custom_price_percent`), or
53
+ # the set (`adjust_percentage`, `adjust_relative_to`). Members of a set combine with each
54
+ # other, not with the other choices.
55
+ # - `custom_price` (Numeric): When you create a price level, you have the option to create
56
+ # it with a custom price that is either a fixed amount (`custom_price`) or a fixed
57
+ # discount percentage (`custom_price_percent`). Alternatively, instead of a flat custom
58
+ # price or discount, you could apply a price discount based on either the current custom
59
+ # price, the standard price of the item, or the cost of the item. Choose exactly one of:
60
+ # the set (`custom_price`, `custom_price_percent`), or the set (`adjust_percentage`,
61
+ # `adjust_relative_to`). Members of a set combine with each other, not with the other
62
+ # choices.
63
+ # - `custom_price_percent` (Numeric): When you create a price level, you have the option to
64
+ # create it with a custom price that is either a fixed amount (`custom_price`) or a fixed
65
+ # discount percentage (`custom_price_percent`). Choose exactly one of: the set
66
+ # (`custom_price`, `custom_price_percent`), or the set (`adjust_percentage`,
67
+ # `adjust_relative_to`). Members of a set combine with each other, not with the other
68
+ # choices.
69
+ # - `item_ref` (Hash, required): `item_ref` may accept all item types or a restricted
70
+ # subset, depending on the request. Examples: PurchaseOrder and Bill do not allow discount
71
+ # or sales-tax items; VehicleMileageAdd requires a service or other-charge item;
72
+ # BillingRateAdd requires a service item. If both `full_name` and `list_id` are provided,
73
+ # `full_name` is ignored.
74
+ # - `full_name` (String): `full_name` (along with `list_id`) is a way to identify a list
75
+ # object. The `full_name` is the name prefixed by the names of each ancestor, for
76
+ # example Jones:Kitchen:Cabinets. `full_name` values aren’t case-sensitive.
77
+ # - `list_id` (String): `list_id` and `full_name` both identify a list object. QuickBooks
78
+ # assigns `list_id` when the object is created. `list_id` values are unique within a
79
+ # list family, not across the company file: customers, vendors, employees and other
80
+ # names share one sequence, every item type shares another, and each other list has its
81
+ # own.
82
+ # - `request_id` (String): Your own label for the request, sent to QuickBooks as its qbXML
83
+ # `requestID` and echoed in the raw answer (`response_xml`); optional, since the answer's
84
+ # webhook already carries the request's `id`.
85
+ #
86
+ # @param connection_id [String]
87
+ # @param params [Hash] the fields above
88
+ # @param webhook_url [String] where QuBe Sync sends the answer
89
+ # @param idempotency_key [String, nil] made for the call when nil, and reused on its retries
90
+ # @return [Hash] the queued request
91
+ # @see https://docs.qubesync.com/api-reference/v2/price-levels/create-price-level
92
+ def create(connection_id, params = {}, webhook_url:, idempotency_key: nil)
93
+ queue("price_level.create", connection_id, params, webhook_url: webhook_url, idempotency_key: idempotency_key)
94
+ end
95
+
96
+ # List price levels: GET /connections/{connection_id}/price-levels (`price_level.query`).
97
+ #
98
+ # QuickBooks answers in one webhook.
99
+ #
100
+ # Params, sent as the query string:
101
+ # - `active_status` (one of "ActiveOnly", "All", "InactiveOnly"): Used in filters to select
102
+ # list objects based on whether or not they are currently enabled for use by QuickBooks. The
103
+ # default value is asActiveOnly, which selects only list objects that are active. Choose at
104
+ # most one of: `list_id`, or `full_name`, or the set (`active_status`, `currency_filter`,
105
+ # `from_modified_date`, `item_ref`, `max_returned`, `name_filter`, `name_range_filter`,
106
+ # `to_modified_date`). Members of a set combine with each other, not with the other choices.
107
+ # - `currency_filter` (Hash): Filters by the specified currency. Choose at most one of:
108
+ # `list_id`, or `full_name`, or the set (`active_status`, `currency_filter`,
109
+ # `from_modified_date`, `item_ref`, `max_returned`, `name_filter`, `name_range_filter`,
110
+ # `to_modified_date`). Members of a set combine with each other, not with the other choices.
111
+ # Give at most one of: `list_id`, or `full_name`.
112
+ # - `full_name` (Array<String>): `full_name` (along with `list_id`) is a way to identify a
113
+ # list object. The `full_name` is the name prefixed by the names of each ancestor, for
114
+ # example Jones:Kitchen:Cabinets. `full_name` values aren’t case-sensitive.
115
+ # - `list_id` (Array<String>): `list_id` and `full_name` both identify a list object.
116
+ # QuickBooks assigns `list_id` when the object is created. `list_id` values are unique
117
+ # within a list family, not across the company file: customers, vendors, employees and
118
+ # other names share one sequence, every item type shares another, and each other list has
119
+ # its own.
120
+ # - `from_modified_date` (String): Filters results to objects modified on or after this
121
+ # timestamp. QuickBooks Desktop accepts 1970-01-01 through 2038-01-19T03:14:07. If only a
122
+ # date is provided, time defaults to 00:00:00. Choose at most one of: `list_id`, or
123
+ # `full_name`, or the set (`active_status`, `currency_filter`, `from_modified_date`,
124
+ # `item_ref`, `max_returned`, `name_filter`, `name_range_filter`, `to_modified_date`).
125
+ # Members of a set combine with each other, not with the other choices.
126
+ # - `full_name` (Array<String>): `full_name` (along with `list_id`) is a way to identify a
127
+ # list object. The `full_name` is the name prefixed by the names of each ancestor, for
128
+ # example Jones:Kitchen:Cabinets. `full_name` values aren’t case-sensitive. Choose at most
129
+ # one of: `list_id`, or `full_name`, or the set (`active_status`, `currency_filter`,
130
+ # `from_modified_date`, `item_ref`, `max_returned`, `name_filter`, `name_range_filter`,
131
+ # `to_modified_date`). Members of a set combine with each other, not with the other choices.
132
+ # - `include_ret_element` (Array<one of "CurrencyRef", "EditSequence", "IsActive", "ListID",
133
+ # "Name", "PriceLevelFixedPercentage", "PriceLevelPerItemRet", "PriceLevelType",
134
+ # "TimeCreated", "TimeModified">)
135
+ # - `item_ref` (Hash): `item_ref` may accept all item types or a restricted subset, depending
136
+ # on the request. Examples: PurchaseOrder and Bill do not allow discount or sales-tax items;
137
+ # VehicleMileageAdd requires a service or other-charge item; BillingRateAdd requires a
138
+ # service item. If both `full_name` and `list_id` are provided, `full_name` is ignored.
139
+ # Choose at most one of: `list_id`, or `full_name`, or the set (`active_status`,
140
+ # `currency_filter`, `from_modified_date`, `item_ref`, `max_returned`, `name_filter`,
141
+ # `name_range_filter`, `to_modified_date`). Members of a set combine with each other, not
142
+ # with the other choices.
143
+ # - `full_name` (String): `full_name` (along with `list_id`) is a way to identify a list
144
+ # object. The `full_name` is the name prefixed by the names of each ancestor, for example
145
+ # Jones:Kitchen:Cabinets. `full_name` values aren’t case-sensitive.
146
+ # - `list_id` (String): `list_id` and `full_name` both identify a list object. QuickBooks
147
+ # assigns `list_id` when the object is created. `list_id` values are unique within a list
148
+ # family, not across the company file: customers, vendors, employees and other names share
149
+ # one sequence, every item type shares another, and each other list has its own.
150
+ # - `list_id` (Array<String>): `list_id` and `full_name` both identify a list object.
151
+ # QuickBooks assigns `list_id` when the object is created. `list_id` values are unique
152
+ # within a list family, not across the company file: customers, vendors, employees and other
153
+ # names share one sequence, every item type shares another, and each other list has its own.
154
+ # Choose at most one of: `list_id`, or `full_name`, or the set (`active_status`,
155
+ # `currency_filter`, `from_modified_date`, `item_ref`, `max_returned`, `name_filter`,
156
+ # `name_range_filter`, `to_modified_date`). Members of a set combine with each other, not
157
+ # with the other choices.
158
+ # - `max_returned` (Integer): Limits the number of objects that a query returns. (To get a
159
+ # count of how many objects could possibly be returned, use the `meta_data` query
160
+ # attribute.) If you include a `max_returned` value, it must be at least 1. QuickBooks
161
+ # doesn't page this query: at most this many records come back, in one answer, with no sign
162
+ # of whether more matched. Leave it out for every match, in one answer; one over 4 MB as the
163
+ # Web Connector sends it, about 3 MB of qbXML isn't kept (`error_type`
164
+ # `response_too_large`), so narrow a large one with its filters. Choose at most one of:
165
+ # `list_id`, or `full_name`, or the set (`active_status`, `currency_filter`,
166
+ # `from_modified_date`, `item_ref`, `max_returned`, `name_filter`, `name_range_filter`,
167
+ # `to_modified_date`). Members of a set combine with each other, not with the other choices.
168
+ # - `meta_data` (one of "MetaDataAndResponseData", "MetaDataOnly", "NoMetaData"): Use the
169
+ # `meta_data` attribute to control whether query responses include counts. Options are
170
+ # NoMetaData (default), MetaDataOnly (count only), and MetaDataAndResponseData (count plus
171
+ # objects). Counts are approximate and may vary slightly if records are created or deleted
172
+ # during processing.
173
+ # - `name_filter` (Hash): Filters according to the object’s Name. Choose at most one of:
174
+ # `list_id`, or `full_name`, or the set (`active_status`, `currency_filter`,
175
+ # `from_modified_date`, `item_ref`, `max_returned`, `name_filter`, `name_range_filter`,
176
+ # `to_modified_date`). Members of a set combine with each other, not with the other choices.
177
+ # - `match_criterion` (one of "Contains", "EndsWith", "StartsWith", required): The criterion
178
+ # to match.
179
+ # - `name` (String, required): The string to match.
180
+ # - `name_range_filter` (Hash): Filters according to the object’s Name. Choose at most one of:
181
+ # `list_id`, or `full_name`, or the set (`active_status`, `currency_filter`,
182
+ # `from_modified_date`, `item_ref`, `max_returned`, `name_filter`, `name_range_filter`,
183
+ # `to_modified_date`). Members of a set combine with each other, not with the other choices.
184
+ # - `from_name` (String): The first name or item in the search range. If `from_name` is
185
+ # omitted, the range will begin with first name on the list.
186
+ # - `to_name` (String): The final name or item in the search range. If `to_name` is omitted,
187
+ # the range will end with last name on the list.
188
+ # - `request_id` (String): Your own label for the request, sent to QuickBooks as its qbXML
189
+ # `requestID` and echoed in the raw answer (`response_xml`); optional, since the answer's
190
+ # webhook already carries the request's `id`.
191
+ # - `to_modified_date` (String): Filters results to objects modified on or before this
192
+ # timestamp. QuickBooks Desktop accepts 1970-01-01 through 2038-01-19T03:14:07. If only a
193
+ # date is provided, time defaults to end-of-day (23:59:59). Choose at most one of:
194
+ # `list_id`, or `full_name`, or the set (`active_status`, `currency_filter`,
195
+ # `from_modified_date`, `item_ref`, `max_returned`, `name_filter`, `name_range_filter`,
196
+ # `to_modified_date`). Members of a set combine with each other, not with the other choices.
197
+ #
198
+ # @param connection_id [String]
199
+ # @param params [Hash] the fields above
200
+ # @param webhook_url [String] where QuBe Sync sends the answer
201
+ # @param idempotency_key [String, nil] made for the call when nil, and reused on its retries
202
+ # @return [Hash] the queued request
203
+ # @see https://docs.qubesync.com/api-reference/v2/price-levels/list-price-levels
204
+ def query(connection_id, params = {}, webhook_url:, idempotency_key: nil)
205
+ queue("price_level.query", connection_id, params, webhook_url: webhook_url, idempotency_key: idempotency_key)
206
+ end
207
+
208
+ # Update price level: PUT /connections/{connection_id}/price-levels (`price_level.update`).
209
+ #
210
+ # QuickBooks answers in one webhook.
211
+ #
212
+ # Params, sent as the JSON body:
213
+ # - `currency_ref` (Hash): A currency record defines how QuickBooks stores and displays a
214
+ # currency. Built-in currency name/code values are fixed; formatting and active status can
215
+ # vary by settings and workflow. Choose at most one of: `price_level_fixed_percentage`, or
216
+ # the set (`currency_ref`, `price_level_per_item`). Members of a set combine with each
217
+ # other, not with the other choices.
218
+ # - `full_name` (String): `full_name` (along with `list_id`) is a way to identify a list
219
+ # object. The `full_name` is the name prefixed by the names of each ancestor, for example
220
+ # Jones:Kitchen:Cabinets. `full_name` values aren’t case-sensitive.
221
+ # - `list_id` (String): `list_id` and `full_name` both identify a list object. QuickBooks
222
+ # assigns `list_id` when the object is created. `list_id` values are unique within a list
223
+ # family, not across the company file: customers, vendors, employees and other names share
224
+ # one sequence, every item type shares another, and each other list has its own.
225
+ # - `edit_sequence` (String, required): `edit_sequence` is a server-generated revision token.
226
+ # It changes each time the object is updated. To modify an existing object, you must send
227
+ # the current `edit_sequence`. If your value is stale, the update is rejected to prevent
228
+ # overwriting newer changes.
229
+ # - `include_ret_element` (Array<one of "CurrencyRef", "EditSequence", "ExternalGUID",
230
+ # "IsActive", "ListID", "Name", "OwnerID", "PriceLevelFixedPercentage",
231
+ # "PriceLevelPerItemRet", "PriceLevelType", "TimeCreated", "TimeModified", "TxnID",
232
+ # "TxnNumber">)
233
+ # - `is_active` (Boolean): If `is_active` is true, this object is currently enabled for use by
234
+ # QuickBooks. The default value is true.
235
+ # - `list_id` (String, required): `list_id` and `full_name` both identify a list object.
236
+ # QuickBooks assigns `list_id` when the object is created. `list_id` values are unique
237
+ # within a list family, not across the company file: customers, vendors, employees and other
238
+ # names share one sequence, every item type shares another, and each other list has its own.
239
+ # - `name` (String): Name is the case-insensitive short name of a list object (without
240
+ # ancestors). It must be unique within its hierarchy scope. Hierarchical lists can reuse the
241
+ # same Name in different branches because `full_name` remains distinct.
242
+ # - `price_level_fixed_percentage` (Numeric): When you create a price level, you must specify
243
+ # whether it is a fixed percentage or a per item price level. Once you create the price
244
+ # level, you can’t change this. QuickBooks Pro and greater versions support fixed
245
+ # percentages, but only QuickBooks Premier and Enterprise support the per item price level.
246
+ # Where is this discount applied if Price Levels are enabled in QuickBooks preferences?
247
+ # Choose at most one of: `price_level_fixed_percentage`, or the set (`currency_ref`,
248
+ # `price_level_per_item`). Members of a set combine with each other, not with the other
249
+ # choices.
250
+ # - `price_level_per_item` (Array<Hash>): Choose at most one of:
251
+ # `price_level_fixed_percentage`, or the set (`currency_ref`, `price_level_per_item`).
252
+ # Members of a set combine with each other, not with the other choices.
253
+ # - `adjust_percentage` (Numeric): If you don’t want to apply a custom price (for price
254
+ # levels) or custom rate (for billing rates), you can apply an adjusted price discount
255
+ # using the pair of fields `adjust_percentage` and `adjust_relative_to`
256
+ # (AdjustBillingRateRelativeTo for billing rates). Choose exactly one of: the set
257
+ # (`custom_price`, `custom_price_percent`), or the set (`adjust_percentage`,
258
+ # `adjust_relative_to`). Members of a set combine with each other, not with the other
259
+ # choices.
260
+ # - `adjust_relative_to` (one of "Cost", "CurrentCustomPrice", "StandardPrice"): When you
261
+ # create a price level, you have the option to create it with a flat custom price (flat
262
+ # amount or percentage) or you could use PriceLevelAdjustment to apply a price discount
263
+ # based on either the current custom price, the standard price of the item, or the cost of
264
+ # the item. Choose exactly one of: the set (`custom_price`, `custom_price_percent`), or
265
+ # the set (`adjust_percentage`, `adjust_relative_to`). Members of a set combine with each
266
+ # other, not with the other choices.
267
+ # - `custom_price` (Numeric): When you create a price level, you have the option to create
268
+ # it with a custom price that is either a fixed amount (`custom_price`) or a fixed
269
+ # discount percentage (`custom_price_percent`). Alternatively, instead of a flat custom
270
+ # price or discount, you could apply a price discount based on either the current custom
271
+ # price, the standard price of the item, or the cost of the item. Choose exactly one of:
272
+ # the set (`custom_price`, `custom_price_percent`), or the set (`adjust_percentage`,
273
+ # `adjust_relative_to`). Members of a set combine with each other, not with the other
274
+ # choices.
275
+ # - `custom_price_percent` (Numeric): When you create a price level, you have the option to
276
+ # create it with a custom price that is either a fixed amount (`custom_price`) or a fixed
277
+ # discount percentage (`custom_price_percent`). Choose exactly one of: the set
278
+ # (`custom_price`, `custom_price_percent`), or the set (`adjust_percentage`,
279
+ # `adjust_relative_to`). Members of a set combine with each other, not with the other
280
+ # choices.
281
+ # - `item_ref` (Hash, required): `item_ref` may accept all item types or a restricted
282
+ # subset, depending on the request. Examples: PurchaseOrder and Bill do not allow discount
283
+ # or sales-tax items; VehicleMileageAdd requires a service or other-charge item;
284
+ # BillingRateAdd requires a service item. If both `full_name` and `list_id` are provided,
285
+ # `full_name` is ignored.
286
+ # - `full_name` (String): `full_name` (along with `list_id`) is a way to identify a list
287
+ # object. The `full_name` is the name prefixed by the names of each ancestor, for
288
+ # example Jones:Kitchen:Cabinets. `full_name` values aren’t case-sensitive.
289
+ # - `list_id` (String): `list_id` and `full_name` both identify a list object. QuickBooks
290
+ # assigns `list_id` when the object is created. `list_id` values are unique within a
291
+ # list family, not across the company file: customers, vendors, employees and other
292
+ # names share one sequence, every item type shares another, and each other list has its
293
+ # own.
294
+ # - `request_id` (String): Your own label for the request, sent to QuickBooks as its qbXML
295
+ # `requestID` and echoed in the raw answer (`response_xml`); optional, since the answer's
296
+ # webhook already carries the request's `id`.
297
+ #
298
+ # @param connection_id [String]
299
+ # @param params [Hash] the fields above
300
+ # @param webhook_url [String] where QuBe Sync sends the answer
301
+ # @param idempotency_key [String, nil] made for the call when nil, and reused on its retries
302
+ # @return [Hash] the queued request
303
+ # @see https://docs.qubesync.com/api-reference/v2/price-levels/update-price-level
304
+ def update(connection_id, params = {}, webhook_url:, idempotency_key: nil)
305
+ queue("price_level.update", connection_id, params, webhook_url: webhook_url, idempotency_key: idempotency_key)
306
+ end
307
+ end
308
+ end
309
+ end