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
5 6 7 8 |
# File 'lib/intacct/authentication_result.rb', line 5 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.
3 4 5 |
# File 'lib/intacct/authentication_result.rb', line 3 def status @status end |
#xml_data ⇒ Object (readonly)
Returns the value of attribute xml_data.
3 4 5 |
# File 'lib/intacct/authentication_result.rb', line 3 def xml_data @xml_data end |
Instance Method Details
#parsed_data ⇒ Object
14 15 16 |
# File 'lib/intacct/authentication_result.rb', line 14 def parsed_data Crack::XML.parse(@xml_data.to_s) end |
#successful? ⇒ Boolean
10 11 12 |
# File 'lib/intacct/authentication_result.rb', line 10 def successful? @status == 'success' end |