Class: CFDI::Entidad

Inherits:
ElementoComprobante show all
Defined in:
lib/entidad.rb

Overview

Una persona fiscal

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ElementoComprobante

data, #initialize, #to_h

Constructor Details

This class inherits a constructor from CFDI::ElementoComprobante

Instance Attribute Details

#domicilioFiscalCFDI::Domicilio, Hash

El domicilio de esta entidad

Returns:



10
11
12
# File 'lib/entidad.rb', line 10

def domicilioFiscal
  @domicilioFiscal
end

#expedidoEnCFDI::Domicilio, Hash

El domicilio de la sucursal de emisión

Returns:



10
11
12
# File 'lib/entidad.rb', line 10

def expedidoEn
  @expedidoEn
end

#nombreString

El nombre o razón social de la entidad

Returns:

  • (String)

    the current value of nombre



10
11
12
# File 'lib/entidad.rb', line 10

def nombre
  @nombre
end

#regimenFiscalString

El régimen fiscal, sólo de un emisor

Returns:

  • (String)

    the current value of regimenFiscal



10
11
12
# File 'lib/entidad.rb', line 10

def regimenFiscal
  @regimenFiscal
end

#rfcString

El RFC

Returns:

  • (String)

    the current value of rfc



10
11
12
# File 'lib/entidad.rb', line 10

def rfc
  @rfc
end

Instance Method Details

#cadena_originalObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/entidad.rb', line 19

def cadena_original
  expedido = @expedidoEn ? @expedidoEn.cadena_original : nil
  return [
    @rfc,
    @nombre,
    *@domicilioFiscal.cadena_original,
    expedido,
    @regimenFiscal
  ].flatten
end

#nsObject



52
53
54
55
56
57
# File 'lib/entidad.rb', line 52

def ns
  return ({
    nombre: @nombre,
    rfc: @rfc
  })
end