Class: VerifactuRails::RespuestaConsulta::Anotado

Inherits:
Struct
  • Object
show all
Defined in:
lib/verifactu_rails/consulta.rb

Overview

Un registro tal y como la AEAT lo tiene guardado.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codigo_errorObject

Returns the value of attribute codigo_error

Returns:

  • (Object)

    the current value of codigo_error



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def codigo_error
  @codigo_error
end

#cuota_totalObject

Returns the value of attribute cuota_total

Returns:

  • (Object)

    the current value of cuota_total



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def cuota_total
  @cuota_total
end

#descripcion_errorObject

Returns the value of attribute descripcion_error

Returns:

  • (Object)

    the current value of descripcion_error



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def descripcion_error
  @descripcion_error
end

#estadoObject

Returns the value of attribute estado

Returns:

  • (Object)

    the current value of estado



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def estado
  @estado
end

#fecha_expedicionObject

Returns the value of attribute fecha_expedicion

Returns:

  • (Object)

    the current value of fecha_expedicion



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def fecha_expedicion
  @fecha_expedicion
end

#fecha_hora_genObject

Returns the value of attribute fecha_hora_gen

Returns:

  • (Object)

    the current value of fecha_hora_gen



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def fecha_hora_gen
  @fecha_hora_gen
end

#huellaObject

Returns the value of attribute huella

Returns:

  • (Object)

    the current value of huella



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def huella
  @huella
end

#huella_anteriorObject

Returns the value of attribute huella_anterior

Returns:

  • (Object)

    the current value of huella_anterior



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def huella_anterior
  @huella_anterior
end

#id_emisorObject

Returns the value of attribute id_emisor

Returns:

  • (Object)

    the current value of id_emisor



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def id_emisor
  @id_emisor
end

#importe_totalObject

Returns the value of attribute importe_total

Returns:

  • (Object)

    the current value of importe_total



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def importe_total
  @importe_total
end

#num_serieObject

Returns the value of attribute num_serie

Returns:

  • (Object)

    the current value of num_serie



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def num_serie
  @num_serie
end

#num_serie_anteriorObject

Returns the value of attribute num_serie_anterior

Returns:

  • (Object)

    the current value of num_serie_anterior



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def num_serie_anterior
  @num_serie_anterior
end

#numero_instalacionObject

Returns the value of attribute numero_instalacion

Returns:

  • (Object)

    the current value of numero_instalacion



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def numero_instalacion
  @numero_instalacion
end

#primer_registroObject

Returns the value of attribute primer_registro

Returns:

  • (Object)

    the current value of primer_registro



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def primer_registro
  @primer_registro
end

#subsanacionObject

Returns the value of attribute subsanacion

Returns:

  • (Object)

    the current value of subsanacion



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def subsanacion
  @subsanacion
end

#timestamp_modificacionObject

Returns the value of attribute timestamp_modificacion

Returns:

  • (Object)

    the current value of timestamp_modificacion



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def timestamp_modificacion
  @timestamp_modificacion
end

#tipo_facturaObject

Returns the value of attribute tipo_factura

Returns:

  • (Object)

    the current value of tipo_factura



165
166
167
# File 'lib/verifactu_rails/consulta.rb', line 165

def tipo_factura
  @tipo_factura
end

Instance Method Details

#aceptado_con_errores?Boolean

Returns:

  • (Boolean)


172
# File 'lib/verifactu_rails/consulta.rb', line 172

def aceptado_con_errores? = estado == 'AceptadoConErrores'

#anulado?Boolean

La factura fue anulada por un registro de anulación posterior. Este estado NO existe en la respuesta al envío.

Returns:

  • (Boolean)


176
# File 'lib/verifactu_rails/consulta.rb', line 176

def anulado? = estado == 'Anulado'

#correcto?Boolean

Returns:

  • (Boolean)


171
# File 'lib/verifactu_rails/consulta.rb', line 171

def correcto? = estado == 'Correcto'

#primer_registro?Boolean

Returns:

  • (Boolean)


179
# File 'lib/verifactu_rails/consulta.rb', line 179

def primer_registro? = primer_registro == 'S'

#subsanacion?Boolean

Returns:

  • (Boolean)


178
# File 'lib/verifactu_rails/consulta.rb', line 178

def subsanacion? = subsanacion == 'S'

#to_sObject



181
182
183
184
185
# File 'lib/verifactu_rails/consulta.rb', line 181

def to_s
  base = "#{num_serie}: #{estado}"
  base += ' (subsanación)' if subsanacion?
  codigo_error ? "#{base} [#{codigo_error}] #{descripcion_error}" : base
end