Class: Kentaa::Api::Resources::Activity

Inherits:
Resource show all
Defined in:
lib/kentaa/api/resources/activity.rb

Instance Attribute Summary

Attributes inherited from Resource

#id

Attributes inherited from Base

#config, #endpoint_path, #options, #resource_class

Instance Method Summary collapse

Methods inherited from Resource

#create, #created_at, #delete, #initialize, #load, #save, #updated_at

Methods inherited from Base

attribute_key, #initialize, #load, #loaded?

Constructor Details

This class inherits a constructor from Kentaa::Api::Resources::Resource

Instance Method Details

#nameObject



19
20
21
# File 'lib/kentaa/api/resources/activity.rb', line 19

def name
  data[:name]
end

#object_keyObject



7
8
9
# File 'lib/kentaa/api/resources/activity.rb', line 7

def object_key
  "Activity_#{id}"
end

#sign_up_countObject



27
28
29
# File 'lib/kentaa/api/resources/activity.rb', line 27

def 
  data[:sign_up_count]
end

#sign_up_limitObject



23
24
25
# File 'lib/kentaa/api/resources/activity.rb', line 23

def 
  data[:sign_up_limit]
end

#siteObject



11
12
13
# File 'lib/kentaa/api/resources/activity.rb', line 11

def site
  Kentaa::Api::Resources::Site.new(config, id: site_id, options: options)
end

#site_idObject



15
16
17
# File 'lib/kentaa/api/resources/activity.rb', line 15

def site_id
  data[:site_id]
end