moneykit 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/moneykit/api/access_token_api.rb +53 -55
- data/lib/moneykit/api/account_numbers_api.rb +24 -24
- data/lib/moneykit/api/accounts_api.rb +86 -80
- data/lib/moneykit/api/identity_api.rb +29 -28
- data/lib/moneykit/api/institutions_api.rb +50 -48
- data/lib/moneykit/api/link_session_api.rb +47 -50
- data/lib/moneykit/api/links_api.rb +74 -81
- data/lib/moneykit/api/products_api.rb +31 -33
- data/lib/moneykit/api/transactions_api.rb +112 -87
- data/lib/moneykit/api/users_api.rb +96 -79
- data/lib/moneykit/api_client.rb +64 -71
- data/lib/moneykit/api_error.rb +14 -16
- data/lib/moneykit/configuration.rb +42 -45
- data/lib/moneykit/models/account.rb +62 -78
- data/lib/moneykit/models/account_balances.rb +58 -63
- data/lib/moneykit/models/account_group.rb +47 -47
- data/lib/moneykit/models/account_identity.rb +69 -89
- data/lib/moneykit/models/account_numbers.rb +50 -49
- data/lib/moneykit/models/account_numbers_link_product.rb +52 -54
- data/lib/moneykit/models/account_numbers_product_settings.rb +49 -48
- data/lib/moneykit/models/account_type.rb +23 -23
- data/lib/moneykit/models/account_with_account_numbers.rb +68 -89
- data/lib/moneykit/models/accounts_link_product.rb +46 -46
- data/lib/moneykit/models/ach_number.rb +48 -49
- data/lib/moneykit/models/address.rb +66 -75
- data/lib/moneykit/models/api_error_auth_expired_access_token_response.rb +63 -62
- data/lib/moneykit/models/api_error_auth_unauthorized_response.rb +60 -62
- data/lib/moneykit/models/api_error_rate_limit_exceeded_response.rb +63 -62
- data/lib/moneykit/models/app.rb +46 -50
- data/lib/moneykit/models/bacs_number.rb +45 -46
- data/lib/moneykit/models/balances.rb +58 -64
- data/lib/moneykit/models/basic_account_details.rb +55 -61
- data/lib/moneykit/models/country.rb +13 -14
- data/lib/moneykit/models/create_link_session_request.rb +83 -96
- data/lib/moneykit/models/create_link_session_response.rb +40 -37
- data/lib/moneykit/models/currency.rb +193 -193
- data/lib/moneykit/models/cursor.rb +40 -39
- data/lib/moneykit/models/cursor_pagination.rb +40 -38
- data/lib/moneykit/models/cursors.rb +40 -39
- data/lib/moneykit/models/customer_app.rb +46 -49
- data/lib/moneykit/models/customer_user.rb +59 -69
- data/lib/moneykit/models/eft_number.rb +48 -52
- data/lib/moneykit/models/email.rb +46 -48
- data/lib/moneykit/models/email1.rb +50 -53
- data/lib/moneykit/models/exchange_token_request.rb +40 -37
- data/lib/moneykit/models/exchange_token_response.rb +46 -49
- data/lib/moneykit/models/generate_access_token_response.rb +51 -58
- data/lib/moneykit/models/get_account_numbers_response.rb +48 -53
- data/lib/moneykit/models/get_account_response.rb +47 -52
- data/lib/moneykit/models/get_accounts_response.rb +47 -50
- data/lib/moneykit/models/get_institutions_response.rb +47 -50
- data/lib/moneykit/models/get_transactions_response.rb +68 -87
- data/lib/moneykit/models/get_user_accounts_response.rb +42 -42
- data/lib/moneykit/models/get_user_links_response.rb +42 -42
- data/lib/moneykit/models/get_user_transactions_response.rb +64 -82
- data/lib/moneykit/models/http_validation_error.rb +68 -71
- data/lib/moneykit/models/identity.rb +49 -49
- data/lib/moneykit/models/identity_link_product.rb +52 -54
- data/lib/moneykit/models/identity_product_settings.rb +49 -48
- data/lib/moneykit/models/identity_response.rb +47 -50
- data/lib/moneykit/models/institution.rb +77 -96
- data/lib/moneykit/models/institution_error_not_found_response.rb +63 -64
- data/lib/moneykit/models/institution_styling_response.rb +77 -93
- data/lib/moneykit/models/international_number.rb +46 -49
- data/lib/moneykit/models/introspect_client_response.rb +61 -73
- data/lib/moneykit/models/jwk_set.rb +41 -42
- data/lib/moneykit/models/link.rb +78 -100
- data/lib/moneykit/models/link1.rb +78 -100
- data/lib/moneykit/models/link2.rb +78 -100
- data/lib/moneykit/models/link3.rb +78 -100
- data/lib/moneykit/models/link4.rb +78 -100
- data/lib/moneykit/models/link_common.rb +78 -99
- data/lib/moneykit/models/link_error.rb +19 -19
- data/lib/moneykit/models/link_error_bad_state_response.rb +64 -72
- data/lib/moneykit/models/link_error_deleted_response.rb +63 -64
- data/lib/moneykit/models/link_error_forbidden_action_response.rb +60 -62
- data/lib/moneykit/models/link_error_not_found_response.rb +63 -64
- data/lib/moneykit/models/link_error_unauthorized_access_response.rb +63 -64
- data/lib/moneykit/models/link_permission_scope.rb +14 -15
- data/lib/moneykit/models/link_permissions.rb +43 -43
- data/lib/moneykit/models/link_products.rb +52 -63
- data/lib/moneykit/models/link_response.rb +90 -118
- data/lib/moneykit/models/link_session_customer_user.rb +58 -68
- data/lib/moneykit/models/link_session_customer_user_email.rb +50 -52
- data/lib/moneykit/models/link_session_customer_user_phone.rb +60 -67
- data/lib/moneykit/models/link_session_error_forbidden_config_response.rb +60 -62
- data/lib/moneykit/models/link_session_error_invalid_token_exchange.rb +60 -62
- data/lib/moneykit/models/link_session_setting_overrides.rb +61 -72
- data/lib/moneykit/models/link_state.rb +15 -16
- data/lib/moneykit/models/link_state_changed_webhook.rb +110 -134
- data/lib/moneykit/models/location_inner.rb +41 -46
- data/lib/moneykit/models/money_kit_env.rb +12 -13
- data/lib/moneykit/models/money_link_features.rb +49 -48
- data/lib/moneykit/models/moneylink_features.rb +50 -49
- data/lib/moneykit/models/numbers.rb +60 -73
- data/lib/moneykit/models/owner.rb +59 -72
- data/lib/moneykit/models/phone.rb +60 -68
- data/lib/moneykit/models/phone_number.rb +55 -59
- data/lib/moneykit/models/phone_number_type.rb +14 -15
- data/lib/moneykit/models/product.rb +14 -15
- data/lib/moneykit/models/products.rb +52 -64
- data/lib/moneykit/models/products1.rb +48 -56
- data/lib/moneykit/models/products_settings.rb +48 -55
- data/lib/moneykit/models/provider.rb +15 -16
- data/lib/moneykit/models/refresh_products_request.rb +43 -45
- data/lib/moneykit/models/requested_link_permission.rb +52 -60
- data/lib/moneykit/models/response401_disconnect_links_id_delete.rb +71 -77
- data/lib/moneykit/models/response401_exchange_token_link_session_exchange_token_post.rb +66 -72
- data/lib/moneykit/models/response401_get_account_links_id_accounts_account_id_get.rb +71 -77
- data/lib/moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.rb +71 -77
- data/lib/moneykit/models/response401_get_accounts_links_id_accounts_get.rb +71 -77
- data/lib/moneykit/models/response401_get_identities_links_id_identity_get.rb +71 -77
- data/lib/moneykit/models/response401_get_institution_institutions_institution_id_get.rb +66 -72
- data/lib/moneykit/models/response401_get_institution_styling_institutions_institution_id_styling_get.rb +66 -72
- data/lib/moneykit/models/response401_get_institutions_institutions_get.rb +66 -72
- data/lib/moneykit/models/response401_get_link_links_id_get.rb +71 -77
- data/lib/moneykit/models/response401_get_transactions_diff_links_id_transactions_sync_get.rb +71 -77
- data/lib/moneykit/models/response401_get_transactions_links_id_transactions_get.rb +71 -77
- data/lib/moneykit/models/response401_get_user_accounts_users_id_accounts_get.rb +66 -72
- data/lib/moneykit/models/response401_get_user_links_users_id_links_get.rb +66 -72
- data/lib/moneykit/models/response401_get_user_transactions_users_id_transactions_get.rb +66 -72
- data/lib/moneykit/models/response401_get_well_known_jwks_well_known_jwks_json_get.rb +66 -72
- data/lib/moneykit/models/response401_instrospect_client_auth_introspect_get.rb +66 -72
- data/lib/moneykit/models/response401_refresh_products_links_id_products_post.rb +71 -77
- data/lib/moneykit/models/response401_update_link_links_id_patch.rb +71 -77
- data/lib/moneykit/models/settings.rb +61 -73
- data/lib/moneykit/models/supported_version.rb +11 -12
- data/lib/moneykit/models/transaction.rb +87 -114
- data/lib/moneykit/models/transaction_diff.rb +54 -62
- data/lib/moneykit/models/transaction_sync_response.rb +57 -72
- data/lib/moneykit/models/transaction_type.rb +12 -13
- data/lib/moneykit/models/transaction_type_filter.rb +12 -13
- data/lib/moneykit/models/transactions.rb +58 -57
- data/lib/moneykit/models/transactions1.rb +55 -63
- data/lib/moneykit/models/transactions_link_product.rb +52 -54
- data/lib/moneykit/models/transactions_product_settings.rb +57 -56
- data/lib/moneykit/models/update_link_request.rb +53 -52
- data/lib/moneykit/models/user_accounts_out.rb +40 -40
- data/lib/moneykit/models/user_links_out.rb +40 -40
- data/lib/moneykit/models/user_transactions_paged_response.rb +40 -40
- data/lib/moneykit/models/validation_error.rb +53 -64
- data/lib/moneykit/version.rb +10 -12
- data/lib/moneykit.rb +9 -11
- data/lib/plaid_compatible/money_kit_plaid_compatible/api/plaid_api.rb +203 -207
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_client.rb +75 -76
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_error.rb +19 -19
- data/lib/plaid_compatible/money_kit_plaid_compatible/configuration.rb +38 -40
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_balance.rb +59 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_base.rb +71 -87
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_identity.rb +77 -98
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_subtype.rb +85 -86
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_type.rb +18 -19
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request.rb +59 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request_options.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_response.rb +55 -60
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address.rb +49 -47
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address_data.rb +65 -69
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_numbers.rb +63 -73
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request.rb +59 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request_options.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_response.rb +61 -72
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/country_code.rb +15 -16
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/email.rb +49 -50
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/http_validation_error.rb +43 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request.rb +59 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request_options.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_response.rb +55 -60
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institution.rb +65 -71
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_request.rb +60 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_response.rb +49 -50
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item.rb +85 -96
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_error_webhook.rb +65 -77
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_request.rb +55 -55
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_response.rb +55 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_request.rb +55 -55
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_response.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_request.rb +55 -55
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_response.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_investments.rb +49 -47
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_last_webhook.rb +50 -48
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_nullable.rb +55 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_transactions.rb +49 -47
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request.rb +100 -121
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request_user.rb +66 -66
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_response.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_ach.rb +59 -65
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_bacs.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_eft.rb +59 -68
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_international.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/owner.rb +63 -73
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/personal_finance_category.rb +49 -50
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/phone_number.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error.rb +88 -103
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error_type.rb +26 -27
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/products.rb +16 -17
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/removed_transaction.rb +43 -39
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transaction.rb +107 -134
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request.rb +69 -79
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request_options.rb +66 -68
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_response.rb +65 -76
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_request.rb +55 -55
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_response.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request.rb +69 -75
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request_options.rb +50 -46
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_response.rb +72 -89
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/validation_error.rb +56 -65
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/webhook_environment_values.rb +15 -16
- data/lib/plaid_compatible/money_kit_plaid_compatible/version.rb +13 -13
- data/lib/plaid_compatible/money_kit_plaid_compatible.rb +12 -12
- data/moneykit.gemspec +21 -25
- metadata +1 -1
@@ -1,14 +1,12 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
1
|
+
# #MoneyKit API
|
2
|
+
#
|
3
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
#
|
5
|
+
# The version of the OpenAPI document: 0.1.0
|
6
|
+
#
|
7
|
+
# Generated by: https://openapi-generator.tech
|
8
|
+
# OpenAPI Generator version: 6.5.0
|
9
|
+
#
|
12
10
|
|
13
11
|
module MoneyKit
|
14
12
|
class Configuration
|
@@ -142,10 +140,7 @@ module MoneyKit
|
|
142
140
|
# https://github.com/lostisland/faraday/tree/main/lib/faraday/encoders
|
143
141
|
attr_accessor :params_encoder
|
144
142
|
|
145
|
-
|
146
|
-
attr_accessor :inject_format
|
147
|
-
|
148
|
-
attr_accessor :force_ending_format
|
143
|
+
attr_accessor :inject_format, :force_ending_format
|
149
144
|
|
150
145
|
def initialize
|
151
146
|
@scheme = 'https'
|
@@ -188,26 +183,27 @@ module MoneyKit
|
|
188
183
|
|
189
184
|
def scheme=(scheme)
|
190
185
|
# remove :// from scheme
|
191
|
-
@scheme = scheme.sub(
|
186
|
+
@scheme = scheme.sub(%r{://}, '')
|
192
187
|
end
|
193
188
|
|
194
189
|
def host=(host)
|
195
190
|
# remove http(s):// and anything after a slash
|
196
|
-
@host = host.sub(
|
191
|
+
@host = host.sub(%r{https?://}, '').split('/').first
|
197
192
|
end
|
198
193
|
|
199
194
|
def base_path=(base_path)
|
200
195
|
# Add leading and trailing slashes to base_path
|
201
|
-
@base_path = "/#{base_path}".gsub(
|
196
|
+
@base_path = "/#{base_path}".gsub(%r{/+}, '/')
|
202
197
|
@base_path = '' if @base_path == '/'
|
203
198
|
end
|
204
199
|
|
205
200
|
# Returns base URL for specified operation based on server settings
|
206
201
|
def base_url(operation = nil)
|
207
202
|
index = server_operation_index.fetch(operation, server_index)
|
208
|
-
return "#{scheme}://#{[host, base_path].join('/').gsub(
|
203
|
+
return "#{scheme}://#{[host, base_path].join('/').gsub(%r{/+}, '/')}".sub(%r{/+\z}, '') if index.nil?
|
209
204
|
|
210
|
-
server_url(index, server_operation_variables.fetch(operation, server_variables),
|
205
|
+
server_url(index, server_operation_variables.fetch(operation, server_variables),
|
206
|
+
operation_server_settings[operation])
|
211
207
|
end
|
212
208
|
|
213
209
|
# Gets API key (with prefix if set).
|
@@ -224,8 +220,9 @@ module MoneyKit
|
|
224
220
|
|
225
221
|
# Gets access_token using access_token_getter or uses the static access_token
|
226
222
|
def access_token_with_refresh
|
227
|
-
|
228
|
-
|
223
|
+
return access_token if access_token_getter.nil?
|
224
|
+
|
225
|
+
access_token_getter.call
|
229
226
|
end
|
230
227
|
|
231
228
|
# Gets Basic Auth token string
|
@@ -263,7 +260,7 @@ module MoneyKit
|
|
263
260
|
in: 'header',
|
264
261
|
key: 'Authorization',
|
265
262
|
value: basic_auth_token
|
266
|
-
}
|
263
|
+
}
|
267
264
|
}
|
268
265
|
end
|
269
266
|
|
@@ -271,19 +268,18 @@ module MoneyKit
|
|
271
268
|
def server_settings
|
272
269
|
[
|
273
270
|
{
|
274
|
-
url:
|
275
|
-
description:
|
271
|
+
url: 'https://production.moneykit.com',
|
272
|
+
description: 'MoneyKit production environment (Live institution data)'
|
276
273
|
},
|
277
274
|
{
|
278
|
-
url:
|
279
|
-
description:
|
275
|
+
url: 'https://sandbox.moneykit.com',
|
276
|
+
description: 'MoneyKit sandbox environment (Unrestricted environment with fake institution data)'
|
280
277
|
}
|
281
278
|
]
|
282
279
|
end
|
283
280
|
|
284
281
|
def operation_server_settings
|
285
|
-
{
|
286
|
-
}
|
282
|
+
{}
|
287
283
|
end
|
288
284
|
|
289
285
|
# Returns URL based on server settings
|
@@ -291,11 +287,11 @@ module MoneyKit
|
|
291
287
|
# @param index array index of the server settings
|
292
288
|
# @param variables hash of variable and the corresponding value
|
293
289
|
def server_url(index, variables = {}, servers = nil)
|
294
|
-
servers = server_settings if servers
|
290
|
+
servers = server_settings if servers.nil?
|
295
291
|
|
296
292
|
# check array index out of bound
|
297
|
-
if
|
298
|
-
|
293
|
+
if index < 0 || index >= servers.size
|
294
|
+
raise ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
|
299
295
|
end
|
300
296
|
|
301
297
|
server = servers[index]
|
@@ -304,16 +300,17 @@ module MoneyKit
|
|
304
300
|
return url unless server.key? :variables
|
305
301
|
|
306
302
|
# go through variable and assign a value
|
307
|
-
server[:variables].each do |name,
|
303
|
+
server[:variables].each do |name, _variable|
|
308
304
|
if variables.key?(name)
|
309
|
-
if
|
310
|
-
url.gsub!
|
305
|
+
if !server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name])
|
306
|
+
url.gsub! '{' + name.to_s + '}', variables[name]
|
311
307
|
else
|
312
|
-
|
308
|
+
raise ArgumentError,
|
309
|
+
"The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
|
313
310
|
end
|
314
311
|
else
|
315
312
|
# use default value
|
316
|
-
url.gsub!
|
313
|
+
url.gsub! '{' + name.to_s + '}', server[:variables][name][:default_value]
|
317
314
|
end
|
318
315
|
end
|
319
316
|
|
@@ -373,9 +370,9 @@ module MoneyKit
|
|
373
370
|
#
|
374
371
|
# @see https://github.com/lostisland/faraday/blob/v2.3.0/lib/faraday/rack_builder.rb#L92-L143
|
375
372
|
def set_faraday_middleware(operation, key, *args, &block)
|
376
|
-
unless [
|
377
|
-
|
378
|
-
|
373
|
+
unless %i[request response use insert insert_before insert_after swap delete].include?(operation)
|
374
|
+
raise ArgumentError, "Invalid faraday middleware operation #{operation}. Must be" \
|
375
|
+
' :request, :response, :use, :insert, :insert_before, :insert_after, :swap or :delete.'
|
379
376
|
end
|
380
377
|
|
381
378
|
@middlewares[operation] << [key, args, block]
|
@@ -386,7 +383,7 @@ module MoneyKit
|
|
386
383
|
def configure_middleware(connection)
|
387
384
|
return if @middlewares.empty?
|
388
385
|
|
389
|
-
[
|
386
|
+
%i[request response use insert insert_before insert_after swap].each do |operation|
|
390
387
|
next unless @middlewares.key?(operation)
|
391
388
|
|
392
389
|
@middlewares[operation].each do |key, args, block|
|
@@ -394,10 +391,10 @@ module MoneyKit
|
|
394
391
|
end
|
395
392
|
end
|
396
393
|
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
394
|
+
return unless @middlewares.key?(:delete)
|
395
|
+
|
396
|
+
@middlewares[:delete].each do |key, _args, _block|
|
397
|
+
connection.builder.delete(key)
|
401
398
|
end
|
402
399
|
end
|
403
400
|
end
|
@@ -1,14 +1,12 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
1
|
+
# #MoneyKit API
|
2
|
+
#
|
3
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
#
|
5
|
+
# The version of the OpenAPI document: 0.1.0
|
6
|
+
#
|
7
|
+
# Generated by: https://openapi-generator.tech
|
8
|
+
# OpenAPI Generator version: 6.5.0
|
9
|
+
#
|
12
10
|
|
13
11
|
require 'date'
|
14
12
|
require 'time'
|
@@ -18,7 +16,7 @@ module MoneyKit
|
|
18
16
|
# MoneyKit's unique ID for the account. <p>The `account_id` is distinct from the institution's account number. For accounts that may change account numbers from time to time, such as credit cards, MoneyKit attempts to keep the `account_id` constant. However, if MoneyKit can't reconcile the new account data with the old data, the `account_id` may change.
|
19
17
|
attr_accessor :account_id
|
20
18
|
|
21
|
-
attr_accessor :account_type
|
19
|
+
attr_accessor :account_type, :balances
|
22
20
|
|
23
21
|
# The account name, according to the institution. Note that some institutions allow the end user to nickname the account; in such cases this field may be the name assigned by the user
|
24
22
|
attr_accessor :name
|
@@ -26,11 +24,8 @@ module MoneyKit
|
|
26
24
|
# The last four characters (usually digits) of the account number. Note that this mask may be non-unique between accounts.
|
27
25
|
attr_accessor :account_mask
|
28
26
|
|
29
|
-
attr_accessor :balances
|
30
|
-
|
31
27
|
class EnumAttributeValidator
|
32
|
-
attr_reader :datatype
|
33
|
-
attr_reader :allowable_values
|
28
|
+
attr_reader :datatype, :allowable_values
|
34
29
|
|
35
30
|
def initialize(datatype, allowable_values)
|
36
31
|
@allowable_values = allowable_values.map do |value|
|
@@ -53,11 +48,11 @@ module MoneyKit
|
|
53
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
49
|
def self.attribute_map
|
55
50
|
{
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
51
|
+
'account_id': :account_id,
|
52
|
+
'account_type': :account_type,
|
53
|
+
'name': :name,
|
54
|
+
'account_mask': :account_mask,
|
55
|
+
'balances': :balances
|
61
56
|
}
|
62
57
|
end
|
63
58
|
|
@@ -69,76 +64,62 @@ module MoneyKit
|
|
69
64
|
# Attribute type mapping.
|
70
65
|
def self.openapi_types
|
71
66
|
{
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
67
|
+
'account_id': :String,
|
68
|
+
'account_type': :AccountType,
|
69
|
+
'name': :String,
|
70
|
+
'account_mask': :String,
|
71
|
+
'balances': :Balances
|
77
72
|
}
|
78
73
|
end
|
79
74
|
|
80
75
|
# List of attributes with nullable: true
|
81
76
|
def self.openapi_nullable
|
82
77
|
Set.new([
|
83
|
-
|
84
|
-
|
78
|
+
:account_mask
|
79
|
+
])
|
85
80
|
end
|
86
81
|
|
87
82
|
# Initializes the object
|
88
83
|
# @param [Hash] attributes Model attributes in the form of hash
|
89
84
|
def initialize(attributes = {})
|
90
|
-
|
91
|
-
|
85
|
+
unless attributes.is_a?(Hash)
|
86
|
+
raise ArgumentError, 'The input argument (attributes) must be a hash in `MoneyKit::Account` initialize method'
|
92
87
|
end
|
93
88
|
|
94
89
|
# check to see if the attribute exists and convert string to symbol for hash key
|
95
|
-
attributes = attributes.each_with_object({})
|
96
|
-
|
97
|
-
|
90
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
91
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
92
|
+
raise ArgumentError,
|
93
|
+
"`#{k}` is not a valid attribute in `MoneyKit::Account`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
98
94
|
end
|
99
|
-
h[k.to_sym] = v
|
100
|
-
}
|
101
95
|
|
102
|
-
|
103
|
-
self.account_id = attributes[:'account_id']
|
96
|
+
h[k.to_sym] = v
|
104
97
|
end
|
105
98
|
|
106
|
-
if attributes.key?(:
|
107
|
-
self.account_type = attributes[:'account_type']
|
108
|
-
end
|
99
|
+
self.account_id = attributes[:account_id] if attributes.key?(:account_id)
|
109
100
|
|
110
|
-
if attributes.key?(:
|
111
|
-
self.name = attributes[:'name']
|
112
|
-
end
|
101
|
+
self.account_type = attributes[:account_type] if attributes.key?(:account_type)
|
113
102
|
|
114
|
-
if attributes.key?(:
|
115
|
-
self.account_mask = attributes[:'account_mask']
|
116
|
-
end
|
103
|
+
self.name = attributes[:name] if attributes.key?(:name)
|
117
104
|
|
118
|
-
if attributes.key?(:
|
119
|
-
|
120
|
-
|
105
|
+
self.account_mask = attributes[:account_mask] if attributes.key?(:account_mask)
|
106
|
+
|
107
|
+
return unless attributes.key?(:balances)
|
108
|
+
|
109
|
+
self.balances = attributes[:balances]
|
121
110
|
end
|
122
111
|
|
123
112
|
# Show invalid properties with the reasons. Usually used together with valid?
|
124
113
|
# @return Array for valid properties with the reasons
|
125
114
|
def list_invalid_properties
|
126
|
-
invalid_properties =
|
127
|
-
if @account_id.nil?
|
128
|
-
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
129
|
-
end
|
115
|
+
invalid_properties = []
|
116
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') if @account_id.nil?
|
130
117
|
|
131
|
-
if @account_type.nil?
|
132
|
-
invalid_properties.push('invalid value for "account_type", account_type cannot be nil.')
|
133
|
-
end
|
118
|
+
invalid_properties.push('invalid value for "account_type", account_type cannot be nil.') if @account_type.nil?
|
134
119
|
|
135
|
-
if @name.nil?
|
136
|
-
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
137
|
-
end
|
120
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.') if @name.nil?
|
138
121
|
|
139
|
-
if @balances.nil?
|
140
|
-
invalid_properties.push('invalid value for "balances", balances cannot be nil.')
|
141
|
-
end
|
122
|
+
invalid_properties.push('invalid value for "balances", balances cannot be nil.') if @balances.nil?
|
142
123
|
|
143
124
|
invalid_properties
|
144
125
|
end
|
@@ -150,25 +131,27 @@ module MoneyKit
|
|
150
131
|
return false if @account_type.nil?
|
151
132
|
return false if @name.nil?
|
152
133
|
return false if @balances.nil?
|
134
|
+
|
153
135
|
true
|
154
136
|
end
|
155
137
|
|
156
138
|
# Checks equality by comparing each attribute.
|
157
139
|
# @param [Object] Object to be compared
|
158
|
-
def ==(
|
159
|
-
return true if
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
140
|
+
def ==(other)
|
141
|
+
return true if equal?(other)
|
142
|
+
|
143
|
+
self.class == other.class &&
|
144
|
+
account_id == other.account_id &&
|
145
|
+
account_type == other.account_type &&
|
146
|
+
name == other.name &&
|
147
|
+
account_mask == other.account_mask &&
|
148
|
+
balances == other.balances
|
166
149
|
end
|
167
150
|
|
168
151
|
# @see the `==` method
|
169
152
|
# @param [Object] Object to be compared
|
170
|
-
def eql?(
|
171
|
-
self ==
|
153
|
+
def eql?(other)
|
154
|
+
self == other
|
172
155
|
end
|
173
156
|
|
174
157
|
# Calculates hash code according to all attributes.
|
@@ -189,18 +172,21 @@ module MoneyKit
|
|
189
172
|
# @return [Object] Returns the model itself
|
190
173
|
def build_from_hash(attributes)
|
191
174
|
return nil unless attributes.is_a?(Hash)
|
175
|
+
|
192
176
|
attributes = attributes.transform_keys(&:to_sym)
|
193
177
|
self.class.openapi_types.each_pair do |key, type|
|
194
178
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
195
|
-
|
179
|
+
send("#{key}=", nil)
|
196
180
|
elsif type =~ /\AArray<(.*)>/i
|
197
181
|
# check to ensure the input is an array given that the attribute
|
198
182
|
# is documented as an array but the input is not
|
199
183
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
200
|
-
|
184
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
185
|
+
_deserialize(::Regexp.last_match(1), v)
|
186
|
+
end)
|
201
187
|
end
|
202
188
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
203
|
-
|
189
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
204
190
|
end
|
205
191
|
end
|
206
192
|
|
@@ -267,7 +253,7 @@ module MoneyKit
|
|
267
253
|
def to_hash
|
268
254
|
hash = {}
|
269
255
|
self.class.attribute_map.each_pair do |attr, param|
|
270
|
-
value =
|
256
|
+
value = send(attr)
|
271
257
|
if value.nil?
|
272
258
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
273
259
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -295,7 +281,5 @@ module MoneyKit
|
|
295
281
|
value
|
296
282
|
end
|
297
283
|
end
|
298
|
-
|
299
284
|
end
|
300
|
-
|
301
285
|
end
|
@@ -1,14 +1,12 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
1
|
+
# #MoneyKit API
|
2
|
+
#
|
3
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
#
|
5
|
+
# The version of the OpenAPI document: 0.1.0
|
6
|
+
#
|
7
|
+
# Generated by: https://openapi-generator.tech
|
8
|
+
# OpenAPI Generator version: 6.5.0
|
9
|
+
#
|
12
10
|
|
13
11
|
require 'date'
|
14
12
|
require 'time'
|
@@ -27,8 +25,7 @@ module MoneyKit
|
|
27
25
|
attr_accessor :limit
|
28
26
|
|
29
27
|
class EnumAttributeValidator
|
30
|
-
attr_reader :datatype
|
31
|
-
attr_reader :allowable_values
|
28
|
+
attr_reader :datatype, :allowable_values
|
32
29
|
|
33
30
|
def initialize(datatype, allowable_values)
|
34
31
|
@allowable_values = allowable_values.map do |value|
|
@@ -51,10 +48,10 @@ module MoneyKit
|
|
51
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
52
49
|
def self.attribute_map
|
53
50
|
{
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
51
|
+
'currency': :currency,
|
52
|
+
'available': :available,
|
53
|
+
'current': :current,
|
54
|
+
'limit': :limit
|
58
55
|
}
|
59
56
|
end
|
60
57
|
|
@@ -66,61 +63,56 @@ module MoneyKit
|
|
66
63
|
# Attribute type mapping.
|
67
64
|
def self.openapi_types
|
68
65
|
{
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
66
|
+
'currency': :Currency,
|
67
|
+
'available': :Float,
|
68
|
+
'current': :Float,
|
69
|
+
'limit': :Float
|
73
70
|
}
|
74
71
|
end
|
75
72
|
|
76
73
|
# List of attributes with nullable: true
|
77
74
|
def self.openapi_nullable
|
78
|
-
Set.new([
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
75
|
+
Set.new(%i[
|
76
|
+
available
|
77
|
+
current
|
78
|
+
limit
|
79
|
+
])
|
83
80
|
end
|
84
81
|
|
85
82
|
# Initializes the object
|
86
83
|
# @param [Hash] attributes Model attributes in the form of hash
|
87
84
|
def initialize(attributes = {})
|
88
|
-
|
89
|
-
|
85
|
+
unless attributes.is_a?(Hash)
|
86
|
+
raise ArgumentError,
|
87
|
+
'The input argument (attributes) must be a hash in `MoneyKit::AccountBalances` initialize method'
|
90
88
|
end
|
91
89
|
|
92
90
|
# check to see if the attribute exists and convert string to symbol for hash key
|
93
|
-
attributes = attributes.each_with_object({})
|
94
|
-
|
95
|
-
|
91
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
92
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
93
|
+
raise ArgumentError,
|
94
|
+
"`#{k}` is not a valid attribute in `MoneyKit::AccountBalances`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
96
95
|
end
|
97
|
-
h[k.to_sym] = v
|
98
|
-
}
|
99
96
|
|
100
|
-
|
101
|
-
self.currency = attributes[:'currency']
|
97
|
+
h[k.to_sym] = v
|
102
98
|
end
|
103
99
|
|
104
|
-
if attributes.key?(:
|
105
|
-
self.available = attributes[:'available']
|
106
|
-
end
|
100
|
+
self.currency = attributes[:currency] if attributes.key?(:currency)
|
107
101
|
|
108
|
-
if attributes.key?(:
|
109
|
-
self.current = attributes[:'current']
|
110
|
-
end
|
102
|
+
self.available = attributes[:available] if attributes.key?(:available)
|
111
103
|
|
112
|
-
if attributes.key?(:
|
113
|
-
|
114
|
-
|
104
|
+
self.current = attributes[:current] if attributes.key?(:current)
|
105
|
+
|
106
|
+
return unless attributes.key?(:limit)
|
107
|
+
|
108
|
+
self.limit = attributes[:limit]
|
115
109
|
end
|
116
110
|
|
117
111
|
# Show invalid properties with the reasons. Usually used together with valid?
|
118
112
|
# @return Array for valid properties with the reasons
|
119
113
|
def list_invalid_properties
|
120
|
-
invalid_properties =
|
121
|
-
if @currency.nil?
|
122
|
-
invalid_properties.push('invalid value for "currency", currency cannot be nil.')
|
123
|
-
end
|
114
|
+
invalid_properties = []
|
115
|
+
invalid_properties.push('invalid value for "currency", currency cannot be nil.') if @currency.nil?
|
124
116
|
|
125
117
|
invalid_properties
|
126
118
|
end
|
@@ -129,24 +121,26 @@ module MoneyKit
|
|
129
121
|
# @return true if the model is valid
|
130
122
|
def valid?
|
131
123
|
return false if @currency.nil?
|
124
|
+
|
132
125
|
true
|
133
126
|
end
|
134
127
|
|
135
128
|
# Checks equality by comparing each attribute.
|
136
129
|
# @param [Object] Object to be compared
|
137
|
-
def ==(
|
138
|
-
return true if
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
130
|
+
def ==(other)
|
131
|
+
return true if equal?(other)
|
132
|
+
|
133
|
+
self.class == other.class &&
|
134
|
+
currency == other.currency &&
|
135
|
+
available == other.available &&
|
136
|
+
current == other.current &&
|
137
|
+
limit == other.limit
|
144
138
|
end
|
145
139
|
|
146
140
|
# @see the `==` method
|
147
141
|
# @param [Object] Object to be compared
|
148
|
-
def eql?(
|
149
|
-
self ==
|
142
|
+
def eql?(other)
|
143
|
+
self == other
|
150
144
|
end
|
151
145
|
|
152
146
|
# Calculates hash code according to all attributes.
|
@@ -167,18 +161,21 @@ module MoneyKit
|
|
167
161
|
# @return [Object] Returns the model itself
|
168
162
|
def build_from_hash(attributes)
|
169
163
|
return nil unless attributes.is_a?(Hash)
|
164
|
+
|
170
165
|
attributes = attributes.transform_keys(&:to_sym)
|
171
166
|
self.class.openapi_types.each_pair do |key, type|
|
172
167
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
173
|
-
|
168
|
+
send("#{key}=", nil)
|
174
169
|
elsif type =~ /\AArray<(.*)>/i
|
175
170
|
# check to ensure the input is an array given that the attribute
|
176
171
|
# is documented as an array but the input is not
|
177
172
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
178
|
-
|
173
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
174
|
+
_deserialize(::Regexp.last_match(1), v)
|
175
|
+
end)
|
179
176
|
end
|
180
177
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
181
|
-
|
178
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
182
179
|
end
|
183
180
|
end
|
184
181
|
|
@@ -245,7 +242,7 @@ module MoneyKit
|
|
245
242
|
def to_hash
|
246
243
|
hash = {}
|
247
244
|
self.class.attribute_map.each_pair do |attr, param|
|
248
|
-
value =
|
245
|
+
value = send(attr)
|
249
246
|
if value.nil?
|
250
247
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
251
248
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -273,7 +270,5 @@ module MoneyKit
|
|
273
270
|
value
|
274
271
|
end
|
275
272
|
end
|
276
|
-
|
277
273
|
end
|
278
|
-
|
279
274
|
end
|