Class: OctadeskApi::Client::OrganizationApi
- Inherits:
-
Object
- Object
- OctadeskApi::Client::OrganizationApi
- Defined in:
- lib/octadesk_api/client/organization_api.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
- #create(options = {}) ⇒ Object
- #find(id) ⇒ Object
-
#initialize(client) ⇒ OrganizationApi
constructor
A new instance of OrganizationApi.
- #update(id, options = {}) ⇒ Object
- #where(options = {}) ⇒ Object
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
#client ⇒ Object
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( = {}) response = client.post("/organizations", ) 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, = {}) response = client.put("/organizations/#{id}", ) response.parsed_response end |
#where(options = {}) ⇒ Object
15 16 17 18 |
# File 'lib/octadesk_api/client/organization_api.rb', line 15 def where( = {}) response = client.get("/organizations", ) response.parsed_response end |