merge_accounting_client 1.0.4 → 1.0.5

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 (309) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +61 -5
  3. data/docs/Account.md +12 -8
  4. data/docs/AccountEndpointRequest.md +18 -0
  5. data/docs/AccountIntegration.md +1 -1
  6. data/docs/AccountRequest.md +40 -0
  7. data/docs/AccountResponse.md +24 -0
  8. data/docs/AccountingAttachment.md +7 -3
  9. data/docs/AccountingAttachmentEndpointRequest.md +18 -0
  10. data/docs/AccountingAttachmentRequest.md +26 -0
  11. data/docs/AccountingAttachmentResponse.md +24 -0
  12. data/docs/AccountingPhoneNumberRequest.md +24 -0
  13. data/docs/AccountsApi.md +163 -5
  14. data/docs/Address.md +5 -3
  15. data/docs/AddressesApi.md +4 -2
  16. data/docs/AttachmentsApi.md +154 -0
  17. data/docs/BalanceSheet.md +11 -7
  18. data/docs/BalanceSheetsApi.md +2 -0
  19. data/docs/CashFlowStatement.md +11 -7
  20. data/docs/CashFlowStatementsApi.md +2 -0
  21. data/docs/CommonModelScopeData.md +20 -0
  22. data/docs/CommonModelScopes.md +20 -0
  23. data/docs/CommonModelScopesApi.md +157 -0
  24. data/docs/CommonModelScopesBodyRequest.md +22 -0
  25. data/docs/CommonModelScopesDisabledModels.md +26 -0
  26. data/docs/CommonModelScopesDisabledModelsEnabledActionsEnum.md +15 -0
  27. data/docs/CommonModelScopesPostInnerDeserializerRequest.md +22 -0
  28. data/docs/CommonModelScopesUpdateSerializer.md +18 -0
  29. data/docs/CompanyInfo.md +6 -4
  30. data/docs/CompanyInfoApi.md +0 -4
  31. data/docs/ConditionSchema.md +30 -0
  32. data/docs/ConditionTypeEnum.md +15 -0
  33. data/docs/Contact.md +8 -4
  34. data/docs/ContactEndpointRequest.md +18 -0
  35. data/docs/ContactRequest.md +40 -0
  36. data/docs/ContactResponse.md +24 -0
  37. data/docs/ContactsApi.md +163 -9
  38. data/docs/CreditNote.md +12 -8
  39. data/docs/CreditNoteLineItem.md +7 -3
  40. data/docs/CreditNotesApi.md +15 -9
  41. data/docs/DataPassthroughRequest.md +1 -1
  42. data/docs/EnabledActionsEnum.md +15 -0
  43. data/docs/EndUserDetailsRequest.md +3 -1
  44. data/docs/Expense.md +18 -12
  45. data/docs/ExpenseEndpointRequest.md +18 -0
  46. data/docs/ExpenseLine.md +11 -5
  47. data/docs/ExpenseLineRequest.md +38 -0
  48. data/docs/ExpenseRequest.md +38 -0
  49. data/docs/ExpenseResponse.md +24 -0
  50. data/docs/ExpensesApi.md +159 -5
  51. data/docs/IncomeStatement.md +15 -11
  52. data/docs/IncomeStatementsApi.md +2 -0
  53. data/docs/Invoice.md +21 -15
  54. data/docs/InvoiceLineItem.md +15 -5
  55. data/docs/InvoiceLineItemRequest.md +15 -3
  56. data/docs/InvoiceRequest.md +17 -11
  57. data/docs/InvoicesApi.md +16 -10
  58. data/docs/Issue.md +9 -7
  59. data/docs/IssuesApi.md +2 -2
  60. data/docs/Item.md +11 -7
  61. data/docs/ItemsApi.md +11 -9
  62. data/docs/JournalEntriesApi.md +7 -5
  63. data/docs/JournalEntry.md +18 -10
  64. data/docs/JournalEntryRequest.md +14 -8
  65. data/docs/JournalLine.md +6 -4
  66. data/docs/JournalLineRequest.md +10 -4
  67. data/docs/LinkToken.md +1 -1
  68. data/docs/LinkedAccountCondition.md +28 -0
  69. data/docs/LinkedAccountConditionRequest.md +22 -0
  70. data/docs/LinkedAccountSelectiveSyncConfiguration.md +18 -0
  71. data/docs/LinkedAccountSelectiveSyncConfigurationListRequest.md +18 -0
  72. data/docs/LinkedAccountSelectiveSyncConfigurationRequest.md +18 -0
  73. data/docs/LinkedAccountsApi.md +2 -2
  74. data/docs/MetaResponse.md +2 -0
  75. data/docs/MultipartFormFieldRequest.md +1 -1
  76. data/docs/OperatorSchema.md +20 -0
  77. data/docs/PaginatedConditionSchemaList.md +22 -0
  78. data/docs/Payment.md +14 -6
  79. data/docs/PaymentEndpointRequest.md +18 -0
  80. data/docs/PaymentRequest.md +34 -0
  81. data/docs/PaymentResponse.md +24 -0
  82. data/docs/PaymentsApi.md +159 -5
  83. data/docs/PostingStatusEnum.md +15 -0
  84. data/docs/PurchaseOrder.md +19 -13
  85. data/docs/PurchaseOrderEndpointRequest.md +18 -0
  86. data/docs/PurchaseOrderLineItem.md +10 -2
  87. data/docs/PurchaseOrderLineItemRequest.md +44 -0
  88. data/docs/PurchaseOrderRequest.md +44 -0
  89. data/docs/PurchaseOrderResponse.md +24 -0
  90. data/docs/PurchaseOrdersApi.md +167 -9
  91. data/docs/ReportItem.md +3 -1
  92. data/docs/SelectiveSyncApi.md +233 -0
  93. data/docs/SelectiveSyncConfigurationsUsageEnum.md +15 -0
  94. data/docs/SyncStatus.md +5 -3
  95. data/docs/TaxRate.md +11 -7
  96. data/docs/TaxRatesApi.md +2 -0
  97. data/docs/TrackingCategoriesApi.md +11 -5
  98. data/docs/TrackingCategory.md +13 -9
  99. data/docs/Transaction.md +20 -14
  100. data/docs/TransactionLineItem.md +9 -3
  101. data/docs/TransactionsApi.md +7 -5
  102. data/docs/VendorCredit.md +13 -7
  103. data/docs/VendorCreditLine.md +6 -2
  104. data/docs/VendorCreditsApi.md +7 -5
  105. data/lib/merge_accounting_client/api/accounts_api.rb +159 -4
  106. data/lib/merge_accounting_client/api/addresses_api.rb +9 -2
  107. data/lib/merge_accounting_client/api/attachments_api.rb +141 -0
  108. data/lib/merge_accounting_client/api/balance_sheets_api.rb +3 -0
  109. data/lib/merge_accounting_client/api/cash_flow_statements_api.rb +3 -0
  110. data/lib/merge_accounting_client/api/common_model_scopes_api.rb +146 -0
  111. data/lib/merge_accounting_client/api/company_info_api.rb +0 -14
  112. data/lib/merge_accounting_client/api/contacts_api.rb +159 -18
  113. data/lib/merge_accounting_client/api/credit_notes_api.rb +27 -18
  114. data/lib/merge_accounting_client/api/expenses_api.rb +147 -14
  115. data/lib/merge_accounting_client/api/income_statements_api.rb +3 -0
  116. data/lib/merge_accounting_client/api/invoices_api.rb +29 -20
  117. data/lib/merge_accounting_client/api/issues_api.rb +2 -2
  118. data/lib/merge_accounting_client/api/items_api.rb +21 -18
  119. data/lib/merge_accounting_client/api/journal_entries_api.rb +9 -14
  120. data/lib/merge_accounting_client/api/linked_accounts_api.rb +3 -3
  121. data/lib/merge_accounting_client/api/payments_api.rb +147 -14
  122. data/lib/merge_accounting_client/api/purchase_orders_api.rb +165 -18
  123. data/lib/merge_accounting_client/api/selective_sync_api.rb +225 -0
  124. data/lib/merge_accounting_client/api/tax_rates_api.rb +3 -0
  125. data/lib/merge_accounting_client/api/tracking_categories_api.rb +21 -4
  126. data/lib/merge_accounting_client/api/transactions_api.rb +9 -14
  127. data/lib/merge_accounting_client/api/vendor_credits_api.rb +9 -14
  128. data/lib/merge_accounting_client/models/account.rb +45 -21
  129. data/lib/merge_accounting_client/models/account_endpoint_request.rb +223 -0
  130. data/lib/merge_accounting_client/models/account_integration.rb +1 -1
  131. data/lib/merge_accounting_client/models/account_request.rb +344 -0
  132. data/lib/merge_accounting_client/models/account_response.rb +266 -0
  133. data/lib/merge_accounting_client/models/accounting_attachment.rb +39 -16
  134. data/lib/merge_accounting_client/models/accounting_attachment_endpoint_request.rb +223 -0
  135. data/lib/merge_accounting_client/models/accounting_attachment_request.rb +282 -0
  136. data/lib/merge_accounting_client/models/accounting_attachment_response.rb +266 -0
  137. data/lib/merge_accounting_client/models/accounting_phone_number_request.rb +256 -0
  138. data/lib/merge_accounting_client/models/address.rb +16 -5
  139. data/lib/merge_accounting_client/models/balance_sheet.rb +41 -18
  140. data/lib/merge_accounting_client/models/cash_flow_statement.rb +41 -18
  141. data/lib/merge_accounting_client/models/categories_enum.rb +3 -1
  142. data/lib/merge_accounting_client/models/category_enum.rb +3 -1
  143. data/lib/merge_accounting_client/models/common_model_scope_data.rb +234 -0
  144. data/lib/merge_accounting_client/models/common_model_scopes.rb +234 -0
  145. data/lib/merge_accounting_client/models/common_model_scopes_body_request.rb +274 -0
  146. data/lib/merge_accounting_client/models/common_model_scopes_disabled_models.rb +283 -0
  147. data/lib/merge_accounting_client/models/common_model_scopes_disabled_models_enabled_actions_enum.rb +45 -0
  148. data/lib/merge_accounting_client/models/common_model_scopes_post_inner_deserializer_request.rb +274 -0
  149. data/lib/merge_accounting_client/models/common_model_scopes_update_serializer.rb +226 -0
  150. data/lib/merge_accounting_client/models/company_info.rb +29 -17
  151. data/lib/merge_accounting_client/models/condition_schema.rb +298 -0
  152. data/lib/merge_accounting_client/models/condition_type_enum.rb +50 -0
  153. data/lib/merge_accounting_client/models/contact.rb +41 -18
  154. data/lib/merge_accounting_client/models/contact_endpoint_request.rb +223 -0
  155. data/lib/merge_accounting_client/models/contact_request.rb +346 -0
  156. data/lib/merge_accounting_client/models/contact_response.rb +266 -0
  157. data/lib/merge_accounting_client/models/credit_note.rb +43 -20
  158. data/lib/merge_accounting_client/models/credit_note_line_item.rb +40 -12
  159. data/lib/merge_accounting_client/models/data_passthrough_request.rb +1 -0
  160. data/lib/merge_accounting_client/models/enabled_actions_enum.rb +45 -0
  161. data/lib/merge_accounting_client/models/end_user_details_request.rb +18 -5
  162. data/lib/merge_accounting_client/models/expense.rb +91 -38
  163. data/lib/merge_accounting_client/models/expense_endpoint_request.rb +223 -0
  164. data/lib/merge_accounting_client/models/expense_line.rb +51 -17
  165. data/lib/merge_accounting_client/models/expense_line_request.rb +332 -0
  166. data/lib/merge_accounting_client/models/expense_request.rb +350 -0
  167. data/lib/merge_accounting_client/models/expense_response.rb +266 -0
  168. data/lib/merge_accounting_client/models/income_statement.rb +44 -21
  169. data/lib/merge_accounting_client/models/invoice.rb +94 -42
  170. data/lib/merge_accounting_client/models/invoice_line_item.rb +99 -26
  171. data/lib/merge_accounting_client/models/invoice_line_item_request.rb +102 -17
  172. data/lib/merge_accounting_client/models/invoice_request.rb +85 -32
  173. data/lib/merge_accounting_client/models/issue.rb +15 -4
  174. data/lib/merge_accounting_client/models/item.rb +44 -19
  175. data/lib/merge_accounting_client/models/journal_entry.rb +100 -38
  176. data/lib/merge_accounting_client/models/journal_entry_request.rb +92 -40
  177. data/lib/merge_accounting_client/models/journal_line.rb +28 -17
  178. data/lib/merge_accounting_client/models/journal_line_request.rb +52 -17
  179. data/lib/merge_accounting_client/models/link_token.rb +0 -5
  180. data/lib/merge_accounting_client/models/linked_account_condition.rb +282 -0
  181. data/lib/merge_accounting_client/models/linked_account_condition_request.rb +269 -0
  182. data/lib/merge_accounting_client/models/linked_account_selective_sync_configuration.rb +221 -0
  183. data/lib/merge_accounting_client/models/linked_account_selective_sync_configuration_list_request.rb +226 -0
  184. data/lib/merge_accounting_client/models/linked_account_selective_sync_configuration_request.rb +226 -0
  185. data/lib/merge_accounting_client/models/meta_response.rb +12 -1
  186. data/lib/merge_accounting_client/models/multipart_form_field_request.rb +1 -1
  187. data/lib/merge_accounting_client/models/operator_schema.rb +229 -0
  188. data/lib/merge_accounting_client/models/paginated_condition_schema_list.rb +240 -0
  189. data/lib/merge_accounting_client/models/payment.rb +82 -18
  190. data/lib/merge_accounting_client/models/payment_endpoint_request.rb +223 -0
  191. data/lib/merge_accounting_client/models/payment_request.rb +328 -0
  192. data/lib/merge_accounting_client/models/payment_response.rb +266 -0
  193. data/lib/merge_accounting_client/models/posting_status_enum.rb +45 -0
  194. data/lib/merge_accounting_client/models/purchase_order.rb +92 -41
  195. data/lib/merge_accounting_client/models/purchase_order_endpoint_request.rb +223 -0
  196. data/lib/merge_accounting_client/models/purchase_order_line_item.rb +79 -12
  197. data/lib/merge_accounting_client/models/purchase_order_line_item_request.rb +422 -0
  198. data/lib/merge_accounting_client/models/purchase_order_request.rb +383 -0
  199. data/lib/merge_accounting_client/models/purchase_order_response.rb +266 -0
  200. data/lib/merge_accounting_client/models/report_item.rb +15 -4
  201. data/lib/merge_accounting_client/models/selective_sync_configurations_usage_enum.rb +45 -0
  202. data/lib/merge_accounting_client/models/sync_status.rb +13 -4
  203. data/lib/merge_accounting_client/models/tax_rate.rb +59 -36
  204. data/lib/merge_accounting_client/models/tracking_category.rb +62 -38
  205. data/lib/merge_accounting_client/models/transaction.rb +97 -46
  206. data/lib/merge_accounting_client/models/transaction_line_item.rb +75 -19
  207. data/lib/merge_accounting_client/models/vendor_credit.rb +70 -18
  208. data/lib/merge_accounting_client/models/vendor_credit_line.rb +34 -6
  209. data/lib/merge_accounting_client/version.rb +1 -1
  210. data/lib/merge_accounting_client.rb +42 -1
  211. data/spec/api/accounts_api_spec.rb +30 -2
  212. data/spec/api/addresses_api_spec.rb +2 -1
  213. data/spec/api/attachments_api_spec.rb +26 -0
  214. data/spec/api/balance_sheets_api_spec.rb +1 -0
  215. data/spec/api/cash_flow_statements_api_spec.rb +1 -0
  216. data/spec/api/common_model_scopes_api_spec.rb +58 -0
  217. data/spec/api/company_info_api_spec.rb +0 -2
  218. data/spec/api/contacts_api_spec.rb +30 -4
  219. data/spec/api/credit_notes_api_spec.rb +7 -4
  220. data/spec/api/expenses_api_spec.rb +28 -2
  221. data/spec/api/income_statements_api_spec.rb +1 -0
  222. data/spec/api/invoices_api_spec.rb +8 -5
  223. data/spec/api/issues_api_spec.rb +1 -1
  224. data/spec/api/items_api_spec.rb +5 -4
  225. data/spec/api/journal_entries_api_spec.rb +3 -2
  226. data/spec/api/linked_accounts_api_spec.rb +1 -1
  227. data/spec/api/payments_api_spec.rb +28 -2
  228. data/spec/api/purchase_orders_api_spec.rb +32 -4
  229. data/spec/api/selective_sync_api_spec.rb +72 -0
  230. data/spec/api/tax_rates_api_spec.rb +1 -0
  231. data/spec/api/tracking_categories_api_spec.rb +5 -2
  232. data/spec/api/transactions_api_spec.rb +3 -2
  233. data/spec/api/vendor_credits_api_spec.rb +3 -2
  234. data/spec/models/account_endpoint_request_spec.rb +34 -0
  235. data/spec/models/account_request_spec.rb +100 -0
  236. data/spec/models/account_response_spec.rb +52 -0
  237. data/spec/models/account_spec.rb +18 -6
  238. data/spec/models/accounting_attachment_endpoint_request_spec.rb +34 -0
  239. data/spec/models/accounting_attachment_request_spec.rb +58 -0
  240. data/spec/models/accounting_attachment_response_spec.rb +52 -0
  241. data/spec/models/accounting_attachment_spec.rb +15 -3
  242. data/spec/models/accounting_phone_number_request_spec.rb +52 -0
  243. data/spec/models/address_spec.rb +6 -0
  244. data/spec/models/balance_sheet_spec.rb +15 -3
  245. data/spec/models/cash_flow_statement_spec.rb +15 -3
  246. data/spec/models/common_model_scope_data_spec.rb +40 -0
  247. data/spec/models/common_model_scopes_body_request_spec.rb +46 -0
  248. data/spec/models/common_model_scopes_disabled_models_enabled_actions_enum_spec.rb +28 -0
  249. data/spec/models/common_model_scopes_disabled_models_spec.rb +58 -0
  250. data/spec/models/common_model_scopes_post_inner_deserializer_request_spec.rb +46 -0
  251. data/spec/models/common_model_scopes_spec.rb +40 -0
  252. data/spec/models/common_model_scopes_update_serializer_spec.rb +34 -0
  253. data/spec/models/company_info_spec.rb +12 -6
  254. data/spec/models/condition_schema_spec.rb +70 -0
  255. data/spec/models/condition_type_enum_spec.rb +28 -0
  256. data/spec/models/contact_endpoint_request_spec.rb +34 -0
  257. data/spec/models/contact_request_spec.rb +100 -0
  258. data/spec/models/contact_response_spec.rb +52 -0
  259. data/spec/models/contact_spec.rb +18 -6
  260. data/spec/models/credit_note_line_item_spec.rb +12 -0
  261. data/spec/models/credit_note_spec.rb +17 -5
  262. data/spec/models/enabled_actions_enum_spec.rb +28 -0
  263. data/spec/models/end_user_details_request_spec.rb +6 -0
  264. data/spec/models/expense_endpoint_request_spec.rb +34 -0
  265. data/spec/models/expense_line_request_spec.rb +94 -0
  266. data/spec/models/expense_line_spec.rb +22 -4
  267. data/spec/models/expense_request_spec.rb +94 -0
  268. data/spec/models/expense_response_spec.rb +52 -0
  269. data/spec/models/expense_spec.rb +30 -12
  270. data/spec/models/income_statement_spec.rb +15 -3
  271. data/spec/models/invoice_line_item_request_spec.rb +41 -5
  272. data/spec/models/invoice_line_item_spec.rb +36 -6
  273. data/spec/models/invoice_request_spec.rb +26 -8
  274. data/spec/models/invoice_spec.rb +34 -16
  275. data/spec/models/issue_spec.rb +6 -0
  276. data/spec/models/item_spec.rb +18 -6
  277. data/spec/models/journal_entry_request_spec.rb +25 -7
  278. data/spec/models/journal_entry_spec.rb +35 -11
  279. data/spec/models/journal_line_request_spec.rb +22 -4
  280. data/spec/models/journal_line_spec.rb +10 -4
  281. data/spec/models/linked_account_condition_request_spec.rb +46 -0
  282. data/spec/models/linked_account_condition_spec.rb +64 -0
  283. data/spec/models/linked_account_selective_sync_configuration_list_request_spec.rb +34 -0
  284. data/spec/models/linked_account_selective_sync_configuration_request_spec.rb +34 -0
  285. data/spec/models/linked_account_selective_sync_configuration_spec.rb +34 -0
  286. data/spec/models/meta_response_spec.rb +6 -0
  287. data/spec/models/operator_schema_spec.rb +40 -0
  288. data/spec/models/paginated_condition_schema_list_spec.rb +46 -0
  289. data/spec/models/payment_endpoint_request_spec.rb +34 -0
  290. data/spec/models/payment_request_spec.rb +82 -0
  291. data/spec/models/payment_response_spec.rb +52 -0
  292. data/spec/models/payment_spec.rb +28 -4
  293. data/spec/models/posting_status_enum_spec.rb +28 -0
  294. data/spec/models/purchase_order_endpoint_request_spec.rb +34 -0
  295. data/spec/models/purchase_order_line_item_request_spec.rb +112 -0
  296. data/spec/models/purchase_order_line_item_spec.rb +24 -0
  297. data/spec/models/purchase_order_request_spec.rb +112 -0
  298. data/spec/models/purchase_order_response_spec.rb +52 -0
  299. data/spec/models/purchase_order_spec.rb +34 -16
  300. data/spec/models/report_item_spec.rb +6 -0
  301. data/spec/models/selective_sync_configurations_usage_enum_spec.rb +28 -0
  302. data/spec/models/sync_status_spec.rb +6 -0
  303. data/spec/models/tax_rate_spec.rb +19 -7
  304. data/spec/models/tracking_category_spec.rb +20 -8
  305. data/spec/models/transaction_line_item_spec.rb +19 -1
  306. data/spec/models/transaction_spec.rb +30 -12
  307. data/spec/models/vendor_credit_line_spec.rb +12 -0
  308. data/spec/models/vendor_credit_spec.rb +24 -6
  309. metadata +283 -115
@@ -19,19 +19,97 @@ module MergeAccountingClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Creates an `Expense` object with the given values.
23
+ # @param x_account_token [String] Token identifying the end user.
24
+ # @param expense_endpoint_request [ExpenseEndpointRequest]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Boolean] :is_debug_mode Whether to include debug fields (such as log file links) in the response.
27
+ # @option opts [Boolean] :run_async Whether or not third-party updates should be run asynchronously.
28
+ # @return [ExpenseResponse]
29
+ def expenses_create(x_account_token, expense_endpoint_request, opts = {})
30
+ data, _status_code, _headers = expenses_create_with_http_info(x_account_token, expense_endpoint_request, opts)
31
+ data
32
+ end
33
+
34
+ # Creates an `Expense` object with the given values.
35
+ # @param x_account_token [String] Token identifying the end user.
36
+ # @param expense_endpoint_request [ExpenseEndpointRequest]
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [Boolean] :is_debug_mode Whether to include debug fields (such as log file links) in the response.
39
+ # @option opts [Boolean] :run_async Whether or not third-party updates should be run asynchronously.
40
+ # @return [Array<(ExpenseResponse, Integer, Hash)>] ExpenseResponse data, response status code and response headers
41
+ def expenses_create_with_http_info(x_account_token, expense_endpoint_request, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: ExpensesApi.expenses_create ...'
44
+ end
45
+ # verify the required parameter 'x_account_token' is set
46
+ if @api_client.config.client_side_validation && x_account_token.nil?
47
+ fail ArgumentError, "Missing the required parameter 'x_account_token' when calling ExpensesApi.expenses_create"
48
+ end
49
+ # verify the required parameter 'expense_endpoint_request' is set
50
+ if @api_client.config.client_side_validation && expense_endpoint_request.nil?
51
+ fail ArgumentError, "Missing the required parameter 'expense_endpoint_request' when calling ExpensesApi.expenses_create"
52
+ end
53
+ # resource path
54
+ local_var_path = '/expenses'
55
+
56
+ # query parameters
57
+ query_params = opts[:query_params] || {}
58
+ query_params[:'is_debug_mode'] = opts[:'is_debug_mode'] if !opts[:'is_debug_mode'].nil?
59
+ query_params[:'run_async'] = opts[:'run_async'] if !opts[:'run_async'].nil?
60
+
61
+ # header parameters
62
+ header_params = opts[:header_params] || {}
63
+ # HTTP header 'Accept' (if needed)
64
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
65
+ # HTTP header 'Content-Type'
66
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
67
+ header_params[:'X-Account-Token'] = x_account_token
68
+
69
+ # form parameters
70
+ form_params = opts[:form_params] || {}
71
+
72
+ # http body (model)
73
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(expense_endpoint_request)
74
+
75
+ # return_type
76
+ return_type = opts[:debug_return_type] || 'ExpenseResponse'
77
+
78
+ # auth_names
79
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
80
+
81
+ new_options = opts.merge(
82
+ :operation => :"ExpensesApi.expenses_create",
83
+ :header_params => header_params,
84
+ :query_params => query_params,
85
+ :form_params => form_params,
86
+ :body => post_body,
87
+ :auth_names => auth_names,
88
+ :return_type => return_type
89
+ )
90
+
91
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
92
+ if @api_client.config.debugging
93
+ @api_client.config.logger.debug "API called: ExpensesApi#expenses_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
94
+ end
95
+ return data, status_code, headers
96
+ end
97
+
22
98
  # Returns a list of `Expense` objects.
23
99
  # @param x_account_token [String] Token identifying the end user.
24
100
  # @param [Hash] opts the optional parameters
101
+ # @option opts [String] :company_id If provided, will only return expenses for this company.
25
102
  # @option opts [Time] :created_after If provided, will only return objects created after this datetime.
26
103
  # @option opts [Time] :created_before If provided, will only return objects created before this datetime.
27
104
  # @option opts [String] :cursor The pagination cursor value.
28
- # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
29
105
  # @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
30
106
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
31
107
  # @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
32
108
  # @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
33
109
  # @option opts [Integer] :page_size Number of results to return per page.
34
110
  # @option opts [String] :remote_id The API provider&#39;s ID for the given object.
111
+ # @option opts [Time] :transaction_date_after If provided, will only return objects created after this datetime.
112
+ # @option opts [Time] :transaction_date_before If provided, will only return objects created before this datetime.
35
113
  # @return [PaginatedExpenseList]
36
114
  def expenses_list(x_account_token, opts = {})
37
115
  data, _status_code, _headers = expenses_list_with_http_info(x_account_token, opts)
@@ -41,16 +119,18 @@ module MergeAccountingClient
41
119
  # Returns a list of &#x60;Expense&#x60; objects.
42
120
  # @param x_account_token [String] Token identifying the end user.
43
121
  # @param [Hash] opts the optional parameters
122
+ # @option opts [String] :company_id If provided, will only return expenses for this company.
44
123
  # @option opts [Time] :created_after If provided, will only return objects created after this datetime.
45
124
  # @option opts [Time] :created_before If provided, will only return objects created before this datetime.
46
125
  # @option opts [String] :cursor The pagination cursor value.
47
- # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
48
126
  # @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
49
127
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
50
128
  # @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
51
129
  # @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
52
130
  # @option opts [Integer] :page_size Number of results to return per page.
53
131
  # @option opts [String] :remote_id The API provider&#39;s ID for the given object.
132
+ # @option opts [Time] :transaction_date_after If provided, will only return objects created after this datetime.
133
+ # @option opts [Time] :transaction_date_before If provided, will only return objects created before this datetime.
54
134
  # @return [Array<(PaginatedExpenseList, Integer, Hash)>] PaginatedExpenseList data, response status code and response headers
55
135
  def expenses_list_with_http_info(x_account_token, opts = {})
56
136
  if @api_client.config.debugging
@@ -60,25 +140,23 @@ module MergeAccountingClient
60
140
  if @api_client.config.client_side_validation && x_account_token.nil?
61
141
  fail ArgumentError, "Missing the required parameter 'x_account_token' when calling ExpensesApi.expenses_list"
62
142
  end
63
- allowable_values = ["account", "account,contact", "contact"]
64
- if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
65
- fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
66
- end
67
143
  # resource path
68
144
  local_var_path = '/expenses'
69
145
 
70
146
  # query parameters
71
147
  query_params = opts[:query_params] || {}
148
+ query_params[:'company_id'] = opts[:'company_id'] if !opts[:'company_id'].nil?
72
149
  query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
73
150
  query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
74
151
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
75
- query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
76
152
  query_params[:'include_deleted_data'] = opts[:'include_deleted_data'] if !opts[:'include_deleted_data'].nil?
77
153
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
78
154
  query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
79
155
  query_params[:'modified_before'] = opts[:'modified_before'] if !opts[:'modified_before'].nil?
80
156
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
81
157
  query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
158
+ query_params[:'transaction_date_after'] = opts[:'transaction_date_after'] if !opts[:'transaction_date_after'].nil?
159
+ query_params[:'transaction_date_before'] = opts[:'transaction_date_before'] if !opts[:'transaction_date_before'].nil?
82
160
 
83
161
  # header parameters
84
162
  header_params = opts[:header_params] || {}
@@ -115,11 +193,72 @@ module MergeAccountingClient
115
193
  return data, status_code, headers
116
194
  end
117
195
 
196
+ # Returns metadata for `Expense` POSTs.
197
+ # @param x_account_token [String] Token identifying the end user.
198
+ # @param [Hash] opts the optional parameters
199
+ # @return [MetaResponse]
200
+ def expenses_meta_post_retrieve(x_account_token, opts = {})
201
+ data, _status_code, _headers = expenses_meta_post_retrieve_with_http_info(x_account_token, opts)
202
+ data
203
+ end
204
+
205
+ # Returns metadata for &#x60;Expense&#x60; POSTs.
206
+ # @param x_account_token [String] Token identifying the end user.
207
+ # @param [Hash] opts the optional parameters
208
+ # @return [Array<(MetaResponse, Integer, Hash)>] MetaResponse data, response status code and response headers
209
+ def expenses_meta_post_retrieve_with_http_info(x_account_token, opts = {})
210
+ if @api_client.config.debugging
211
+ @api_client.config.logger.debug 'Calling API: ExpensesApi.expenses_meta_post_retrieve ...'
212
+ end
213
+ # verify the required parameter 'x_account_token' is set
214
+ if @api_client.config.client_side_validation && x_account_token.nil?
215
+ fail ArgumentError, "Missing the required parameter 'x_account_token' when calling ExpensesApi.expenses_meta_post_retrieve"
216
+ end
217
+ # resource path
218
+ local_var_path = '/expenses/meta/post'
219
+
220
+ # query parameters
221
+ query_params = opts[:query_params] || {}
222
+
223
+ # header parameters
224
+ header_params = opts[:header_params] || {}
225
+ # HTTP header 'Accept' (if needed)
226
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
227
+ header_params[:'X-Account-Token'] = x_account_token
228
+
229
+ # form parameters
230
+ form_params = opts[:form_params] || {}
231
+
232
+ # http body (model)
233
+ post_body = opts[:debug_body]
234
+
235
+ # return_type
236
+ return_type = opts[:debug_return_type] || 'MetaResponse'
237
+
238
+ # auth_names
239
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
240
+
241
+ new_options = opts.merge(
242
+ :operation => :"ExpensesApi.expenses_meta_post_retrieve",
243
+ :header_params => header_params,
244
+ :query_params => query_params,
245
+ :form_params => form_params,
246
+ :body => post_body,
247
+ :auth_names => auth_names,
248
+ :return_type => return_type
249
+ )
250
+
251
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
252
+ if @api_client.config.debugging
253
+ @api_client.config.logger.debug "API called: ExpensesApi#expenses_meta_post_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
254
+ end
255
+ return data, status_code, headers
256
+ end
257
+
118
258
  # Returns an `Expense` object with the given `id`.
119
259
  # @param x_account_token [String] Token identifying the end user.
120
260
  # @param id [String]
121
261
  # @param [Hash] opts the optional parameters
122
- # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
123
262
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
124
263
  # @return [Expense]
125
264
  def expenses_retrieve(x_account_token, id, opts = {})
@@ -131,7 +270,6 @@ module MergeAccountingClient
131
270
  # @param x_account_token [String] Token identifying the end user.
132
271
  # @param id [String]
133
272
  # @param [Hash] opts the optional parameters
134
- # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
135
273
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
136
274
  # @return [Array<(Expense, Integer, Hash)>] Expense data, response status code and response headers
137
275
  def expenses_retrieve_with_http_info(x_account_token, id, opts = {})
@@ -146,16 +284,11 @@ module MergeAccountingClient
146
284
  if @api_client.config.client_side_validation && id.nil?
147
285
  fail ArgumentError, "Missing the required parameter 'id' when calling ExpensesApi.expenses_retrieve"
148
286
  end
149
- allowable_values = ["account", "account,contact", "contact"]
150
- if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
151
- fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
152
- end
153
287
  # resource path
154
288
  local_var_path = '/expenses/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
155
289
 
156
290
  # query parameters
157
291
  query_params = opts[:query_params] || {}
158
- query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
159
292
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
160
293
 
161
294
  # header parameters
@@ -22,6 +22,7 @@ module MergeAccountingClient
22
22
  # Returns a list of `IncomeStatement` objects.
23
23
  # @param x_account_token [String] Token identifying the end user.
24
24
  # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :company_id If provided, will only return income statements for this company.
25
26
  # @option opts [Time] :created_after If provided, will only return objects created after this datetime.
26
27
  # @option opts [Time] :created_before If provided, will only return objects created before this datetime.
27
28
  # @option opts [String] :cursor The pagination cursor value.
@@ -40,6 +41,7 @@ module MergeAccountingClient
40
41
  # Returns a list of &#x60;IncomeStatement&#x60; objects.
41
42
  # @param x_account_token [String] Token identifying the end user.
42
43
  # @param [Hash] opts the optional parameters
44
+ # @option opts [String] :company_id If provided, will only return income statements for this company.
43
45
  # @option opts [Time] :created_after If provided, will only return objects created after this datetime.
44
46
  # @option opts [Time] :created_before If provided, will only return objects created before this datetime.
45
47
  # @option opts [String] :cursor The pagination cursor value.
@@ -63,6 +65,7 @@ module MergeAccountingClient
63
65
 
64
66
  # query parameters
65
67
  query_params = opts[:query_params] || {}
68
+ query_params[:'company_id'] = opts[:'company_id'] if !opts[:'company_id'].nil?
66
69
  query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
67
70
  query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
68
71
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
@@ -98,19 +98,22 @@ module MergeAccountingClient
98
98
  # Returns a list of `Invoice` objects.
99
99
  # @param x_account_token [String] Token identifying the end user.
100
100
  # @param [Hash] opts the optional parameters
101
+ # @option opts [String] :company_id If provided, will only return invoices for this company.
101
102
  # @option opts [String] :contact_id If provided, will only return invoices for this contact.
102
103
  # @option opts [Time] :created_after If provided, will only return objects created after this datetime.
103
104
  # @option opts [Time] :created_before If provided, will only return objects created before this datetime.
104
105
  # @option opts [String] :cursor The pagination cursor value.
105
- # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
106
106
  # @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
107
107
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
108
+ # @option opts [Time] :issue_date_after If provided, will only return objects created after this datetime.
109
+ # @option opts [Time] :issue_date_before If provided, will only return objects created before this datetime.
108
110
  # @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
109
111
  # @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
110
112
  # @option opts [Integer] :page_size Number of results to return per page.
111
- # @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
113
+ # @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
112
114
  # @option opts [String] :remote_id The API provider&#39;s ID for the given object.
113
- # @option opts [String] :type If provided, will only return Invoices with this type
115
+ # @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
116
+ # @option opts [String] :type If provided, will only return Invoices with this type * &#x60;ACCOUNTS_RECEIVABLE&#x60; - ACCOUNTS_RECEIVABLE * &#x60;ACCOUNTS_PAYABLE&#x60; - ACCOUNTS_PAYABLE
114
117
  # @return [PaginatedInvoiceList]
115
118
  def invoices_list(x_account_token, opts = {})
116
119
  data, _status_code, _headers = invoices_list_with_http_info(x_account_token, opts)
@@ -120,19 +123,22 @@ module MergeAccountingClient
120
123
  # Returns a list of &#x60;Invoice&#x60; objects.
121
124
  # @param x_account_token [String] Token identifying the end user.
122
125
  # @param [Hash] opts the optional parameters
126
+ # @option opts [String] :company_id If provided, will only return invoices for this company.
123
127
  # @option opts [String] :contact_id If provided, will only return invoices for this contact.
124
128
  # @option opts [Time] :created_after If provided, will only return objects created after this datetime.
125
129
  # @option opts [Time] :created_before If provided, will only return objects created before this datetime.
126
130
  # @option opts [String] :cursor The pagination cursor value.
127
- # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
128
131
  # @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
129
132
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
133
+ # @option opts [Time] :issue_date_after If provided, will only return objects created after this datetime.
134
+ # @option opts [Time] :issue_date_before If provided, will only return objects created before this datetime.
130
135
  # @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
131
136
  # @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
132
137
  # @option opts [Integer] :page_size Number of results to return per page.
133
- # @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
138
+ # @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
134
139
  # @option opts [String] :remote_id The API provider&#39;s ID for the given object.
135
- # @option opts [String] :type If provided, will only return Invoices with this type
140
+ # @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
141
+ # @option opts [String] :type If provided, will only return Invoices with this type * &#x60;ACCOUNTS_RECEIVABLE&#x60; - ACCOUNTS_RECEIVABLE * &#x60;ACCOUNTS_PAYABLE&#x60; - ACCOUNTS_PAYABLE
136
142
  # @return [Array<(PaginatedInvoiceList, Integer, Hash)>] PaginatedInvoiceList data, response status code and response headers
137
143
  def invoices_list_with_http_info(x_account_token, opts = {})
138
144
  if @api_client.config.debugging
@@ -142,14 +148,14 @@ module MergeAccountingClient
142
148
  if @api_client.config.client_side_validation && x_account_token.nil?
143
149
  fail ArgumentError, "Missing the required parameter 'x_account_token' when calling InvoicesApi.invoices_list"
144
150
  end
145
- allowable_values = ["contact", "line_items", "line_items,contact", "payments", "payments,contact", "payments,line_items", "payments,line_items,contact"]
146
- if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
147
- fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
148
- end
149
151
  allowable_values = ["type"]
150
152
  if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
151
153
  fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
152
154
  end
155
+ allowable_values = ["type"]
156
+ if @api_client.config.client_side_validation && opts[:'show_enum_origins'] && !allowable_values.include?(opts[:'show_enum_origins'])
157
+ fail ArgumentError, "invalid value for \"show_enum_origins\", must be one of #{allowable_values}"
158
+ end
153
159
  allowable_values = ["ACCOUNTS_PAYABLE", "ACCOUNTS_RECEIVABLE"]
154
160
  if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
155
161
  fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
@@ -159,18 +165,21 @@ module MergeAccountingClient
159
165
 
160
166
  # query parameters
161
167
  query_params = opts[:query_params] || {}
168
+ query_params[:'company_id'] = opts[:'company_id'] if !opts[:'company_id'].nil?
162
169
  query_params[:'contact_id'] = opts[:'contact_id'] if !opts[:'contact_id'].nil?
163
170
  query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
164
171
  query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
165
172
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
166
- query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
167
173
  query_params[:'include_deleted_data'] = opts[:'include_deleted_data'] if !opts[:'include_deleted_data'].nil?
168
174
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
175
+ query_params[:'issue_date_after'] = opts[:'issue_date_after'] if !opts[:'issue_date_after'].nil?
176
+ query_params[:'issue_date_before'] = opts[:'issue_date_before'] if !opts[:'issue_date_before'].nil?
169
177
  query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
170
178
  query_params[:'modified_before'] = opts[:'modified_before'] if !opts[:'modified_before'].nil?
171
179
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
172
180
  query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
173
181
  query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
182
+ query_params[:'show_enum_origins'] = opts[:'show_enum_origins'] if !opts[:'show_enum_origins'].nil?
174
183
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
175
184
 
176
185
  # header parameters
@@ -274,9 +283,9 @@ module MergeAccountingClient
274
283
  # @param x_account_token [String] Token identifying the end user.
275
284
  # @param id [String]
276
285
  # @param [Hash] opts the optional parameters
277
- # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
278
286
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
279
- # @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
287
+ # @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
288
+ # @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
280
289
  # @return [Invoice]
281
290
  def invoices_retrieve(x_account_token, id, opts = {})
282
291
  data, _status_code, _headers = invoices_retrieve_with_http_info(x_account_token, id, opts)
@@ -287,9 +296,9 @@ module MergeAccountingClient
287
296
  # @param x_account_token [String] Token identifying the end user.
288
297
  # @param id [String]
289
298
  # @param [Hash] opts the optional parameters
290
- # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
291
299
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
292
- # @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
300
+ # @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
301
+ # @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
293
302
  # @return [Array<(Invoice, Integer, Hash)>] Invoice data, response status code and response headers
294
303
  def invoices_retrieve_with_http_info(x_account_token, id, opts = {})
295
304
  if @api_client.config.debugging
@@ -303,22 +312,22 @@ module MergeAccountingClient
303
312
  if @api_client.config.client_side_validation && id.nil?
304
313
  fail ArgumentError, "Missing the required parameter 'id' when calling InvoicesApi.invoices_retrieve"
305
314
  end
306
- allowable_values = ["contact", "line_items", "line_items,contact", "payments", "payments,contact", "payments,line_items", "payments,line_items,contact"]
307
- if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
308
- fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
309
- end
310
315
  allowable_values = ["type"]
311
316
  if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
312
317
  fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
313
318
  end
319
+ allowable_values = ["type"]
320
+ if @api_client.config.client_side_validation && opts[:'show_enum_origins'] && !allowable_values.include?(opts[:'show_enum_origins'])
321
+ fail ArgumentError, "invalid value for \"show_enum_origins\", must be one of #{allowable_values}"
322
+ end
314
323
  # resource path
315
324
  local_var_path = '/invoices/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
316
325
 
317
326
  # query parameters
318
327
  query_params = opts[:query_params] || {}
319
- query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
320
328
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
321
329
  query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
330
+ query_params[:'show_enum_origins'] = opts[:'show_enum_origins'] if !opts[:'show_enum_origins'].nil?
322
331
 
323
332
  # header parameters
324
333
  header_params = opts[:header_params] || {}
@@ -33,7 +33,7 @@ module MergeAccountingClient
33
33
  # @option opts [Time] :last_incident_time_before If provided, will only return issues whose first incident time was before this datetime.
34
34
  # @option opts [Integer] :page_size Number of results to return per page.
35
35
  # @option opts [String] :start_date If included, will only include issues whose most recent action occurred after this time
36
- # @option opts [String] :status
36
+ # @option opts [String] :status * &#x60;ONGOING&#x60; - ONGOING * &#x60;RESOLVED&#x60; - RESOLVED * &#x60;ONGOING&#x60; - ONGOING * &#x60;RESOLVED&#x60; - RESOLVED
37
37
  # @return [PaginatedIssueList]
38
38
  def issues_list(opts = {})
39
39
  data, _status_code, _headers = issues_list_with_http_info(opts)
@@ -54,7 +54,7 @@ module MergeAccountingClient
54
54
  # @option opts [Time] :last_incident_time_before If provided, will only return issues whose first incident time was before this datetime.
55
55
  # @option opts [Integer] :page_size Number of results to return per page.
56
56
  # @option opts [String] :start_date If included, will only include issues whose most recent action occurred after this time
57
- # @option opts [String] :status
57
+ # @option opts [String] :status * &#x60;ONGOING&#x60; - ONGOING * &#x60;RESOLVED&#x60; - RESOLVED * &#x60;ONGOING&#x60; - ONGOING * &#x60;RESOLVED&#x60; - RESOLVED
58
58
  # @return [Array<(PaginatedIssueList, Integer, Hash)>] PaginatedIssueList data, response status code and response headers
59
59
  def issues_list_with_http_info(opts = {})
60
60
  if @api_client.config.debugging
@@ -22,17 +22,18 @@ module MergeAccountingClient
22
22
  # Returns a list of `Item` objects.
23
23
  # @param x_account_token [String] Token identifying the end user.
24
24
  # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :company_id If provided, will only return items for this company.
25
26
  # @option opts [Time] :created_after If provided, will only return objects created after this datetime.
26
27
  # @option opts [Time] :created_before If provided, will only return objects created before this datetime.
27
28
  # @option opts [String] :cursor The pagination cursor value.
28
- # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
29
29
  # @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
30
30
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
31
31
  # @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
32
32
  # @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
33
33
  # @option opts [Integer] :page_size Number of results to return per page.
34
- # @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
34
+ # @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
35
35
  # @option opts [String] :remote_id The API provider&#39;s ID for the given object.
36
+ # @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
36
37
  # @return [PaginatedItemList]
37
38
  def items_list(x_account_token, opts = {})
38
39
  data, _status_code, _headers = items_list_with_http_info(x_account_token, opts)
@@ -42,17 +43,18 @@ module MergeAccountingClient
42
43
  # Returns a list of &#x60;Item&#x60; objects.
43
44
  # @param x_account_token [String] Token identifying the end user.
44
45
  # @param [Hash] opts the optional parameters
46
+ # @option opts [String] :company_id If provided, will only return items for this company.
45
47
  # @option opts [Time] :created_after If provided, will only return objects created after this datetime.
46
48
  # @option opts [Time] :created_before If provided, will only return objects created before this datetime.
47
49
  # @option opts [String] :cursor The pagination cursor value.
48
- # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
49
50
  # @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
50
51
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
51
52
  # @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
52
53
  # @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
53
54
  # @option opts [Integer] :page_size Number of results to return per page.
54
- # @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
55
+ # @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
55
56
  # @option opts [String] :remote_id The API provider&#39;s ID for the given object.
57
+ # @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
56
58
  # @return [Array<(PaginatedItemList, Integer, Hash)>] PaginatedItemList data, response status code and response headers
57
59
  def items_list_with_http_info(x_account_token, opts = {})
58
60
  if @api_client.config.debugging
@@ -62,23 +64,23 @@ module MergeAccountingClient
62
64
  if @api_client.config.client_side_validation && x_account_token.nil?
63
65
  fail ArgumentError, "Missing the required parameter 'x_account_token' when calling ItemsApi.items_list"
64
66
  end
65
- allowable_values = ["purchase_account", "purchase_account,sales_account", "sales_account"]
66
- if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
67
- fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
68
- end
69
67
  allowable_values = ["status"]
70
68
  if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
71
69
  fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
72
70
  end
71
+ allowable_values = ["status"]
72
+ if @api_client.config.client_side_validation && opts[:'show_enum_origins'] && !allowable_values.include?(opts[:'show_enum_origins'])
73
+ fail ArgumentError, "invalid value for \"show_enum_origins\", must be one of #{allowable_values}"
74
+ end
73
75
  # resource path
74
76
  local_var_path = '/items'
75
77
 
76
78
  # query parameters
77
79
  query_params = opts[:query_params] || {}
80
+ query_params[:'company_id'] = opts[:'company_id'] if !opts[:'company_id'].nil?
78
81
  query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
79
82
  query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
80
83
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
81
- query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
82
84
  query_params[:'include_deleted_data'] = opts[:'include_deleted_data'] if !opts[:'include_deleted_data'].nil?
83
85
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
84
86
  query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
@@ -86,6 +88,7 @@ module MergeAccountingClient
86
88
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
87
89
  query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
88
90
  query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
91
+ query_params[:'show_enum_origins'] = opts[:'show_enum_origins'] if !opts[:'show_enum_origins'].nil?
89
92
 
90
93
  # header parameters
91
94
  header_params = opts[:header_params] || {}
@@ -126,9 +129,9 @@ module MergeAccountingClient
126
129
  # @param x_account_token [String] Token identifying the end user.
127
130
  # @param id [String]
128
131
  # @param [Hash] opts the optional parameters
129
- # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
130
132
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
131
- # @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
133
+ # @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
134
+ # @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
132
135
  # @return [Item]
133
136
  def items_retrieve(x_account_token, id, opts = {})
134
137
  data, _status_code, _headers = items_retrieve_with_http_info(x_account_token, id, opts)
@@ -139,9 +142,9 @@ module MergeAccountingClient
139
142
  # @param x_account_token [String] Token identifying the end user.
140
143
  # @param id [String]
141
144
  # @param [Hash] opts the optional parameters
142
- # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
143
145
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
144
- # @option opts [String] :remote_fields Which fields should be returned in non-normalized form.
146
+ # @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
147
+ # @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
145
148
  # @return [Array<(Item, Integer, Hash)>] Item data, response status code and response headers
146
149
  def items_retrieve_with_http_info(x_account_token, id, opts = {})
147
150
  if @api_client.config.debugging
@@ -155,22 +158,22 @@ module MergeAccountingClient
155
158
  if @api_client.config.client_side_validation && id.nil?
156
159
  fail ArgumentError, "Missing the required parameter 'id' when calling ItemsApi.items_retrieve"
157
160
  end
158
- allowable_values = ["purchase_account", "purchase_account,sales_account", "sales_account"]
159
- if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
160
- fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
161
- end
162
161
  allowable_values = ["status"]
163
162
  if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
164
163
  fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
165
164
  end
165
+ allowable_values = ["status"]
166
+ if @api_client.config.client_side_validation && opts[:'show_enum_origins'] && !allowable_values.include?(opts[:'show_enum_origins'])
167
+ fail ArgumentError, "invalid value for \"show_enum_origins\", must be one of #{allowable_values}"
168
+ end
166
169
  # resource path
167
170
  local_var_path = '/items/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
168
171
 
169
172
  # query parameters
170
173
  query_params = opts[:query_params] || {}
171
- query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
172
174
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
173
175
  query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
176
+ query_params[:'show_enum_origins'] = opts[:'show_enum_origins'] if !opts[:'show_enum_origins'].nil?
174
177
 
175
178
  # header parameters
176
179
  header_params = opts[:header_params] || {}