lib/atrium-ruby/api/members_api.rb in atrium-ruby-2.3.0 vs lib/atrium-ruby/api/members_api.rb in atrium-ruby-2.4.0

- old
+ new

@@ -18,11 +18,10 @@ # Aggregate member # Calling this endpoint initiates an aggregation event for the member. This brings in the latest account and transaction data from the connected institution. If this data has recently been updated, MX may not initiate an aggregation event. # @param member_guid The unique identifier for a &#x60;member&#x60;. # @param user_guid The unique identifier for a &#x60;user&#x60;. # @param [Hash] opts the optional parameters - # @option opts [String] :type An optional parameter which determines the type of aggregation to be peformed. Possible values are &#x60;statement&#x60; and &#x60;history&#x60;. # @return [MemberResponseBody] def aggregate_member(member_guid, user_guid, opts = {}) data, _status_code, _headers = aggregate_member_with_http_info(member_guid, user_guid, opts) data end @@ -47,10 +46,21 @@ def delete_member(member_guid, user_guid, opts = {}) delete_member_with_http_info(member_guid, user_guid, opts) nil end + # Extend history + # The extend_history endpoint begins the process of fetching up to 24 months of data associated with a particular `member`. + # @param member_guid The unique identifier for a &#x60;member&#x60;. + # @param user_guid The unique identifier for a &#x60;user&#x60;. + # @param [Hash] opts the optional parameters + # @return [MemberResponseBody] + def extend_history(member_guid, user_guid, opts = {}) + data, _status_code, _headers = extend_history_with_http_info(member_guid, user_guid, opts) + data + end + # List member accounts # This endpoint returns an array with information about every account associated with a particular member. # @param member_guid The unique identifier for a &#x60;member&#x60;. # @param user_guid The unique identifier for a &#x60;user&#x60;. # @param [Hash] opts the optional parameters @@ -82,23 +92,10 @@ def list_member_mfa_challenges(member_guid, user_guid, opts = {}) data, _status_code, _headers = list_member_mfa_challenges_with_http_info(member_guid, user_guid, opts) data end - # List member statements - # Certain institutions in Atrium allow developers to access account statements associated with a particular `member`. Use this endpoint to get an array of available statements. Before this endpoint can be used, an aggregation of type `statement` should be performed on the relevant `member`. - # @param member_guid The unique identifier for a &#x60;member&#x60;. - # @param user_guid The unique identifier for a &#x60;user&#x60;. - # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Specify current page. - # @option opts [Integer] :records_per_page Specify records per page. - # @return [StatementsResponseBody] - def list_member_statements(member_guid, user_guid, opts = {}) - data, _status_code, _headers = list_member_statements_with_http_info(member_guid, user_guid, opts) - data - end - # List member transactions # Use this endpoint to get all transactions from all accounts associated with a specific member.<br> This endpoint accepts optional URL query parameters — from_date and to_date — which are used to filter transactions according to the date they were posted. If no values are given for the query parameters, from_date will default to 90 days prior to the request and to_date will default to 5 days from the time of the request. # @param member_guid The unique identifier for a &#x60;member&#x60;. # @param user_guid The unique identifier for a &#x60;user&#x60;. # @param [Hash] opts the optional parameters @@ -176,11 +173,10 @@ # Aggregate member # Calling this endpoint initiates an aggregation event for the member. This brings in the latest account and transaction data from the connected institution. If this data has recently been updated, MX may not initiate an aggregation event. # @param member_guid The unique identifier for a &#x60;member&#x60;. # @param user_guid The unique identifier for a &#x60;user&#x60;. # @param [Hash] opts the optional parameters - # @option opts [String] :type An optional parameter which determines the type of aggregation to be peformed. Possible values are &#x60;statement&#x60; and &#x60;history&#x60;. # @return [Array<(MemberResponseBody, Fixnum, Hash)>] MemberResponseBody data, response status code and response headers def aggregate_member_with_http_info(member_guid, user_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MembersApi.aggregate_member ...' end @@ -195,11 +191,10 @@ # resource path local_var_path = '/users/{user_guid}/members/{member_guid}/aggregate'.sub('{' + 'member_guid' + '}', member_guid.to_s).sub('{' + 'user_guid' + '}', user_guid.to_s) # query parameters query_params = {} - query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.atrium.v1+json']) @@ -317,84 +312,86 @@ if @api_client.config.debugging @api_client.config.logger.debug "API called: MembersApi#delete_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List member accounts - # This endpoint returns an array with information about every account associated with a particular member. + # Extend history + # The extend_history endpoint begins the process of fetching up to 24 months of data associated with a particular &#x60;member&#x60;. # @param member_guid The unique identifier for a &#x60;member&#x60;. # @param user_guid The unique identifier for a &#x60;user&#x60;. # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Specify current page. - # @option opts [Integer] :records_per_page Specify records per page. - # @return [Array<(AccountsResponseBody, Fixnum, Hash)>] AccountsResponseBody data, response status code and response headers - def list_member_accounts_with_http_info(member_guid, user_guid, opts = {}) + # @return [Array<(MemberResponseBody, Fixnum, Hash)>] MemberResponseBody data, response status code and response headers + def extend_history_with_http_info(member_guid, user_guid, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MembersApi.list_member_accounts ...' + @api_client.config.logger.debug 'Calling API: MembersApi.extend_history ...' end # verify the required parameter 'member_guid' is set if @api_client.config.client_side_validation && member_guid.nil? - fail ArgumentError, "Missing the required parameter 'member_guid' when calling MembersApi.list_member_accounts" + fail ArgumentError, "Missing the required parameter 'member_guid' when calling MembersApi.extend_history" end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? - fail ArgumentError, "Missing the required parameter 'user_guid' when calling MembersApi.list_member_accounts" + fail ArgumentError, "Missing the required parameter 'user_guid' when calling MembersApi.extend_history" end # resource path - local_var_path = '/users/{user_guid}/members/{member_guid}/accounts'.sub('{' + 'member_guid' + '}', member_guid.to_s).sub('{' + 'user_guid' + '}', user_guid.to_s) + local_var_path = '/users/{user_guid}/members/{member_guid}/extend_history'.sub('{' + 'member_guid' + '}', member_guid.to_s).sub('{' + 'user_guid' + '}', user_guid.to_s) # query parameters query_params = {} - query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? - query_params[:'records_per_page'] = opts[:'records_per_page'] if !opts[:'records_per_page'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.atrium.v1+json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apiKey', 'clientID'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, + data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'AccountsResponseBody') + :return_type => 'MemberResponseBody') if @api_client.config.debugging - @api_client.config.logger.debug "API called: MembersApi#list_member_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: MembersApi#extend_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List member credentials - # This endpoint returns an array which contains information on every non-MFA credential associated with a specific member. + # List member accounts + # This endpoint returns an array with information about every account associated with a particular member. # @param member_guid The unique identifier for a &#x60;member&#x60;. # @param user_guid The unique identifier for a &#x60;user&#x60;. # @param [Hash] opts the optional parameters - # @return [Array<(CredentialsResponseBody, Fixnum, Hash)>] CredentialsResponseBody data, response status code and response headers - def list_member_credentials_with_http_info(member_guid, user_guid, opts = {}) + # @option opts [Integer] :page Specify current page. + # @option opts [Integer] :records_per_page Specify records per page. + # @return [Array<(AccountsResponseBody, Fixnum, Hash)>] AccountsResponseBody data, response status code and response headers + def list_member_accounts_with_http_info(member_guid, user_guid, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MembersApi.list_member_credentials ...' + @api_client.config.logger.debug 'Calling API: MembersApi.list_member_accounts ...' end # verify the required parameter 'member_guid' is set if @api_client.config.client_side_validation && member_guid.nil? - fail ArgumentError, "Missing the required parameter 'member_guid' when calling MembersApi.list_member_credentials" + fail ArgumentError, "Missing the required parameter 'member_guid' when calling MembersApi.list_member_accounts" end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? - fail ArgumentError, "Missing the required parameter 'user_guid' when calling MembersApi.list_member_credentials" + fail ArgumentError, "Missing the required parameter 'user_guid' when calling MembersApi.list_member_accounts" end # resource path - local_var_path = '/users/{user_guid}/members/{member_guid}/credentials'.sub('{' + 'member_guid' + '}', member_guid.to_s).sub('{' + 'user_guid' + '}', user_guid.to_s) + local_var_path = '/users/{user_guid}/members/{member_guid}/accounts'.sub('{' + 'member_guid' + '}', member_guid.to_s).sub('{' + 'user_guid' + '}', user_guid.to_s) # query parameters query_params = {} + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'records_per_page'] = opts[:'records_per_page'] if !opts[:'records_per_page'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.atrium.v1+json']) @@ -409,36 +406,36 @@ :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'CredentialsResponseBody') + :return_type => 'AccountsResponseBody') if @api_client.config.debugging - @api_client.config.logger.debug "API called: MembersApi#list_member_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: MembersApi#list_member_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List member MFA challenges - # Use this endpoint for information on what multi-factor authentication challenges need to be answered in order to aggregate a member.&lt;br&gt; If the aggregation is not challenged, i.e., the member does not have a connection status of CHALLENGED, then code 204 No Content will be returned.&lt;br&gt; If the aggregation has been challenged, i.e., the member does have a connection status of CHALLENGED, then code 200 OK will be returned — along with the corresponding credentials. + # List member credentials + # This endpoint returns an array which contains information on every non-MFA credential associated with a specific member. # @param member_guid The unique identifier for a &#x60;member&#x60;. # @param user_guid The unique identifier for a &#x60;user&#x60;. # @param [Hash] opts the optional parameters - # @return [Array<(ChallengesResponseBody, Fixnum, Hash)>] ChallengesResponseBody data, response status code and response headers - def list_member_mfa_challenges_with_http_info(member_guid, user_guid, opts = {}) + # @return [Array<(CredentialsResponseBody, Fixnum, Hash)>] CredentialsResponseBody data, response status code and response headers + def list_member_credentials_with_http_info(member_guid, user_guid, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MembersApi.list_member_mfa_challenges ...' + @api_client.config.logger.debug 'Calling API: MembersApi.list_member_credentials ...' end # verify the required parameter 'member_guid' is set if @api_client.config.client_side_validation && member_guid.nil? - fail ArgumentError, "Missing the required parameter 'member_guid' when calling MembersApi.list_member_mfa_challenges" + fail ArgumentError, "Missing the required parameter 'member_guid' when calling MembersApi.list_member_credentials" end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? - fail ArgumentError, "Missing the required parameter 'user_guid' when calling MembersApi.list_member_mfa_challenges" + fail ArgumentError, "Missing the required parameter 'user_guid' when calling MembersApi.list_member_credentials" end # resource path - local_var_path = '/users/{user_guid}/members/{member_guid}/challenges'.sub('{' + 'member_guid' + '}', member_guid.to_s).sub('{' + 'user_guid' + '}', user_guid.to_s) + local_var_path = '/users/{user_guid}/members/{member_guid}/credentials'.sub('{' + 'member_guid' + '}', member_guid.to_s).sub('{' + 'user_guid' + '}', user_guid.to_s) # query parameters query_params = {} # header parameters @@ -456,43 +453,39 @@ :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ChallengesResponseBody') + :return_type => 'CredentialsResponseBody') if @api_client.config.debugging - @api_client.config.logger.debug "API called: MembersApi#list_member_mfa_challenges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: MembersApi#list_member_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List member statements - # Certain institutions in Atrium allow developers to access account statements associated with a particular &#x60;member&#x60;. Use this endpoint to get an array of available statements. Before this endpoint can be used, an aggregation of type &#x60;statement&#x60; should be performed on the relevant &#x60;member&#x60;. + # List member MFA challenges + # Use this endpoint for information on what multi-factor authentication challenges need to be answered in order to aggregate a member.&lt;br&gt; If the aggregation is not challenged, i.e., the member does not have a connection status of CHALLENGED, then code 204 No Content will be returned.&lt;br&gt; If the aggregation has been challenged, i.e., the member does have a connection status of CHALLENGED, then code 200 OK will be returned — along with the corresponding credentials. # @param member_guid The unique identifier for a &#x60;member&#x60;. # @param user_guid The unique identifier for a &#x60;user&#x60;. # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Specify current page. - # @option opts [Integer] :records_per_page Specify records per page. - # @return [Array<(StatementsResponseBody, Fixnum, Hash)>] StatementsResponseBody data, response status code and response headers - def list_member_statements_with_http_info(member_guid, user_guid, opts = {}) + # @return [Array<(ChallengesResponseBody, Fixnum, Hash)>] ChallengesResponseBody data, response status code and response headers + def list_member_mfa_challenges_with_http_info(member_guid, user_guid, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MembersApi.list_member_statements ...' + @api_client.config.logger.debug 'Calling API: MembersApi.list_member_mfa_challenges ...' end # verify the required parameter 'member_guid' is set if @api_client.config.client_side_validation && member_guid.nil? - fail ArgumentError, "Missing the required parameter 'member_guid' when calling MembersApi.list_member_statements" + fail ArgumentError, "Missing the required parameter 'member_guid' when calling MembersApi.list_member_mfa_challenges" end # verify the required parameter 'user_guid' is set if @api_client.config.client_side_validation && user_guid.nil? - fail ArgumentError, "Missing the required parameter 'user_guid' when calling MembersApi.list_member_statements" + fail ArgumentError, "Missing the required parameter 'user_guid' when calling MembersApi.list_member_mfa_challenges" end # resource path - local_var_path = '/users/{user_guid}/members/{member_guid}/statements'.sub('{' + 'member_guid' + '}', member_guid.to_s).sub('{' + 'user_guid' + '}', user_guid.to_s) + local_var_path = '/users/{user_guid}/members/{member_guid}/challenges'.sub('{' + 'member_guid' + '}', member_guid.to_s).sub('{' + 'user_guid' + '}', user_guid.to_s) # query parameters query_params = {} - query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? - query_params[:'records_per_page'] = opts[:'records_per_page'] if !opts[:'records_per_page'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.atrium.v1+json']) @@ -507,12 +500,12 @@ :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'StatementsResponseBody') + :return_type => 'ChallengesResponseBody') if @api_client.config.debugging - @api_client.config.logger.debug "API called: MembersApi#list_member_statements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: MembersApi#list_member_mfa_challenges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List member transactions # Use this endpoint to get all transactions from all accounts associated with a specific member.&lt;br&gt; This endpoint accepts optional URL query parameters — from_date and to_date — which are used to filter transactions according to the date they were posted. If no values are given for the query parameters, from_date will default to 90 days prior to the request and to_date will default to 5 days from the time of the request.