class Contactually::Notes

Public Class Methods

new(master) click to toggle source
# File lib/contactually/notes.rb, line 3
def initialize(master)
  @master = master
end

Public Instance Methods

create(params = {}) click to toggle source
# File lib/contactually/notes.rb, line 17
def create(params = {})
  hash = @master.call('notes.json', :post, params)
  Contactually::Utils.build_note(hash)
end
destroy(id, params = {}) click to toggle source
# File lib/contactually/notes.rb, line 22
def destroy(id, params = {})
  @master.call("notes/#{id}.json", :delete, params)
end
index(params = {}) click to toggle source
# File lib/contactually/notes.rb, line 7
def index(params = {})
  hash = @master.call('notes.json', :get, params)
  Contactually::Utils.notes_hash_to_objects(hash)
end
show(id, params = {}) click to toggle source
# File lib/contactually/notes.rb, line 12
def show(id, params = {})
  hash = @master.call("notes/#{id}.json", :get, params)
  Contactually::Utils.build_note(hash)
end
update(id, params = {}) click to toggle source
# File lib/contactually/notes.rb, line 26
def update(id, params = {})
  hash = @master.call("notes/#{id}.json", :put, params)
  Contactually::Utils.build_note(hash)
end