moneykit 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +291 -0
- data/lib/moneykit/api/access_token_api.rb +224 -0
- data/lib/moneykit/api/account_numbers_api.rb +88 -0
- data/lib/moneykit/api/accounts_api.rb +301 -0
- data/lib/moneykit/api/identity_api.rb +91 -0
- data/lib/moneykit/api/institutions_api.rb +234 -0
- data/lib/moneykit/api/link_session_api.rb +164 -0
- data/lib/moneykit/api/links_api.rb +297 -0
- data/lib/moneykit/api/products_api.rb +99 -0
- data/lib/moneykit/api/transactions_api.rb +297 -0
- data/lib/moneykit/api/users_api.rb +262 -0
- data/lib/moneykit/api_client.rb +428 -0
- data/lib/moneykit/api_error.rb +58 -0
- data/lib/moneykit/configuration.rb +404 -0
- data/lib/moneykit/models/account.rb +301 -0
- data/lib/moneykit/models/account_balances.rb +279 -0
- data/lib/moneykit/models/account_group.rb +237 -0
- data/lib/moneykit/models/account_identity.rb +318 -0
- data/lib/moneykit/models/account_numbers.rb +241 -0
- data/lib/moneykit/models/account_numbers_link_product.rb +246 -0
- data/lib/moneykit/models/account_numbers_product_settings.rb +234 -0
- data/lib/moneykit/models/account_type.rb +49 -0
- data/lib/moneykit/models/account_with_account_numbers.rb +315 -0
- data/lib/moneykit/models/accounts_link_product.rb +232 -0
- data/lib/moneykit/models/ach_number.rb +251 -0
- data/lib/moneykit/models/address.rb +277 -0
- data/lib/moneykit/models/api_error_auth_expired_access_token_response.rb +277 -0
- data/lib/moneykit/models/api_error_auth_unauthorized_response.rb +280 -0
- data/lib/moneykit/models/api_error_rate_limit_exceeded_response.rb +277 -0
- data/lib/moneykit/models/app.rb +248 -0
- data/lib/moneykit/models/bacs_number.rb +240 -0
- data/lib/moneykit/models/balances.rb +287 -0
- data/lib/moneykit/models/basic_account_details.rb +265 -0
- data/lib/moneykit/models/country.rb +41 -0
- data/lib/moneykit/models/create_link_session_request.rb +336 -0
- data/lib/moneykit/models/create_link_session_response.rb +225 -0
- data/lib/moneykit/models/currency.rb +219 -0
- data/lib/moneykit/models/cursor.rb +229 -0
- data/lib/moneykit/models/cursor_pagination.rb +221 -0
- data/lib/moneykit/models/cursors.rb +229 -0
- data/lib/moneykit/models/customer_app.rb +241 -0
- data/lib/moneykit/models/customer_user.rb +292 -0
- data/lib/moneykit/models/eft_number.rb +255 -0
- data/lib/moneykit/models/email.rb +237 -0
- data/lib/moneykit/models/email1.rb +283 -0
- data/lib/moneykit/models/exchange_token_request.rb +225 -0
- data/lib/moneykit/models/exchange_token_response.rb +239 -0
- data/lib/moneykit/models/generate_access_token_response.rb +256 -0
- data/lib/moneykit/models/get_account_numbers_response.rb +240 -0
- data/lib/moneykit/models/get_account_response.rb +238 -0
- data/lib/moneykit/models/get_accounts_response.rb +241 -0
- data/lib/moneykit/models/get_institutions_response.rb +241 -0
- data/lib/moneykit/models/get_transactions_response.rb +303 -0
- data/lib/moneykit/models/get_user_accounts_response.rb +227 -0
- data/lib/moneykit/models/get_user_links_response.rb +227 -0
- data/lib/moneykit/models/get_user_transactions_response.rb +287 -0
- data/lib/moneykit/models/http_validation_error.rb +293 -0
- data/lib/moneykit/models/identity.rb +241 -0
- data/lib/moneykit/models/identity_link_product.rb +246 -0
- data/lib/moneykit/models/identity_product_settings.rb +234 -0
- data/lib/moneykit/models/identity_response.rb +241 -0
- data/lib/moneykit/models/institution.rb +345 -0
- data/lib/moneykit/models/institution_error_not_found_response.rb +276 -0
- data/lib/moneykit/models/institution_styling_response.rb +310 -0
- data/lib/moneykit/models/international_number.rb +240 -0
- data/lib/moneykit/models/introspect_client_response.rb +281 -0
- data/lib/moneykit/models/jwk_set.rb +227 -0
- data/lib/moneykit/models/link.rb +347 -0
- data/lib/moneykit/models/link1.rb +347 -0
- data/lib/moneykit/models/link2.rb +347 -0
- data/lib/moneykit/models/link3.rb +347 -0
- data/lib/moneykit/models/link4.rb +347 -0
- data/lib/moneykit/models/link_common.rb +339 -0
- data/lib/moneykit/models/link_error.rb +45 -0
- data/lib/moneykit/models/link_error_bad_state_response.rb +294 -0
- data/lib/moneykit/models/link_error_deleted_response.rb +277 -0
- data/lib/moneykit/models/link_error_forbidden_action_response.rb +280 -0
- data/lib/moneykit/models/link_error_not_found_response.rb +276 -0
- data/lib/moneykit/models/link_error_unauthorized_access_response.rb +276 -0
- data/lib/moneykit/models/link_permission_scope.rb +42 -0
- data/lib/moneykit/models/link_permissions.rb +234 -0
- data/lib/moneykit/models/link_products.rb +246 -0
- data/lib/moneykit/models/link_response.rb +364 -0
- data/lib/moneykit/models/link_session_customer_user.rb +284 -0
- data/lib/moneykit/models/link_session_customer_user_email.rb +275 -0
- data/lib/moneykit/models/link_session_customer_user_phone.rb +307 -0
- data/lib/moneykit/models/link_session_error_forbidden_config_response.rb +280 -0
- data/lib/moneykit/models/link_session_error_invalid_token_exchange.rb +280 -0
- data/lib/moneykit/models/link_session_setting_overrides.rb +268 -0
- data/lib/moneykit/models/link_state.rb +43 -0
- data/lib/moneykit/models/link_state_changed_webhook.rb +392 -0
- data/lib/moneykit/models/location_inner.rb +230 -0
- data/lib/moneykit/models/money_kit_env.rb +40 -0
- data/lib/moneykit/models/money_link_features.rb +234 -0
- data/lib/moneykit/models/moneylink_features.rb +242 -0
- data/lib/moneykit/models/numbers.rb +286 -0
- data/lib/moneykit/models/owner.rb +278 -0
- data/lib/moneykit/models/phone.rb +315 -0
- data/lib/moneykit/models/phone_number.rb +273 -0
- data/lib/moneykit/models/phone_number_type.rb +42 -0
- data/lib/moneykit/models/product.rb +42 -0
- data/lib/moneykit/models/products.rb +254 -0
- data/lib/moneykit/models/products1.rb +245 -0
- data/lib/moneykit/models/products_settings.rb +237 -0
- data/lib/moneykit/models/provider.rb +43 -0
- data/lib/moneykit/models/refresh_products_request.rb +237 -0
- data/lib/moneykit/models/requested_link_permission.rb +276 -0
- data/lib/moneykit/models/response401_disconnect_links_id_delete.rb +302 -0
- data/lib/moneykit/models/response401_exchange_token_link_session_exchange_token_post.rb +300 -0
- data/lib/moneykit/models/response401_get_account_links_id_accounts_account_id_get.rb +302 -0
- data/lib/moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.rb +302 -0
- data/lib/moneykit/models/response401_get_accounts_links_id_accounts_get.rb +302 -0
- data/lib/moneykit/models/response401_get_identities_links_id_identity_get.rb +302 -0
- data/lib/moneykit/models/response401_get_institution_institutions_institution_id_get.rb +300 -0
- data/lib/moneykit/models/response401_get_institution_styling_institutions_institution_id_styling_get.rb +300 -0
- data/lib/moneykit/models/response401_get_institutions_institutions_get.rb +300 -0
- data/lib/moneykit/models/response401_get_link_links_id_get.rb +302 -0
- data/lib/moneykit/models/response401_get_transactions_diff_links_id_transactions_sync_get.rb +302 -0
- data/lib/moneykit/models/response401_get_transactions_links_id_transactions_get.rb +302 -0
- data/lib/moneykit/models/response401_get_user_accounts_users_id_accounts_get.rb +300 -0
- data/lib/moneykit/models/response401_get_user_links_users_id_links_get.rb +300 -0
- data/lib/moneykit/models/response401_get_user_transactions_users_id_transactions_get.rb +300 -0
- data/lib/moneykit/models/response401_get_well_known_jwks_well_known_jwks_json_get.rb +300 -0
- data/lib/moneykit/models/response401_instrospect_client_auth_introspect_get.rb +300 -0
- data/lib/moneykit/models/response401_refresh_products_links_id_products_post.rb +302 -0
- data/lib/moneykit/models/response401_update_link_links_id_patch.rb +302 -0
- data/lib/moneykit/models/settings.rb +276 -0
- data/lib/moneykit/models/supported_version.rb +39 -0
- data/lib/moneykit/models/transaction.rb +369 -0
- data/lib/moneykit/models/transaction_diff.rb +261 -0
- data/lib/moneykit/models/transaction_sync_response.rb +267 -0
- data/lib/moneykit/models/transaction_type.rb +40 -0
- data/lib/moneykit/models/transaction_type_filter.rb +40 -0
- data/lib/moneykit/models/transactions.rb +253 -0
- data/lib/moneykit/models/transactions1.rb +269 -0
- data/lib/moneykit/models/transactions_link_product.rb +246 -0
- data/lib/moneykit/models/transactions_product_settings.rb +246 -0
- data/lib/moneykit/models/update_link_request.rb +258 -0
- data/lib/moneykit/models/user_accounts_out.rb +221 -0
- data/lib/moneykit/models/user_links_out.rb +221 -0
- data/lib/moneykit/models/user_transactions_paged_response.rb +221 -0
- data/lib/moneykit/models/validation_error.rb +254 -0
- data/lib/moneykit/version.rb +15 -0
- data/lib/moneykit.rb +180 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/api/plaid_api.rb +744 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_client.rb +400 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_error.rb +57 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/configuration.rb +287 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_balance.rb +254 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_base.rb +289 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_identity.rb +306 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_subtype.rb +110 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_type.rb +43 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request_options.rb +223 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_response.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address.rb +235 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address_data.rb +269 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_numbers.rb +278 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request_options.rb +223 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_response.rb +270 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/country_code.rb +40 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/email.rb +240 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/http_validation_error.rb +220 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request_options.rb +223 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_response.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institution.rb +279 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_request.rb +260 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_response.rb +239 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item.rb +317 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_error_webhook.rb +279 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_request.rb +247 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_response.rb +249 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_request.rb +247 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_response.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_request.rb +247 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_response.rb +225 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_investments.rb +232 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_last_webhook.rb +232 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_nullable.rb +240 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_transactions.rb +232 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request.rb +352 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request_user.rb +269 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_response.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_ach.rb +266 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_bacs.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_eft.rb +270 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_international.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/owner.rb +278 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/personal_finance_category.rb +240 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/phone_number.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error.rb +322 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error_type.rb +51 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/products.rb +41 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/removed_transaction.rb +221 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transaction.rb +378 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request.rb +286 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request_options.rb +267 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_response.rb +288 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_request.rb +247 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_response.rb +225 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request.rb +278 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request_options.rb +232 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_response.rb +306 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/validation_error.rb +253 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/webhook_environment_values.rb +40 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/version.rb +15 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible.rb +100 -0
- data/moneykit-0.0.0.gem +0 -0
- data/moneykit.gemspec +39 -0
- metadata +309 -0
@@ -0,0 +1,297 @@
|
|
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: 0.1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.5.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module MoneyKit
|
16
|
+
class TransactionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# /links/{id}/transactions
|
23
|
+
# Fetches transactions for the accounts associated with a <a href=#tag/Links>link</a>. Results are paginated, and returned in reverse chronological order. <p>MoneyKit checks for updated account data, including transactions, periodically throughout the day, but the update frequency can vary, depending on the downstream data provider and the institution. To force a check for updated transactions, you can use the <a href=#operation/products>/products</a> endpoint.
|
24
|
+
# @param id [String] The unique ID for this link.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Array<String>] :account_ids An optional list of account IDs to filter the results.
|
27
|
+
# @option opts [Integer] :page (default to 1)
|
28
|
+
# @option opts [Integer] :size (default to 50)
|
29
|
+
# @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`.
|
30
|
+
# @option opts [String] :end_date The latest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to today.
|
31
|
+
# @option opts [SupportedVersion] :moneykit_version
|
32
|
+
# @return [GetTransactionsResponse]
|
33
|
+
def get_transactions(id, opts = {})
|
34
|
+
data, _status_code, _headers = get_transactions_with_http_info(id, opts)
|
35
|
+
data
|
36
|
+
end
|
37
|
+
|
38
|
+
# /links/{id}/transactions
|
39
|
+
# Fetches transactions for the accounts associated with a <a href=#tag/Links>link</a>. Results are paginated, and returned in reverse chronological order. <p>MoneyKit checks for updated account data, including transactions, periodically throughout the day, but the update frequency can vary, depending on the downstream data provider and the institution. To force a check for updated transactions, you can use the <a href=#operation/products>/products</a> endpoint.
|
40
|
+
# @param id [String] The unique ID for this link.
|
41
|
+
# @param [Hash] opts the optional parameters
|
42
|
+
# @option opts [Array<String>] :account_ids An optional list of account IDs to filter the results.
|
43
|
+
# @option opts [Integer] :page (default to 1)
|
44
|
+
# @option opts [Integer] :size (default to 50)
|
45
|
+
# @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`.
|
46
|
+
# @option opts [String] :end_date The latest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to today.
|
47
|
+
# @option opts [SupportedVersion] :moneykit_version
|
48
|
+
# @return [Array<(GetTransactionsResponse, Integer, Hash)>] GetTransactionsResponse data, response status code and response headers
|
49
|
+
def get_transactions_with_http_info(id, opts = {})
|
50
|
+
if @api_client.config.debugging
|
51
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.get_transactions ...'
|
52
|
+
end
|
53
|
+
# verify the required parameter 'id' is set
|
54
|
+
if @api_client.config.client_side_validation && id.nil?
|
55
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TransactionsApi.get_transactions"
|
56
|
+
end
|
57
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
58
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling TransactionsApi.get_transactions, must be greater than or equal to 1.'
|
59
|
+
end
|
60
|
+
|
61
|
+
if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
|
62
|
+
fail ArgumentError, 'invalid value for "opts[:"size"]" when calling TransactionsApi.get_transactions, must be smaller than or equal to 100.'
|
63
|
+
end
|
64
|
+
|
65
|
+
if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
|
66
|
+
fail ArgumentError, 'invalid value for "opts[:"size"]" when calling TransactionsApi.get_transactions, must be greater than or equal to 1.'
|
67
|
+
end
|
68
|
+
|
69
|
+
# resource path
|
70
|
+
local_var_path = '/links/{id}/transactions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
71
|
+
|
72
|
+
# query parameters
|
73
|
+
query_params = opts[:query_params] || {}
|
74
|
+
query_params[:'account_ids'] = @api_client.build_collection_param(opts[:'account_ids'], :multi) if !opts[:'account_ids'].nil?
|
75
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
76
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
77
|
+
query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
78
|
+
query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
79
|
+
|
80
|
+
# header parameters
|
81
|
+
header_params = opts[:header_params] || {}
|
82
|
+
# HTTP header 'Accept' (if needed)
|
83
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
84
|
+
header_params[:'moneykit-version'] = opts[:'moneykit_version'] if !opts[:'moneykit_version'].nil?
|
85
|
+
|
86
|
+
# form parameters
|
87
|
+
form_params = opts[:form_params] || {}
|
88
|
+
|
89
|
+
# http body (model)
|
90
|
+
post_body = opts[:debug_body]
|
91
|
+
|
92
|
+
# return_type
|
93
|
+
return_type = opts[:debug_return_type] || 'GetTransactionsResponse'
|
94
|
+
|
95
|
+
# auth_names
|
96
|
+
auth_names = opts[:debug_auth_names] || ['clientId', 'OAuth2ClientCredentials', 'clientSecret']
|
97
|
+
|
98
|
+
new_options = opts.merge(
|
99
|
+
:operation => :"TransactionsApi.get_transactions",
|
100
|
+
:header_params => header_params,
|
101
|
+
:query_params => query_params,
|
102
|
+
:form_params => form_params,
|
103
|
+
:body => post_body,
|
104
|
+
:auth_names => auth_names,
|
105
|
+
:return_type => return_type
|
106
|
+
)
|
107
|
+
|
108
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
109
|
+
if @api_client.config.debugging
|
110
|
+
@api_client.config.logger.debug "API called: TransactionsApi#get_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
111
|
+
end
|
112
|
+
return data, status_code, headers
|
113
|
+
end
|
114
|
+
|
115
|
+
# /links/{id}/transactions/sync
|
116
|
+
# TODO
|
117
|
+
# @param id [String] The unique ID for this link.
|
118
|
+
# @param [Hash] opts the optional parameters
|
119
|
+
# @option opts [String] :cursor
|
120
|
+
# @option opts [Integer] :size (default to 50)
|
121
|
+
# @option opts [SupportedVersion] :moneykit_version
|
122
|
+
# @return [TransactionSyncResponse]
|
123
|
+
def get_transactions_diff(id, opts = {})
|
124
|
+
data, _status_code, _headers = get_transactions_diff_with_http_info(id, opts)
|
125
|
+
data
|
126
|
+
end
|
127
|
+
|
128
|
+
# /links/{id}/transactions/sync
|
129
|
+
# TODO
|
130
|
+
# @param id [String] The unique ID for this link.
|
131
|
+
# @param [Hash] opts the optional parameters
|
132
|
+
# @option opts [String] :cursor
|
133
|
+
# @option opts [Integer] :size (default to 50)
|
134
|
+
# @option opts [SupportedVersion] :moneykit_version
|
135
|
+
# @return [Array<(TransactionSyncResponse, Integer, Hash)>] TransactionSyncResponse data, response status code and response headers
|
136
|
+
def get_transactions_diff_with_http_info(id, opts = {})
|
137
|
+
if @api_client.config.debugging
|
138
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.get_transactions_diff ...'
|
139
|
+
end
|
140
|
+
# verify the required parameter 'id' is set
|
141
|
+
if @api_client.config.client_side_validation && id.nil?
|
142
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TransactionsApi.get_transactions_diff"
|
143
|
+
end
|
144
|
+
if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
|
145
|
+
fail ArgumentError, 'invalid value for "opts[:"size"]" when calling TransactionsApi.get_transactions_diff, must be smaller than or equal to 100.'
|
146
|
+
end
|
147
|
+
|
148
|
+
if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
|
149
|
+
fail ArgumentError, 'invalid value for "opts[:"size"]" when calling TransactionsApi.get_transactions_diff, must be greater than or equal to 1.'
|
150
|
+
end
|
151
|
+
|
152
|
+
# resource path
|
153
|
+
local_var_path = '/links/{id}/transactions/sync'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
154
|
+
|
155
|
+
# query parameters
|
156
|
+
query_params = opts[:query_params] || {}
|
157
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
158
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
159
|
+
|
160
|
+
# header parameters
|
161
|
+
header_params = opts[:header_params] || {}
|
162
|
+
# HTTP header 'Accept' (if needed)
|
163
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
164
|
+
header_params[:'moneykit-version'] = opts[:'moneykit_version'] if !opts[:'moneykit_version'].nil?
|
165
|
+
|
166
|
+
# form parameters
|
167
|
+
form_params = opts[:form_params] || {}
|
168
|
+
|
169
|
+
# http body (model)
|
170
|
+
post_body = opts[:debug_body]
|
171
|
+
|
172
|
+
# return_type
|
173
|
+
return_type = opts[:debug_return_type] || 'TransactionSyncResponse'
|
174
|
+
|
175
|
+
# auth_names
|
176
|
+
auth_names = opts[:debug_auth_names] || ['clientId', 'OAuth2ClientCredentials', 'clientSecret']
|
177
|
+
|
178
|
+
new_options = opts.merge(
|
179
|
+
:operation => :"TransactionsApi.get_transactions_diff",
|
180
|
+
:header_params => header_params,
|
181
|
+
:query_params => query_params,
|
182
|
+
:form_params => form_params,
|
183
|
+
:body => post_body,
|
184
|
+
:auth_names => auth_names,
|
185
|
+
:return_type => return_type
|
186
|
+
)
|
187
|
+
|
188
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
189
|
+
if @api_client.config.debugging
|
190
|
+
@api_client.config.logger.debug "API called: TransactionsApi#get_transactions_diff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
191
|
+
end
|
192
|
+
return data, status_code, headers
|
193
|
+
end
|
194
|
+
|
195
|
+
# /users/{id}/transactions
|
196
|
+
# 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.
|
197
|
+
# @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.
|
198
|
+
# @param [Hash] opts the optional parameters
|
199
|
+
# @option opts [Array<TransactionTypeFilter>] :transaction_type
|
200
|
+
# @option opts [Array<String>] :category
|
201
|
+
# @option opts [Array<String>] :account_id If present, filters results to transactions in accounts matching the given IDs.
|
202
|
+
# @option opts [Array<String>] :institution_id If present, filters results to transactions at institutions matching the given IDs.
|
203
|
+
# @option opts [Integer] :page (default to 1)
|
204
|
+
# @option opts [Integer] :size (default to 50)
|
205
|
+
# @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`.
|
206
|
+
# @option opts [String] :end_date The latest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to today.
|
207
|
+
# @option opts [SupportedVersion] :moneykit_version
|
208
|
+
# @return [GetUserTransactionsResponse]
|
209
|
+
def get_user_transactions(id, opts = {})
|
210
|
+
data, _status_code, _headers = get_user_transactions_with_http_info(id, opts)
|
211
|
+
data
|
212
|
+
end
|
213
|
+
|
214
|
+
# /users/{id}/transactions
|
215
|
+
# 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.
|
216
|
+
# @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.
|
217
|
+
# @param [Hash] opts the optional parameters
|
218
|
+
# @option opts [Array<TransactionTypeFilter>] :transaction_type
|
219
|
+
# @option opts [Array<String>] :category
|
220
|
+
# @option opts [Array<String>] :account_id If present, filters results to transactions in accounts matching the given IDs.
|
221
|
+
# @option opts [Array<String>] :institution_id If present, filters results to transactions at institutions matching the given IDs.
|
222
|
+
# @option opts [Integer] :page (default to 1)
|
223
|
+
# @option opts [Integer] :size (default to 50)
|
224
|
+
# @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`.
|
225
|
+
# @option opts [String] :end_date The latest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to today.
|
226
|
+
# @option opts [SupportedVersion] :moneykit_version
|
227
|
+
# @return [Array<(GetUserTransactionsResponse, Integer, Hash)>] GetUserTransactionsResponse data, response status code and response headers
|
228
|
+
def get_user_transactions_with_http_info(id, opts = {})
|
229
|
+
if @api_client.config.debugging
|
230
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.get_user_transactions ...'
|
231
|
+
end
|
232
|
+
# verify the required parameter 'id' is set
|
233
|
+
if @api_client.config.client_side_validation && id.nil?
|
234
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TransactionsApi.get_user_transactions"
|
235
|
+
end
|
236
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
237
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling TransactionsApi.get_user_transactions, must be greater than or equal to 1.'
|
238
|
+
end
|
239
|
+
|
240
|
+
if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
|
241
|
+
fail ArgumentError, 'invalid value for "opts[:"size"]" when calling TransactionsApi.get_user_transactions, must be smaller than or equal to 100.'
|
242
|
+
end
|
243
|
+
|
244
|
+
if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
|
245
|
+
fail ArgumentError, 'invalid value for "opts[:"size"]" when calling TransactionsApi.get_user_transactions, must be greater than or equal to 1.'
|
246
|
+
end
|
247
|
+
|
248
|
+
# resource path
|
249
|
+
local_var_path = '/users/{id}/transactions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
250
|
+
|
251
|
+
# query parameters
|
252
|
+
query_params = opts[:query_params] || {}
|
253
|
+
query_params[:'transaction_type'] = @api_client.build_collection_param(opts[:'transaction_type'], :multi) if !opts[:'transaction_type'].nil?
|
254
|
+
query_params[:'category'] = @api_client.build_collection_param(opts[:'category'], :multi) if !opts[:'category'].nil?
|
255
|
+
query_params[:'account_id'] = @api_client.build_collection_param(opts[:'account_id'], :multi) if !opts[:'account_id'].nil?
|
256
|
+
query_params[:'institution_id'] = @api_client.build_collection_param(opts[:'institution_id'], :multi) if !opts[:'institution_id'].nil?
|
257
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
258
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
259
|
+
query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
260
|
+
query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
261
|
+
|
262
|
+
# header parameters
|
263
|
+
header_params = opts[:header_params] || {}
|
264
|
+
# HTTP header 'Accept' (if needed)
|
265
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
266
|
+
header_params[:'moneykit-version'] = opts[:'moneykit_version'] if !opts[:'moneykit_version'].nil?
|
267
|
+
|
268
|
+
# form parameters
|
269
|
+
form_params = opts[:form_params] || {}
|
270
|
+
|
271
|
+
# http body (model)
|
272
|
+
post_body = opts[:debug_body]
|
273
|
+
|
274
|
+
# return_type
|
275
|
+
return_type = opts[:debug_return_type] || 'GetUserTransactionsResponse'
|
276
|
+
|
277
|
+
# auth_names
|
278
|
+
auth_names = opts[:debug_auth_names] || ['clientId', 'OAuth2ClientCredentials', 'clientSecret']
|
279
|
+
|
280
|
+
new_options = opts.merge(
|
281
|
+
:operation => :"TransactionsApi.get_user_transactions",
|
282
|
+
:header_params => header_params,
|
283
|
+
:query_params => query_params,
|
284
|
+
:form_params => form_params,
|
285
|
+
:body => post_body,
|
286
|
+
:auth_names => auth_names,
|
287
|
+
:return_type => return_type
|
288
|
+
)
|
289
|
+
|
290
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
291
|
+
if @api_client.config.debugging
|
292
|
+
@api_client.config.logger.debug "API called: TransactionsApi#get_user_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
293
|
+
end
|
294
|
+
return data, status_code, headers
|
295
|
+
end
|
296
|
+
end
|
297
|
+
end
|
@@ -0,0 +1,262 @@
|
|
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: 0.1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.5.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module MoneyKit
|
16
|
+
class UsersApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# /users/{id}/accounts
|
23
|
+
# Fetches all accounts belonging to a <a href=#operation/get_user_accounts>user</a>.
|
24
|
+
# @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
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Array<String>] :account_id If present, filters results to accounts matching the given IDs.
|
27
|
+
# @option opts [Array<String>] :institution_id If present, filters results to accounts at institutions matching the given IDs.
|
28
|
+
# @option opts [SupportedVersion] :moneykit_version
|
29
|
+
# @return [GetUserAccountsResponse]
|
30
|
+
def get_user_accounts(id, opts = {})
|
31
|
+
data, _status_code, _headers = get_user_accounts_with_http_info(id, opts)
|
32
|
+
data
|
33
|
+
end
|
34
|
+
|
35
|
+
# /users/{id}/accounts
|
36
|
+
# Fetches all accounts belonging to a <a href=#operation/get_user_accounts>user</a>.
|
37
|
+
# @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.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [Array<String>] :account_id If present, filters results to accounts matching the given IDs.
|
40
|
+
# @option opts [Array<String>] :institution_id If present, filters results to accounts at institutions matching the given IDs.
|
41
|
+
# @option opts [SupportedVersion] :moneykit_version
|
42
|
+
# @return [Array<(GetUserAccountsResponse, Integer, Hash)>] GetUserAccountsResponse data, response status code and response headers
|
43
|
+
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
|
47
|
+
# verify the required parameter 'id' is set
|
48
|
+
if @api_client.config.client_side_validation && id.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.get_user_accounts"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/users/{id}/accounts'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = opts[:query_params] || {}
|
56
|
+
query_params[:'account_id'] = @api_client.build_collection_param(opts[:'account_id'], :multi) if !opts[:'account_id'].nil?
|
57
|
+
query_params[:'institution_id'] = @api_client.build_collection_param(opts[:'institution_id'], :multi) if !opts[:'institution_id'].nil?
|
58
|
+
|
59
|
+
# header parameters
|
60
|
+
header_params = opts[:header_params] || {}
|
61
|
+
# HTTP header 'Accept' (if needed)
|
62
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
63
|
+
header_params[:'moneykit-version'] = opts[:'moneykit_version'] if !opts[:'moneykit_version'].nil?
|
64
|
+
|
65
|
+
# form parameters
|
66
|
+
form_params = opts[:form_params] || {}
|
67
|
+
|
68
|
+
# http body (model)
|
69
|
+
post_body = opts[:debug_body]
|
70
|
+
|
71
|
+
# return_type
|
72
|
+
return_type = opts[:debug_return_type] || 'GetUserAccountsResponse'
|
73
|
+
|
74
|
+
# auth_names
|
75
|
+
auth_names = opts[:debug_auth_names] || ['clientId', 'OAuth2ClientCredentials', 'clientSecret']
|
76
|
+
|
77
|
+
new_options = opts.merge(
|
78
|
+
:operation => :"UsersApi.get_user_accounts",
|
79
|
+
:header_params => header_params,
|
80
|
+
:query_params => query_params,
|
81
|
+
:form_params => form_params,
|
82
|
+
:body => post_body,
|
83
|
+
:auth_names => auth_names,
|
84
|
+
:return_type => return_type
|
85
|
+
)
|
86
|
+
|
87
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
88
|
+
if @api_client.config.debugging
|
89
|
+
@api_client.config.logger.debug "API called: UsersApi#get_user_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
90
|
+
end
|
91
|
+
return data, status_code, headers
|
92
|
+
end
|
93
|
+
|
94
|
+
# /users/{id}/links
|
95
|
+
# Fetches all links belonging to a <a href=#operation/get_user_accounts>user</a>.
|
96
|
+
# @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
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @option opts [SupportedVersion] :moneykit_version
|
99
|
+
# @return [GetUserLinksResponse]
|
100
|
+
def get_user_links(id, opts = {})
|
101
|
+
data, _status_code, _headers = get_user_links_with_http_info(id, opts)
|
102
|
+
data
|
103
|
+
end
|
104
|
+
|
105
|
+
# /users/{id}/links
|
106
|
+
# Fetches all links belonging to a <a href=#operation/get_user_accounts>user</a>.
|
107
|
+
# @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
|
+
# @param [Hash] opts the optional parameters
|
109
|
+
# @option opts [SupportedVersion] :moneykit_version
|
110
|
+
# @return [Array<(GetUserLinksResponse, Integer, Hash)>] GetUserLinksResponse data, response status code and response headers
|
111
|
+
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
|
115
|
+
# verify the required parameter 'id' is set
|
116
|
+
if @api_client.config.client_side_validation && id.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.get_user_links"
|
118
|
+
end
|
119
|
+
# resource path
|
120
|
+
local_var_path = '/users/{id}/links'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
121
|
+
|
122
|
+
# query parameters
|
123
|
+
query_params = opts[:query_params] || {}
|
124
|
+
|
125
|
+
# header parameters
|
126
|
+
header_params = opts[:header_params] || {}
|
127
|
+
# HTTP header 'Accept' (if needed)
|
128
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
129
|
+
header_params[:'moneykit-version'] = opts[:'moneykit_version'] if !opts[:'moneykit_version'].nil?
|
130
|
+
|
131
|
+
# form parameters
|
132
|
+
form_params = opts[:form_params] || {}
|
133
|
+
|
134
|
+
# http body (model)
|
135
|
+
post_body = opts[:debug_body]
|
136
|
+
|
137
|
+
# return_type
|
138
|
+
return_type = opts[:debug_return_type] || 'GetUserLinksResponse'
|
139
|
+
|
140
|
+
# auth_names
|
141
|
+
auth_names = opts[:debug_auth_names] || ['clientId', 'OAuth2ClientCredentials', 'clientSecret']
|
142
|
+
|
143
|
+
new_options = opts.merge(
|
144
|
+
:operation => :"UsersApi.get_user_links",
|
145
|
+
:header_params => header_params,
|
146
|
+
:query_params => query_params,
|
147
|
+
:form_params => form_params,
|
148
|
+
:body => post_body,
|
149
|
+
:auth_names => auth_names,
|
150
|
+
:return_type => return_type
|
151
|
+
)
|
152
|
+
|
153
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
154
|
+
if @api_client.config.debugging
|
155
|
+
@api_client.config.logger.debug "API called: UsersApi#get_user_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
156
|
+
end
|
157
|
+
return data, status_code, headers
|
158
|
+
end
|
159
|
+
|
160
|
+
# /users/{id}/transactions
|
161
|
+
# 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
|
+
# @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
|
+
# @param [Hash] opts the optional parameters
|
164
|
+
# @option opts [Array<TransactionTypeFilter>] :transaction_type
|
165
|
+
# @option opts [Array<String>] :category
|
166
|
+
# @option opts [Array<String>] :account_id If present, filters results to transactions in accounts matching the given IDs.
|
167
|
+
# @option opts [Array<String>] :institution_id If present, filters results to transactions at institutions matching the given IDs.
|
168
|
+
# @option opts [Integer] :page (default to 1)
|
169
|
+
# @option opts [Integer] :size (default to 50)
|
170
|
+
# @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
|
+
# @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
|
173
|
+
# @return [GetUserTransactionsResponse]
|
174
|
+
def get_user_transactions(id, opts = {})
|
175
|
+
data, _status_code, _headers = get_user_transactions_with_http_info(id, opts)
|
176
|
+
data
|
177
|
+
end
|
178
|
+
|
179
|
+
# /users/{id}/transactions
|
180
|
+
# 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
|
+
# @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
|
+
# @param [Hash] opts the optional parameters
|
183
|
+
# @option opts [Array<TransactionTypeFilter>] :transaction_type
|
184
|
+
# @option opts [Array<String>] :category
|
185
|
+
# @option opts [Array<String>] :account_id If present, filters results to transactions in accounts matching the given IDs.
|
186
|
+
# @option opts [Array<String>] :institution_id If present, filters results to transactions at institutions matching the given IDs.
|
187
|
+
# @option opts [Integer] :page (default to 1)
|
188
|
+
# @option opts [Integer] :size (default to 50)
|
189
|
+
# @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
|
+
# @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
|
192
|
+
# @return [Array<(GetUserTransactionsResponse, Integer, Hash)>] GetUserTransactionsResponse data, response status code and response headers
|
193
|
+
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
|
+
# verify the required parameter 'id' is set
|
198
|
+
if @api_client.config.client_side_validation && id.nil?
|
199
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.get_user_transactions"
|
200
|
+
end
|
201
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
202
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling UsersApi.get_user_transactions, must be greater than or equal to 1.'
|
203
|
+
end
|
204
|
+
|
205
|
+
if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
|
206
|
+
fail ArgumentError, 'invalid value for "opts[:"size"]" when calling UsersApi.get_user_transactions, must be smaller than or equal to 100.'
|
207
|
+
end
|
208
|
+
|
209
|
+
if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
|
210
|
+
fail ArgumentError, 'invalid value for "opts[:"size"]" when calling UsersApi.get_user_transactions, must be greater than or equal to 1.'
|
211
|
+
end
|
212
|
+
|
213
|
+
# resource path
|
214
|
+
local_var_path = '/users/{id}/transactions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
215
|
+
|
216
|
+
# query parameters
|
217
|
+
query_params = opts[:query_params] || {}
|
218
|
+
query_params[:'transaction_type'] = @api_client.build_collection_param(opts[:'transaction_type'], :multi) if !opts[:'transaction_type'].nil?
|
219
|
+
query_params[:'category'] = @api_client.build_collection_param(opts[:'category'], :multi) if !opts[:'category'].nil?
|
220
|
+
query_params[:'account_id'] = @api_client.build_collection_param(opts[:'account_id'], :multi) if !opts[:'account_id'].nil?
|
221
|
+
query_params[:'institution_id'] = @api_client.build_collection_param(opts[:'institution_id'], :multi) if !opts[:'institution_id'].nil?
|
222
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
223
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
224
|
+
query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
225
|
+
query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
226
|
+
|
227
|
+
# header parameters
|
228
|
+
header_params = opts[:header_params] || {}
|
229
|
+
# HTTP header 'Accept' (if needed)
|
230
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
231
|
+
header_params[:'moneykit-version'] = opts[:'moneykit_version'] if !opts[:'moneykit_version'].nil?
|
232
|
+
|
233
|
+
# form parameters
|
234
|
+
form_params = opts[:form_params] || {}
|
235
|
+
|
236
|
+
# http body (model)
|
237
|
+
post_body = opts[:debug_body]
|
238
|
+
|
239
|
+
# return_type
|
240
|
+
return_type = opts[:debug_return_type] || 'GetUserTransactionsResponse'
|
241
|
+
|
242
|
+
# auth_names
|
243
|
+
auth_names = opts[:debug_auth_names] || ['clientId', 'OAuth2ClientCredentials', 'clientSecret']
|
244
|
+
|
245
|
+
new_options = opts.merge(
|
246
|
+
:operation => :"UsersApi.get_user_transactions",
|
247
|
+
:header_params => header_params,
|
248
|
+
:query_params => query_params,
|
249
|
+
:form_params => form_params,
|
250
|
+
:body => post_body,
|
251
|
+
:auth_names => auth_names,
|
252
|
+
:return_type => return_type
|
253
|
+
)
|
254
|
+
|
255
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
256
|
+
if @api_client.config.debugging
|
257
|
+
@api_client.config.logger.debug "API called: UsersApi#get_user_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
258
|
+
end
|
259
|
+
return data, status_code, headers
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|