class Wire4Client::PuntosDeVentaCoDiApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

create_sales_point(authorization, company_id, sales_point_info, opts = {}) click to toggle source

Registro de punto de venta. Se registra un punto de venta (TPV) desde donde se emitarán los cobros CODI®. El punto de venta se debe asociar a un cuenta CLABE registrada previamente ante Banxico para realizar cobros con CODI®. @param authorization Header para token @param company_id Es el identificador de la empresa. @param sales_point_info Es el objeto que contiene información del punto de venta CODI®. @param [Hash] opts the optional parameters @return [SalesPointRespose]

# File lib/wire4_client/api/puntos_de_venta_co_di_api.rb, line 29
def create_sales_point(authorization, company_id, sales_point_info, opts = {})
  data, _status_code, _headers = create_sales_point_with_http_info(authorization, company_id, sales_point_info, opts)
  data
end
create_sales_point_with_http_info(authorization, company_id, sales_point_info, opts = {}) click to toggle source

Registro de punto de venta. Se registra un punto de venta (TPV) desde donde se emitarán los cobros CODI®. El punto de venta se debe asociar a un cuenta CLABE registrada previamente ante Banxico para realizar cobros con CODI®. @param authorization Header para token @param company_id Es el identificador de la empresa. @param sales_point_info Es el objeto que contiene información del punto de venta CODI®. @param [Hash] opts the optional parameters @return [Array<(SalesPointRespose, Fixnum, Hash)>] SalesPointRespose data, response status code and response headers

# File lib/wire4_client/api/puntos_de_venta_co_di_api.rb, line 41
def create_sales_point_with_http_info(authorization, company_id, sales_point_info, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PuntosDeVentaCoDiApi.create_sales_point ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling PuntosDeVentaCoDiApi.create_sales_point"
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling PuntosDeVentaCoDiApi.create_sales_point"
  end
  # verify the required parameter 'sales_point_info' is set
  if @api_client.config.client_side_validation && sales_point_info.nil?
    fail ArgumentError, "Missing the required parameter 'sales_point_info' when calling PuntosDeVentaCoDiApi.create_sales_point"
  end
  # resource path
  local_var_path = '/codi/companies/salespoint'

  # query parameters
  query_params = {}
  query_params[:'companyId'] = company_id

  # 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'])
  header_params[:'Authorization'] = authorization

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(sales_point_info)
  auth_names = []
  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 => 'SalesPointRespose')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PuntosDeVentaCoDiApi#create_sales_point\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
obtain_sale_points(authorization, company_id, opts = {}) click to toggle source

Consulta de puntos de venta Obtiene los puntos de venta asociados a una empresa en las cuales se hacen operaciones CODI®. @param authorization Header para token @param company_id Es el identificador de la empresa. Ejemplo: 8838d513-5916-4662-bb30-2448f0f543ed @param [Hash] opts the optional parameters @return [Array<SalesPointFound>]

# File lib/wire4_client/api/puntos_de_venta_co_di_api.rb, line 96
def obtain_sale_points(authorization, company_id, opts = {})
  data, _status_code, _headers = obtain_sale_points_with_http_info(authorization, company_id, opts)
  data
end
obtain_sale_points_with_http_info(authorization, company_id, opts = {}) click to toggle source

Consulta de puntos de venta Obtiene los puntos de venta asociados a una empresa en las cuales se hacen operaciones CODI®. @param authorization Header para token @param company_id Es el identificador de la empresa. Ejemplo: 8838d513-5916-4662-bb30-2448f0f543ed @param [Hash] opts the optional parameters @return [Array<(Array<SalesPointFound>, Fixnum, Hash)>] Array<SalesPointFound> data, response status code and response headers

# File lib/wire4_client/api/puntos_de_venta_co_di_api.rb, line 107
def obtain_sale_points_with_http_info(authorization, company_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PuntosDeVentaCoDiApi.obtain_sale_points ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling PuntosDeVentaCoDiApi.obtain_sale_points"
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling PuntosDeVentaCoDiApi.obtain_sale_points"
  end
  # resource path
  local_var_path = '/codi/companies/salespoint'

  # query parameters
  query_params = {}
  query_params[:'companyId'] = company_id

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Array<SalesPointFound>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PuntosDeVentaCoDiApi#obtain_sale_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end