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
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeAccountingClient
17
- # # The JournalEntry Object ### Description The `JournalEntry` object is used to get a record of all manually created entries made in a company’s general ledger. The journal line items for each journal entry should sum to zero. ### Usage Example Fetch from the `GET JournalEntry` endpoint and view a company's journey entry.
17
+ # # The JournalEntry Object ### Description A `JournalEntry` is a record of a transaction or event that is entered into a company's accounting system. The `JournalEntry` common model contains records that are automatically created as a result of a certain type of transaction, like an Invoice, and records that are manually created against a company’s ledger. The lines of a given `JournalEntry` object should always sum to 0. A positive `net_amount` means the line represents a debit and a negative net_amount represents a credit. ### Usage Example Fetch from the `GET JournalEntry` endpoint and view a company's journey entry.
18
18
  class JournalEntry
19
19
  # The journal entry's transaction date.
20
20
  attr_accessor :transaction_date
@@ -28,6 +28,9 @@ module MergeAccountingClient
28
28
  # Array of `Payment` object IDs.
29
29
  attr_accessor :payments
30
30
 
31
+ # A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry.
32
+ attr_accessor :applied_payments
33
+
31
34
  # The journal entry's private note.
32
35
  attr_accessor :memo
33
36
 
@@ -42,16 +45,29 @@ module MergeAccountingClient
42
45
 
43
46
  attr_accessor :lines
44
47
 
48
+ # Reference number for identifying journal entries.
49
+ attr_accessor :journal_number
50
+
51
+ attr_accessor :tracking_categories
52
+
45
53
  attr_accessor :remote_was_deleted
46
54
 
47
55
  # The journal's posting status. * `UNPOSTED` - UNPOSTED * `POSTED` - POSTED
48
56
  attr_accessor :posting_status
49
57
 
58
+ # The accounting period that the JournalEntry was generated in.
59
+ attr_accessor :accounting_period
60
+
50
61
  attr_accessor :id
51
62
 
52
63
  # The third-party API ID of the matching object.
53
64
  attr_accessor :remote_id
54
65
 
66
+ attr_accessor :created_at
67
+
68
+ # This is the datetime that this object was last updated by Merge
69
+ attr_accessor :modified_at
70
+
55
71
  attr_accessor :field_mappings
56
72
 
57
73
  attr_accessor :remote_data
@@ -63,15 +79,21 @@ module MergeAccountingClient
63
79
  :'remote_created_at' => :'remote_created_at',
64
80
  :'remote_updated_at' => :'remote_updated_at',
65
81
  :'payments' => :'payments',
82
+ :'applied_payments' => :'applied_payments',
66
83
  :'memo' => :'memo',
67
84
  :'currency' => :'currency',
68
85
  :'exchange_rate' => :'exchange_rate',
69
86
  :'company' => :'company',
70
87
  :'lines' => :'lines',
88
+ :'journal_number' => :'journal_number',
89
+ :'tracking_categories' => :'tracking_categories',
71
90
  :'remote_was_deleted' => :'remote_was_deleted',
72
91
  :'posting_status' => :'posting_status',
92
+ :'accounting_period' => :'accounting_period',
73
93
  :'id' => :'id',
74
94
  :'remote_id' => :'remote_id',
95
+ :'created_at' => :'created_at',
96
+ :'modified_at' => :'modified_at',
75
97
  :'field_mappings' => :'field_mappings',
76
98
  :'remote_data' => :'remote_data'
77
99
  }
@@ -89,15 +111,21 @@ module MergeAccountingClient
89
111
  :'remote_created_at' => :'Time',
90
112
  :'remote_updated_at' => :'Time',
91
113
  :'payments' => :'Array<String>',
114
+ :'applied_payments' => :'Array<String>',
92
115
  :'memo' => :'String',
93
116
  :'currency' => :'CurrencyEnum',
94
117
  :'exchange_rate' => :'String',
95
118
  :'company' => :'String',
96
119
  :'lines' => :'Array<JournalLine>',
120
+ :'journal_number' => :'String',
121
+ :'tracking_categories' => :'Array<String>',
97
122
  :'remote_was_deleted' => :'Boolean',
98
123
  :'posting_status' => :'PostingStatusEnum',
124
+ :'accounting_period' => :'String',
99
125
  :'id' => :'String',
100
126
  :'remote_id' => :'String',
127
+ :'created_at' => :'Time',
128
+ :'modified_at' => :'Time',
101
129
  :'field_mappings' => :'Hash<String, Object>',
102
130
  :'remote_data' => :'Array<RemoteData>'
103
131
  }
@@ -113,7 +141,9 @@ module MergeAccountingClient
113
141
  :'currency',
114
142
  :'exchange_rate',
115
143
  :'company',
144
+ :'journal_number',
116
145
  :'posting_status',
146
+ :'accounting_period',
117
147
  :'remote_id',
118
148
  :'field_mappings',
119
149
  :'remote_data'
@@ -153,6 +183,12 @@ module MergeAccountingClient
153
183
  end
154
184
  end
155
185
 
186
+ if attributes.key?(:'applied_payments')
187
+ if (value = attributes[:'applied_payments']).is_a?(Array)
188
+ self.applied_payments = value
189
+ end
190
+ end
191
+
156
192
  if attributes.key?(:'memo')
157
193
  self.memo = attributes[:'memo']
158
194
  end
@@ -175,6 +211,16 @@ module MergeAccountingClient
175
211
  end
176
212
  end
177
213
 
214
+ if attributes.key?(:'journal_number')
215
+ self.journal_number = attributes[:'journal_number']
216
+ end
217
+
218
+ if attributes.key?(:'tracking_categories')
219
+ if (value = attributes[:'tracking_categories']).is_a?(Array)
220
+ self.tracking_categories = value
221
+ end
222
+ end
223
+
178
224
  if attributes.key?(:'remote_was_deleted')
179
225
  self.remote_was_deleted = attributes[:'remote_was_deleted']
180
226
  end
@@ -183,6 +229,10 @@ module MergeAccountingClient
183
229
  self.posting_status = attributes[:'posting_status']
184
230
  end
185
231
 
232
+ if attributes.key?(:'accounting_period')
233
+ self.accounting_period = attributes[:'accounting_period']
234
+ end
235
+
186
236
  if attributes.key?(:'id')
187
237
  self.id = attributes[:'id']
188
238
  end
@@ -191,6 +241,14 @@ module MergeAccountingClient
191
241
  self.remote_id = attributes[:'remote_id']
192
242
  end
193
243
 
244
+ if attributes.key?(:'created_at')
245
+ self.created_at = attributes[:'created_at']
246
+ end
247
+
248
+ if attributes.key?(:'modified_at')
249
+ self.modified_at = attributes[:'modified_at']
250
+ end
251
+
194
252
  if attributes.key?(:'field_mappings')
195
253
  if (value = attributes[:'field_mappings']).is_a?(Hash)
196
254
  self.field_mappings = value
@@ -213,6 +271,10 @@ module MergeAccountingClient
213
271
  invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
214
272
  end
215
273
 
274
+ if !@journal_number.nil? && @journal_number.to_s.length > 70
275
+ invalid_properties.push('invalid value for "journal_number", the character length must be smaller than or equal to 70.')
276
+ end
277
+
216
278
  invalid_properties
217
279
  end
218
280
 
@@ -220,6 +282,7 @@ module MergeAccountingClient
220
282
  # @return true if the model is valid
221
283
  def valid?
222
284
  return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
285
+ return false if !@journal_number.nil? && @journal_number.to_s.length > 70
223
286
  true
224
287
  end
225
288
 
@@ -234,6 +297,16 @@ module MergeAccountingClient
234
297
  @exchange_rate = exchange_rate
235
298
  end
236
299
 
300
+ # Custom attribute writer method with validation
301
+ # @param [Object] journal_number Value to be assigned
302
+ def journal_number=(journal_number)
303
+ if !journal_number.nil? && journal_number.to_s.length > 70
304
+ fail ArgumentError, 'invalid value for "journal_number", the character length must be smaller than or equal to 70.'
305
+ end
306
+
307
+ @journal_number = journal_number
308
+ end
309
+
237
310
  # Checks equality by comparing each attribute.
238
311
  # @param [Object] Object to be compared
239
312
  def ==(o)
@@ -243,15 +316,21 @@ module MergeAccountingClient
243
316
  remote_created_at == o.remote_created_at &&
244
317
  remote_updated_at == o.remote_updated_at &&
245
318
  payments == o.payments &&
319
+ applied_payments == o.applied_payments &&
246
320
  memo == o.memo &&
247
321
  currency == o.currency &&
248
322
  exchange_rate == o.exchange_rate &&
249
323
  company == o.company &&
250
324
  lines == o.lines &&
325
+ journal_number == o.journal_number &&
326
+ tracking_categories == o.tracking_categories &&
251
327
  remote_was_deleted == o.remote_was_deleted &&
252
328
  posting_status == o.posting_status &&
329
+ accounting_period == o.accounting_period &&
253
330
  id == o.id &&
254
331
  remote_id == o.remote_id &&
332
+ created_at == o.created_at &&
333
+ modified_at == o.modified_at &&
255
334
  field_mappings == o.field_mappings &&
256
335
  remote_data == o.remote_data
257
336
  end
@@ -265,7 +344,7 @@ module MergeAccountingClient
265
344
  # Calculates hash code according to all attributes.
266
345
  # @return [Integer] Hash code
267
346
  def hash
268
- [transaction_date, remote_created_at, remote_updated_at, payments, memo, currency, exchange_rate, company, lines, remote_was_deleted, posting_status, id, remote_id, field_mappings, remote_data].hash
347
+ [transaction_date, remote_created_at, remote_updated_at, payments, applied_payments, memo, currency, exchange_rate, company, lines, journal_number, tracking_categories, remote_was_deleted, posting_status, accounting_period, id, remote_id, created_at, modified_at, field_mappings, remote_data].hash
269
348
  end
270
349
 
271
350
  # Builds the object from hash
@@ -34,8 +34,13 @@ module MergeAccountingClient
34
34
  # The company the journal entry belongs to.
35
35
  attr_accessor :company
36
36
 
37
+ attr_accessor :tracking_categories
38
+
37
39
  attr_accessor :lines
38
40
 
41
+ # Reference number for identifying journal entries.
42
+ attr_accessor :journal_number
43
+
39
44
  # The journal's posting status. * `UNPOSTED` - UNPOSTED * `POSTED` - POSTED
40
45
  attr_accessor :posting_status
41
46
 
@@ -52,7 +57,9 @@ module MergeAccountingClient
52
57
  :'currency' => :'currency',
53
58
  :'exchange_rate' => :'exchange_rate',
54
59
  :'company' => :'company',
60
+ :'tracking_categories' => :'tracking_categories',
55
61
  :'lines' => :'lines',
62
+ :'journal_number' => :'journal_number',
56
63
  :'posting_status' => :'posting_status',
57
64
  :'integration_params' => :'integration_params',
58
65
  :'linked_account_params' => :'linked_account_params'
@@ -73,7 +80,9 @@ module MergeAccountingClient
73
80
  :'currency' => :'CurrencyEnum',
74
81
  :'exchange_rate' => :'String',
75
82
  :'company' => :'String',
83
+ :'tracking_categories' => :'Array<String>',
76
84
  :'lines' => :'Array<JournalLineRequest>',
85
+ :'journal_number' => :'String',
77
86
  :'posting_status' => :'PostingStatusEnum',
78
87
  :'integration_params' => :'Hash<String, Object>',
79
88
  :'linked_account_params' => :'Hash<String, Object>'
@@ -88,6 +97,7 @@ module MergeAccountingClient
88
97
  :'currency',
89
98
  :'exchange_rate',
90
99
  :'company',
100
+ :'journal_number',
91
101
  :'posting_status',
92
102
  :'integration_params',
93
103
  :'linked_account_params'
@@ -135,12 +145,22 @@ module MergeAccountingClient
135
145
  self.company = attributes[:'company']
136
146
  end
137
147
 
148
+ if attributes.key?(:'tracking_categories')
149
+ if (value = attributes[:'tracking_categories']).is_a?(Array)
150
+ self.tracking_categories = value
151
+ end
152
+ end
153
+
138
154
  if attributes.key?(:'lines')
139
155
  if (value = attributes[:'lines']).is_a?(Array)
140
156
  self.lines = value
141
157
  end
142
158
  end
143
159
 
160
+ if attributes.key?(:'journal_number')
161
+ self.journal_number = attributes[:'journal_number']
162
+ end
163
+
144
164
  if attributes.key?(:'posting_status')
145
165
  self.posting_status = attributes[:'posting_status']
146
166
  end
@@ -167,6 +187,10 @@ module MergeAccountingClient
167
187
  invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
168
188
  end
169
189
 
190
+ if !@journal_number.nil? && @journal_number.to_s.length > 70
191
+ invalid_properties.push('invalid value for "journal_number", the character length must be smaller than or equal to 70.')
192
+ end
193
+
170
194
  invalid_properties
171
195
  end
172
196
 
@@ -174,6 +198,7 @@ module MergeAccountingClient
174
198
  # @return true if the model is valid
175
199
  def valid?
176
200
  return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
201
+ return false if !@journal_number.nil? && @journal_number.to_s.length > 70
177
202
  true
178
203
  end
179
204
 
@@ -188,6 +213,16 @@ module MergeAccountingClient
188
213
  @exchange_rate = exchange_rate
189
214
  end
190
215
 
216
+ # Custom attribute writer method with validation
217
+ # @param [Object] journal_number Value to be assigned
218
+ def journal_number=(journal_number)
219
+ if !journal_number.nil? && journal_number.to_s.length > 70
220
+ fail ArgumentError, 'invalid value for "journal_number", the character length must be smaller than or equal to 70.'
221
+ end
222
+
223
+ @journal_number = journal_number
224
+ end
225
+
191
226
  # Checks equality by comparing each attribute.
192
227
  # @param [Object] Object to be compared
193
228
  def ==(o)
@@ -199,7 +234,9 @@ module MergeAccountingClient
199
234
  currency == o.currency &&
200
235
  exchange_rate == o.exchange_rate &&
201
236
  company == o.company &&
237
+ tracking_categories == o.tracking_categories &&
202
238
  lines == o.lines &&
239
+ journal_number == o.journal_number &&
203
240
  posting_status == o.posting_status &&
204
241
  integration_params == o.integration_params &&
205
242
  linked_account_params == o.linked_account_params
@@ -214,7 +251,7 @@ module MergeAccountingClient
214
251
  # Calculates hash code according to all attributes.
215
252
  # @return [Integer] Hash code
216
253
  def hash
217
- [transaction_date, payments, memo, currency, exchange_rate, company, lines, posting_status, integration_params, linked_account_params].hash
254
+ [transaction_date, payments, memo, currency, exchange_rate, company, tracking_categories, lines, journal_number, posting_status, integration_params, linked_account_params].hash
218
255
  end
219
256
 
220
257
  # Builds the object from hash
@@ -28,6 +28,12 @@ module MergeAccountingClient
28
28
 
29
29
  attr_accessor :tracking_categories
30
30
 
31
+ # The journal line item's currency. * `XUA` - ADB Unit of Account * `AFN` - Afghan Afghani * `AFA` - Afghan Afghani (1927–2002) * `ALL` - Albanian Lek * `ALK` - Albanian Lek (1946–1965) * `DZD` - Algerian Dinar * `ADP` - Andorran Peseta * `AOA` - Angolan Kwanza * `AOK` - Angolan Kwanza (1977–1991) * `AON` - Angolan New Kwanza (1990–2000) * `AOR` - Angolan Readjusted Kwanza (1995–1999) * `ARA` - Argentine Austral * `ARS` - Argentine Peso * `ARM` - Argentine Peso (1881–1970) * `ARP` - Argentine Peso (1983–1985) * `ARL` - Argentine Peso Ley (1970–1983) * `AMD` - Armenian Dram * `AWG` - Aruban Florin * `AUD` - Australian Dollar * `ATS` - Austrian Schilling * `AZN` - Azerbaijani Manat * `AZM` - Azerbaijani Manat (1993–2006) * `BSD` - Bahamian Dollar * `BHD` - Bahraini Dinar * `BDT` - Bangladeshi Taka * `BBD` - Barbadian Dollar * `BYN` - Belarusian Ruble * `BYB` - Belarusian Ruble (1994–1999) * `BYR` - Belarusian Ruble (2000–2016) * `BEF` - Belgian Franc * `BEC` - Belgian Franc (convertible) * `BEL` - Belgian Franc (financial) * `BZD` - Belize Dollar * `BMD` - Bermudan Dollar * `BTN` - Bhutanese Ngultrum * `BOB` - Bolivian Boliviano * `BOL` - Bolivian Boliviano (1863–1963) * `BOV` - Bolivian Mvdol * `BOP` - Bolivian Peso * `BAM` - Bosnia-Herzegovina Convertible Mark * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) * `BWP` - Botswanan Pula * `BRC` - Brazilian Cruzado (1986–1989) * `BRZ` - Brazilian Cruzeiro (1942–1967) * `BRE` - Brazilian Cruzeiro (1990–1993) * `BRR` - Brazilian Cruzeiro (1993–1994) * `BRN` - Brazilian New Cruzado (1989–1990) * `BRB` - Brazilian New Cruzeiro (1967–1986) * `BRL` - Brazilian Real * `GBP` - British Pound * `BND` - Brunei Dollar * `BGL` - Bulgarian Hard Lev * `BGN` - Bulgarian Lev * `BGO` - Bulgarian Lev (1879–1952) * `BGM` - Bulgarian Socialist Lev * `BUK` - Burmese Kyat * `BIF` - Burundian Franc * `XPF` - CFP Franc * `KHR` - Cambodian Riel * `CAD` - Canadian Dollar * `CVE` - Cape Verdean Escudo * `KYD` - Cayman Islands Dollar * `XAF` - Central African CFA Franc * `CLE` - Chilean Escudo * `CLP` - Chilean Peso * `CLF` - Chilean Unit of Account (UF) * `CNX` - Chinese People’s Bank Dollar * `CNY` - Chinese Yuan * `CNH` - Chinese Yuan (offshore) * `COP` - Colombian Peso * `COU` - Colombian Real Value Unit * `KMF` - Comorian Franc * `CDF` - Congolese Franc * `CRC` - Costa Rican Colón * `HRD` - Croatian Dinar * `HRK` - Croatian Kuna * `CUC` - Cuban Convertible Peso * `CUP` - Cuban Peso * `CYP` - Cypriot Pound * `CZK` - Czech Koruna * `CSK` - Czechoslovak Hard Koruna * `DKK` - Danish Krone * `DJF` - Djiboutian Franc * `DOP` - Dominican Peso * `NLG` - Dutch Guilder * `XCD` - East Caribbean Dollar * `DDM` - East German Mark * `ECS` - Ecuadorian Sucre * `ECV` - Ecuadorian Unit of Constant Value * `EGP` - Egyptian Pound * `GQE` - Equatorial Guinean Ekwele * `ERN` - Eritrean Nakfa * `EEK` - Estonian Kroon * `ETB` - Ethiopian Birr * `EUR` - Euro * `XBA` - European Composite Unit * `XEU` - European Currency Unit * `XBB` - European Monetary Unit * `XBC` - European Unit of Account (XBC) * `XBD` - European Unit of Account (XBD) * `FKP` - Falkland Islands Pound * `FJD` - Fijian Dollar * `FIM` - Finnish Markka * `FRF` - French Franc * `XFO` - French Gold Franc * `XFU` - French UIC-Franc * `GMD` - Gambian Dalasi * `GEK` - Georgian Kupon Larit * `GEL` - Georgian Lari * `DEM` - German Mark * `GHS` - Ghanaian Cedi * `GHC` - Ghanaian Cedi (1979–2007) * `GIP` - Gibraltar Pound * `XAU` - Gold * `GRD` - Greek Drachma * `GTQ` - Guatemalan Quetzal * `GWP` - Guinea-Bissau Peso * `GNF` - Guinean Franc * `GNS` - Guinean Syli * `GYD` - Guyanaese Dollar * `HTG` - Haitian Gourde * `HNL` - Honduran Lempira * `HKD` - Hong Kong Dollar * `HUF` - Hungarian Forint * `IMP` - IMP * `ISK` - Icelandic Króna * `ISJ` - Icelandic Króna (1918–1981) * `INR` - Indian Rupee * `IDR` - Indonesian Rupiah * `IRR` - Iranian Rial * `IQD` - Iraqi Dinar * `IEP` - Irish Pound * `ILS` - Israeli New Shekel * `ILP` - Israeli Pound * `ILR` - Israeli Shekel (1980–1985) * `ITL` - Italian Lira * `JMD` - Jamaican Dollar * `JPY` - Japanese Yen * `JOD` - Jordanian Dinar * `KZT` - Kazakhstani Tenge * `KES` - Kenyan Shilling * `KWD` - Kuwaiti Dinar * `KGS` - Kyrgystani Som * `LAK` - Laotian Kip * `LVL` - Latvian Lats * `LVR` - Latvian Ruble * `LBP` - Lebanese Pound * `LSL` - Lesotho Loti * `LRD` - Liberian Dollar * `LYD` - Libyan Dinar * `LTL` - Lithuanian Litas * `LTT` - Lithuanian Talonas * `LUL` - Luxembourg Financial Franc * `LUC` - Luxembourgian Convertible Franc * `LUF` - Luxembourgian Franc * `MOP` - Macanese Pataca * `MKD` - Macedonian Denar * `MKN` - Macedonian Denar (1992–1993) * `MGA` - Malagasy Ariary * `MGF` - Malagasy Franc * `MWK` - Malawian Kwacha * `MYR` - Malaysian Ringgit * `MVR` - Maldivian Rufiyaa * `MVP` - Maldivian Rupee (1947–1981) * `MLF` - Malian Franc * `MTL` - Maltese Lira * `MTP` - Maltese Pound * `MRU` - Mauritanian Ouguiya * `MRO` - Mauritanian Ouguiya (1973–2017) * `MUR` - Mauritian Rupee * `MXV` - Mexican Investment Unit * `MXN` - Mexican Peso * `MXP` - Mexican Silver Peso (1861–1992) * `MDC` - Moldovan Cupon * `MDL` - Moldovan Leu * `MCF` - Monegasque Franc * `MNT` - Mongolian Tugrik * `MAD` - Moroccan Dirham * `MAF` - Moroccan Franc * `MZE` - Mozambican Escudo * `MZN` - Mozambican Metical * `MZM` - Mozambican Metical (1980–2006) * `MMK` - Myanmar Kyat * `NAD` - Namibian Dollar * `NPR` - Nepalese Rupee * `ANG` - Netherlands Antillean Guilder * `TWD` - New Taiwan Dollar * `NZD` - New Zealand Dollar * `NIO` - Nicaraguan Córdoba * `NIC` - Nicaraguan Córdoba (1988–1991) * `NGN` - Nigerian Naira * `KPW` - North Korean Won * `NOK` - Norwegian Krone * `OMR` - Omani Rial * `PKR` - Pakistani Rupee * `XPD` - Palladium * `PAB` - Panamanian Balboa * `PGK` - Papua New Guinean Kina * `PYG` - Paraguayan Guarani * `PEI` - Peruvian Inti * `PEN` - Peruvian Sol * `PES` - Peruvian Sol (1863–1965) * `PHP` - Philippine Peso * `XPT` - Platinum * `PLN` - Polish Zloty * `PLZ` - Polish Zloty (1950–1995) * `PTE` - Portuguese Escudo * `GWE` - Portuguese Guinea Escudo * `QAR` - Qatari Rial * `XRE` - RINET Funds * `RHD` - Rhodesian Dollar * `RON` - Romanian Leu * `ROL` - Romanian Leu (1952–2006) * `RUB` - Russian Ruble * `RUR` - Russian Ruble (1991–1998) * `RWF` - Rwandan Franc * `SVC` - Salvadoran Colón * `WST` - Samoan Tala * `SAR` - Saudi Riyal * `RSD` - Serbian Dinar * `CSD` - Serbian Dinar (2002–2006) * `SCR` - Seychellois Rupee * `SLL` - Sierra Leonean Leone * `XAG` - Silver * `SGD` - Singapore Dollar * `SKK` - Slovak Koruna * `SIT` - Slovenian Tolar * `SBD` - Solomon Islands Dollar * `SOS` - Somali Shilling * `ZAR` - South African Rand * `ZAL` - South African Rand (financial) * `KRH` - South Korean Hwan (1953–1962) * `KRW` - South Korean Won * `KRO` - South Korean Won (1945–1953) * `SSP` - South Sudanese Pound * `SUR` - Soviet Rouble * `ESP` - Spanish Peseta * `ESA` - Spanish Peseta (A account) * `ESB` - Spanish Peseta (convertible account) * `XDR` - Special Drawing Rights * `LKR` - Sri Lankan Rupee * `SHP` - St. Helena Pound * `XSU` - Sucre * `SDD` - Sudanese Dinar (1992–2007) * `SDG` - Sudanese Pound * `SDP` - Sudanese Pound (1957–1998) * `SRD` - Surinamese Dollar * `SRG` - Surinamese Guilder * `SZL` - Swazi Lilangeni * `SEK` - Swedish Krona * `CHF` - Swiss Franc * `SYP` - Syrian Pound * `STN` - São Tomé & Príncipe Dobra * `STD` - São Tomé & Príncipe Dobra (1977–2017) * `TVD` - TVD * `TJR` - Tajikistani Ruble * `TJS` - Tajikistani Somoni * `TZS` - Tanzanian Shilling * `XTS` - Testing Currency Code * `THB` - Thai Baht * `XXX` - The codes assigned for transactions where no currency is involved * `TPE` - Timorese Escudo * `TOP` - Tongan Paʻanga * `TTD` - Trinidad & Tobago Dollar * `TND` - Tunisian Dinar * `TRY` - Turkish Lira * `TRL` - Turkish Lira (1922–2005) * `TMT` - Turkmenistani Manat * `TMM` - Turkmenistani Manat (1993–2009) * `USD` - US Dollar * `USN` - US Dollar (Next day) * `USS` - US Dollar (Same day) * `UGX` - Ugandan Shilling * `UGS` - Ugandan Shilling (1966–1987) * `UAH` - Ukrainian Hryvnia * `UAK` - Ukrainian Karbovanets * `AED` - United Arab Emirates Dirham * `UYW` - Uruguayan Nominal Wage Index Unit * `UYU` - Uruguayan Peso * `UYP` - Uruguayan Peso (1975–1993) * `UYI` - Uruguayan Peso (Indexed Units) * `UZS` - Uzbekistani Som * `VUV` - Vanuatu Vatu * `VES` - Venezuelan Bolívar * `VEB` - Venezuelan Bolívar (1871–2008) * `VEF` - Venezuelan Bolívar (2008–2018) * `VND` - Vietnamese Dong * `VNN` - Vietnamese Dong (1978–1985) * `CHE` - WIR Euro * `CHW` - WIR Franc * `XOF` - West African CFA Franc * `YDD` - Yemeni Dinar * `YER` - Yemeni Rial * `YUN` - Yugoslavian Convertible Dinar (1990–1992) * `YUD` - Yugoslavian Hard Dinar (1966–1990) * `YUM` - Yugoslavian New Dinar (1994–2002) * `YUR` - Yugoslavian Reformed Dinar (1992–1993) * `ZWN` - ZWN * `ZRN` - Zairean New Zaire (1993–1998) * `ZRZ` - Zairean Zaire (1971–1993) * `ZMW` - Zambian Kwacha * `ZMK` - Zambian Kwacha (1968–2012) * `ZWD` - Zimbabwean Dollar (1980–2008) * `ZWR` - Zimbabwean Dollar (2008) * `ZWL` - Zimbabwean Dollar (2009)
32
+ attr_accessor :currency
33
+
34
+ # The company the journal entry belongs to.
35
+ attr_accessor :company
36
+
31
37
  attr_accessor :contact
32
38
 
33
39
  # The line's description.
@@ -36,6 +42,16 @@ module MergeAccountingClient
36
42
  # The journal line item's exchange rate.
37
43
  attr_accessor :exchange_rate
38
44
 
45
+ # Indicates whether or not this object has been deleted in the third party platform.
46
+ attr_accessor :remote_was_deleted
47
+
48
+ attr_accessor :id
49
+
50
+ attr_accessor :created_at
51
+
52
+ # This is the datetime that this object was last updated by Merge
53
+ attr_accessor :modified_at
54
+
39
55
  # Attribute mapping from ruby-style variable name to JSON key.
40
56
  def self.attribute_map
41
57
  {
@@ -44,9 +60,15 @@ module MergeAccountingClient
44
60
  :'net_amount' => :'net_amount',
45
61
  :'tracking_category' => :'tracking_category',
46
62
  :'tracking_categories' => :'tracking_categories',
63
+ :'currency' => :'currency',
64
+ :'company' => :'company',
47
65
  :'contact' => :'contact',
48
66
  :'description' => :'description',
49
- :'exchange_rate' => :'exchange_rate'
67
+ :'exchange_rate' => :'exchange_rate',
68
+ :'remote_was_deleted' => :'remote_was_deleted',
69
+ :'id' => :'id',
70
+ :'created_at' => :'created_at',
71
+ :'modified_at' => :'modified_at'
50
72
  }
51
73
  end
52
74
 
@@ -63,9 +85,15 @@ module MergeAccountingClient
63
85
  :'net_amount' => :'Float',
64
86
  :'tracking_category' => :'String',
65
87
  :'tracking_categories' => :'Array<String>',
88
+ :'currency' => :'CurrencyEnum',
89
+ :'company' => :'String',
66
90
  :'contact' => :'String',
67
91
  :'description' => :'String',
68
- :'exchange_rate' => :'String'
92
+ :'exchange_rate' => :'String',
93
+ :'remote_was_deleted' => :'Boolean',
94
+ :'id' => :'String',
95
+ :'created_at' => :'Time',
96
+ :'modified_at' => :'Time'
69
97
  }
70
98
  end
71
99
 
@@ -76,9 +104,11 @@ module MergeAccountingClient
76
104
  :'account',
77
105
  :'net_amount',
78
106
  :'tracking_category',
107
+ :'currency',
108
+ :'company',
79
109
  :'contact',
80
110
  :'description',
81
- :'exchange_rate'
111
+ :'exchange_rate',
82
112
  ])
83
113
  end
84
114
 
@@ -119,6 +149,14 @@ module MergeAccountingClient
119
149
  end
120
150
  end
121
151
 
152
+ if attributes.key?(:'currency')
153
+ self.currency = attributes[:'currency']
154
+ end
155
+
156
+ if attributes.key?(:'company')
157
+ self.company = attributes[:'company']
158
+ end
159
+
122
160
  if attributes.key?(:'contact')
123
161
  self.contact = attributes[:'contact']
124
162
  end
@@ -130,6 +168,22 @@ module MergeAccountingClient
130
168
  if attributes.key?(:'exchange_rate')
131
169
  self.exchange_rate = attributes[:'exchange_rate']
132
170
  end
171
+
172
+ if attributes.key?(:'remote_was_deleted')
173
+ self.remote_was_deleted = attributes[:'remote_was_deleted']
174
+ end
175
+
176
+ if attributes.key?(:'id')
177
+ self.id = attributes[:'id']
178
+ end
179
+
180
+ if attributes.key?(:'created_at')
181
+ self.created_at = attributes[:'created_at']
182
+ end
183
+
184
+ if attributes.key?(:'modified_at')
185
+ self.modified_at = attributes[:'modified_at']
186
+ end
133
187
  end
134
188
 
135
189
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -172,9 +226,15 @@ module MergeAccountingClient
172
226
  net_amount == o.net_amount &&
173
227
  tracking_category == o.tracking_category &&
174
228
  tracking_categories == o.tracking_categories &&
229
+ currency == o.currency &&
230
+ company == o.company &&
175
231
  contact == o.contact &&
176
232
  description == o.description &&
177
- exchange_rate == o.exchange_rate
233
+ exchange_rate == o.exchange_rate &&
234
+ remote_was_deleted == o.remote_was_deleted &&
235
+ id == o.id &&
236
+ created_at == o.created_at &&
237
+ modified_at == o.modified_at
178
238
  end
179
239
 
180
240
  # @see the `==` method
@@ -186,7 +246,7 @@ module MergeAccountingClient
186
246
  # Calculates hash code according to all attributes.
187
247
  # @return [Integer] Hash code
188
248
  def hash
189
- [remote_id, account, net_amount, tracking_category, tracking_categories, contact, description, exchange_rate].hash
249
+ [remote_id, account, net_amount, tracking_category, tracking_categories, currency, company, contact, description, exchange_rate, remote_was_deleted, id, created_at, modified_at].hash
190
250
  end
191
251
 
192
252
  # Builds the object from hash
@@ -28,6 +28,12 @@ module MergeAccountingClient
28
28
 
29
29
  attr_accessor :tracking_categories
30
30
 
31
+ # The journal line item's currency. * `XUA` - ADB Unit of Account * `AFN` - Afghan Afghani * `AFA` - Afghan Afghani (1927–2002) * `ALL` - Albanian Lek * `ALK` - Albanian Lek (1946–1965) * `DZD` - Algerian Dinar * `ADP` - Andorran Peseta * `AOA` - Angolan Kwanza * `AOK` - Angolan Kwanza (1977–1991) * `AON` - Angolan New Kwanza (1990–2000) * `AOR` - Angolan Readjusted Kwanza (1995–1999) * `ARA` - Argentine Austral * `ARS` - Argentine Peso * `ARM` - Argentine Peso (1881–1970) * `ARP` - Argentine Peso (1983–1985) * `ARL` - Argentine Peso Ley (1970–1983) * `AMD` - Armenian Dram * `AWG` - Aruban Florin * `AUD` - Australian Dollar * `ATS` - Austrian Schilling * `AZN` - Azerbaijani Manat * `AZM` - Azerbaijani Manat (1993–2006) * `BSD` - Bahamian Dollar * `BHD` - Bahraini Dinar * `BDT` - Bangladeshi Taka * `BBD` - Barbadian Dollar * `BYN` - Belarusian Ruble * `BYB` - Belarusian Ruble (1994–1999) * `BYR` - Belarusian Ruble (2000–2016) * `BEF` - Belgian Franc * `BEC` - Belgian Franc (convertible) * `BEL` - Belgian Franc (financial) * `BZD` - Belize Dollar * `BMD` - Bermudan Dollar * `BTN` - Bhutanese Ngultrum * `BOB` - Bolivian Boliviano * `BOL` - Bolivian Boliviano (1863–1963) * `BOV` - Bolivian Mvdol * `BOP` - Bolivian Peso * `BAM` - Bosnia-Herzegovina Convertible Mark * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) * `BWP` - Botswanan Pula * `BRC` - Brazilian Cruzado (1986–1989) * `BRZ` - Brazilian Cruzeiro (1942–1967) * `BRE` - Brazilian Cruzeiro (1990–1993) * `BRR` - Brazilian Cruzeiro (1993–1994) * `BRN` - Brazilian New Cruzado (1989–1990) * `BRB` - Brazilian New Cruzeiro (1967–1986) * `BRL` - Brazilian Real * `GBP` - British Pound * `BND` - Brunei Dollar * `BGL` - Bulgarian Hard Lev * `BGN` - Bulgarian Lev * `BGO` - Bulgarian Lev (1879–1952) * `BGM` - Bulgarian Socialist Lev * `BUK` - Burmese Kyat * `BIF` - Burundian Franc * `XPF` - CFP Franc * `KHR` - Cambodian Riel * `CAD` - Canadian Dollar * `CVE` - Cape Verdean Escudo * `KYD` - Cayman Islands Dollar * `XAF` - Central African CFA Franc * `CLE` - Chilean Escudo * `CLP` - Chilean Peso * `CLF` - Chilean Unit of Account (UF) * `CNX` - Chinese People’s Bank Dollar * `CNY` - Chinese Yuan * `CNH` - Chinese Yuan (offshore) * `COP` - Colombian Peso * `COU` - Colombian Real Value Unit * `KMF` - Comorian Franc * `CDF` - Congolese Franc * `CRC` - Costa Rican Colón * `HRD` - Croatian Dinar * `HRK` - Croatian Kuna * `CUC` - Cuban Convertible Peso * `CUP` - Cuban Peso * `CYP` - Cypriot Pound * `CZK` - Czech Koruna * `CSK` - Czechoslovak Hard Koruna * `DKK` - Danish Krone * `DJF` - Djiboutian Franc * `DOP` - Dominican Peso * `NLG` - Dutch Guilder * `XCD` - East Caribbean Dollar * `DDM` - East German Mark * `ECS` - Ecuadorian Sucre * `ECV` - Ecuadorian Unit of Constant Value * `EGP` - Egyptian Pound * `GQE` - Equatorial Guinean Ekwele * `ERN` - Eritrean Nakfa * `EEK` - Estonian Kroon * `ETB` - Ethiopian Birr * `EUR` - Euro * `XBA` - European Composite Unit * `XEU` - European Currency Unit * `XBB` - European Monetary Unit * `XBC` - European Unit of Account (XBC) * `XBD` - European Unit of Account (XBD) * `FKP` - Falkland Islands Pound * `FJD` - Fijian Dollar * `FIM` - Finnish Markka * `FRF` - French Franc * `XFO` - French Gold Franc * `XFU` - French UIC-Franc * `GMD` - Gambian Dalasi * `GEK` - Georgian Kupon Larit * `GEL` - Georgian Lari * `DEM` - German Mark * `GHS` - Ghanaian Cedi * `GHC` - Ghanaian Cedi (1979–2007) * `GIP` - Gibraltar Pound * `XAU` - Gold * `GRD` - Greek Drachma * `GTQ` - Guatemalan Quetzal * `GWP` - Guinea-Bissau Peso * `GNF` - Guinean Franc * `GNS` - Guinean Syli * `GYD` - Guyanaese Dollar * `HTG` - Haitian Gourde * `HNL` - Honduran Lempira * `HKD` - Hong Kong Dollar * `HUF` - Hungarian Forint * `IMP` - IMP * `ISK` - Icelandic Króna * `ISJ` - Icelandic Króna (1918–1981) * `INR` - Indian Rupee * `IDR` - Indonesian Rupiah * `IRR` - Iranian Rial * `IQD` - Iraqi Dinar * `IEP` - Irish Pound * `ILS` - Israeli New Shekel * `ILP` - Israeli Pound * `ILR` - Israeli Shekel (1980–1985) * `ITL` - Italian Lira * `JMD` - Jamaican Dollar * `JPY` - Japanese Yen * `JOD` - Jordanian Dinar * `KZT` - Kazakhstani Tenge * `KES` - Kenyan Shilling * `KWD` - Kuwaiti Dinar * `KGS` - Kyrgystani Som * `LAK` - Laotian Kip * `LVL` - Latvian Lats * `LVR` - Latvian Ruble * `LBP` - Lebanese Pound * `LSL` - Lesotho Loti * `LRD` - Liberian Dollar * `LYD` - Libyan Dinar * `LTL` - Lithuanian Litas * `LTT` - Lithuanian Talonas * `LUL` - Luxembourg Financial Franc * `LUC` - Luxembourgian Convertible Franc * `LUF` - Luxembourgian Franc * `MOP` - Macanese Pataca * `MKD` - Macedonian Denar * `MKN` - Macedonian Denar (1992–1993) * `MGA` - Malagasy Ariary * `MGF` - Malagasy Franc * `MWK` - Malawian Kwacha * `MYR` - Malaysian Ringgit * `MVR` - Maldivian Rufiyaa * `MVP` - Maldivian Rupee (1947–1981) * `MLF` - Malian Franc * `MTL` - Maltese Lira * `MTP` - Maltese Pound * `MRU` - Mauritanian Ouguiya * `MRO` - Mauritanian Ouguiya (1973–2017) * `MUR` - Mauritian Rupee * `MXV` - Mexican Investment Unit * `MXN` - Mexican Peso * `MXP` - Mexican Silver Peso (1861–1992) * `MDC` - Moldovan Cupon * `MDL` - Moldovan Leu * `MCF` - Monegasque Franc * `MNT` - Mongolian Tugrik * `MAD` - Moroccan Dirham * `MAF` - Moroccan Franc * `MZE` - Mozambican Escudo * `MZN` - Mozambican Metical * `MZM` - Mozambican Metical (1980–2006) * `MMK` - Myanmar Kyat * `NAD` - Namibian Dollar * `NPR` - Nepalese Rupee * `ANG` - Netherlands Antillean Guilder * `TWD` - New Taiwan Dollar * `NZD` - New Zealand Dollar * `NIO` - Nicaraguan Córdoba * `NIC` - Nicaraguan Córdoba (1988–1991) * `NGN` - Nigerian Naira * `KPW` - North Korean Won * `NOK` - Norwegian Krone * `OMR` - Omani Rial * `PKR` - Pakistani Rupee * `XPD` - Palladium * `PAB` - Panamanian Balboa * `PGK` - Papua New Guinean Kina * `PYG` - Paraguayan Guarani * `PEI` - Peruvian Inti * `PEN` - Peruvian Sol * `PES` - Peruvian Sol (1863–1965) * `PHP` - Philippine Peso * `XPT` - Platinum * `PLN` - Polish Zloty * `PLZ` - Polish Zloty (1950–1995) * `PTE` - Portuguese Escudo * `GWE` - Portuguese Guinea Escudo * `QAR` - Qatari Rial * `XRE` - RINET Funds * `RHD` - Rhodesian Dollar * `RON` - Romanian Leu * `ROL` - Romanian Leu (1952–2006) * `RUB` - Russian Ruble * `RUR` - Russian Ruble (1991–1998) * `RWF` - Rwandan Franc * `SVC` - Salvadoran Colón * `WST` - Samoan Tala * `SAR` - Saudi Riyal * `RSD` - Serbian Dinar * `CSD` - Serbian Dinar (2002–2006) * `SCR` - Seychellois Rupee * `SLL` - Sierra Leonean Leone * `XAG` - Silver * `SGD` - Singapore Dollar * `SKK` - Slovak Koruna * `SIT` - Slovenian Tolar * `SBD` - Solomon Islands Dollar * `SOS` - Somali Shilling * `ZAR` - South African Rand * `ZAL` - South African Rand (financial) * `KRH` - South Korean Hwan (1953–1962) * `KRW` - South Korean Won * `KRO` - South Korean Won (1945–1953) * `SSP` - South Sudanese Pound * `SUR` - Soviet Rouble * `ESP` - Spanish Peseta * `ESA` - Spanish Peseta (A account) * `ESB` - Spanish Peseta (convertible account) * `XDR` - Special Drawing Rights * `LKR` - Sri Lankan Rupee * `SHP` - St. Helena Pound * `XSU` - Sucre * `SDD` - Sudanese Dinar (1992–2007) * `SDG` - Sudanese Pound * `SDP` - Sudanese Pound (1957–1998) * `SRD` - Surinamese Dollar * `SRG` - Surinamese Guilder * `SZL` - Swazi Lilangeni * `SEK` - Swedish Krona * `CHF` - Swiss Franc * `SYP` - Syrian Pound * `STN` - São Tomé & Príncipe Dobra * `STD` - São Tomé & Príncipe Dobra (1977–2017) * `TVD` - TVD * `TJR` - Tajikistani Ruble * `TJS` - Tajikistani Somoni * `TZS` - Tanzanian Shilling * `XTS` - Testing Currency Code * `THB` - Thai Baht * `XXX` - The codes assigned for transactions where no currency is involved * `TPE` - Timorese Escudo * `TOP` - Tongan Paʻanga * `TTD` - Trinidad & Tobago Dollar * `TND` - Tunisian Dinar * `TRY` - Turkish Lira * `TRL` - Turkish Lira (1922–2005) * `TMT` - Turkmenistani Manat * `TMM` - Turkmenistani Manat (1993–2009) * `USD` - US Dollar * `USN` - US Dollar (Next day) * `USS` - US Dollar (Same day) * `UGX` - Ugandan Shilling * `UGS` - Ugandan Shilling (1966–1987) * `UAH` - Ukrainian Hryvnia * `UAK` - Ukrainian Karbovanets * `AED` - United Arab Emirates Dirham * `UYW` - Uruguayan Nominal Wage Index Unit * `UYU` - Uruguayan Peso * `UYP` - Uruguayan Peso (1975–1993) * `UYI` - Uruguayan Peso (Indexed Units) * `UZS` - Uzbekistani Som * `VUV` - Vanuatu Vatu * `VES` - Venezuelan Bolívar * `VEB` - Venezuelan Bolívar (1871–2008) * `VEF` - Venezuelan Bolívar (2008–2018) * `VND` - Vietnamese Dong * `VNN` - Vietnamese Dong (1978–1985) * `CHE` - WIR Euro * `CHW` - WIR Franc * `XOF` - West African CFA Franc * `YDD` - Yemeni Dinar * `YER` - Yemeni Rial * `YUN` - Yugoslavian Convertible Dinar (1990–1992) * `YUD` - Yugoslavian Hard Dinar (1966–1990) * `YUM` - Yugoslavian New Dinar (1994–2002) * `YUR` - Yugoslavian Reformed Dinar (1992–1993) * `ZWN` - ZWN * `ZRN` - Zairean New Zaire (1993–1998) * `ZRZ` - Zairean Zaire (1971–1993) * `ZMW` - Zambian Kwacha * `ZMK` - Zambian Kwacha (1968–2012) * `ZWD` - Zimbabwean Dollar (1980–2008) * `ZWR` - Zimbabwean Dollar (2008) * `ZWL` - Zimbabwean Dollar (2009)
32
+ attr_accessor :currency
33
+
34
+ # The company the journal entry belongs to.
35
+ attr_accessor :company
36
+
31
37
  attr_accessor :contact
32
38
 
33
39
  # The line's description.
@@ -48,6 +54,8 @@ module MergeAccountingClient
48
54
  :'net_amount' => :'net_amount',
49
55
  :'tracking_category' => :'tracking_category',
50
56
  :'tracking_categories' => :'tracking_categories',
57
+ :'currency' => :'currency',
58
+ :'company' => :'company',
51
59
  :'contact' => :'contact',
52
60
  :'description' => :'description',
53
61
  :'exchange_rate' => :'exchange_rate',
@@ -69,6 +77,8 @@ module MergeAccountingClient
69
77
  :'net_amount' => :'Float',
70
78
  :'tracking_category' => :'String',
71
79
  :'tracking_categories' => :'Array<String>',
80
+ :'currency' => :'CurrencyEnum',
81
+ :'company' => :'String',
72
82
  :'contact' => :'String',
73
83
  :'description' => :'String',
74
84
  :'exchange_rate' => :'String',
@@ -84,6 +94,8 @@ module MergeAccountingClient
84
94
  :'account',
85
95
  :'net_amount',
86
96
  :'tracking_category',
97
+ :'currency',
98
+ :'company',
87
99
  :'contact',
88
100
  :'description',
89
101
  :'exchange_rate',
@@ -129,6 +141,14 @@ module MergeAccountingClient
129
141
  end
130
142
  end
131
143
 
144
+ if attributes.key?(:'currency')
145
+ self.currency = attributes[:'currency']
146
+ end
147
+
148
+ if attributes.key?(:'company')
149
+ self.company = attributes[:'company']
150
+ end
151
+
132
152
  if attributes.key?(:'contact')
133
153
  self.contact = attributes[:'contact']
134
154
  end
@@ -194,6 +214,8 @@ module MergeAccountingClient
194
214
  net_amount == o.net_amount &&
195
215
  tracking_category == o.tracking_category &&
196
216
  tracking_categories == o.tracking_categories &&
217
+ currency == o.currency &&
218
+ company == o.company &&
197
219
  contact == o.contact &&
198
220
  description == o.description &&
199
221
  exchange_rate == o.exchange_rate &&
@@ -210,7 +232,7 @@ module MergeAccountingClient
210
232
  # Calculates hash code according to all attributes.
211
233
  # @return [Integer] Hash code
212
234
  def hash
213
- [remote_id, account, net_amount, tracking_category, tracking_categories, contact, description, exchange_rate, integration_params, linked_account_params].hash
235
+ [remote_id, account, net_amount, tracking_category, tracking_categories, currency, company, contact, description, exchange_rate, integration_params, linked_account_params].hash
214
236
  end
215
237
 
216
238
  # Builds the object from hash