class TreezorClient::PayoutApi
Attributes
Public Class Methods
# File lib/treezor_client/api/payout_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
cancel a payout Change pay out status to CANCELED. A VALIDATED pay out can't be canceled. @param id Payouts internal id. @param [Hash] opts the optional parameters @return [InlineResponse20019]
# File lib/treezor_client/api/payout_api.rb, line 27 def delete_payout(id, opts = {}) data, _status_code, _headers = delete_payout_with_http_info(id, opts) data end
cancel a payout Change pay out status to CANCELED. A VALIDATED pay out can't be canceled. @param id Payouts internal id. @param [Hash] opts the optional parameters @return [Array<(InlineResponse20019
, Fixnum, Hash)>] InlineResponse20019
data, response status code and response headers
# File lib/treezor_client/api/payout_api.rb, line 37 def delete_payout_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PayoutApi.delete_payout ...' 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 PayoutApi.delete_payout" end # resource path local_var_path = '/payouts/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # 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(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse20019') if @api_client.config.debugging @api_client.config.logger.debug "API called: PayoutApi#delete_payout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
get a payout Get a pay out from the system. @param id Payouts internal id. @param [Hash] opts the optional parameters @return [InlineResponse20019]
# File lib/treezor_client/api/payout_api.rb, line 81 def get_payout(id, opts = {}) data, _status_code, _headers = get_payout_with_http_info(id, opts) data end
get a payout Get a pay out from the system. @param id Payouts internal id. @param [Hash] opts the optional parameters @return [Array<(InlineResponse20019
, Fixnum, Hash)>] InlineResponse20019
data, response status code and response headers
# File lib/treezor_client/api/payout_api.rb, line 91 def get_payout_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PayoutApi.get_payout ...' 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 PayoutApi.get_payout" end # resource path local_var_path = '/payouts/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # 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 => 'InlineResponse20019') if @api_client.config.debugging @api_client.config.logger.debug "API called: PayoutApi#get_payout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
search payout(s) Get payout(s) that match search criteria. The request must contains at least one of those inputs payoutId, bankaccountId, beneficiaryId, payoutTypeId, payoutTag @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's id is used for user's action restriction. More info [here](agent.treezor.com/basics). @option opts [String] :access_user_ip Access user's ip is used for user's action restriction. More info [here](agent.treezor.com/basics). @option opts [Integer] :payout_id Payout's Id @option opts [String] :payout_tag Custom data. @option opts [String] :payout_status pay out status; Possible values: * CANCELED * PENDING * VALIDATED @option opts [Integer] :payout_type_id Pay out type's id : | ID | Description | |—–|—–| | 1 | Credit Transfer
| | 2 | Direct Debit | @option opts [Integer] :wallet_id Pay out wallet's id. @option opts [Integer] :user_id Pay out user's id. @option opts [DateTime] :payout_date pay out execution date. Format: YYYY-MM-DD HH:MM:SS' @option opts [Integer] :bankaccount_id Pay out bank account id. @option opts [Integer] :beneficiary_id Pay out beneficiary id. @option opts [String] :amount Pay out amount. @option opts [String] :currency Transfert amount currency. Format: [ISO 4217](fr.wikipedia.org/wiki/ISO_4217). @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). @option opts [DateTime] :created_date_from The creation date from which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists) @option opts [DateTime] :created_date_to The creation date up to which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists) @option opts [DateTime] :updated_date_from The modification date from which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists) @option opts [DateTime] :updated_date_to The modification date up to which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists) @return [InlineResponse20019]
# File lib/treezor_client/api/payout_api.rb, line 157 def get_payouts(opts = {}) data, _status_code, _headers = get_payouts_with_http_info(opts) data end
search payout(s) Get payout(s) that match search criteria. The request must contains at least one of those inputs payoutId, bankaccountId, beneficiaryId, payoutTypeId, payoutTag @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's id is used for user's action restriction. More info [here](agent.treezor.com/basics). @option opts [String] :access_user_ip Access user's ip is used for user's action restriction. More info [here](agent.treezor.com/basics). @option opts [Integer] :payout_id Payout's Id @option opts [String] :payout_tag Custom data. @option opts [String] :payout_status pay out status; Possible values: * CANCELED * PENDING * VALIDATED @option opts [Integer] :payout_type_id Pay out type's id : | ID | Description | |—–|—–| | 1 | Credit Transfer
| | 2 | Direct Debit | @option opts [Integer] :wallet_id Pay out wallet's id. @option opts [Integer] :user_id Pay out user's id. @option opts [DateTime] :payout_date pay out execution date. Format: YYYY-MM-DD HH:MM:SS' @option opts [Integer] :bankaccount_id Pay out bank account id. @option opts [Integer] :beneficiary_id Pay out beneficiary id. @option opts [String] :amount Pay out amount. @option opts [String] :currency Transfert amount currency. Format: [ISO 4217](fr.wikipedia.org/wiki/ISO_4217). @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). @option opts [DateTime] :created_date_from The creation date from which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists) @option opts [DateTime] :created_date_to The creation date up to which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists) @option opts [DateTime] :updated_date_from The modification date from which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists) @option opts [DateTime] :updated_date_to The modification date up to which you want to filter the request result. Format YYYY-MM-DD HH:MM:SS. More info [here](agent.treezor.com/lists) @return [Array<(InlineResponse20019
, Fixnum, Hash)>] InlineResponse20019
data, response status code and response headers
# File lib/treezor_client/api/payout_api.rb, line 189 def get_payouts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PayoutApi.get_payouts ...' end # resource path local_var_path = '/payouts' # 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[:'payoutId'] = opts[:'payout_id'] if !opts[:'payout_id'].nil? query_params[:'payoutTag'] = opts[:'payout_tag'] if !opts[:'payout_tag'].nil? query_params[:'payoutStatus'] = opts[:'payout_status'] if !opts[:'payout_status'].nil? query_params[:'payoutTypeId'] = opts[:'payout_type_id'] if !opts[:'payout_type_id'].nil? query_params[:'walletId'] = opts[:'wallet_id'] if !opts[:'wallet_id'].nil? query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? query_params[:'payoutDate'] = opts[:'payout_date'] if !opts[:'payout_date'].nil? query_params[:'bankaccountId'] = opts[:'bankaccount_id'] if !opts[:'bankaccount_id'].nil? query_params[:'beneficiaryId'] = opts[:'beneficiary_id'] if !opts[:'beneficiary_id'].nil? query_params[:'amount'] = opts[:'amount'] if !opts[:'amount'].nil? query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].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? query_params[:'createdDateFrom'] = opts[:'created_date_from'] if !opts[:'created_date_from'].nil? query_params[:'createdDateTo'] = opts[:'created_date_to'] if !opts[:'created_date_to'].nil? query_params[:'updatedDateFrom'] = opts[:'updated_date_from'] if !opts[:'updated_date_from'].nil? query_params[:'updatedDateTo'] = opts[:'updated_date_to'] if !opts[:'updated_date_to'].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 => 'InlineResponse20019') if @api_client.config.debugging @api_client.config.logger.debug "API called: PayoutApi#get_payouts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
create a pay out Create a new pay out in the system. @param wallet_id Pay out wallet id. @param amount Pay out amount. @param currency Transfert amount currency. Format: [ISO 4217](fr.wikipedia.org/wiki/ISO_4217). @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's id is used for user's action restriction. More info [here](agent.treezor.com/basics). @option opts [String] :access_user_ip Access user's ip is used for user's action restriction. More info [here](agent.treezor.com/basics). @option opts [String] :payout_tag Custom data. @option opts [Integer] :bankaccount_id Pay out bank account's id. Mandatory id beneficiaryId is not provided. If bankaccountId and beneficiaryId are both provided, the beneficiaryId will be used. @option opts [Integer] :beneficiary_id Pay out beneficiary's id. Mandatory id bankaccountId is not provided. If bankaccountId and beneficiaryId are both provided, the beneficiaryId will be used. @option opts [String] :label Pay out label that will be displayed in the receiver's account (140 chars max). @option opts [String] :supporting_file_link Support file link @return [InlineResponse20019]
# File lib/treezor_client/api/payout_api.rb, line 263 def post_payout(wallet_id, amount, currency, opts = {}) data, _status_code, _headers = post_payout_with_http_info(wallet_id, amount, currency, opts) data end
create a pay out Create a new pay out in the system. @param wallet_id Pay out wallet id. @param amount Pay out amount. @param currency Transfert amount currency. Format: [ISO 4217](fr.wikipedia.org/wiki/ISO_4217). @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's id is used for user's action restriction. More info [here](agent.treezor.com/basics). @option opts [String] :access_user_ip Access user's ip is used for user's action restriction. More info [here](agent.treezor.com/basics). @option opts [String] :payout_tag Custom data. @option opts [Integer] :bankaccount_id Pay out bank account's id. Mandatory id beneficiaryId is not provided. If bankaccountId and beneficiaryId are both provided, the beneficiaryId will be used. @option opts [Integer] :beneficiary_id Pay out beneficiary's id. Mandatory id bankaccountId is not provided. If bankaccountId and beneficiaryId are both provided, the beneficiaryId will be used. @option opts [String] :label Pay out label that will be displayed in the receiver's account (140 chars max). @option opts [String] :supporting_file_link Support file link @return [Array<(InlineResponse20019
, Fixnum, Hash)>] InlineResponse20019
data, response status code and response headers
# File lib/treezor_client/api/payout_api.rb, line 284 def post_payout_with_http_info(wallet_id, amount, currency, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PayoutApi.post_payout ...' end # verify the required parameter 'wallet_id' is set if @api_client.config.client_side_validation && wallet_id.nil? fail ArgumentError, "Missing the required parameter 'wallet_id' when calling PayoutApi.post_payout" end # verify the required parameter 'amount' is set if @api_client.config.client_side_validation && amount.nil? fail ArgumentError, "Missing the required parameter 'amount' when calling PayoutApi.post_payout" end # verify the required parameter 'currency' is set if @api_client.config.client_side_validation && currency.nil? fail ArgumentError, "Missing the required parameter 'currency' when calling PayoutApi.post_payout" end # resource path local_var_path = '/payouts' # query parameters query_params = {} query_params[:'walletId'] = wallet_id query_params[:'amount'] = amount query_params[:'currency'] = currency 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[:'payoutTag'] = opts[:'payout_tag'] if !opts[:'payout_tag'].nil? query_params[:'bankaccountId'] = opts[:'bankaccount_id'] if !opts[:'bankaccount_id'].nil? query_params[:'beneficiaryId'] = opts[:'beneficiary_id'] if !opts[:'beneficiary_id'].nil? query_params[:'label'] = opts[:'label'] if !opts[:'label'].nil? query_params[:'supportingFileLink'] = opts[:'supporting_file_link'] if !opts[:'supporting_file_link'].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(: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 => 'InlineResponse20019') if @api_client.config.debugging @api_client.config.logger.debug "API called: PayoutApi#post_payout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end