Class: QuotaService::QuotaInformation
- Inherits:
-
BasicResponse
- Object
- BasicResponse
- QuotaService::QuotaInformation
- Defined in:
- lib/quota_service/quota_information.rb
Overview
Representing the response of a get_quota_information
-Call.
Instance Attribute Summary collapse
-
#error_code ⇒ Object
Returns the value of attribute error_code.
-
#error_message ⇒ Object
Returns the value of attribute error_message.
-
#max_quota ⇒ Object
Returns the value of attribute max_quota.
-
#max_user_quota ⇒ Object
Returns the value of attribute max_user_quota.
-
#quota_level ⇒ Object
Returns the value of attribute quota_level.
Instance Method Summary collapse
-
#initialize(response_xml, raise_exception_on_error = true) ⇒ QuotaInformation
constructor
Constructor.
Methods inherited from BasicResponse
#inizialize, #raise_on_error, #to_s
Constructor Details
#initialize(response_xml, raise_exception_on_error = true) ⇒ QuotaInformation
Constructor.
Parameters
response_xml
-
Xml as returned by a
call_status
-method call. raise_exception_on_error
-
Xml as returned by a
call_status
-method call.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/quota_service/quota_information.rb', line 13 def initialize(response_xml, raise_exception_on_error = true) super(response_xml) doc = response_xml.document @max_quota = doc.xpath("//maxQuota").text @max_user_quota = doc.xpath("//maxUserQuota").text @quota_level = doc.xpath("//quotaLevel").text raise_on_error(response_xml) if raise_exception_on_error end |
Instance Attribute Details
#error_code ⇒ Object
Returns the value of attribute error_code.
7 8 9 |
# File 'lib/quota_service/quota_information.rb', line 7 def error_code @error_code end |
#error_message ⇒ Object
Returns the value of attribute error_message.
7 8 9 |
# File 'lib/quota_service/quota_information.rb', line 7 def @error_message end |
#max_quota ⇒ Object
Returns the value of attribute max_quota.
7 8 9 |
# File 'lib/quota_service/quota_information.rb', line 7 def max_quota @max_quota end |
#max_user_quota ⇒ Object
Returns the value of attribute max_user_quota.
7 8 9 |
# File 'lib/quota_service/quota_information.rb', line 7 def max_user_quota @max_user_quota end |
#quota_level ⇒ Object
Returns the value of attribute quota_level.
7 8 9 |
# File 'lib/quota_service/quota_information.rb', line 7 def quota_level @quota_level end |