Class: NfseGyn::ConsultarNfse::Response
Instance Method Summary
collapse
Methods inherited from Response
#class_name, #error_message, #initialize, #output, #successful?
Instance Method Details
#content ⇒ Object
45
46
47
|
# File 'lib/nfse_gyn/consultar_nfse.rb', line 45
def content
@content ||= output['ConsultarNfseRpsResposta']
end
|
#error? ⇒ Boolean
57
58
59
|
# File 'lib/nfse_gyn/consultar_nfse.rb', line 57
def error?
!content['CompNfse'] || content['ListaMensagemRetorno']['MensagemRetorno']['Codigo'] != 'L000'
end
|
#number ⇒ Object
49
50
51
|
# File 'lib/nfse_gyn/consultar_nfse.rb', line 49
def number
content['CompNfse']['Nfse']['InfNfse']['Numero'] if successful?
end
|
#verification_code ⇒ Object
53
54
55
|
# File 'lib/nfse_gyn/consultar_nfse.rb', line 53
def verification_code
content['CompNfse']['Nfse']['InfNfse']['CodigoVerificacao'] if successful?
end
|