class TreezorClient::BeneficiariesApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/treezor_client/api/beneficiaries_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

get_beneficiaries(opts = {}) click to toggle source

search beneficiary bank accounts Get beneficiary bank accounts that match search criteria. @param [Hash] opts the optional parameters @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](agent.treezor.com/security-authentication). @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](agent.treezor.com/basics). @option opts [Integer] :access_user_id Access user&#39;s id is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [String] :access_user_ip Access user&#39;s ip is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [Array<String>] :fields List of the object&#39;s properties you want to pick up. @option opts [String] :filter You can filter the API response by using filter(s). Filterable fields are : - id - tag - userId - isActive - nickName - address - iban (encrypted IBAN) - IbanInClear - bic - sepaCreditorIdentifier - usableForSct Filters should be separated by a ";&quot;. Example for 3 filters : FILTER1;FILTER2;FILTER3. A single filter has the following syntax : "fieldName criterion expression&quot;. Where : - fieldName : the name of a filterable field of this object. - expression : the values to be included or excluded (see the table below for more information) - criterion : a filter criterion. Here are the possible values for criterion : | Criteria | Description | Type | Expression Example | |———-|————————|——————————————|——————–| | &gt; | greater than | alphanumeric string | 100 | | &gt;&#x3D; | greater or equal than | alphanumeric string | 100 | | &lt; | less than | alphanumeric string | 100 | | &lt;&#x3D; | less or equal than | alphanumeric string | 100 | | !&#x3D; | not equal to | alphanumeric string | 100 | | like | like | alphanumeric string | 100 | | in | in | alphanumeric strings separated by commas | 100,30,25 | | &#x3D;&#x3D; | equals | alphanumeric string | 100 | @option opts [Integer] :id Beneficiary bank account id. @option opts [Integer] :user_id Owner user&#39;s id. (deprecated, you must use the parameter filter) @option opts [String] :iban Beneficiary bank account IBAN. (deprecated, you must use the parameter filter) @option opts [String] :bic Beneficiary bank account BIC. (deprecated, you must use the parameter filter) @option opts [String] :nick_name Beneficiary bank account&#39;s nick name. (deprecated, you must use the parameter filter) @option opts [String] :name Beneficiary bank account owner&#39;s name. (deprecated, you must use the parameter filter) @option opts [Integer] :page_number Pagination page number. More info [here](agent.treezor.com/lists). @option opts [Integer] :page_count The number of items per page. More info [here](agent.treezor.com/lists). @option opts [String] :sort_by The transaction element you want to sort the list with. Default value : createdDate. More info [here](agent.treezor.com/lists). @option opts [String] :sort_order The order you want to sort the list. * DESC for a descending sort * ASC for a ascending sort. Default value : DESC. More info [here](agent.treezor.com/lists). @return [InlineResponse2002]

# File lib/treezor_client/api/beneficiaries_api.rb, line 42
def get_beneficiaries(opts = {})
  data, _status_code, _headers = get_beneficiaries_with_http_info(opts)
  data
end
get_beneficiaries_with_http_info(opts = {}) click to toggle source

search beneficiary bank accounts Get beneficiary bank accounts that match search criteria. @param [Hash] opts the optional parameters @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](agent.treezor.com/security-authentication). @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](agent.treezor.com/basics). @option opts [Integer] :access_user_id Access user&#39;s id is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [String] :access_user_ip Access user&#39;s ip is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [Array<String>] :fields List of the object&#39;s properties you want to pick up. @option opts [String] :filter You can filter the API response by using filter(s). Filterable fields are : - id - tag - userId - isActive - nickName - address - iban (encrypted IBAN) - IbanInClear - bic - sepaCreditorIdentifier - usableForSct Filters should be separated by a ";&quot;. Example for 3 filters : FILTER1;FILTER2;FILTER3. A single filter has the following syntax : "fieldName criterion expression&quot;. Where : - fieldName : the name of a filterable field of this object. - expression : the values to be included or excluded (see the table below for more information) - criterion : a filter criterion. Here are the possible values for criterion : | Criteria | Description | Type | Expression Example | |———-|————————|——————————————|——————–| | &gt; | greater than | alphanumeric string | 100 | | &gt;&#x3D; | greater or equal than | alphanumeric string | 100 | | &lt; | less than | alphanumeric string | 100 | | &lt;&#x3D; | less or equal than | alphanumeric string | 100 | | !&#x3D; | not equal to | alphanumeric string | 100 | | like | like | alphanumeric string | 100 | | in | in | alphanumeric strings separated by commas | 100,30,25 | | &#x3D;&#x3D; | equals | alphanumeric string | 100 | @option opts [Integer] :id Beneficiary bank account id. @option opts [Integer] :user_id Owner user&#39;s id. (deprecated, you must use the parameter filter) @option opts [String] :iban Beneficiary bank account IBAN. (deprecated, you must use the parameter filter) @option opts [String] :bic Beneficiary bank account BIC. (deprecated, you must use the parameter filter) @option opts [String] :nick_name Beneficiary bank account&#39;s nick name. (deprecated, you must use the parameter filter) @option opts [String] :name Beneficiary bank account owner&#39;s name. (deprecated, you must use the parameter filter) @option opts [Integer] :page_number Pagination page number. More info [here](agent.treezor.com/lists). @option opts [Integer] :page_count The number of items per page. More info [here](agent.treezor.com/lists). @option opts [String] :sort_by The transaction element you want to sort the list with. Default value : createdDate. More info [here](agent.treezor.com/lists). @option opts [String] :sort_order The order you want to sort the list. * DESC for a descending sort * ASC for a ascending sort. Default value : DESC. More info [here](agent.treezor.com/lists). @return [Array<(InlineResponse2002, Fixnum, Hash)>] InlineResponse2002 data, response status code and response headers

# File lib/treezor_client/api/beneficiaries_api.rb, line 67
def get_beneficiaries_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BeneficiariesApi.get_beneficiaries ...'
  end
  # resource path
  local_var_path = '/beneficiaries'

  # query parameters
  query_params = {}
  query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil?
  query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil?
  query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil?
  query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil?
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil?
  query_params[:'iban'] = opts[:'iban'] if !opts[:'iban'].nil?
  query_params[:'bic'] = opts[:'bic'] if !opts[:'bic'].nil?
  query_params[:'nickName'] = opts[:'nick_name'] if !opts[:'nick_name'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'pageNumber'] = opts[:'page_number'] if !opts[:'page_number'].nil?
  query_params[:'pageCount'] = opts[:'page_count'] if !opts[:'page_count'].nil?
  query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/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 = ['api_key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2002')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BeneficiariesApi#get_beneficiaries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_beneficiary(id, opts = {}) click to toggle source

get a beneficiary bank account Get a beneficiary bank account from the system. @param id Beneficiary Bank Accounts internal id. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields List of the object&#39;s properties you want to pick up. @return [InlineResponse2002]

# File lib/treezor_client/api/beneficiaries_api.rb, line 124
def get_beneficiary(id, opts = {})
  data, _status_code, _headers = get_beneficiary_with_http_info(id, opts)
  data
end
get_beneficiary_with_http_info(id, opts = {}) click to toggle source

get a beneficiary bank account Get a beneficiary bank account from the system. @param id Beneficiary Bank Accounts internal id. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields List of the object&#39;s properties you want to pick up. @return [Array<(InlineResponse2002, Fixnum, Hash)>] InlineResponse2002 data, response status code and response headers

# File lib/treezor_client/api/beneficiaries_api.rb, line 135
def get_beneficiary_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BeneficiariesApi.get_beneficiary ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling BeneficiariesApi.get_beneficiary"
  end
  # resource path
  local_var_path = '/beneficiaries/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/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 = ['api_key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2002')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BeneficiariesApi#get_beneficiary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_beneficiary(opts = {}) click to toggle source

create a beneficiary Create a new benefeciary bank account in the system. @param [Hash] opts the optional parameters @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](agent.treezor.com/security-authentication). @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](agent.treezor.com/basics). @option opts [Integer] :access_user_id Access user&#39;s id is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [String] :access_user_ip Access user&#39;s ip is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [Body] :body @return [InlineResponse2002]

# File lib/treezor_client/api/beneficiaries_api.rb, line 184
def post_beneficiary(opts = {})
  data, _status_code, _headers = post_beneficiary_with_http_info(opts)
  data
end
post_beneficiary_with_http_info(opts = {}) click to toggle source

create a beneficiary Create a new benefeciary bank account in the system. @param [Hash] opts the optional parameters @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](agent.treezor.com/security-authentication). @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](agent.treezor.com/basics). @option opts [Integer] :access_user_id Access user&#39;s id is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [String] :access_user_ip Access user&#39;s ip is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [Body] :body @return [Array<(InlineResponse2002, Fixnum, Hash)>] InlineResponse2002 data, response status code and response headers

# File lib/treezor_client/api/beneficiaries_api.rb, line 198
def post_beneficiary_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BeneficiariesApi.post_beneficiary ...'
  end
  # resource path
  local_var_path = '/beneficiaries'

  # query parameters
  query_params = {}
  query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil?
  query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil?
  query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil?
  query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/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 = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['api_key']
  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 => 'InlineResponse2002')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BeneficiariesApi#post_beneficiary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_beneficiary(id, opts = {}) click to toggle source

edit a beneficiary Edit a benefeciary bank account in the system. @param id Beneficiary&#39;s id. @param [Hash] opts the optional parameters @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](agent.treezor.com/security-authentication). @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](agent.treezor.com/basics). @option opts [Integer] :access_user_id Access user&#39;s id is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [String] :access_user_ip Access user&#39;s ip is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [Body1] :body @return [InlineResponse2002]

# File lib/treezor_client/api/beneficiaries_api.rb, line 247
def put_beneficiary(id, opts = {})
  data, _status_code, _headers = put_beneficiary_with_http_info(id, opts)
  data
end
put_beneficiary_with_http_info(id, opts = {}) click to toggle source

edit a beneficiary Edit a benefeciary bank account in the system. @param id Beneficiary&#39;s id. @param [Hash] opts the optional parameters @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](agent.treezor.com/security-authentication). @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](agent.treezor.com/basics). @option opts [Integer] :access_user_id Access user&#39;s id is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [String] :access_user_ip Access user&#39;s ip is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [Body1] :body @return [Array<(InlineResponse2002, Fixnum, Hash)>] InlineResponse2002 data, response status code and response headers

# File lib/treezor_client/api/beneficiaries_api.rb, line 262
def put_beneficiary_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BeneficiariesApi.put_beneficiary ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling BeneficiariesApi.put_beneficiary"
  end
  # resource path
  local_var_path = '/beneficiaries/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil?
  query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil?
  query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil?
  query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/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 = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2002')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BeneficiariesApi#put_beneficiary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end