moneykit 0.1.5 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/docs/AccessTokenApi.md +4 -4
- data/docs/AccountBalances.md +3 -1
- data/docs/AccountNumbersApi.md +12 -12
- data/docs/AccountNumbersLegacy20230218.md +24 -0
- data/docs/AccountWithAccountNumbersLegacy20230218.md +28 -0
- data/docs/AccountsApi.md +20 -20
- data/docs/AppClientResponse.md +26 -0
- data/docs/AppResponse.md +24 -0
- data/docs/CreateLinkSessionRequest.md +2 -2
- data/docs/GetAccountNumbersResponseLegacy20230218.md +20 -0
- data/docs/IdentityApi.md +1 -1
- data/docs/Institution.md +1 -1
- data/docs/InstitutionsApi.md +2 -2
- data/docs/InvestmentTransactionResponse.md +4 -4
- data/docs/InvestmentsApi.md +2 -2
- data/docs/LinkCommon.md +3 -1
- data/docs/LinkProduct.md +28 -0
- data/docs/LinkProducts.md +4 -4
- data/docs/LinkResponse.md +2 -0
- data/docs/LinksApi.md +5 -5
- data/docs/MoneyKitConnectFeatures.md +3 -1
- data/docs/ProductSettings.md +24 -0
- data/docs/ProductsApi.md +1 -1
- data/docs/ProductsSettings.md +3 -3
- data/docs/RequestedLinkPermission.md +2 -2
- data/docs/Response401GetAccountNumbersLegacy20230218LinksIdAccountsNumbersGet.md +22 -0
- data/docs/SecurityResponse.md +2 -2
- data/docs/TransactionsApi.md +5 -5
- data/docs/TransactionsLinkProduct.md +6 -4
- data/docs/TransactionsProductSettings.md +4 -2
- data/docs/UsersApi.md +7 -7
- data/docs/WebhooksApi.md +1 -1
- data/lib/moneykit/api/access_token_api.rb +3 -3
- data/lib/moneykit/api/account_numbers_api.rb +10 -10
- data/lib/moneykit/api/accounts_api.rb +16 -16
- data/lib/moneykit/api/investments_api.rb +2 -2
- data/lib/moneykit/api/transactions_api.rb +6 -6
- data/lib/moneykit/api/users_api.rb +8 -8
- data/lib/moneykit/models/account_balances.rb +14 -4
- data/lib/moneykit/models/account_numbers_legacy20230218.rb +275 -0
- data/lib/moneykit/models/account_with_account_numbers_legacy20230218.rb +296 -0
- data/lib/moneykit/models/app_client_response.rb +281 -0
- data/lib/moneykit/models/app_response.rb +272 -0
- data/lib/moneykit/models/create_link_session_request.rb +2 -2
- data/lib/moneykit/models/get_account_numbers_response_legacy20230218.rb +237 -0
- data/lib/moneykit/models/institution.rb +1 -1
- data/lib/moneykit/models/investment_transaction_response.rb +13 -13
- data/lib/moneykit/models/link_common.rb +22 -4
- data/lib/moneykit/models/link_product.rb +283 -0
- data/lib/moneykit/models/link_product_failure_reasons.rb +2 -1
- data/lib/moneykit/models/link_products.rb +4 -4
- data/lib/moneykit/models/link_response.rb +19 -1
- data/lib/moneykit/models/money_kit_connect_features.rb +16 -4
- data/lib/moneykit/models/product_settings.rb +249 -0
- data/lib/moneykit/models/products_settings.rb +3 -3
- data/lib/moneykit/models/requested_link_permission.rb +2 -2
- data/lib/moneykit/models/response401_get_account_numbers_legacy20230218_links_id_accounts_numbers_get.rb +104 -0
- data/lib/moneykit/models/security_response.rb +11 -11
- data/lib/moneykit/models/transactions_link_product.rb +22 -18
- data/lib/moneykit/models/transactions_product_settings.rb +20 -10
- data/lib/moneykit/version.rb +1 -1
- data/lib/moneykit.rb +8 -14
- data/spec/models/account_numbers_legacy20230218_spec.rb +54 -0
- data/spec/models/account_with_account_numbers_legacy20230218_spec.rb +66 -0
- data/spec/models/app_client_response_spec.rb +60 -0
- data/spec/models/app_response_spec.rb +54 -0
- data/spec/models/get_account_numbers_response_legacy20230218_spec.rb +42 -0
- data/spec/models/link_product_spec.rb +66 -0
- data/spec/models/product_settings_spec.rb +54 -0
- data/spec/models/response401_get_account_numbers_legacy20230218_links_id_accounts_numbers_get_spec.rb +21 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/byebug/byebug.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/jaro_winkler/jaro_winkler_ext.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.1.1.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.1.1.1/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.3/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.3/racc/cparse.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.1.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.1.0/stringio.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/byebug-11.1.3/lib/byebug/byebug.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.6/lib/jaro_winkler/jaro_winkler_ext.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/psych-5.1.1.1/lib/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.3/lib/racc/cparse.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/stringio-3.1.0/lib/stringio.so +0 -0
- metadata +145 -113
@@ -0,0 +1,281 @@
|
|
1
|
+
=begin
|
2
|
+
#MoneyKit API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MoneyKit
|
17
|
+
# application client
|
18
|
+
class AppClientResponse
|
19
|
+
# The client's client ID.
|
20
|
+
attr_accessor :client_id
|
21
|
+
|
22
|
+
# Friendly client name for identification.
|
23
|
+
attr_accessor :client_name
|
24
|
+
|
25
|
+
# Actions allowed by this client.
|
26
|
+
attr_accessor :scope
|
27
|
+
|
28
|
+
attr_accessor :app
|
29
|
+
|
30
|
+
# Set to timestamp if the client has been disabled.
|
31
|
+
attr_accessor :disabled_at
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'client_id' => :'client_id',
|
37
|
+
:'client_name' => :'client_name',
|
38
|
+
:'scope' => :'scope',
|
39
|
+
:'app' => :'app',
|
40
|
+
:'disabled_at' => :'disabled_at'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Returns all the JSON keys this model knows about
|
45
|
+
def self.acceptable_attributes
|
46
|
+
attribute_map.values
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
def self.openapi_types
|
51
|
+
{
|
52
|
+
:'client_id' => :'String',
|
53
|
+
:'client_name' => :'String',
|
54
|
+
:'scope' => :'String',
|
55
|
+
:'app' => :'AppResponse',
|
56
|
+
:'disabled_at' => :'Time'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# List of attributes with nullable: true
|
61
|
+
def self.openapi_nullable
|
62
|
+
Set.new([
|
63
|
+
])
|
64
|
+
end
|
65
|
+
|
66
|
+
# Initializes the object
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
68
|
+
def initialize(attributes = {})
|
69
|
+
if (!attributes.is_a?(Hash))
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::AppClientResponse` initialize method"
|
71
|
+
end
|
72
|
+
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
75
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::AppClientResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
77
|
+
end
|
78
|
+
h[k.to_sym] = v
|
79
|
+
}
|
80
|
+
|
81
|
+
if attributes.key?(:'client_id')
|
82
|
+
self.client_id = attributes[:'client_id']
|
83
|
+
else
|
84
|
+
self.client_id = nil
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.key?(:'client_name')
|
88
|
+
self.client_name = attributes[:'client_name']
|
89
|
+
else
|
90
|
+
self.client_name = nil
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'scope')
|
94
|
+
self.scope = attributes[:'scope']
|
95
|
+
else
|
96
|
+
self.scope = nil
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'app')
|
100
|
+
self.app = attributes[:'app']
|
101
|
+
else
|
102
|
+
self.app = nil
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'disabled_at')
|
106
|
+
self.disabled_at = attributes[:'disabled_at']
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
111
|
+
# @return Array for valid properties with the reasons
|
112
|
+
def list_invalid_properties
|
113
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
114
|
+
invalid_properties = Array.new
|
115
|
+
if @client_id.nil?
|
116
|
+
invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
|
117
|
+
end
|
118
|
+
|
119
|
+
if @client_name.nil?
|
120
|
+
invalid_properties.push('invalid value for "client_name", client_name cannot be nil.')
|
121
|
+
end
|
122
|
+
|
123
|
+
if @scope.nil?
|
124
|
+
invalid_properties.push('invalid value for "scope", scope cannot be nil.')
|
125
|
+
end
|
126
|
+
|
127
|
+
if @app.nil?
|
128
|
+
invalid_properties.push('invalid value for "app", app cannot be nil.')
|
129
|
+
end
|
130
|
+
|
131
|
+
invalid_properties
|
132
|
+
end
|
133
|
+
|
134
|
+
# Check to see if the all the properties in the model are valid
|
135
|
+
# @return true if the model is valid
|
136
|
+
def valid?
|
137
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
138
|
+
return false if @client_id.nil?
|
139
|
+
return false if @client_name.nil?
|
140
|
+
return false if @scope.nil?
|
141
|
+
return false if @app.nil?
|
142
|
+
true
|
143
|
+
end
|
144
|
+
|
145
|
+
# Checks equality by comparing each attribute.
|
146
|
+
# @param [Object] Object to be compared
|
147
|
+
def ==(o)
|
148
|
+
return true if self.equal?(o)
|
149
|
+
self.class == o.class &&
|
150
|
+
client_id == o.client_id &&
|
151
|
+
client_name == o.client_name &&
|
152
|
+
scope == o.scope &&
|
153
|
+
app == o.app &&
|
154
|
+
disabled_at == o.disabled_at
|
155
|
+
end
|
156
|
+
|
157
|
+
# @see the `==` method
|
158
|
+
# @param [Object] Object to be compared
|
159
|
+
def eql?(o)
|
160
|
+
self == o
|
161
|
+
end
|
162
|
+
|
163
|
+
# Calculates hash code according to all attributes.
|
164
|
+
# @return [Integer] Hash code
|
165
|
+
def hash
|
166
|
+
[client_id, client_name, scope, app, disabled_at].hash
|
167
|
+
end
|
168
|
+
|
169
|
+
# Builds the object from hash
|
170
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
171
|
+
# @return [Object] Returns the model itself
|
172
|
+
def self.build_from_hash(attributes)
|
173
|
+
return nil unless attributes.is_a?(Hash)
|
174
|
+
attributes = attributes.transform_keys(&:to_sym)
|
175
|
+
transformed_hash = {}
|
176
|
+
openapi_types.each_pair do |key, type|
|
177
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
178
|
+
transformed_hash["#{key}"] = nil
|
179
|
+
elsif type =~ /\AArray<(.*)>/i
|
180
|
+
# check to ensure the input is an array given that the attribute
|
181
|
+
# is documented as an array but the input is not
|
182
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
183
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
184
|
+
end
|
185
|
+
elsif !attributes[attribute_map[key]].nil?
|
186
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
187
|
+
end
|
188
|
+
end
|
189
|
+
new(transformed_hash)
|
190
|
+
end
|
191
|
+
|
192
|
+
# Deserializes the data based on type
|
193
|
+
# @param string type Data type
|
194
|
+
# @param string value Value to be deserialized
|
195
|
+
# @return [Object] Deserialized data
|
196
|
+
def self._deserialize(type, value)
|
197
|
+
case type.to_sym
|
198
|
+
when :Time
|
199
|
+
Time.parse(value)
|
200
|
+
when :Date
|
201
|
+
Date.parse(value)
|
202
|
+
when :String
|
203
|
+
value.to_s
|
204
|
+
when :Integer
|
205
|
+
value.to_i
|
206
|
+
when :Float
|
207
|
+
value.to_f
|
208
|
+
when :Boolean
|
209
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
210
|
+
true
|
211
|
+
else
|
212
|
+
false
|
213
|
+
end
|
214
|
+
when :Object
|
215
|
+
# generic object (usually a Hash), return directly
|
216
|
+
value
|
217
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
218
|
+
inner_type = Regexp.last_match[:inner_type]
|
219
|
+
value.map { |v| _deserialize(inner_type, v) }
|
220
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
221
|
+
k_type = Regexp.last_match[:k_type]
|
222
|
+
v_type = Regexp.last_match[:v_type]
|
223
|
+
{}.tap do |hash|
|
224
|
+
value.each do |k, v|
|
225
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
226
|
+
end
|
227
|
+
end
|
228
|
+
else # model
|
229
|
+
# models (e.g. Pet) or oneOf
|
230
|
+
klass = MoneyKit.const_get(type)
|
231
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
# Returns the string representation of the object
|
236
|
+
# @return [String] String presentation of the object
|
237
|
+
def to_s
|
238
|
+
to_hash.to_s
|
239
|
+
end
|
240
|
+
|
241
|
+
# to_body is an alias to to_hash (backward compatibility)
|
242
|
+
# @return [Hash] Returns the object in the form of hash
|
243
|
+
def to_body
|
244
|
+
to_hash
|
245
|
+
end
|
246
|
+
|
247
|
+
# Returns the object in the form of hash
|
248
|
+
# @return [Hash] Returns the object in the form of hash
|
249
|
+
def to_hash
|
250
|
+
hash = {}
|
251
|
+
self.class.attribute_map.each_pair do |attr, param|
|
252
|
+
value = self.send(attr)
|
253
|
+
if value.nil?
|
254
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
255
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
256
|
+
end
|
257
|
+
|
258
|
+
hash[param] = _to_hash(value)
|
259
|
+
end
|
260
|
+
hash
|
261
|
+
end
|
262
|
+
|
263
|
+
# Outputs non-array value in the form of hash
|
264
|
+
# For object, use to_hash. Otherwise, just return the value
|
265
|
+
# @param [Object] value Any valid value
|
266
|
+
# @return [Hash] Returns the value in the form of hash
|
267
|
+
def _to_hash(value)
|
268
|
+
if value.is_a?(Array)
|
269
|
+
value.compact.map { |v| _to_hash(v) }
|
270
|
+
elsif value.is_a?(Hash)
|
271
|
+
{}.tap do |hash|
|
272
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
273
|
+
end
|
274
|
+
elsif value.respond_to? :to_hash
|
275
|
+
value.to_hash
|
276
|
+
else
|
277
|
+
value
|
278
|
+
end
|
279
|
+
end
|
280
|
+
end
|
281
|
+
end
|
@@ -0,0 +1,272 @@
|
|
1
|
+
=begin
|
2
|
+
#MoneyKit API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MoneyKit
|
17
|
+
# App for a specific environment
|
18
|
+
class AppResponse
|
19
|
+
# Your app's ID.
|
20
|
+
attr_accessor :app_id
|
21
|
+
|
22
|
+
# Your app's name.
|
23
|
+
attr_accessor :name
|
24
|
+
|
25
|
+
# Your app's ID.
|
26
|
+
attr_accessor :id
|
27
|
+
|
28
|
+
# Your app's name.
|
29
|
+
attr_accessor :app_name
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'app_id' => :'app_id',
|
35
|
+
:'name' => :'name',
|
36
|
+
:'id' => :'id',
|
37
|
+
:'app_name' => :'app_name'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns all the JSON keys this model knows about
|
42
|
+
def self.acceptable_attributes
|
43
|
+
attribute_map.values
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.openapi_types
|
48
|
+
{
|
49
|
+
:'app_id' => :'String',
|
50
|
+
:'name' => :'String',
|
51
|
+
:'id' => :'String',
|
52
|
+
:'app_name' => :'String'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# List of attributes with nullable: true
|
57
|
+
def self.openapi_nullable
|
58
|
+
Set.new([
|
59
|
+
])
|
60
|
+
end
|
61
|
+
|
62
|
+
# Initializes the object
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
64
|
+
def initialize(attributes = {})
|
65
|
+
if (!attributes.is_a?(Hash))
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::AppResponse` initialize method"
|
67
|
+
end
|
68
|
+
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
71
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::AppResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
73
|
+
end
|
74
|
+
h[k.to_sym] = v
|
75
|
+
}
|
76
|
+
|
77
|
+
if attributes.key?(:'app_id')
|
78
|
+
self.app_id = attributes[:'app_id']
|
79
|
+
else
|
80
|
+
self.app_id = nil
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.key?(:'name')
|
84
|
+
self.name = attributes[:'name']
|
85
|
+
else
|
86
|
+
self.name = nil
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'id')
|
90
|
+
self.id = attributes[:'id']
|
91
|
+
else
|
92
|
+
self.id = nil
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.key?(:'app_name')
|
96
|
+
self.app_name = attributes[:'app_name']
|
97
|
+
else
|
98
|
+
self.app_name = nil
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
103
|
+
# @return Array for valid properties with the reasons
|
104
|
+
def list_invalid_properties
|
105
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
106
|
+
invalid_properties = Array.new
|
107
|
+
if @app_id.nil?
|
108
|
+
invalid_properties.push('invalid value for "app_id", app_id cannot be nil.')
|
109
|
+
end
|
110
|
+
|
111
|
+
if @name.nil?
|
112
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
113
|
+
end
|
114
|
+
|
115
|
+
if @id.nil?
|
116
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
117
|
+
end
|
118
|
+
|
119
|
+
if @app_name.nil?
|
120
|
+
invalid_properties.push('invalid value for "app_name", app_name cannot be nil.')
|
121
|
+
end
|
122
|
+
|
123
|
+
invalid_properties
|
124
|
+
end
|
125
|
+
|
126
|
+
# Check to see if the all the properties in the model are valid
|
127
|
+
# @return true if the model is valid
|
128
|
+
def valid?
|
129
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
130
|
+
return false if @app_id.nil?
|
131
|
+
return false if @name.nil?
|
132
|
+
return false if @id.nil?
|
133
|
+
return false if @app_name.nil?
|
134
|
+
true
|
135
|
+
end
|
136
|
+
|
137
|
+
# Checks equality by comparing each attribute.
|
138
|
+
# @param [Object] Object to be compared
|
139
|
+
def ==(o)
|
140
|
+
return true if self.equal?(o)
|
141
|
+
self.class == o.class &&
|
142
|
+
app_id == o.app_id &&
|
143
|
+
name == o.name &&
|
144
|
+
id == o.id &&
|
145
|
+
app_name == o.app_name
|
146
|
+
end
|
147
|
+
|
148
|
+
# @see the `==` method
|
149
|
+
# @param [Object] Object to be compared
|
150
|
+
def eql?(o)
|
151
|
+
self == o
|
152
|
+
end
|
153
|
+
|
154
|
+
# Calculates hash code according to all attributes.
|
155
|
+
# @return [Integer] Hash code
|
156
|
+
def hash
|
157
|
+
[app_id, name, id, app_name].hash
|
158
|
+
end
|
159
|
+
|
160
|
+
# Builds the object from hash
|
161
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
162
|
+
# @return [Object] Returns the model itself
|
163
|
+
def self.build_from_hash(attributes)
|
164
|
+
return nil unless attributes.is_a?(Hash)
|
165
|
+
attributes = attributes.transform_keys(&:to_sym)
|
166
|
+
transformed_hash = {}
|
167
|
+
openapi_types.each_pair do |key, type|
|
168
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
169
|
+
transformed_hash["#{key}"] = nil
|
170
|
+
elsif type =~ /\AArray<(.*)>/i
|
171
|
+
# check to ensure the input is an array given that the attribute
|
172
|
+
# is documented as an array but the input is not
|
173
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
174
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
175
|
+
end
|
176
|
+
elsif !attributes[attribute_map[key]].nil?
|
177
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
178
|
+
end
|
179
|
+
end
|
180
|
+
new(transformed_hash)
|
181
|
+
end
|
182
|
+
|
183
|
+
# Deserializes the data based on type
|
184
|
+
# @param string type Data type
|
185
|
+
# @param string value Value to be deserialized
|
186
|
+
# @return [Object] Deserialized data
|
187
|
+
def self._deserialize(type, value)
|
188
|
+
case type.to_sym
|
189
|
+
when :Time
|
190
|
+
Time.parse(value)
|
191
|
+
when :Date
|
192
|
+
Date.parse(value)
|
193
|
+
when :String
|
194
|
+
value.to_s
|
195
|
+
when :Integer
|
196
|
+
value.to_i
|
197
|
+
when :Float
|
198
|
+
value.to_f
|
199
|
+
when :Boolean
|
200
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
201
|
+
true
|
202
|
+
else
|
203
|
+
false
|
204
|
+
end
|
205
|
+
when :Object
|
206
|
+
# generic object (usually a Hash), return directly
|
207
|
+
value
|
208
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
209
|
+
inner_type = Regexp.last_match[:inner_type]
|
210
|
+
value.map { |v| _deserialize(inner_type, v) }
|
211
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
212
|
+
k_type = Regexp.last_match[:k_type]
|
213
|
+
v_type = Regexp.last_match[:v_type]
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each do |k, v|
|
216
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
217
|
+
end
|
218
|
+
end
|
219
|
+
else # model
|
220
|
+
# models (e.g. Pet) or oneOf
|
221
|
+
klass = MoneyKit.const_get(type)
|
222
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
# Returns the string representation of the object
|
227
|
+
# @return [String] String presentation of the object
|
228
|
+
def to_s
|
229
|
+
to_hash.to_s
|
230
|
+
end
|
231
|
+
|
232
|
+
# to_body is an alias to to_hash (backward compatibility)
|
233
|
+
# @return [Hash] Returns the object in the form of hash
|
234
|
+
def to_body
|
235
|
+
to_hash
|
236
|
+
end
|
237
|
+
|
238
|
+
# Returns the object in the form of hash
|
239
|
+
# @return [Hash] Returns the object in the form of hash
|
240
|
+
def to_hash
|
241
|
+
hash = {}
|
242
|
+
self.class.attribute_map.each_pair do |attr, param|
|
243
|
+
value = self.send(attr)
|
244
|
+
if value.nil?
|
245
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
246
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
247
|
+
end
|
248
|
+
|
249
|
+
hash[param] = _to_hash(value)
|
250
|
+
end
|
251
|
+
hash
|
252
|
+
end
|
253
|
+
|
254
|
+
# Outputs non-array value in the form of hash
|
255
|
+
# For object, use to_hash. Otherwise, just return the value
|
256
|
+
# @param [Object] value Any valid value
|
257
|
+
# @return [Hash] Returns the value in the form of hash
|
258
|
+
def _to_hash(value)
|
259
|
+
if value.is_a?(Array)
|
260
|
+
value.compact.map { |v| _to_hash(v) }
|
261
|
+
elsif value.is_a?(Hash)
|
262
|
+
{}.tap do |hash|
|
263
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
264
|
+
end
|
265
|
+
elsif value.respond_to? :to_hash
|
266
|
+
value.to_hash
|
267
|
+
else
|
268
|
+
value
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
272
|
+
end
|
@@ -19,13 +19,13 @@ module MoneyKit
|
|
19
19
|
|
20
20
|
attr_accessor :customer_user
|
21
21
|
|
22
|
-
# Supply the existing `link_id` if you are asking the user to reconnect this link. <p>When reconnecting, if new accounts are discovered they will be presented to the user so permission to access them can be granted (or denied). Access to previously permitted accounts is not revokable at this point. <p>If necessary, MoneyKit may attempt to reconnect the account using a different provider than the link was originally connected through. The change in provider is generally seamless. MoneyKit normalizes incoming data to minimize provider-specific differences, and we deduplicate new transactions, so data continuity is generally assured; however, small discrepancies can still occur. <p>A reconnection cannot change the institution, the customer_user.id,
|
22
|
+
# Supply the existing `link_id` if you are asking the user to reconnect or modify this link. <p>When reconnecting, if new accounts are discovered they will be presented to the user so permission to access them can be granted (or denied). Access to previously permitted accounts is not revokable at this point. <p>If necessary, MoneyKit may attempt to reconnect the account using a different provider than the link was originally connected through. The change in provider is generally seamless. MoneyKit normalizes incoming data to minimize provider-specific differences, and we deduplicate new transactions, so data continuity is generally assured; however, small discrepancies can still occur. <p>A reconnection cannot change the institution, the customer_user.id, or the country for an existing link. These parameters will be silently ignored if `existing_link_id` is supplied. <p>New products can be added to an existing link. The user will be asked for permission for any added products. Existing product settings, however, cannot be changed and will be silently ignored. <p>The `webhook` for an existing link **can** be changed, and the existing webhook will be **removed** if the `webhook` parameter is omitted, so you should supply the `webhook` URL if you want to receive webhook events for the reconnected link. <p>Similarly, a reconnected link will be assigned whatever `link_tags` are supplied, and existing tags will be removed if `link_tags` is omitted, so you should supply the `link_tags` you want the link to have, if any.
|
23
23
|
attr_accessor :existing_link_id
|
24
24
|
|
25
25
|
# The ID of the institution you want to link to. Providing this will skip the institution selection step. This field is ignored if `existing_link_id` is provided.
|
26
26
|
attr_accessor :institution_id
|
27
27
|
|
28
|
-
# For Oauth linking, a URI indicating the destination, in your application, where the user should be sent after authenticating with the institution. The `redirect_uri` should not contain any query parameters, and it must be pre-approved by MoneyKit during the
|
28
|
+
# For Oauth linking, a URI indicating the destination, in your application, where the user should be sent after authenticating with the institution. The `redirect_uri` should not contain any query parameters, and it must be pre-approved by MoneyKit during the app setup process.
|
29
29
|
attr_accessor :redirect_uri
|
30
30
|
|
31
31
|
# The destination URL to which any webhooks should be sent.
|