Class: Facturapi::Helpers::IdDoc

Inherits:
Object
  • Object
show all
Defined in:
lib/facturapi/helpers/id_doc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ IdDoc

Returns a new instance of IdDoc.



7
8
9
10
11
12
13
14
15
16
# File 'lib/facturapi/helpers/id_doc.rb', line 7

def initialize(params = {})
  @tipo_dte = params[:tipo_dte]
  @folio = params[:folio]
  @fch_emis = params[:fch_emis]
  @ind_servicio = params[:ind_servicio]
  @ind_mnt_neto = params[:ind_mnt_neto]
  @periodo_desde = params[:periodo_desde]
  @periodo_hasta = params[:periodo_hasta]
  @fch_venc = params[:fch_venc]
end

Instance Attribute Details

#fch_emisObject

Returns the value of attribute fch_emis.



4
5
6
# File 'lib/facturapi/helpers/id_doc.rb', line 4

def fch_emis
  @fch_emis
end

#fch_vencObject

Returns the value of attribute fch_venc.



4
5
6
# File 'lib/facturapi/helpers/id_doc.rb', line 4

def fch_venc
  @fch_venc
end

#folioObject

Returns the value of attribute folio.



4
5
6
# File 'lib/facturapi/helpers/id_doc.rb', line 4

def folio
  @folio
end

#ind_mnt_netoObject

Returns the value of attribute ind_mnt_neto.



4
5
6
# File 'lib/facturapi/helpers/id_doc.rb', line 4

def ind_mnt_neto
  @ind_mnt_neto
end

#ind_servicioObject

Returns the value of attribute ind_servicio.



4
5
6
# File 'lib/facturapi/helpers/id_doc.rb', line 4

def ind_servicio
  @ind_servicio
end

#periodo_desdeObject

Returns the value of attribute periodo_desde.



4
5
6
# File 'lib/facturapi/helpers/id_doc.rb', line 4

def periodo_desde
  @periodo_desde
end

#periodo_hastaObject

Returns the value of attribute periodo_hasta.



4
5
6
# File 'lib/facturapi/helpers/id_doc.rb', line 4

def periodo_hasta
  @periodo_hasta
end

#tipo_dteObject

Returns the value of attribute tipo_dte.



4
5
6
# File 'lib/facturapi/helpers/id_doc.rb', line 4

def tipo_dte
  @tipo_dte
end

Instance Method Details

#as_nodeObject



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/facturapi/helpers/id_doc.rb', line 18

def as_node
  create_node('IdDoc') do |id_doc|
    id_doc << create_node('TipoDTE') { |n| n << tipo_dte }
    id_doc << create_node('Folio') { |n| n << folio }
    id_doc << create_node('FchEmis') { |n| n << fch_emis }
    id_doc << create_node('IndServicio') { |n| n << ind_servicio }
    id_doc << create_node('IndMntNeto') { |n| n << ind_mnt_neto }
    id_doc << create_node('PeriodoDesde') { |n| n << periodo_desde }
    id_doc << create_node('PeriodoHasta') { |n| n << periodo_hasta }
    id_doc << create_node('FchVenc') { |n| n << fch_venc }
  end
end