merge_accounting_client 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -16,30 +16,33 @@ require 'time'
16
16
  module MergeAccountingClient
17
17
  # # The JournalLine Object ### Description The `JournalLine` object is used to represent a journal entry's line items. ### Usage Example Fetch from the `GET JournalEntry` endpoint and view the journal entry's line items.
18
18
  class JournalLine
19
- # The third-party API ID of the matching object.
20
- attr_accessor :remote_id
21
-
22
19
  attr_accessor :account
23
20
 
24
- # The line's net amount.
21
+ # The value of the line item including taxes and other fees.
25
22
  attr_accessor :net_amount
26
23
 
27
24
  attr_accessor :tracking_category
28
25
 
26
+ attr_accessor :tracking_categories
27
+
29
28
  attr_accessor :contact
30
29
 
31
30
  # The line's description.
32
31
  attr_accessor :description
33
32
 
33
+ # The third-party API ID of the matching object.
34
+ attr_accessor :remote_id
35
+
34
36
  # Attribute mapping from ruby-style variable name to JSON key.
35
37
  def self.attribute_map
36
38
  {
37
- :'remote_id' => :'remote_id',
38
39
  :'account' => :'account',
39
40
  :'net_amount' => :'net_amount',
40
41
  :'tracking_category' => :'tracking_category',
42
+ :'tracking_categories' => :'tracking_categories',
41
43
  :'contact' => :'contact',
42
- :'description' => :'description'
44
+ :'description' => :'description',
45
+ :'remote_id' => :'remote_id'
43
46
  }
44
47
  end
45
48
 
@@ -51,24 +54,25 @@ module MergeAccountingClient
51
54
  # Attribute type mapping.
52
55
  def self.openapi_types
53
56
  {
54
- :'remote_id' => :'String',
55
57
  :'account' => :'String',
56
58
  :'net_amount' => :'Float',
57
59
  :'tracking_category' => :'String',
60
+ :'tracking_categories' => :'Array<String>',
58
61
  :'contact' => :'String',
59
- :'description' => :'String'
62
+ :'description' => :'String',
63
+ :'remote_id' => :'String'
60
64
  }
61
65
  end
62
66
 
63
67
  # List of attributes with nullable: true
64
68
  def self.openapi_nullable
65
69
  Set.new([
66
- :'remote_id',
67
70
  :'account',
68
71
  :'net_amount',
69
72
  :'tracking_category',
70
73
  :'contact',
71
- :'description'
74
+ :'description',
75
+ :'remote_id'
72
76
  ])
73
77
  end
74
78
 
@@ -87,10 +91,6 @@ module MergeAccountingClient
87
91
  h[k.to_sym] = v
88
92
  }
89
93
 
90
- if attributes.key?(:'remote_id')
91
- self.remote_id = attributes[:'remote_id']
92
- end
93
-
94
94
  if attributes.key?(:'account')
95
95
  self.account = attributes[:'account']
96
96
  end
@@ -103,6 +103,12 @@ module MergeAccountingClient
103
103
  self.tracking_category = attributes[:'tracking_category']
104
104
  end
105
105
 
106
+ if attributes.key?(:'tracking_categories')
107
+ if (value = attributes[:'tracking_categories']).is_a?(Array)
108
+ self.tracking_categories = value
109
+ end
110
+ end
111
+
106
112
  if attributes.key?(:'contact')
107
113
  self.contact = attributes[:'contact']
108
114
  end
@@ -110,6 +116,10 @@ module MergeAccountingClient
110
116
  if attributes.key?(:'description')
111
117
  self.description = attributes[:'description']
112
118
  end
119
+
120
+ if attributes.key?(:'remote_id')
121
+ self.remote_id = attributes[:'remote_id']
122
+ end
113
123
  end
114
124
 
115
125
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -130,12 +140,13 @@ module MergeAccountingClient
130
140
  def ==(o)
131
141
  return true if self.equal?(o)
132
142
  self.class == o.class &&
133
- remote_id == o.remote_id &&
134
143
  account == o.account &&
135
144
  net_amount == o.net_amount &&
136
145
  tracking_category == o.tracking_category &&
146
+ tracking_categories == o.tracking_categories &&
137
147
  contact == o.contact &&
138
- description == o.description
148
+ description == o.description &&
149
+ remote_id == o.remote_id
139
150
  end
140
151
 
141
152
  # @see the `==` method
@@ -147,7 +158,7 @@ module MergeAccountingClient
147
158
  # Calculates hash code according to all attributes.
148
159
  # @return [Integer] Hash code
149
160
  def hash
150
- [remote_id, account, net_amount, tracking_category, contact, description].hash
161
+ [account, net_amount, tracking_category, tracking_categories, contact, description, remote_id].hash
151
162
  end
152
163
 
153
164
  # Builds the object from hash
@@ -16,30 +16,39 @@ require 'time'
16
16
  module MergeAccountingClient
17
17
  # # The JournalLine Object ### Description The `JournalLine` object is used to represent a journal entry's line items. ### Usage Example Fetch from the `GET JournalEntry` endpoint and view the journal entry's line items.
18
18
  class JournalLineRequest
19
- # The third-party API ID of the matching object.
20
- attr_accessor :remote_id
21
-
22
19
  attr_accessor :account
23
20
 
24
- # The line's net amount.
21
+ # The value of the line item including taxes and other fees.
25
22
  attr_accessor :net_amount
26
23
 
27
24
  attr_accessor :tracking_category
28
25
 
26
+ attr_accessor :tracking_categories
27
+
29
28
  attr_accessor :contact
30
29
 
31
30
  # The line's description.
32
31
  attr_accessor :description
33
32
 
33
+ # The third-party API ID of the matching object.
34
+ attr_accessor :remote_id
35
+
36
+ attr_accessor :integration_params
37
+
38
+ attr_accessor :linked_account_params
39
+
34
40
  # Attribute mapping from ruby-style variable name to JSON key.
35
41
  def self.attribute_map
36
42
  {
37
- :'remote_id' => :'remote_id',
38
43
  :'account' => :'account',
39
44
  :'net_amount' => :'net_amount',
40
45
  :'tracking_category' => :'tracking_category',
46
+ :'tracking_categories' => :'tracking_categories',
41
47
  :'contact' => :'contact',
42
- :'description' => :'description'
48
+ :'description' => :'description',
49
+ :'remote_id' => :'remote_id',
50
+ :'integration_params' => :'integration_params',
51
+ :'linked_account_params' => :'linked_account_params'
43
52
  }
44
53
  end
45
54
 
@@ -51,24 +60,29 @@ module MergeAccountingClient
51
60
  # Attribute type mapping.
52
61
  def self.openapi_types
53
62
  {
54
- :'remote_id' => :'String',
55
63
  :'account' => :'String',
56
64
  :'net_amount' => :'Float',
57
65
  :'tracking_category' => :'String',
66
+ :'tracking_categories' => :'Array<String>',
58
67
  :'contact' => :'String',
59
- :'description' => :'String'
68
+ :'description' => :'String',
69
+ :'remote_id' => :'String',
70
+ :'integration_params' => :'Hash<String, Object>',
71
+ :'linked_account_params' => :'Hash<String, Object>'
60
72
  }
61
73
  end
62
74
 
63
75
  # List of attributes with nullable: true
64
76
  def self.openapi_nullable
65
77
  Set.new([
66
- :'remote_id',
67
78
  :'account',
68
79
  :'net_amount',
69
80
  :'tracking_category',
70
81
  :'contact',
71
- :'description'
82
+ :'description',
83
+ :'remote_id',
84
+ :'integration_params',
85
+ :'linked_account_params'
72
86
  ])
73
87
  end
74
88
 
@@ -87,10 +101,6 @@ module MergeAccountingClient
87
101
  h[k.to_sym] = v
88
102
  }
89
103
 
90
- if attributes.key?(:'remote_id')
91
- self.remote_id = attributes[:'remote_id']
92
- end
93
-
94
104
  if attributes.key?(:'account')
95
105
  self.account = attributes[:'account']
96
106
  end
@@ -103,6 +113,12 @@ module MergeAccountingClient
103
113
  self.tracking_category = attributes[:'tracking_category']
104
114
  end
105
115
 
116
+ if attributes.key?(:'tracking_categories')
117
+ if (value = attributes[:'tracking_categories']).is_a?(Array)
118
+ self.tracking_categories = value
119
+ end
120
+ end
121
+
106
122
  if attributes.key?(:'contact')
107
123
  self.contact = attributes[:'contact']
108
124
  end
@@ -110,6 +126,22 @@ module MergeAccountingClient
110
126
  if attributes.key?(:'description')
111
127
  self.description = attributes[:'description']
112
128
  end
129
+
130
+ if attributes.key?(:'remote_id')
131
+ self.remote_id = attributes[:'remote_id']
132
+ end
133
+
134
+ if attributes.key?(:'integration_params')
135
+ if (value = attributes[:'integration_params']).is_a?(Hash)
136
+ self.integration_params = value
137
+ end
138
+ end
139
+
140
+ if attributes.key?(:'linked_account_params')
141
+ if (value = attributes[:'linked_account_params']).is_a?(Hash)
142
+ self.linked_account_params = value
143
+ end
144
+ end
113
145
  end
114
146
 
115
147
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -130,12 +162,15 @@ module MergeAccountingClient
130
162
  def ==(o)
131
163
  return true if self.equal?(o)
132
164
  self.class == o.class &&
133
- remote_id == o.remote_id &&
134
165
  account == o.account &&
135
166
  net_amount == o.net_amount &&
136
167
  tracking_category == o.tracking_category &&
168
+ tracking_categories == o.tracking_categories &&
137
169
  contact == o.contact &&
138
- description == o.description
170
+ description == o.description &&
171
+ remote_id == o.remote_id &&
172
+ integration_params == o.integration_params &&
173
+ linked_account_params == o.linked_account_params
139
174
  end
140
175
 
141
176
  # @see the `==` method
@@ -147,7 +182,7 @@ module MergeAccountingClient
147
182
  # Calculates hash code according to all attributes.
148
183
  # @return [Integer] Hash code
149
184
  def hash
150
- [remote_id, account, net_amount, tracking_category, contact, description].hash
185
+ [account, net_amount, tracking_category, tracking_categories, contact, description, remote_id, integration_params, linked_account_params].hash
151
186
  end
152
187
 
153
188
  # Builds the object from hash
@@ -86,10 +86,6 @@ module MergeAccountingClient
86
86
  invalid_properties.push('invalid value for "link_token", link_token cannot be nil.')
87
87
  end
88
88
 
89
- if @integration_name.nil?
90
- invalid_properties.push('invalid value for "integration_name", integration_name cannot be nil.')
91
- end
92
-
93
89
  invalid_properties
94
90
  end
95
91
 
@@ -97,7 +93,6 @@ module MergeAccountingClient
97
93
  # @return true if the model is valid
98
94
  def valid?
99
95
  return false if @link_token.nil?
100
- return false if @integration_name.nil?
101
96
  true
102
97
  end
103
98
 
@@ -0,0 +1,282 @@
1
+ =begin
2
+ #Merge Accounting API
3
+
4
+ #The unified API for building rich integrations with multiple Accounting & Finance platforms.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: hello@merge.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MergeAccountingClient
17
+ class LinkedAccountCondition
18
+ # The ID indicating which condition schema to use for a specific condition.
19
+ attr_accessor :condition_schema_id
20
+
21
+ # The common model for a specific condition.
22
+ attr_accessor :common_model
23
+
24
+ # User-facing *native condition* name. e.g. \"Skip Manager\".
25
+ attr_accessor :native_name
26
+
27
+ # The operator for a specific condition.
28
+ attr_accessor :operator
29
+
30
+ # The value for a condition.
31
+ attr_accessor :value
32
+
33
+ # The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. \"location_type\".
34
+ attr_accessor :field_name
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'condition_schema_id' => :'condition_schema_id',
40
+ :'common_model' => :'common_model',
41
+ :'native_name' => :'native_name',
42
+ :'operator' => :'operator',
43
+ :'value' => :'value',
44
+ :'field_name' => :'field_name'
45
+ }
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'condition_schema_id' => :'String',
57
+ :'common_model' => :'String',
58
+ :'native_name' => :'String',
59
+ :'operator' => :'String',
60
+ :'value' => :'Object',
61
+ :'field_name' => :'String'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ :'native_name',
69
+ :'value',
70
+ :'field_name'
71
+ ])
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeAccountingClient::LinkedAccountCondition` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ attributes = attributes.each_with_object({}) { |(k, v), h|
83
+ if (!self.class.attribute_map.key?(k.to_sym))
84
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeAccountingClient::LinkedAccountCondition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
85
+ end
86
+ h[k.to_sym] = v
87
+ }
88
+
89
+ if attributes.key?(:'condition_schema_id')
90
+ self.condition_schema_id = attributes[:'condition_schema_id']
91
+ end
92
+
93
+ if attributes.key?(:'common_model')
94
+ self.common_model = attributes[:'common_model']
95
+ end
96
+
97
+ if attributes.key?(:'native_name')
98
+ self.native_name = attributes[:'native_name']
99
+ end
100
+
101
+ if attributes.key?(:'operator')
102
+ self.operator = attributes[:'operator']
103
+ end
104
+
105
+ if attributes.key?(:'value')
106
+ self.value = attributes[:'value']
107
+ end
108
+
109
+ if attributes.key?(:'field_name')
110
+ self.field_name = attributes[:'field_name']
111
+ end
112
+ end
113
+
114
+ # Show invalid properties with the reasons. Usually used together with valid?
115
+ # @return Array for valid properties with the reasons
116
+ def list_invalid_properties
117
+ invalid_properties = Array.new
118
+ if @condition_schema_id.nil?
119
+ invalid_properties.push('invalid value for "condition_schema_id", condition_schema_id cannot be nil.')
120
+ end
121
+
122
+ if @operator.nil?
123
+ invalid_properties.push('invalid value for "operator", operator cannot be nil.')
124
+ end
125
+
126
+ invalid_properties
127
+ end
128
+
129
+ # Check to see if the all the properties in the model are valid
130
+ # @return true if the model is valid
131
+ def valid?
132
+ return false if @condition_schema_id.nil?
133
+ return false if @operator.nil?
134
+ true
135
+ end
136
+
137
+ # Checks equality by comparing each attribute.
138
+ # @param [Object] Object to be compared
139
+ def ==(o)
140
+ return true if self.equal?(o)
141
+ self.class == o.class &&
142
+ condition_schema_id == o.condition_schema_id &&
143
+ common_model == o.common_model &&
144
+ native_name == o.native_name &&
145
+ operator == o.operator &&
146
+ value == o.value &&
147
+ field_name == o.field_name
148
+ end
149
+
150
+ # @see the `==` method
151
+ # @param [Object] Object to be compared
152
+ def eql?(o)
153
+ self == o
154
+ end
155
+
156
+ # Calculates hash code according to all attributes.
157
+ # @return [Integer] Hash code
158
+ def hash
159
+ [condition_schema_id, common_model, native_name, operator, value, field_name].hash
160
+ end
161
+
162
+ # Builds the object from hash
163
+ # @param [Hash] attributes Model attributes in the form of hash
164
+ # @return [Object] Returns the model itself
165
+ def self.build_from_hash(attributes)
166
+ new.build_from_hash(attributes)
167
+ end
168
+
169
+ # Builds the object from hash
170
+ # @param [Hash] attributes Model attributes in the form of hash
171
+ # @return [Object] Returns the model itself
172
+ def build_from_hash(attributes)
173
+ return nil unless attributes.is_a?(Hash)
174
+ self.class.openapi_types.each_pair do |key, type|
175
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
176
+ self.send("#{key}=", nil)
177
+ elsif type =~ /\AArray<(.*)>/i
178
+ # check to ensure the input is an array given that the attribute
179
+ # is documented as an array but the input is not
180
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
181
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
182
+ end
183
+ elsif !attributes[self.class.attribute_map[key]].nil?
184
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
185
+ end
186
+ end
187
+
188
+ self
189
+ end
190
+
191
+ # Deserializes the data based on type
192
+ # @param string type Data type
193
+ # @param string value Value to be deserialized
194
+ # @return [Object] Deserialized data
195
+ def _deserialize(type, value)
196
+ case type.to_sym
197
+ when :Time
198
+ Time.parse(value)
199
+ when :Date
200
+ Date.parse(value)
201
+ when :String
202
+ value
203
+ when :Integer
204
+ value.to_i
205
+ when :Float
206
+ value.to_f
207
+ when :Boolean
208
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
209
+ true
210
+ else
211
+ false
212
+ end
213
+ when :Object
214
+ # generic object (usually a Hash), return directly
215
+ value
216
+ when /\AArray<(?<inner_type>.+)>\z/
217
+ inner_type = Regexp.last_match[:inner_type]
218
+ value.map { |v| _deserialize(inner_type, v) }
219
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
220
+ k_type = Regexp.last_match[:k_type]
221
+ v_type = Regexp.last_match[:v_type]
222
+ {}.tap do |hash|
223
+ value.each do |k, v|
224
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
225
+ end
226
+ end
227
+ else # model
228
+ # models (e.g. Pet) or oneOf
229
+ klass = MergeAccountingClient.const_get(type)
230
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
231
+ end
232
+ end
233
+
234
+ # Returns the string representation of the object
235
+ # @return [String] String presentation of the object
236
+ def to_s
237
+ to_hash.to_s
238
+ end
239
+
240
+ # to_body is an alias to to_hash (backward compatibility)
241
+ # @return [Hash] Returns the object in the form of hash
242
+ def to_body
243
+ to_hash
244
+ end
245
+
246
+ # Returns the object in the form of hash
247
+ # @return [Hash] Returns the object in the form of hash
248
+ def to_hash
249
+ hash = {}
250
+ self.class.attribute_map.each_pair do |attr, param|
251
+ value = self.send(attr)
252
+ if value.nil?
253
+ is_nullable = self.class.openapi_nullable.include?(attr)
254
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
255
+ end
256
+
257
+ hash[param] = _to_hash(value)
258
+ end
259
+ hash
260
+ end
261
+
262
+ # Outputs non-array value in the form of hash
263
+ # For object, use to_hash. Otherwise, just return the value
264
+ # @param [Object] value Any valid value
265
+ # @return [Hash] Returns the value in the form of hash
266
+ def _to_hash(value)
267
+ if value.is_a?(Array)
268
+ value.compact.map { |v| _to_hash(v) }
269
+ elsif value.is_a?(Hash)
270
+ {}.tap do |hash|
271
+ value.each { |k, v| hash[k] = _to_hash(v) }
272
+ end
273
+ elsif value.respond_to? :to_hash
274
+ value.to_hash
275
+ else
276
+ value
277
+ end
278
+ end
279
+
280
+ end
281
+
282
+ end