merge_accounting_client 1.0.9 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -4
- data/docs/Account.md +3 -1
- data/docs/AccountIntegration.md +4 -2
- data/docs/AccountingAttachment.md +3 -1
- data/docs/AccountingPeriod.md +30 -0
- data/docs/AccountingPeriodStatusEnum.md +15 -0
- data/docs/AccountingPeriodsApi.md +167 -0
- data/docs/AccountingPhoneNumber.md +2 -0
- data/docs/Address.md +2 -0
- data/docs/AddressRequest.md +34 -0
- data/docs/AuditLogEvent.md +32 -0
- data/docs/AuditTrailApi.md +91 -0
- data/docs/BalanceSheet.md +3 -1
- data/docs/CashFlowStatement.md +3 -1
- data/docs/CompanyInfo.md +3 -1
- data/docs/Contact.md +4 -2
- data/docs/ContactRequest.md +1 -1
- data/docs/ContactsApi.md +4 -0
- data/docs/CreditNote.md +8 -2
- data/docs/CreditNoteLineItem.md +6 -0
- data/docs/CreditNotesApi.md +2 -2
- data/docs/EndUserDetailsRequest.md +1 -1
- data/docs/EventTypeEnum.md +15 -0
- data/docs/Expense.md +10 -2
- data/docs/ExpenseLine.md +8 -0
- data/docs/ExpenseLineRequest.md +2 -0
- data/docs/ExpenseRequest.md +7 -1
- data/docs/IncomeStatement.md +3 -1
- data/docs/Invoice.md +11 -1
- data/docs/InvoiceLineItem.md +5 -1
- data/docs/InvoiceRequest.md +4 -0
- data/docs/InvoiceStatusEnum.md +15 -0
- data/docs/InvoicesApi.md +2 -2
- data/docs/Issue.md +1 -1
- data/docs/Item.md +3 -1
- data/docs/JournalEntriesApi.md +2 -2
- data/docs/JournalEntry.md +9 -1
- data/docs/JournalEntryRequest.md +4 -0
- data/docs/JournalLine.md +10 -0
- data/docs/JournalLineRequest.md +4 -0
- data/docs/LinkedAccountsApi.md +2 -2
- data/docs/MetaResponse.md +2 -2
- data/docs/PaginatedAccountingPeriodList.md +22 -0
- data/docs/PaginatedAuditLogEventList.md +22 -0
- data/docs/Payment.md +7 -1
- data/docs/PaymentLineItem.md +32 -0
- data/docs/PaymentLineItemRequest.md +30 -0
- data/docs/PaymentRequest.md +4 -0
- data/docs/PurchaseOrder.md +9 -3
- data/docs/PurchaseOrderLineItem.md +6 -0
- data/docs/PurchaseOrderRequest.md +2 -0
- data/docs/PurchaseOrdersApi.md +2 -2
- data/docs/ReportItem.md +2 -0
- data/docs/RoleEnum.md +15 -0
- data/docs/SyncStatusApi.md +1 -1
- data/docs/TaxRate.md +3 -1
- data/docs/TrackingCategory.md +3 -1
- data/docs/Transaction.md +7 -3
- data/docs/TransactionLineItem.md +6 -0
- data/docs/VendorCredit.md +6 -2
- data/docs/VendorCreditLine.md +6 -0
- data/docs/VendorCreditsApi.md +2 -2
- data/lib/merge_accounting_client/api/accounting_periods_api.rb +167 -0
- data/lib/merge_accounting_client/api/audit_trail_api.rb +95 -0
- data/lib/merge_accounting_client/api/contacts_api.rb +6 -0
- data/lib/merge_accounting_client/api/credit_notes_api.rb +2 -2
- data/lib/merge_accounting_client/api/expenses_api.rb +2 -2
- data/lib/merge_accounting_client/api/invoices_api.rb +2 -2
- data/lib/merge_accounting_client/api/journal_entries_api.rb +2 -2
- data/lib/merge_accounting_client/api/linked_accounts_api.rb +3 -3
- data/lib/merge_accounting_client/api/payments_api.rb +2 -2
- data/lib/merge_accounting_client/api/purchase_orders_api.rb +2 -2
- data/lib/merge_accounting_client/api/sync_status_api.rb +2 -2
- data/lib/merge_accounting_client/api/transactions_api.rb +2 -2
- data/lib/merge_accounting_client/api/vendor_credits_api.rb +2 -2
- data/lib/merge_accounting_client/configuration.rb +4 -0
- data/lib/merge_accounting_client/models/account.rb +12 -3
- data/lib/merge_accounting_client/models/account_integration.rb +15 -4
- data/lib/merge_accounting_client/models/account_request.rb +1 -1
- data/lib/merge_accounting_client/models/accounting_attachment.rb +11 -2
- data/lib/merge_accounting_client/models/accounting_period.rb +296 -0
- data/lib/merge_accounting_client/models/accounting_period_status_enum.rb +45 -0
- data/lib/merge_accounting_client/models/accounting_phone_number.rb +10 -1
- data/lib/merge_accounting_client/models/address.rb +10 -1
- data/lib/merge_accounting_client/models/address_request.rb +311 -0
- data/lib/merge_accounting_client/models/audit_log_event.rb +356 -0
- data/lib/merge_accounting_client/models/balance_sheet.rb +11 -2
- data/lib/merge_accounting_client/models/cash_flow_statement.rb +11 -2
- data/lib/merge_accounting_client/models/company_info.rb +12 -3
- data/lib/merge_accounting_client/models/contact.rb +13 -4
- data/lib/merge_accounting_client/models/contact_request.rb +2 -2
- data/lib/merge_accounting_client/models/credit_note.rb +35 -3
- data/lib/merge_accounting_client/models/credit_note_line_item.rb +29 -1
- data/lib/merge_accounting_client/models/end_user_details_request.rb +1 -1
- data/lib/merge_accounting_client/models/event_type_enum.rb +67 -0
- data/lib/merge_accounting_client/models/expense.rb +45 -3
- data/lib/merge_accounting_client/models/expense_line.rb +40 -1
- data/lib/merge_accounting_client/models/expense_line_request.rb +12 -1
- data/lib/merge_accounting_client/models/expense_request.rb +35 -2
- data/lib/merge_accounting_client/models/income_statement.rb +11 -2
- data/lib/merge_accounting_client/models/invoice.rb +55 -1
- data/lib/merge_accounting_client/models/invoice_line_item.rb +20 -1
- data/lib/merge_accounting_client/models/invoice_request.rb +23 -1
- data/lib/merge_accounting_client/models/invoice_status_enum.rb +49 -0
- data/lib/merge_accounting_client/models/item.rb +11 -2
- data/lib/merge_accounting_client/models/journal_entry.rb +60 -2
- data/lib/merge_accounting_client/models/journal_entry_request.rb +38 -1
- data/lib/merge_accounting_client/models/journal_line.rb +51 -1
- data/lib/merge_accounting_client/models/journal_line_request.rb +23 -1
- data/lib/merge_accounting_client/models/paginated_accounting_period_list.rb +240 -0
- data/lib/merge_accounting_client/models/paginated_audit_log_event_list.rb +240 -0
- data/lib/merge_accounting_client/models/payment.rb +34 -2
- data/lib/merge_accounting_client/models/payment_line_item.rb +308 -0
- data/lib/merge_accounting_client/models/payment_line_item_request.rb +319 -0
- data/lib/merge_accounting_client/models/payment_request.rb +24 -1
- data/lib/merge_accounting_client/models/purchase_order.rb +49 -3
- data/lib/merge_accounting_client/models/purchase_order_line_item.rb +29 -1
- data/lib/merge_accounting_client/models/purchase_order_request.rb +12 -1
- data/lib/merge_accounting_client/models/report_item.rb +10 -1
- data/lib/merge_accounting_client/models/role_enum.rb +49 -0
- data/lib/merge_accounting_client/models/tax_rate.rb +11 -2
- data/lib/merge_accounting_client/models/tracking_category.rb +12 -3
- data/lib/merge_accounting_client/models/transaction.rb +23 -3
- data/lib/merge_accounting_client/models/transaction_line_item.rb +29 -1
- data/lib/merge_accounting_client/models/vendor_credit.rb +23 -3
- data/lib/merge_accounting_client/models/vendor_credit_line.rb +29 -1
- data/lib/merge_accounting_client/version.rb +1 -1
- data/lib/merge_accounting_client.rb +13 -9
- data/spec/api/accounting_periods_api_spec.rb +63 -0
- data/spec/api/audit_trail_api_spec.rb +51 -0
- data/spec/api/contacts_api_spec.rb +2 -0
- data/spec/api/linked_accounts_api_spec.rb +1 -1
- data/spec/api/sync_status_api_spec.rb +1 -1
- data/spec/models/account_integration_spec.rb +6 -0
- data/spec/models/account_spec.rb +6 -0
- data/spec/models/accounting_attachment_spec.rb +6 -0
- data/spec/models/accounting_period_spec.rb +70 -0
- data/spec/models/accounting_period_status_enum_spec.rb +28 -0
- data/spec/models/accounting_phone_number_spec.rb +6 -0
- data/spec/models/address_request_spec.rb +82 -0
- data/spec/models/address_spec.rb +6 -0
- data/spec/models/audit_log_event_spec.rb +76 -0
- data/spec/models/balance_sheet_spec.rb +6 -0
- data/spec/models/cash_flow_statement_spec.rb +6 -0
- data/spec/models/company_info_spec.rb +6 -0
- data/spec/models/contact_spec.rb +6 -0
- data/spec/models/credit_note_line_item_spec.rb +18 -0
- data/spec/models/credit_note_spec.rb +18 -0
- data/spec/models/event_type_enum_spec.rb +28 -0
- data/spec/models/expense_line_request_spec.rb +6 -0
- data/spec/models/expense_line_spec.rb +24 -0
- data/spec/models/expense_request_spec.rb +18 -0
- data/spec/models/expense_spec.rb +24 -0
- data/spec/models/income_statement_spec.rb +6 -0
- data/spec/models/invoice_line_item_spec.rb +12 -0
- data/spec/models/invoice_request_spec.rb +12 -0
- data/spec/models/invoice_spec.rb +30 -0
- data/spec/models/invoice_status_enum_spec.rb +28 -0
- data/spec/models/item_spec.rb +6 -0
- data/spec/models/journal_entry_request_spec.rb +12 -0
- data/spec/models/journal_entry_spec.rb +24 -0
- data/spec/models/journal_line_request_spec.rb +12 -0
- data/spec/models/journal_line_spec.rb +30 -0
- data/spec/models/paginated_accounting_period_list_spec.rb +46 -0
- data/spec/models/paginated_audit_log_event_list_spec.rb +46 -0
- data/spec/models/payment_line_item_request_spec.rb +70 -0
- data/spec/models/payment_line_item_spec.rb +76 -0
- data/spec/models/payment_request_spec.rb +12 -0
- data/spec/models/payment_spec.rb +18 -0
- data/spec/models/purchase_order_line_item_spec.rb +18 -0
- data/spec/models/purchase_order_request_spec.rb +6 -0
- data/spec/models/purchase_order_spec.rb +18 -0
- data/spec/models/report_item_spec.rb +6 -0
- data/spec/models/role_enum_spec.rb +28 -0
- data/spec/models/tax_rate_spec.rb +6 -0
- data/spec/models/tracking_category_spec.rb +6 -0
- data/spec/models/transaction_line_item_spec.rb +18 -0
- data/spec/models/transaction_spec.rb +12 -0
- data/spec/models/vendor_credit_line_spec.rb +18 -0
- data/spec/models/vendor_credit_spec.rb +12 -0
- metadata +204 -152
@@ -54,6 +54,9 @@ module MergeAccountingClient
|
|
54
54
|
# The total amount being paid before taxes.
|
55
55
|
attr_accessor :sub_total
|
56
56
|
|
57
|
+
# The status of the invoice. * `PAID` - PAID * `DRAFT` - DRAFT * `SUBMITTED` - SUBMITTED * `PARTIALLY_PAID` - PARTIALLY_PAID * `OPEN` - OPEN * `VOID` - VOID
|
58
|
+
attr_accessor :status
|
59
|
+
|
57
60
|
# The total amount being paid in taxes.
|
58
61
|
attr_accessor :total_tax_amount
|
59
62
|
|
@@ -71,13 +74,23 @@ module MergeAccountingClient
|
|
71
74
|
# Array of `Payment` object IDs.
|
72
75
|
attr_accessor :payments
|
73
76
|
|
77
|
+
# A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry.
|
78
|
+
attr_accessor :applied_payments
|
79
|
+
|
74
80
|
attr_accessor :line_items
|
75
81
|
|
76
82
|
attr_accessor :remote_was_deleted
|
77
83
|
|
84
|
+
# The accounting period that the Invoice was generated in.
|
85
|
+
attr_accessor :accounting_period
|
86
|
+
|
87
|
+
attr_accessor :purchase_orders
|
88
|
+
|
78
89
|
# The third-party API ID of the matching object.
|
79
90
|
attr_accessor :remote_id
|
80
91
|
|
92
|
+
attr_accessor :created_at
|
93
|
+
|
81
94
|
# This is the datetime that this object was last updated by Merge
|
82
95
|
attr_accessor :modified_at
|
83
96
|
|
@@ -101,15 +114,20 @@ module MergeAccountingClient
|
|
101
114
|
:'exchange_rate' => :'exchange_rate',
|
102
115
|
:'total_discount' => :'total_discount',
|
103
116
|
:'sub_total' => :'sub_total',
|
117
|
+
:'status' => :'status',
|
104
118
|
:'total_tax_amount' => :'total_tax_amount',
|
105
119
|
:'total_amount' => :'total_amount',
|
106
120
|
:'balance' => :'balance',
|
107
121
|
:'remote_updated_at' => :'remote_updated_at',
|
108
122
|
:'tracking_categories' => :'tracking_categories',
|
109
123
|
:'payments' => :'payments',
|
124
|
+
:'applied_payments' => :'applied_payments',
|
110
125
|
:'line_items' => :'line_items',
|
111
126
|
:'remote_was_deleted' => :'remote_was_deleted',
|
127
|
+
:'accounting_period' => :'accounting_period',
|
128
|
+
:'purchase_orders' => :'purchase_orders',
|
112
129
|
:'remote_id' => :'remote_id',
|
130
|
+
:'created_at' => :'created_at',
|
113
131
|
:'modified_at' => :'modified_at',
|
114
132
|
:'field_mappings' => :'field_mappings',
|
115
133
|
:'remote_data' => :'remote_data'
|
@@ -137,15 +155,20 @@ module MergeAccountingClient
|
|
137
155
|
:'exchange_rate' => :'String',
|
138
156
|
:'total_discount' => :'Float',
|
139
157
|
:'sub_total' => :'Float',
|
158
|
+
:'status' => :'InvoiceStatusEnum',
|
140
159
|
:'total_tax_amount' => :'Float',
|
141
160
|
:'total_amount' => :'Float',
|
142
161
|
:'balance' => :'Float',
|
143
162
|
:'remote_updated_at' => :'Time',
|
144
163
|
:'tracking_categories' => :'Array<String>',
|
145
164
|
:'payments' => :'Array<String>',
|
165
|
+
:'applied_payments' => :'Array<String>',
|
146
166
|
:'line_items' => :'Array<InvoiceLineItem>',
|
147
167
|
:'remote_was_deleted' => :'Boolean',
|
168
|
+
:'accounting_period' => :'String',
|
169
|
+
:'purchase_orders' => :'Array<String>',
|
148
170
|
:'remote_id' => :'String',
|
171
|
+
:'created_at' => :'Time',
|
149
172
|
:'modified_at' => :'Time',
|
150
173
|
:'field_mappings' => :'Hash<String, Object>',
|
151
174
|
:'remote_data' => :'Array<RemoteData>'
|
@@ -167,10 +190,12 @@ module MergeAccountingClient
|
|
167
190
|
:'exchange_rate',
|
168
191
|
:'total_discount',
|
169
192
|
:'sub_total',
|
193
|
+
:'status',
|
170
194
|
:'total_tax_amount',
|
171
195
|
:'total_amount',
|
172
196
|
:'balance',
|
173
197
|
:'remote_updated_at',
|
198
|
+
:'accounting_period',
|
174
199
|
:'remote_id',
|
175
200
|
:'field_mappings',
|
176
201
|
:'remote_data'
|
@@ -244,6 +269,10 @@ module MergeAccountingClient
|
|
244
269
|
self.sub_total = attributes[:'sub_total']
|
245
270
|
end
|
246
271
|
|
272
|
+
if attributes.key?(:'status')
|
273
|
+
self.status = attributes[:'status']
|
274
|
+
end
|
275
|
+
|
247
276
|
if attributes.key?(:'total_tax_amount')
|
248
277
|
self.total_tax_amount = attributes[:'total_tax_amount']
|
249
278
|
end
|
@@ -272,6 +301,12 @@ module MergeAccountingClient
|
|
272
301
|
end
|
273
302
|
end
|
274
303
|
|
304
|
+
if attributes.key?(:'applied_payments')
|
305
|
+
if (value = attributes[:'applied_payments']).is_a?(Array)
|
306
|
+
self.applied_payments = value
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
275
310
|
if attributes.key?(:'line_items')
|
276
311
|
if (value = attributes[:'line_items']).is_a?(Array)
|
277
312
|
self.line_items = value
|
@@ -282,10 +317,24 @@ module MergeAccountingClient
|
|
282
317
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
283
318
|
end
|
284
319
|
|
320
|
+
if attributes.key?(:'accounting_period')
|
321
|
+
self.accounting_period = attributes[:'accounting_period']
|
322
|
+
end
|
323
|
+
|
324
|
+
if attributes.key?(:'purchase_orders')
|
325
|
+
if (value = attributes[:'purchase_orders']).is_a?(Array)
|
326
|
+
self.purchase_orders = value
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
285
330
|
if attributes.key?(:'remote_id')
|
286
331
|
self.remote_id = attributes[:'remote_id']
|
287
332
|
end
|
288
333
|
|
334
|
+
if attributes.key?(:'created_at')
|
335
|
+
self.created_at = attributes[:'created_at']
|
336
|
+
end
|
337
|
+
|
289
338
|
if attributes.key?(:'modified_at')
|
290
339
|
self.modified_at = attributes[:'modified_at']
|
291
340
|
end
|
@@ -351,15 +400,20 @@ module MergeAccountingClient
|
|
351
400
|
exchange_rate == o.exchange_rate &&
|
352
401
|
total_discount == o.total_discount &&
|
353
402
|
sub_total == o.sub_total &&
|
403
|
+
status == o.status &&
|
354
404
|
total_tax_amount == o.total_tax_amount &&
|
355
405
|
total_amount == o.total_amount &&
|
356
406
|
balance == o.balance &&
|
357
407
|
remote_updated_at == o.remote_updated_at &&
|
358
408
|
tracking_categories == o.tracking_categories &&
|
359
409
|
payments == o.payments &&
|
410
|
+
applied_payments == o.applied_payments &&
|
360
411
|
line_items == o.line_items &&
|
361
412
|
remote_was_deleted == o.remote_was_deleted &&
|
413
|
+
accounting_period == o.accounting_period &&
|
414
|
+
purchase_orders == o.purchase_orders &&
|
362
415
|
remote_id == o.remote_id &&
|
416
|
+
created_at == o.created_at &&
|
363
417
|
modified_at == o.modified_at &&
|
364
418
|
field_mappings == o.field_mappings &&
|
365
419
|
remote_data == o.remote_data
|
@@ -374,7 +428,7 @@ module MergeAccountingClient
|
|
374
428
|
# Calculates hash code according to all attributes.
|
375
429
|
# @return [Integer] Hash code
|
376
430
|
def 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
|
431
|
+
[id, type, contact, number, issue_date, due_date, paid_on_date, memo, company, currency, exchange_rate, total_discount, sub_total, status, total_tax_amount, total_amount, balance, remote_updated_at, tracking_categories, payments, applied_payments, line_items, remote_was_deleted, accounting_period, purchase_orders, remote_id, created_at, modified_at, field_mappings, remote_data].hash
|
378
432
|
end
|
379
433
|
|
380
434
|
# Builds the object from hash
|
@@ -48,8 +48,13 @@ module MergeAccountingClient
|
|
48
48
|
# The company the line item belongs to.
|
49
49
|
attr_accessor :company
|
50
50
|
|
51
|
+
# Indicates whether or not this object has been deleted in the third party platform.
|
52
|
+
attr_accessor :remote_was_deleted
|
53
|
+
|
51
54
|
attr_accessor :id
|
52
55
|
|
56
|
+
attr_accessor :created_at
|
57
|
+
|
53
58
|
# This is the datetime that this object was last updated by Merge
|
54
59
|
attr_accessor :modified_at
|
55
60
|
|
@@ -70,7 +75,9 @@ module MergeAccountingClient
|
|
70
75
|
:'tracking_category' => :'tracking_category',
|
71
76
|
:'tracking_categories' => :'tracking_categories',
|
72
77
|
:'company' => :'company',
|
78
|
+
:'remote_was_deleted' => :'remote_was_deleted',
|
73
79
|
:'id' => :'id',
|
80
|
+
:'created_at' => :'created_at',
|
74
81
|
:'modified_at' => :'modified_at',
|
75
82
|
:'field_mappings' => :'field_mappings'
|
76
83
|
}
|
@@ -96,7 +103,9 @@ module MergeAccountingClient
|
|
96
103
|
:'tracking_category' => :'String',
|
97
104
|
:'tracking_categories' => :'Array<String>',
|
98
105
|
:'company' => :'String',
|
106
|
+
:'remote_was_deleted' => :'Boolean',
|
99
107
|
:'id' => :'String',
|
108
|
+
:'created_at' => :'Time',
|
100
109
|
:'modified_at' => :'Time',
|
101
110
|
:'field_mappings' => :'Hash<String, Object>'
|
102
111
|
}
|
@@ -185,10 +194,18 @@ module MergeAccountingClient
|
|
185
194
|
self.company = attributes[:'company']
|
186
195
|
end
|
187
196
|
|
197
|
+
if attributes.key?(:'remote_was_deleted')
|
198
|
+
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
199
|
+
end
|
200
|
+
|
188
201
|
if attributes.key?(:'id')
|
189
202
|
self.id = attributes[:'id']
|
190
203
|
end
|
191
204
|
|
205
|
+
if attributes.key?(:'created_at')
|
206
|
+
self.created_at = attributes[:'created_at']
|
207
|
+
end
|
208
|
+
|
192
209
|
if attributes.key?(:'modified_at')
|
193
210
|
self.modified_at = attributes[:'modified_at']
|
194
211
|
end
|
@@ -247,7 +264,9 @@ module MergeAccountingClient
|
|
247
264
|
tracking_category == o.tracking_category &&
|
248
265
|
tracking_categories == o.tracking_categories &&
|
249
266
|
company == o.company &&
|
267
|
+
remote_was_deleted == o.remote_was_deleted &&
|
250
268
|
id == o.id &&
|
269
|
+
created_at == o.created_at &&
|
251
270
|
modified_at == o.modified_at &&
|
252
271
|
field_mappings == o.field_mappings
|
253
272
|
end
|
@@ -261,7 +280,7 @@ module MergeAccountingClient
|
|
261
280
|
# Calculates hash code according to all attributes.
|
262
281
|
# @return [Integer] Hash code
|
263
282
|
def hash
|
264
|
-
[remote_id, description, unit_price, quantity, total_amount, currency, exchange_rate, item, account, tracking_category, tracking_categories, company, id, modified_at, field_mappings].hash
|
283
|
+
[remote_id, description, unit_price, quantity, total_amount, currency, exchange_rate, item, account, tracking_category, tracking_categories, company, remote_was_deleted, id, created_at, modified_at, field_mappings].hash
|
265
284
|
end
|
266
285
|
|
267
286
|
# Builds the object from hash
|
@@ -37,6 +37,9 @@ module MergeAccountingClient
|
|
37
37
|
# The invoice's private note.
|
38
38
|
attr_accessor :memo
|
39
39
|
|
40
|
+
# The status of the invoice. * `PAID` - PAID * `DRAFT` - DRAFT * `SUBMITTED` - SUBMITTED * `PARTIALLY_PAID` - PARTIALLY_PAID * `OPEN` - OPEN * `VOID` - VOID
|
41
|
+
attr_accessor :status
|
42
|
+
|
40
43
|
# The company the invoice belongs to.
|
41
44
|
attr_accessor :company
|
42
45
|
|
@@ -68,6 +71,8 @@ module MergeAccountingClient
|
|
68
71
|
|
69
72
|
attr_accessor :line_items
|
70
73
|
|
74
|
+
attr_accessor :purchase_orders
|
75
|
+
|
71
76
|
attr_accessor :integration_params
|
72
77
|
|
73
78
|
attr_accessor :linked_account_params
|
@@ -82,6 +87,7 @@ module MergeAccountingClient
|
|
82
87
|
:'due_date' => :'due_date',
|
83
88
|
:'paid_on_date' => :'paid_on_date',
|
84
89
|
:'memo' => :'memo',
|
90
|
+
:'status' => :'status',
|
85
91
|
:'company' => :'company',
|
86
92
|
:'currency' => :'currency',
|
87
93
|
:'exchange_rate' => :'exchange_rate',
|
@@ -93,6 +99,7 @@ module MergeAccountingClient
|
|
93
99
|
:'payments' => :'payments',
|
94
100
|
:'tracking_categories' => :'tracking_categories',
|
95
101
|
:'line_items' => :'line_items',
|
102
|
+
:'purchase_orders' => :'purchase_orders',
|
96
103
|
:'integration_params' => :'integration_params',
|
97
104
|
:'linked_account_params' => :'linked_account_params'
|
98
105
|
}
|
@@ -113,6 +120,7 @@ module MergeAccountingClient
|
|
113
120
|
:'due_date' => :'Time',
|
114
121
|
:'paid_on_date' => :'Time',
|
115
122
|
:'memo' => :'String',
|
123
|
+
:'status' => :'InvoiceStatusEnum',
|
116
124
|
:'company' => :'String',
|
117
125
|
:'currency' => :'CurrencyEnum',
|
118
126
|
:'exchange_rate' => :'String',
|
@@ -124,6 +132,7 @@ module MergeAccountingClient
|
|
124
132
|
:'payments' => :'Array<String>',
|
125
133
|
:'tracking_categories' => :'Array<String>',
|
126
134
|
:'line_items' => :'Array<InvoiceLineItemRequest>',
|
135
|
+
:'purchase_orders' => :'Array<String>',
|
127
136
|
:'integration_params' => :'Hash<String, Object>',
|
128
137
|
:'linked_account_params' => :'Hash<String, Object>'
|
129
138
|
}
|
@@ -139,6 +148,7 @@ module MergeAccountingClient
|
|
139
148
|
:'due_date',
|
140
149
|
:'paid_on_date',
|
141
150
|
:'memo',
|
151
|
+
:'status',
|
142
152
|
:'company',
|
143
153
|
:'currency',
|
144
154
|
:'exchange_rate',
|
@@ -195,6 +205,10 @@ module MergeAccountingClient
|
|
195
205
|
self.memo = attributes[:'memo']
|
196
206
|
end
|
197
207
|
|
208
|
+
if attributes.key?(:'status')
|
209
|
+
self.status = attributes[:'status']
|
210
|
+
end
|
211
|
+
|
198
212
|
if attributes.key?(:'company')
|
199
213
|
self.company = attributes[:'company']
|
200
214
|
end
|
@@ -245,6 +259,12 @@ module MergeAccountingClient
|
|
245
259
|
end
|
246
260
|
end
|
247
261
|
|
262
|
+
if attributes.key?(:'purchase_orders')
|
263
|
+
if (value = attributes[:'purchase_orders']).is_a?(Array)
|
264
|
+
self.purchase_orders = value
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
248
268
|
if attributes.key?(:'integration_params')
|
249
269
|
if (value = attributes[:'integration_params']).is_a?(Hash)
|
250
270
|
self.integration_params = value
|
@@ -300,6 +320,7 @@ module MergeAccountingClient
|
|
300
320
|
due_date == o.due_date &&
|
301
321
|
paid_on_date == o.paid_on_date &&
|
302
322
|
memo == o.memo &&
|
323
|
+
status == o.status &&
|
303
324
|
company == o.company &&
|
304
325
|
currency == o.currency &&
|
305
326
|
exchange_rate == o.exchange_rate &&
|
@@ -311,6 +332,7 @@ module MergeAccountingClient
|
|
311
332
|
payments == o.payments &&
|
312
333
|
tracking_categories == o.tracking_categories &&
|
313
334
|
line_items == o.line_items &&
|
335
|
+
purchase_orders == o.purchase_orders &&
|
314
336
|
integration_params == o.integration_params &&
|
315
337
|
linked_account_params == o.linked_account_params
|
316
338
|
end
|
@@ -324,7 +346,7 @@ module MergeAccountingClient
|
|
324
346
|
# Calculates hash code according to all attributes.
|
325
347
|
# @return [Integer] Hash code
|
326
348
|
def 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
|
349
|
+
[type, contact, number, issue_date, due_date, paid_on_date, memo, status, company, currency, exchange_rate, total_discount, sub_total, total_tax_amount, total_amount, balance, payments, tracking_categories, line_items, purchase_orders, integration_params, linked_account_params].hash
|
328
350
|
end
|
329
351
|
|
330
352
|
# 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 InvoiceStatusEnum
|
18
|
+
PAID = "PAID".freeze
|
19
|
+
DRAFT = "DRAFT".freeze
|
20
|
+
SUBMITTED = "SUBMITTED".freeze
|
21
|
+
PARTIALLY_PAID = "PARTIALLY_PAID".freeze
|
22
|
+
OPEN = "OPEN".freeze
|
23
|
+
VOID = "VOID".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 ["PAID", "DRAFT", "SUBMITTED", "PARTIALLY_PAID", "OPEN", "VOID", ].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
|
+
InvoiceStatusEnum.new.build_from_hash(value)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
@@ -45,9 +45,11 @@ module MergeAccountingClient
|
|
45
45
|
# When the third party's item note was updated.
|
46
46
|
attr_accessor :remote_updated_at
|
47
47
|
|
48
|
-
# Indicates whether or not this object has been deleted
|
48
|
+
# Indicates whether or not this object has been deleted in the third party platform.
|
49
49
|
attr_accessor :remote_was_deleted
|
50
50
|
|
51
|
+
attr_accessor :created_at
|
52
|
+
|
51
53
|
# This is the datetime that this object was last updated by Merge
|
52
54
|
attr_accessor :modified_at
|
53
55
|
|
@@ -69,6 +71,7 @@ module MergeAccountingClient
|
|
69
71
|
:'company' => :'company',
|
70
72
|
:'remote_updated_at' => :'remote_updated_at',
|
71
73
|
:'remote_was_deleted' => :'remote_was_deleted',
|
74
|
+
:'created_at' => :'created_at',
|
72
75
|
:'modified_at' => :'modified_at',
|
73
76
|
:'field_mappings' => :'field_mappings',
|
74
77
|
:'remote_data' => :'remote_data'
|
@@ -94,6 +97,7 @@ module MergeAccountingClient
|
|
94
97
|
:'company' => :'String',
|
95
98
|
:'remote_updated_at' => :'Time',
|
96
99
|
:'remote_was_deleted' => :'Boolean',
|
100
|
+
:'created_at' => :'Time',
|
97
101
|
:'modified_at' => :'Time',
|
98
102
|
:'field_mappings' => :'Hash<String, Object>',
|
99
103
|
:'remote_data' => :'Array<RemoteData>'
|
@@ -176,6 +180,10 @@ module MergeAccountingClient
|
|
176
180
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
177
181
|
end
|
178
182
|
|
183
|
+
if attributes.key?(:'created_at')
|
184
|
+
self.created_at = attributes[:'created_at']
|
185
|
+
end
|
186
|
+
|
179
187
|
if attributes.key?(:'modified_at')
|
180
188
|
self.modified_at = attributes[:'modified_at']
|
181
189
|
end
|
@@ -222,6 +230,7 @@ module MergeAccountingClient
|
|
222
230
|
company == o.company &&
|
223
231
|
remote_updated_at == o.remote_updated_at &&
|
224
232
|
remote_was_deleted == o.remote_was_deleted &&
|
233
|
+
created_at == o.created_at &&
|
225
234
|
modified_at == o.modified_at &&
|
226
235
|
field_mappings == o.field_mappings &&
|
227
236
|
remote_data == o.remote_data
|
@@ -236,7 +245,7 @@ module MergeAccountingClient
|
|
236
245
|
# Calculates hash code according to all attributes.
|
237
246
|
# @return [Integer] Hash code
|
238
247
|
def 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
|
248
|
+
[id, remote_id, name, status, unit_price, purchase_price, purchase_account, sales_account, company, remote_updated_at, remote_was_deleted, created_at, modified_at, field_mappings, remote_data].hash
|
240
249
|
end
|
241
250
|
|
242
251
|
# Builds the object from hash
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MergeAccountingClient
|
17
|
-
# # The JournalEntry Object ### Description
|
17
|
+
# # The JournalEntry Object ### Description A `JournalEntry` is a record of a transaction or event that is entered into a company's accounting system. The `JournalEntry` common model contains records that are automatically created as a result of a certain type of transaction, like an Invoice, and records that are manually created against a company’s ledger. The lines of a given `JournalEntry` object should always sum to 0. A positive `net_amount` means the line represents a debit and a negative net_amount represents a credit. ### Usage Example Fetch from the `GET JournalEntry` endpoint and view a company's journey entry.
|
18
18
|
class JournalEntry
|
19
19
|
# The journal entry's transaction date.
|
20
20
|
attr_accessor :transaction_date
|
@@ -28,6 +28,9 @@ module MergeAccountingClient
|
|
28
28
|
# Array of `Payment` object IDs.
|
29
29
|
attr_accessor :payments
|
30
30
|
|
31
|
+
# A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry.
|
32
|
+
attr_accessor :applied_payments
|
33
|
+
|
31
34
|
# The journal entry's private note.
|
32
35
|
attr_accessor :memo
|
33
36
|
|
@@ -42,6 +45,9 @@ module MergeAccountingClient
|
|
42
45
|
|
43
46
|
attr_accessor :lines
|
44
47
|
|
48
|
+
# Reference number for identifying journal entries.
|
49
|
+
attr_accessor :journal_number
|
50
|
+
|
45
51
|
attr_accessor :tracking_categories
|
46
52
|
|
47
53
|
attr_accessor :remote_was_deleted
|
@@ -49,11 +55,16 @@ module MergeAccountingClient
|
|
49
55
|
# The journal's posting status. * `UNPOSTED` - UNPOSTED * `POSTED` - POSTED
|
50
56
|
attr_accessor :posting_status
|
51
57
|
|
58
|
+
# The accounting period that the JournalEntry was generated in.
|
59
|
+
attr_accessor :accounting_period
|
60
|
+
|
52
61
|
attr_accessor :id
|
53
62
|
|
54
63
|
# The third-party API ID of the matching object.
|
55
64
|
attr_accessor :remote_id
|
56
65
|
|
66
|
+
attr_accessor :created_at
|
67
|
+
|
57
68
|
# This is the datetime that this object was last updated by Merge
|
58
69
|
attr_accessor :modified_at
|
59
70
|
|
@@ -68,16 +79,20 @@ module MergeAccountingClient
|
|
68
79
|
:'remote_created_at' => :'remote_created_at',
|
69
80
|
:'remote_updated_at' => :'remote_updated_at',
|
70
81
|
:'payments' => :'payments',
|
82
|
+
:'applied_payments' => :'applied_payments',
|
71
83
|
:'memo' => :'memo',
|
72
84
|
:'currency' => :'currency',
|
73
85
|
:'exchange_rate' => :'exchange_rate',
|
74
86
|
:'company' => :'company',
|
75
87
|
:'lines' => :'lines',
|
88
|
+
:'journal_number' => :'journal_number',
|
76
89
|
:'tracking_categories' => :'tracking_categories',
|
77
90
|
:'remote_was_deleted' => :'remote_was_deleted',
|
78
91
|
:'posting_status' => :'posting_status',
|
92
|
+
:'accounting_period' => :'accounting_period',
|
79
93
|
:'id' => :'id',
|
80
94
|
:'remote_id' => :'remote_id',
|
95
|
+
:'created_at' => :'created_at',
|
81
96
|
:'modified_at' => :'modified_at',
|
82
97
|
:'field_mappings' => :'field_mappings',
|
83
98
|
:'remote_data' => :'remote_data'
|
@@ -96,16 +111,20 @@ module MergeAccountingClient
|
|
96
111
|
:'remote_created_at' => :'Time',
|
97
112
|
:'remote_updated_at' => :'Time',
|
98
113
|
:'payments' => :'Array<String>',
|
114
|
+
:'applied_payments' => :'Array<String>',
|
99
115
|
:'memo' => :'String',
|
100
116
|
:'currency' => :'CurrencyEnum',
|
101
117
|
:'exchange_rate' => :'String',
|
102
118
|
:'company' => :'String',
|
103
119
|
:'lines' => :'Array<JournalLine>',
|
120
|
+
:'journal_number' => :'String',
|
104
121
|
:'tracking_categories' => :'Array<String>',
|
105
122
|
:'remote_was_deleted' => :'Boolean',
|
106
123
|
:'posting_status' => :'PostingStatusEnum',
|
124
|
+
:'accounting_period' => :'String',
|
107
125
|
:'id' => :'String',
|
108
126
|
:'remote_id' => :'String',
|
127
|
+
:'created_at' => :'Time',
|
109
128
|
:'modified_at' => :'Time',
|
110
129
|
:'field_mappings' => :'Hash<String, Object>',
|
111
130
|
:'remote_data' => :'Array<RemoteData>'
|
@@ -122,7 +141,9 @@ module MergeAccountingClient
|
|
122
141
|
:'currency',
|
123
142
|
:'exchange_rate',
|
124
143
|
:'company',
|
144
|
+
:'journal_number',
|
125
145
|
:'posting_status',
|
146
|
+
:'accounting_period',
|
126
147
|
:'remote_id',
|
127
148
|
:'field_mappings',
|
128
149
|
:'remote_data'
|
@@ -162,6 +183,12 @@ module MergeAccountingClient
|
|
162
183
|
end
|
163
184
|
end
|
164
185
|
|
186
|
+
if attributes.key?(:'applied_payments')
|
187
|
+
if (value = attributes[:'applied_payments']).is_a?(Array)
|
188
|
+
self.applied_payments = value
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
165
192
|
if attributes.key?(:'memo')
|
166
193
|
self.memo = attributes[:'memo']
|
167
194
|
end
|
@@ -184,6 +211,10 @@ module MergeAccountingClient
|
|
184
211
|
end
|
185
212
|
end
|
186
213
|
|
214
|
+
if attributes.key?(:'journal_number')
|
215
|
+
self.journal_number = attributes[:'journal_number']
|
216
|
+
end
|
217
|
+
|
187
218
|
if attributes.key?(:'tracking_categories')
|
188
219
|
if (value = attributes[:'tracking_categories']).is_a?(Array)
|
189
220
|
self.tracking_categories = value
|
@@ -198,6 +229,10 @@ module MergeAccountingClient
|
|
198
229
|
self.posting_status = attributes[:'posting_status']
|
199
230
|
end
|
200
231
|
|
232
|
+
if attributes.key?(:'accounting_period')
|
233
|
+
self.accounting_period = attributes[:'accounting_period']
|
234
|
+
end
|
235
|
+
|
201
236
|
if attributes.key?(:'id')
|
202
237
|
self.id = attributes[:'id']
|
203
238
|
end
|
@@ -206,6 +241,10 @@ module MergeAccountingClient
|
|
206
241
|
self.remote_id = attributes[:'remote_id']
|
207
242
|
end
|
208
243
|
|
244
|
+
if attributes.key?(:'created_at')
|
245
|
+
self.created_at = attributes[:'created_at']
|
246
|
+
end
|
247
|
+
|
209
248
|
if attributes.key?(:'modified_at')
|
210
249
|
self.modified_at = attributes[:'modified_at']
|
211
250
|
end
|
@@ -232,6 +271,10 @@ module MergeAccountingClient
|
|
232
271
|
invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
|
233
272
|
end
|
234
273
|
|
274
|
+
if !@journal_number.nil? && @journal_number.to_s.length > 70
|
275
|
+
invalid_properties.push('invalid value for "journal_number", the character length must be smaller than or equal to 70.')
|
276
|
+
end
|
277
|
+
|
235
278
|
invalid_properties
|
236
279
|
end
|
237
280
|
|
@@ -239,6 +282,7 @@ module MergeAccountingClient
|
|
239
282
|
# @return true if the model is valid
|
240
283
|
def valid?
|
241
284
|
return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
285
|
+
return false if !@journal_number.nil? && @journal_number.to_s.length > 70
|
242
286
|
true
|
243
287
|
end
|
244
288
|
|
@@ -253,6 +297,16 @@ module MergeAccountingClient
|
|
253
297
|
@exchange_rate = exchange_rate
|
254
298
|
end
|
255
299
|
|
300
|
+
# Custom attribute writer method with validation
|
301
|
+
# @param [Object] journal_number Value to be assigned
|
302
|
+
def journal_number=(journal_number)
|
303
|
+
if !journal_number.nil? && journal_number.to_s.length > 70
|
304
|
+
fail ArgumentError, 'invalid value for "journal_number", the character length must be smaller than or equal to 70.'
|
305
|
+
end
|
306
|
+
|
307
|
+
@journal_number = journal_number
|
308
|
+
end
|
309
|
+
|
256
310
|
# Checks equality by comparing each attribute.
|
257
311
|
# @param [Object] Object to be compared
|
258
312
|
def ==(o)
|
@@ -262,16 +316,20 @@ module MergeAccountingClient
|
|
262
316
|
remote_created_at == o.remote_created_at &&
|
263
317
|
remote_updated_at == o.remote_updated_at &&
|
264
318
|
payments == o.payments &&
|
319
|
+
applied_payments == o.applied_payments &&
|
265
320
|
memo == o.memo &&
|
266
321
|
currency == o.currency &&
|
267
322
|
exchange_rate == o.exchange_rate &&
|
268
323
|
company == o.company &&
|
269
324
|
lines == o.lines &&
|
325
|
+
journal_number == o.journal_number &&
|
270
326
|
tracking_categories == o.tracking_categories &&
|
271
327
|
remote_was_deleted == o.remote_was_deleted &&
|
272
328
|
posting_status == o.posting_status &&
|
329
|
+
accounting_period == o.accounting_period &&
|
273
330
|
id == o.id &&
|
274
331
|
remote_id == o.remote_id &&
|
332
|
+
created_at == o.created_at &&
|
275
333
|
modified_at == o.modified_at &&
|
276
334
|
field_mappings == o.field_mappings &&
|
277
335
|
remote_data == o.remote_data
|
@@ -286,7 +344,7 @@ module MergeAccountingClient
|
|
286
344
|
# Calculates hash code according to all attributes.
|
287
345
|
# @return [Integer] Hash code
|
288
346
|
def hash
|
289
|
-
[transaction_date, remote_created_at, remote_updated_at, payments, memo, currency, exchange_rate, company, lines, tracking_categories, remote_was_deleted, posting_status, id, remote_id, modified_at, field_mappings, remote_data].hash
|
347
|
+
[transaction_date, remote_created_at, remote_updated_at, payments, applied_payments, memo, currency, exchange_rate, company, lines, journal_number, tracking_categories, remote_was_deleted, posting_status, accounting_period, id, remote_id, created_at, modified_at, field_mappings, remote_data].hash
|
290
348
|
end
|
291
349
|
|
292
350
|
# Builds the object from hash
|