Class: Yao::Resources::Meter

Inherits:
Base
  • Object
show all
Defined in:
lib/yao/resources/meter.rb

Instance Attribute Summary

Attributes included from RestfullyAccessible

#api_version, #service

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=, #created, friendly_attributes, #initialize, map_attribute_to_attribute, map_attribute_to_resource, map_attribute_to_resources, #updated

Methods included from RestfullyAccessible

#admin=, #as_member, #client, #create, #destroy, extended, #get, #list, #list_detail, #resources_path, #resources_path=, #return_single_on_querying=, #update, #with_resources_path

Constructor Details

This class inherits a constructor from Yao::Resources::Base

Instance Method Details

#idObject



5
6
7
# File 'lib/yao/resources/meter.rb', line 5

def id
  meter_id
end

#resourceObject



9
10
11
# File 'lib/yao/resources/meter.rb', line 9

def resource
  @resource ||= Yao::Resource.get(resource_id)
end

#tenantObject



13
14
15
# File 'lib/yao/resources/meter.rb', line 13

def tenant
  @tenant ||= Yao::User.get(project_id)
end

#userObject



17
18
19
# File 'lib/yao/resources/meter.rb', line 17

def user
  @user ||= Yao::User.get(user_id)
end