Class: BrNfe::Servico::Betha::V2::BuildResponse

Inherits:
BuildResponse show all
Defined in:
lib/br_nfe/servico/betha/v2/build_response.rb

Instance Attribute Summary collapse

Attributes inherited from BuildResponse

#nfe_method

Instance Method Summary collapse

Methods inherited from BuildResponse

#error_messages, #initialize, #response, #success?

Methods inherited from ActiveModelBase

#assign_attributes, #default_values, #initialize

Constructor Details

This class inherits a constructor from BrNfe::Servico::Betha::BuildResponse

Instance Attribute Details

#xmlObject

Returns the value of attribute xml.



6
7
8
# File 'lib/br_nfe/servico/betha/v2/build_response.rb', line 6

def xml
  @xml
end

Instance Method Details

#messagesObject



8
9
10
# File 'lib/br_nfe/servico/betha/v2/build_response.rb', line 8

def messages
	@messages ||= Nori.new(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym }).parse(xml.to_s)["#{nfe_method.to_s}_resposta".to_sym]
end