Class: Cieloz::Requisicao::Resposta
- Inherits:
-
Object
- Object
- Cieloz::Requisicao::Resposta
- Includes:
- ActiveModel::Serializers::Xml, Helpers
- Defined in:
- lib/cieloz/requisicao/resposta.rb
Instance Attribute Summary collapse
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Class Method Summary collapse
Methods included from Helpers
#attributes=, included, #initialize
Instance Attribute Details
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
7 8 9 |
# File 'lib/cieloz/requisicao/resposta.rb', line 7 def xml @xml end |
Class Method Details
.from(xml) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/cieloz/requisicao/resposta.rb', line 9 def self.from xml obj = new begin obj = obj.from_xml xml rescue # makes it resilient to bad responses, # allowing them to be logged end obj.instance_variable_set :@xml, xml obj end |