fuse_client 1.0.38 → 1.0.40
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/Gemfile.lock +2 -2
- data/docs/CreateConsumerRiskReportRequest.md +2 -0
- data/docs/CreateLinkTokenRequest.md +3 -1
- data/docs/CreateLinkTokenRequestSnaptrade.md +18 -0
- data/docs/CreateLinkTokenRequestSnaptradeConfig.md +18 -0
- data/docs/EnrichedTransaction.md +4 -26
- data/docs/ExternalTransactionEvent.md +6 -0
- data/docs/FinancialConnectionsAccount.md +2 -0
- data/docs/FinancialConnectionsAccountLiability.md +2 -0
- data/docs/FuseApi.md +1 -1
- data/docs/TransactionToEnrich.md +13 -5
- data/lib/fuse_client/configuration.rb +5 -1
- data/lib/fuse_client/models/create_consumer_risk_report_request.rb +11 -1
- data/lib/fuse_client/models/create_link_token_request.rb +13 -4
- data/lib/fuse_client/models/create_link_token_request_snaptrade.rb +220 -0
- data/lib/fuse_client/models/create_link_token_request_snaptrade_config.rb +256 -0
- data/lib/fuse_client/models/enriched_transaction.rb +17 -158
- data/lib/fuse_client/models/external_transaction_event.rb +44 -1
- data/lib/fuse_client/models/financial_connections_account.rb +16 -1
- data/lib/fuse_client/models/financial_connections_account_balance.rb +2 -0
- data/lib/fuse_client/models/financial_connections_account_cached_balance.rb +2 -0
- data/lib/fuse_client/models/financial_connections_account_liability.rb +16 -1
- data/lib/fuse_client/models/transaction_to_enrich.rb +130 -27
- data/lib/fuse_client/version.rb +1 -1
- data/lib/fuse_client.rb +2 -0
- data/spec/models/asset_report_transaction_spec.rb +1 -1
- data/spec/models/create_consumer_risk_report_request_spec.rb +6 -0
- data/spec/models/create_link_token_request_snaptrade_config_spec.rb +38 -0
- data/spec/models/create_link_token_request_snaptrade_spec.rb +34 -0
- data/spec/models/create_link_token_request_spec.rb +6 -0
- data/spec/models/enriched_transaction_spec.rb +2 -72
- data/spec/models/external_transaction_event_spec.rb +22 -0
- data/spec/models/financial_connections_account_liability_spec.rb +6 -0
- data/spec/models/financial_connections_account_spec.rb +6 -0
- data/spec/models/transaction_spec.rb +1 -1
- data/spec/models/transaction_to_enrich_spec.rb +32 -4
- metadata +20 -13
- data/fuse_client-1.0.37.gem +0 -0
@@ -0,0 +1,256 @@
|
|
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
|
+
class CreateLinkTokenRequestSnaptradeConfig
|
18
|
+
# SnapTrade connection type. Defaults to 'read'
|
19
|
+
attr_accessor :connection_type
|
20
|
+
|
21
|
+
class EnumAttributeValidator
|
22
|
+
attr_reader :datatype
|
23
|
+
attr_reader :allowable_values
|
24
|
+
|
25
|
+
def initialize(datatype, allowable_values)
|
26
|
+
@allowable_values = allowable_values.map do |value|
|
27
|
+
case datatype.to_s
|
28
|
+
when /Integer/i
|
29
|
+
value.to_i
|
30
|
+
when /Float/i
|
31
|
+
value.to_f
|
32
|
+
else
|
33
|
+
value
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def valid?(value)
|
39
|
+
!value || allowable_values.include?(value)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
44
|
+
def self.attribute_map
|
45
|
+
{
|
46
|
+
:'connection_type' => :'connectionType'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Returns all the JSON keys this model knows about
|
51
|
+
def self.acceptable_attributes
|
52
|
+
attribute_map.values
|
53
|
+
end
|
54
|
+
|
55
|
+
# Attribute type mapping.
|
56
|
+
def self.openapi_types
|
57
|
+
{
|
58
|
+
:'connection_type' => :'String'
|
59
|
+
}
|
60
|
+
end
|
61
|
+
|
62
|
+
# List of attributes with nullable: true
|
63
|
+
def self.openapi_nullable
|
64
|
+
Set.new([
|
65
|
+
])
|
66
|
+
end
|
67
|
+
|
68
|
+
# Initializes the object
|
69
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
70
|
+
def initialize(attributes = {})
|
71
|
+
if (!attributes.is_a?(Hash))
|
72
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::CreateLinkTokenRequestSnaptradeConfig` initialize method"
|
73
|
+
end
|
74
|
+
|
75
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
77
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::CreateLinkTokenRequestSnaptradeConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
79
|
+
end
|
80
|
+
h[k.to_sym] = v
|
81
|
+
}
|
82
|
+
|
83
|
+
if attributes.key?(:'connection_type')
|
84
|
+
self.connection_type = attributes[:'connection_type']
|
85
|
+
else
|
86
|
+
self.connection_type = 'read'
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
91
|
+
# @return Array for valid properties with the reasons
|
92
|
+
def list_invalid_properties
|
93
|
+
invalid_properties = Array.new
|
94
|
+
invalid_properties
|
95
|
+
end
|
96
|
+
|
97
|
+
# Check to see if the all the properties in the model are valid
|
98
|
+
# @return true if the model is valid
|
99
|
+
def valid?
|
100
|
+
connection_type_validator = EnumAttributeValidator.new('String', ["read", "trade"])
|
101
|
+
return false unless connection_type_validator.valid?(@connection_type)
|
102
|
+
true
|
103
|
+
end
|
104
|
+
|
105
|
+
# Custom attribute writer method checking allowed values (enum).
|
106
|
+
# @param [Object] connection_type Object to be assigned
|
107
|
+
def connection_type=(connection_type)
|
108
|
+
validator = EnumAttributeValidator.new('String', ["read", "trade"])
|
109
|
+
unless validator.valid?(connection_type)
|
110
|
+
fail ArgumentError, "invalid value for \"connection_type\", must be one of #{validator.allowable_values}."
|
111
|
+
end
|
112
|
+
@connection_type = connection_type
|
113
|
+
end
|
114
|
+
|
115
|
+
# Checks equality by comparing each attribute.
|
116
|
+
# @param [Object] Object to be compared
|
117
|
+
def ==(o)
|
118
|
+
return true if self.equal?(o)
|
119
|
+
self.class == o.class &&
|
120
|
+
connection_type == o.connection_type
|
121
|
+
end
|
122
|
+
|
123
|
+
# @see the `==` method
|
124
|
+
# @param [Object] Object to be compared
|
125
|
+
def eql?(o)
|
126
|
+
self == o
|
127
|
+
end
|
128
|
+
|
129
|
+
# Calculates hash code according to all attributes.
|
130
|
+
# @return [Integer] Hash code
|
131
|
+
def hash
|
132
|
+
[connection_type].hash
|
133
|
+
end
|
134
|
+
|
135
|
+
# Builds the object from hash
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
+
# @return [Object] Returns the model itself
|
138
|
+
def self.build_from_hash(attributes)
|
139
|
+
new.build_from_hash(attributes)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Builds the object from hash
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
144
|
+
# @return [Object] Returns the model itself
|
145
|
+
def build_from_hash(attributes)
|
146
|
+
return nil unless attributes.is_a?(Hash)
|
147
|
+
attributes = attributes.transform_keys(&:to_sym)
|
148
|
+
self.class.openapi_types.each_pair do |key, type|
|
149
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
150
|
+
self.send("#{key}=", nil)
|
151
|
+
elsif type =~ /\AArray<(.*)>/i
|
152
|
+
# check to ensure the input is an array given that the attribute
|
153
|
+
# is documented as an array but the input is not
|
154
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
155
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
156
|
+
end
|
157
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
158
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
self
|
163
|
+
end
|
164
|
+
|
165
|
+
# Deserializes the data based on type
|
166
|
+
# @param string type Data type
|
167
|
+
# @param string value Value to be deserialized
|
168
|
+
# @return [Object] Deserialized data
|
169
|
+
def _deserialize(type, value)
|
170
|
+
case type.to_sym
|
171
|
+
when :Time
|
172
|
+
Time.parse(value)
|
173
|
+
when :Date
|
174
|
+
Date.parse(value)
|
175
|
+
when :String
|
176
|
+
value.to_s
|
177
|
+
when :Integer
|
178
|
+
value.to_i
|
179
|
+
when :Float
|
180
|
+
value.to_f
|
181
|
+
when :Boolean
|
182
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
183
|
+
true
|
184
|
+
else
|
185
|
+
false
|
186
|
+
end
|
187
|
+
when :Object
|
188
|
+
# generic object (usually a Hash), return directly
|
189
|
+
value
|
190
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
191
|
+
inner_type = Regexp.last_match[:inner_type]
|
192
|
+
value.map { |v| _deserialize(inner_type, v) }
|
193
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
194
|
+
k_type = Regexp.last_match[:k_type]
|
195
|
+
v_type = Regexp.last_match[:v_type]
|
196
|
+
{}.tap do |hash|
|
197
|
+
value.each do |k, v|
|
198
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
else # model
|
202
|
+
# models (e.g. Pet) or oneOf
|
203
|
+
klass = FuseClient.const_get(type)
|
204
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the string representation of the object
|
209
|
+
# @return [String] String presentation of the object
|
210
|
+
def to_s
|
211
|
+
to_hash.to_s
|
212
|
+
end
|
213
|
+
|
214
|
+
# to_body is an alias to to_hash (backward compatibility)
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_body
|
217
|
+
to_hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns the object in the form of hash
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
222
|
+
def to_hash
|
223
|
+
hash = {}
|
224
|
+
self.class.attribute_map.each_pair do |attr, param|
|
225
|
+
value = self.send(attr)
|
226
|
+
if value.nil?
|
227
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
228
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
229
|
+
end
|
230
|
+
|
231
|
+
hash[param] = _to_hash(value)
|
232
|
+
end
|
233
|
+
hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Outputs non-array value in the form of hash
|
237
|
+
# For object, use to_hash. Otherwise, just return the value
|
238
|
+
# @param [Object] value Any valid value
|
239
|
+
# @return [Hash] Returns the value in the form of hash
|
240
|
+
def _to_hash(value)
|
241
|
+
if value.is_a?(Array)
|
242
|
+
value.compact.map { |v| _to_hash(v) }
|
243
|
+
elsif value.is_a?(Hash)
|
244
|
+
{}.tap do |hash|
|
245
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
246
|
+
end
|
247
|
+
elsif value.respond_to? :to_hash
|
248
|
+
value.to_hash
|
249
|
+
else
|
250
|
+
value
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
@@ -21,87 +21,22 @@ module FuseClient
|
|
21
21
|
# A Fuse defined, unique ID for the merchant associated with this transaction.
|
22
22
|
attr_accessor :merchant_id
|
23
23
|
|
24
|
-
# The
|
25
|
-
attr_accessor :
|
24
|
+
# The name of the merchant.
|
25
|
+
attr_accessor :merchant_name
|
26
26
|
|
27
27
|
attr_accessor :logo
|
28
28
|
|
29
|
-
#
|
30
|
-
attr_accessor :
|
31
|
-
|
32
|
-
attr_accessor :category
|
33
|
-
|
34
|
-
# Whether the transaction is a bill pay.
|
35
|
-
attr_accessor :is_bill_pay
|
36
|
-
|
37
|
-
# Whether the transaction is a direct deposit.
|
38
|
-
attr_accessor :is_direct_deposit
|
39
|
-
|
40
|
-
# Whether the transaction is a an expense
|
41
|
-
attr_accessor :is_expense
|
42
|
-
|
43
|
-
# Whether the transaction is a fee.
|
44
|
-
attr_accessor :is_fee
|
45
|
-
|
46
|
-
# Whether the transaction is income.
|
47
|
-
attr_accessor :is_income
|
48
|
-
|
49
|
-
# Whether the transaction is international.
|
50
|
-
attr_accessor :is_international
|
51
|
-
|
52
|
-
# This indicates whether the transaction represents an overdraft fee.
|
53
|
-
attr_accessor :is_overdraft_fee
|
54
|
-
|
55
|
-
# Whether the transaction is a payroll advance.
|
56
|
-
attr_accessor :is_payroll_advance
|
57
|
-
|
58
|
-
# Whether the transaction is a subscription.
|
59
|
-
attr_accessor :is_subscription
|
60
|
-
|
61
|
-
# The type of transaction
|
62
|
-
attr_accessor :type
|
63
|
-
|
64
|
-
class EnumAttributeValidator
|
65
|
-
attr_reader :datatype
|
66
|
-
attr_reader :allowable_values
|
67
|
-
|
68
|
-
def initialize(datatype, allowable_values)
|
69
|
-
@allowable_values = allowable_values.map do |value|
|
70
|
-
case datatype.to_s
|
71
|
-
when /Integer/i
|
72
|
-
value.to_i
|
73
|
-
when /Float/i
|
74
|
-
value.to_f
|
75
|
-
else
|
76
|
-
value
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
def valid?(value)
|
82
|
-
!value || allowable_values.include?(value)
|
83
|
-
end
|
84
|
-
end
|
29
|
+
# Hierarchical transaction categories: Each element narrows down from parent to nested sub-categories. Example: ['personnel', 'employee', 'payroll'].
|
30
|
+
attr_accessor :categories
|
85
31
|
|
86
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
87
33
|
def self.attribute_map
|
88
34
|
{
|
89
35
|
:'id' => :'id',
|
90
36
|
:'merchant_id' => :'merchant_id',
|
91
|
-
:'
|
37
|
+
:'merchant_name' => :'merchant_name',
|
92
38
|
:'logo' => :'logo',
|
93
|
-
:'
|
94
|
-
:'category' => :'category',
|
95
|
-
:'is_bill_pay' => :'is_bill_pay',
|
96
|
-
:'is_direct_deposit' => :'is_direct_deposit',
|
97
|
-
:'is_expense' => :'is_expense',
|
98
|
-
:'is_fee' => :'is_fee',
|
99
|
-
:'is_income' => :'is_income',
|
100
|
-
:'is_international' => :'is_international',
|
101
|
-
:'is_overdraft_fee' => :'is_overdraft_fee',
|
102
|
-
:'is_payroll_advance' => :'is_payroll_advance',
|
103
|
-
:'is_subscription' => :'is_subscription',
|
104
|
-
:'type' => :'type'
|
39
|
+
:'categories' => :'categories'
|
105
40
|
}
|
106
41
|
end
|
107
42
|
|
@@ -115,20 +50,9 @@ module FuseClient
|
|
115
50
|
{
|
116
51
|
:'id' => :'String',
|
117
52
|
:'merchant_id' => :'String',
|
118
|
-
:'
|
53
|
+
:'merchant_name' => :'String',
|
119
54
|
:'logo' => :'MerchantLogo',
|
120
|
-
:'
|
121
|
-
:'category' => :'TransactionCategory',
|
122
|
-
:'is_bill_pay' => :'Boolean',
|
123
|
-
:'is_direct_deposit' => :'Boolean',
|
124
|
-
:'is_expense' => :'Boolean',
|
125
|
-
:'is_fee' => :'Boolean',
|
126
|
-
:'is_income' => :'Boolean',
|
127
|
-
:'is_international' => :'Boolean',
|
128
|
-
:'is_overdraft_fee' => :'Boolean',
|
129
|
-
:'is_payroll_advance' => :'Boolean',
|
130
|
-
:'is_subscription' => :'Boolean',
|
131
|
-
:'type' => :'String'
|
55
|
+
:'categories' => :'Array<String>'
|
132
56
|
}
|
133
57
|
end
|
134
58
|
|
@@ -161,60 +85,18 @@ module FuseClient
|
|
161
85
|
self.merchant_id = attributes[:'merchant_id']
|
162
86
|
end
|
163
87
|
|
164
|
-
if attributes.key?(:'
|
165
|
-
self.
|
88
|
+
if attributes.key?(:'merchant_name')
|
89
|
+
self.merchant_name = attributes[:'merchant_name']
|
166
90
|
end
|
167
91
|
|
168
92
|
if attributes.key?(:'logo')
|
169
93
|
self.logo = attributes[:'logo']
|
170
94
|
end
|
171
95
|
|
172
|
-
if attributes.key?(:'
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
if attributes.key?(:'category')
|
177
|
-
self.category = attributes[:'category']
|
178
|
-
end
|
179
|
-
|
180
|
-
if attributes.key?(:'is_bill_pay')
|
181
|
-
self.is_bill_pay = attributes[:'is_bill_pay']
|
182
|
-
end
|
183
|
-
|
184
|
-
if attributes.key?(:'is_direct_deposit')
|
185
|
-
self.is_direct_deposit = attributes[:'is_direct_deposit']
|
186
|
-
end
|
187
|
-
|
188
|
-
if attributes.key?(:'is_expense')
|
189
|
-
self.is_expense = attributes[:'is_expense']
|
190
|
-
end
|
191
|
-
|
192
|
-
if attributes.key?(:'is_fee')
|
193
|
-
self.is_fee = attributes[:'is_fee']
|
194
|
-
end
|
195
|
-
|
196
|
-
if attributes.key?(:'is_income')
|
197
|
-
self.is_income = attributes[:'is_income']
|
198
|
-
end
|
199
|
-
|
200
|
-
if attributes.key?(:'is_international')
|
201
|
-
self.is_international = attributes[:'is_international']
|
202
|
-
end
|
203
|
-
|
204
|
-
if attributes.key?(:'is_overdraft_fee')
|
205
|
-
self.is_overdraft_fee = attributes[:'is_overdraft_fee']
|
206
|
-
end
|
207
|
-
|
208
|
-
if attributes.key?(:'is_payroll_advance')
|
209
|
-
self.is_payroll_advance = attributes[:'is_payroll_advance']
|
210
|
-
end
|
211
|
-
|
212
|
-
if attributes.key?(:'is_subscription')
|
213
|
-
self.is_subscription = attributes[:'is_subscription']
|
214
|
-
end
|
215
|
-
|
216
|
-
if attributes.key?(:'type')
|
217
|
-
self.type = attributes[:'type']
|
96
|
+
if attributes.key?(:'categories')
|
97
|
+
if (value = attributes[:'categories']).is_a?(Array)
|
98
|
+
self.categories = value
|
99
|
+
end
|
218
100
|
end
|
219
101
|
end
|
220
102
|
|
@@ -233,21 +115,9 @@ module FuseClient
|
|
233
115
|
# @return true if the model is valid
|
234
116
|
def valid?
|
235
117
|
return false if @id.nil?
|
236
|
-
type_validator = EnumAttributeValidator.new('String', ["debit", "credit"])
|
237
|
-
return false unless type_validator.valid?(@type)
|
238
118
|
true
|
239
119
|
end
|
240
120
|
|
241
|
-
# Custom attribute writer method checking allowed values (enum).
|
242
|
-
# @param [Object] type Object to be assigned
|
243
|
-
def type=(type)
|
244
|
-
validator = EnumAttributeValidator.new('String', ["debit", "credit"])
|
245
|
-
unless validator.valid?(type)
|
246
|
-
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
247
|
-
end
|
248
|
-
@type = type
|
249
|
-
end
|
250
|
-
|
251
121
|
# Checks equality by comparing each attribute.
|
252
122
|
# @param [Object] Object to be compared
|
253
123
|
def ==(o)
|
@@ -255,20 +125,9 @@ module FuseClient
|
|
255
125
|
self.class == o.class &&
|
256
126
|
id == o.id &&
|
257
127
|
merchant_id == o.merchant_id &&
|
258
|
-
|
128
|
+
merchant_name == o.merchant_name &&
|
259
129
|
logo == o.logo &&
|
260
|
-
|
261
|
-
category == o.category &&
|
262
|
-
is_bill_pay == o.is_bill_pay &&
|
263
|
-
is_direct_deposit == o.is_direct_deposit &&
|
264
|
-
is_expense == o.is_expense &&
|
265
|
-
is_fee == o.is_fee &&
|
266
|
-
is_income == o.is_income &&
|
267
|
-
is_international == o.is_international &&
|
268
|
-
is_overdraft_fee == o.is_overdraft_fee &&
|
269
|
-
is_payroll_advance == o.is_payroll_advance &&
|
270
|
-
is_subscription == o.is_subscription &&
|
271
|
-
type == o.type
|
130
|
+
categories == o.categories
|
272
131
|
end
|
273
132
|
|
274
133
|
# @see the `==` method
|
@@ -280,7 +139,7 @@ module FuseClient
|
|
280
139
|
# Calculates hash code according to all attributes.
|
281
140
|
# @return [Integer] Hash code
|
282
141
|
def hash
|
283
|
-
[id, merchant_id,
|
142
|
+
[id, merchant_id, merchant_name, logo, categories].hash
|
284
143
|
end
|
285
144
|
|
286
145
|
# 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
|
@@ -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
|