merge_accounting_client 1.0.9 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -4
  3. data/docs/Account.md +3 -1
  4. data/docs/AccountIntegration.md +4 -2
  5. data/docs/AccountingAttachment.md +3 -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 +2 -0
  10. data/docs/Address.md +2 -0
  11. data/docs/AddressRequest.md +34 -0
  12. data/docs/AuditLogEvent.md +32 -0
  13. data/docs/AuditTrailApi.md +91 -0
  14. data/docs/BalanceSheet.md +3 -1
  15. data/docs/CashFlowStatement.md +3 -1
  16. data/docs/CompanyInfo.md +3 -1
  17. data/docs/Contact.md +4 -2
  18. data/docs/ContactRequest.md +1 -1
  19. data/docs/ContactsApi.md +4 -0
  20. data/docs/CreditNote.md +8 -2
  21. data/docs/CreditNoteLineItem.md +6 -0
  22. data/docs/CreditNotesApi.md +2 -2
  23. data/docs/EndUserDetailsRequest.md +1 -1
  24. data/docs/EventTypeEnum.md +15 -0
  25. data/docs/Expense.md +10 -2
  26. data/docs/ExpenseLine.md +8 -0
  27. data/docs/ExpenseLineRequest.md +2 -0
  28. data/docs/ExpenseRequest.md +7 -1
  29. data/docs/IncomeStatement.md +3 -1
  30. data/docs/Invoice.md +11 -1
  31. data/docs/InvoiceLineItem.md +5 -1
  32. data/docs/InvoiceRequest.md +4 -0
  33. data/docs/InvoiceStatusEnum.md +15 -0
  34. data/docs/InvoicesApi.md +2 -2
  35. data/docs/Issue.md +1 -1
  36. data/docs/Item.md +3 -1
  37. data/docs/JournalEntriesApi.md +2 -2
  38. data/docs/JournalEntry.md +9 -1
  39. data/docs/JournalEntryRequest.md +4 -0
  40. data/docs/JournalLine.md +10 -0
  41. data/docs/JournalLineRequest.md +4 -0
  42. data/docs/LinkedAccountsApi.md +2 -2
  43. data/docs/MetaResponse.md +2 -2
  44. data/docs/PaginatedAccountingPeriodList.md +22 -0
  45. data/docs/PaginatedAuditLogEventList.md +22 -0
  46. data/docs/Payment.md +7 -1
  47. data/docs/PaymentLineItem.md +32 -0
  48. data/docs/PaymentLineItemRequest.md +30 -0
  49. data/docs/PaymentRequest.md +4 -0
  50. data/docs/PurchaseOrder.md +9 -3
  51. data/docs/PurchaseOrderLineItem.md +6 -0
  52. data/docs/PurchaseOrderRequest.md +2 -0
  53. data/docs/PurchaseOrdersApi.md +2 -2
  54. data/docs/ReportItem.md +2 -0
  55. data/docs/RoleEnum.md +15 -0
  56. data/docs/SyncStatusApi.md +1 -1
  57. data/docs/TaxRate.md +3 -1
  58. data/docs/TrackingCategory.md +3 -1
  59. data/docs/Transaction.md +7 -3
  60. data/docs/TransactionLineItem.md +6 -0
  61. data/docs/VendorCredit.md +6 -2
  62. data/docs/VendorCreditLine.md +6 -0
  63. data/docs/VendorCreditsApi.md +2 -2
  64. data/lib/merge_accounting_client/api/accounting_periods_api.rb +167 -0
  65. data/lib/merge_accounting_client/api/audit_trail_api.rb +95 -0
  66. data/lib/merge_accounting_client/api/contacts_api.rb +6 -0
  67. data/lib/merge_accounting_client/api/credit_notes_api.rb +2 -2
  68. data/lib/merge_accounting_client/api/expenses_api.rb +2 -2
  69. data/lib/merge_accounting_client/api/invoices_api.rb +2 -2
  70. data/lib/merge_accounting_client/api/journal_entries_api.rb +2 -2
  71. data/lib/merge_accounting_client/api/linked_accounts_api.rb +3 -3
  72. data/lib/merge_accounting_client/api/payments_api.rb +2 -2
  73. data/lib/merge_accounting_client/api/purchase_orders_api.rb +2 -2
  74. data/lib/merge_accounting_client/api/sync_status_api.rb +2 -2
  75. data/lib/merge_accounting_client/api/transactions_api.rb +2 -2
  76. data/lib/merge_accounting_client/api/vendor_credits_api.rb +2 -2
  77. data/lib/merge_accounting_client/configuration.rb +4 -0
  78. data/lib/merge_accounting_client/models/account.rb +12 -3
  79. data/lib/merge_accounting_client/models/account_integration.rb +15 -4
  80. data/lib/merge_accounting_client/models/account_request.rb +1 -1
  81. data/lib/merge_accounting_client/models/accounting_attachment.rb +11 -2
  82. data/lib/merge_accounting_client/models/accounting_period.rb +296 -0
  83. data/lib/merge_accounting_client/models/accounting_period_status_enum.rb +45 -0
  84. data/lib/merge_accounting_client/models/accounting_phone_number.rb +10 -1
  85. data/lib/merge_accounting_client/models/address.rb +10 -1
  86. data/lib/merge_accounting_client/models/address_request.rb +311 -0
  87. data/lib/merge_accounting_client/models/audit_log_event.rb +356 -0
  88. data/lib/merge_accounting_client/models/balance_sheet.rb +11 -2
  89. data/lib/merge_accounting_client/models/cash_flow_statement.rb +11 -2
  90. data/lib/merge_accounting_client/models/company_info.rb +12 -3
  91. data/lib/merge_accounting_client/models/contact.rb +13 -4
  92. data/lib/merge_accounting_client/models/contact_request.rb +2 -2
  93. data/lib/merge_accounting_client/models/credit_note.rb +35 -3
  94. data/lib/merge_accounting_client/models/credit_note_line_item.rb +29 -1
  95. data/lib/merge_accounting_client/models/end_user_details_request.rb +1 -1
  96. data/lib/merge_accounting_client/models/event_type_enum.rb +67 -0
  97. data/lib/merge_accounting_client/models/expense.rb +45 -3
  98. data/lib/merge_accounting_client/models/expense_line.rb +40 -1
  99. data/lib/merge_accounting_client/models/expense_line_request.rb +12 -1
  100. data/lib/merge_accounting_client/models/expense_request.rb +35 -2
  101. data/lib/merge_accounting_client/models/income_statement.rb +11 -2
  102. data/lib/merge_accounting_client/models/invoice.rb +55 -1
  103. data/lib/merge_accounting_client/models/invoice_line_item.rb +20 -1
  104. data/lib/merge_accounting_client/models/invoice_request.rb +23 -1
  105. data/lib/merge_accounting_client/models/invoice_status_enum.rb +49 -0
  106. data/lib/merge_accounting_client/models/item.rb +11 -2
  107. data/lib/merge_accounting_client/models/journal_entry.rb +60 -2
  108. data/lib/merge_accounting_client/models/journal_entry_request.rb +38 -1
  109. data/lib/merge_accounting_client/models/journal_line.rb +51 -1
  110. data/lib/merge_accounting_client/models/journal_line_request.rb +23 -1
  111. data/lib/merge_accounting_client/models/paginated_accounting_period_list.rb +240 -0
  112. data/lib/merge_accounting_client/models/paginated_audit_log_event_list.rb +240 -0
  113. data/lib/merge_accounting_client/models/payment.rb +34 -2
  114. data/lib/merge_accounting_client/models/payment_line_item.rb +308 -0
  115. data/lib/merge_accounting_client/models/payment_line_item_request.rb +319 -0
  116. data/lib/merge_accounting_client/models/payment_request.rb +24 -1
  117. data/lib/merge_accounting_client/models/purchase_order.rb +49 -3
  118. data/lib/merge_accounting_client/models/purchase_order_line_item.rb +29 -1
  119. data/lib/merge_accounting_client/models/purchase_order_request.rb +12 -1
  120. data/lib/merge_accounting_client/models/report_item.rb +10 -1
  121. data/lib/merge_accounting_client/models/role_enum.rb +49 -0
  122. data/lib/merge_accounting_client/models/tax_rate.rb +11 -2
  123. data/lib/merge_accounting_client/models/tracking_category.rb +12 -3
  124. data/lib/merge_accounting_client/models/transaction.rb +23 -3
  125. data/lib/merge_accounting_client/models/transaction_line_item.rb +29 -1
  126. data/lib/merge_accounting_client/models/vendor_credit.rb +23 -3
  127. data/lib/merge_accounting_client/models/vendor_credit_line.rb +29 -1
  128. data/lib/merge_accounting_client/version.rb +1 -1
  129. data/lib/merge_accounting_client.rb +13 -9
  130. data/spec/api/accounting_periods_api_spec.rb +63 -0
  131. data/spec/api/audit_trail_api_spec.rb +51 -0
  132. data/spec/api/contacts_api_spec.rb +2 -0
  133. data/spec/api/linked_accounts_api_spec.rb +1 -1
  134. data/spec/api/sync_status_api_spec.rb +1 -1
  135. data/spec/models/account_integration_spec.rb +6 -0
  136. data/spec/models/account_spec.rb +6 -0
  137. data/spec/models/accounting_attachment_spec.rb +6 -0
  138. data/spec/models/accounting_period_spec.rb +70 -0
  139. data/spec/models/accounting_period_status_enum_spec.rb +28 -0
  140. data/spec/models/accounting_phone_number_spec.rb +6 -0
  141. data/spec/models/address_request_spec.rb +82 -0
  142. data/spec/models/address_spec.rb +6 -0
  143. data/spec/models/audit_log_event_spec.rb +76 -0
  144. data/spec/models/balance_sheet_spec.rb +6 -0
  145. data/spec/models/cash_flow_statement_spec.rb +6 -0
  146. data/spec/models/company_info_spec.rb +6 -0
  147. data/spec/models/contact_spec.rb +6 -0
  148. data/spec/models/credit_note_line_item_spec.rb +18 -0
  149. data/spec/models/credit_note_spec.rb +18 -0
  150. data/spec/models/event_type_enum_spec.rb +28 -0
  151. data/spec/models/expense_line_request_spec.rb +6 -0
  152. data/spec/models/expense_line_spec.rb +24 -0
  153. data/spec/models/expense_request_spec.rb +18 -0
  154. data/spec/models/expense_spec.rb +24 -0
  155. data/spec/models/income_statement_spec.rb +6 -0
  156. data/spec/models/invoice_line_item_spec.rb +12 -0
  157. data/spec/models/invoice_request_spec.rb +12 -0
  158. data/spec/models/invoice_spec.rb +30 -0
  159. data/spec/models/invoice_status_enum_spec.rb +28 -0
  160. data/spec/models/item_spec.rb +6 -0
  161. data/spec/models/journal_entry_request_spec.rb +12 -0
  162. data/spec/models/journal_entry_spec.rb +24 -0
  163. data/spec/models/journal_line_request_spec.rb +12 -0
  164. data/spec/models/journal_line_spec.rb +30 -0
  165. data/spec/models/paginated_accounting_period_list_spec.rb +46 -0
  166. data/spec/models/paginated_audit_log_event_list_spec.rb +46 -0
  167. data/spec/models/payment_line_item_request_spec.rb +70 -0
  168. data/spec/models/payment_line_item_spec.rb +76 -0
  169. data/spec/models/payment_request_spec.rb +12 -0
  170. data/spec/models/payment_spec.rb +18 -0
  171. data/spec/models/purchase_order_line_item_spec.rb +18 -0
  172. data/spec/models/purchase_order_request_spec.rb +6 -0
  173. data/spec/models/purchase_order_spec.rb +18 -0
  174. data/spec/models/report_item_spec.rb +6 -0
  175. data/spec/models/role_enum_spec.rb +28 -0
  176. data/spec/models/tax_rate_spec.rb +6 -0
  177. data/spec/models/tracking_category_spec.rb +6 -0
  178. data/spec/models/transaction_line_item_spec.rb +18 -0
  179. data/spec/models/transaction_spec.rb +12 -0
  180. data/spec/models/vendor_credit_line_spec.rb +18 -0
  181. data/spec/models/vendor_credit_spec.rb +12 -0
  182. metadata +204 -152
@@ -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,13 @@ 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
+
39
52
  # This is the datetime that this object was last updated by Merge
40
53
  attr_accessor :modified_at
41
54
 
@@ -47,9 +60,14 @@ module MergeAccountingClient
47
60
  :'net_amount' => :'net_amount',
48
61
  :'tracking_category' => :'tracking_category',
49
62
  :'tracking_categories' => :'tracking_categories',
63
+ :'currency' => :'currency',
64
+ :'company' => :'company',
50
65
  :'contact' => :'contact',
51
66
  :'description' => :'description',
52
67
  :'exchange_rate' => :'exchange_rate',
68
+ :'remote_was_deleted' => :'remote_was_deleted',
69
+ :'id' => :'id',
70
+ :'created_at' => :'created_at',
53
71
  :'modified_at' => :'modified_at'
54
72
  }
55
73
  end
@@ -67,9 +85,14 @@ module MergeAccountingClient
67
85
  :'net_amount' => :'Float',
68
86
  :'tracking_category' => :'String',
69
87
  :'tracking_categories' => :'Array<String>',
88
+ :'currency' => :'CurrencyEnum',
89
+ :'company' => :'String',
70
90
  :'contact' => :'String',
71
91
  :'description' => :'String',
72
92
  :'exchange_rate' => :'String',
93
+ :'remote_was_deleted' => :'Boolean',
94
+ :'id' => :'String',
95
+ :'created_at' => :'Time',
73
96
  :'modified_at' => :'Time'
74
97
  }
75
98
  end
@@ -81,6 +104,8 @@ module MergeAccountingClient
81
104
  :'account',
82
105
  :'net_amount',
83
106
  :'tracking_category',
107
+ :'currency',
108
+ :'company',
84
109
  :'contact',
85
110
  :'description',
86
111
  :'exchange_rate',
@@ -124,6 +149,14 @@ module MergeAccountingClient
124
149
  end
125
150
  end
126
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
+
127
160
  if attributes.key?(:'contact')
128
161
  self.contact = attributes[:'contact']
129
162
  end
@@ -136,6 +169,18 @@ module MergeAccountingClient
136
169
  self.exchange_rate = attributes[:'exchange_rate']
137
170
  end
138
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
+
139
184
  if attributes.key?(:'modified_at')
140
185
  self.modified_at = attributes[:'modified_at']
141
186
  end
@@ -181,9 +226,14 @@ module MergeAccountingClient
181
226
  net_amount == o.net_amount &&
182
227
  tracking_category == o.tracking_category &&
183
228
  tracking_categories == o.tracking_categories &&
229
+ currency == o.currency &&
230
+ company == o.company &&
184
231
  contact == o.contact &&
185
232
  description == o.description &&
186
233
  exchange_rate == o.exchange_rate &&
234
+ remote_was_deleted == o.remote_was_deleted &&
235
+ id == o.id &&
236
+ created_at == o.created_at &&
187
237
  modified_at == o.modified_at
188
238
  end
189
239
 
@@ -196,7 +246,7 @@ module MergeAccountingClient
196
246
  # Calculates hash code according to all attributes.
197
247
  # @return [Integer] Hash code
198
248
  def hash
199
- [remote_id, account, net_amount, tracking_category, tracking_categories, contact, description, exchange_rate, modified_at].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
200
250
  end
201
251
 
202
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
@@ -0,0 +1,240 @@
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 PaginatedAccountingPeriodList
18
+ attr_accessor :_next
19
+
20
+ attr_accessor :previous
21
+
22
+ attr_accessor :results
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'_next' => :'next',
28
+ :'previous' => :'previous',
29
+ :'results' => :'results'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'_next' => :'String',
42
+ :'previous' => :'String',
43
+ :'results' => :'Array<AccountingPeriod>'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ :'_next',
51
+ :'previous',
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeAccountingClient::PaginatedAccountingPeriodList` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeAccountingClient::PaginatedAccountingPeriodList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'_next')
71
+ self._next = attributes[:'_next']
72
+ end
73
+
74
+ if attributes.key?(:'previous')
75
+ self.previous = attributes[:'previous']
76
+ end
77
+
78
+ if attributes.key?(:'results')
79
+ if (value = attributes[:'results']).is_a?(Array)
80
+ self.results = value
81
+ end
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ invalid_properties = Array.new
89
+ invalid_properties
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ _next == o._next &&
104
+ previous == o.previous &&
105
+ results == o.results
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Integer] Hash code
116
+ def hash
117
+ [_next, previous, results].hash
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def self.build_from_hash(attributes)
124
+ new.build_from_hash(attributes)
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = MergeAccountingClient.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end