Class: NfseGyn::GerarNfse
Defined Under Namespace
Classes: Response
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize(invoice) ⇒ GerarNfse
constructor
A new instance of GerarNfse.
- #to_xml ⇒ Object
Constructor Details
#initialize(invoice) ⇒ GerarNfse
Returns a new instance of GerarNfse.
5 6 7 8 |
# File 'lib/nfse_gyn/gerar_nfse.rb', line 5 def initialize(invoice) @invoice = invoice @client = NfseGyn::SoapClient.new end |
Instance Method Details
#execute! ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/nfse_gyn/gerar_nfse.rb', line 10 def execute! if NfseGyn.configuration.mock_mode NfseGyn::MockGerarNfseResponse.new(@invoice) else @client.call(:gerar_nfse, self) end end |
#to_xml ⇒ Object
18 19 20 |
# File 'lib/nfse_gyn/gerar_nfse.rb', line 18 def to_xml GerarNfseXML.new(@invoice).to_xml end |