forked from intercom/intercom-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnote.rb
More file actions
29 lines (23 loc) · 694 Bytes
/
note.rb
File metadata and controls
29 lines (23 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
module Intercom
##
# Represents a note on a user
#
# A note contains a note (the text of the note you want to leave)
#
# == Examples
#
# note = Intercom::Note.create(:email => "person@example.com", :body => "This is the note you want to make on the user account")
# You can also create a note and save it like this:
# note = Intercom::Note.new
# note.body = "This is the note you want to make on the user account"
# note.save
class Note < IntercomBaseObject
ENDPOINT = "/v1/users/notes"
REQUIRED_PARAMS = %W(body)
attr_reader :html, :user
attr_writer :user_id, :email, :body
def user
Intercom::User.from_api(@user)
end
end
end