Class: MagicBell::UserNotification
Instance Attribute Summary
Attributes inherited from ApiResource
#id
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from ApiResource
#attribute, #attributes, #create, create, create_path, #create_path, create_url, #create_url, find, #initialize, name, #name, #retrieve, #update, #url
Class Method Details
.path ⇒ Object
4
5
6
|
# File 'lib/magicbell/api_resources/user_notification.rb', line 4
def path
"/notifications"
end
|
Instance Method Details
#mark_as_read ⇒ Object
13
14
15
|
# File 'lib/magicbell/api_resources/user_notification.rb', line 13
def mark_as_read
UserNotificationRead.new(@client, "user_notification" => self).create
end
|
#mark_as_unread ⇒ Object
17
18
19
|
# File 'lib/magicbell/api_resources/user_notification.rb', line 17
def mark_as_unread
UserNotificationUnread.new(@client, "user_notification" => self).create
end
|
#path ⇒ Object
9
10
11
|
# File 'lib/magicbell/api_resources/user_notification.rb', line 9
def path
"/notifications/#{id}"
end
|