fuse_client 1.0.38 → 1.0.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/docs/CreateConsumerRiskReportRequest.md +2 -0
  4. data/docs/CreateLinkTokenRequest.md +3 -1
  5. data/docs/CreateLinkTokenRequestSnaptrade.md +18 -0
  6. data/docs/CreateLinkTokenRequestSnaptradeConfig.md +18 -0
  7. data/docs/EnrichedTransaction.md +4 -26
  8. data/docs/ExchangeFinancialConnectionsPublicTokenResponse.md +4 -0
  9. data/docs/ExternalTransactionEvent.md +6 -0
  10. data/docs/FinancialConnectionDetails.md +3 -1
  11. data/docs/FinancialConnectionDetailsFinicity.md +20 -0
  12. data/docs/FinancialConnectionsAccount.md +2 -0
  13. data/docs/FinancialConnectionsAccountLiability.md +2 -0
  14. data/docs/FuseApi.md +2 -2
  15. data/docs/TransactionToEnrich.md +13 -5
  16. data/lib/fuse_client/configuration.rb +5 -1
  17. data/lib/fuse_client/models/aggregator.rb +9 -8
  18. data/lib/fuse_client/models/create_consumer_risk_report_request.rb +11 -1
  19. data/lib/fuse_client/models/create_link_token_request.rb +13 -4
  20. data/lib/fuse_client/models/create_link_token_request_snaptrade.rb +220 -0
  21. data/lib/fuse_client/models/create_link_token_request_snaptrade_config.rb +256 -0
  22. data/lib/fuse_client/models/enriched_transaction.rb +17 -158
  23. data/lib/fuse_client/models/exchange_financial_connections_public_token_response.rb +46 -1
  24. data/lib/fuse_client/models/external_transaction_event.rb +44 -1
  25. data/lib/fuse_client/models/financial_connection_details.rb +13 -4
  26. data/lib/fuse_client/models/financial_connection_details_finicity.rb +241 -0
  27. data/lib/fuse_client/models/financial_connections_account.rb +16 -1
  28. data/lib/fuse_client/models/financial_connections_account_balance.rb +2 -0
  29. data/lib/fuse_client/models/financial_connections_account_cached_balance.rb +2 -0
  30. data/lib/fuse_client/models/financial_connections_account_liability.rb +16 -1
  31. data/lib/fuse_client/models/fuse_api_error_code.rb +4 -1
  32. data/lib/fuse_client/models/transaction_to_enrich.rb +130 -27
  33. data/lib/fuse_client/version.rb +1 -1
  34. data/lib/fuse_client.rb +3 -0
  35. data/spec/models/asset_report_transaction_spec.rb +1 -1
  36. data/spec/models/create_consumer_risk_report_request_spec.rb +6 -0
  37. data/spec/models/create_link_token_request_snaptrade_config_spec.rb +38 -0
  38. data/spec/models/create_link_token_request_snaptrade_spec.rb +34 -0
  39. data/spec/models/create_link_token_request_spec.rb +6 -0
  40. data/spec/models/enriched_transaction_spec.rb +2 -72
  41. data/spec/models/exchange_financial_connections_public_token_response_spec.rb +12 -0
  42. data/spec/models/external_transaction_event_spec.rb +22 -0
  43. data/spec/models/financial_connection_details_finicity_spec.rb +40 -0
  44. data/spec/models/financial_connection_details_spec.rb +6 -0
  45. data/spec/models/financial_connections_account_liability_spec.rb +6 -0
  46. data/spec/models/financial_connections_account_spec.rb +6 -0
  47. data/spec/models/transaction_spec.rb +1 -1
  48. data/spec/models/transaction_to_enrich_spec.rb +32 -4
  49. metadata +24 -13
  50. data/fuse_client-1.0.37.gem +0 -0
@@ -21,14 +21,42 @@ module FuseClient
21
21
  # The id of the new financial connection. Every webhook will be sent with this id. Use this id when calling the GET /financial_connection/${financial_connection_id} endpoint.
22
22
  attr_accessor :financial_connection_id
23
23
 
24
+ attr_accessor :institution
25
+
26
+ attr_accessor :aggregator
27
+
24
28
  # An identifier that is exclusive to the request and can serve as a means for investigating and resolving issues.
25
29
  attr_accessor :request_id
26
30
 
31
+ class EnumAttributeValidator
32
+ attr_reader :datatype
33
+ attr_reader :allowable_values
34
+
35
+ def initialize(datatype, allowable_values)
36
+ @allowable_values = allowable_values.map do |value|
37
+ case datatype.to_s
38
+ when /Integer/i
39
+ value.to_i
40
+ when /Float/i
41
+ value.to_f
42
+ else
43
+ value
44
+ end
45
+ end
46
+ end
47
+
48
+ def valid?(value)
49
+ !value || allowable_values.include?(value)
50
+ end
51
+ end
52
+
27
53
  # Attribute mapping from ruby-style variable name to JSON key.
28
54
  def self.attribute_map
29
55
  {
30
56
  :'access_token' => :'access_token',
31
57
  :'financial_connection_id' => :'financial_connection_id',
58
+ :'institution' => :'institution',
59
+ :'aggregator' => :'aggregator',
32
60
  :'request_id' => :'request_id'
33
61
  }
34
62
  end
@@ -43,6 +71,8 @@ module FuseClient
43
71
  {
44
72
  :'access_token' => :'String',
45
73
  :'financial_connection_id' => :'String',
74
+ :'institution' => :'FinancialInstitution',
75
+ :'aggregator' => :'Aggregator',
46
76
  :'request_id' => :'String'
47
77
  }
48
78
  end
@@ -76,6 +106,14 @@ module FuseClient
76
106
  self.financial_connection_id = attributes[:'financial_connection_id']
77
107
  end
78
108
 
109
+ if attributes.key?(:'institution')
110
+ self.institution = attributes[:'institution']
111
+ end
112
+
113
+ if attributes.key?(:'aggregator')
114
+ self.aggregator = attributes[:'aggregator']
115
+ end
116
+
79
117
  if attributes.key?(:'request_id')
80
118
  self.request_id = attributes[:'request_id']
81
119
  end
@@ -93,6 +131,10 @@ module FuseClient
93
131
  invalid_properties.push('invalid value for "financial_connection_id", financial_connection_id cannot be nil.')
94
132
  end
95
133
 
134
+ if @aggregator.nil?
135
+ invalid_properties.push('invalid value for "aggregator", aggregator cannot be nil.')
136
+ end
137
+
96
138
  if @request_id.nil?
97
139
  invalid_properties.push('invalid value for "request_id", request_id cannot be nil.')
98
140
  end
@@ -105,6 +147,7 @@ module FuseClient
105
147
  def valid?
106
148
  return false if @access_token.nil?
107
149
  return false if @financial_connection_id.nil?
150
+ return false if @aggregator.nil?
108
151
  return false if @request_id.nil?
109
152
  true
110
153
  end
@@ -116,6 +159,8 @@ module FuseClient
116
159
  self.class == o.class &&
117
160
  access_token == o.access_token &&
118
161
  financial_connection_id == o.financial_connection_id &&
162
+ institution == o.institution &&
163
+ aggregator == o.aggregator &&
119
164
  request_id == o.request_id
120
165
  end
121
166
 
@@ -128,7 +173,7 @@ module FuseClient
128
173
  # Calculates hash code according to all attributes.
129
174
  # @return [Integer] Hash code
130
175
  def hash
131
- [access_token, financial_connection_id, request_id].hash
176
+ [access_token, financial_connection_id, institution, aggregator, request_id].hash
132
177
  end
133
178
 
134
179
  # Builds the object from hash
@@ -25,11 +25,17 @@ module FuseClient
25
25
  # Amount in cents associated with the transaction. Use positive values to represent money going out and negative to represent money going in.
26
26
  attr_accessor :amount
27
27
 
28
+ attr_accessor :country_code
29
+
28
30
  # The ISO-4217 currency code.
29
31
  attr_accessor :iso_currency_code
30
32
 
31
33
  attr_accessor :transaction_type
32
34
 
35
+ attr_accessor :transaction_description
36
+
37
+ attr_accessor :transaction_owner_type
38
+
33
39
  attr_accessor :merchant_name
34
40
 
35
41
  # Datetime of the transaction In ISO-8601 format
@@ -67,8 +73,11 @@ module FuseClient
67
73
  :'event_type' => :'event_type',
68
74
  :'status' => :'status',
69
75
  :'amount' => :'amount',
76
+ :'country_code' => :'country_code',
70
77
  :'iso_currency_code' => :'iso_currency_code',
71
78
  :'transaction_type' => :'transaction_type',
79
+ :'transaction_description' => :'transaction_description',
80
+ :'transaction_owner_type' => :'transaction_owner_type',
72
81
  :'merchant_name' => :'merchant_name',
73
82
  :'timestamp' => :'timestamp',
74
83
  :'balance' => :'balance'
@@ -87,8 +96,11 @@ module FuseClient
87
96
  :'event_type' => :'String',
88
97
  :'status' => :'ExternalTransactionEventStatus',
89
98
  :'amount' => :'Float',
99
+ :'country_code' => :'String',
90
100
  :'iso_currency_code' => :'String',
91
101
  :'transaction_type' => :'TransactionEventType',
102
+ :'transaction_description' => :'String',
103
+ :'transaction_owner_type' => :'String',
92
104
  :'merchant_name' => :'String',
93
105
  :'timestamp' => :'String',
94
106
  :'balance' => :'Float'
@@ -132,6 +144,12 @@ module FuseClient
132
144
  self.amount = attributes[:'amount']
133
145
  end
134
146
 
147
+ if attributes.key?(:'country_code')
148
+ self.country_code = attributes[:'country_code']
149
+ else
150
+ self.country_code = 'US'
151
+ end
152
+
135
153
  if attributes.key?(:'iso_currency_code')
136
154
  self.iso_currency_code = attributes[:'iso_currency_code']
137
155
  end
@@ -140,6 +158,16 @@ module FuseClient
140
158
  self.transaction_type = attributes[:'transaction_type']
141
159
  end
142
160
 
161
+ if attributes.key?(:'transaction_description')
162
+ self.transaction_description = attributes[:'transaction_description']
163
+ end
164
+
165
+ if attributes.key?(:'transaction_owner_type')
166
+ self.transaction_owner_type = attributes[:'transaction_owner_type']
167
+ else
168
+ self.transaction_owner_type = 'consumer'
169
+ end
170
+
143
171
  if attributes.key?(:'merchant_name')
144
172
  self.merchant_name = attributes[:'merchant_name']
145
173
  end
@@ -198,6 +226,8 @@ module FuseClient
198
226
  return false if @status.nil?
199
227
  return false if @amount.nil?
200
228
  return false if @iso_currency_code.nil?
229
+ transaction_owner_type_validator = EnumAttributeValidator.new('String', ["consumer", "business"])
230
+ return false unless transaction_owner_type_validator.valid?(@transaction_owner_type)
201
231
  return false if @merchant_name.nil?
202
232
  return false if @timestamp.nil?
203
233
  true
@@ -213,6 +243,16 @@ module FuseClient
213
243
  @event_type = event_type
214
244
  end
215
245
 
246
+ # Custom attribute writer method checking allowed values (enum).
247
+ # @param [Object] transaction_owner_type Object to be assigned
248
+ def transaction_owner_type=(transaction_owner_type)
249
+ validator = EnumAttributeValidator.new('String', ["consumer", "business"])
250
+ unless validator.valid?(transaction_owner_type)
251
+ fail ArgumentError, "invalid value for \"transaction_owner_type\", must be one of #{validator.allowable_values}."
252
+ end
253
+ @transaction_owner_type = transaction_owner_type
254
+ end
255
+
216
256
  # Checks equality by comparing each attribute.
217
257
  # @param [Object] Object to be compared
218
258
  def ==(o)
@@ -222,8 +262,11 @@ module FuseClient
222
262
  event_type == o.event_type &&
223
263
  status == o.status &&
224
264
  amount == o.amount &&
265
+ country_code == o.country_code &&
225
266
  iso_currency_code == o.iso_currency_code &&
226
267
  transaction_type == o.transaction_type &&
268
+ transaction_description == o.transaction_description &&
269
+ transaction_owner_type == o.transaction_owner_type &&
227
270
  merchant_name == o.merchant_name &&
228
271
  timestamp == o.timestamp &&
229
272
  balance == o.balance
@@ -238,7 +281,7 @@ module FuseClient
238
281
  # Calculates hash code according to all attributes.
239
282
  # @return [Integer] Hash code
240
283
  def hash
241
- [id, event_type, status, amount, iso_currency_code, transaction_type, merchant_name, timestamp, balance].hash
284
+ [id, event_type, status, amount, country_code, iso_currency_code, transaction_type, transaction_description, transaction_owner_type, merchant_name, timestamp, balance].hash
242
285
  end
243
286
 
244
287
  # Builds the object from hash
@@ -49,6 +49,8 @@ module FuseClient
49
49
 
50
50
  attr_accessor :belvo
51
51
 
52
+ attr_accessor :finicity
53
+
52
54
  class EnumAttributeValidator
53
55
  attr_reader :datatype
54
56
  attr_reader :allowable_values
@@ -88,7 +90,8 @@ module FuseClient
88
90
  :'truelayer' => :'truelayer',
89
91
  :'finverse' => :'finverse',
90
92
  :'basiq' => :'basiq',
91
- :'belvo' => :'belvo'
93
+ :'belvo' => :'belvo',
94
+ :'finicity' => :'finicity'
92
95
  }
93
96
  end
94
97
 
@@ -114,7 +117,8 @@ module FuseClient
114
117
  :'truelayer' => :'FinancialConnectionDetailsTruelayer',
115
118
  :'finverse' => :'FinancialConnectionDetailsFinverse',
116
119
  :'basiq' => :'FinancialConnectionDetailsBasiq',
117
- :'belvo' => :'FinancialConnectionDetailsBelvo'
120
+ :'belvo' => :'FinancialConnectionDetailsBelvo',
121
+ :'finicity' => :'FinancialConnectionDetailsFinicity'
118
122
  }
119
123
  end
120
124
 
@@ -198,6 +202,10 @@ module FuseClient
198
202
  if attributes.key?(:'belvo')
199
203
  self.belvo = attributes[:'belvo']
200
204
  end
205
+
206
+ if attributes.key?(:'finicity')
207
+ self.finicity = attributes[:'finicity']
208
+ end
201
209
  end
202
210
 
203
211
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -269,7 +277,8 @@ module FuseClient
269
277
  truelayer == o.truelayer &&
270
278
  finverse == o.finverse &&
271
279
  basiq == o.basiq &&
272
- belvo == o.belvo
280
+ belvo == o.belvo &&
281
+ finicity == o.finicity
273
282
  end
274
283
 
275
284
  # @see the `==` method
@@ -281,7 +290,7 @@ module FuseClient
281
290
  # Calculates hash code according to all attributes.
282
291
  # @return [Integer] Hash code
283
292
  def hash
284
- [id, connection_status, connection_status_updated_at, is_oauth, aggregator, plaid, teller, mx, snaptrade, flinks, mono, truelayer, finverse, basiq, belvo].hash
293
+ [id, connection_status, connection_status_updated_at, is_oauth, aggregator, plaid, teller, mx, snaptrade, flinks, mono, truelayer, finverse, basiq, belvo, finicity].hash
285
294
  end
286
295
 
287
296
  # Builds the object from hash
@@ -0,0 +1,241 @@
1
+ =begin
2
+ #Fuse
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FuseClient
17
+ # Data needed to query data from Finicity.
18
+ class FinancialConnectionDetailsFinicity
19
+ # The identifier of the customer for Finicity.
20
+ attr_accessor :customer_id
21
+
22
+ # The Finicity institution login id.
23
+ attr_accessor :institution_login_id
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'customer_id' => :'customer_id',
29
+ :'institution_login_id' => :'institution_login_id'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'customer_id' => :'String',
42
+ :'institution_login_id' => :'String'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::FinancialConnectionDetailsFinicity` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::FinancialConnectionDetailsFinicity`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'customer_id')
68
+ self.customer_id = attributes[:'customer_id']
69
+ end
70
+
71
+ if attributes.key?(:'institution_login_id')
72
+ self.institution_login_id = attributes[:'institution_login_id']
73
+ end
74
+ end
75
+
76
+ # Show invalid properties with the reasons. Usually used together with valid?
77
+ # @return Array for valid properties with the reasons
78
+ def list_invalid_properties
79
+ invalid_properties = Array.new
80
+ if @customer_id.nil?
81
+ invalid_properties.push('invalid value for "customer_id", customer_id cannot be nil.')
82
+ end
83
+
84
+ if @institution_login_id.nil?
85
+ invalid_properties.push('invalid value for "institution_login_id", institution_login_id cannot be nil.')
86
+ end
87
+
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ return false if @customer_id.nil?
95
+ return false if @institution_login_id.nil?
96
+ true
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param [Object] Object to be compared
101
+ def ==(o)
102
+ return true if self.equal?(o)
103
+ self.class == o.class &&
104
+ customer_id == o.customer_id &&
105
+ institution_login_id == o.institution_login_id
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Integer] Hash code
116
+ def hash
117
+ [customer_id, institution_login_id].hash
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def self.build_from_hash(attributes)
124
+ new.build_from_hash(attributes)
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ attributes = attributes.transform_keys(&:to_sym)
133
+ self.class.openapi_types.each_pair do |key, type|
134
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
135
+ self.send("#{key}=", nil)
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
140
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
+ end
142
+ elsif !attributes[self.class.attribute_map[key]].nil?
143
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
+ end
145
+ end
146
+
147
+ self
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def _deserialize(type, value)
155
+ case type.to_sym
156
+ when :Time
157
+ Time.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :Boolean
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ # models (e.g. Pet) or oneOf
188
+ klass = FuseClient.const_get(type)
189
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
190
+ end
191
+ end
192
+
193
+ # Returns the string representation of the object
194
+ # @return [String] String presentation of the object
195
+ def to_s
196
+ to_hash.to_s
197
+ end
198
+
199
+ # to_body is an alias to to_hash (backward compatibility)
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_body
202
+ to_hash
203
+ end
204
+
205
+ # Returns the object in the form of hash
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_hash
208
+ hash = {}
209
+ self.class.attribute_map.each_pair do |attr, param|
210
+ value = self.send(attr)
211
+ if value.nil?
212
+ is_nullable = self.class.openapi_nullable.include?(attr)
213
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
+ end
215
+
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ # Outputs non-array value in the form of hash
222
+ # For object, use to_hash. Otherwise, just return the value
223
+ # @param [Object] value Any valid value
224
+ # @return [Hash] Returns the value in the form of hash
225
+ def _to_hash(value)
226
+ if value.is_a?(Array)
227
+ value.compact.map { |v| _to_hash(v) }
228
+ elsif value.is_a?(Hash)
229
+ {}.tap do |hash|
230
+ value.each { |k, v| hash[k] = _to_hash(v) }
231
+ end
232
+ elsif value.respond_to? :to_hash
233
+ value.to_hash
234
+ else
235
+ value
236
+ end
237
+ end
238
+
239
+ end
240
+
241
+ end
@@ -18,6 +18,9 @@ module FuseClient
18
18
  # Remote Id of the account, ie Plaid or Teller account id
19
19
  attr_accessor :remote_id
20
20
 
21
+ # The ISO-4217 currency code of the account.
22
+ attr_accessor :currency
23
+
21
24
  # Uniquely identifies this account across all accounts for a single financial connection. Used for reconnection deduplication. See more information here: https://letsfuse.readme.io/docs/duplicate-accounts
22
25
  attr_accessor :fingerprint
23
26
 
@@ -63,6 +66,7 @@ module FuseClient
63
66
  def self.attribute_map
64
67
  {
65
68
  :'remote_id' => :'remote_id',
69
+ :'currency' => :'currency',
66
70
  :'fingerprint' => :'fingerprint',
67
71
  :'institution' => :'institution',
68
72
  :'mask' => :'mask',
@@ -83,6 +87,7 @@ module FuseClient
83
87
  def self.openapi_types
84
88
  {
85
89
  :'remote_id' => :'String',
90
+ :'currency' => :'String',
86
91
  :'fingerprint' => :'String',
87
92
  :'institution' => :'FinancialConnectionsAccountInstitution',
88
93
  :'mask' => :'String',
@@ -120,6 +125,10 @@ module FuseClient
120
125
  self.remote_id = attributes[:'remote_id']
121
126
  end
122
127
 
128
+ if attributes.key?(:'currency')
129
+ self.currency = attributes[:'currency']
130
+ end
131
+
123
132
  if attributes.key?(:'fingerprint')
124
133
  self.fingerprint = attributes[:'fingerprint']
125
134
  end
@@ -161,6 +170,10 @@ module FuseClient
161
170
  invalid_properties.push('invalid value for "remote_id", remote_id cannot be nil.')
162
171
  end
163
172
 
173
+ if @currency.nil?
174
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
175
+ end
176
+
164
177
  if @fingerprint.nil?
165
178
  invalid_properties.push('invalid value for "fingerprint", fingerprint cannot be nil.')
166
179
  end
@@ -184,6 +197,7 @@ module FuseClient
184
197
  # @return true if the model is valid
185
198
  def valid?
186
199
  return false if @remote_id.nil?
200
+ return false if @currency.nil?
187
201
  return false if @fingerprint.nil?
188
202
  return false if @name.nil?
189
203
  return false if @type.nil?
@@ -197,6 +211,7 @@ module FuseClient
197
211
  return true if self.equal?(o)
198
212
  self.class == o.class &&
199
213
  remote_id == o.remote_id &&
214
+ currency == o.currency &&
200
215
  fingerprint == o.fingerprint &&
201
216
  institution == o.institution &&
202
217
  mask == o.mask &&
@@ -216,7 +231,7 @@ module FuseClient
216
231
  # Calculates hash code according to all attributes.
217
232
  # @return [Integer] Hash code
218
233
  def hash
219
- [remote_id, fingerprint, institution, mask, name, type, subtype, balance, remote_data].hash
234
+ [remote_id, currency, fingerprint, institution, mask, name, type, subtype, balance, remote_data].hash
220
235
  end
221
236
 
222
237
  # Builds the object from hash
@@ -60,6 +60,8 @@ module FuseClient
60
60
  # List of attributes with nullable: true
61
61
  def self.openapi_nullable
62
62
  Set.new([
63
+ :'available',
64
+ :'current',
63
65
  ])
64
66
  end
65
67
 
@@ -55,6 +55,8 @@ module FuseClient
55
55
  # List of attributes with nullable: true
56
56
  def self.openapi_nullable
57
57
  Set.new([
58
+ :'available',
59
+ :'current',
58
60
  ])
59
61
  end
60
62
 
@@ -18,6 +18,9 @@ module FuseClient
18
18
  # Remote Id of the account, ie Plaid or Teller account id
19
19
  attr_accessor :remote_id
20
20
 
21
+ # The ISO-4217 currency code of the account.
22
+ attr_accessor :currency
23
+
21
24
  # Uniquely identifies this account across all accounts for a single financial connection. Used for reconnection deduplication. See more information here: https://letsfuse.readme.io/docs/duplicate-accounts
22
25
  attr_accessor :fingerprint
23
26
 
@@ -84,6 +87,7 @@ module FuseClient
84
87
  def self.attribute_map
85
88
  {
86
89
  :'remote_id' => :'remote_id',
90
+ :'currency' => :'currency',
87
91
  :'fingerprint' => :'fingerprint',
88
92
  :'institution' => :'institution',
89
93
  :'mask' => :'mask',
@@ -111,6 +115,7 @@ module FuseClient
111
115
  def self.openapi_types
112
116
  {
113
117
  :'remote_id' => :'String',
118
+ :'currency' => :'String',
114
119
  :'fingerprint' => :'String',
115
120
  :'institution' => :'FinancialConnectionsAccountInstitution',
116
121
  :'mask' => :'String',
@@ -163,6 +168,10 @@ module FuseClient
163
168
  self.remote_id = attributes[:'remote_id']
164
169
  end
165
170
 
171
+ if attributes.key?(:'currency')
172
+ self.currency = attributes[:'currency']
173
+ end
174
+
166
175
  if attributes.key?(:'fingerprint')
167
176
  self.fingerprint = attributes[:'fingerprint']
168
177
  end
@@ -234,6 +243,10 @@ module FuseClient
234
243
  invalid_properties.push('invalid value for "remote_id", remote_id cannot be nil.')
235
244
  end
236
245
 
246
+ if @currency.nil?
247
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
248
+ end
249
+
237
250
  if @fingerprint.nil?
238
251
  invalid_properties.push('invalid value for "fingerprint", fingerprint cannot be nil.')
239
252
  end
@@ -257,6 +270,7 @@ module FuseClient
257
270
  # @return true if the model is valid
258
271
  def valid?
259
272
  return false if @remote_id.nil?
273
+ return false if @currency.nil?
260
274
  return false if @fingerprint.nil?
261
275
  return false if @name.nil?
262
276
  return false if @type.nil?
@@ -270,6 +284,7 @@ module FuseClient
270
284
  return true if self.equal?(o)
271
285
  self.class == o.class &&
272
286
  remote_id == o.remote_id &&
287
+ currency == o.currency &&
273
288
  fingerprint == o.fingerprint &&
274
289
  institution == o.institution &&
275
290
  mask == o.mask &&
@@ -296,7 +311,7 @@ module FuseClient
296
311
  # Calculates hash code according to all attributes.
297
312
  # @return [Integer] Hash code
298
313
  def hash
299
- [remote_id, fingerprint, institution, mask, name, type, subtype, balance, remote_data, aprs, interest_rate_percentage, origination_principal_amount, next_payment_due_date, last_payment_date, last_payment_amount, minimum_payment_amount].hash
314
+ [remote_id, currency, fingerprint, institution, mask, name, type, subtype, balance, remote_data, aprs, interest_rate_percentage, origination_principal_amount, next_payment_due_date, last_payment_date, last_payment_amount, minimum_payment_amount].hash
300
315
  end
301
316
 
302
317
  # Builds the object from hash