merge_accounting_client 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
@@ -37,6 +37,9 @@ module MergeAccountingClient
|
|
37
37
|
# The company the line belongs to.
|
38
38
|
attr_accessor :company
|
39
39
|
|
40
|
+
# The vendor credit line item's exchange rate.
|
41
|
+
attr_accessor :exchange_rate
|
42
|
+
|
40
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
44
|
def self.attribute_map
|
42
45
|
{
|
@@ -46,7 +49,8 @@ module MergeAccountingClient
|
|
46
49
|
:'tracking_categories' => :'tracking_categories',
|
47
50
|
:'description' => :'description',
|
48
51
|
:'account' => :'account',
|
49
|
-
:'company' => :'company'
|
52
|
+
:'company' => :'company',
|
53
|
+
:'exchange_rate' => :'exchange_rate'
|
50
54
|
}
|
51
55
|
end
|
52
56
|
|
@@ -64,7 +68,8 @@ module MergeAccountingClient
|
|
64
68
|
:'tracking_categories' => :'Array<String>',
|
65
69
|
:'description' => :'String',
|
66
70
|
:'account' => :'String',
|
67
|
-
:'company' => :'String'
|
71
|
+
:'company' => :'String',
|
72
|
+
:'exchange_rate' => :'String'
|
68
73
|
}
|
69
74
|
end
|
70
75
|
|
@@ -76,7 +81,8 @@ module MergeAccountingClient
|
|
76
81
|
:'tracking_category',
|
77
82
|
:'description',
|
78
83
|
:'account',
|
79
|
-
:'company'
|
84
|
+
:'company',
|
85
|
+
:'exchange_rate'
|
80
86
|
])
|
81
87
|
end
|
82
88
|
|
@@ -124,6 +130,10 @@ module MergeAccountingClient
|
|
124
130
|
if attributes.key?(:'company')
|
125
131
|
self.company = attributes[:'company']
|
126
132
|
end
|
133
|
+
|
134
|
+
if attributes.key?(:'exchange_rate')
|
135
|
+
self.exchange_rate = attributes[:'exchange_rate']
|
136
|
+
end
|
127
137
|
end
|
128
138
|
|
129
139
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -134,6 +144,11 @@ module MergeAccountingClient
|
|
134
144
|
invalid_properties.push('invalid value for "tracking_categories", tracking_categories cannot be nil.')
|
135
145
|
end
|
136
146
|
|
147
|
+
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
148
|
+
if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
|
149
|
+
invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
|
150
|
+
end
|
151
|
+
|
137
152
|
invalid_properties
|
138
153
|
end
|
139
154
|
|
@@ -141,9 +156,21 @@ module MergeAccountingClient
|
|
141
156
|
# @return true if the model is valid
|
142
157
|
def valid?
|
143
158
|
return false if @tracking_categories.nil?
|
159
|
+
return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
144
160
|
true
|
145
161
|
end
|
146
162
|
|
163
|
+
# Custom attribute writer method with validation
|
164
|
+
# @param [Object] exchange_rate Value to be assigned
|
165
|
+
def exchange_rate=(exchange_rate)
|
166
|
+
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
167
|
+
if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
|
168
|
+
fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
|
169
|
+
end
|
170
|
+
|
171
|
+
@exchange_rate = exchange_rate
|
172
|
+
end
|
173
|
+
|
147
174
|
# Checks equality by comparing each attribute.
|
148
175
|
# @param [Object] Object to be compared
|
149
176
|
def ==(o)
|
@@ -155,7 +182,8 @@ module MergeAccountingClient
|
|
155
182
|
tracking_categories == o.tracking_categories &&
|
156
183
|
description == o.description &&
|
157
184
|
account == o.account &&
|
158
|
-
company == o.company
|
185
|
+
company == o.company &&
|
186
|
+
exchange_rate == o.exchange_rate
|
159
187
|
end
|
160
188
|
|
161
189
|
# @see the `==` method
|
@@ -167,7 +195,7 @@ module MergeAccountingClient
|
|
167
195
|
# Calculates hash code according to all attributes.
|
168
196
|
# @return [Integer] Hash code
|
169
197
|
def hash
|
170
|
-
[remote_id, net_amount, tracking_category, tracking_categories, description, account, company].hash
|
198
|
+
[remote_id, net_amount, tracking_category, tracking_categories, description, account, company, exchange_rate].hash
|
171
199
|
end
|
172
200
|
|
173
201
|
# Builds the object from hash
|
@@ -33,7 +33,7 @@ describe 'SyncStatusApi' do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# unit tests for sync_status_list
|
36
|
-
# Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PAUSED`, `SYNCING`
|
36
|
+
# Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PAUSED`, `SYNCING`, `PARTIALLY_SYNCED`.
|
37
37
|
# @param x_account_token Token identifying the end user.
|
38
38
|
# @param [Hash] opts the optional parameters
|
39
39
|
# @option opts [String] :cursor The pagination cursor value.
|
@@ -25,6 +25,12 @@ describe MergeAccountingClient::ExpenseLineRequest do
|
|
25
25
|
expect(instance).to be_instance_of(MergeAccountingClient::ExpenseLineRequest)
|
26
26
|
end
|
27
27
|
end
|
28
|
+
describe 'test attribute "remote_id"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
28
34
|
describe 'test attribute "item"' do
|
29
35
|
it 'should work' do
|
30
36
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -73,7 +79,7 @@ describe MergeAccountingClient::ExpenseLineRequest do
|
|
73
79
|
end
|
74
80
|
end
|
75
81
|
|
76
|
-
describe 'test attribute "
|
82
|
+
describe 'test attribute "exchange_rate"' do
|
77
83
|
it 'should work' do
|
78
84
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
85
|
end
|
@@ -25,6 +25,12 @@ describe MergeAccountingClient::ExpenseLine do
|
|
25
25
|
expect(instance).to be_instance_of(MergeAccountingClient::ExpenseLine)
|
26
26
|
end
|
27
27
|
end
|
28
|
+
describe 'test attribute "remote_id"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
28
34
|
describe 'test attribute "item"' do
|
29
35
|
it 'should work' do
|
30
36
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -73,7 +79,7 @@ describe MergeAccountingClient::ExpenseLine do
|
|
73
79
|
end
|
74
80
|
end
|
75
81
|
|
76
|
-
describe 'test attribute "
|
82
|
+
describe 'test attribute "exchange_rate"' do
|
77
83
|
it 'should work' do
|
78
84
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
85
|
end
|
@@ -25,6 +25,12 @@ describe MergeAccountingClient::InvoiceLineItemRequest do
|
|
25
25
|
expect(instance).to be_instance_of(MergeAccountingClient::InvoiceLineItemRequest)
|
26
26
|
end
|
27
27
|
end
|
28
|
+
describe 'test attribute "remote_id"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
28
34
|
describe 'test attribute "description"' do
|
29
35
|
it 'should work' do
|
30
36
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -91,12 +97,6 @@ describe MergeAccountingClient::InvoiceLineItemRequest do
|
|
91
97
|
end
|
92
98
|
end
|
93
99
|
|
94
|
-
describe 'test attribute "remote_id"' do
|
95
|
-
it 'should work' do
|
96
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
97
|
-
end
|
98
|
-
end
|
99
|
-
|
100
100
|
describe 'test attribute "integration_params"' do
|
101
101
|
it 'should work' do
|
102
102
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -25,6 +25,12 @@ describe MergeAccountingClient::InvoiceLineItem do
|
|
25
25
|
expect(instance).to be_instance_of(MergeAccountingClient::InvoiceLineItem)
|
26
26
|
end
|
27
27
|
end
|
28
|
+
describe 'test attribute "remote_id"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
28
34
|
describe 'test attribute "description"' do
|
29
35
|
it 'should work' do
|
30
36
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -97,12 +103,6 @@ describe MergeAccountingClient::InvoiceLineItem do
|
|
97
103
|
end
|
98
104
|
end
|
99
105
|
|
100
|
-
describe 'test attribute "remote_id"' do
|
101
|
-
it 'should work' do
|
102
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
106
|
describe 'test attribute "field_mappings"' do
|
107
107
|
it 'should work' do
|
108
108
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -25,6 +25,12 @@ describe MergeAccountingClient::JournalLineRequest do
|
|
25
25
|
expect(instance).to be_instance_of(MergeAccountingClient::JournalLineRequest)
|
26
26
|
end
|
27
27
|
end
|
28
|
+
describe 'test attribute "remote_id"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
28
34
|
describe 'test attribute "account"' do
|
29
35
|
it 'should work' do
|
30
36
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -61,7 +67,7 @@ describe MergeAccountingClient::JournalLineRequest do
|
|
61
67
|
end
|
62
68
|
end
|
63
69
|
|
64
|
-
describe 'test attribute "
|
70
|
+
describe 'test attribute "exchange_rate"' do
|
65
71
|
it 'should work' do
|
66
72
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
67
73
|
end
|
@@ -25,6 +25,12 @@ describe MergeAccountingClient::JournalLine do
|
|
25
25
|
expect(instance).to be_instance_of(MergeAccountingClient::JournalLine)
|
26
26
|
end
|
27
27
|
end
|
28
|
+
describe 'test attribute "remote_id"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
28
34
|
describe 'test attribute "account"' do
|
29
35
|
it 'should work' do
|
30
36
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -61,7 +67,7 @@ describe MergeAccountingClient::JournalLine do
|
|
61
67
|
end
|
62
68
|
end
|
63
69
|
|
64
|
-
describe 'test attribute "
|
70
|
+
describe 'test attribute "exchange_rate"' do
|
65
71
|
it 'should work' do
|
66
72
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
67
73
|
end
|
@@ -25,6 +25,12 @@ describe MergeAccountingClient::PurchaseOrderLineItemRequest do
|
|
25
25
|
expect(instance).to be_instance_of(MergeAccountingClient::PurchaseOrderLineItemRequest)
|
26
26
|
end
|
27
27
|
end
|
28
|
+
describe 'test attribute "remote_id"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
28
34
|
describe 'test attribute "description"' do
|
29
35
|
it 'should work' do
|
30
36
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -25,6 +25,12 @@ describe MergeAccountingClient::PurchaseOrderLineItem do
|
|
25
25
|
expect(instance).to be_instance_of(MergeAccountingClient::PurchaseOrderLineItem)
|
26
26
|
end
|
27
27
|
end
|
28
|
+
describe 'test attribute "remote_id"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
28
34
|
describe 'test attribute "description"' do
|
29
35
|
it 'should work' do
|
30
36
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -25,6 +25,12 @@ describe MergeAccountingClient::TransactionLineItem do
|
|
25
25
|
expect(instance).to be_instance_of(MergeAccountingClient::TransactionLineItem)
|
26
26
|
end
|
27
27
|
end
|
28
|
+
describe 'test attribute "remote_id"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
28
34
|
describe 'test attribute "memo"' do
|
29
35
|
it 'should work' do
|
30
36
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -79,6 +79,12 @@ describe MergeAccountingClient::Transaction do
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
|
+
describe 'test attribute "tracking_categories"' do
|
83
|
+
it 'should work' do
|
84
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
82
88
|
describe 'test attribute "line_items"' do
|
83
89
|
it 'should work' do
|
84
90
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -67,4 +67,10 @@ describe MergeAccountingClient::VendorCreditLine do
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
+
describe 'test attribute "exchange_rate"' do
|
71
|
+
it 'should work' do
|
72
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
70
76
|
end
|