Class: Chiketto::Organizer

Inherits:
Resource show all
Defined in:
lib/chiketto/organizer.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#id

Class Method Summary collapse

Methods inherited from Resource

build_query_string, endpoint, get, #initialize, open_post, paginated, post, should_paginate, token

Methods included from AttrDSL

included

Constructor Details

This class inherits a constructor from Chiketto::Resource

Instance Attribute Details

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/chiketto/organizer.rb', line 3

def name
  @name
end

Class Method Details

.create(params) ⇒ Object



12
13
14
15
# File 'lib/chiketto/organizer.rb', line 12

def self.create(params)
  response = post 'organizers', params
  Chiketto::Organizer.new response
end

.find(id) ⇒ Object



7
8
9
10
# File 'lib/chiketto/organizer.rb', line 7

def self.find(id)
  response = get "organizers/#{id}"
  Organizer.new response
end