merge_accounting_client 1.0.8 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (242) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +238 -224
  3. data/docs/Account.md +5 -1
  4. data/docs/AccountIntegration.md +8 -2
  5. data/docs/AccountingAttachment.md +5 -1
  6. data/docs/AccountingPeriod.md +30 -0
  7. data/docs/AccountingPeriodStatusEnum.md +15 -0
  8. data/docs/AccountingPeriodsApi.md +167 -0
  9. data/docs/AccountingPhoneNumber.md +5 -1
  10. data/docs/AccountsApi.md +4 -4
  11. data/docs/Address.md +6 -2
  12. data/docs/AddressRequest.md +34 -0
  13. data/docs/AsyncPassthroughApi.md +155 -0
  14. data/docs/AsyncPassthroughReciept.md +18 -0
  15. data/docs/AttachmentsApi.md +4 -4
  16. data/docs/AuditLogEvent.md +32 -0
  17. data/docs/AuditTrailApi.md +91 -0
  18. data/docs/BalanceSheet.md +5 -1
  19. data/docs/BalanceSheetsApi.md +4 -4
  20. data/docs/CashFlowStatement.md +5 -1
  21. data/docs/CashFlowStatementsApi.md +4 -4
  22. data/docs/CompanyInfo.md +6 -2
  23. data/docs/CompanyInfoApi.md +4 -4
  24. data/docs/Contact.md +6 -2
  25. data/docs/ContactRequest.md +1 -1
  26. data/docs/ContactsApi.md +8 -4
  27. data/docs/CreditNote.md +14 -2
  28. data/docs/CreditNoteLineItem.md +9 -1
  29. data/docs/CreditNotesApi.md +6 -6
  30. data/docs/DeleteAccountApi.md +9 -9
  31. data/docs/EndUserDetailsRequest.md +2 -2
  32. data/docs/EventTypeEnum.md +15 -0
  33. data/docs/Expense.md +14 -2
  34. data/docs/ExpenseLine.md +11 -1
  35. data/docs/ExpenseLineRequest.md +2 -0
  36. data/docs/ExpenseRequest.md +9 -1
  37. data/docs/ExpensesApi.md +4 -4
  38. data/docs/ForceResyncApi.md +1 -1
  39. data/docs/IncomeStatement.md +5 -1
  40. data/docs/IncomeStatementsApi.md +4 -4
  41. data/docs/Invoice.md +18 -4
  42. data/docs/InvoiceLineItem.md +7 -1
  43. data/docs/InvoiceRequest.md +7 -1
  44. data/docs/InvoiceStatusEnum.md +15 -0
  45. data/docs/InvoicesApi.md +6 -6
  46. data/docs/Issue.md +2 -2
  47. data/docs/IssuesApi.md +6 -6
  48. data/docs/Item.md +5 -1
  49. data/docs/ItemsApi.md +4 -4
  50. data/docs/JournalEntriesApi.md +6 -6
  51. data/docs/JournalEntry.md +13 -1
  52. data/docs/JournalEntryRequest.md +4 -0
  53. data/docs/JournalLine.md +13 -1
  54. data/docs/JournalLineRequest.md +4 -0
  55. data/docs/LinkedAccountsApi.md +2 -2
  56. data/docs/MetaResponse.md +2 -2
  57. data/docs/PaginatedAccountingPeriodList.md +22 -0
  58. data/docs/PaginatedAuditLogEventList.md +22 -0
  59. data/docs/Payment.md +11 -1
  60. data/docs/PaymentLineItem.md +32 -0
  61. data/docs/PaymentLineItemRequest.md +30 -0
  62. data/docs/PaymentRequest.md +6 -0
  63. data/docs/PaymentsApi.md +4 -4
  64. data/docs/PurchaseOrder.md +13 -3
  65. data/docs/PurchaseOrderLineItem.md +9 -1
  66. data/docs/PurchaseOrderRequest.md +2 -0
  67. data/docs/PurchaseOrdersApi.md +6 -6
  68. data/docs/RemoteData.md +1 -1
  69. data/docs/ReportItem.md +5 -1
  70. data/docs/RoleEnum.md +15 -0
  71. data/docs/SyncStatus.md +1 -1
  72. data/docs/SyncStatusApi.md +15 -11
  73. data/docs/TaxRate.md +5 -1
  74. data/docs/TaxRatesApi.md +4 -4
  75. data/docs/TrackingCategoriesApi.md +4 -4
  76. data/docs/TrackingCategory.md +5 -1
  77. data/docs/Transaction.md +9 -3
  78. data/docs/TransactionLineItem.md +9 -1
  79. data/docs/TransactionsApi.md +4 -4
  80. data/docs/VendorCredit.md +10 -2
  81. data/docs/VendorCreditLine.md +9 -1
  82. data/docs/VendorCreditsApi.md +6 -6
  83. data/git_push.sh +58 -0
  84. data/lib/merge_accounting_client/api/accounting_periods_api.rb +167 -0
  85. data/lib/merge_accounting_client/api/accounts_api.rb +4 -4
  86. data/lib/merge_accounting_client/api/async_passthrough_api.rb +160 -0
  87. data/lib/merge_accounting_client/api/attachments_api.rb +4 -4
  88. data/lib/merge_accounting_client/api/audit_trail_api.rb +95 -0
  89. data/lib/merge_accounting_client/api/balance_sheets_api.rb +4 -4
  90. data/lib/merge_accounting_client/api/cash_flow_statements_api.rb +4 -4
  91. data/lib/merge_accounting_client/api/company_info_api.rb +4 -4
  92. data/lib/merge_accounting_client/api/contacts_api.rb +10 -4
  93. data/lib/merge_accounting_client/api/credit_notes_api.rb +6 -6
  94. data/lib/merge_accounting_client/api/delete_account_api.rb +7 -7
  95. data/lib/merge_accounting_client/api/expenses_api.rb +6 -6
  96. data/lib/merge_accounting_client/api/force_resync_api.rb +2 -2
  97. data/lib/merge_accounting_client/api/income_statements_api.rb +4 -4
  98. data/lib/merge_accounting_client/api/invoices_api.rb +6 -6
  99. data/lib/merge_accounting_client/api/issues_api.rb +6 -6
  100. data/lib/merge_accounting_client/api/items_api.rb +4 -4
  101. data/lib/merge_accounting_client/api/journal_entries_api.rb +6 -6
  102. data/lib/merge_accounting_client/api/linked_accounts_api.rb +3 -3
  103. data/lib/merge_accounting_client/api/payments_api.rb +6 -6
  104. data/lib/merge_accounting_client/api/purchase_orders_api.rb +6 -6
  105. data/lib/merge_accounting_client/api/sync_status_api.rb +2 -2
  106. data/lib/merge_accounting_client/api/tax_rates_api.rb +4 -4
  107. data/lib/merge_accounting_client/api/tracking_categories_api.rb +4 -4
  108. data/lib/merge_accounting_client/api/transactions_api.rb +6 -6
  109. data/lib/merge_accounting_client/api/vendor_credits_api.rb +6 -6
  110. data/lib/merge_accounting_client/configuration.rb +4 -0
  111. data/lib/merge_accounting_client/models/account.rb +22 -3
  112. data/lib/merge_accounting_client/models/account_integration.rb +37 -4
  113. data/lib/merge_accounting_client/models/account_request.rb +1 -1
  114. data/lib/merge_accounting_client/models/accounting_attachment.rb +21 -2
  115. data/lib/merge_accounting_client/models/accounting_period.rb +296 -0
  116. data/lib/merge_accounting_client/models/accounting_period_status_enum.rb +45 -0
  117. data/lib/merge_accounting_client/models/accounting_phone_number.rb +24 -5
  118. data/lib/merge_accounting_client/models/address.rb +24 -5
  119. data/lib/merge_accounting_client/models/address_request.rb +311 -0
  120. data/lib/merge_accounting_client/models/async_passthrough_reciept.rb +223 -0
  121. data/lib/merge_accounting_client/models/audit_log_event.rb +356 -0
  122. data/lib/merge_accounting_client/models/balance_sheet.rb +21 -2
  123. data/lib/merge_accounting_client/models/cash_flow_statement.rb +21 -2
  124. data/lib/merge_accounting_client/models/company_info.rb +22 -3
  125. data/lib/merge_accounting_client/models/contact.rb +23 -4
  126. data/lib/merge_accounting_client/models/contact_request.rb +2 -2
  127. data/lib/merge_accounting_client/models/credit_note.rb +84 -3
  128. data/lib/merge_accounting_client/models/credit_note_line_item.rb +43 -5
  129. data/lib/merge_accounting_client/models/end_user_details_request.rb +2 -2
  130. data/lib/merge_accounting_client/models/event_type_enum.rb +67 -0
  131. data/lib/merge_accounting_client/models/expense.rb +66 -3
  132. data/lib/merge_accounting_client/models/expense_line.rb +54 -5
  133. data/lib/merge_accounting_client/models/expense_line_request.rb +12 -1
  134. data/lib/merge_accounting_client/models/expense_request.rb +46 -2
  135. data/lib/merge_accounting_client/models/income_statement.rb +21 -2
  136. data/lib/merge_accounting_client/models/invoice.rb +84 -9
  137. data/lib/merge_accounting_client/models/invoice_line_item.rb +31 -2
  138. data/lib/merge_accounting_client/models/invoice_line_item_request.rb +1 -1
  139. data/lib/merge_accounting_client/models/invoice_request.rb +35 -2
  140. data/lib/merge_accounting_client/models/invoice_status_enum.rb +49 -0
  141. data/lib/merge_accounting_client/models/issue.rb +1 -0
  142. data/lib/merge_accounting_client/models/item.rb +21 -2
  143. data/lib/merge_accounting_client/models/journal_entry.rb +81 -2
  144. data/lib/merge_accounting_client/models/journal_entry_request.rb +38 -1
  145. data/lib/merge_accounting_client/models/journal_line.rb +65 -5
  146. data/lib/merge_accounting_client/models/journal_line_request.rb +23 -1
  147. data/lib/merge_accounting_client/models/paginated_accounting_period_list.rb +240 -0
  148. data/lib/merge_accounting_client/models/paginated_audit_log_event_list.rb +240 -0
  149. data/lib/merge_accounting_client/models/payment.rb +55 -2
  150. data/lib/merge_accounting_client/models/payment_line_item.rb +308 -0
  151. data/lib/merge_accounting_client/models/payment_line_item_request.rb +319 -0
  152. data/lib/merge_accounting_client/models/payment_request.rb +35 -1
  153. data/lib/merge_accounting_client/models/purchase_order.rb +70 -3
  154. data/lib/merge_accounting_client/models/purchase_order_line_item.rb +43 -5
  155. data/lib/merge_accounting_client/models/purchase_order_request.rb +12 -1
  156. data/lib/merge_accounting_client/models/remote_data.rb +3 -4
  157. data/lib/merge_accounting_client/models/report_item.rb +24 -5
  158. data/lib/merge_accounting_client/models/role_enum.rb +49 -0
  159. data/lib/merge_accounting_client/models/sync_status_status_enum.rb +1 -1
  160. data/lib/merge_accounting_client/models/tax_rate.rb +21 -2
  161. data/lib/merge_accounting_client/models/tracking_category.rb +22 -3
  162. data/lib/merge_accounting_client/models/transaction.rb +33 -3
  163. data/lib/merge_accounting_client/models/transaction_line_item.rb +43 -5
  164. data/lib/merge_accounting_client/models/vendor_credit.rb +44 -3
  165. data/lib/merge_accounting_client/models/vendor_credit_line.rb +43 -5
  166. data/lib/merge_accounting_client/version.rb +1 -1
  167. data/lib/merge_accounting_client.rb +15 -7
  168. data/spec/api/accounting_periods_api_spec.rb +63 -0
  169. data/spec/api/accounts_api_spec.rb +2 -2
  170. data/spec/api/async_passthrough_api_spec.rb +59 -0
  171. data/spec/api/attachments_api_spec.rb +2 -2
  172. data/spec/api/audit_trail_api_spec.rb +51 -0
  173. data/spec/api/balance_sheets_api_spec.rb +2 -2
  174. data/spec/api/cash_flow_statements_api_spec.rb +2 -2
  175. data/spec/api/company_info_api_spec.rb +2 -2
  176. data/spec/api/contacts_api_spec.rb +4 -2
  177. data/spec/api/credit_notes_api_spec.rb +2 -2
  178. data/spec/api/delete_account_api_spec.rb +2 -2
  179. data/spec/api/expenses_api_spec.rb +2 -2
  180. data/spec/api/force_resync_api_spec.rb +1 -1
  181. data/spec/api/income_statements_api_spec.rb +2 -2
  182. data/spec/api/invoices_api_spec.rb +2 -2
  183. data/spec/api/issues_api_spec.rb +3 -3
  184. data/spec/api/items_api_spec.rb +2 -2
  185. data/spec/api/journal_entries_api_spec.rb +2 -2
  186. data/spec/api/linked_accounts_api_spec.rb +1 -1
  187. data/spec/api/payments_api_spec.rb +2 -2
  188. data/spec/api/purchase_orders_api_spec.rb +2 -2
  189. data/spec/api/sync_status_api_spec.rb +1 -1
  190. data/spec/api/tax_rates_api_spec.rb +2 -2
  191. data/spec/api/tracking_categories_api_spec.rb +2 -2
  192. data/spec/api/transactions_api_spec.rb +2 -2
  193. data/spec/api/vendor_credits_api_spec.rb +2 -2
  194. data/spec/models/account_integration_spec.rb +18 -0
  195. data/spec/models/account_spec.rb +12 -0
  196. data/spec/models/accounting_attachment_spec.rb +12 -0
  197. data/spec/models/accounting_period_spec.rb +70 -0
  198. data/spec/models/accounting_period_status_enum_spec.rb +28 -0
  199. data/spec/models/accounting_phone_number_spec.rb +12 -0
  200. data/spec/models/address_request_spec.rb +82 -0
  201. data/spec/models/address_spec.rb +12 -0
  202. data/spec/models/async_passthrough_reciept_spec.rb +34 -0
  203. data/spec/models/audit_log_event_spec.rb +76 -0
  204. data/spec/models/balance_sheet_spec.rb +12 -0
  205. data/spec/models/cash_flow_statement_spec.rb +12 -0
  206. data/spec/models/company_info_spec.rb +12 -0
  207. data/spec/models/contact_spec.rb +12 -0
  208. data/spec/models/credit_note_line_item_spec.rb +24 -0
  209. data/spec/models/credit_note_spec.rb +36 -0
  210. data/spec/models/event_type_enum_spec.rb +28 -0
  211. data/spec/models/expense_line_request_spec.rb +6 -0
  212. data/spec/models/expense_line_spec.rb +30 -0
  213. data/spec/models/expense_request_spec.rb +24 -0
  214. data/spec/models/expense_spec.rb +36 -0
  215. data/spec/models/income_statement_spec.rb +12 -0
  216. data/spec/models/invoice_line_item_spec.rb +18 -0
  217. data/spec/models/invoice_request_spec.rb +18 -0
  218. data/spec/models/invoice_spec.rb +43 -1
  219. data/spec/models/invoice_status_enum_spec.rb +28 -0
  220. data/spec/models/item_spec.rb +12 -0
  221. data/spec/models/journal_entry_request_spec.rb +12 -0
  222. data/spec/models/journal_entry_spec.rb +36 -0
  223. data/spec/models/journal_line_request_spec.rb +12 -0
  224. data/spec/models/journal_line_spec.rb +36 -0
  225. data/spec/models/paginated_accounting_period_list_spec.rb +46 -0
  226. data/spec/models/paginated_audit_log_event_list_spec.rb +46 -0
  227. data/spec/models/payment_line_item_request_spec.rb +70 -0
  228. data/spec/models/payment_line_item_spec.rb +76 -0
  229. data/spec/models/payment_request_spec.rb +18 -0
  230. data/spec/models/payment_spec.rb +30 -0
  231. data/spec/models/purchase_order_line_item_spec.rb +24 -0
  232. data/spec/models/purchase_order_request_spec.rb +6 -0
  233. data/spec/models/purchase_order_spec.rb +30 -0
  234. data/spec/models/report_item_spec.rb +12 -0
  235. data/spec/models/role_enum_spec.rb +28 -0
  236. data/spec/models/tax_rate_spec.rb +12 -0
  237. data/spec/models/tracking_category_spec.rb +12 -0
  238. data/spec/models/transaction_line_item_spec.rb +24 -0
  239. data/spec/models/transaction_spec.rb +18 -0
  240. data/spec/models/vendor_credit_line_spec.rb +24 -0
  241. data/spec/models/vendor_credit_spec.rb +24 -0
  242. metadata +211 -150
@@ -0,0 +1,356 @@
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 AuditLogEvent
18
+ attr_accessor :id
19
+
20
+ # The User's full name at the time of this Event occurring.
21
+ attr_accessor :user_name
22
+
23
+ # The User's email at the time of this Event occurring.
24
+ attr_accessor :user_email
25
+
26
+ # Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. * `ADMIN` - ADMIN * `DEVELOPER` - DEVELOPER * `MEMBER` - MEMBER * `API` - API * `SYSTEM` - SYSTEM * `MERGE_TEAM` - MERGE_TEAM
27
+ attr_accessor :role
28
+
29
+ attr_accessor :ip_address
30
+
31
+ # Designates the type of event that occurred. * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY * `INVITED_USER` - INVITED_USER * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT * `CREATED_DESTINATION` - CREATED_DESTINATION * `DELETED_DESTINATION` - DELETED_DESTINATION * `CHANGED_SCOPES` - CHANGED_SCOPES * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION * `ENABLED_CATEGORY` - ENABLED_CATEGORY * `DISABLED_CATEGORY` - DISABLED_CATEGORY * `CHANGED_PASSWORD` - CHANGED_PASSWORD * `RESET_PASSWORD` - RESET_PASSWORD * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
32
+ attr_accessor :event_type
33
+
34
+ attr_accessor :event_description
35
+
36
+ attr_accessor :created_at
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'id' => :'id',
42
+ :'user_name' => :'user_name',
43
+ :'user_email' => :'user_email',
44
+ :'role' => :'role',
45
+ :'ip_address' => :'ip_address',
46
+ :'event_type' => :'event_type',
47
+ :'event_description' => :'event_description',
48
+ :'created_at' => :'created_at'
49
+ }
50
+ end
51
+
52
+ # Returns all the JSON keys this model knows about
53
+ def self.acceptable_attributes
54
+ attribute_map.values
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.openapi_types
59
+ {
60
+ :'id' => :'String',
61
+ :'user_name' => :'String',
62
+ :'user_email' => :'String',
63
+ :'role' => :'RoleEnum',
64
+ :'ip_address' => :'String',
65
+ :'event_type' => :'EventTypeEnum',
66
+ :'event_description' => :'String',
67
+ :'created_at' => :'Time'
68
+ }
69
+ end
70
+
71
+ # List of attributes with nullable: true
72
+ def self.openapi_nullable
73
+ Set.new([
74
+ :'user_name',
75
+ :'user_email',
76
+ ])
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ if (!attributes.is_a?(Hash))
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeAccountingClient::AuditLogEvent` initialize method"
84
+ end
85
+
86
+ # check to see if the attribute exists and convert string to symbol for hash key
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!self.class.attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeAccountingClient::AuditLogEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'id')
95
+ self.id = attributes[:'id']
96
+ end
97
+
98
+ if attributes.key?(:'user_name')
99
+ self.user_name = attributes[:'user_name']
100
+ end
101
+
102
+ if attributes.key?(:'user_email')
103
+ self.user_email = attributes[:'user_email']
104
+ end
105
+
106
+ if attributes.key?(:'role')
107
+ self.role = attributes[:'role']
108
+ end
109
+
110
+ if attributes.key?(:'ip_address')
111
+ self.ip_address = attributes[:'ip_address']
112
+ end
113
+
114
+ if attributes.key?(:'event_type')
115
+ self.event_type = attributes[:'event_type']
116
+ end
117
+
118
+ if attributes.key?(:'event_description')
119
+ self.event_description = attributes[:'event_description']
120
+ end
121
+
122
+ if attributes.key?(:'created_at')
123
+ self.created_at = attributes[:'created_at']
124
+ end
125
+ end
126
+
127
+ # Show invalid properties with the reasons. Usually used together with valid?
128
+ # @return Array for valid properties with the reasons
129
+ def list_invalid_properties
130
+ invalid_properties = Array.new
131
+ if !@user_name.nil? && @user_name.to_s.length > 200
132
+ invalid_properties.push('invalid value for "user_name", the character length must be smaller than or equal to 200.')
133
+ end
134
+
135
+ if !@user_email.nil? && @user_email.to_s.length > 254
136
+ invalid_properties.push('invalid value for "user_email", the character length must be smaller than or equal to 254.')
137
+ end
138
+
139
+ if @role.nil?
140
+ invalid_properties.push('invalid value for "role", role cannot be nil.')
141
+ end
142
+
143
+ if @ip_address.nil?
144
+ invalid_properties.push('invalid value for "ip_address", ip_address cannot be nil.')
145
+ end
146
+
147
+ if @ip_address.to_s.length > 45
148
+ invalid_properties.push('invalid value for "ip_address", the character length must be smaller than or equal to 45.')
149
+ end
150
+
151
+ if @event_type.nil?
152
+ invalid_properties.push('invalid value for "event_type", event_type cannot be nil.')
153
+ end
154
+
155
+ if @event_description.nil?
156
+ invalid_properties.push('invalid value for "event_description", event_description cannot be nil.')
157
+ end
158
+
159
+ invalid_properties
160
+ end
161
+
162
+ # Check to see if the all the properties in the model are valid
163
+ # @return true if the model is valid
164
+ def valid?
165
+ return false if !@user_name.nil? && @user_name.to_s.length > 200
166
+ return false if !@user_email.nil? && @user_email.to_s.length > 254
167
+ return false if @role.nil?
168
+ return false if @ip_address.nil?
169
+ return false if @ip_address.to_s.length > 45
170
+ return false if @event_type.nil?
171
+ return false if @event_description.nil?
172
+ true
173
+ end
174
+
175
+ # Custom attribute writer method with validation
176
+ # @param [Object] user_name Value to be assigned
177
+ def user_name=(user_name)
178
+ if !user_name.nil? && user_name.to_s.length > 200
179
+ fail ArgumentError, 'invalid value for "user_name", the character length must be smaller than or equal to 200.'
180
+ end
181
+
182
+ @user_name = user_name
183
+ end
184
+
185
+ # Custom attribute writer method with validation
186
+ # @param [Object] user_email Value to be assigned
187
+ def user_email=(user_email)
188
+ if !user_email.nil? && user_email.to_s.length > 254
189
+ fail ArgumentError, 'invalid value for "user_email", the character length must be smaller than or equal to 254.'
190
+ end
191
+
192
+ @user_email = user_email
193
+ end
194
+
195
+ # Custom attribute writer method with validation
196
+ # @param [Object] ip_address Value to be assigned
197
+ def ip_address=(ip_address)
198
+ if ip_address.nil?
199
+ fail ArgumentError, 'ip_address cannot be nil'
200
+ end
201
+
202
+ if ip_address.to_s.length > 45
203
+ fail ArgumentError, 'invalid value for "ip_address", the character length must be smaller than or equal to 45.'
204
+ end
205
+
206
+ @ip_address = ip_address
207
+ end
208
+
209
+ # Checks equality by comparing each attribute.
210
+ # @param [Object] Object to be compared
211
+ def ==(o)
212
+ return true if self.equal?(o)
213
+ self.class == o.class &&
214
+ id == o.id &&
215
+ user_name == o.user_name &&
216
+ user_email == o.user_email &&
217
+ role == o.role &&
218
+ ip_address == o.ip_address &&
219
+ event_type == o.event_type &&
220
+ event_description == o.event_description &&
221
+ created_at == o.created_at
222
+ end
223
+
224
+ # @see the `==` method
225
+ # @param [Object] Object to be compared
226
+ def eql?(o)
227
+ self == o
228
+ end
229
+
230
+ # Calculates hash code according to all attributes.
231
+ # @return [Integer] Hash code
232
+ def hash
233
+ [id, user_name, user_email, role, ip_address, event_type, event_description, created_at].hash
234
+ end
235
+
236
+ # Builds the object from hash
237
+ # @param [Hash] attributes Model attributes in the form of hash
238
+ # @return [Object] Returns the model itself
239
+ def self.build_from_hash(attributes)
240
+ new.build_from_hash(attributes)
241
+ end
242
+
243
+ # Builds the object from hash
244
+ # @param [Hash] attributes Model attributes in the form of hash
245
+ # @return [Object] Returns the model itself
246
+ def build_from_hash(attributes)
247
+ return nil unless attributes.is_a?(Hash)
248
+ self.class.openapi_types.each_pair do |key, type|
249
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
250
+ self.send("#{key}=", nil)
251
+ elsif type =~ /\AArray<(.*)>/i
252
+ # check to ensure the input is an array given that the attribute
253
+ # is documented as an array but the input is not
254
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
255
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
256
+ end
257
+ elsif !attributes[self.class.attribute_map[key]].nil?
258
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
259
+ end
260
+ end
261
+
262
+ self
263
+ end
264
+
265
+ # Deserializes the data based on type
266
+ # @param string type Data type
267
+ # @param string value Value to be deserialized
268
+ # @return [Object] Deserialized data
269
+ def _deserialize(type, value)
270
+ case type.to_sym
271
+ when :Time
272
+ Time.parse(value)
273
+ when :Date
274
+ Date.parse(value)
275
+ when :String
276
+ value
277
+ when :Integer
278
+ value.to_i
279
+ when :Float
280
+ value.to_f
281
+ when :Boolean
282
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
283
+ true
284
+ else
285
+ false
286
+ end
287
+ when :Object
288
+ # generic object (usually a Hash), return directly
289
+ value
290
+ when /\AArray<(?<inner_type>.+)>\z/
291
+ inner_type = Regexp.last_match[:inner_type]
292
+ value.map { |v| _deserialize(inner_type, v) }
293
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
294
+ k_type = Regexp.last_match[:k_type]
295
+ v_type = Regexp.last_match[:v_type]
296
+ {}.tap do |hash|
297
+ value.each do |k, v|
298
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
299
+ end
300
+ end
301
+ else # model
302
+ # models (e.g. Pet) or oneOf
303
+ klass = MergeAccountingClient.const_get(type)
304
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
305
+ end
306
+ end
307
+
308
+ # Returns the string representation of the object
309
+ # @return [String] String presentation of the object
310
+ def to_s
311
+ to_hash.to_s
312
+ end
313
+
314
+ # to_body is an alias to to_hash (backward compatibility)
315
+ # @return [Hash] Returns the object in the form of hash
316
+ def to_body
317
+ to_hash
318
+ end
319
+
320
+ # Returns the object in the form of hash
321
+ # @return [Hash] Returns the object in the form of hash
322
+ def to_hash
323
+ hash = {}
324
+ self.class.attribute_map.each_pair do |attr, param|
325
+ value = self.send(attr)
326
+ if value.nil?
327
+ is_nullable = self.class.openapi_nullable.include?(attr)
328
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
329
+ end
330
+
331
+ hash[param] = _to_hash(value)
332
+ end
333
+ hash
334
+ end
335
+
336
+ # Outputs non-array value in the form of hash
337
+ # For object, use to_hash. Otherwise, just return the value
338
+ # @param [Object] value Any valid value
339
+ # @return [Hash] Returns the value in the form of hash
340
+ def _to_hash(value)
341
+ if value.is_a?(Array)
342
+ value.compact.map { |v| _to_hash(v) }
343
+ elsif value.is_a?(Hash)
344
+ {}.tap do |hash|
345
+ value.each { |k, v| hash[k] = _to_hash(v) }
346
+ end
347
+ elsif value.respond_to? :to_hash
348
+ value.to_hash
349
+ else
350
+ value
351
+ end
352
+ end
353
+
354
+ end
355
+
356
+ end
@@ -45,9 +45,14 @@ module MergeAccountingClient
45
45
  # The time that balance sheet was generated by the accounting system.
46
46
  attr_accessor :remote_generated_at
47
47
 
48
- # Indicates whether or not this object has been deleted by third party webhooks.
48
+ # Indicates whether or not this object has been deleted in the third party platform.
49
49
  attr_accessor :remote_was_deleted
50
50
 
51
+ attr_accessor :created_at
52
+
53
+ # This is the datetime that this object was last updated by Merge
54
+ attr_accessor :modified_at
55
+
51
56
  attr_accessor :field_mappings
52
57
 
53
58
  attr_accessor :remote_data
@@ -67,6 +72,8 @@ module MergeAccountingClient
67
72
  :'equity' => :'equity',
68
73
  :'remote_generated_at' => :'remote_generated_at',
69
74
  :'remote_was_deleted' => :'remote_was_deleted',
75
+ :'created_at' => :'created_at',
76
+ :'modified_at' => :'modified_at',
70
77
  :'field_mappings' => :'field_mappings',
71
78
  :'remote_data' => :'remote_data'
72
79
  }
@@ -92,6 +99,8 @@ module MergeAccountingClient
92
99
  :'equity' => :'Array<ReportItem>',
93
100
  :'remote_generated_at' => :'Time',
94
101
  :'remote_was_deleted' => :'Boolean',
102
+ :'created_at' => :'Time',
103
+ :'modified_at' => :'Time',
95
104
  :'field_mappings' => :'Hash<String, Object>',
96
105
  :'remote_data' => :'Array<RemoteData>'
97
106
  }
@@ -181,6 +190,14 @@ module MergeAccountingClient
181
190
  self.remote_was_deleted = attributes[:'remote_was_deleted']
182
191
  end
183
192
 
193
+ if attributes.key?(:'created_at')
194
+ self.created_at = attributes[:'created_at']
195
+ end
196
+
197
+ if attributes.key?(:'modified_at')
198
+ self.modified_at = attributes[:'modified_at']
199
+ end
200
+
184
201
  if attributes.key?(:'field_mappings')
185
202
  if (value = attributes[:'field_mappings']).is_a?(Hash)
186
203
  self.field_mappings = value
@@ -224,6 +241,8 @@ module MergeAccountingClient
224
241
  equity == o.equity &&
225
242
  remote_generated_at == o.remote_generated_at &&
226
243
  remote_was_deleted == o.remote_was_deleted &&
244
+ created_at == o.created_at &&
245
+ modified_at == o.modified_at &&
227
246
  field_mappings == o.field_mappings &&
228
247
  remote_data == o.remote_data
229
248
  end
@@ -237,7 +256,7 @@ module MergeAccountingClient
237
256
  # Calculates hash code according to all attributes.
238
257
  # @return [Integer] Hash code
239
258
  def hash
240
- [id, remote_id, name, currency, company, date, net_assets, assets, liabilities, equity, remote_generated_at, remote_was_deleted, field_mappings, remote_data].hash
259
+ [id, remote_id, name, currency, company, date, net_assets, assets, liabilities, equity, remote_generated_at, remote_was_deleted, created_at, modified_at, field_mappings, remote_data].hash
241
260
  end
242
261
 
243
262
  # Builds the object from hash
@@ -51,9 +51,14 @@ module MergeAccountingClient
51
51
  # The time that cash flow statement was generated by the accounting system.
52
52
  attr_accessor :remote_generated_at
53
53
 
54
- # Indicates whether or not this object has been deleted by third party webhooks.
54
+ # Indicates whether or not this object has been deleted in the third party platform.
55
55
  attr_accessor :remote_was_deleted
56
56
 
57
+ attr_accessor :created_at
58
+
59
+ # This is the datetime that this object was last updated by Merge
60
+ attr_accessor :modified_at
61
+
57
62
  attr_accessor :field_mappings
58
63
 
59
64
  attr_accessor :remote_data
@@ -75,6 +80,8 @@ module MergeAccountingClient
75
80
  :'financing_activities' => :'financing_activities',
76
81
  :'remote_generated_at' => :'remote_generated_at',
77
82
  :'remote_was_deleted' => :'remote_was_deleted',
83
+ :'created_at' => :'created_at',
84
+ :'modified_at' => :'modified_at',
78
85
  :'field_mappings' => :'field_mappings',
79
86
  :'remote_data' => :'remote_data'
80
87
  }
@@ -102,6 +109,8 @@ module MergeAccountingClient
102
109
  :'financing_activities' => :'Array<ReportItem>',
103
110
  :'remote_generated_at' => :'Time',
104
111
  :'remote_was_deleted' => :'Boolean',
112
+ :'created_at' => :'Time',
113
+ :'modified_at' => :'Time',
105
114
  :'field_mappings' => :'Hash<String, Object>',
106
115
  :'remote_data' => :'Array<RemoteData>'
107
116
  }
@@ -201,6 +210,14 @@ module MergeAccountingClient
201
210
  self.remote_was_deleted = attributes[:'remote_was_deleted']
202
211
  end
203
212
 
213
+ if attributes.key?(:'created_at')
214
+ self.created_at = attributes[:'created_at']
215
+ end
216
+
217
+ if attributes.key?(:'modified_at')
218
+ self.modified_at = attributes[:'modified_at']
219
+ end
220
+
204
221
  if attributes.key?(:'field_mappings')
205
222
  if (value = attributes[:'field_mappings']).is_a?(Hash)
206
223
  self.field_mappings = value
@@ -246,6 +263,8 @@ module MergeAccountingClient
246
263
  financing_activities == o.financing_activities &&
247
264
  remote_generated_at == o.remote_generated_at &&
248
265
  remote_was_deleted == o.remote_was_deleted &&
266
+ created_at == o.created_at &&
267
+ modified_at == o.modified_at &&
249
268
  field_mappings == o.field_mappings &&
250
269
  remote_data == o.remote_data
251
270
  end
@@ -259,7 +278,7 @@ module MergeAccountingClient
259
278
  # Calculates hash code according to all attributes.
260
279
  # @return [Integer] Hash code
261
280
  def hash
262
- [id, remote_id, name, currency, company, start_period, end_period, cash_at_beginning_of_period, cash_at_end_of_period, operating_activities, investing_activities, financing_activities, remote_generated_at, remote_was_deleted, field_mappings, remote_data].hash
281
+ [id, remote_id, name, currency, company, start_period, end_period, cash_at_beginning_of_period, cash_at_end_of_period, operating_activities, investing_activities, financing_activities, remote_generated_at, remote_was_deleted, created_at, modified_at, field_mappings, remote_data].hash
263
282
  end
264
283
 
265
284
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeAccountingClient
17
- # # The CompanyInfo Object ### Description The `CompanyInfo` object is used to represent a company's information. ### Usage Example Fetch from the `GET CompanyInfo` endpoint and view a company's information.
17
+ # # The CompanyInfo Object ### Description The `CompanyInfo` object contains information about the company of the linked account. If the company has multiple entities (also known as subsidiaries), each entity may show up as a single `CompanyInfo` record. ### Usage Example Fetch from the `GET CompanyInfo` endpoint and view a company's information.
18
18
  class CompanyInfo
19
19
  attr_accessor :id
20
20
 
@@ -49,9 +49,14 @@ module MergeAccountingClient
49
49
 
50
50
  attr_accessor :phone_numbers
51
51
 
52
- # Indicates whether or not this object has been deleted by third party webhooks.
52
+ # Indicates whether or not this object has been deleted in the third party platform.
53
53
  attr_accessor :remote_was_deleted
54
54
 
55
+ attr_accessor :created_at
56
+
57
+ # This is the datetime that this object was last updated by Merge
58
+ attr_accessor :modified_at
59
+
55
60
  attr_accessor :field_mappings
56
61
 
57
62
  attr_accessor :remote_data
@@ -72,6 +77,8 @@ module MergeAccountingClient
72
77
  :'addresses' => :'addresses',
73
78
  :'phone_numbers' => :'phone_numbers',
74
79
  :'remote_was_deleted' => :'remote_was_deleted',
80
+ :'created_at' => :'created_at',
81
+ :'modified_at' => :'modified_at',
75
82
  :'field_mappings' => :'field_mappings',
76
83
  :'remote_data' => :'remote_data'
77
84
  }
@@ -98,6 +105,8 @@ module MergeAccountingClient
98
105
  :'addresses' => :'Array<Address>',
99
106
  :'phone_numbers' => :'Array<AccountingPhoneNumber>',
100
107
  :'remote_was_deleted' => :'Boolean',
108
+ :'created_at' => :'Time',
109
+ :'modified_at' => :'Time',
101
110
  :'field_mappings' => :'Hash<String, Object>',
102
111
  :'remote_data' => :'Array<RemoteData>'
103
112
  }
@@ -193,6 +202,14 @@ module MergeAccountingClient
193
202
  self.remote_was_deleted = attributes[:'remote_was_deleted']
194
203
  end
195
204
 
205
+ if attributes.key?(:'created_at')
206
+ self.created_at = attributes[:'created_at']
207
+ end
208
+
209
+ if attributes.key?(:'modified_at')
210
+ self.modified_at = attributes[:'modified_at']
211
+ end
212
+
196
213
  if attributes.key?(:'field_mappings')
197
214
  if (value = attributes[:'field_mappings']).is_a?(Hash)
198
215
  self.field_mappings = value
@@ -285,6 +302,8 @@ module MergeAccountingClient
285
302
  addresses == o.addresses &&
286
303
  phone_numbers == o.phone_numbers &&
287
304
  remote_was_deleted == o.remote_was_deleted &&
305
+ created_at == o.created_at &&
306
+ modified_at == o.modified_at &&
288
307
  field_mappings == o.field_mappings &&
289
308
  remote_data == o.remote_data
290
309
  end
@@ -298,7 +317,7 @@ module MergeAccountingClient
298
317
  # Calculates hash code according to all attributes.
299
318
  # @return [Integer] Hash code
300
319
  def hash
301
- [id, remote_id, name, legal_name, tax_number, fiscal_year_end_month, fiscal_year_end_day, currency, remote_created_at, urls, addresses, phone_numbers, remote_was_deleted, field_mappings, remote_data].hash
320
+ [id, remote_id, name, legal_name, tax_number, fiscal_year_end_month, fiscal_year_end_day, currency, remote_created_at, urls, addresses, phone_numbers, remote_was_deleted, created_at, modified_at, field_mappings, remote_data].hash
302
321
  end
303
322
 
304
323
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeAccountingClient
17
- # # The Contact Object ### Description The `Contact` object refers to either a supplier or a customer. ### Usage Example Fetch from the `LIST Contacts` endpoint and view a company's contacts.
17
+ # # The Contact Object ### Description A `Contact` is an individual or business entity to which products and services are sold to or purchased from. The `Contact` model contains both Customers, in which products and services are sold to, and Vendors (or Suppliers), in which products and services are purchased from. * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. * A `Contact` is a customer if the `is_customer` property is true. ### Usage Example Fetch from the `LIST Contacts` endpoint and view a company's contacts.
18
18
  class Contact
19
19
  attr_accessor :id
20
20
 
@@ -54,9 +54,14 @@ module MergeAccountingClient
54
54
  # `AccountingPhoneNumber` object for the given `Contacts` object.
55
55
  attr_accessor :phone_numbers
56
56
 
57
- # Indicates whether or not this object has been deleted by third party webhooks.
57
+ # Indicates whether or not this object has been deleted in the third party platform.
58
58
  attr_accessor :remote_was_deleted
59
59
 
60
+ attr_accessor :created_at
61
+
62
+ # This is the datetime that this object was last updated by Merge
63
+ attr_accessor :modified_at
64
+
60
65
  attr_accessor :field_mappings
61
66
 
62
67
  attr_accessor :remote_data
@@ -78,6 +83,8 @@ module MergeAccountingClient
78
83
  :'addresses' => :'addresses',
79
84
  :'phone_numbers' => :'phone_numbers',
80
85
  :'remote_was_deleted' => :'remote_was_deleted',
86
+ :'created_at' => :'created_at',
87
+ :'modified_at' => :'modified_at',
81
88
  :'field_mappings' => :'field_mappings',
82
89
  :'remote_data' => :'remote_data'
83
90
  }
@@ -102,9 +109,11 @@ module MergeAccountingClient
102
109
  :'currency' => :'String',
103
110
  :'remote_updated_at' => :'Time',
104
111
  :'company' => :'String',
105
- :'addresses' => :'Array<String>',
112
+ :'addresses' => :'Array<Address>',
106
113
  :'phone_numbers' => :'Array<AccountingPhoneNumber>',
107
114
  :'remote_was_deleted' => :'Boolean',
115
+ :'created_at' => :'Time',
116
+ :'modified_at' => :'Time',
108
117
  :'field_mappings' => :'Hash<String, Object>',
109
118
  :'remote_data' => :'Array<RemoteData>'
110
119
  }
@@ -203,6 +212,14 @@ module MergeAccountingClient
203
212
  self.remote_was_deleted = attributes[:'remote_was_deleted']
204
213
  end
205
214
 
215
+ if attributes.key?(:'created_at')
216
+ self.created_at = attributes[:'created_at']
217
+ end
218
+
219
+ if attributes.key?(:'modified_at')
220
+ self.modified_at = attributes[:'modified_at']
221
+ end
222
+
206
223
  if attributes.key?(:'field_mappings')
207
224
  if (value = attributes[:'field_mappings']).is_a?(Hash)
208
225
  self.field_mappings = value
@@ -248,6 +265,8 @@ module MergeAccountingClient
248
265
  addresses == o.addresses &&
249
266
  phone_numbers == o.phone_numbers &&
250
267
  remote_was_deleted == o.remote_was_deleted &&
268
+ created_at == o.created_at &&
269
+ modified_at == o.modified_at &&
251
270
  field_mappings == o.field_mappings &&
252
271
  remote_data == o.remote_data
253
272
  end
@@ -261,7 +280,7 @@ module MergeAccountingClient
261
280
  # Calculates hash code according to all attributes.
262
281
  # @return [Integer] Hash code
263
282
  def hash
264
- [id, remote_id, name, is_supplier, is_customer, email_address, tax_number, status, currency, remote_updated_at, company, addresses, phone_numbers, remote_was_deleted, field_mappings, remote_data].hash
283
+ [id, remote_id, name, is_supplier, is_customer, email_address, tax_number, status, currency, remote_updated_at, company, addresses, phone_numbers, remote_was_deleted, created_at, modified_at, field_mappings, remote_data].hash
265
284
  end
266
285
 
267
286
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeAccountingClient
17
- # # The Contact Object ### Description The `Contact` object refers to either a supplier or a customer. ### Usage Example Fetch from the `LIST Contacts` endpoint and view a company's contacts.
17
+ # # The Contact Object ### Description A `Contact` is an individual or business entity to which products and services are sold to or purchased from. The `Contact` model contains both Customers, in which products and services are sold to, and Vendors (or Suppliers), in which products and services are purchased from. * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. * A `Contact` is a customer if the `is_customer` property is true. ### Usage Example Fetch from the `LIST Contacts` endpoint and view a company's contacts.
18
18
  class ContactRequest
19
19
  # The contact's name.
20
20
  attr_accessor :name
@@ -84,7 +84,7 @@ module MergeAccountingClient
84
84
  :'status' => :'Status7d1Enum',
85
85
  :'currency' => :'String',
86
86
  :'company' => :'String',
87
- :'addresses' => :'Array<String>',
87
+ :'addresses' => :'Array<AddressRequest>',
88
88
  :'phone_numbers' => :'Array<AccountingPhoneNumberRequest>',
89
89
  :'integration_params' => :'Hash<String, Object>',
90
90
  :'linked_account_params' => :'Hash<String, Object>'