snaptrade 3.0.8 → 3.0.10

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 (30) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +4 -41
  4. data/lib/snaptrade/api/account_information_api.rb +4 -107
  5. data/lib/snaptrade/api/experimental_endpoints_api.rb +4 -4
  6. data/lib/snaptrade/models/connection_account.rb +5 -3
  7. data/lib/snaptrade/models/connection_account_sync_status.rb +1 -1
  8. data/lib/snaptrade/models/deposit_account_net_value.rb +1 -1
  9. data/lib/snaptrade/models/investment_account_net_value.rb +1 -1
  10. data/lib/snaptrade/models/line_of_credit_account.rb +356 -0
  11. data/lib/snaptrade/models/line_of_credit_account_credit_details.rb +218 -0
  12. data/lib/snaptrade/models/{user_aum_percentile_response.rb → line_of_credit_account_credit_details_minimum_payment_amount.rb} +22 -12
  13. data/lib/snaptrade/models/{bucket.rb → line_of_credit_account_kind.rb} +5 -10
  14. data/lib/snaptrade/models/{user_aum_percentile_object.rb → line_of_credit_account_net_value.rb} +13 -67
  15. data/lib/snaptrade/models/{user_aum_percentile_response_data.rb → line_of_credit_account_sync_status.rb} +19 -79
  16. data/lib/snaptrade/version.rb +1 -1
  17. data/lib/snaptrade.rb +6 -4
  18. data/spec/api/account_information_api_spec.rb +1 -14
  19. data/spec/api/experimental_endpoints_api_spec.rb +1 -1
  20. data/spec/models/line_of_credit_account_credit_details_minimum_payment_amount_spec.rb +35 -0
  21. data/spec/models/line_of_credit_account_credit_details_spec.rb +29 -0
  22. data/spec/models/line_of_credit_account_kind_spec.rb +23 -0
  23. data/spec/models/line_of_credit_account_net_value_spec.rb +35 -0
  24. data/spec/models/line_of_credit_account_spec.rb +95 -0
  25. data/spec/models/line_of_credit_account_sync_status_spec.rb +35 -0
  26. metadata +229 -223
  27. data/spec/models/bucket_spec.rb +0 -23
  28. data/spec/models/user_aum_percentile_object_spec.rb +0 -53
  29. data/spec/models/user_aum_percentile_response_data_spec.rb +0 -53
  30. data/spec/models/user_aum_percentile_response_spec.rb +0 -29
@@ -0,0 +1,356 @@
1
+ =begin
2
+ #SnapTrade
3
+
4
+ #Connect brokerage accounts to your app for live positions and trading
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: api@snaptrade.com
8
+ =end
9
+
10
+ require 'date'
11
+ require 'time'
12
+
13
+ module SnapTrade
14
+ # A line-of-credit account (e.g. a credit card) under a connection.
15
+ class LineOfCreditAccount
16
+ # Discriminator for the account kind.
17
+ attr_accessor :kind
18
+
19
+ # Unique identifier for the connected institution account. This is the UUID used to reference the account in SnapTrade.
20
+ attr_accessor :id
21
+
22
+ # Unique identifier for the connection (brokerage_authorization_id). This is the UUID used to reference the connection in SnapTrade.
23
+ attr_accessor :connection_id
24
+
25
+ # A display name for the account. Either assigned by the user or by the institution itself.
26
+ attr_accessor :display_name
27
+
28
+ # The account number assigned by the institution, masked to the last 4 characters (e.g. `****1881`).
29
+ attr_accessor :number
30
+
31
+ # A stable and unique account identifier provided by the institution. Will be set to null if not provided. When present, can be used to check if a user has connected the same institution account across multiple connections.
32
+ attr_accessor :institution_account_id
33
+
34
+ # Unique identifier for the institution that holds the account.
35
+ attr_accessor :institution_id
36
+
37
+ # Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format indicating when the account was opened at the institution. Only populated for institutions that expose this data; `null` for all other institutions.
38
+ attr_accessor :opening_date
39
+
40
+ attr_accessor :sync_status
41
+
42
+ # The account type as provided by the institution.
43
+ attr_accessor :raw_type
44
+
45
+ attr_accessor :net_value
46
+
47
+ attr_accessor :credit_details
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'kind' => :'kind',
53
+ :'id' => :'id',
54
+ :'connection_id' => :'connection_id',
55
+ :'display_name' => :'display_name',
56
+ :'number' => :'number',
57
+ :'institution_account_id' => :'institution_account_id',
58
+ :'institution_id' => :'institution_id',
59
+ :'opening_date' => :'opening_date',
60
+ :'sync_status' => :'sync_status',
61
+ :'raw_type' => :'raw_type',
62
+ :'net_value' => :'net_value',
63
+ :'credit_details' => :'credit_details'
64
+ }
65
+ end
66
+
67
+ # Returns all the JSON keys this model knows about
68
+ def self.acceptable_attributes
69
+ attribute_map.values
70
+ end
71
+
72
+ # Attribute type mapping.
73
+ def self.openapi_types
74
+ {
75
+ :'kind' => :'LineOfCreditAccountKind',
76
+ :'id' => :'String',
77
+ :'connection_id' => :'String',
78
+ :'display_name' => :'String',
79
+ :'number' => :'String',
80
+ :'institution_account_id' => :'String',
81
+ :'institution_id' => :'String',
82
+ :'opening_date' => :'Time',
83
+ :'sync_status' => :'LineOfCreditAccountSyncStatus',
84
+ :'raw_type' => :'String',
85
+ :'net_value' => :'LineOfCreditAccountNetValue',
86
+ :'credit_details' => :'LineOfCreditAccountCreditDetails'
87
+ }
88
+ end
89
+
90
+ # List of attributes with nullable: true
91
+ def self.openapi_nullable
92
+ Set.new([
93
+ :'display_name',
94
+ :'institution_account_id',
95
+ :'opening_date',
96
+ :'raw_type',
97
+ :'net_value',
98
+ :'credit_details'
99
+ ])
100
+ end
101
+
102
+ # Initializes the object
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ def initialize(attributes = {})
105
+ if (!attributes.is_a?(Hash))
106
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::LineOfCreditAccount` initialize method"
107
+ end
108
+
109
+ # check to see if the attribute exists and convert string to symbol for hash key
110
+ attributes = attributes.each_with_object({}) { |(k, v), h|
111
+ if (!self.class.attribute_map.key?(k.to_sym))
112
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::LineOfCreditAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
113
+ end
114
+ h[k.to_sym] = v
115
+ }
116
+
117
+ if attributes.key?(:'kind')
118
+ self.kind = attributes[:'kind']
119
+ end
120
+
121
+ if attributes.key?(:'id')
122
+ self.id = attributes[:'id']
123
+ end
124
+
125
+ if attributes.key?(:'connection_id')
126
+ self.connection_id = attributes[:'connection_id']
127
+ end
128
+
129
+ if attributes.key?(:'display_name')
130
+ self.display_name = attributes[:'display_name']
131
+ end
132
+
133
+ if attributes.key?(:'number')
134
+ self.number = attributes[:'number']
135
+ end
136
+
137
+ if attributes.key?(:'institution_account_id')
138
+ self.institution_account_id = attributes[:'institution_account_id']
139
+ end
140
+
141
+ if attributes.key?(:'institution_id')
142
+ self.institution_id = attributes[:'institution_id']
143
+ end
144
+
145
+ if attributes.key?(:'opening_date')
146
+ self.opening_date = attributes[:'opening_date']
147
+ end
148
+
149
+ if attributes.key?(:'sync_status')
150
+ self.sync_status = attributes[:'sync_status']
151
+ end
152
+
153
+ if attributes.key?(:'raw_type')
154
+ self.raw_type = attributes[:'raw_type']
155
+ end
156
+
157
+ if attributes.key?(:'net_value')
158
+ self.net_value = attributes[:'net_value']
159
+ end
160
+
161
+ if attributes.key?(:'credit_details')
162
+ self.credit_details = attributes[:'credit_details']
163
+ end
164
+ end
165
+
166
+ # Show invalid properties with the reasons. Usually used together with valid?
167
+ # @return Array for valid properties with the reasons
168
+ def list_invalid_properties
169
+ invalid_properties = Array.new
170
+ if @kind.nil?
171
+ invalid_properties.push('invalid value for "kind", kind cannot be nil.')
172
+ end
173
+
174
+ if @id.nil?
175
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
176
+ end
177
+
178
+ if @connection_id.nil?
179
+ invalid_properties.push('invalid value for "connection_id", connection_id cannot be nil.')
180
+ end
181
+
182
+ if @number.nil?
183
+ invalid_properties.push('invalid value for "number", number cannot be nil.')
184
+ end
185
+
186
+ if @sync_status.nil?
187
+ invalid_properties.push('invalid value for "sync_status", sync_status cannot be nil.')
188
+ end
189
+
190
+ invalid_properties
191
+ end
192
+
193
+ # Check to see if the all the properties in the model are valid
194
+ # @return true if the model is valid
195
+ def valid?
196
+ return false if @kind.nil?
197
+ return false if @id.nil?
198
+ return false if @connection_id.nil?
199
+ return false if @number.nil?
200
+ return false if @sync_status.nil?
201
+ true
202
+ end
203
+
204
+ # Checks equality by comparing each attribute.
205
+ # @param [Object] Object to be compared
206
+ def ==(o)
207
+ return true if self.equal?(o)
208
+ self.class == o.class &&
209
+ kind == o.kind &&
210
+ id == o.id &&
211
+ connection_id == o.connection_id &&
212
+ display_name == o.display_name &&
213
+ number == o.number &&
214
+ institution_account_id == o.institution_account_id &&
215
+ institution_id == o.institution_id &&
216
+ opening_date == o.opening_date &&
217
+ sync_status == o.sync_status &&
218
+ raw_type == o.raw_type &&
219
+ net_value == o.net_value &&
220
+ credit_details == o.credit_details
221
+ end
222
+
223
+ # @see the `==` method
224
+ # @param [Object] Object to be compared
225
+ def eql?(o)
226
+ self == o
227
+ end
228
+
229
+ # Calculates hash code according to all attributes.
230
+ # @return [Integer] Hash code
231
+ def hash
232
+ [kind, id, connection_id, display_name, number, institution_account_id, institution_id, opening_date, sync_status, raw_type, net_value, credit_details].hash
233
+ end
234
+
235
+ # Builds the object from hash
236
+ # @param [Hash] attributes Model attributes in the form of hash
237
+ # @return [Object] Returns the model itself
238
+ def self.build_from_hash(attributes)
239
+ new.build_from_hash(attributes)
240
+ end
241
+
242
+ # Builds the object from hash
243
+ # @param [Hash] attributes Model attributes in the form of hash
244
+ # @return [Object] Returns the model itself
245
+ def build_from_hash(attributes)
246
+ return nil unless attributes.is_a?(Hash)
247
+ attributes = attributes.transform_keys(&:to_sym)
248
+ self.class.openapi_types.each_pair do |key, type|
249
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
250
+ self.send("#{key}=", nil)
251
+ elsif type =~ /\AArray<(.*)>/i
252
+ # check to ensure the input is an array given that the attribute
253
+ # is documented as an array but the input is not
254
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
255
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
256
+ end
257
+ elsif !attributes[self.class.attribute_map[key]].nil?
258
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
259
+ end
260
+ end
261
+
262
+ self
263
+ end
264
+
265
+ # Deserializes the data based on type
266
+ # @param string type Data type
267
+ # @param string value Value to be deserialized
268
+ # @return [Object] Deserialized data
269
+ def _deserialize(type, value)
270
+ case type.to_sym
271
+ when :Time
272
+ Time.parse(value)
273
+ when :Date
274
+ Date.parse(value)
275
+ when :String
276
+ value.to_s
277
+ when :Integer
278
+ value.to_i
279
+ when :Float
280
+ value.to_f
281
+ when :Boolean
282
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
283
+ true
284
+ else
285
+ false
286
+ end
287
+ when :Object
288
+ # generic object (usually a Hash), return directly
289
+ value
290
+ when /\AArray<(?<inner_type>.+)>\z/
291
+ inner_type = Regexp.last_match[:inner_type]
292
+ value.map { |v| _deserialize(inner_type, v) }
293
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
294
+ k_type = Regexp.last_match[:k_type]
295
+ v_type = Regexp.last_match[:v_type]
296
+ {}.tap do |hash|
297
+ value.each do |k, v|
298
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
299
+ end
300
+ end
301
+ else # model
302
+ # models (e.g. Pet) or oneOf
303
+ klass = SnapTrade.const_get(type)
304
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
305
+ end
306
+ end
307
+
308
+ # Returns the string representation of the object
309
+ # @return [String] String presentation of the object
310
+ def to_s
311
+ to_hash.to_s
312
+ end
313
+
314
+ # to_body is an alias to to_hash (backward compatibility)
315
+ # @return [Hash] Returns the object in the form of hash
316
+ def to_body
317
+ to_hash
318
+ end
319
+
320
+ # Returns the object in the form of hash
321
+ # @return [Hash] Returns the object in the form of hash
322
+ def to_hash
323
+ hash = {}
324
+ self.class.attribute_map.each_pair do |attr, param|
325
+ value = self.send(attr)
326
+ if value.nil?
327
+ is_nullable = self.class.openapi_nullable.include?(attr)
328
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
329
+ end
330
+
331
+ hash[param] = _to_hash(value)
332
+ end
333
+ hash
334
+ end
335
+
336
+ # Outputs non-array value in the form of hash
337
+ # For object, use to_hash. Otherwise, just return the value
338
+ # @param [Object] value Any valid value
339
+ # @return [Hash] Returns the value in the form of hash
340
+ def _to_hash(value)
341
+ if value.is_a?(Array)
342
+ value.compact.map { |v| _to_hash(v) }
343
+ elsif value.is_a?(Hash)
344
+ {}.tap do |hash|
345
+ value.each { |k, v| hash[k] = _to_hash(v) }
346
+ end
347
+ elsif value.respond_to? :to_hash
348
+ value.to_hash
349
+ else
350
+ value
351
+ end
352
+ end
353
+
354
+ end
355
+
356
+ end
@@ -0,0 +1,218 @@
1
+ =begin
2
+ #SnapTrade
3
+
4
+ #Connect brokerage accounts to your app for live positions and trading
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: api@snaptrade.com
8
+ =end
9
+
10
+ require 'date'
11
+ require 'time'
12
+
13
+ module SnapTrade
14
+ # Additional line-of-credit details. Currently only `minimum_payment_amount`; more properties (e.g. credit limit) may be added later without a breaking change. Omitted when no such data is available.
15
+ class LineOfCreditAccountCreditDetails
16
+ attr_accessor :minimum_payment_amount
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'minimum_payment_amount' => :'minimum_payment_amount'
22
+ }
23
+ end
24
+
25
+ # Returns all the JSON keys this model knows about
26
+ def self.acceptable_attributes
27
+ attribute_map.values
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.openapi_types
32
+ {
33
+ :'minimum_payment_amount' => :'LineOfCreditAccountCreditDetailsMinimumPaymentAmount'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ :'minimum_payment_amount'
41
+ ])
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::LineOfCreditAccountCreditDetails` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::LineOfCreditAccountCreditDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'minimum_payment_amount')
60
+ self.minimum_payment_amount = attributes[:'minimum_payment_amount']
61
+ end
62
+ end
63
+
64
+ # Show invalid properties with the reasons. Usually used together with valid?
65
+ # @return Array for valid properties with the reasons
66
+ def list_invalid_properties
67
+ invalid_properties = Array.new
68
+ invalid_properties
69
+ end
70
+
71
+ # Check to see if the all the properties in the model are valid
72
+ # @return true if the model is valid
73
+ def valid?
74
+ true
75
+ end
76
+
77
+ # Checks equality by comparing each attribute.
78
+ # @param [Object] Object to be compared
79
+ def ==(o)
80
+ return true if self.equal?(o)
81
+ self.class == o.class &&
82
+ minimum_payment_amount == o.minimum_payment_amount
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ def hash
94
+ [minimum_payment_amount].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def self.build_from_hash(attributes)
101
+ new.build_from_hash(attributes)
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ attributes = attributes.transform_keys(&:to_sym)
110
+ self.class.openapi_types.each_pair do |key, type|
111
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
112
+ self.send("#{key}=", nil)
113
+ elsif type =~ /\AArray<(.*)>/i
114
+ # check to ensure the input is an array given that the attribute
115
+ # is documented as an array but the input is not
116
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
117
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
118
+ end
119
+ elsif !attributes[self.class.attribute_map[key]].nil?
120
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
121
+ end
122
+ end
123
+
124
+ self
125
+ end
126
+
127
+ # Deserializes the data based on type
128
+ # @param string type Data type
129
+ # @param string value Value to be deserialized
130
+ # @return [Object] Deserialized data
131
+ def _deserialize(type, value)
132
+ case type.to_sym
133
+ when :Time
134
+ Time.parse(value)
135
+ when :Date
136
+ Date.parse(value)
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :Boolean
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else # model
164
+ # models (e.g. Pet) or oneOf
165
+ klass = SnapTrade.const_get(type)
166
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
167
+ end
168
+ end
169
+
170
+ # Returns the string representation of the object
171
+ # @return [String] String presentation of the object
172
+ def to_s
173
+ to_hash.to_s
174
+ end
175
+
176
+ # to_body is an alias to to_hash (backward compatibility)
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_body
179
+ to_hash
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ # Outputs non-array value in the form of hash
199
+ # For object, use to_hash. Otherwise, just return the value
200
+ # @param [Object] value Any valid value
201
+ # @return [Hash] Returns the value in the form of hash
202
+ def _to_hash(value)
203
+ if value.is_a?(Array)
204
+ value.compact.map { |v| _to_hash(v) }
205
+ elsif value.is_a?(Hash)
206
+ {}.tap do |hash|
207
+ value.each { |k, v| hash[k] = _to_hash(v) }
208
+ end
209
+ elsif value.respond_to? :to_hash
210
+ value.to_hash
211
+ else
212
+ value
213
+ end
214
+ end
215
+
216
+ end
217
+
218
+ end
@@ -11,14 +11,17 @@ require 'date'
11
11
  require 'time'
12
12
 
13
13
  module SnapTrade
14
- # The user's placement within your book, or null when SnapTrade declines to place them
15
- class UserAumPercentileResponse
16
- attr_accessor :data
14
+ # The minimum payment due on the account's next statement.
15
+ class LineOfCreditAccountCreditDetailsMinimumPaymentAmount
16
+ attr_accessor :amount
17
+
18
+ attr_accessor :currency
17
19
 
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
19
21
  def self.attribute_map
20
22
  {
21
- :'data' => :'data'
23
+ :'amount' => :'amount',
24
+ :'currency' => :'currency'
22
25
  }
23
26
  end
24
27
 
@@ -30,14 +33,16 @@ module SnapTrade
30
33
  # Attribute type mapping.
31
34
  def self.openapi_types
32
35
  {
33
- :'data' => :'UserAumPercentileResponseData'
36
+ :'amount' => :'Float',
37
+ :'currency' => :'String'
34
38
  }
35
39
  end
36
40
 
37
41
  # List of attributes with nullable: true
38
42
  def self.openapi_nullable
39
43
  Set.new([
40
- :'data'
44
+ :'amount',
45
+ :'currency'
41
46
  ])
42
47
  end
43
48
 
@@ -45,19 +50,23 @@ module SnapTrade
45
50
  # @param [Hash] attributes Model attributes in the form of hash
46
51
  def initialize(attributes = {})
47
52
  if (!attributes.is_a?(Hash))
48
- fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::UserAumPercentileResponse` initialize method"
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SnapTrade::LineOfCreditAccountCreditDetailsMinimumPaymentAmount` initialize method"
49
54
  end
50
55
 
51
56
  # check to see if the attribute exists and convert string to symbol for hash key
52
57
  attributes = attributes.each_with_object({}) { |(k, v), h|
53
58
  if (!self.class.attribute_map.key?(k.to_sym))
54
- fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::UserAumPercentileResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SnapTrade::LineOfCreditAccountCreditDetailsMinimumPaymentAmount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
60
  end
56
61
  h[k.to_sym] = v
57
62
  }
58
63
 
59
- if attributes.key?(:'data')
60
- self.data = attributes[:'data']
64
+ if attributes.key?(:'amount')
65
+ self.amount = attributes[:'amount']
66
+ end
67
+
68
+ if attributes.key?(:'currency')
69
+ self.currency = attributes[:'currency']
61
70
  end
62
71
  end
63
72
 
@@ -79,7 +88,8 @@ module SnapTrade
79
88
  def ==(o)
80
89
  return true if self.equal?(o)
81
90
  self.class == o.class &&
82
- data == o.data
91
+ amount == o.amount &&
92
+ currency == o.currency
83
93
  end
84
94
 
85
95
  # @see the `==` method
@@ -91,7 +101,7 @@ module SnapTrade
91
101
  # Calculates hash code according to all attributes.
92
102
  # @return [Integer] Hash code
93
103
  def hash
94
- [data].hash
104
+ [amount, currency].hash
95
105
  end
96
106
 
97
107
  # Builds the object from hash
@@ -11,16 +11,11 @@ require 'date'
11
11
  require 'time'
12
12
 
13
13
  module SnapTrade
14
- class Bucket
15
- TOP_1_PERCENT = "TOP_1_PERCENT".freeze
16
- TOP_5_PERCENT = "TOP_5_PERCENT".freeze
17
- TOP_10_PERCENT = "TOP_10_PERCENT".freeze
18
- TOP_25_PERCENT = "TOP_25_PERCENT".freeze
19
- TOP_50_PERCENT = "TOP_50_PERCENT".freeze
20
- BOTTOM_50_PERCENT = "BOTTOM_50_PERCENT".freeze
14
+ class LineOfCreditAccountKind
15
+ LINE_OF_CREDIT = "line_of_credit".freeze
21
16
 
22
17
  def self.all_vars
23
- @all_vars ||= [TOP_1_PERCENT, TOP_5_PERCENT, TOP_10_PERCENT, TOP_25_PERCENT, TOP_50_PERCENT, BOTTOM_50_PERCENT].freeze
18
+ @all_vars ||= [LINE_OF_CREDIT].freeze
24
19
  end
25
20
 
26
21
  # Builds the enum from string
@@ -34,8 +29,8 @@ module SnapTrade
34
29
  # @param [String] The enum value in the form of the string
35
30
  # @return [String] The enum value
36
31
  def build_from_hash(value)
37
- return value if Bucket.all_vars.include?(value)
38
- raise "Invalid ENUM value #{value} for class #Bucket"
32
+ return value if LineOfCreditAccountKind.all_vars.include?(value)
33
+ raise "Invalid ENUM value #{value} for class #LineOfCreditAccountKind"
39
34
  end
40
35
  end
41
36
  end