lib/velopayments/api/funding_manager_api.rb
# Transfer Funds between source accounts
# Transfer funds between source accounts for a Payor. The &#39;from&#39; source account is identified in the URL, and is the account which will be debited. The &#39;to&#39; (destination) source account is in the body, and is the account which will be credited. Both source accounts must belong to the same Payor. There must be sufficient balance in the &#39;from&#39; source account, otherwise the transfer attempt will fail.
# @param source_account_id [String] The &#39;from&#39; source account id, which will be debited
# @param transfer_request [TransferRequest] Body
# @param [Hash] opts the optional parameters
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
Transfer Funds between source accounts
Transfer funds between source accounts for a Payor. The 'from' source account is identified in the URL, and is the account which will be debited. The 'to' (destination) source account is in the body, and is the account which will be credited. Both source accounts must belong to the same Payor. There must be sufficient balance in the 'from' source account, otherwise the transfer attempt will fail.
Transfer Funds between source accounts Transfer funds between source accounts for a Payor . The ' from ' source account is identified in the URL and is the account which will be debited . The ' to ' ( destination ) source account is in the body and is the account which will be credited . Both source accounts must belong to the same Payor . There must be sufficient balance in the ' from ' source account otherwise the transfer attempt will fail .
def transfer_funds_with_http_info(source_account_id, transfer_request, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: FundingManagerApi.transfer_funds ...'
      end
      if @api_client.config.client_side_validation && source_account_id.nil?
        fail ArgumentError, "Missing the required parameter 'source_account_id' when calling FundingManagerApi.transfer_funds"
      end
      if @api_client.config.client_side_validation && transfer_request.nil?
        fail ArgumentError, "Missing the required parameter 'transfer_request' when calling FundingManagerApi.transfer_funds"
      end
      local_var_path = '/v2/sourceAccounts/{sourceAccountId}/transfers'.sub('{' + 'sourceAccountId' + '}', CGI.escape(source_account_id.to_s))
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body] || @api_client.object_to_http_body(transfer_request)
      return_type = opts[:debug_return_type]
      auth_names = opts[:debug_auth_names] || ['OAuth2']
      new_options = opts.merge(
        :operation => :"FundingManagerApi.transfer_funds",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )
      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: FundingManagerApi#transfer_funds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def transfer_funds_with_http_info ( source_account_id , transfer_request , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: FundingManagerApi.transfer_funds ...' end if @api_client . config . client_side_validation && source_account_id . nil? fail ArgumentError , "Missing the required parameter 'source_account_id' when calling FundingManagerApi.transfer_funds" end if @api_client . config . client_side_validation && transfer_request . nil? fail ArgumentError , "Missing the required parameter 'transfer_request' when calling FundingManagerApi.transfer_funds" end local_var_path = '/v2/sourceAccounts/{sourceAccountId}/transfers' . sub ( '{' + 'sourceAccountId' + '}' , CGI . escape ( source_account_id . to_s ) ) query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( transfer_request ) return_type = opts [ :debug_return_type ] auth_names = opts [ :debug_auth_names ] || [ 'OAuth2' ] new_options = opts . merge ( :operation => :" FundingManagerApi.transfer_funds " , :header_params => header_params , :query_params => query_params , :form_params => form_params , :body => post_body , :auth_names => auth_names , :return_type => return_type ) data , status_code , headers = @api_client . call_api ( :POST , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: FundingManagerApi#transfer_funds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Transfer Funds between source accounts
Transfer funds between source accounts for a Payor.
Transfer Funds between source accounts Transfer funds between source accounts for a Payor .
# verify the required parameter 'source_account_id' is set # verify the required parameter 'transfer_request' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model) # return_type # auth_names
nil, response status code and response headers
nil response status code and response headers
Array<(nil, Integer, Hash)>
source_account_id
The 'from' source account id, which will be debited
The ' from ' source account id which will be debited
transfer_request
None
opts
<not_specific>
<not_specific>
opts the optional parameters
opts the optional parameters