Class: NfseGyn::ConsultarNfse::Response

Inherits:
Response show all
Defined in:
lib/nfse_gyn/consultar_nfse.rb

Direct Known Subclasses

MockConsultarNfseResponse

Instance Method Summary collapse

Methods inherited from Response

#class_name, #error_message, #initialize, #link, #municipal_registration, #number, #output, #successful?, #verification_code

Constructor Details

This class inherits a constructor from NfseGyn::Response

Instance Method Details

#bodyObject



49
50
51
# File 'lib/nfse_gyn/consultar_nfse.rb', line 49

def body
  content['CompNfse']
end

#contentObject



45
46
47
# File 'lib/nfse_gyn/consultar_nfse.rb', line 45

def content
  @content ||= output['ConsultarNfseRpsResposta']
end

#error?Boolean

Returns:

  • (Boolean)


53
54
55
# File 'lib/nfse_gyn/consultar_nfse.rb', line 53

def error?
  !body || content['ListaMensagemRetorno']['MensagemRetorno']['Codigo'] != 'L000'
end