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
@@ -37,6 +37,14 @@ module MergeAccountingClient
37
37
  # The total amount of money being paid to the supplier, or customer, after taxes.
38
38
  attr_accessor :total_amount
39
39
 
40
+ attr_accessor :tracking_categories
41
+
42
+ # The accounting period that the Payment was generated in.
43
+ attr_accessor :accounting_period
44
+
45
+ # A list of “Payment Applied to Lines” objects.
46
+ attr_accessor :applied_to_lines
47
+
40
48
  attr_accessor :integration_params
41
49
 
42
50
  attr_accessor :linked_account_params
@@ -51,6 +59,9 @@ module MergeAccountingClient
51
59
  :'exchange_rate' => :'exchange_rate',
52
60
  :'company' => :'company',
53
61
  :'total_amount' => :'total_amount',
62
+ :'tracking_categories' => :'tracking_categories',
63
+ :'accounting_period' => :'accounting_period',
64
+ :'applied_to_lines' => :'applied_to_lines',
54
65
  :'integration_params' => :'integration_params',
55
66
  :'linked_account_params' => :'linked_account_params'
56
67
  }
@@ -71,6 +82,9 @@ module MergeAccountingClient
71
82
  :'exchange_rate' => :'String',
72
83
  :'company' => :'String',
73
84
  :'total_amount' => :'Float',
85
+ :'tracking_categories' => :'Array<String>',
86
+ :'accounting_period' => :'String',
87
+ :'applied_to_lines' => :'Array<PaymentLineItemRequest>',
74
88
  :'integration_params' => :'Hash<String, Object>',
75
89
  :'linked_account_params' => :'Hash<String, Object>'
76
90
  }
@@ -86,6 +100,7 @@ module MergeAccountingClient
86
100
  :'exchange_rate',
87
101
  :'company',
88
102
  :'total_amount',
103
+ :'accounting_period',
89
104
  :'integration_params',
90
105
  :'linked_account_params'
91
106
  ])
@@ -134,6 +149,22 @@ module MergeAccountingClient
134
149
  self.total_amount = attributes[:'total_amount']
135
150
  end
136
151
 
152
+ if attributes.key?(:'tracking_categories')
153
+ if (value = attributes[:'tracking_categories']).is_a?(Array)
154
+ self.tracking_categories = value
155
+ end
156
+ end
157
+
158
+ if attributes.key?(:'accounting_period')
159
+ self.accounting_period = attributes[:'accounting_period']
160
+ end
161
+
162
+ if attributes.key?(:'applied_to_lines')
163
+ if (value = attributes[:'applied_to_lines']).is_a?(Array)
164
+ self.applied_to_lines = value
165
+ end
166
+ end
167
+
137
168
  if attributes.key?(:'integration_params')
138
169
  if (value = attributes[:'integration_params']).is_a?(Hash)
139
170
  self.integration_params = value
@@ -189,6 +220,9 @@ module MergeAccountingClient
189
220
  exchange_rate == o.exchange_rate &&
190
221
  company == o.company &&
191
222
  total_amount == o.total_amount &&
223
+ tracking_categories == o.tracking_categories &&
224
+ accounting_period == o.accounting_period &&
225
+ applied_to_lines == o.applied_to_lines &&
192
226
  integration_params == o.integration_params &&
193
227
  linked_account_params == o.linked_account_params
194
228
  end
@@ -202,7 +236,7 @@ module MergeAccountingClient
202
236
  # Calculates hash code according to all attributes.
203
237
  # @return [Integer] Hash code
204
238
  def hash
205
- [transaction_date, contact, account, currency, exchange_rate, company, total_amount, integration_params, linked_account_params].hash
239
+ [transaction_date, contact, account, currency, exchange_rate, company, total_amount, tracking_categories, accounting_period, applied_to_lines, integration_params, linked_account_params].hash
206
240
  end
207
241
 
208
242
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeAccountingClient
17
- # # The PurchaseOrder Object ### Description The `PurchaseOrder` object is a record of request for a product or service between a buyer and seller. ### Usage Example Fetch from the `LIST PurchaseOrders` endpoint and view a company's purchase orders.
17
+ # # The PurchaseOrder Object ### Description A `PurchaseOrder` represents a request to purchase goods or services from a vendor. It outlines the details of the purchase, such as the items or services requested, quantities, prices, and delivery details. A `PurchaseOrder` is a crucial component of the procurement process, but does not typically result in any impact on the company’s general ledger. The general ledger is typically only affected when the `PurchaseOrder` is fulfilled as an *Accounts Payable* Invoice object. ### Usage Example Fetch from the `LIST PurchaseOrders` endpoint and view a company's purchase orders.
18
18
  class PurchaseOrder
19
19
  # The purchase order's status. * `DRAFT` - DRAFT * `SUBMITTED` - SUBMITTED * `AUTHORIZED` - AUTHORIZED * `BILLED` - BILLED * `DELETED` - DELETED
20
20
  attr_accessor :status
@@ -22,6 +22,9 @@ module MergeAccountingClient
22
22
  # The purchase order's issue date.
23
23
  attr_accessor :issue_date
24
24
 
25
+ # The human-readable number of the purchase order.
26
+ attr_accessor :purchase_order_number
27
+
25
28
  # The purchase order's delivery date.
26
29
  attr_accessor :delivery_date
27
30
 
@@ -51,20 +54,30 @@ module MergeAccountingClient
51
54
 
52
55
  attr_accessor :line_items
53
56
 
57
+ attr_accessor :tracking_categories
58
+
54
59
  # When the third party's purchase order note was created.
55
60
  attr_accessor :remote_created_at
56
61
 
57
62
  # When the third party's purchase order note was updated.
58
63
  attr_accessor :remote_updated_at
59
64
 
60
- # Indicates whether or not this object has been deleted by third party webhooks.
65
+ # Indicates whether or not this object has been deleted in the third party platform.
61
66
  attr_accessor :remote_was_deleted
62
67
 
68
+ # The accounting period that the PurchaseOrder was generated in.
69
+ attr_accessor :accounting_period
70
+
63
71
  attr_accessor :id
64
72
 
65
73
  # The third-party API ID of the matching object.
66
74
  attr_accessor :remote_id
67
75
 
76
+ attr_accessor :created_at
77
+
78
+ # This is the datetime that this object was last updated by Merge
79
+ attr_accessor :modified_at
80
+
68
81
  attr_accessor :field_mappings
69
82
 
70
83
  attr_accessor :remote_data
@@ -74,6 +87,7 @@ module MergeAccountingClient
74
87
  {
75
88
  :'status' => :'status',
76
89
  :'issue_date' => :'issue_date',
90
+ :'purchase_order_number' => :'purchase_order_number',
77
91
  :'delivery_date' => :'delivery_date',
78
92
  :'delivery_address' => :'delivery_address',
79
93
  :'customer' => :'customer',
@@ -84,11 +98,15 @@ module MergeAccountingClient
84
98
  :'currency' => :'currency',
85
99
  :'exchange_rate' => :'exchange_rate',
86
100
  :'line_items' => :'line_items',
101
+ :'tracking_categories' => :'tracking_categories',
87
102
  :'remote_created_at' => :'remote_created_at',
88
103
  :'remote_updated_at' => :'remote_updated_at',
89
104
  :'remote_was_deleted' => :'remote_was_deleted',
105
+ :'accounting_period' => :'accounting_period',
90
106
  :'id' => :'id',
91
107
  :'remote_id' => :'remote_id',
108
+ :'created_at' => :'created_at',
109
+ :'modified_at' => :'modified_at',
92
110
  :'field_mappings' => :'field_mappings',
93
111
  :'remote_data' => :'remote_data'
94
112
  }
@@ -104,6 +122,7 @@ module MergeAccountingClient
104
122
  {
105
123
  :'status' => :'PurchaseOrderStatusEnum',
106
124
  :'issue_date' => :'Time',
125
+ :'purchase_order_number' => :'String',
107
126
  :'delivery_date' => :'Time',
108
127
  :'delivery_address' => :'String',
109
128
  :'customer' => :'String',
@@ -114,11 +133,15 @@ module MergeAccountingClient
114
133
  :'currency' => :'CurrencyEnum',
115
134
  :'exchange_rate' => :'String',
116
135
  :'line_items' => :'Array<PurchaseOrderLineItem>',
136
+ :'tracking_categories' => :'Array<String>',
117
137
  :'remote_created_at' => :'Time',
118
138
  :'remote_updated_at' => :'Time',
119
139
  :'remote_was_deleted' => :'Boolean',
140
+ :'accounting_period' => :'String',
120
141
  :'id' => :'String',
121
142
  :'remote_id' => :'String',
143
+ :'created_at' => :'Time',
144
+ :'modified_at' => :'Time',
122
145
  :'field_mappings' => :'Hash<String, Object>',
123
146
  :'remote_data' => :'Array<RemoteData>'
124
147
  }
@@ -129,6 +152,7 @@ module MergeAccountingClient
129
152
  Set.new([
130
153
  :'status',
131
154
  :'issue_date',
155
+ :'purchase_order_number',
132
156
  :'delivery_date',
133
157
  :'delivery_address',
134
158
  :'customer',
@@ -140,6 +164,7 @@ module MergeAccountingClient
140
164
  :'exchange_rate',
141
165
  :'remote_created_at',
142
166
  :'remote_updated_at',
167
+ :'accounting_period',
143
168
  :'remote_id',
144
169
  :'field_mappings',
145
170
  :'remote_data'
@@ -169,6 +194,10 @@ module MergeAccountingClient
169
194
  self.issue_date = attributes[:'issue_date']
170
195
  end
171
196
 
197
+ if attributes.key?(:'purchase_order_number')
198
+ self.purchase_order_number = attributes[:'purchase_order_number']
199
+ end
200
+
172
201
  if attributes.key?(:'delivery_date')
173
202
  self.delivery_date = attributes[:'delivery_date']
174
203
  end
@@ -211,6 +240,12 @@ module MergeAccountingClient
211
240
  end
212
241
  end
213
242
 
243
+ if attributes.key?(:'tracking_categories')
244
+ if (value = attributes[:'tracking_categories']).is_a?(Array)
245
+ self.tracking_categories = value
246
+ end
247
+ end
248
+
214
249
  if attributes.key?(:'remote_created_at')
215
250
  self.remote_created_at = attributes[:'remote_created_at']
216
251
  end
@@ -223,6 +258,10 @@ module MergeAccountingClient
223
258
  self.remote_was_deleted = attributes[:'remote_was_deleted']
224
259
  end
225
260
 
261
+ if attributes.key?(:'accounting_period')
262
+ self.accounting_period = attributes[:'accounting_period']
263
+ end
264
+
226
265
  if attributes.key?(:'id')
227
266
  self.id = attributes[:'id']
228
267
  end
@@ -231,6 +270,14 @@ module MergeAccountingClient
231
270
  self.remote_id = attributes[:'remote_id']
232
271
  end
233
272
 
273
+ if attributes.key?(:'created_at')
274
+ self.created_at = attributes[:'created_at']
275
+ end
276
+
277
+ if attributes.key?(:'modified_at')
278
+ self.modified_at = attributes[:'modified_at']
279
+ end
280
+
234
281
  if attributes.key?(:'field_mappings')
235
282
  if (value = attributes[:'field_mappings']).is_a?(Hash)
236
283
  self.field_mappings = value
@@ -248,6 +295,10 @@ module MergeAccountingClient
248
295
  # @return Array for valid properties with the reasons
249
296
  def list_invalid_properties
250
297
  invalid_properties = Array.new
298
+ if !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 100
299
+ invalid_properties.push('invalid value for "purchase_order_number", the character length must be smaller than or equal to 100.')
300
+ end
301
+
251
302
  pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
252
303
  if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
253
304
  invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
@@ -259,10 +310,21 @@ module MergeAccountingClient
259
310
  # Check to see if the all the properties in the model are valid
260
311
  # @return true if the model is valid
261
312
  def valid?
313
+ return false if !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 100
262
314
  return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
263
315
  true
264
316
  end
265
317
 
318
+ # Custom attribute writer method with validation
319
+ # @param [Object] purchase_order_number Value to be assigned
320
+ def purchase_order_number=(purchase_order_number)
321
+ if !purchase_order_number.nil? && purchase_order_number.to_s.length > 100
322
+ fail ArgumentError, 'invalid value for "purchase_order_number", the character length must be smaller than or equal to 100.'
323
+ end
324
+
325
+ @purchase_order_number = purchase_order_number
326
+ end
327
+
266
328
  # Custom attribute writer method with validation
267
329
  # @param [Object] exchange_rate Value to be assigned
268
330
  def exchange_rate=(exchange_rate)
@@ -281,6 +343,7 @@ module MergeAccountingClient
281
343
  self.class == o.class &&
282
344
  status == o.status &&
283
345
  issue_date == o.issue_date &&
346
+ purchase_order_number == o.purchase_order_number &&
284
347
  delivery_date == o.delivery_date &&
285
348
  delivery_address == o.delivery_address &&
286
349
  customer == o.customer &&
@@ -291,11 +354,15 @@ module MergeAccountingClient
291
354
  currency == o.currency &&
292
355
  exchange_rate == o.exchange_rate &&
293
356
  line_items == o.line_items &&
357
+ tracking_categories == o.tracking_categories &&
294
358
  remote_created_at == o.remote_created_at &&
295
359
  remote_updated_at == o.remote_updated_at &&
296
360
  remote_was_deleted == o.remote_was_deleted &&
361
+ accounting_period == o.accounting_period &&
297
362
  id == o.id &&
298
363
  remote_id == o.remote_id &&
364
+ created_at == o.created_at &&
365
+ modified_at == o.modified_at &&
299
366
  field_mappings == o.field_mappings &&
300
367
  remote_data == o.remote_data
301
368
  end
@@ -309,7 +376,7 @@ module MergeAccountingClient
309
376
  # Calculates hash code according to all attributes.
310
377
  # @return [Integer] Hash code
311
378
  def hash
312
- [status, issue_date, delivery_date, delivery_address, customer, vendor, memo, company, total_amount, currency, exchange_rate, line_items, remote_created_at, remote_updated_at, remote_was_deleted, id, remote_id, field_mappings, remote_data].hash
379
+ [status, issue_date, purchase_order_number, delivery_date, delivery_address, customer, vendor, memo, company, total_amount, currency, exchange_rate, line_items, tracking_categories, remote_created_at, remote_updated_at, remote_was_deleted, accounting_period, id, remote_id, created_at, modified_at, field_mappings, remote_data].hash
313
380
  end
314
381
 
315
382
  # Builds the object from hash
@@ -54,6 +54,16 @@ module MergeAccountingClient
54
54
  # The company the purchase order line item belongs to.
55
55
  attr_accessor :company
56
56
 
57
+ # Indicates whether or not this object has been deleted in the third party platform.
58
+ attr_accessor :remote_was_deleted
59
+
60
+ attr_accessor :id
61
+
62
+ attr_accessor :created_at
63
+
64
+ # This is the datetime that this object was last updated by Merge
65
+ attr_accessor :modified_at
66
+
57
67
  # Attribute mapping from ruby-style variable name to JSON key.
58
68
  def self.attribute_map
59
69
  {
@@ -69,7 +79,11 @@ module MergeAccountingClient
69
79
  :'total_line_amount' => :'total_line_amount',
70
80
  :'currency' => :'currency',
71
81
  :'exchange_rate' => :'exchange_rate',
72
- :'company' => :'company'
82
+ :'company' => :'company',
83
+ :'remote_was_deleted' => :'remote_was_deleted',
84
+ :'id' => :'id',
85
+ :'created_at' => :'created_at',
86
+ :'modified_at' => :'modified_at'
73
87
  }
74
88
  end
75
89
 
@@ -93,7 +107,11 @@ module MergeAccountingClient
93
107
  :'total_line_amount' => :'String',
94
108
  :'currency' => :'CurrencyEnum',
95
109
  :'exchange_rate' => :'String',
96
- :'company' => :'String'
110
+ :'company' => :'String',
111
+ :'remote_was_deleted' => :'Boolean',
112
+ :'id' => :'String',
113
+ :'created_at' => :'Time',
114
+ :'modified_at' => :'Time'
97
115
  }
98
116
  end
99
117
 
@@ -111,7 +129,7 @@ module MergeAccountingClient
111
129
  :'total_line_amount',
112
130
  :'currency',
113
131
  :'exchange_rate',
114
- :'company'
132
+ :'company',
115
133
  ])
116
134
  end
117
135
 
@@ -183,6 +201,22 @@ module MergeAccountingClient
183
201
  if attributes.key?(:'company')
184
202
  self.company = attributes[:'company']
185
203
  end
204
+
205
+ if attributes.key?(:'remote_was_deleted')
206
+ self.remote_was_deleted = attributes[:'remote_was_deleted']
207
+ end
208
+
209
+ if attributes.key?(:'id')
210
+ self.id = attributes[:'id']
211
+ end
212
+
213
+ if attributes.key?(:'created_at')
214
+ self.created_at = attributes[:'created_at']
215
+ end
216
+
217
+ if attributes.key?(:'modified_at')
218
+ self.modified_at = attributes[:'modified_at']
219
+ end
186
220
  end
187
221
 
188
222
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -271,7 +305,11 @@ module MergeAccountingClient
271
305
  total_line_amount == o.total_line_amount &&
272
306
  currency == o.currency &&
273
307
  exchange_rate == o.exchange_rate &&
274
- company == o.company
308
+ company == o.company &&
309
+ remote_was_deleted == o.remote_was_deleted &&
310
+ id == o.id &&
311
+ created_at == o.created_at &&
312
+ modified_at == o.modified_at
275
313
  end
276
314
 
277
315
  # @see the `==` method
@@ -283,7 +321,7 @@ module MergeAccountingClient
283
321
  # Calculates hash code according to all attributes.
284
322
  # @return [Integer] Hash code
285
323
  def hash
286
- [remote_id, description, unit_price, quantity, item, account, tracking_category, tracking_categories, tax_amount, total_line_amount, currency, exchange_rate, company].hash
324
+ [remote_id, description, unit_price, quantity, item, account, tracking_category, tracking_categories, tax_amount, total_line_amount, currency, exchange_rate, company, remote_was_deleted, id, created_at, modified_at].hash
287
325
  end
288
326
 
289
327
  # Builds the object from hash
@@ -49,6 +49,8 @@ module MergeAccountingClient
49
49
  # The purchase order's exchange rate.
50
50
  attr_accessor :exchange_rate
51
51
 
52
+ attr_accessor :tracking_categories
53
+
52
54
  attr_accessor :line_items
53
55
 
54
56
  attr_accessor :integration_params
@@ -69,6 +71,7 @@ module MergeAccountingClient
69
71
  :'total_amount' => :'total_amount',
70
72
  :'currency' => :'currency',
71
73
  :'exchange_rate' => :'exchange_rate',
74
+ :'tracking_categories' => :'tracking_categories',
72
75
  :'line_items' => :'line_items',
73
76
  :'integration_params' => :'integration_params',
74
77
  :'linked_account_params' => :'linked_account_params'
@@ -94,6 +97,7 @@ module MergeAccountingClient
94
97
  :'total_amount' => :'Float',
95
98
  :'currency' => :'CurrencyEnum',
96
99
  :'exchange_rate' => :'String',
100
+ :'tracking_categories' => :'Array<String>',
97
101
  :'line_items' => :'Array<PurchaseOrderLineItemRequest>',
98
102
  :'integration_params' => :'Hash<String, Object>',
99
103
  :'linked_account_params' => :'Hash<String, Object>'
@@ -178,6 +182,12 @@ module MergeAccountingClient
178
182
  self.exchange_rate = attributes[:'exchange_rate']
179
183
  end
180
184
 
185
+ if attributes.key?(:'tracking_categories')
186
+ if (value = attributes[:'tracking_categories']).is_a?(Array)
187
+ self.tracking_categories = value
188
+ end
189
+ end
190
+
181
191
  if attributes.key?(:'line_items')
182
192
  if (value = attributes[:'line_items']).is_a?(Array)
183
193
  self.line_items = value
@@ -243,6 +253,7 @@ module MergeAccountingClient
243
253
  total_amount == o.total_amount &&
244
254
  currency == o.currency &&
245
255
  exchange_rate == o.exchange_rate &&
256
+ tracking_categories == o.tracking_categories &&
246
257
  line_items == o.line_items &&
247
258
  integration_params == o.integration_params &&
248
259
  linked_account_params == o.linked_account_params
@@ -257,7 +268,7 @@ module MergeAccountingClient
257
268
  # Calculates hash code according to all attributes.
258
269
  # @return [Integer] Hash code
259
270
  def hash
260
- [status, issue_date, delivery_date, delivery_address, customer, vendor, memo, company, total_amount, currency, exchange_rate, line_items, integration_params, linked_account_params].hash
271
+ [status, issue_date, delivery_date, delivery_address, customer, vendor, memo, company, total_amount, currency, exchange_rate, tracking_categories, line_items, integration_params, linked_account_params].hash
261
272
  end
262
273
 
263
274
  # Builds the object from hash
@@ -36,13 +36,14 @@ module MergeAccountingClient
36
36
  def self.openapi_types
37
37
  {
38
38
  :'path' => :'String',
39
- :'data' => :'Hash<String, Object>'
39
+ :'data' => :'Object'
40
40
  }
41
41
  end
42
42
 
43
43
  # List of attributes with nullable: true
44
44
  def self.openapi_nullable
45
45
  Set.new([
46
+ :'data'
46
47
  ])
47
48
  end
48
49
 
@@ -66,9 +67,7 @@ module MergeAccountingClient
66
67
  end
67
68
 
68
69
  if attributes.key?(:'data')
69
- if (value = attributes[:'data']).is_a?(Hash)
70
- self.data = value
71
- end
70
+ self.data = attributes[:'data']
72
71
  end
73
72
  end
74
73
 
@@ -30,6 +30,11 @@ module MergeAccountingClient
30
30
  # The company the report item belongs to.
31
31
  attr_accessor :company
32
32
 
33
+ attr_accessor :created_at
34
+
35
+ # This is the datetime that this object was last updated by Merge
36
+ attr_accessor :modified_at
37
+
33
38
  # Attribute mapping from ruby-style variable name to JSON key.
34
39
  def self.attribute_map
35
40
  {
@@ -37,7 +42,9 @@ module MergeAccountingClient
37
42
  :'name' => :'name',
38
43
  :'value' => :'value',
39
44
  :'sub_items' => :'sub_items',
40
- :'company' => :'company'
45
+ :'company' => :'company',
46
+ :'created_at' => :'created_at',
47
+ :'modified_at' => :'modified_at'
41
48
  }
42
49
  end
43
50
 
@@ -53,7 +60,9 @@ module MergeAccountingClient
53
60
  :'name' => :'String',
54
61
  :'value' => :'Float',
55
62
  :'sub_items' => :'Hash<String, Object>',
56
- :'company' => :'String'
63
+ :'company' => :'String',
64
+ :'created_at' => :'Time',
65
+ :'modified_at' => :'Time'
57
66
  }
58
67
  end
59
68
 
@@ -63,7 +72,7 @@ module MergeAccountingClient
63
72
  :'remote_id',
64
73
  :'name',
65
74
  :'value',
66
- :'company'
75
+ :'company',
67
76
  ])
68
77
  end
69
78
 
@@ -103,6 +112,14 @@ module MergeAccountingClient
103
112
  if attributes.key?(:'company')
104
113
  self.company = attributes[:'company']
105
114
  end
115
+
116
+ if attributes.key?(:'created_at')
117
+ self.created_at = attributes[:'created_at']
118
+ end
119
+
120
+ if attributes.key?(:'modified_at')
121
+ self.modified_at = attributes[:'modified_at']
122
+ end
106
123
  end
107
124
 
108
125
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -127,7 +144,9 @@ module MergeAccountingClient
127
144
  name == o.name &&
128
145
  value == o.value &&
129
146
  sub_items == o.sub_items &&
130
- company == o.company
147
+ company == o.company &&
148
+ created_at == o.created_at &&
149
+ modified_at == o.modified_at
131
150
  end
132
151
 
133
152
  # @see the `==` method
@@ -139,7 +158,7 @@ module MergeAccountingClient
139
158
  # Calculates hash code according to all attributes.
140
159
  # @return [Integer] Hash code
141
160
  def hash
142
- [remote_id, name, value, sub_items, company].hash
161
+ [remote_id, name, value, sub_items, company, created_at, modified_at].hash
143
162
  end
144
163
 
145
164
  # Builds the object from hash
@@ -0,0 +1,49 @@
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 RoleEnum
18
+ ADMIN = "ADMIN".freeze
19
+ DEVELOPER = "DEVELOPER".freeze
20
+ MEMBER = "MEMBER".freeze
21
+ API = "API".freeze
22
+ SYSTEM = "SYSTEM".freeze
23
+ MERGE_TEAM = "MERGE_TEAM".freeze
24
+
25
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
26
+
27
+ attr_accessor :value
28
+ attr_accessor :raw_value
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def build_from_hash(value)
34
+ @raw_value = value
35
+ if ["ADMIN", "DEVELOPER", "MEMBER", "API", "SYSTEM", "MERGE_TEAM", ].include? value
36
+ @value = value
37
+ else
38
+ @value = MERGE_NONSTANDARD_VALUE
39
+ end
40
+
41
+ self
42
+ end
43
+
44
+ def self.build_from_hash(value)
45
+ RoleEnum.new.build_from_hash(value)
46
+ end
47
+ end
48
+
49
+ end
@@ -32,7 +32,7 @@ module MergeAccountingClient
32
32
  # @return [String] The enum value
33
33
  def build_from_hash(value)
34
34
  @raw_value = value
35
- if ["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"].include? value
35
+ if ["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED", ].include? value
36
36
  @value = value
37
37
  else
38
38
  @value = MERGE_NONSTANDARD_VALUE