merge_accounting_client 1.0.7 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -13
  3. data/docs/Account.md +2 -0
  4. data/docs/AccountIntegration.md +5 -1
  5. data/docs/AccountingAttachment.md +2 -0
  6. data/docs/AccountingPhoneNumber.md +3 -1
  7. data/docs/AccountsApi.md +4 -4
  8. data/docs/Address.md +4 -2
  9. data/docs/AsyncPassthroughApi.md +155 -0
  10. data/docs/AsyncPassthroughReciept.md +18 -0
  11. data/docs/AttachmentsApi.md +4 -4
  12. data/docs/BalanceSheet.md +2 -0
  13. data/docs/BalanceSheetsApi.md +4 -4
  14. data/docs/CashFlowStatement.md +2 -0
  15. data/docs/CashFlowStatementsApi.md +4 -4
  16. data/docs/CompanyInfo.md +3 -1
  17. data/docs/CompanyInfoApi.md +4 -4
  18. data/docs/Contact.md +2 -0
  19. data/docs/ContactsApi.md +4 -4
  20. data/docs/CreditNote.md +6 -0
  21. data/docs/CreditNoteLineItem.md +3 -1
  22. data/docs/CreditNotesApi.md +4 -4
  23. data/docs/DeleteAccountApi.md +9 -9
  24. data/docs/EndUserDetailsRequest.md +1 -1
  25. data/docs/Expense.md +4 -0
  26. data/docs/ExpenseLine.md +3 -1
  27. data/docs/ExpenseRequest.md +2 -0
  28. data/docs/ExpensesApi.md +4 -4
  29. data/docs/ForceResyncApi.md +1 -1
  30. data/docs/IncomeStatement.md +2 -0
  31. data/docs/IncomeStatementsApi.md +4 -4
  32. data/docs/Invoice.md +7 -3
  33. data/docs/InvoiceLineItem.md +2 -0
  34. data/docs/InvoiceRequest.md +3 -1
  35. data/docs/InvoicesApi.md +4 -4
  36. data/docs/Issue.md +1 -1
  37. data/docs/IssuesApi.md +6 -6
  38. data/docs/Item.md +2 -0
  39. data/docs/ItemsApi.md +4 -4
  40. data/docs/JournalEntriesApi.md +4 -4
  41. data/docs/JournalEntry.md +4 -0
  42. data/docs/JournalLine.md +3 -1
  43. data/docs/LinkedAccountsApi.md +2 -2
  44. data/docs/Payment.md +4 -0
  45. data/docs/PaymentRequest.md +2 -0
  46. data/docs/PaymentsApi.md +4 -4
  47. data/docs/PurchaseOrder.md +4 -0
  48. data/docs/PurchaseOrderLineItem.md +3 -1
  49. data/docs/PurchaseOrdersApi.md +4 -4
  50. data/docs/RemoteData.md +1 -1
  51. data/docs/ReportItem.md +3 -1
  52. data/docs/SyncStatus.md +1 -1
  53. data/docs/SyncStatusApi.md +1 -1
  54. data/docs/TaxRate.md +2 -0
  55. data/docs/TaxRatesApi.md +4 -4
  56. data/docs/TrackingCategoriesApi.md +4 -4
  57. data/docs/TrackingCategory.md +2 -0
  58. data/docs/Transaction.md +2 -0
  59. data/docs/TransactionLineItem.md +3 -1
  60. data/docs/TransactionsApi.md +4 -4
  61. data/docs/VendorCredit.md +4 -0
  62. data/docs/VendorCreditLine.md +3 -1
  63. data/docs/VendorCreditsApi.md +4 -4
  64. data/git_push.sh +58 -0
  65. data/lib/merge_accounting_client/api/accounts_api.rb +4 -4
  66. data/lib/merge_accounting_client/api/async_passthrough_api.rb +160 -0
  67. data/lib/merge_accounting_client/api/attachments_api.rb +4 -4
  68. data/lib/merge_accounting_client/api/balance_sheets_api.rb +4 -4
  69. data/lib/merge_accounting_client/api/cash_flow_statements_api.rb +4 -4
  70. data/lib/merge_accounting_client/api/company_info_api.rb +4 -4
  71. data/lib/merge_accounting_client/api/contacts_api.rb +4 -4
  72. data/lib/merge_accounting_client/api/credit_notes_api.rb +6 -6
  73. data/lib/merge_accounting_client/api/delete_account_api.rb +7 -7
  74. data/lib/merge_accounting_client/api/expenses_api.rb +6 -6
  75. data/lib/merge_accounting_client/api/force_resync_api.rb +2 -2
  76. data/lib/merge_accounting_client/api/income_statements_api.rb +4 -4
  77. data/lib/merge_accounting_client/api/invoices_api.rb +6 -6
  78. data/lib/merge_accounting_client/api/issues_api.rb +6 -6
  79. data/lib/merge_accounting_client/api/items_api.rb +4 -4
  80. data/lib/merge_accounting_client/api/journal_entries_api.rb +6 -6
  81. data/lib/merge_accounting_client/api/linked_accounts_api.rb +2 -2
  82. data/lib/merge_accounting_client/api/payments_api.rb +6 -6
  83. data/lib/merge_accounting_client/api/purchase_orders_api.rb +6 -6
  84. data/lib/merge_accounting_client/api/sync_status_api.rb +2 -2
  85. data/lib/merge_accounting_client/api/tax_rates_api.rb +4 -4
  86. data/lib/merge_accounting_client/api/tracking_categories_api.rb +4 -4
  87. data/lib/merge_accounting_client/api/transactions_api.rb +4 -4
  88. data/lib/merge_accounting_client/api/vendor_credits_api.rb +6 -6
  89. data/lib/merge_accounting_client/models/account.rb +11 -1
  90. data/lib/merge_accounting_client/models/account_integration.rb +26 -4
  91. data/lib/merge_accounting_client/models/accounting_attachment.rb +11 -1
  92. data/lib/merge_accounting_client/models/accounting_phone_number.rb +15 -5
  93. data/lib/merge_accounting_client/models/address.rb +15 -5
  94. data/lib/merge_accounting_client/models/async_passthrough_reciept.rb +223 -0
  95. data/lib/merge_accounting_client/models/balance_sheet.rb +11 -1
  96. data/lib/merge_accounting_client/models/cash_flow_statement.rb +11 -1
  97. data/lib/merge_accounting_client/models/company_info.rb +11 -1
  98. data/lib/merge_accounting_client/models/contact.rb +11 -1
  99. data/lib/merge_accounting_client/models/credit_note.rb +50 -1
  100. data/lib/merge_accounting_client/models/credit_note_line_item.rb +15 -5
  101. data/lib/merge_accounting_client/models/end_user_details_request.rb +1 -1
  102. data/lib/merge_accounting_client/models/expense.rb +22 -1
  103. data/lib/merge_accounting_client/models/expense_line.rb +15 -5
  104. data/lib/merge_accounting_client/models/expense_request.rb +12 -1
  105. data/lib/merge_accounting_client/models/income_statement.rb +11 -1
  106. data/lib/merge_accounting_client/models/invoice.rb +33 -12
  107. data/lib/merge_accounting_client/models/invoice_line_item.rb +12 -2
  108. data/lib/merge_accounting_client/models/invoice_line_item_request.rb +1 -1
  109. data/lib/merge_accounting_client/models/invoice_request.rb +13 -2
  110. data/lib/merge_accounting_client/models/issue.rb +1 -0
  111. data/lib/merge_accounting_client/models/item.rb +11 -1
  112. data/lib/merge_accounting_client/models/journal_entry.rb +22 -1
  113. data/lib/merge_accounting_client/models/journal_line.rb +15 -5
  114. data/lib/merge_accounting_client/models/payment.rb +22 -1
  115. data/lib/merge_accounting_client/models/payment_request.rb +12 -1
  116. data/lib/merge_accounting_client/models/purchase_order.rb +22 -1
  117. data/lib/merge_accounting_client/models/purchase_order_line_item.rb +15 -5
  118. data/lib/merge_accounting_client/models/remote_data.rb +3 -4
  119. data/lib/merge_accounting_client/models/report_item.rb +15 -5
  120. data/lib/merge_accounting_client/models/sync_status_status_enum.rb +2 -1
  121. data/lib/merge_accounting_client/models/tax_rate.rb +11 -1
  122. data/lib/merge_accounting_client/models/tracking_category.rb +11 -1
  123. data/lib/merge_accounting_client/models/transaction.rb +11 -1
  124. data/lib/merge_accounting_client/models/transaction_line_item.rb +15 -5
  125. data/lib/merge_accounting_client/models/vendor_credit.rb +22 -1
  126. data/lib/merge_accounting_client/models/vendor_credit_line.rb +15 -5
  127. data/lib/merge_accounting_client/version.rb +1 -1
  128. data/lib/merge_accounting_client.rb +6 -2
  129. data/spec/api/accounts_api_spec.rb +2 -2
  130. data/spec/api/async_passthrough_api_spec.rb +59 -0
  131. data/spec/api/attachments_api_spec.rb +2 -2
  132. data/spec/api/balance_sheets_api_spec.rb +2 -2
  133. data/spec/api/cash_flow_statements_api_spec.rb +2 -2
  134. data/spec/api/company_info_api_spec.rb +2 -2
  135. data/spec/api/contacts_api_spec.rb +2 -2
  136. data/spec/api/credit_notes_api_spec.rb +2 -2
  137. data/spec/api/delete_account_api_spec.rb +2 -2
  138. data/spec/api/expenses_api_spec.rb +2 -2
  139. data/spec/api/force_resync_api_spec.rb +1 -1
  140. data/spec/api/income_statements_api_spec.rb +2 -2
  141. data/spec/api/invoices_api_spec.rb +2 -2
  142. data/spec/api/issues_api_spec.rb +3 -3
  143. data/spec/api/items_api_spec.rb +2 -2
  144. data/spec/api/journal_entries_api_spec.rb +2 -2
  145. data/spec/api/linked_accounts_api_spec.rb +1 -1
  146. data/spec/api/payments_api_spec.rb +2 -2
  147. data/spec/api/purchase_orders_api_spec.rb +2 -2
  148. data/spec/api/sync_status_api_spec.rb +1 -1
  149. data/spec/api/tax_rates_api_spec.rb +2 -2
  150. data/spec/api/tracking_categories_api_spec.rb +2 -2
  151. data/spec/api/transactions_api_spec.rb +2 -2
  152. data/spec/api/vendor_credits_api_spec.rb +2 -2
  153. data/spec/models/account_integration_spec.rb +12 -0
  154. data/spec/models/account_spec.rb +6 -0
  155. data/spec/models/accounting_attachment_spec.rb +6 -0
  156. data/spec/models/accounting_phone_number_spec.rb +6 -0
  157. data/spec/models/address_spec.rb +6 -0
  158. data/spec/models/async_passthrough_reciept_spec.rb +34 -0
  159. data/spec/models/balance_sheet_spec.rb +6 -0
  160. data/spec/models/cash_flow_statement_spec.rb +6 -0
  161. data/spec/models/company_info_spec.rb +6 -0
  162. data/spec/models/contact_spec.rb +6 -0
  163. data/spec/models/credit_note_line_item_spec.rb +6 -0
  164. data/spec/models/credit_note_spec.rb +18 -0
  165. data/spec/models/expense_line_spec.rb +6 -0
  166. data/spec/models/expense_request_spec.rb +6 -0
  167. data/spec/models/expense_spec.rb +12 -0
  168. data/spec/models/income_statement_spec.rb +6 -0
  169. data/spec/models/invoice_line_item_spec.rb +6 -0
  170. data/spec/models/invoice_request_spec.rb +6 -0
  171. data/spec/models/invoice_spec.rb +14 -2
  172. data/spec/models/item_spec.rb +6 -0
  173. data/spec/models/journal_entry_spec.rb +12 -0
  174. data/spec/models/journal_line_spec.rb +6 -0
  175. data/spec/models/payment_request_spec.rb +6 -0
  176. data/spec/models/payment_spec.rb +12 -0
  177. data/spec/models/purchase_order_line_item_spec.rb +6 -0
  178. data/spec/models/purchase_order_spec.rb +12 -0
  179. data/spec/models/report_item_spec.rb +6 -0
  180. data/spec/models/tax_rate_spec.rb +6 -0
  181. data/spec/models/tracking_category_spec.rb +6 -0
  182. data/spec/models/transaction_line_item_spec.rb +6 -0
  183. data/spec/models/transaction_spec.rb +6 -0
  184. data/spec/models/vendor_credit_line_spec.rb +6 -0
  185. data/spec/models/vendor_credit_spec.rb +12 -0
  186. metadata +160 -151
@@ -33,7 +33,7 @@ module MergeAccountingClient
33
33
  # An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
34
34
  attr_accessor :link_expiry_mins
35
35
 
36
- # Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/product/integrations,-fast.-say-hello-to-magic-link/.
36
+ # Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
37
37
  attr_accessor :should_create_magic_link_url
38
38
 
39
39
  # An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
@@ -45,6 +45,8 @@ module MergeAccountingClient
45
45
 
46
46
  attr_accessor :lines
47
47
 
48
+ attr_accessor :tracking_categories
49
+
48
50
  # Indicates whether or not this object has been deleted by third party webhooks.
49
51
  attr_accessor :remote_was_deleted
50
52
 
@@ -53,6 +55,9 @@ module MergeAccountingClient
53
55
  # The third-party API ID of the matching object.
54
56
  attr_accessor :remote_id
55
57
 
58
+ # This is the datetime that this object was last updated by Merge
59
+ attr_accessor :modified_at
60
+
56
61
  attr_accessor :field_mappings
57
62
 
58
63
  attr_accessor :remote_data
@@ -70,9 +75,11 @@ module MergeAccountingClient
70
75
  :'company' => :'company',
71
76
  :'memo' => :'memo',
72
77
  :'lines' => :'lines',
78
+ :'tracking_categories' => :'tracking_categories',
73
79
  :'remote_was_deleted' => :'remote_was_deleted',
74
80
  :'id' => :'id',
75
81
  :'remote_id' => :'remote_id',
82
+ :'modified_at' => :'modified_at',
76
83
  :'field_mappings' => :'field_mappings',
77
84
  :'remote_data' => :'remote_data'
78
85
  }
@@ -96,9 +103,11 @@ module MergeAccountingClient
96
103
  :'company' => :'String',
97
104
  :'memo' => :'String',
98
105
  :'lines' => :'Array<ExpenseLine>',
106
+ :'tracking_categories' => :'Array<String>',
99
107
  :'remote_was_deleted' => :'Boolean',
100
108
  :'id' => :'String',
101
109
  :'remote_id' => :'String',
110
+ :'modified_at' => :'Time',
102
111
  :'field_mappings' => :'Hash<String, Object>',
103
112
  :'remote_data' => :'Array<RemoteData>'
104
113
  }
@@ -179,6 +188,12 @@ module MergeAccountingClient
179
188
  end
180
189
  end
181
190
 
191
+ if attributes.key?(:'tracking_categories')
192
+ if (value = attributes[:'tracking_categories']).is_a?(Array)
193
+ self.tracking_categories = value
194
+ end
195
+ end
196
+
182
197
  if attributes.key?(:'remote_was_deleted')
183
198
  self.remote_was_deleted = attributes[:'remote_was_deleted']
184
199
  end
@@ -191,6 +206,10 @@ module MergeAccountingClient
191
206
  self.remote_id = attributes[:'remote_id']
192
207
  end
193
208
 
209
+ if attributes.key?(:'modified_at')
210
+ self.modified_at = attributes[:'modified_at']
211
+ end
212
+
194
213
  if attributes.key?(:'field_mappings')
195
214
  if (value = attributes[:'field_mappings']).is_a?(Hash)
196
215
  self.field_mappings = value
@@ -249,9 +268,11 @@ module MergeAccountingClient
249
268
  company == o.company &&
250
269
  memo == o.memo &&
251
270
  lines == o.lines &&
271
+ tracking_categories == o.tracking_categories &&
252
272
  remote_was_deleted == o.remote_was_deleted &&
253
273
  id == o.id &&
254
274
  remote_id == o.remote_id &&
275
+ modified_at == o.modified_at &&
255
276
  field_mappings == o.field_mappings &&
256
277
  remote_data == o.remote_data
257
278
  end
@@ -265,7 +286,7 @@ module MergeAccountingClient
265
286
  # Calculates hash code according to all attributes.
266
287
  # @return [Integer] Hash code
267
288
  def hash
268
- [transaction_date, remote_created_at, account, contact, total_amount, currency, exchange_rate, company, memo, lines, remote_was_deleted, id, remote_id, field_mappings, remote_data].hash
289
+ [transaction_date, remote_created_at, account, contact, total_amount, currency, exchange_rate, company, memo, lines, tracking_categories, remote_was_deleted, id, remote_id, modified_at, field_mappings, remote_data].hash
269
290
  end
270
291
 
271
292
  # Builds the object from hash
@@ -44,6 +44,9 @@ module MergeAccountingClient
44
44
  # The expense line item's exchange rate.
45
45
  attr_accessor :exchange_rate
46
46
 
47
+ # This is the datetime that this object was last updated by Merge
48
+ attr_accessor :modified_at
49
+
47
50
  # Attribute mapping from ruby-style variable name to JSON key.
48
51
  def self.attribute_map
49
52
  {
@@ -56,7 +59,8 @@ module MergeAccountingClient
56
59
  :'account' => :'account',
57
60
  :'contact' => :'contact',
58
61
  :'description' => :'description',
59
- :'exchange_rate' => :'exchange_rate'
62
+ :'exchange_rate' => :'exchange_rate',
63
+ :'modified_at' => :'modified_at'
60
64
  }
61
65
  end
62
66
 
@@ -77,7 +81,8 @@ module MergeAccountingClient
77
81
  :'account' => :'String',
78
82
  :'contact' => :'String',
79
83
  :'description' => :'String',
80
- :'exchange_rate' => :'String'
84
+ :'exchange_rate' => :'String',
85
+ :'modified_at' => :'Time'
81
86
  }
82
87
  end
83
88
 
@@ -92,7 +97,7 @@ module MergeAccountingClient
92
97
  :'account',
93
98
  :'contact',
94
99
  :'description',
95
- :'exchange_rate'
100
+ :'exchange_rate',
96
101
  ])
97
102
  end
98
103
 
@@ -152,6 +157,10 @@ module MergeAccountingClient
152
157
  if attributes.key?(:'exchange_rate')
153
158
  self.exchange_rate = attributes[:'exchange_rate']
154
159
  end
160
+
161
+ if attributes.key?(:'modified_at')
162
+ self.modified_at = attributes[:'modified_at']
163
+ end
155
164
  end
156
165
 
157
166
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -198,7 +207,8 @@ module MergeAccountingClient
198
207
  account == o.account &&
199
208
  contact == o.contact &&
200
209
  description == o.description &&
201
- exchange_rate == o.exchange_rate
210
+ exchange_rate == o.exchange_rate &&
211
+ modified_at == o.modified_at
202
212
  end
203
213
 
204
214
  # @see the `==` method
@@ -210,7 +220,7 @@ module MergeAccountingClient
210
220
  # Calculates hash code according to all attributes.
211
221
  # @return [Integer] Hash code
212
222
  def hash
213
- [remote_id, item, net_amount, tracking_category, tracking_categories, company, account, contact, description, exchange_rate].hash
223
+ [remote_id, item, net_amount, tracking_category, tracking_categories, company, account, contact, description, exchange_rate, modified_at].hash
214
224
  end
215
225
 
216
226
  # Builds the object from hash
@@ -42,6 +42,8 @@ module MergeAccountingClient
42
42
 
43
43
  attr_accessor :lines
44
44
 
45
+ attr_accessor :tracking_categories
46
+
45
47
  attr_accessor :integration_params
46
48
 
47
49
  attr_accessor :linked_account_params
@@ -58,6 +60,7 @@ module MergeAccountingClient
58
60
  :'company' => :'company',
59
61
  :'memo' => :'memo',
60
62
  :'lines' => :'lines',
63
+ :'tracking_categories' => :'tracking_categories',
61
64
  :'integration_params' => :'integration_params',
62
65
  :'linked_account_params' => :'linked_account_params'
63
66
  }
@@ -80,6 +83,7 @@ module MergeAccountingClient
80
83
  :'company' => :'String',
81
84
  :'memo' => :'String',
82
85
  :'lines' => :'Array<ExpenseLineRequest>',
86
+ :'tracking_categories' => :'Array<String>',
83
87
  :'integration_params' => :'Hash<String, Object>',
84
88
  :'linked_account_params' => :'Hash<String, Object>'
85
89
  }
@@ -154,6 +158,12 @@ module MergeAccountingClient
154
158
  end
155
159
  end
156
160
 
161
+ if attributes.key?(:'tracking_categories')
162
+ if (value = attributes[:'tracking_categories']).is_a?(Array)
163
+ self.tracking_categories = value
164
+ end
165
+ end
166
+
157
167
  if attributes.key?(:'integration_params')
158
168
  if (value = attributes[:'integration_params']).is_a?(Hash)
159
169
  self.integration_params = value
@@ -211,6 +221,7 @@ module MergeAccountingClient
211
221
  company == o.company &&
212
222
  memo == o.memo &&
213
223
  lines == o.lines &&
224
+ tracking_categories == o.tracking_categories &&
214
225
  integration_params == o.integration_params &&
215
226
  linked_account_params == o.linked_account_params
216
227
  end
@@ -224,7 +235,7 @@ module MergeAccountingClient
224
235
  # Calculates hash code according to all attributes.
225
236
  # @return [Integer] Hash code
226
237
  def hash
227
- [transaction_date, account, contact, total_amount, currency, exchange_rate, company, memo, lines, integration_params, linked_account_params].hash
238
+ [transaction_date, account, contact, total_amount, currency, exchange_rate, company, memo, lines, tracking_categories, integration_params, linked_account_params].hash
228
239
  end
229
240
 
230
241
  # Builds the object from hash
@@ -56,6 +56,9 @@ module MergeAccountingClient
56
56
  # Indicates whether or not this object has been deleted by third party webhooks.
57
57
  attr_accessor :remote_was_deleted
58
58
 
59
+ # This is the datetime that this object was last updated by Merge
60
+ attr_accessor :modified_at
61
+
59
62
  attr_accessor :field_mappings
60
63
 
61
64
  attr_accessor :remote_data
@@ -78,6 +81,7 @@ module MergeAccountingClient
78
81
  :'non_operating_expenses' => :'non_operating_expenses',
79
82
  :'net_income' => :'net_income',
80
83
  :'remote_was_deleted' => :'remote_was_deleted',
84
+ :'modified_at' => :'modified_at',
81
85
  :'field_mappings' => :'field_mappings',
82
86
  :'remote_data' => :'remote_data'
83
87
  }
@@ -106,6 +110,7 @@ module MergeAccountingClient
106
110
  :'non_operating_expenses' => :'Array<ReportItem>',
107
111
  :'net_income' => :'Float',
108
112
  :'remote_was_deleted' => :'Boolean',
113
+ :'modified_at' => :'Time',
109
114
  :'field_mappings' => :'Hash<String, Object>',
110
115
  :'remote_data' => :'Array<RemoteData>'
111
116
  }
@@ -211,6 +216,10 @@ module MergeAccountingClient
211
216
  self.remote_was_deleted = attributes[:'remote_was_deleted']
212
217
  end
213
218
 
219
+ if attributes.key?(:'modified_at')
220
+ self.modified_at = attributes[:'modified_at']
221
+ end
222
+
214
223
  if attributes.key?(:'field_mappings')
215
224
  if (value = attributes[:'field_mappings']).is_a?(Hash)
216
225
  self.field_mappings = value
@@ -257,6 +266,7 @@ module MergeAccountingClient
257
266
  non_operating_expenses == o.non_operating_expenses &&
258
267
  net_income == o.net_income &&
259
268
  remote_was_deleted == o.remote_was_deleted &&
269
+ modified_at == o.modified_at &&
260
270
  field_mappings == o.field_mappings &&
261
271
  remote_data == o.remote_data
262
272
  end
@@ -270,7 +280,7 @@ module MergeAccountingClient
270
280
  # Calculates hash code according to all attributes.
271
281
  # @return [Integer] Hash code
272
282
  def hash
273
- [id, remote_id, name, currency, company, start_period, end_period, income, cost_of_sales, gross_profit, operating_expenses, net_operating_income, non_operating_expenses, net_income, remote_was_deleted, field_mappings, remote_data].hash
283
+ [id, remote_id, name, currency, company, start_period, end_period, income, cost_of_sales, gross_profit, operating_expenses, net_operating_income, non_operating_expenses, net_income, remote_was_deleted, modified_at, field_mappings, remote_data].hash
274
284
  end
275
285
 
276
286
  # Builds the object from hash
@@ -14,9 +14,11 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeAccountingClient
17
- # # The Invoice Object ### Description The `Invoice` object represents an itemized record of goods and/or services sold to a customer. If type = accounts_payable `Invoice` is a bill, if type = accounts_receivable it's an invoice. ### Usage Example Fetch from the `LIST Invoices` endpoint and view a company's invoices.
17
+ # # The Invoice Object ### Description The `Invoice` object represents an itemized record of goods and/or services sold to a customer. ### Usage Example Fetch from the `LIST Invoices` endpoint and view a company's invoices.
18
18
  class Invoice
19
- # Whether the invoice is an accounts receivable or accounts payable. Accounts payable invoices are commonly referred to as Bills. * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
19
+ attr_accessor :id
20
+
21
+ # Whether the invoice is an accounts receivable or accounts payable. If `type` is `accounts_payable`, the invoice is a bill. If `type` is `accounts_receivable`, it is an invoice. * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
20
22
  attr_accessor :type
21
23
 
22
24
  # The invoice's contact.
@@ -64,6 +66,8 @@ module MergeAccountingClient
64
66
  # When the third party's invoice entry was updated.
65
67
  attr_accessor :remote_updated_at
66
68
 
69
+ attr_accessor :tracking_categories
70
+
67
71
  # Array of `Payment` object IDs.
68
72
  attr_accessor :payments
69
73
 
@@ -71,11 +75,12 @@ module MergeAccountingClient
71
75
 
72
76
  attr_accessor :remote_was_deleted
73
77
 
74
- attr_accessor :id
75
-
76
78
  # The third-party API ID of the matching object.
77
79
  attr_accessor :remote_id
78
80
 
81
+ # This is the datetime that this object was last updated by Merge
82
+ attr_accessor :modified_at
83
+
79
84
  attr_accessor :field_mappings
80
85
 
81
86
  attr_accessor :remote_data
@@ -83,6 +88,7 @@ module MergeAccountingClient
83
88
  # Attribute mapping from ruby-style variable name to JSON key.
84
89
  def self.attribute_map
85
90
  {
91
+ :'id' => :'id',
86
92
  :'type' => :'type',
87
93
  :'contact' => :'contact',
88
94
  :'number' => :'number',
@@ -99,11 +105,12 @@ module MergeAccountingClient
99
105
  :'total_amount' => :'total_amount',
100
106
  :'balance' => :'balance',
101
107
  :'remote_updated_at' => :'remote_updated_at',
108
+ :'tracking_categories' => :'tracking_categories',
102
109
  :'payments' => :'payments',
103
110
  :'line_items' => :'line_items',
104
111
  :'remote_was_deleted' => :'remote_was_deleted',
105
- :'id' => :'id',
106
112
  :'remote_id' => :'remote_id',
113
+ :'modified_at' => :'modified_at',
107
114
  :'field_mappings' => :'field_mappings',
108
115
  :'remote_data' => :'remote_data'
109
116
  }
@@ -117,6 +124,7 @@ module MergeAccountingClient
117
124
  # Attribute type mapping.
118
125
  def self.openapi_types
119
126
  {
127
+ :'id' => :'String',
120
128
  :'type' => :'InvoiceTypeEnum',
121
129
  :'contact' => :'String',
122
130
  :'number' => :'String',
@@ -133,11 +141,12 @@ module MergeAccountingClient
133
141
  :'total_amount' => :'Float',
134
142
  :'balance' => :'Float',
135
143
  :'remote_updated_at' => :'Time',
144
+ :'tracking_categories' => :'Array<String>',
136
145
  :'payments' => :'Array<String>',
137
146
  :'line_items' => :'Array<InvoiceLineItem>',
138
147
  :'remote_was_deleted' => :'Boolean',
139
- :'id' => :'String',
140
148
  :'remote_id' => :'String',
149
+ :'modified_at' => :'Time',
141
150
  :'field_mappings' => :'Hash<String, Object>',
142
151
  :'remote_data' => :'Array<RemoteData>'
143
152
  }
@@ -183,6 +192,10 @@ module MergeAccountingClient
183
192
  h[k.to_sym] = v
184
193
  }
185
194
 
195
+ if attributes.key?(:'id')
196
+ self.id = attributes[:'id']
197
+ end
198
+
186
199
  if attributes.key?(:'type')
187
200
  self.type = attributes[:'type']
188
201
  end
@@ -247,6 +260,12 @@ module MergeAccountingClient
247
260
  self.remote_updated_at = attributes[:'remote_updated_at']
248
261
  end
249
262
 
263
+ if attributes.key?(:'tracking_categories')
264
+ if (value = attributes[:'tracking_categories']).is_a?(Array)
265
+ self.tracking_categories = value
266
+ end
267
+ end
268
+
250
269
  if attributes.key?(:'payments')
251
270
  if (value = attributes[:'payments']).is_a?(Array)
252
271
  self.payments = value
@@ -263,14 +282,14 @@ module MergeAccountingClient
263
282
  self.remote_was_deleted = attributes[:'remote_was_deleted']
264
283
  end
265
284
 
266
- if attributes.key?(:'id')
267
- self.id = attributes[:'id']
268
- end
269
-
270
285
  if attributes.key?(:'remote_id')
271
286
  self.remote_id = attributes[:'remote_id']
272
287
  end
273
288
 
289
+ if attributes.key?(:'modified_at')
290
+ self.modified_at = attributes[:'modified_at']
291
+ end
292
+
274
293
  if attributes.key?(:'field_mappings')
275
294
  if (value = attributes[:'field_mappings']).is_a?(Hash)
276
295
  self.field_mappings = value
@@ -319,6 +338,7 @@ module MergeAccountingClient
319
338
  def ==(o)
320
339
  return true if self.equal?(o)
321
340
  self.class == o.class &&
341
+ id == o.id &&
322
342
  type == o.type &&
323
343
  contact == o.contact &&
324
344
  number == o.number &&
@@ -335,11 +355,12 @@ module MergeAccountingClient
335
355
  total_amount == o.total_amount &&
336
356
  balance == o.balance &&
337
357
  remote_updated_at == o.remote_updated_at &&
358
+ tracking_categories == o.tracking_categories &&
338
359
  payments == o.payments &&
339
360
  line_items == o.line_items &&
340
361
  remote_was_deleted == o.remote_was_deleted &&
341
- id == o.id &&
342
362
  remote_id == o.remote_id &&
363
+ modified_at == o.modified_at &&
343
364
  field_mappings == o.field_mappings &&
344
365
  remote_data == o.remote_data
345
366
  end
@@ -353,7 +374,7 @@ module MergeAccountingClient
353
374
  # Calculates hash code according to all attributes.
354
375
  # @return [Integer] Hash code
355
376
  def hash
356
- [type, contact, number, issue_date, due_date, paid_on_date, memo, company, currency, exchange_rate, total_discount, sub_total, total_tax_amount, total_amount, balance, remote_updated_at, payments, line_items, remote_was_deleted, id, remote_id, field_mappings, remote_data].hash
377
+ [id, type, contact, number, issue_date, due_date, paid_on_date, memo, company, currency, exchange_rate, total_discount, sub_total, total_tax_amount, total_amount, balance, remote_updated_at, tracking_categories, payments, line_items, remote_was_deleted, remote_id, modified_at, field_mappings, remote_data].hash
357
378
  end
358
379
 
359
380
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeAccountingClient
17
- # # The InvoiceLineItem Object ### Description The `InvoiceLineItem` object represents an itemized record of goods and/or services sold to a customer. If type = accounts_payable, invoice is a bill, if type = accounts_receivable it's an invoice. ### Usage Example Fetch from the `GET Invoice` endpoint and view the invoice's line items.
17
+ # # The InvoiceLineItem Object ### Description The `InvoiceLineItem` object represents an itemized record of goods and/or services sold to a customer. ### Usage Example Fetch from the `GET Invoice` endpoint and view the invoice's line items.
18
18
  class InvoiceLineItem
19
19
  # The third-party API ID of the matching object.
20
20
  attr_accessor :remote_id
@@ -50,6 +50,9 @@ module MergeAccountingClient
50
50
 
51
51
  attr_accessor :id
52
52
 
53
+ # This is the datetime that this object was last updated by Merge
54
+ attr_accessor :modified_at
55
+
53
56
  attr_accessor :field_mappings
54
57
 
55
58
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -68,6 +71,7 @@ module MergeAccountingClient
68
71
  :'tracking_categories' => :'tracking_categories',
69
72
  :'company' => :'company',
70
73
  :'id' => :'id',
74
+ :'modified_at' => :'modified_at',
71
75
  :'field_mappings' => :'field_mappings'
72
76
  }
73
77
  end
@@ -93,6 +97,7 @@ module MergeAccountingClient
93
97
  :'tracking_categories' => :'Array<String>',
94
98
  :'company' => :'String',
95
99
  :'id' => :'String',
100
+ :'modified_at' => :'Time',
96
101
  :'field_mappings' => :'Hash<String, Object>'
97
102
  }
98
103
  end
@@ -184,6 +189,10 @@ module MergeAccountingClient
184
189
  self.id = attributes[:'id']
185
190
  end
186
191
 
192
+ if attributes.key?(:'modified_at')
193
+ self.modified_at = attributes[:'modified_at']
194
+ end
195
+
187
196
  if attributes.key?(:'field_mappings')
188
197
  if (value = attributes[:'field_mappings']).is_a?(Hash)
189
198
  self.field_mappings = value
@@ -239,6 +248,7 @@ module MergeAccountingClient
239
248
  tracking_categories == o.tracking_categories &&
240
249
  company == o.company &&
241
250
  id == o.id &&
251
+ modified_at == o.modified_at &&
242
252
  field_mappings == o.field_mappings
243
253
  end
244
254
 
@@ -251,7 +261,7 @@ module MergeAccountingClient
251
261
  # Calculates hash code according to all attributes.
252
262
  # @return [Integer] Hash code
253
263
  def hash
254
- [remote_id, description, unit_price, quantity, total_amount, currency, exchange_rate, item, account, tracking_category, tracking_categories, company, id, field_mappings].hash
264
+ [remote_id, description, unit_price, quantity, total_amount, currency, exchange_rate, item, account, tracking_category, tracking_categories, company, id, modified_at, field_mappings].hash
255
265
  end
256
266
 
257
267
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeAccountingClient
17
- # # The InvoiceLineItem Object ### Description The `InvoiceLineItem` object represents an itemized record of goods and/or services sold to a customer. If type = accounts_payable, invoice is a bill, if type = accounts_receivable it's an invoice. ### Usage Example Fetch from the `GET Invoice` endpoint and view the invoice's line items.
17
+ # # The InvoiceLineItem Object ### Description The `InvoiceLineItem` object represents an itemized record of goods and/or services sold to a customer. ### Usage Example Fetch from the `GET Invoice` endpoint and view the invoice's line items.
18
18
  class InvoiceLineItemRequest
19
19
  # The third-party API ID of the matching object.
20
20
  attr_accessor :remote_id
@@ -16,7 +16,7 @@ require 'time'
16
16
  module MergeAccountingClient
17
17
  # # The Invoice Object ### Description The `Invoice` object represents an itemized record of goods and/or services sold to a customer. If type = accounts_payable `Invoice` is a bill, if type = accounts_receivable it's an invoice. ### Usage Example Fetch from the `LIST Invoices` endpoint and view a company's invoices.
18
18
  class InvoiceRequest
19
- # Whether the invoice is an accounts receivable or accounts payable. Accounts payable invoices are commonly referred to as Bills. * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
19
+ # Whether the invoice is an accounts receivable or accounts payable. If `type` is `accounts_payable`, the invoice is a bill. If `type` is `accounts_receivable`, it is an invoice. * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
20
20
  attr_accessor :type
21
21
 
22
22
  # The invoice's contact.
@@ -64,6 +64,8 @@ module MergeAccountingClient
64
64
  # Array of `Payment` object IDs.
65
65
  attr_accessor :payments
66
66
 
67
+ attr_accessor :tracking_categories
68
+
67
69
  attr_accessor :line_items
68
70
 
69
71
  attr_accessor :integration_params
@@ -89,6 +91,7 @@ module MergeAccountingClient
89
91
  :'total_amount' => :'total_amount',
90
92
  :'balance' => :'balance',
91
93
  :'payments' => :'payments',
94
+ :'tracking_categories' => :'tracking_categories',
92
95
  :'line_items' => :'line_items',
93
96
  :'integration_params' => :'integration_params',
94
97
  :'linked_account_params' => :'linked_account_params'
@@ -119,6 +122,7 @@ module MergeAccountingClient
119
122
  :'total_amount' => :'Float',
120
123
  :'balance' => :'Float',
121
124
  :'payments' => :'Array<String>',
125
+ :'tracking_categories' => :'Array<String>',
122
126
  :'line_items' => :'Array<InvoiceLineItemRequest>',
123
127
  :'integration_params' => :'Hash<String, Object>',
124
128
  :'linked_account_params' => :'Hash<String, Object>'
@@ -229,6 +233,12 @@ module MergeAccountingClient
229
233
  end
230
234
  end
231
235
 
236
+ if attributes.key?(:'tracking_categories')
237
+ if (value = attributes[:'tracking_categories']).is_a?(Array)
238
+ self.tracking_categories = value
239
+ end
240
+ end
241
+
232
242
  if attributes.key?(:'line_items')
233
243
  if (value = attributes[:'line_items']).is_a?(Array)
234
244
  self.line_items = value
@@ -299,6 +309,7 @@ module MergeAccountingClient
299
309
  total_amount == o.total_amount &&
300
310
  balance == o.balance &&
301
311
  payments == o.payments &&
312
+ tracking_categories == o.tracking_categories &&
302
313
  line_items == o.line_items &&
303
314
  integration_params == o.integration_params &&
304
315
  linked_account_params == o.linked_account_params
@@ -313,7 +324,7 @@ module MergeAccountingClient
313
324
  # Calculates hash code according to all attributes.
314
325
  # @return [Integer] Hash code
315
326
  def hash
316
- [type, contact, number, issue_date, due_date, paid_on_date, memo, company, currency, exchange_rate, total_discount, sub_total, total_tax_amount, total_amount, balance, payments, line_items, integration_params, linked_account_params].hash
327
+ [type, contact, number, issue_date, due_date, paid_on_date, memo, company, currency, exchange_rate, total_discount, sub_total, total_tax_amount, total_amount, balance, payments, tracking_categories, line_items, integration_params, linked_account_params].hash
317
328
  end
318
329
 
319
330
  # Builds the object from hash
@@ -17,6 +17,7 @@ module MergeAccountingClient
17
17
  class Issue
18
18
  attr_accessor :id
19
19
 
20
+ # Status of the issue. Options: ('ONGOING', 'RESOLVED') * `ONGOING` - ONGOING * `RESOLVED` - RESOLVED
20
21
  attr_accessor :status
21
22
 
22
23
  attr_accessor :error_description
@@ -48,6 +48,9 @@ module MergeAccountingClient
48
48
  # Indicates whether or not this object has been deleted by third party webhooks.
49
49
  attr_accessor :remote_was_deleted
50
50
 
51
+ # This is the datetime that this object was last updated by Merge
52
+ attr_accessor :modified_at
53
+
51
54
  attr_accessor :field_mappings
52
55
 
53
56
  attr_accessor :remote_data
@@ -66,6 +69,7 @@ module MergeAccountingClient
66
69
  :'company' => :'company',
67
70
  :'remote_updated_at' => :'remote_updated_at',
68
71
  :'remote_was_deleted' => :'remote_was_deleted',
72
+ :'modified_at' => :'modified_at',
69
73
  :'field_mappings' => :'field_mappings',
70
74
  :'remote_data' => :'remote_data'
71
75
  }
@@ -90,6 +94,7 @@ module MergeAccountingClient
90
94
  :'company' => :'String',
91
95
  :'remote_updated_at' => :'Time',
92
96
  :'remote_was_deleted' => :'Boolean',
97
+ :'modified_at' => :'Time',
93
98
  :'field_mappings' => :'Hash<String, Object>',
94
99
  :'remote_data' => :'Array<RemoteData>'
95
100
  }
@@ -171,6 +176,10 @@ module MergeAccountingClient
171
176
  self.remote_was_deleted = attributes[:'remote_was_deleted']
172
177
  end
173
178
 
179
+ if attributes.key?(:'modified_at')
180
+ self.modified_at = attributes[:'modified_at']
181
+ end
182
+
174
183
  if attributes.key?(:'field_mappings')
175
184
  if (value = attributes[:'field_mappings']).is_a?(Hash)
176
185
  self.field_mappings = value
@@ -213,6 +222,7 @@ module MergeAccountingClient
213
222
  company == o.company &&
214
223
  remote_updated_at == o.remote_updated_at &&
215
224
  remote_was_deleted == o.remote_was_deleted &&
225
+ modified_at == o.modified_at &&
216
226
  field_mappings == o.field_mappings &&
217
227
  remote_data == o.remote_data
218
228
  end
@@ -226,7 +236,7 @@ module MergeAccountingClient
226
236
  # Calculates hash code according to all attributes.
227
237
  # @return [Integer] Hash code
228
238
  def hash
229
- [id, remote_id, name, status, unit_price, purchase_price, purchase_account, sales_account, company, remote_updated_at, remote_was_deleted, field_mappings, remote_data].hash
239
+ [id, remote_id, name, status, unit_price, purchase_price, purchase_account, sales_account, company, remote_updated_at, remote_was_deleted, modified_at, field_mappings, remote_data].hash
230
240
  end
231
241
 
232
242
  # Builds the object from hash