class OctadeskApi::Client::PersonApi

Attributes

client[RW]

Public Class Methods

new(client) click to toggle source
# File lib/octadesk_api/client/person_api.rb, line 5
def initialize(client)
  self.client = client
end

Public Instance Methods

create(options = {}) click to toggle source
# File lib/octadesk_api/client/person_api.rb, line 24
def create(options = {})
  response = client.post("/persons", options)
  response.parsed_response
end
find(id) click to toggle source
# File lib/octadesk_api/client/person_api.rb, line 9
def find(id) 
  response = client.get("/persons/#{id}")
  response.parsed_response
end
find_by_email(email) click to toggle source
# File lib/octadesk_api/client/person_api.rb, line 14
def find_by_email(email)
  response = client.get("/persons/", {query: {email: email} })
  response.parsed_response
end
update(id, options = {}) click to toggle source
# File lib/octadesk_api/client/person_api.rb, line 29
def update(id, options = {})
  response = client.put("/persons/#{id}", options)
  response.parsed_response
end
where(options = {}) click to toggle source
# File lib/octadesk_api/client/person_api.rb, line 19
def where(options = {})
  response = client.post("/persons/filter", options)
  response.parsed_response
end