Class: Sappy::Responses::AccountInfo
- Inherits:
-
Sappy::Response
- Object
- Sappy::Response
- Sappy::Responses::AccountInfo
- Defined in:
- lib/sappy/responses/account_info.rb
Instance Attribute Summary collapse
-
#available_monitors ⇒ Object
readonly
Returns the value of attribute available_monitors.
-
#setup_monitors ⇒ Object
readonly
Returns the value of attribute setup_monitors.
-
#sms_alerts ⇒ Object
readonly
Returns the value of attribute sms_alerts.
Attributes inherited from Sappy::Response
Instance Method Summary collapse
Methods inherited from Sappy::Response
#error_response, #error_response?, #failure, #first_xpath, #initialize, parse, #parse
Constructor Details
This class inherits a constructor from Sappy::Response
Instance Attribute Details
#available_monitors ⇒ Object (readonly)
Returns the value of attribute available_monitors.
4 5 6 |
# File 'lib/sappy/responses/account_info.rb', line 4 def available_monitors @available_monitors end |
#setup_monitors ⇒ Object (readonly)
Returns the value of attribute setup_monitors.
4 5 6 |
# File 'lib/sappy/responses/account_info.rb', line 4 def setup_monitors @setup_monitors end |
#sms_alerts ⇒ Object (readonly)
Returns the value of attribute sms_alerts.
4 5 6 |
# File 'lib/sappy/responses/account_info.rb', line 4 def sms_alerts @sms_alerts end |
Instance Method Details
#success ⇒ Object
6 7 8 9 10 11 |
# File 'lib/sappy/responses/account_info.rb', line 6 def success accountinfo = first_xpath('//accountinfo') @sms_alerts = accountinfo["smsalerts"].to_i @setup_monitors = accountinfo["setupmonitors"].to_i @available_monitors = accountinfo["availablemonitors"].to_i end |