class RubyRedtail::Notes

Public Class Methods

new(api_hash) click to toggle source
# File lib/ruby-redtail/contact/notes.rb, line 3
def initialize (api_hash)
  @api_hash = api_hash
end

Public Instance Methods

create(contact_id, params) click to toggle source

Create New Note

# File lib/ruby-redtail/contact/notes.rb, line 18
def create (contact_id, params)
  update(contact_id, 0, params)
end
fetch(contact_id, page = 1) click to toggle source

Fetch Notes By Contact Id

# File lib/ruby-redtail/contact/notes.rb, line 8
def fetch (contact_id, page = 1)
  RubyRedtail::Query.run("contacts/#{contact_id}/notes?page=#{page}", @api_hash, "GET")
end
recent() click to toggle source

Fetch Recently Added Notes

# File lib/ruby-redtail/contact/notes.rb, line 23
def recent
  RubyRedtail::Query.run("contacts/notes/recent", @api_hash, 'GET')
end
update(contact_id, note_id, params) click to toggle source

Update Note

# File lib/ruby-redtail/contact/notes.rb, line 13
def update (contact_id, note_id, params)
  RubyRedtail::Query.run("contacts/#{contact_id}/notes/#{note_id}", @api_hash, 'PUT', params)
end