Class: QuotaService::QuotaInformation

Inherits:
BasicResponse show all
Defined in:
lib/quota_service/quota_information.rb

Overview

Representing the response of a get_quota_information-Call.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_codeObject

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_messageObject

Returns the value of attribute error_message.



7
8
9
# File 'lib/quota_service/quota_information.rb', line 7

def error_message
  @error_message
end

#max_quotaObject

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_quotaObject

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_levelObject

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