Class: Intacct::AuthenticationResult
- Inherits:
-
Object
- Object
- Intacct::AuthenticationResult
- Defined in:
- lib/intacct/authentication_result.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#xml_data ⇒ Object
readonly
Returns the value of attribute xml_data.
Instance Method Summary collapse
-
#initialize(xml_entry) ⇒ AuthenticationResult
constructor
A new instance of AuthenticationResult.
- #parsed_data ⇒ Object
- #successful? ⇒ Boolean
Constructor Details
#initialize(xml_entry) ⇒ AuthenticationResult
Returns a new instance of AuthenticationResult.
7 8 9 10 |
# File 'lib/intacct/authentication_result.rb', line 7 def initialize(xml_entry) @status = xml_entry.xpath("status").text @xml_data = xml_entry end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/intacct/authentication_result.rb', line 5 def status @status end |
#xml_data ⇒ Object (readonly)
Returns the value of attribute xml_data.
5 6 7 |
# File 'lib/intacct/authentication_result.rb', line 5 def xml_data @xml_data end |
Instance Method Details
#parsed_data ⇒ Object
16 17 18 |
# File 'lib/intacct/authentication_result.rb', line 16 def parsed_data Crack::XML.parse(@xml_data.to_s) end |
#successful? ⇒ Boolean
12 13 14 |
# File 'lib/intacct/authentication_result.rb', line 12 def successful? @status == "success" end |