class VeloPayments::PayorsApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

get_payor_by_id(payor_id, opts = {}) click to toggle source

Get Payor Get a Single Payor by Id. @param payor_id [String] The account owner Payor ID @param [Hash] opts the optional parameters @return [PayorV1]

# File lib/velopayments/api/payors_api.rb, line 27
def get_payor_by_id(payor_id, opts = {})
  data, _status_code, _headers = get_payor_by_id_with_http_info(payor_id, opts)
  data
end
get_payor_by_id_v2(payor_id, opts = {}) click to toggle source

Get Payor Get a Single Payor by Id. @param payor_id [String] The account owner Payor ID @param [Hash] opts the optional parameters @return [PayorV2]

# File lib/velopayments/api/payors_api.rb, line 89
def get_payor_by_id_v2(payor_id, opts = {})
  data, _status_code, _headers = get_payor_by_id_v2_with_http_info(payor_id, opts)
  data
end
get_payor_by_id_v2_with_http_info(payor_id, opts = {}) click to toggle source

Get Payor Get a Single Payor by Id. @param payor_id [String] The account owner Payor ID @param [Hash] opts the optional parameters @return [Array<(PayorV2, Integer, Hash)>] PayorV2 data, response status code and response headers

# File lib/velopayments/api/payors_api.rb, line 99
def get_payor_by_id_v2_with_http_info(payor_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayorsApi.get_payor_by_id_v2 ...'
  end
  # verify the required parameter 'payor_id' is set
  if @api_client.config.client_side_validation && payor_id.nil?
    fail ArgumentError, "Missing the required parameter 'payor_id' when calling PayorsApi.get_payor_by_id_v2"
  end
  # resource path
  local_var_path = '/v2/payors/{payorId}'.sub('{' + 'payorId' + '}', CGI.escape(payor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PayorV2' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayorsApi#get_payor_by_id_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_payor_by_id_with_http_info(payor_id, opts = {}) click to toggle source

Get Payor Get a Single Payor by Id. @param payor_id [String] The account owner Payor ID @param [Hash] opts the optional parameters @return [Array<(PayorV1, Integer, Hash)>] PayorV1 data, response status code and response headers

# File lib/velopayments/api/payors_api.rb, line 37
def get_payor_by_id_with_http_info(payor_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayorsApi.get_payor_by_id ...'
  end
  # verify the required parameter 'payor_id' is set
  if @api_client.config.client_side_validation && payor_id.nil?
    fail ArgumentError, "Missing the required parameter 'payor_id' when calling PayorsApi.get_payor_by_id"
  end
  # resource path
  local_var_path = '/v1/payors/{payorId}'.sub('{' + 'payorId' + '}', CGI.escape(payor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PayorV1' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayorsApi#get_payor_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
payor_add_payor_logo_with_http_info(payor_id, opts = {}) click to toggle source

Add Logo Add Payor Logo. Logo file is used in your branding, and emails sent to payees. @param payor_id [String] The account owner Payor ID @param [Hash] opts the optional parameters @option opts [File] :logo @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/velopayments/api/payors_api.rb, line 163
def payor_add_payor_logo_with_http_info(payor_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayorsApi.payor_add_payor_logo ...'
  end
  # verify the required parameter 'payor_id' is set
  if @api_client.config.client_side_validation && payor_id.nil?
    fail ArgumentError, "Missing the required parameter 'payor_id' when calling PayorsApi.payor_add_payor_logo"
  end
  # resource path
  local_var_path = '/v1/payors/{payorId}/branding/logos'.sub('{' + 'payorId' + '}', CGI.escape(payor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[: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(['multipart/form-data'])

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['logo'] = opts[:'logo'] if !opts[:'logo'].nil?

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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: PayorsApi#payor_add_payor_logo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
payor_create_api_key_request(payor_id, application_id, payor_create_api_key_request, opts = {}) click to toggle source

Create API Key Create an an API key for the given payor Id and application Id @param payor_id [String] The account owner Payor ID @param application_id [String] Application ID @param payor_create_api_key_request [PayorCreateApiKeyRequest] Details of application API key to create @param [Hash] opts the optional parameters @return [PayorCreateApiKeyResponse]

# File lib/velopayments/api/payors_api.rb, line 220
def payor_create_api_key_request(payor_id, application_id, payor_create_api_key_request, opts = {})
  data, _status_code, _headers = payor_create_api_key_request_with_http_info(payor_id, application_id, payor_create_api_key_request, opts)
  data
end
payor_create_api_key_request_with_http_info(payor_id, application_id, payor_create_api_key_request, opts = {}) click to toggle source

Create API Key Create an an API key for the given payor Id and application Id @param payor_id [String] The account owner Payor ID @param application_id [String] Application ID @param payor_create_api_key_request [PayorCreateApiKeyRequest] Details of application API key to create @param [Hash] opts the optional parameters @return [Array<(PayorCreateApiKeyResponse, Integer, Hash)>] PayorCreateApiKeyResponse data, response status code and response headers

# File lib/velopayments/api/payors_api.rb, line 232
def payor_create_api_key_request_with_http_info(payor_id, application_id, payor_create_api_key_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayorsApi.payor_create_api_key_request ...'
  end
  # verify the required parameter 'payor_id' is set
  if @api_client.config.client_side_validation && payor_id.nil?
    fail ArgumentError, "Missing the required parameter 'payor_id' when calling PayorsApi.payor_create_api_key_request"
  end
  # verify the required parameter 'application_id' is set
  if @api_client.config.client_side_validation && application_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_id' when calling PayorsApi.payor_create_api_key_request"
  end
  # verify the required parameter 'payor_create_api_key_request' is set
  if @api_client.config.client_side_validation && payor_create_api_key_request.nil?
    fail ArgumentError, "Missing the required parameter 'payor_create_api_key_request' when calling PayorsApi.payor_create_api_key_request"
  end
  # resource path
  local_var_path = '/v1/payors/{payorId}/applications/{applicationId}/keys'.sub('{' + 'payorId' + '}', CGI.escape(payor_id.to_s)).sub('{' + 'applicationId' + '}', CGI.escape(application_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[: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 = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(payor_create_api_key_request) 

  # return_type
  return_type = opts[:return_type] || 'PayorCreateApiKeyResponse' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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: PayorsApi#payor_create_api_key_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
payor_create_application_request(payor_id, payor_create_application_request, opts = {}) click to toggle source

Create Application Create an application for the given Payor ID. Applications are programatic users which can be assigned unique keys. @param payor_id [String] The account owner Payor ID @param payor_create_application_request [PayorCreateApplicationRequest] Details of application to create @param [Hash] opts the optional parameters @return [nil]

# File lib/velopayments/api/payors_api.rb, line 295
def payor_create_application_request(payor_id, payor_create_application_request, opts = {})
  payor_create_application_request_with_http_info(payor_id, payor_create_application_request, opts)
  nil
end
payor_create_application_request_with_http_info(payor_id, payor_create_application_request, opts = {}) click to toggle source

Create Application Create an application for the given Payor ID. Applications are programatic users which can be assigned unique keys. @param payor_id [String] The account owner Payor ID @param payor_create_application_request [PayorCreateApplicationRequest] Details of application to create @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/velopayments/api/payors_api.rb, line 306
def payor_create_application_request_with_http_info(payor_id, payor_create_application_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayorsApi.payor_create_application_request ...'
  end
  # verify the required parameter 'payor_id' is set
  if @api_client.config.client_side_validation && payor_id.nil?
    fail ArgumentError, "Missing the required parameter 'payor_id' when calling PayorsApi.payor_create_application_request"
  end
  # verify the required parameter 'payor_create_application_request' is set
  if @api_client.config.client_side_validation && payor_create_application_request.nil?
    fail ArgumentError, "Missing the required parameter 'payor_create_application_request' when calling PayorsApi.payor_create_application_request"
  end
  # resource path
  local_var_path = '/v1/payors/{payorId}/applications'.sub('{' + 'payorId' + '}', CGI.escape(payor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[: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 = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(payor_create_application_request) 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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: PayorsApi#payor_create_application_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
payor_email_opt_out(payor_id, payor_email_opt_out_request, opts = {}) click to toggle source

Reminder Email Opt-Out Update the emailRemindersOptOut field for a Payor. This API can be used to opt out or opt into Payor Reminder emails. These emails are typically around payee events such as payees registering and onboarding. @param payor_id [String] The account owner Payor ID @param payor_email_opt_out_request [PayorEmailOptOutRequest] Reminder Emails Opt-Out Request @param [Hash] opts the optional parameters @return [nil]

# File lib/velopayments/api/payors_api.rb, line 365
def payor_email_opt_out(payor_id, payor_email_opt_out_request, opts = {})
  payor_email_opt_out_with_http_info(payor_id, payor_email_opt_out_request, opts)
  nil
end
payor_email_opt_out_with_http_info(payor_id, payor_email_opt_out_request, opts = {}) click to toggle source

Reminder Email Opt-Out Update the emailRemindersOptOut field for a Payor. This API can be used to opt out or opt into Payor Reminder emails. These emails are typically around payee events such as payees registering and onboarding. @param payor_id [String] The account owner Payor ID @param payor_email_opt_out_request [PayorEmailOptOutRequest] Reminder Emails Opt-Out Request @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/velopayments/api/payors_api.rb, line 376
def payor_email_opt_out_with_http_info(payor_id, payor_email_opt_out_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayorsApi.payor_email_opt_out ...'
  end
  # verify the required parameter 'payor_id' is set
  if @api_client.config.client_side_validation && payor_id.nil?
    fail ArgumentError, "Missing the required parameter 'payor_id' when calling PayorsApi.payor_email_opt_out"
  end
  # verify the required parameter 'payor_email_opt_out_request' is set
  if @api_client.config.client_side_validation && payor_email_opt_out_request.nil?
    fail ArgumentError, "Missing the required parameter 'payor_email_opt_out_request' when calling PayorsApi.payor_email_opt_out"
  end
  # resource path
  local_var_path = '/v1/payors/{payorId}/reminderEmailsUpdate'.sub('{' + 'payorId' + '}', CGI.escape(payor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[: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 = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(payor_email_opt_out_request) 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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: PayorsApi#payor_email_opt_out\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
payor_get_branding(payor_id, opts = {}) click to toggle source

Get Branding Get the payor branding details. @param payor_id [String] The account owner Payor ID @param [Hash] opts the optional parameters @return [PayorBrandingResponse]

# File lib/velopayments/api/payors_api.rb, line 434
def payor_get_branding(payor_id, opts = {})
  data, _status_code, _headers = payor_get_branding_with_http_info(payor_id, opts)
  data
end
payor_get_branding_with_http_info(payor_id, opts = {}) click to toggle source

Get Branding Get the payor branding details. @param payor_id [String] The account owner Payor ID @param [Hash] opts the optional parameters @return [Array<(PayorBrandingResponse, Integer, Hash)>] PayorBrandingResponse data, response status code and response headers

# File lib/velopayments/api/payors_api.rb, line 444
def payor_get_branding_with_http_info(payor_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PayorsApi.payor_get_branding ...'
  end
  # verify the required parameter 'payor_id' is set
  if @api_client.config.client_side_validation && payor_id.nil?
    fail ArgumentError, "Missing the required parameter 'payor_id' when calling PayorsApi.payor_get_branding"
  end
  # resource path
  local_var_path = '/v1/payors/{payorId}/branding'.sub('{' + 'payorId' + '}', CGI.escape(payor_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'PayorBrandingResponse' 

  # auth_names
  auth_names = opts[:auth_names] || ['OAuth2']

  new_options = opts.merge(
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PayorsApi#payor_get_branding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end