fuse_client 1.0.38 → 1.0.41

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.
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
@@ -0,0 +1,220 @@
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
+ # An object specifying information about the SnapTrade configuration to use when creating a link token.
18
+ class CreateLinkTokenRequestSnaptrade
19
+ attr_accessor :config
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'config' => :'config'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'config' => :'CreateLinkTokenRequestSnaptradeConfig'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::CreateLinkTokenRequestSnaptrade` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::CreateLinkTokenRequestSnaptrade`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'config')
62
+ self.config = attributes[:'config']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ config == o.config
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(o)
90
+ self == o
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ def hash
96
+ [config].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def self.build_from_hash(attributes)
103
+ new.build_from_hash(attributes)
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ self.class.openapi_types.each_pair do |key, type|
113
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
+ self.send("#{key}=", nil)
115
+ elsif type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :Time
136
+ Time.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :Boolean
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ # models (e.g. Pet) or oneOf
167
+ klass = FuseClient.const_get(type)
168
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map { |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -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 original or enhanced name of the merchant.
25
- attr_accessor :name
24
+ # The name of the merchant.
25
+ attr_accessor :merchant_name
26
26
 
27
27
  attr_accessor :logo
28
28
 
29
- # The amount of the transaction in cents, in the currency of the account.
30
- attr_accessor :amount
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
- :'name' => :'name',
37
+ :'merchant_name' => :'merchant_name',
92
38
  :'logo' => :'logo',
93
- :'amount' => :'amount',
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
- :'name' => :'String',
53
+ :'merchant_name' => :'String',
119
54
  :'logo' => :'MerchantLogo',
120
- :'amount' => :'Float',
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?(:'name')
165
- self.name = attributes[:'name']
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?(:'amount')
173
- self.amount = attributes[:'amount']
174
- end
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
- name == o.name &&
128
+ merchant_name == o.merchant_name &&
259
129
  logo == o.logo &&
260
- amount == o.amount &&
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, name, logo, amount, category, is_bill_pay, is_direct_deposit, is_expense, is_fee, is_income, is_international, is_overdraft_fee, is_payroll_advance, is_subscription, type].hash
142
+ [id, merchant_id, merchant_name, logo, categories].hash
284
143
  end
285
144
 
286
145
  # Builds the object from hash