merge_accounting_client 1.0.6 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +224 -229
- data/docs/CreditNote.md +1 -1
- data/docs/CreditNoteLineItem.md +1 -1
- data/docs/Expense.md +1 -1
- data/docs/ExpenseLine.md +4 -2
- data/docs/ExpenseLineRequest.md +4 -2
- data/docs/ExpenseRequest.md +1 -1
- data/docs/Invoice.md +1 -1
- data/docs/InvoiceLineItem.md +2 -2
- data/docs/InvoiceLineItemRequest.md +2 -2
- data/docs/InvoiceRequest.md +18 -18
- data/docs/JournalEntry.md +2 -2
- data/docs/JournalEntryRequest.md +10 -10
- data/docs/JournalLine.md +4 -2
- data/docs/JournalLineRequest.md +4 -2
- data/docs/PurchaseOrder.md +2 -2
- data/docs/PurchaseOrderLineItem.md +2 -0
- data/docs/PurchaseOrderLineItemRequest.md +2 -0
- data/docs/PurchaseOrderRequest.md +12 -12
- data/docs/SyncStatusApi.md +11 -15
- data/docs/Transaction.md +4 -2
- data/docs/TransactionLineItem.md +2 -0
- data/docs/VendorCredit.md +2 -2
- data/docs/VendorCreditLine.md +3 -1
- 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/models/account_integration.rb +3 -3
- data/lib/merge_accounting_client/models/credit_note_line_item.rb +9 -9
- data/lib/merge_accounting_client/models/expense.rb +3 -3
- data/lib/merge_accounting_client/models/expense_line.rb +37 -9
- data/lib/merge_accounting_client/models/expense_line_request.rb +37 -9
- data/lib/merge_accounting_client/models/expense_request.rb +3 -3
- data/lib/merge_accounting_client/models/invoice.rb +3 -3
- data/lib/merge_accounting_client/models/invoice_line_item.rb +15 -15
- data/lib/merge_accounting_client/models/invoice_line_item_request.rb +15 -15
- data/lib/merge_accounting_client/models/invoice_request.rb +3 -3
- data/lib/merge_accounting_client/models/journal_entry.rb +3 -3
- data/lib/merge_accounting_client/models/journal_entry_request.rb +3 -3
- data/lib/merge_accounting_client/models/journal_line.rb +37 -9
- data/lib/merge_accounting_client/models/journal_line_request.rb +37 -9
- data/lib/merge_accounting_client/models/payment.rb +3 -3
- data/lib/merge_accounting_client/models/payment_request.rb +3 -3
- data/lib/merge_accounting_client/models/purchase_order.rb +3 -3
- data/lib/merge_accounting_client/models/purchase_order_line_item.rb +21 -10
- data/lib/merge_accounting_client/models/purchase_order_line_item_request.rb +21 -10
- data/lib/merge_accounting_client/models/purchase_order_request.rb +3 -3
- data/lib/merge_accounting_client/models/sync_status_status_enum.rb +2 -1
- data/lib/merge_accounting_client/models/transaction.rb +18 -7
- data/lib/merge_accounting_client/models/transaction_line_item.rb +24 -13
- data/lib/merge_accounting_client/models/vendor_credit.rb +3 -3
- data/lib/merge_accounting_client/models/vendor_credit_line.rb +33 -5
- data/lib/merge_accounting_client/version.rb +1 -1
- data/spec/api/sync_status_api_spec.rb +1 -1
- data/spec/models/expense_line_request_spec.rb +7 -1
- data/spec/models/expense_line_spec.rb +7 -1
- data/spec/models/invoice_line_item_request_spec.rb +6 -6
- data/spec/models/invoice_line_item_spec.rb +6 -6
- data/spec/models/journal_line_request_spec.rb +7 -1
- data/spec/models/journal_line_spec.rb +7 -1
- data/spec/models/purchase_order_line_item_request_spec.rb +6 -0
- data/spec/models/purchase_order_line_item_spec.rb +6 -0
- data/spec/models/transaction_line_item_spec.rb +6 -0
- data/spec/models/transaction_spec.rb +6 -0
- data/spec/models/vendor_credit_line_spec.rb +6 -0
- metadata +146 -146
@@ -16,6 +16,9 @@ require 'time'
|
|
16
16
|
module MergeAccountingClient
|
17
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.
|
18
18
|
class InvoiceLineItem
|
19
|
+
# The third-party API ID of the matching object.
|
20
|
+
attr_accessor :remote_id
|
21
|
+
|
19
22
|
# The line item's description.
|
20
23
|
attr_accessor :description
|
21
24
|
|
@@ -47,14 +50,12 @@ module MergeAccountingClient
|
|
47
50
|
|
48
51
|
attr_accessor :id
|
49
52
|
|
50
|
-
# The third-party API ID of the matching object.
|
51
|
-
attr_accessor :remote_id
|
52
|
-
|
53
53
|
attr_accessor :field_mappings
|
54
54
|
|
55
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
56
56
|
def self.attribute_map
|
57
57
|
{
|
58
|
+
:'remote_id' => :'remote_id',
|
58
59
|
:'description' => :'description',
|
59
60
|
:'unit_price' => :'unit_price',
|
60
61
|
:'quantity' => :'quantity',
|
@@ -67,7 +68,6 @@ module MergeAccountingClient
|
|
67
68
|
:'tracking_categories' => :'tracking_categories',
|
68
69
|
:'company' => :'company',
|
69
70
|
:'id' => :'id',
|
70
|
-
:'remote_id' => :'remote_id',
|
71
71
|
:'field_mappings' => :'field_mappings'
|
72
72
|
}
|
73
73
|
end
|
@@ -80,6 +80,7 @@ module MergeAccountingClient
|
|
80
80
|
# Attribute type mapping.
|
81
81
|
def self.openapi_types
|
82
82
|
{
|
83
|
+
:'remote_id' => :'String',
|
83
84
|
:'description' => :'String',
|
84
85
|
:'unit_price' => :'Float',
|
85
86
|
:'quantity' => :'Float',
|
@@ -92,7 +93,6 @@ module MergeAccountingClient
|
|
92
93
|
:'tracking_categories' => :'Array<String>',
|
93
94
|
:'company' => :'String',
|
94
95
|
:'id' => :'String',
|
95
|
-
:'remote_id' => :'String',
|
96
96
|
:'field_mappings' => :'Hash<String, Object>'
|
97
97
|
}
|
98
98
|
end
|
@@ -100,6 +100,7 @@ module MergeAccountingClient
|
|
100
100
|
# List of attributes with nullable: true
|
101
101
|
def self.openapi_nullable
|
102
102
|
Set.new([
|
103
|
+
:'remote_id',
|
103
104
|
:'description',
|
104
105
|
:'unit_price',
|
105
106
|
:'quantity',
|
@@ -110,7 +111,6 @@ module MergeAccountingClient
|
|
110
111
|
:'account',
|
111
112
|
:'tracking_category',
|
112
113
|
:'company',
|
113
|
-
:'remote_id',
|
114
114
|
:'field_mappings'
|
115
115
|
])
|
116
116
|
end
|
@@ -130,6 +130,10 @@ module MergeAccountingClient
|
|
130
130
|
h[k.to_sym] = v
|
131
131
|
}
|
132
132
|
|
133
|
+
if attributes.key?(:'remote_id')
|
134
|
+
self.remote_id = attributes[:'remote_id']
|
135
|
+
end
|
136
|
+
|
133
137
|
if attributes.key?(:'description')
|
134
138
|
self.description = attributes[:'description']
|
135
139
|
end
|
@@ -180,10 +184,6 @@ module MergeAccountingClient
|
|
180
184
|
self.id = attributes[:'id']
|
181
185
|
end
|
182
186
|
|
183
|
-
if attributes.key?(:'remote_id')
|
184
|
-
self.remote_id = attributes[:'remote_id']
|
185
|
-
end
|
186
|
-
|
187
187
|
if attributes.key?(:'field_mappings')
|
188
188
|
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
189
189
|
self.field_mappings = value
|
@@ -196,7 +196,7 @@ module MergeAccountingClient
|
|
196
196
|
def list_invalid_properties
|
197
197
|
invalid_properties = Array.new
|
198
198
|
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
199
|
-
if !@exchange_rate.nil? && @exchange_rate !~ pattern
|
199
|
+
if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
|
200
200
|
invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
|
201
201
|
end
|
202
202
|
|
@@ -206,7 +206,7 @@ module MergeAccountingClient
|
|
206
206
|
# Check to see if the all the properties in the model are valid
|
207
207
|
# @return true if the model is valid
|
208
208
|
def valid?
|
209
|
-
return false if !@exchange_rate.nil? && @exchange_rate !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
209
|
+
return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
210
210
|
true
|
211
211
|
end
|
212
212
|
|
@@ -214,7 +214,7 @@ module MergeAccountingClient
|
|
214
214
|
# @param [Object] exchange_rate Value to be assigned
|
215
215
|
def exchange_rate=(exchange_rate)
|
216
216
|
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
217
|
-
if !exchange_rate.nil? && exchange_rate !~ pattern
|
217
|
+
if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
|
218
218
|
fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
|
219
219
|
end
|
220
220
|
|
@@ -226,6 +226,7 @@ module MergeAccountingClient
|
|
226
226
|
def ==(o)
|
227
227
|
return true if self.equal?(o)
|
228
228
|
self.class == o.class &&
|
229
|
+
remote_id == o.remote_id &&
|
229
230
|
description == o.description &&
|
230
231
|
unit_price == o.unit_price &&
|
231
232
|
quantity == o.quantity &&
|
@@ -238,7 +239,6 @@ module MergeAccountingClient
|
|
238
239
|
tracking_categories == o.tracking_categories &&
|
239
240
|
company == o.company &&
|
240
241
|
id == o.id &&
|
241
|
-
remote_id == o.remote_id &&
|
242
242
|
field_mappings == o.field_mappings
|
243
243
|
end
|
244
244
|
|
@@ -251,7 +251,7 @@ module MergeAccountingClient
|
|
251
251
|
# Calculates hash code according to all attributes.
|
252
252
|
# @return [Integer] Hash code
|
253
253
|
def hash
|
254
|
-
[description, unit_price, quantity, total_amount, currency, exchange_rate, item, account, tracking_category, tracking_categories, company, id,
|
254
|
+
[remote_id, description, unit_price, quantity, total_amount, currency, exchange_rate, item, account, tracking_category, tracking_categories, company, id, field_mappings].hash
|
255
255
|
end
|
256
256
|
|
257
257
|
# Builds the object from hash
|
@@ -16,6 +16,9 @@ require 'time'
|
|
16
16
|
module MergeAccountingClient
|
17
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.
|
18
18
|
class InvoiceLineItemRequest
|
19
|
+
# The third-party API ID of the matching object.
|
20
|
+
attr_accessor :remote_id
|
21
|
+
|
19
22
|
# The line item's description.
|
20
23
|
attr_accessor :description
|
21
24
|
|
@@ -45,9 +48,6 @@ module MergeAccountingClient
|
|
45
48
|
# The company the line item belongs to.
|
46
49
|
attr_accessor :company
|
47
50
|
|
48
|
-
# The third-party API ID of the matching object.
|
49
|
-
attr_accessor :remote_id
|
50
|
-
|
51
51
|
attr_accessor :integration_params
|
52
52
|
|
53
53
|
attr_accessor :linked_account_params
|
@@ -55,6 +55,7 @@ module MergeAccountingClient
|
|
55
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
56
56
|
def self.attribute_map
|
57
57
|
{
|
58
|
+
:'remote_id' => :'remote_id',
|
58
59
|
:'description' => :'description',
|
59
60
|
:'unit_price' => :'unit_price',
|
60
61
|
:'quantity' => :'quantity',
|
@@ -66,7 +67,6 @@ module MergeAccountingClient
|
|
66
67
|
:'tracking_category' => :'tracking_category',
|
67
68
|
:'tracking_categories' => :'tracking_categories',
|
68
69
|
:'company' => :'company',
|
69
|
-
:'remote_id' => :'remote_id',
|
70
70
|
:'integration_params' => :'integration_params',
|
71
71
|
:'linked_account_params' => :'linked_account_params'
|
72
72
|
}
|
@@ -80,6 +80,7 @@ module MergeAccountingClient
|
|
80
80
|
# Attribute type mapping.
|
81
81
|
def self.openapi_types
|
82
82
|
{
|
83
|
+
:'remote_id' => :'String',
|
83
84
|
:'description' => :'String',
|
84
85
|
:'unit_price' => :'Float',
|
85
86
|
:'quantity' => :'Float',
|
@@ -91,7 +92,6 @@ module MergeAccountingClient
|
|
91
92
|
:'tracking_category' => :'String',
|
92
93
|
:'tracking_categories' => :'Array<String>',
|
93
94
|
:'company' => :'String',
|
94
|
-
:'remote_id' => :'String',
|
95
95
|
:'integration_params' => :'Hash<String, Object>',
|
96
96
|
:'linked_account_params' => :'Hash<String, Object>'
|
97
97
|
}
|
@@ -100,6 +100,7 @@ module MergeAccountingClient
|
|
100
100
|
# List of attributes with nullable: true
|
101
101
|
def self.openapi_nullable
|
102
102
|
Set.new([
|
103
|
+
:'remote_id',
|
103
104
|
:'description',
|
104
105
|
:'unit_price',
|
105
106
|
:'quantity',
|
@@ -110,7 +111,6 @@ module MergeAccountingClient
|
|
110
111
|
:'account',
|
111
112
|
:'tracking_category',
|
112
113
|
:'company',
|
113
|
-
:'remote_id',
|
114
114
|
:'integration_params',
|
115
115
|
:'linked_account_params'
|
116
116
|
])
|
@@ -131,6 +131,10 @@ module MergeAccountingClient
|
|
131
131
|
h[k.to_sym] = v
|
132
132
|
}
|
133
133
|
|
134
|
+
if attributes.key?(:'remote_id')
|
135
|
+
self.remote_id = attributes[:'remote_id']
|
136
|
+
end
|
137
|
+
|
134
138
|
if attributes.key?(:'description')
|
135
139
|
self.description = attributes[:'description']
|
136
140
|
end
|
@@ -177,10 +181,6 @@ module MergeAccountingClient
|
|
177
181
|
self.company = attributes[:'company']
|
178
182
|
end
|
179
183
|
|
180
|
-
if attributes.key?(:'remote_id')
|
181
|
-
self.remote_id = attributes[:'remote_id']
|
182
|
-
end
|
183
|
-
|
184
184
|
if attributes.key?(:'integration_params')
|
185
185
|
if (value = attributes[:'integration_params']).is_a?(Hash)
|
186
186
|
self.integration_params = value
|
@@ -199,7 +199,7 @@ module MergeAccountingClient
|
|
199
199
|
def list_invalid_properties
|
200
200
|
invalid_properties = Array.new
|
201
201
|
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
202
|
-
if !@exchange_rate.nil? && @exchange_rate !~ pattern
|
202
|
+
if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
|
203
203
|
invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
|
204
204
|
end
|
205
205
|
|
@@ -209,7 +209,7 @@ module MergeAccountingClient
|
|
209
209
|
# Check to see if the all the properties in the model are valid
|
210
210
|
# @return true if the model is valid
|
211
211
|
def valid?
|
212
|
-
return false if !@exchange_rate.nil? && @exchange_rate !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
212
|
+
return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
213
213
|
true
|
214
214
|
end
|
215
215
|
|
@@ -217,7 +217,7 @@ module MergeAccountingClient
|
|
217
217
|
# @param [Object] exchange_rate Value to be assigned
|
218
218
|
def exchange_rate=(exchange_rate)
|
219
219
|
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
220
|
-
if !exchange_rate.nil? && exchange_rate !~ pattern
|
220
|
+
if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
|
221
221
|
fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
|
222
222
|
end
|
223
223
|
|
@@ -229,6 +229,7 @@ module MergeAccountingClient
|
|
229
229
|
def ==(o)
|
230
230
|
return true if self.equal?(o)
|
231
231
|
self.class == o.class &&
|
232
|
+
remote_id == o.remote_id &&
|
232
233
|
description == o.description &&
|
233
234
|
unit_price == o.unit_price &&
|
234
235
|
quantity == o.quantity &&
|
@@ -240,7 +241,6 @@ module MergeAccountingClient
|
|
240
241
|
tracking_category == o.tracking_category &&
|
241
242
|
tracking_categories == o.tracking_categories &&
|
242
243
|
company == o.company &&
|
243
|
-
remote_id == o.remote_id &&
|
244
244
|
integration_params == o.integration_params &&
|
245
245
|
linked_account_params == o.linked_account_params
|
246
246
|
end
|
@@ -254,7 +254,7 @@ module MergeAccountingClient
|
|
254
254
|
# Calculates hash code according to all attributes.
|
255
255
|
# @return [Integer] Hash code
|
256
256
|
def hash
|
257
|
-
[description, unit_price, quantity, total_amount, currency, exchange_rate, item, account, tracking_category, tracking_categories, company,
|
257
|
+
[remote_id, description, unit_price, quantity, total_amount, currency, exchange_rate, item, account, tracking_category, tracking_categories, company, integration_params, linked_account_params].hash
|
258
258
|
end
|
259
259
|
|
260
260
|
# Builds the object from hash
|
@@ -253,7 +253,7 @@ module MergeAccountingClient
|
|
253
253
|
def list_invalid_properties
|
254
254
|
invalid_properties = Array.new
|
255
255
|
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
256
|
-
if !@exchange_rate.nil? && @exchange_rate !~ pattern
|
256
|
+
if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
|
257
257
|
invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
|
258
258
|
end
|
259
259
|
|
@@ -263,7 +263,7 @@ module MergeAccountingClient
|
|
263
263
|
# Check to see if the all the properties in the model are valid
|
264
264
|
# @return true if the model is valid
|
265
265
|
def valid?
|
266
|
-
return false if !@exchange_rate.nil? && @exchange_rate !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
266
|
+
return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
267
267
|
true
|
268
268
|
end
|
269
269
|
|
@@ -271,7 +271,7 @@ module MergeAccountingClient
|
|
271
271
|
# @param [Object] exchange_rate Value to be assigned
|
272
272
|
def exchange_rate=(exchange_rate)
|
273
273
|
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
274
|
-
if !exchange_rate.nil? && exchange_rate !~ pattern
|
274
|
+
if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
|
275
275
|
fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
|
276
276
|
end
|
277
277
|
|
@@ -209,7 +209,7 @@ module MergeAccountingClient
|
|
209
209
|
def list_invalid_properties
|
210
210
|
invalid_properties = Array.new
|
211
211
|
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
212
|
-
if !@exchange_rate.nil? && @exchange_rate !~ pattern
|
212
|
+
if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
|
213
213
|
invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
|
214
214
|
end
|
215
215
|
|
@@ -219,7 +219,7 @@ module MergeAccountingClient
|
|
219
219
|
# Check to see if the all the properties in the model are valid
|
220
220
|
# @return true if the model is valid
|
221
221
|
def valid?
|
222
|
-
return false if !@exchange_rate.nil? && @exchange_rate !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
222
|
+
return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
223
223
|
true
|
224
224
|
end
|
225
225
|
|
@@ -227,7 +227,7 @@ module MergeAccountingClient
|
|
227
227
|
# @param [Object] exchange_rate Value to be assigned
|
228
228
|
def exchange_rate=(exchange_rate)
|
229
229
|
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
230
|
-
if !exchange_rate.nil? && exchange_rate !~ pattern
|
230
|
+
if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
|
231
231
|
fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
|
232
232
|
end
|
233
233
|
|
@@ -163,7 +163,7 @@ module MergeAccountingClient
|
|
163
163
|
def list_invalid_properties
|
164
164
|
invalid_properties = Array.new
|
165
165
|
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
166
|
-
if !@exchange_rate.nil? && @exchange_rate !~ pattern
|
166
|
+
if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
|
167
167
|
invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
|
168
168
|
end
|
169
169
|
|
@@ -173,7 +173,7 @@ module MergeAccountingClient
|
|
173
173
|
# Check to see if the all the properties in the model are valid
|
174
174
|
# @return true if the model is valid
|
175
175
|
def valid?
|
176
|
-
return false if !@exchange_rate.nil? && @exchange_rate !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
176
|
+
return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
177
177
|
true
|
178
178
|
end
|
179
179
|
|
@@ -181,7 +181,7 @@ module MergeAccountingClient
|
|
181
181
|
# @param [Object] exchange_rate Value to be assigned
|
182
182
|
def exchange_rate=(exchange_rate)
|
183
183
|
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
184
|
-
if !exchange_rate.nil? && exchange_rate !~ pattern
|
184
|
+
if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
|
185
185
|
fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
|
186
186
|
end
|
187
187
|
|
@@ -16,6 +16,9 @@ require 'time'
|
|
16
16
|
module MergeAccountingClient
|
17
17
|
# # The JournalLine Object ### Description The `JournalLine` object is used to represent a journal entry's line items. ### Usage Example Fetch from the `GET JournalEntry` endpoint and view the journal entry's line items.
|
18
18
|
class JournalLine
|
19
|
+
# The third-party API ID of the matching object.
|
20
|
+
attr_accessor :remote_id
|
21
|
+
|
19
22
|
attr_accessor :account
|
20
23
|
|
21
24
|
# The value of the line item including taxes and other fees.
|
@@ -30,19 +33,20 @@ module MergeAccountingClient
|
|
30
33
|
# The line's description.
|
31
34
|
attr_accessor :description
|
32
35
|
|
33
|
-
# The
|
34
|
-
attr_accessor :
|
36
|
+
# The journal line item's exchange rate.
|
37
|
+
attr_accessor :exchange_rate
|
35
38
|
|
36
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
37
40
|
def self.attribute_map
|
38
41
|
{
|
42
|
+
:'remote_id' => :'remote_id',
|
39
43
|
:'account' => :'account',
|
40
44
|
:'net_amount' => :'net_amount',
|
41
45
|
:'tracking_category' => :'tracking_category',
|
42
46
|
:'tracking_categories' => :'tracking_categories',
|
43
47
|
:'contact' => :'contact',
|
44
48
|
:'description' => :'description',
|
45
|
-
:'
|
49
|
+
:'exchange_rate' => :'exchange_rate'
|
46
50
|
}
|
47
51
|
end
|
48
52
|
|
@@ -54,25 +58,27 @@ module MergeAccountingClient
|
|
54
58
|
# Attribute type mapping.
|
55
59
|
def self.openapi_types
|
56
60
|
{
|
61
|
+
:'remote_id' => :'String',
|
57
62
|
:'account' => :'String',
|
58
63
|
:'net_amount' => :'Float',
|
59
64
|
:'tracking_category' => :'String',
|
60
65
|
:'tracking_categories' => :'Array<String>',
|
61
66
|
:'contact' => :'String',
|
62
67
|
:'description' => :'String',
|
63
|
-
:'
|
68
|
+
:'exchange_rate' => :'String'
|
64
69
|
}
|
65
70
|
end
|
66
71
|
|
67
72
|
# List of attributes with nullable: true
|
68
73
|
def self.openapi_nullable
|
69
74
|
Set.new([
|
75
|
+
:'remote_id',
|
70
76
|
:'account',
|
71
77
|
:'net_amount',
|
72
78
|
:'tracking_category',
|
73
79
|
:'contact',
|
74
80
|
:'description',
|
75
|
-
:'
|
81
|
+
:'exchange_rate'
|
76
82
|
])
|
77
83
|
end
|
78
84
|
|
@@ -91,6 +97,10 @@ module MergeAccountingClient
|
|
91
97
|
h[k.to_sym] = v
|
92
98
|
}
|
93
99
|
|
100
|
+
if attributes.key?(:'remote_id')
|
101
|
+
self.remote_id = attributes[:'remote_id']
|
102
|
+
end
|
103
|
+
|
94
104
|
if attributes.key?(:'account')
|
95
105
|
self.account = attributes[:'account']
|
96
106
|
end
|
@@ -117,8 +127,8 @@ module MergeAccountingClient
|
|
117
127
|
self.description = attributes[:'description']
|
118
128
|
end
|
119
129
|
|
120
|
-
if attributes.key?(:'
|
121
|
-
self.
|
130
|
+
if attributes.key?(:'exchange_rate')
|
131
|
+
self.exchange_rate = attributes[:'exchange_rate']
|
122
132
|
end
|
123
133
|
end
|
124
134
|
|
@@ -126,27 +136,45 @@ module MergeAccountingClient
|
|
126
136
|
# @return Array for valid properties with the reasons
|
127
137
|
def list_invalid_properties
|
128
138
|
invalid_properties = Array.new
|
139
|
+
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
140
|
+
if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
|
141
|
+
invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
|
142
|
+
end
|
143
|
+
|
129
144
|
invalid_properties
|
130
145
|
end
|
131
146
|
|
132
147
|
# Check to see if the all the properties in the model are valid
|
133
148
|
# @return true if the model is valid
|
134
149
|
def valid?
|
150
|
+
return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
135
151
|
true
|
136
152
|
end
|
137
153
|
|
154
|
+
# Custom attribute writer method with validation
|
155
|
+
# @param [Object] exchange_rate Value to be assigned
|
156
|
+
def exchange_rate=(exchange_rate)
|
157
|
+
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
158
|
+
if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
|
159
|
+
fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
|
160
|
+
end
|
161
|
+
|
162
|
+
@exchange_rate = exchange_rate
|
163
|
+
end
|
164
|
+
|
138
165
|
# Checks equality by comparing each attribute.
|
139
166
|
# @param [Object] Object to be compared
|
140
167
|
def ==(o)
|
141
168
|
return true if self.equal?(o)
|
142
169
|
self.class == o.class &&
|
170
|
+
remote_id == o.remote_id &&
|
143
171
|
account == o.account &&
|
144
172
|
net_amount == o.net_amount &&
|
145
173
|
tracking_category == o.tracking_category &&
|
146
174
|
tracking_categories == o.tracking_categories &&
|
147
175
|
contact == o.contact &&
|
148
176
|
description == o.description &&
|
149
|
-
|
177
|
+
exchange_rate == o.exchange_rate
|
150
178
|
end
|
151
179
|
|
152
180
|
# @see the `==` method
|
@@ -158,7 +186,7 @@ module MergeAccountingClient
|
|
158
186
|
# Calculates hash code according to all attributes.
|
159
187
|
# @return [Integer] Hash code
|
160
188
|
def hash
|
161
|
-
[account, net_amount, tracking_category, tracking_categories, contact, description,
|
189
|
+
[remote_id, account, net_amount, tracking_category, tracking_categories, contact, description, exchange_rate].hash
|
162
190
|
end
|
163
191
|
|
164
192
|
# Builds the object from hash
|
@@ -16,6 +16,9 @@ require 'time'
|
|
16
16
|
module MergeAccountingClient
|
17
17
|
# # The JournalLine Object ### Description The `JournalLine` object is used to represent a journal entry's line items. ### Usage Example Fetch from the `GET JournalEntry` endpoint and view the journal entry's line items.
|
18
18
|
class JournalLineRequest
|
19
|
+
# The third-party API ID of the matching object.
|
20
|
+
attr_accessor :remote_id
|
21
|
+
|
19
22
|
attr_accessor :account
|
20
23
|
|
21
24
|
# The value of the line item including taxes and other fees.
|
@@ -30,8 +33,8 @@ module MergeAccountingClient
|
|
30
33
|
# The line's description.
|
31
34
|
attr_accessor :description
|
32
35
|
|
33
|
-
# The
|
34
|
-
attr_accessor :
|
36
|
+
# The journal line item's exchange rate.
|
37
|
+
attr_accessor :exchange_rate
|
35
38
|
|
36
39
|
attr_accessor :integration_params
|
37
40
|
|
@@ -40,13 +43,14 @@ module MergeAccountingClient
|
|
40
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
44
|
def self.attribute_map
|
42
45
|
{
|
46
|
+
:'remote_id' => :'remote_id',
|
43
47
|
:'account' => :'account',
|
44
48
|
:'net_amount' => :'net_amount',
|
45
49
|
:'tracking_category' => :'tracking_category',
|
46
50
|
:'tracking_categories' => :'tracking_categories',
|
47
51
|
:'contact' => :'contact',
|
48
52
|
:'description' => :'description',
|
49
|
-
:'
|
53
|
+
:'exchange_rate' => :'exchange_rate',
|
50
54
|
:'integration_params' => :'integration_params',
|
51
55
|
:'linked_account_params' => :'linked_account_params'
|
52
56
|
}
|
@@ -60,13 +64,14 @@ module MergeAccountingClient
|
|
60
64
|
# Attribute type mapping.
|
61
65
|
def self.openapi_types
|
62
66
|
{
|
67
|
+
:'remote_id' => :'String',
|
63
68
|
:'account' => :'String',
|
64
69
|
:'net_amount' => :'Float',
|
65
70
|
:'tracking_category' => :'String',
|
66
71
|
:'tracking_categories' => :'Array<String>',
|
67
72
|
:'contact' => :'String',
|
68
73
|
:'description' => :'String',
|
69
|
-
:'
|
74
|
+
:'exchange_rate' => :'String',
|
70
75
|
:'integration_params' => :'Hash<String, Object>',
|
71
76
|
:'linked_account_params' => :'Hash<String, Object>'
|
72
77
|
}
|
@@ -75,12 +80,13 @@ module MergeAccountingClient
|
|
75
80
|
# List of attributes with nullable: true
|
76
81
|
def self.openapi_nullable
|
77
82
|
Set.new([
|
83
|
+
:'remote_id',
|
78
84
|
:'account',
|
79
85
|
:'net_amount',
|
80
86
|
:'tracking_category',
|
81
87
|
:'contact',
|
82
88
|
:'description',
|
83
|
-
:'
|
89
|
+
:'exchange_rate',
|
84
90
|
:'integration_params',
|
85
91
|
:'linked_account_params'
|
86
92
|
])
|
@@ -101,6 +107,10 @@ module MergeAccountingClient
|
|
101
107
|
h[k.to_sym] = v
|
102
108
|
}
|
103
109
|
|
110
|
+
if attributes.key?(:'remote_id')
|
111
|
+
self.remote_id = attributes[:'remote_id']
|
112
|
+
end
|
113
|
+
|
104
114
|
if attributes.key?(:'account')
|
105
115
|
self.account = attributes[:'account']
|
106
116
|
end
|
@@ -127,8 +137,8 @@ module MergeAccountingClient
|
|
127
137
|
self.description = attributes[:'description']
|
128
138
|
end
|
129
139
|
|
130
|
-
if attributes.key?(:'
|
131
|
-
self.
|
140
|
+
if attributes.key?(:'exchange_rate')
|
141
|
+
self.exchange_rate = attributes[:'exchange_rate']
|
132
142
|
end
|
133
143
|
|
134
144
|
if attributes.key?(:'integration_params')
|
@@ -148,27 +158,45 @@ module MergeAccountingClient
|
|
148
158
|
# @return Array for valid properties with the reasons
|
149
159
|
def list_invalid_properties
|
150
160
|
invalid_properties = Array.new
|
161
|
+
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
162
|
+
if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
|
163
|
+
invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
|
164
|
+
end
|
165
|
+
|
151
166
|
invalid_properties
|
152
167
|
end
|
153
168
|
|
154
169
|
# Check to see if the all the properties in the model are valid
|
155
170
|
# @return true if the model is valid
|
156
171
|
def valid?
|
172
|
+
return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
157
173
|
true
|
158
174
|
end
|
159
175
|
|
176
|
+
# Custom attribute writer method with validation
|
177
|
+
# @param [Object] exchange_rate Value to be assigned
|
178
|
+
def exchange_rate=(exchange_rate)
|
179
|
+
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
180
|
+
if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
|
181
|
+
fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
|
182
|
+
end
|
183
|
+
|
184
|
+
@exchange_rate = exchange_rate
|
185
|
+
end
|
186
|
+
|
160
187
|
# Checks equality by comparing each attribute.
|
161
188
|
# @param [Object] Object to be compared
|
162
189
|
def ==(o)
|
163
190
|
return true if self.equal?(o)
|
164
191
|
self.class == o.class &&
|
192
|
+
remote_id == o.remote_id &&
|
165
193
|
account == o.account &&
|
166
194
|
net_amount == o.net_amount &&
|
167
195
|
tracking_category == o.tracking_category &&
|
168
196
|
tracking_categories == o.tracking_categories &&
|
169
197
|
contact == o.contact &&
|
170
198
|
description == o.description &&
|
171
|
-
|
199
|
+
exchange_rate == o.exchange_rate &&
|
172
200
|
integration_params == o.integration_params &&
|
173
201
|
linked_account_params == o.linked_account_params
|
174
202
|
end
|
@@ -182,7 +210,7 @@ module MergeAccountingClient
|
|
182
210
|
# Calculates hash code according to all attributes.
|
183
211
|
# @return [Integer] Hash code
|
184
212
|
def hash
|
185
|
-
[account, net_amount, tracking_category, tracking_categories, contact, description,
|
213
|
+
[remote_id, account, net_amount, tracking_category, tracking_categories, contact, description, exchange_rate, integration_params, linked_account_params].hash
|
186
214
|
end
|
187
215
|
|
188
216
|
# Builds the object from hash
|
@@ -189,7 +189,7 @@ module MergeAccountingClient
|
|
189
189
|
def list_invalid_properties
|
190
190
|
invalid_properties = Array.new
|
191
191
|
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
192
|
-
if !@exchange_rate.nil? && @exchange_rate !~ pattern
|
192
|
+
if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
|
193
193
|
invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
|
194
194
|
end
|
195
195
|
|
@@ -199,7 +199,7 @@ module MergeAccountingClient
|
|
199
199
|
# Check to see if the all the properties in the model are valid
|
200
200
|
# @return true if the model is valid
|
201
201
|
def valid?
|
202
|
-
return false if !@exchange_rate.nil? && @exchange_rate !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
202
|
+
return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
203
203
|
true
|
204
204
|
end
|
205
205
|
|
@@ -207,7 +207,7 @@ module MergeAccountingClient
|
|
207
207
|
# @param [Object] exchange_rate Value to be assigned
|
208
208
|
def exchange_rate=(exchange_rate)
|
209
209
|
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
210
|
-
if !exchange_rate.nil? && exchange_rate !~ pattern
|
210
|
+
if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
|
211
211
|
fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
|
212
212
|
end
|
213
213
|
|