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
|
require 'cgi'
|
14
12
|
|
@@ -19,13 +17,14 @@ module MoneyKit
|
|
19
17
|
def initialize(api_client = ApiClient.default)
|
20
18
|
@api_client = api_client
|
21
19
|
end
|
20
|
+
|
22
21
|
# /users/{id}/accounts
|
23
22
|
# Fetches all accounts belonging to a <a href=#operation/get_user_accounts>user</a>.
|
24
23
|
# @param id [String] The unique ID for this user. This is the same ID provided in the call to <a href=#operation/create_link_session>/link-session</a> to create any link for this user.
|
25
24
|
# @param [Hash] opts the optional parameters
|
26
25
|
# @option opts [Array<String>] :account_id If present, filters results to accounts matching the given IDs.
|
27
26
|
# @option opts [Array<String>] :institution_id If present, filters results to accounts at institutions matching the given IDs.
|
28
|
-
# @option opts [SupportedVersion] :moneykit_version
|
27
|
+
# @option opts [SupportedVersion] :moneykit_version
|
29
28
|
# @return [GetUserAccountsResponse]
|
30
29
|
def get_user_accounts(id, opts = {})
|
31
30
|
data, _status_code, _headers = get_user_accounts_with_http_info(id, opts)
|
@@ -38,29 +37,34 @@ module MoneyKit
|
|
38
37
|
# @param [Hash] opts the optional parameters
|
39
38
|
# @option opts [Array<String>] :account_id If present, filters results to accounts matching the given IDs.
|
40
39
|
# @option opts [Array<String>] :institution_id If present, filters results to accounts at institutions matching the given IDs.
|
41
|
-
# @option opts [SupportedVersion] :moneykit_version
|
40
|
+
# @option opts [SupportedVersion] :moneykit_version
|
42
41
|
# @return [Array<(GetUserAccountsResponse, Integer, Hash)>] GetUserAccountsResponse data, response status code and response headers
|
43
42
|
def get_user_accounts_with_http_info(id, opts = {})
|
44
|
-
if @api_client.config.debugging
|
45
|
-
@api_client.config.logger.debug 'Calling API: UsersApi.get_user_accounts ...'
|
46
|
-
end
|
43
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.get_user_accounts ...' if @api_client.config.debugging
|
47
44
|
# verify the required parameter 'id' is set
|
48
45
|
if @api_client.config.client_side_validation && id.nil?
|
49
|
-
|
46
|
+
raise ArgumentError, "Missing the required parameter 'id' when calling UsersApi.get_user_accounts"
|
50
47
|
end
|
48
|
+
|
51
49
|
# resource path
|
52
50
|
local_var_path = '/users/{id}/accounts'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
53
51
|
|
54
52
|
# query parameters
|
55
53
|
query_params = opts[:query_params] || {}
|
56
|
-
|
57
|
-
|
54
|
+
unless opts[:account_id].nil?
|
55
|
+
query_params[:account_id] =
|
56
|
+
@api_client.build_collection_param(opts[:account_id], :multi)
|
57
|
+
end
|
58
|
+
unless opts[:institution_id].nil?
|
59
|
+
query_params[:institution_id] =
|
60
|
+
@api_client.build_collection_param(opts[:institution_id], :multi)
|
61
|
+
end
|
58
62
|
|
59
63
|
# header parameters
|
60
64
|
header_params = opts[:header_params] || {}
|
61
65
|
# HTTP header 'Accept' (if needed)
|
62
66
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
63
|
-
header_params[:'moneykit-version'] = opts[:
|
67
|
+
header_params[:'moneykit-version'] = opts[:moneykit_version] unless opts[:moneykit_version].nil?
|
64
68
|
|
65
69
|
# form parameters
|
66
70
|
form_params = opts[:form_params] || {}
|
@@ -72,30 +76,30 @@ module MoneyKit
|
|
72
76
|
return_type = opts[:debug_return_type] || 'GetUserAccountsResponse'
|
73
77
|
|
74
78
|
# auth_names
|
75
|
-
auth_names = opts[:debug_auth_names] || [
|
79
|
+
auth_names = opts[:debug_auth_names] || %w[clientId OAuth2ClientCredentials clientSecret]
|
76
80
|
|
77
81
|
new_options = opts.merge(
|
78
|
-
:
|
79
|
-
:
|
80
|
-
:
|
81
|
-
:
|
82
|
-
:
|
83
|
-
:
|
84
|
-
:
|
82
|
+
operation: :"UsersApi.get_user_accounts",
|
83
|
+
header_params: header_params,
|
84
|
+
query_params: query_params,
|
85
|
+
form_params: form_params,
|
86
|
+
body: post_body,
|
87
|
+
auth_names: auth_names,
|
88
|
+
return_type: return_type
|
85
89
|
)
|
86
90
|
|
87
91
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
88
92
|
if @api_client.config.debugging
|
89
93
|
@api_client.config.logger.debug "API called: UsersApi#get_user_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
90
94
|
end
|
91
|
-
|
95
|
+
[data, status_code, headers]
|
92
96
|
end
|
93
97
|
|
94
98
|
# /users/{id}/links
|
95
99
|
# Fetches all links belonging to a <a href=#operation/get_user_accounts>user</a>.
|
96
100
|
# @param id [String] The unique ID for this user. This is the same ID provided in the call to <a href=#operation/create_link_session>/link-session</a> to create any link for this user.
|
97
101
|
# @param [Hash] opts the optional parameters
|
98
|
-
# @option opts [SupportedVersion] :moneykit_version
|
102
|
+
# @option opts [SupportedVersion] :moneykit_version
|
99
103
|
# @return [GetUserLinksResponse]
|
100
104
|
def get_user_links(id, opts = {})
|
101
105
|
data, _status_code, _headers = get_user_links_with_http_info(id, opts)
|
@@ -106,16 +110,15 @@ module MoneyKit
|
|
106
110
|
# Fetches all links belonging to a <a href=#operation/get_user_accounts>user</a>.
|
107
111
|
# @param id [String] The unique ID for this user. This is the same ID provided in the call to <a href=#operation/create_link_session>/link-session</a> to create any link for this user.
|
108
112
|
# @param [Hash] opts the optional parameters
|
109
|
-
# @option opts [SupportedVersion] :moneykit_version
|
113
|
+
# @option opts [SupportedVersion] :moneykit_version
|
110
114
|
# @return [Array<(GetUserLinksResponse, Integer, Hash)>] GetUserLinksResponse data, response status code and response headers
|
111
115
|
def get_user_links_with_http_info(id, opts = {})
|
112
|
-
if @api_client.config.debugging
|
113
|
-
@api_client.config.logger.debug 'Calling API: UsersApi.get_user_links ...'
|
114
|
-
end
|
116
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.get_user_links ...' if @api_client.config.debugging
|
115
117
|
# verify the required parameter 'id' is set
|
116
118
|
if @api_client.config.client_side_validation && id.nil?
|
117
|
-
|
119
|
+
raise ArgumentError, "Missing the required parameter 'id' when calling UsersApi.get_user_links"
|
118
120
|
end
|
121
|
+
|
119
122
|
# resource path
|
120
123
|
local_var_path = '/users/{id}/links'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
121
124
|
|
@@ -126,7 +129,7 @@ module MoneyKit
|
|
126
129
|
header_params = opts[:header_params] || {}
|
127
130
|
# HTTP header 'Accept' (if needed)
|
128
131
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
129
|
-
header_params[:'moneykit-version'] = opts[:
|
132
|
+
header_params[:'moneykit-version'] = opts[:moneykit_version] unless opts[:moneykit_version].nil?
|
130
133
|
|
131
134
|
# form parameters
|
132
135
|
form_params = opts[:form_params] || {}
|
@@ -138,38 +141,38 @@ module MoneyKit
|
|
138
141
|
return_type = opts[:debug_return_type] || 'GetUserLinksResponse'
|
139
142
|
|
140
143
|
# auth_names
|
141
|
-
auth_names = opts[:debug_auth_names] || [
|
144
|
+
auth_names = opts[:debug_auth_names] || %w[clientId OAuth2ClientCredentials clientSecret]
|
142
145
|
|
143
146
|
new_options = opts.merge(
|
144
|
-
:
|
145
|
-
:
|
146
|
-
:
|
147
|
-
:
|
148
|
-
:
|
149
|
-
:
|
150
|
-
:
|
147
|
+
operation: :"UsersApi.get_user_links",
|
148
|
+
header_params: header_params,
|
149
|
+
query_params: query_params,
|
150
|
+
form_params: form_params,
|
151
|
+
body: post_body,
|
152
|
+
auth_names: auth_names,
|
153
|
+
return_type: return_type
|
151
154
|
)
|
152
155
|
|
153
156
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
154
157
|
if @api_client.config.debugging
|
155
158
|
@api_client.config.logger.debug "API called: UsersApi#get_user_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
156
159
|
end
|
157
|
-
|
160
|
+
[data, status_code, headers]
|
158
161
|
end
|
159
162
|
|
160
163
|
# /users/{id}/transactions
|
161
164
|
# Fetches transactions for a <a href=#operation/get_user_accounts>user</a>. <p>This endpoint fetches all transactions for a user across all of their links. You can use it to retrieve transactions from any or all accounts at once, regardless of which institution they belong to.
|
162
165
|
# @param id [String] The unique ID for this user. This is the same ID provided in the call to <a href=#operation/create_link_session>/link-session</a> to create any link for this user.
|
163
166
|
# @param [Hash] opts the optional parameters
|
164
|
-
# @option opts [Array<TransactionTypeFilter>] :transaction_type
|
165
|
-
# @option opts [Array<String>] :category
|
167
|
+
# @option opts [Array<TransactionTypeFilter>] :transaction_type
|
168
|
+
# @option opts [Array<String>] :category
|
166
169
|
# @option opts [Array<String>] :account_id If present, filters results to transactions in accounts matching the given IDs.
|
167
170
|
# @option opts [Array<String>] :institution_id If present, filters results to transactions at institutions matching the given IDs.
|
168
171
|
# @option opts [Integer] :page (default to 1)
|
169
172
|
# @option opts [Integer] :size (default to 50)
|
170
173
|
# @option opts [String] :start_date The earliest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to 90 days before the `end_date`. <p>If you want to retrieve **all** transactions, use `1900-01-01`.
|
171
174
|
# @option opts [String] :end_date The latest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to today.
|
172
|
-
# @option opts [SupportedVersion] :moneykit_version
|
175
|
+
# @option opts [SupportedVersion] :moneykit_version
|
173
176
|
# @return [GetUserTransactionsResponse]
|
174
177
|
def get_user_transactions(id, opts = {})
|
175
178
|
data, _status_code, _headers = get_user_transactions_with_http_info(id, opts)
|
@@ -180,34 +183,36 @@ module MoneyKit
|
|
180
183
|
# Fetches transactions for a <a href=#operation/get_user_accounts>user</a>. <p>This endpoint fetches all transactions for a user across all of their links. You can use it to retrieve transactions from any or all accounts at once, regardless of which institution they belong to.
|
181
184
|
# @param id [String] The unique ID for this user. This is the same ID provided in the call to <a href=#operation/create_link_session>/link-session</a> to create any link for this user.
|
182
185
|
# @param [Hash] opts the optional parameters
|
183
|
-
# @option opts [Array<TransactionTypeFilter>] :transaction_type
|
184
|
-
# @option opts [Array<String>] :category
|
186
|
+
# @option opts [Array<TransactionTypeFilter>] :transaction_type
|
187
|
+
# @option opts [Array<String>] :category
|
185
188
|
# @option opts [Array<String>] :account_id If present, filters results to transactions in accounts matching the given IDs.
|
186
189
|
# @option opts [Array<String>] :institution_id If present, filters results to transactions at institutions matching the given IDs.
|
187
190
|
# @option opts [Integer] :page (default to 1)
|
188
191
|
# @option opts [Integer] :size (default to 50)
|
189
192
|
# @option opts [String] :start_date The earliest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to 90 days before the `end_date`. <p>If you want to retrieve **all** transactions, use `1900-01-01`.
|
190
193
|
# @option opts [String] :end_date The latest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to today.
|
191
|
-
# @option opts [SupportedVersion] :moneykit_version
|
194
|
+
# @option opts [SupportedVersion] :moneykit_version
|
192
195
|
# @return [Array<(GetUserTransactionsResponse, Integer, Hash)>] GetUserTransactionsResponse data, response status code and response headers
|
193
196
|
def get_user_transactions_with_http_info(id, opts = {})
|
194
|
-
if @api_client.config.debugging
|
195
|
-
@api_client.config.logger.debug 'Calling API: UsersApi.get_user_transactions ...'
|
196
|
-
end
|
197
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.get_user_transactions ...' if @api_client.config.debugging
|
197
198
|
# verify the required parameter 'id' is set
|
198
199
|
if @api_client.config.client_side_validation && id.nil?
|
199
|
-
|
200
|
+
raise ArgumentError, "Missing the required parameter 'id' when calling UsersApi.get_user_transactions"
|
200
201
|
end
|
201
|
-
|
202
|
-
|
202
|
+
|
203
|
+
if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] < 1
|
204
|
+
raise ArgumentError,
|
205
|
+
'invalid value for "opts[:"page"]" when calling UsersApi.get_user_transactions, must be greater than or equal to 1.'
|
203
206
|
end
|
204
207
|
|
205
|
-
if @api_client.config.client_side_validation && !opts[:
|
206
|
-
|
208
|
+
if @api_client.config.client_side_validation && !opts[:size].nil? && opts[:size] > 100
|
209
|
+
raise ArgumentError,
|
210
|
+
'invalid value for "opts[:"size"]" when calling UsersApi.get_user_transactions, must be smaller than or equal to 100.'
|
207
211
|
end
|
208
212
|
|
209
|
-
if @api_client.config.client_side_validation && !opts[:
|
210
|
-
|
213
|
+
if @api_client.config.client_side_validation && !opts[:size].nil? && opts[:size] < 1
|
214
|
+
raise ArgumentError,
|
215
|
+
'invalid value for "opts[:"size"]" when calling UsersApi.get_user_transactions, must be greater than or equal to 1.'
|
211
216
|
end
|
212
217
|
|
213
218
|
# resource path
|
@@ -215,20 +220,32 @@ module MoneyKit
|
|
215
220
|
|
216
221
|
# query parameters
|
217
222
|
query_params = opts[:query_params] || {}
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
223
|
+
unless opts[:transaction_type].nil?
|
224
|
+
query_params[:transaction_type] =
|
225
|
+
@api_client.build_collection_param(opts[:transaction_type], :multi)
|
226
|
+
end
|
227
|
+
unless opts[:category].nil?
|
228
|
+
query_params[:category] =
|
229
|
+
@api_client.build_collection_param(opts[:category], :multi)
|
230
|
+
end
|
231
|
+
unless opts[:account_id].nil?
|
232
|
+
query_params[:account_id] =
|
233
|
+
@api_client.build_collection_param(opts[:account_id], :multi)
|
234
|
+
end
|
235
|
+
unless opts[:institution_id].nil?
|
236
|
+
query_params[:institution_id] =
|
237
|
+
@api_client.build_collection_param(opts[:institution_id], :multi)
|
238
|
+
end
|
239
|
+
query_params[:page] = opts[:page] unless opts[:page].nil?
|
240
|
+
query_params[:size] = opts[:size] unless opts[:size].nil?
|
241
|
+
query_params[:start_date] = opts[:start_date] unless opts[:start_date].nil?
|
242
|
+
query_params[:end_date] = opts[:end_date] unless opts[:end_date].nil?
|
226
243
|
|
227
244
|
# header parameters
|
228
245
|
header_params = opts[:header_params] || {}
|
229
246
|
# HTTP header 'Accept' (if needed)
|
230
247
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
231
|
-
header_params[:'moneykit-version'] = opts[:
|
248
|
+
header_params[:'moneykit-version'] = opts[:moneykit_version] unless opts[:moneykit_version].nil?
|
232
249
|
|
233
250
|
# form parameters
|
234
251
|
form_params = opts[:form_params] || {}
|
@@ -240,23 +257,23 @@ module MoneyKit
|
|
240
257
|
return_type = opts[:debug_return_type] || 'GetUserTransactionsResponse'
|
241
258
|
|
242
259
|
# auth_names
|
243
|
-
auth_names = opts[:debug_auth_names] || [
|
260
|
+
auth_names = opts[:debug_auth_names] || %w[clientId OAuth2ClientCredentials clientSecret]
|
244
261
|
|
245
262
|
new_options = opts.merge(
|
246
|
-
:
|
247
|
-
:
|
248
|
-
:
|
249
|
-
:
|
250
|
-
:
|
251
|
-
:
|
252
|
-
:
|
263
|
+
operation: :"UsersApi.get_user_transactions",
|
264
|
+
header_params: header_params,
|
265
|
+
query_params: query_params,
|
266
|
+
form_params: form_params,
|
267
|
+
body: post_body,
|
268
|
+
auth_names: auth_names,
|
269
|
+
return_type: return_type
|
253
270
|
)
|
254
271
|
|
255
272
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
256
273
|
if @api_client.config.debugging
|
257
274
|
@api_client.config.logger.debug "API called: UsersApi#get_user_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
258
275
|
end
|
259
|
-
|
276
|
+
[data, status_code, headers]
|
260
277
|
end
|
261
278
|
end
|
262
279
|
end
|
data/lib/moneykit/api_client.rb
CHANGED
@@ -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 'json'
|
@@ -53,34 +51,28 @@ module MoneyKit
|
|
53
51
|
build_request(http_method, path, req, opts)
|
54
52
|
end
|
55
53
|
|
56
|
-
if config.debugging
|
57
|
-
config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
58
|
-
end
|
54
|
+
config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n" if config.debugging
|
59
55
|
|
60
56
|
unless response.success?
|
61
57
|
if response.status == 0 && response.respond_to?(:return_message)
|
62
58
|
# Errors from libcurl will be made visible here
|
63
|
-
|
64
|
-
|
59
|
+
raise ApiError.new(code: 0,
|
60
|
+
message: response.return_message)
|
65
61
|
else
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
62
|
+
raise ApiError.new(code: response.status,
|
63
|
+
response_headers: response.headers,
|
64
|
+
response_body: response.body),
|
65
|
+
response.reason_phrase
|
70
66
|
end
|
71
67
|
end
|
72
68
|
rescue Faraday::TimeoutError
|
73
|
-
|
69
|
+
raise ApiError, 'Connection timed out'
|
74
70
|
rescue Faraday::ConnectionFailed
|
75
|
-
|
71
|
+
raise ApiError, 'Connection failed'
|
76
72
|
end
|
77
73
|
|
78
|
-
if opts[:return_type]
|
79
|
-
|
80
|
-
else
|
81
|
-
data = nil
|
82
|
-
end
|
83
|
-
return data, response.status, response.headers
|
74
|
+
data = (deserialize(response, opts[:return_type]) if opts[:return_type])
|
75
|
+
[data, response.status, response.headers]
|
84
76
|
end
|
85
77
|
|
86
78
|
# Builds the HTTP request
|
@@ -102,11 +94,9 @@ module MoneyKit
|
|
102
94
|
|
103
95
|
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
104
96
|
|
105
|
-
if [
|
97
|
+
if %i[post patch put delete].include?(http_method)
|
106
98
|
req_body = build_request_body(header_params, form_params, opts[:body])
|
107
|
-
if config.debugging
|
108
|
-
config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
109
|
-
end
|
99
|
+
config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" if config.debugging
|
110
100
|
end
|
111
101
|
request.headers = header_params
|
112
102
|
request.body = req_body
|
@@ -134,16 +124,16 @@ module MoneyKit
|
|
134
124
|
elsif header_params['Content-Type'] == 'multipart/form-data'
|
135
125
|
data = {}
|
136
126
|
form_params.each do |key, value|
|
137
|
-
case value
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
127
|
+
data[key] = case value
|
128
|
+
when ::File, ::Tempfile
|
129
|
+
# TODO: hardcode to application/octet-stream, need better way to detect content type
|
130
|
+
Faraday::FilePart.new(value.path, 'application/octet-stream', value.path)
|
131
|
+
when ::Array, nil
|
132
|
+
# let Faraday handle Array and nil parameters
|
133
|
+
value
|
134
|
+
else
|
135
|
+
value.to_s
|
136
|
+
end
|
147
137
|
end
|
148
138
|
elsif body
|
149
139
|
data = body.is_a?(String) ? body : body.to_json
|
@@ -157,7 +147,7 @@ module MoneyKit
|
|
157
147
|
@stream = []
|
158
148
|
|
159
149
|
# handle streaming Responses
|
160
|
-
request.options.on_data =
|
150
|
+
request.options.on_data = proc do |chunk, _overall_received_bytes|
|
161
151
|
@stream << chunk
|
162
152
|
end
|
163
153
|
end
|
@@ -198,12 +188,12 @@ module MoneyKit
|
|
198
188
|
end
|
199
189
|
|
200
190
|
def basic_auth(conn)
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
191
|
+
return unless config.username && config.password
|
192
|
+
|
193
|
+
if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0')
|
194
|
+
conn.request(:authorization, :basic, config.username, config.password)
|
195
|
+
else
|
196
|
+
conn.request(:basic_auth, config.username, config.password)
|
207
197
|
end
|
208
198
|
end
|
209
199
|
|
@@ -216,7 +206,7 @@ module MoneyKit
|
|
216
206
|
# @param [String] mime MIME
|
217
207
|
# @return [Boolean] True if the MIME is application/json
|
218
208
|
def json_mime?(mime)
|
219
|
-
(mime == '*/*') || !(mime =~
|
209
|
+
(mime == '*/*') || !(mime =~ %r{Application/.*json(?!p)(;.*)?}i).nil?
|
220
210
|
end
|
221
211
|
|
222
212
|
# Deserialize the response to the given return type.
|
@@ -242,7 +232,7 @@ module MoneyKit
|
|
242
232
|
else
|
243
233
|
prefix = 'download-'
|
244
234
|
end
|
245
|
-
prefix
|
235
|
+
prefix += '-' unless prefix.end_with?('-')
|
246
236
|
encoding = body.encoding
|
247
237
|
@tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
248
238
|
@tempfile.write(@stream.join.force_encoding(encoding))
|
@@ -250,7 +240,7 @@ module MoneyKit
|
|
250
240
|
@config.logger.info "Temp file written to #{@tempfile.path}, please copy the file to a proper folder "\
|
251
241
|
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
252
242
|
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
253
|
-
|
243
|
+
'explicitly with `tempfile.delete`'
|
254
244
|
return @tempfile
|
255
245
|
end
|
256
246
|
end
|
@@ -263,16 +253,14 @@ module MoneyKit
|
|
263
253
|
# ensuring a default content type
|
264
254
|
content_type = response.headers['Content-Type'] || 'application/json'
|
265
255
|
|
266
|
-
|
256
|
+
raise "Content-Type is not supported: #{content_type}" unless json_mime?(content_type)
|
267
257
|
|
268
258
|
begin
|
269
|
-
data = JSON.parse("[#{body}]", :
|
259
|
+
data = JSON.parse("[#{body}]", symbolize_names: true)[0]
|
270
260
|
rescue JSON::ParserError => e
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
raise e
|
275
|
-
end
|
261
|
+
raise e unless %w[String Date Time].include?(return_type)
|
262
|
+
|
263
|
+
data = body
|
276
264
|
end
|
277
265
|
|
278
266
|
convert_to_type data, return_type
|
@@ -284,6 +272,7 @@ module MoneyKit
|
|
284
272
|
# @return [Mixed] Data in a particular type
|
285
273
|
def convert_to_type(data, return_type)
|
286
274
|
return nil if data.nil?
|
275
|
+
|
287
276
|
case return_type
|
288
277
|
when 'String'
|
289
278
|
data.to_s
|
@@ -304,11 +293,11 @@ module MoneyKit
|
|
304
293
|
data
|
305
294
|
when /\AArray<(.+)>\z/
|
306
295
|
# e.g. Array<Pet>
|
307
|
-
sub_type =
|
296
|
+
sub_type = ::Regexp.last_match(1)
|
308
297
|
data.map { |item| convert_to_type(item, sub_type) }
|
309
|
-
when /\AHash
|
298
|
+
when /\AHash<String, (.+)>\z/
|
310
299
|
# e.g. Hash<String, Integer>
|
311
|
-
sub_type =
|
300
|
+
sub_type = ::Regexp.last_match(1)
|
312
301
|
{}.tap do |hash|
|
313
302
|
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
|
314
303
|
end
|
@@ -325,12 +314,12 @@ module MoneyKit
|
|
325
314
|
# @param [String] filename the filename to be sanitized
|
326
315
|
# @return [String] the sanitized filename
|
327
316
|
def sanitize_filename(filename)
|
328
|
-
filename.gsub(
|
317
|
+
filename.gsub(%r{.*[/\\]}, '')
|
329
318
|
end
|
330
319
|
|
331
320
|
def build_request_url(path, opts = {})
|
332
321
|
# Add leading and trailing slashes to path
|
333
|
-
path = "/#{path}".gsub(
|
322
|
+
path = "/#{path}".gsub(%r{/+}, '/')
|
334
323
|
@config.base_url(opts[:operation]) + path
|
335
324
|
end
|
336
325
|
|
@@ -343,10 +332,11 @@ module MoneyKit
|
|
343
332
|
Array(auth_names).each do |auth_name|
|
344
333
|
auth_setting = @config.auth_settings[auth_name]
|
345
334
|
next unless auth_setting
|
335
|
+
|
346
336
|
case auth_setting[:in]
|
347
337
|
when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
|
348
338
|
when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
|
349
|
-
else
|
339
|
+
else raise ArgumentError, 'Authentication token must be in `query` or `header`'
|
350
340
|
end
|
351
341
|
end
|
352
342
|
end
|
@@ -364,6 +354,7 @@ module MoneyKit
|
|
364
354
|
# @return [String] the Accept header (e.g. application/json)
|
365
355
|
def select_header_accept(accepts)
|
366
356
|
return nil if accepts.nil? || accepts.empty?
|
357
|
+
|
367
358
|
# use JSON when present, otherwise use all of the provided
|
368
359
|
json_accept = accepts.find { |s| json_mime?(s) }
|
369
360
|
json_accept || accepts.join(',')
|
@@ -375,6 +366,7 @@ module MoneyKit
|
|
375
366
|
def select_header_content_type(content_types)
|
376
367
|
# return nil by default
|
377
368
|
return if content_types.nil? || content_types.empty?
|
369
|
+
|
378
370
|
# use JSON when present, otherwise use the first one
|
379
371
|
json_content_type = content_types.find { |s| json_mime?(s) }
|
380
372
|
json_content_type || content_types.first
|
@@ -385,12 +377,13 @@ module MoneyKit
|
|
385
377
|
# @return [String] JSON string representation of the object
|
386
378
|
def object_to_http_body(model)
|
387
379
|
return model if model.nil? || model.is_a?(String)
|
380
|
+
|
388
381
|
local_body = nil
|
389
|
-
if model.is_a?(Array)
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
382
|
+
local_body = if model.is_a?(Array)
|
383
|
+
model.map { |m| object_to_hash(m) }
|
384
|
+
else
|
385
|
+
object_to_hash(model)
|
386
|
+
end
|
394
387
|
local_body.to_json
|
395
388
|
end
|
396
389
|
|
@@ -421,7 +414,7 @@ module MoneyKit
|
|
421
414
|
# return the array directly as typhoeus will handle it as expected
|
422
415
|
param
|
423
416
|
else
|
424
|
-
|
417
|
+
raise "unknown collection format: #{collection_format.inspect}"
|
425
418
|
end
|
426
419
|
end
|
427
420
|
end
|
data/lib/moneykit/api_error.rb
CHANGED
@@ -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 ApiError < StandardError
|
@@ -42,11 +40,11 @@ module MoneyKit
|
|
42
40
|
end
|
43
41
|
|
44
42
|
def message
|
45
|
-
if @message.nil?
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
43
|
+
msg = if @message.nil?
|
44
|
+
'Error message: the server returns an error'
|
45
|
+
else
|
46
|
+
@message
|
47
|
+
end
|
50
48
|
|
51
49
|
msg += "\nHTTP status code: #{code}" if code
|
52
50
|
msg += "\nResponse headers: #{response_headers}" if response_headers
|