Class: OctadeskApi::Client::OrganizationApi

Inherits:
Object
  • Object
show all
Defined in:
lib/octadesk_api/client/organization_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ OrganizationApi

Returns a new instance of OrganizationApi.



6
7
8
# File 'lib/octadesk_api/client/organization_api.rb', line 6

def initialize(client)
  self.client = client
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



5
6
7
# File 'lib/octadesk_api/client/organization_api.rb', line 5

def client
  @client
end

Instance Method Details

#create(options = {}) ⇒ Object



20
21
22
23
# File 'lib/octadesk_api/client/organization_api.rb', line 20

def create(options = {})
  response = client.post("/organizations", options)
  response.parsed_response
end

#find(id) ⇒ Object



10
11
12
13
# File 'lib/octadesk_api/client/organization_api.rb', line 10

def find(id) 
  response = client.get("/organizations/#{id}")
  response.parsed_response
end

#update(id, options = {}) ⇒ Object



25
26
27
28
# File 'lib/octadesk_api/client/organization_api.rb', line 25

def update(id, options = {})
  response = client.put("/organizations/#{id}", options)
  response.parsed_response
end

#where(options = {}) ⇒ Object



15
16
17
18
# File 'lib/octadesk_api/client/organization_api.rb', line 15

def where(options = {})
  response = client.get("/organizations", options)
  response.parsed_response
end