Class: CobroDigital::Pagador

Inherits:
Operador show all
Defined in:
lib/cobro_digital/pagador.rb

Constant Summary collapse

CREAR_PAGADOR_WS =
'crear_pagador'
EDITAR_PAGADOR_WS =
'editar_pagador'
VERIFICAR_PAGADOR_WS =
'verificar_existencia_pagador'
OBTENER_CODIGO_ELECTRONICO_WS =
'obtener_codigo_electronico'

Instance Attribute Summary

Attributes inherited from Operador

#http_method, #render, #response, #webservice

Class Method Summary collapse

Methods inherited from Operador

#call, #initialize, #parse_response, #request

Constructor Details

This class inherits a constructor from CobroDigital::Operador

Class Method Details

.codigo_electronico(identificador, buscar) ⇒ Object



33
34
35
36
37
38
# File 'lib/cobro_digital/pagador.rb', line 33

def self.codigo_electronico(identificador, buscar)
  CobroDigital::Pagador.new( :http_method => CobroDigital::Https::GET,
                             :webservice  => OBTENER_CODIGO_ELECTRONICO_WS,
                             :render      => { :identificador => identificador,
                                               :buscar        => buscar })
end

.crear(pagador) ⇒ Object

{ ‘Nombre’ => ‘Juan’, ‘Su_identificador’ => ‘1AF8’, ‘Unidad’ => ‘201’ }



10
11
12
13
14
# File 'lib/cobro_digital/pagador.rb', line 10

def self.crear(pagador)
  CobroDigital::Pagador.new( :http_method => CobroDigital::Https::POST,
                             :webservice  => CREAR_PAGADOR_WS,
                             :render      => { :pagador => pagador } )
end

.editar(identificador, buscar, pagador) ⇒ Object

{ ‘identificador’ => ‘Su_identificador’, ‘buscar’ => ‘1AF8’, ‘pagador’ => { ‘Nombre’=>‘Juan Pablo’ } }



17
18
19
20
21
22
23
# File 'lib/cobro_digital/pagador.rb', line 17

def self.editar(identificador, buscar, pagador)
  CobroDigital::Pagador.new( :http_method => CobroDigital::Https::POST,
                             :webservice  => EDITAR_PAGADOR_WS,
                             :render      => { :identificador => identificador,
                                               :buscar        => buscar,
                                               :pagador       => pagador })
end

.verificar(identificador, buscar) ⇒ Object

{ ‘identificador’ => ‘Su_identificador’, ‘buscar’=>‘1AF8’ }



26
27
28
29
30
31
# File 'lib/cobro_digital/pagador.rb', line 26

def self.verificar(identificador, buscar)
  CobroDigital::Pagador.new( :http_method => CobroDigital::Https::GET,
                             :webservice  => VERIFICAR_PAGADOR_WS,
                             :render      => { :identificador => identificador,
                                               :buscar        => buscar })
end