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'
CONSULTAR_ESTRUCTURA_PAGADORES_WS =
'consultar_estructura_pagadores'

Instance Attribute Summary

Attributes inherited from Operador

#client, #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



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

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’ }



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

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’ } }



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

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

.estructura_de_datosObject



41
42
43
44
45
# File 'lib/cobro_digital/pagador.rb', line 41

def self.estructura_de_datos
  CobroDigital::Pagador.new(:http_method => CobroDigital::Https::GET,
                            :webservice  => CONSULTAR_ESTRUCTURA_PAGADORES_WS,
                            :render      => {})
end

.verificar(identificador, buscar) ⇒ Object

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



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

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