merge_accounting_client 1.0.8 → 1.0.9
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 -224
- data/docs/Account.md +2 -0
- data/docs/AccountIntegration.md +5 -1
- data/docs/AccountingAttachment.md +2 -0
- data/docs/AccountingPhoneNumber.md +3 -1
- data/docs/AccountsApi.md +4 -4
- data/docs/Address.md +4 -2
- data/docs/AsyncPassthroughApi.md +155 -0
- data/docs/AsyncPassthroughReciept.md +18 -0
- data/docs/AttachmentsApi.md +4 -4
- data/docs/BalanceSheet.md +2 -0
- data/docs/BalanceSheetsApi.md +4 -4
- data/docs/CashFlowStatement.md +2 -0
- data/docs/CashFlowStatementsApi.md +4 -4
- data/docs/CompanyInfo.md +3 -1
- data/docs/CompanyInfoApi.md +4 -4
- data/docs/Contact.md +2 -0
- data/docs/ContactsApi.md +4 -4
- data/docs/CreditNote.md +6 -0
- data/docs/CreditNoteLineItem.md +3 -1
- data/docs/CreditNotesApi.md +4 -4
- data/docs/DeleteAccountApi.md +9 -9
- data/docs/EndUserDetailsRequest.md +1 -1
- data/docs/Expense.md +4 -0
- data/docs/ExpenseLine.md +3 -1
- data/docs/ExpenseRequest.md +2 -0
- data/docs/ExpensesApi.md +4 -4
- data/docs/ForceResyncApi.md +1 -1
- data/docs/IncomeStatement.md +2 -0
- data/docs/IncomeStatementsApi.md +4 -4
- data/docs/Invoice.md +7 -3
- data/docs/InvoiceLineItem.md +2 -0
- data/docs/InvoiceRequest.md +3 -1
- data/docs/InvoicesApi.md +4 -4
- data/docs/Issue.md +1 -1
- data/docs/IssuesApi.md +6 -6
- data/docs/Item.md +2 -0
- data/docs/ItemsApi.md +4 -4
- data/docs/JournalEntriesApi.md +4 -4
- data/docs/JournalEntry.md +4 -0
- data/docs/JournalLine.md +3 -1
- data/docs/LinkedAccountsApi.md +2 -2
- data/docs/Payment.md +4 -0
- data/docs/PaymentRequest.md +2 -0
- data/docs/PaymentsApi.md +4 -4
- data/docs/PurchaseOrder.md +4 -0
- data/docs/PurchaseOrderLineItem.md +3 -1
- data/docs/PurchaseOrdersApi.md +4 -4
- data/docs/RemoteData.md +1 -1
- data/docs/ReportItem.md +3 -1
- data/docs/SyncStatus.md +1 -1
- data/docs/SyncStatusApi.md +15 -11
- data/docs/TaxRate.md +2 -0
- data/docs/TaxRatesApi.md +4 -4
- data/docs/TrackingCategoriesApi.md +4 -4
- data/docs/TrackingCategory.md +2 -0
- data/docs/Transaction.md +2 -0
- data/docs/TransactionLineItem.md +3 -1
- data/docs/TransactionsApi.md +4 -4
- data/docs/VendorCredit.md +4 -0
- data/docs/VendorCreditLine.md +3 -1
- data/docs/VendorCreditsApi.md +4 -4
- data/git_push.sh +58 -0
- data/lib/merge_accounting_client/api/accounts_api.rb +4 -4
- data/lib/merge_accounting_client/api/async_passthrough_api.rb +160 -0
- data/lib/merge_accounting_client/api/attachments_api.rb +4 -4
- data/lib/merge_accounting_client/api/balance_sheets_api.rb +4 -4
- data/lib/merge_accounting_client/api/cash_flow_statements_api.rb +4 -4
- data/lib/merge_accounting_client/api/company_info_api.rb +4 -4
- data/lib/merge_accounting_client/api/contacts_api.rb +4 -4
- data/lib/merge_accounting_client/api/credit_notes_api.rb +6 -6
- data/lib/merge_accounting_client/api/delete_account_api.rb +7 -7
- data/lib/merge_accounting_client/api/expenses_api.rb +6 -6
- data/lib/merge_accounting_client/api/force_resync_api.rb +2 -2
- data/lib/merge_accounting_client/api/income_statements_api.rb +4 -4
- data/lib/merge_accounting_client/api/invoices_api.rb +6 -6
- data/lib/merge_accounting_client/api/issues_api.rb +6 -6
- data/lib/merge_accounting_client/api/items_api.rb +4 -4
- data/lib/merge_accounting_client/api/journal_entries_api.rb +6 -6
- data/lib/merge_accounting_client/api/linked_accounts_api.rb +2 -2
- data/lib/merge_accounting_client/api/payments_api.rb +6 -6
- data/lib/merge_accounting_client/api/purchase_orders_api.rb +6 -6
- data/lib/merge_accounting_client/api/sync_status_api.rb +2 -2
- data/lib/merge_accounting_client/api/tax_rates_api.rb +4 -4
- data/lib/merge_accounting_client/api/tracking_categories_api.rb +4 -4
- data/lib/merge_accounting_client/api/transactions_api.rb +4 -4
- data/lib/merge_accounting_client/api/vendor_credits_api.rb +6 -6
- data/lib/merge_accounting_client/models/account.rb +11 -1
- data/lib/merge_accounting_client/models/account_integration.rb +26 -4
- data/lib/merge_accounting_client/models/accounting_attachment.rb +11 -1
- data/lib/merge_accounting_client/models/accounting_phone_number.rb +15 -5
- data/lib/merge_accounting_client/models/address.rb +15 -5
- data/lib/merge_accounting_client/models/async_passthrough_reciept.rb +223 -0
- data/lib/merge_accounting_client/models/balance_sheet.rb +11 -1
- data/lib/merge_accounting_client/models/cash_flow_statement.rb +11 -1
- data/lib/merge_accounting_client/models/company_info.rb +11 -1
- data/lib/merge_accounting_client/models/contact.rb +11 -1
- data/lib/merge_accounting_client/models/credit_note.rb +50 -1
- data/lib/merge_accounting_client/models/credit_note_line_item.rb +15 -5
- data/lib/merge_accounting_client/models/end_user_details_request.rb +1 -1
- data/lib/merge_accounting_client/models/expense.rb +22 -1
- data/lib/merge_accounting_client/models/expense_line.rb +15 -5
- data/lib/merge_accounting_client/models/expense_request.rb +12 -1
- data/lib/merge_accounting_client/models/income_statement.rb +11 -1
- data/lib/merge_accounting_client/models/invoice.rb +33 -12
- data/lib/merge_accounting_client/models/invoice_line_item.rb +12 -2
- data/lib/merge_accounting_client/models/invoice_line_item_request.rb +1 -1
- data/lib/merge_accounting_client/models/invoice_request.rb +13 -2
- data/lib/merge_accounting_client/models/issue.rb +1 -0
- data/lib/merge_accounting_client/models/item.rb +11 -1
- data/lib/merge_accounting_client/models/journal_entry.rb +22 -1
- data/lib/merge_accounting_client/models/journal_line.rb +15 -5
- data/lib/merge_accounting_client/models/payment.rb +22 -1
- data/lib/merge_accounting_client/models/payment_request.rb +12 -1
- data/lib/merge_accounting_client/models/purchase_order.rb +22 -1
- data/lib/merge_accounting_client/models/purchase_order_line_item.rb +15 -5
- data/lib/merge_accounting_client/models/remote_data.rb +3 -4
- data/lib/merge_accounting_client/models/report_item.rb +15 -5
- data/lib/merge_accounting_client/models/sync_status_status_enum.rb +1 -1
- data/lib/merge_accounting_client/models/tax_rate.rb +11 -1
- data/lib/merge_accounting_client/models/tracking_category.rb +11 -1
- data/lib/merge_accounting_client/models/transaction.rb +11 -1
- data/lib/merge_accounting_client/models/transaction_line_item.rb +15 -5
- data/lib/merge_accounting_client/models/vendor_credit.rb +22 -1
- data/lib/merge_accounting_client/models/vendor_credit_line.rb +15 -5
- data/lib/merge_accounting_client/version.rb +1 -1
- data/lib/merge_accounting_client.rb +6 -2
- data/spec/api/accounts_api_spec.rb +2 -2
- data/spec/api/async_passthrough_api_spec.rb +59 -0
- data/spec/api/attachments_api_spec.rb +2 -2
- data/spec/api/balance_sheets_api_spec.rb +2 -2
- data/spec/api/cash_flow_statements_api_spec.rb +2 -2
- data/spec/api/company_info_api_spec.rb +2 -2
- data/spec/api/contacts_api_spec.rb +2 -2
- data/spec/api/credit_notes_api_spec.rb +2 -2
- data/spec/api/delete_account_api_spec.rb +2 -2
- data/spec/api/expenses_api_spec.rb +2 -2
- data/spec/api/force_resync_api_spec.rb +1 -1
- data/spec/api/income_statements_api_spec.rb +2 -2
- data/spec/api/invoices_api_spec.rb +2 -2
- data/spec/api/issues_api_spec.rb +3 -3
- data/spec/api/items_api_spec.rb +2 -2
- data/spec/api/journal_entries_api_spec.rb +2 -2
- data/spec/api/linked_accounts_api_spec.rb +1 -1
- data/spec/api/payments_api_spec.rb +2 -2
- data/spec/api/purchase_orders_api_spec.rb +2 -2
- data/spec/api/sync_status_api_spec.rb +1 -1
- data/spec/api/tax_rates_api_spec.rb +2 -2
- data/spec/api/tracking_categories_api_spec.rb +2 -2
- data/spec/api/transactions_api_spec.rb +2 -2
- data/spec/api/vendor_credits_api_spec.rb +2 -2
- data/spec/models/account_integration_spec.rb +12 -0
- data/spec/models/account_spec.rb +6 -0
- data/spec/models/accounting_attachment_spec.rb +6 -0
- data/spec/models/accounting_phone_number_spec.rb +6 -0
- data/spec/models/address_spec.rb +6 -0
- data/spec/models/async_passthrough_reciept_spec.rb +34 -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 +6 -0
- data/spec/models/credit_note_spec.rb +18 -0
- data/spec/models/expense_line_spec.rb +6 -0
- data/spec/models/expense_request_spec.rb +6 -0
- data/spec/models/expense_spec.rb +12 -0
- data/spec/models/income_statement_spec.rb +6 -0
- data/spec/models/invoice_line_item_spec.rb +6 -0
- data/spec/models/invoice_request_spec.rb +6 -0
- data/spec/models/invoice_spec.rb +14 -2
- data/spec/models/item_spec.rb +6 -0
- data/spec/models/journal_entry_spec.rb +12 -0
- data/spec/models/journal_line_spec.rb +6 -0
- data/spec/models/payment_request_spec.rb +6 -0
- data/spec/models/payment_spec.rb +12 -0
- data/spec/models/purchase_order_line_item_spec.rb +6 -0
- data/spec/models/purchase_order_spec.rb +12 -0
- data/spec/models/report_item_spec.rb +6 -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 +6 -0
- data/spec/models/transaction_spec.rb +6 -0
- data/spec/models/vendor_credit_line_spec.rb +6 -0
- data/spec/models/vendor_credit_spec.rb +12 -0
- metadata +163 -154
@@ -0,0 +1,223 @@
|
|
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 AsyncPassthroughReciept
|
18
|
+
attr_accessor :async_passthrough_receipt_id
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'async_passthrough_receipt_id' => :'async_passthrough_receipt_id'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'async_passthrough_receipt_id' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeAccountingClient::AsyncPassthroughReciept` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeAccountingClient::AsyncPassthroughReciept`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'async_passthrough_receipt_id')
|
61
|
+
self.async_passthrough_receipt_id = attributes[:'async_passthrough_receipt_id']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
if @async_passthrough_receipt_id.nil?
|
70
|
+
invalid_properties.push('invalid value for "async_passthrough_receipt_id", async_passthrough_receipt_id cannot be nil.')
|
71
|
+
end
|
72
|
+
|
73
|
+
invalid_properties
|
74
|
+
end
|
75
|
+
|
76
|
+
# Check to see if the all the properties in the model are valid
|
77
|
+
# @return true if the model is valid
|
78
|
+
def valid?
|
79
|
+
return false if @async_passthrough_receipt_id.nil?
|
80
|
+
true
|
81
|
+
end
|
82
|
+
|
83
|
+
# Checks equality by comparing each attribute.
|
84
|
+
# @param [Object] Object to be compared
|
85
|
+
def ==(o)
|
86
|
+
return true if self.equal?(o)
|
87
|
+
self.class == o.class &&
|
88
|
+
async_passthrough_receipt_id == o.async_passthrough_receipt_id
|
89
|
+
end
|
90
|
+
|
91
|
+
# @see the `==` method
|
92
|
+
# @param [Object] Object to be compared
|
93
|
+
def eql?(o)
|
94
|
+
self == o
|
95
|
+
end
|
96
|
+
|
97
|
+
# Calculates hash code according to all attributes.
|
98
|
+
# @return [Integer] Hash code
|
99
|
+
def hash
|
100
|
+
[async_passthrough_receipt_id].hash
|
101
|
+
end
|
102
|
+
|
103
|
+
# Builds the object from hash
|
104
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
105
|
+
# @return [Object] Returns the model itself
|
106
|
+
def self.build_from_hash(attributes)
|
107
|
+
new.build_from_hash(attributes)
|
108
|
+
end
|
109
|
+
|
110
|
+
# Builds the object from hash
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
112
|
+
# @return [Object] Returns the model itself
|
113
|
+
def build_from_hash(attributes)
|
114
|
+
return nil unless attributes.is_a?(Hash)
|
115
|
+
self.class.openapi_types.each_pair do |key, type|
|
116
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
117
|
+
self.send("#{key}=", nil)
|
118
|
+
elsif type =~ /\AArray<(.*)>/i
|
119
|
+
# check to ensure the input is an array given that the attribute
|
120
|
+
# is documented as an array but the input is not
|
121
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
122
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
123
|
+
end
|
124
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
125
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
self
|
130
|
+
end
|
131
|
+
|
132
|
+
# Deserializes the data based on type
|
133
|
+
# @param string type Data type
|
134
|
+
# @param string value Value to be deserialized
|
135
|
+
# @return [Object] Deserialized data
|
136
|
+
def _deserialize(type, value)
|
137
|
+
case type.to_sym
|
138
|
+
when :Time
|
139
|
+
Time.parse(value)
|
140
|
+
when :Date
|
141
|
+
Date.parse(value)
|
142
|
+
when :String
|
143
|
+
value
|
144
|
+
when :Integer
|
145
|
+
value.to_i
|
146
|
+
when :Float
|
147
|
+
value.to_f
|
148
|
+
when :Boolean
|
149
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
150
|
+
true
|
151
|
+
else
|
152
|
+
false
|
153
|
+
end
|
154
|
+
when :Object
|
155
|
+
# generic object (usually a Hash), return directly
|
156
|
+
value
|
157
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
158
|
+
inner_type = Regexp.last_match[:inner_type]
|
159
|
+
value.map { |v| _deserialize(inner_type, v) }
|
160
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
161
|
+
k_type = Regexp.last_match[:k_type]
|
162
|
+
v_type = Regexp.last_match[:v_type]
|
163
|
+
{}.tap do |hash|
|
164
|
+
value.each do |k, v|
|
165
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
else # model
|
169
|
+
# models (e.g. Pet) or oneOf
|
170
|
+
klass = MergeAccountingClient.const_get(type)
|
171
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
# Returns the string representation of the object
|
176
|
+
# @return [String] String presentation of the object
|
177
|
+
def to_s
|
178
|
+
to_hash.to_s
|
179
|
+
end
|
180
|
+
|
181
|
+
# to_body is an alias to to_hash (backward compatibility)
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
183
|
+
def to_body
|
184
|
+
to_hash
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the object in the form of hash
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_hash
|
190
|
+
hash = {}
|
191
|
+
self.class.attribute_map.each_pair do |attr, param|
|
192
|
+
value = self.send(attr)
|
193
|
+
if value.nil?
|
194
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
195
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
196
|
+
end
|
197
|
+
|
198
|
+
hash[param] = _to_hash(value)
|
199
|
+
end
|
200
|
+
hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Outputs non-array value in the form of hash
|
204
|
+
# For object, use to_hash. Otherwise, just return the value
|
205
|
+
# @param [Object] value Any valid value
|
206
|
+
# @return [Hash] Returns the value in the form of hash
|
207
|
+
def _to_hash(value)
|
208
|
+
if value.is_a?(Array)
|
209
|
+
value.compact.map { |v| _to_hash(v) }
|
210
|
+
elsif value.is_a?(Hash)
|
211
|
+
{}.tap do |hash|
|
212
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
213
|
+
end
|
214
|
+
elsif value.respond_to? :to_hash
|
215
|
+
value.to_hash
|
216
|
+
else
|
217
|
+
value
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|
@@ -48,6 +48,9 @@ module MergeAccountingClient
|
|
48
48
|
# Indicates whether or not this object has been deleted by third party webhooks.
|
49
49
|
attr_accessor :remote_was_deleted
|
50
50
|
|
51
|
+
# This is the datetime that this object was last updated by Merge
|
52
|
+
attr_accessor :modified_at
|
53
|
+
|
51
54
|
attr_accessor :field_mappings
|
52
55
|
|
53
56
|
attr_accessor :remote_data
|
@@ -67,6 +70,7 @@ module MergeAccountingClient
|
|
67
70
|
:'equity' => :'equity',
|
68
71
|
:'remote_generated_at' => :'remote_generated_at',
|
69
72
|
:'remote_was_deleted' => :'remote_was_deleted',
|
73
|
+
:'modified_at' => :'modified_at',
|
70
74
|
:'field_mappings' => :'field_mappings',
|
71
75
|
:'remote_data' => :'remote_data'
|
72
76
|
}
|
@@ -92,6 +96,7 @@ module MergeAccountingClient
|
|
92
96
|
:'equity' => :'Array<ReportItem>',
|
93
97
|
:'remote_generated_at' => :'Time',
|
94
98
|
:'remote_was_deleted' => :'Boolean',
|
99
|
+
:'modified_at' => :'Time',
|
95
100
|
:'field_mappings' => :'Hash<String, Object>',
|
96
101
|
:'remote_data' => :'Array<RemoteData>'
|
97
102
|
}
|
@@ -181,6 +186,10 @@ module MergeAccountingClient
|
|
181
186
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
182
187
|
end
|
183
188
|
|
189
|
+
if attributes.key?(:'modified_at')
|
190
|
+
self.modified_at = attributes[:'modified_at']
|
191
|
+
end
|
192
|
+
|
184
193
|
if attributes.key?(:'field_mappings')
|
185
194
|
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
186
195
|
self.field_mappings = value
|
@@ -224,6 +233,7 @@ module MergeAccountingClient
|
|
224
233
|
equity == o.equity &&
|
225
234
|
remote_generated_at == o.remote_generated_at &&
|
226
235
|
remote_was_deleted == o.remote_was_deleted &&
|
236
|
+
modified_at == o.modified_at &&
|
227
237
|
field_mappings == o.field_mappings &&
|
228
238
|
remote_data == o.remote_data
|
229
239
|
end
|
@@ -237,7 +247,7 @@ module MergeAccountingClient
|
|
237
247
|
# Calculates hash code according to all attributes.
|
238
248
|
# @return [Integer] Hash code
|
239
249
|
def hash
|
240
|
-
[id, remote_id, name, currency, company, date, net_assets, assets, liabilities, equity, remote_generated_at, remote_was_deleted, field_mappings, remote_data].hash
|
250
|
+
[id, remote_id, name, currency, company, date, net_assets, assets, liabilities, equity, remote_generated_at, remote_was_deleted, modified_at, field_mappings, remote_data].hash
|
241
251
|
end
|
242
252
|
|
243
253
|
# Builds the object from hash
|
@@ -54,6 +54,9 @@ module MergeAccountingClient
|
|
54
54
|
# Indicates whether or not this object has been deleted by third party webhooks.
|
55
55
|
attr_accessor :remote_was_deleted
|
56
56
|
|
57
|
+
# This is the datetime that this object was last updated by Merge
|
58
|
+
attr_accessor :modified_at
|
59
|
+
|
57
60
|
attr_accessor :field_mappings
|
58
61
|
|
59
62
|
attr_accessor :remote_data
|
@@ -75,6 +78,7 @@ module MergeAccountingClient
|
|
75
78
|
:'financing_activities' => :'financing_activities',
|
76
79
|
:'remote_generated_at' => :'remote_generated_at',
|
77
80
|
:'remote_was_deleted' => :'remote_was_deleted',
|
81
|
+
:'modified_at' => :'modified_at',
|
78
82
|
:'field_mappings' => :'field_mappings',
|
79
83
|
:'remote_data' => :'remote_data'
|
80
84
|
}
|
@@ -102,6 +106,7 @@ module MergeAccountingClient
|
|
102
106
|
:'financing_activities' => :'Array<ReportItem>',
|
103
107
|
:'remote_generated_at' => :'Time',
|
104
108
|
:'remote_was_deleted' => :'Boolean',
|
109
|
+
:'modified_at' => :'Time',
|
105
110
|
:'field_mappings' => :'Hash<String, Object>',
|
106
111
|
:'remote_data' => :'Array<RemoteData>'
|
107
112
|
}
|
@@ -201,6 +206,10 @@ module MergeAccountingClient
|
|
201
206
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
202
207
|
end
|
203
208
|
|
209
|
+
if attributes.key?(:'modified_at')
|
210
|
+
self.modified_at = attributes[:'modified_at']
|
211
|
+
end
|
212
|
+
|
204
213
|
if attributes.key?(:'field_mappings')
|
205
214
|
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
206
215
|
self.field_mappings = value
|
@@ -246,6 +255,7 @@ module MergeAccountingClient
|
|
246
255
|
financing_activities == o.financing_activities &&
|
247
256
|
remote_generated_at == o.remote_generated_at &&
|
248
257
|
remote_was_deleted == o.remote_was_deleted &&
|
258
|
+
modified_at == o.modified_at &&
|
249
259
|
field_mappings == o.field_mappings &&
|
250
260
|
remote_data == o.remote_data
|
251
261
|
end
|
@@ -259,7 +269,7 @@ module MergeAccountingClient
|
|
259
269
|
# Calculates hash code according to all attributes.
|
260
270
|
# @return [Integer] Hash code
|
261
271
|
def hash
|
262
|
-
[id, remote_id, name, currency, company, start_period, end_period, cash_at_beginning_of_period, cash_at_end_of_period, operating_activities, investing_activities, financing_activities, remote_generated_at, remote_was_deleted, field_mappings, remote_data].hash
|
272
|
+
[id, remote_id, name, currency, company, start_period, end_period, cash_at_beginning_of_period, cash_at_end_of_period, operating_activities, investing_activities, financing_activities, remote_generated_at, remote_was_deleted, modified_at, field_mappings, remote_data].hash
|
263
273
|
end
|
264
274
|
|
265
275
|
# Builds the object from hash
|
@@ -52,6 +52,9 @@ module MergeAccountingClient
|
|
52
52
|
# Indicates whether or not this object has been deleted by third party webhooks.
|
53
53
|
attr_accessor :remote_was_deleted
|
54
54
|
|
55
|
+
# This is the datetime that this object was last updated by Merge
|
56
|
+
attr_accessor :modified_at
|
57
|
+
|
55
58
|
attr_accessor :field_mappings
|
56
59
|
|
57
60
|
attr_accessor :remote_data
|
@@ -72,6 +75,7 @@ module MergeAccountingClient
|
|
72
75
|
:'addresses' => :'addresses',
|
73
76
|
:'phone_numbers' => :'phone_numbers',
|
74
77
|
:'remote_was_deleted' => :'remote_was_deleted',
|
78
|
+
:'modified_at' => :'modified_at',
|
75
79
|
:'field_mappings' => :'field_mappings',
|
76
80
|
:'remote_data' => :'remote_data'
|
77
81
|
}
|
@@ -98,6 +102,7 @@ module MergeAccountingClient
|
|
98
102
|
:'addresses' => :'Array<Address>',
|
99
103
|
:'phone_numbers' => :'Array<AccountingPhoneNumber>',
|
100
104
|
:'remote_was_deleted' => :'Boolean',
|
105
|
+
:'modified_at' => :'Time',
|
101
106
|
:'field_mappings' => :'Hash<String, Object>',
|
102
107
|
:'remote_data' => :'Array<RemoteData>'
|
103
108
|
}
|
@@ -193,6 +198,10 @@ module MergeAccountingClient
|
|
193
198
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
194
199
|
end
|
195
200
|
|
201
|
+
if attributes.key?(:'modified_at')
|
202
|
+
self.modified_at = attributes[:'modified_at']
|
203
|
+
end
|
204
|
+
|
196
205
|
if attributes.key?(:'field_mappings')
|
197
206
|
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
198
207
|
self.field_mappings = value
|
@@ -285,6 +294,7 @@ module MergeAccountingClient
|
|
285
294
|
addresses == o.addresses &&
|
286
295
|
phone_numbers == o.phone_numbers &&
|
287
296
|
remote_was_deleted == o.remote_was_deleted &&
|
297
|
+
modified_at == o.modified_at &&
|
288
298
|
field_mappings == o.field_mappings &&
|
289
299
|
remote_data == o.remote_data
|
290
300
|
end
|
@@ -298,7 +308,7 @@ module MergeAccountingClient
|
|
298
308
|
# Calculates hash code according to all attributes.
|
299
309
|
# @return [Integer] Hash code
|
300
310
|
def hash
|
301
|
-
[id, remote_id, name, legal_name, tax_number, fiscal_year_end_month, fiscal_year_end_day, currency, remote_created_at, urls, addresses, phone_numbers, remote_was_deleted, field_mappings, remote_data].hash
|
311
|
+
[id, remote_id, name, legal_name, tax_number, fiscal_year_end_month, fiscal_year_end_day, currency, remote_created_at, urls, addresses, phone_numbers, remote_was_deleted, modified_at, field_mappings, remote_data].hash
|
302
312
|
end
|
303
313
|
|
304
314
|
# Builds the object from hash
|
@@ -57,6 +57,9 @@ module MergeAccountingClient
|
|
57
57
|
# Indicates whether or not this object has been deleted by third party webhooks.
|
58
58
|
attr_accessor :remote_was_deleted
|
59
59
|
|
60
|
+
# This is the datetime that this object was last updated by Merge
|
61
|
+
attr_accessor :modified_at
|
62
|
+
|
60
63
|
attr_accessor :field_mappings
|
61
64
|
|
62
65
|
attr_accessor :remote_data
|
@@ -78,6 +81,7 @@ module MergeAccountingClient
|
|
78
81
|
:'addresses' => :'addresses',
|
79
82
|
:'phone_numbers' => :'phone_numbers',
|
80
83
|
:'remote_was_deleted' => :'remote_was_deleted',
|
84
|
+
:'modified_at' => :'modified_at',
|
81
85
|
:'field_mappings' => :'field_mappings',
|
82
86
|
:'remote_data' => :'remote_data'
|
83
87
|
}
|
@@ -105,6 +109,7 @@ module MergeAccountingClient
|
|
105
109
|
:'addresses' => :'Array<String>',
|
106
110
|
:'phone_numbers' => :'Array<AccountingPhoneNumber>',
|
107
111
|
:'remote_was_deleted' => :'Boolean',
|
112
|
+
:'modified_at' => :'Time',
|
108
113
|
:'field_mappings' => :'Hash<String, Object>',
|
109
114
|
:'remote_data' => :'Array<RemoteData>'
|
110
115
|
}
|
@@ -203,6 +208,10 @@ module MergeAccountingClient
|
|
203
208
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
204
209
|
end
|
205
210
|
|
211
|
+
if attributes.key?(:'modified_at')
|
212
|
+
self.modified_at = attributes[:'modified_at']
|
213
|
+
end
|
214
|
+
|
206
215
|
if attributes.key?(:'field_mappings')
|
207
216
|
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
208
217
|
self.field_mappings = value
|
@@ -248,6 +257,7 @@ module MergeAccountingClient
|
|
248
257
|
addresses == o.addresses &&
|
249
258
|
phone_numbers == o.phone_numbers &&
|
250
259
|
remote_was_deleted == o.remote_was_deleted &&
|
260
|
+
modified_at == o.modified_at &&
|
251
261
|
field_mappings == o.field_mappings &&
|
252
262
|
remote_data == o.remote_data
|
253
263
|
end
|
@@ -261,7 +271,7 @@ module MergeAccountingClient
|
|
261
271
|
# Calculates hash code according to all attributes.
|
262
272
|
# @return [Integer] Hash code
|
263
273
|
def hash
|
264
|
-
[id, remote_id, name, is_supplier, is_customer, email_address, tax_number, status, currency, remote_updated_at, company, addresses, phone_numbers, remote_was_deleted, field_mappings, remote_data].hash
|
274
|
+
[id, remote_id, name, is_supplier, is_customer, email_address, tax_number, status, currency, remote_updated_at, company, addresses, phone_numbers, remote_was_deleted, modified_at, field_mappings, remote_data].hash
|
265
275
|
end
|
266
276
|
|
267
277
|
# Builds the object from hash
|
@@ -36,6 +36,9 @@ module MergeAccountingClient
|
|
36
36
|
# The company the credit note belongs to.
|
37
37
|
attr_accessor :company
|
38
38
|
|
39
|
+
# The credit note's exchange rate.
|
40
|
+
attr_accessor :exchange_rate
|
41
|
+
|
39
42
|
# The credit note's total amount.
|
40
43
|
attr_accessor :total_amount
|
41
44
|
|
@@ -44,6 +47,8 @@ module MergeAccountingClient
|
|
44
47
|
|
45
48
|
attr_accessor :line_items
|
46
49
|
|
50
|
+
attr_accessor :tracking_categories
|
51
|
+
|
47
52
|
# The credit note's currency. * `XUA` - ADB Unit of Account * `AFN` - Afghan Afghani * `AFA` - Afghan Afghani (1927–2002) * `ALL` - Albanian Lek * `ALK` - Albanian Lek (1946–1965) * `DZD` - Algerian Dinar * `ADP` - Andorran Peseta * `AOA` - Angolan Kwanza * `AOK` - Angolan Kwanza (1977–1991) * `AON` - Angolan New Kwanza (1990–2000) * `AOR` - Angolan Readjusted Kwanza (1995–1999) * `ARA` - Argentine Austral * `ARS` - Argentine Peso * `ARM` - Argentine Peso (1881–1970) * `ARP` - Argentine Peso (1983–1985) * `ARL` - Argentine Peso Ley (1970–1983) * `AMD` - Armenian Dram * `AWG` - Aruban Florin * `AUD` - Australian Dollar * `ATS` - Austrian Schilling * `AZN` - Azerbaijani Manat * `AZM` - Azerbaijani Manat (1993–2006) * `BSD` - Bahamian Dollar * `BHD` - Bahraini Dinar * `BDT` - Bangladeshi Taka * `BBD` - Barbadian Dollar * `BYN` - Belarusian Ruble * `BYB` - Belarusian Ruble (1994–1999) * `BYR` - Belarusian Ruble (2000–2016) * `BEF` - Belgian Franc * `BEC` - Belgian Franc (convertible) * `BEL` - Belgian Franc (financial) * `BZD` - Belize Dollar * `BMD` - Bermudan Dollar * `BTN` - Bhutanese Ngultrum * `BOB` - Bolivian Boliviano * `BOL` - Bolivian Boliviano (1863–1963) * `BOV` - Bolivian Mvdol * `BOP` - Bolivian Peso * `BAM` - Bosnia-Herzegovina Convertible Mark * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) * `BWP` - Botswanan Pula * `BRC` - Brazilian Cruzado (1986–1989) * `BRZ` - Brazilian Cruzeiro (1942–1967) * `BRE` - Brazilian Cruzeiro (1990–1993) * `BRR` - Brazilian Cruzeiro (1993–1994) * `BRN` - Brazilian New Cruzado (1989–1990) * `BRB` - Brazilian New Cruzeiro (1967–1986) * `BRL` - Brazilian Real * `GBP` - British Pound * `BND` - Brunei Dollar * `BGL` - Bulgarian Hard Lev * `BGN` - Bulgarian Lev * `BGO` - Bulgarian Lev (1879–1952) * `BGM` - Bulgarian Socialist Lev * `BUK` - Burmese Kyat * `BIF` - Burundian Franc * `XPF` - CFP Franc * `KHR` - Cambodian Riel * `CAD` - Canadian Dollar * `CVE` - Cape Verdean Escudo * `KYD` - Cayman Islands Dollar * `XAF` - Central African CFA Franc * `CLE` - Chilean Escudo * `CLP` - Chilean Peso * `CLF` - Chilean Unit of Account (UF) * `CNX` - Chinese People’s Bank Dollar * `CNY` - Chinese Yuan * `CNH` - Chinese Yuan (offshore) * `COP` - Colombian Peso * `COU` - Colombian Real Value Unit * `KMF` - Comorian Franc * `CDF` - Congolese Franc * `CRC` - Costa Rican Colón * `HRD` - Croatian Dinar * `HRK` - Croatian Kuna * `CUC` - Cuban Convertible Peso * `CUP` - Cuban Peso * `CYP` - Cypriot Pound * `CZK` - Czech Koruna * `CSK` - Czechoslovak Hard Koruna * `DKK` - Danish Krone * `DJF` - Djiboutian Franc * `DOP` - Dominican Peso * `NLG` - Dutch Guilder * `XCD` - East Caribbean Dollar * `DDM` - East German Mark * `ECS` - Ecuadorian Sucre * `ECV` - Ecuadorian Unit of Constant Value * `EGP` - Egyptian Pound * `GQE` - Equatorial Guinean Ekwele * `ERN` - Eritrean Nakfa * `EEK` - Estonian Kroon * `ETB` - Ethiopian Birr * `EUR` - Euro * `XBA` - European Composite Unit * `XEU` - European Currency Unit * `XBB` - European Monetary Unit * `XBC` - European Unit of Account (XBC) * `XBD` - European Unit of Account (XBD) * `FKP` - Falkland Islands Pound * `FJD` - Fijian Dollar * `FIM` - Finnish Markka * `FRF` - French Franc * `XFO` - French Gold Franc * `XFU` - French UIC-Franc * `GMD` - Gambian Dalasi * `GEK` - Georgian Kupon Larit * `GEL` - Georgian Lari * `DEM` - German Mark * `GHS` - Ghanaian Cedi * `GHC` - Ghanaian Cedi (1979–2007) * `GIP` - Gibraltar Pound * `XAU` - Gold * `GRD` - Greek Drachma * `GTQ` - Guatemalan Quetzal * `GWP` - Guinea-Bissau Peso * `GNF` - Guinean Franc * `GNS` - Guinean Syli * `GYD` - Guyanaese Dollar * `HTG` - Haitian Gourde * `HNL` - Honduran Lempira * `HKD` - Hong Kong Dollar * `HUF` - Hungarian Forint * `IMP` - IMP * `ISK` - Icelandic Króna * `ISJ` - Icelandic Króna (1918–1981) * `INR` - Indian Rupee * `IDR` - Indonesian Rupiah * `IRR` - Iranian Rial * `IQD` - Iraqi Dinar * `IEP` - Irish Pound * `ILS` - Israeli New Shekel * `ILP` - Israeli Pound * `ILR` - Israeli Shekel (1980–1985) * `ITL` - Italian Lira * `JMD` - Jamaican Dollar * `JPY` - Japanese Yen * `JOD` - Jordanian Dinar * `KZT` - Kazakhstani Tenge * `KES` - Kenyan Shilling * `KWD` - Kuwaiti Dinar * `KGS` - Kyrgystani Som * `LAK` - Laotian Kip * `LVL` - Latvian Lats * `LVR` - Latvian Ruble * `LBP` - Lebanese Pound * `LSL` - Lesotho Loti * `LRD` - Liberian Dollar * `LYD` - Libyan Dinar * `LTL` - Lithuanian Litas * `LTT` - Lithuanian Talonas * `LUL` - Luxembourg Financial Franc * `LUC` - Luxembourgian Convertible Franc * `LUF` - Luxembourgian Franc * `MOP` - Macanese Pataca * `MKD` - Macedonian Denar * `MKN` - Macedonian Denar (1992–1993) * `MGA` - Malagasy Ariary * `MGF` - Malagasy Franc * `MWK` - Malawian Kwacha * `MYR` - Malaysian Ringgit * `MVR` - Maldivian Rufiyaa * `MVP` - Maldivian Rupee (1947–1981) * `MLF` - Malian Franc * `MTL` - Maltese Lira * `MTP` - Maltese Pound * `MRU` - Mauritanian Ouguiya * `MRO` - Mauritanian Ouguiya (1973–2017) * `MUR` - Mauritian Rupee * `MXV` - Mexican Investment Unit * `MXN` - Mexican Peso * `MXP` - Mexican Silver Peso (1861–1992) * `MDC` - Moldovan Cupon * `MDL` - Moldovan Leu * `MCF` - Monegasque Franc * `MNT` - Mongolian Tugrik * `MAD` - Moroccan Dirham * `MAF` - Moroccan Franc * `MZE` - Mozambican Escudo * `MZN` - Mozambican Metical * `MZM` - Mozambican Metical (1980–2006) * `MMK` - Myanmar Kyat * `NAD` - Namibian Dollar * `NPR` - Nepalese Rupee * `ANG` - Netherlands Antillean Guilder * `TWD` - New Taiwan Dollar * `NZD` - New Zealand Dollar * `NIO` - Nicaraguan Córdoba * `NIC` - Nicaraguan Córdoba (1988–1991) * `NGN` - Nigerian Naira * `KPW` - North Korean Won * `NOK` - Norwegian Krone * `OMR` - Omani Rial * `PKR` - Pakistani Rupee * `XPD` - Palladium * `PAB` - Panamanian Balboa * `PGK` - Papua New Guinean Kina * `PYG` - Paraguayan Guarani * `PEI` - Peruvian Inti * `PEN` - Peruvian Sol * `PES` - Peruvian Sol (1863–1965) * `PHP` - Philippine Peso * `XPT` - Platinum * `PLN` - Polish Zloty * `PLZ` - Polish Zloty (1950–1995) * `PTE` - Portuguese Escudo * `GWE` - Portuguese Guinea Escudo * `QAR` - Qatari Rial * `XRE` - RINET Funds * `RHD` - Rhodesian Dollar * `RON` - Romanian Leu * `ROL` - Romanian Leu (1952–2006) * `RUB` - Russian Ruble * `RUR` - Russian Ruble (1991–1998) * `RWF` - Rwandan Franc * `SVC` - Salvadoran Colón * `WST` - Samoan Tala * `SAR` - Saudi Riyal * `RSD` - Serbian Dinar * `CSD` - Serbian Dinar (2002–2006) * `SCR` - Seychellois Rupee * `SLL` - Sierra Leonean Leone * `XAG` - Silver * `SGD` - Singapore Dollar * `SKK` - Slovak Koruna * `SIT` - Slovenian Tolar * `SBD` - Solomon Islands Dollar * `SOS` - Somali Shilling * `ZAR` - South African Rand * `ZAL` - South African Rand (financial) * `KRH` - South Korean Hwan (1953–1962) * `KRW` - South Korean Won * `KRO` - South Korean Won (1945–1953) * `SSP` - South Sudanese Pound * `SUR` - Soviet Rouble * `ESP` - Spanish Peseta * `ESA` - Spanish Peseta (A account) * `ESB` - Spanish Peseta (convertible account) * `XDR` - Special Drawing Rights * `LKR` - Sri Lankan Rupee * `SHP` - St. Helena Pound * `XSU` - Sucre * `SDD` - Sudanese Dinar (1992–2007) * `SDG` - Sudanese Pound * `SDP` - Sudanese Pound (1957–1998) * `SRD` - Surinamese Dollar * `SRG` - Surinamese Guilder * `SZL` - Swazi Lilangeni * `SEK` - Swedish Krona * `CHF` - Swiss Franc * `SYP` - Syrian Pound * `STN` - São Tomé & Príncipe Dobra * `STD` - São Tomé & Príncipe Dobra (1977–2017) * `TVD` - TVD * `TJR` - Tajikistani Ruble * `TJS` - Tajikistani Somoni * `TZS` - Tanzanian Shilling * `XTS` - Testing Currency Code * `THB` - Thai Baht * `XXX` - The codes assigned for transactions where no currency is involved * `TPE` - Timorese Escudo * `TOP` - Tongan Paʻanga * `TTD` - Trinidad & Tobago Dollar * `TND` - Tunisian Dinar * `TRY` - Turkish Lira * `TRL` - Turkish Lira (1922–2005) * `TMT` - Turkmenistani Manat * `TMM` - Turkmenistani Manat (1993–2009) * `USD` - US Dollar * `USN` - US Dollar (Next day) * `USS` - US Dollar (Same day) * `UGX` - Ugandan Shilling * `UGS` - Ugandan Shilling (1966–1987) * `UAH` - Ukrainian Hryvnia * `UAK` - Ukrainian Karbovanets * `AED` - United Arab Emirates Dirham * `UYW` - Uruguayan Nominal Wage Index Unit * `UYU` - Uruguayan Peso * `UYP` - Uruguayan Peso (1975–1993) * `UYI` - Uruguayan Peso (Indexed Units) * `UZS` - Uzbekistani Som * `VUV` - Vanuatu Vatu * `VES` - Venezuelan Bolívar * `VEB` - Venezuelan Bolívar (1871–2008) * `VEF` - Venezuelan Bolívar (2008–2018) * `VND` - Vietnamese Dong * `VNN` - Vietnamese Dong (1978–1985) * `CHE` - WIR Euro * `CHW` - WIR Franc * `XOF` - West African CFA Franc * `YDD` - Yemeni Dinar * `YER` - Yemeni Rial * `YUN` - Yugoslavian Convertible Dinar (1990–1992) * `YUD` - Yugoslavian Hard Dinar (1966–1990) * `YUM` - Yugoslavian New Dinar (1994–2002) * `YUR` - Yugoslavian Reformed Dinar (1992–1993) * `ZWN` - ZWN * `ZRN` - Zairean New Zaire (1993–1998) * `ZRZ` - Zairean Zaire (1971–1993) * `ZMW` - Zambian Kwacha * `ZMK` - Zambian Kwacha (1968–2012) * `ZWD` - Zimbabwean Dollar (1980–2008) * `ZWR` - Zimbabwean Dollar (2008) * `ZWL` - Zimbabwean Dollar (2009)
|
48
53
|
attr_accessor :currency
|
49
54
|
|
@@ -59,6 +64,9 @@ module MergeAccountingClient
|
|
59
64
|
# Indicates whether or not this object has been deleted by third party webhooks.
|
60
65
|
attr_accessor :remote_was_deleted
|
61
66
|
|
67
|
+
# This is the datetime that this object was last updated by Merge
|
68
|
+
attr_accessor :modified_at
|
69
|
+
|
62
70
|
attr_accessor :field_mappings
|
63
71
|
|
64
72
|
attr_accessor :remote_data
|
@@ -73,14 +81,17 @@ module MergeAccountingClient
|
|
73
81
|
:'number' => :'number',
|
74
82
|
:'contact' => :'contact',
|
75
83
|
:'company' => :'company',
|
84
|
+
:'exchange_rate' => :'exchange_rate',
|
76
85
|
:'total_amount' => :'total_amount',
|
77
86
|
:'remaining_credit' => :'remaining_credit',
|
78
87
|
:'line_items' => :'line_items',
|
88
|
+
:'tracking_categories' => :'tracking_categories',
|
79
89
|
:'currency' => :'currency',
|
80
90
|
:'remote_created_at' => :'remote_created_at',
|
81
91
|
:'remote_updated_at' => :'remote_updated_at',
|
82
92
|
:'payments' => :'payments',
|
83
93
|
:'remote_was_deleted' => :'remote_was_deleted',
|
94
|
+
:'modified_at' => :'modified_at',
|
84
95
|
:'field_mappings' => :'field_mappings',
|
85
96
|
:'remote_data' => :'remote_data'
|
86
97
|
}
|
@@ -101,14 +112,17 @@ module MergeAccountingClient
|
|
101
112
|
:'number' => :'String',
|
102
113
|
:'contact' => :'String',
|
103
114
|
:'company' => :'String',
|
115
|
+
:'exchange_rate' => :'String',
|
104
116
|
:'total_amount' => :'Float',
|
105
117
|
:'remaining_credit' => :'Float',
|
106
118
|
:'line_items' => :'Array<CreditNoteLineItem>',
|
119
|
+
:'tracking_categories' => :'Array<String>',
|
107
120
|
:'currency' => :'CurrencyEnum',
|
108
121
|
:'remote_created_at' => :'Time',
|
109
122
|
:'remote_updated_at' => :'Time',
|
110
123
|
:'payments' => :'Array<String>',
|
111
124
|
:'remote_was_deleted' => :'Boolean',
|
125
|
+
:'modified_at' => :'Time',
|
112
126
|
:'field_mappings' => :'Hash<String, Object>',
|
113
127
|
:'remote_data' => :'Array<RemoteData>'
|
114
128
|
}
|
@@ -123,6 +137,7 @@ module MergeAccountingClient
|
|
123
137
|
:'number',
|
124
138
|
:'contact',
|
125
139
|
:'company',
|
140
|
+
:'exchange_rate',
|
126
141
|
:'total_amount',
|
127
142
|
:'remaining_credit',
|
128
143
|
:'currency',
|
@@ -176,6 +191,10 @@ module MergeAccountingClient
|
|
176
191
|
self.company = attributes[:'company']
|
177
192
|
end
|
178
193
|
|
194
|
+
if attributes.key?(:'exchange_rate')
|
195
|
+
self.exchange_rate = attributes[:'exchange_rate']
|
196
|
+
end
|
197
|
+
|
179
198
|
if attributes.key?(:'total_amount')
|
180
199
|
self.total_amount = attributes[:'total_amount']
|
181
200
|
end
|
@@ -190,6 +209,12 @@ module MergeAccountingClient
|
|
190
209
|
end
|
191
210
|
end
|
192
211
|
|
212
|
+
if attributes.key?(:'tracking_categories')
|
213
|
+
if (value = attributes[:'tracking_categories']).is_a?(Array)
|
214
|
+
self.tracking_categories = value
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
193
218
|
if attributes.key?(:'currency')
|
194
219
|
self.currency = attributes[:'currency']
|
195
220
|
end
|
@@ -212,6 +237,10 @@ module MergeAccountingClient
|
|
212
237
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
213
238
|
end
|
214
239
|
|
240
|
+
if attributes.key?(:'modified_at')
|
241
|
+
self.modified_at = attributes[:'modified_at']
|
242
|
+
end
|
243
|
+
|
215
244
|
if attributes.key?(:'field_mappings')
|
216
245
|
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
217
246
|
self.field_mappings = value
|
@@ -229,15 +258,32 @@ module MergeAccountingClient
|
|
229
258
|
# @return Array for valid properties with the reasons
|
230
259
|
def list_invalid_properties
|
231
260
|
invalid_properties = Array.new
|
261
|
+
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
262
|
+
if !@exchange_rate.nil? && @exchange_rate.to_s !~ pattern
|
263
|
+
invalid_properties.push("invalid value for \"exchange_rate\", must conform to the pattern #{pattern}.")
|
264
|
+
end
|
265
|
+
|
232
266
|
invalid_properties
|
233
267
|
end
|
234
268
|
|
235
269
|
# Check to see if the all the properties in the model are valid
|
236
270
|
# @return true if the model is valid
|
237
271
|
def valid?
|
272
|
+
return false if !@exchange_rate.nil? && @exchange_rate.to_s !~ Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
238
273
|
true
|
239
274
|
end
|
240
275
|
|
276
|
+
# Custom attribute writer method with validation
|
277
|
+
# @param [Object] exchange_rate Value to be assigned
|
278
|
+
def exchange_rate=(exchange_rate)
|
279
|
+
pattern = Regexp.new(/^-?\d{0,32}(?:\.\d{0,16})?$/)
|
280
|
+
if !exchange_rate.nil? && exchange_rate.to_s !~ pattern
|
281
|
+
fail ArgumentError, "invalid value for \"exchange_rate\", must conform to the pattern #{pattern}."
|
282
|
+
end
|
283
|
+
|
284
|
+
@exchange_rate = exchange_rate
|
285
|
+
end
|
286
|
+
|
241
287
|
# Checks equality by comparing each attribute.
|
242
288
|
# @param [Object] Object to be compared
|
243
289
|
def ==(o)
|
@@ -250,14 +296,17 @@ module MergeAccountingClient
|
|
250
296
|
number == o.number &&
|
251
297
|
contact == o.contact &&
|
252
298
|
company == o.company &&
|
299
|
+
exchange_rate == o.exchange_rate &&
|
253
300
|
total_amount == o.total_amount &&
|
254
301
|
remaining_credit == o.remaining_credit &&
|
255
302
|
line_items == o.line_items &&
|
303
|
+
tracking_categories == o.tracking_categories &&
|
256
304
|
currency == o.currency &&
|
257
305
|
remote_created_at == o.remote_created_at &&
|
258
306
|
remote_updated_at == o.remote_updated_at &&
|
259
307
|
payments == o.payments &&
|
260
308
|
remote_was_deleted == o.remote_was_deleted &&
|
309
|
+
modified_at == o.modified_at &&
|
261
310
|
field_mappings == o.field_mappings &&
|
262
311
|
remote_data == o.remote_data
|
263
312
|
end
|
@@ -271,7 +320,7 @@ module MergeAccountingClient
|
|
271
320
|
# Calculates hash code according to all attributes.
|
272
321
|
# @return [Integer] Hash code
|
273
322
|
def hash
|
274
|
-
[id, remote_id, transaction_date, status, number, contact, company, total_amount, remaining_credit, line_items, currency, remote_created_at, remote_updated_at, payments, remote_was_deleted, field_mappings, remote_data].hash
|
323
|
+
[id, remote_id, transaction_date, status, number, contact, company, exchange_rate, total_amount, remaining_credit, line_items, tracking_categories, currency, remote_created_at, remote_updated_at, payments, remote_was_deleted, modified_at, field_mappings, remote_data].hash
|
275
324
|
end
|
276
325
|
|
277
326
|
# Builds the object from hash
|
@@ -53,6 +53,9 @@ module MergeAccountingClient
|
|
53
53
|
# The third-party API ID of the matching object.
|
54
54
|
attr_accessor :remote_id
|
55
55
|
|
56
|
+
# This is the datetime that this object was last updated by Merge
|
57
|
+
attr_accessor :modified_at
|
58
|
+
|
56
59
|
# Attribute mapping from ruby-style variable name to JSON key.
|
57
60
|
def self.attribute_map
|
58
61
|
{
|
@@ -68,7 +71,8 @@ module MergeAccountingClient
|
|
68
71
|
:'tracking_categories' => :'tracking_categories',
|
69
72
|
:'account' => :'account',
|
70
73
|
:'company' => :'company',
|
71
|
-
:'remote_id' => :'remote_id'
|
74
|
+
:'remote_id' => :'remote_id',
|
75
|
+
:'modified_at' => :'modified_at'
|
72
76
|
}
|
73
77
|
end
|
74
78
|
|
@@ -92,7 +96,8 @@ module MergeAccountingClient
|
|
92
96
|
:'tracking_categories' => :'Array<String>',
|
93
97
|
:'account' => :'String',
|
94
98
|
:'company' => :'String',
|
95
|
-
:'remote_id' => :'String'
|
99
|
+
:'remote_id' => :'String',
|
100
|
+
:'modified_at' => :'Time'
|
96
101
|
}
|
97
102
|
end
|
98
103
|
|
@@ -110,7 +115,7 @@ module MergeAccountingClient
|
|
110
115
|
:'tracking_category',
|
111
116
|
:'account',
|
112
117
|
:'company',
|
113
|
-
:'remote_id'
|
118
|
+
:'remote_id',
|
114
119
|
])
|
115
120
|
end
|
116
121
|
|
@@ -182,6 +187,10 @@ module MergeAccountingClient
|
|
182
187
|
if attributes.key?(:'remote_id')
|
183
188
|
self.remote_id = attributes[:'remote_id']
|
184
189
|
end
|
190
|
+
|
191
|
+
if attributes.key?(:'modified_at')
|
192
|
+
self.modified_at = attributes[:'modified_at']
|
193
|
+
end
|
185
194
|
end
|
186
195
|
|
187
196
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -270,7 +279,8 @@ module MergeAccountingClient
|
|
270
279
|
tracking_categories == o.tracking_categories &&
|
271
280
|
account == o.account &&
|
272
281
|
company == o.company &&
|
273
|
-
remote_id == o.remote_id
|
282
|
+
remote_id == o.remote_id &&
|
283
|
+
modified_at == o.modified_at
|
274
284
|
end
|
275
285
|
|
276
286
|
# @see the `==` method
|
@@ -282,7 +292,7 @@ module MergeAccountingClient
|
|
282
292
|
# Calculates hash code according to all attributes.
|
283
293
|
# @return [Integer] Hash code
|
284
294
|
def hash
|
285
|
-
[item, name, description, quantity, memo, unit_price, tax_rate, total_line_amount, tracking_category, tracking_categories, account, company, remote_id].hash
|
295
|
+
[item, name, description, quantity, memo, unit_price, tax_rate, total_line_amount, tracking_category, tracking_categories, account, company, remote_id, modified_at].hash
|
286
296
|
end
|
287
297
|
|
288
298
|
# Builds the object from hash
|