Class: Vzaar::Resource::User

Inherits:
Base
  • Object
show all
Defined in:
lib/vzaar/resources/user.rb

Instance Attribute Summary

Attributes inherited from Base

#api_version, #doc, #http_status_code

Instance Method Summary collapse

Methods inherited from Base

attribute, #errors, root_node

Methods included from Helper

#blank?, #hash_to_xml, #symb_keys

Instance Method Details

#bandwidthObject



18
19
20
21
22
23
# File 'lib/vzaar/resources/user.rb', line 18

def bandwidth
  @bandwidth ||= doc.xpath("//bandwidth/period").map do |e|
    attrs = e.attributes
    { year: attrs["year"].text, month: attrs["month"].text, value: e.text.to_i }
  end
end