Class: Sappy::Responses::AccountInfo

Inherits:
Sappy::Response show all
Defined in:
lib/sappy/responses/account_info.rb

Instance Attribute Summary collapse

Attributes inherited from Sappy::Response

#data, #xml

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_monitorsObject (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_monitorsObject (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_alertsObject (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

#successObject



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