Class: SpreeCmCommissioner::CustomerContentNotification
- Inherits:
-
NoticedFcmBase
- Object
- Noticed::Base
- NoticedFcmBase
- SpreeCmCommissioner::CustomerContentNotification
show all
- Defined in:
- app/notifications/spree_cm_commissioner/customer_content_notification.rb
Instance Method Summary
collapse
#android_settings, #apns_settings, #cleanup_device_token, #convert_hash_values_to_str, #fcm_credentials, #fcm_device_tokens, #format_for_database, #format_notification, #payload
Instance Method Details
#customer_notification ⇒ Object
15
16
17
|
# File 'app/notifications/spree_cm_commissioner/customer_content_notification.rb', line 15
def customer_notification
params[:customer_notification]
end
|
19
20
21
22
23
24
25
|
# File 'app/notifications/spree_cm_commissioner/customer_content_notification.rb', line 19
def
{
customer_notification_id: customer_notification.id,
url: customer_notification.url,
notification_type: params[:customer_notification][:notification_type]
}
end
|
#image_url ⇒ Object
6
7
8
|
# File 'app/notifications/spree_cm_commissioner/customer_content_notification.rb', line 6
def image_url
customer_notification.push_notification_image_url
end
|
#message ⇒ Object
34
35
36
|
# File 'app/notifications/spree_cm_commissioner/customer_content_notification.rb', line 34
def message
record.params[:translatable_options][:message]
end
|
#notificable ⇒ Object
11
12
13
|
# File 'app/notifications/spree_cm_commissioner/customer_content_notification.rb', line 11
def notificable
customer_notification
end
|
#title ⇒ Object
38
39
40
|
# File 'app/notifications/spree_cm_commissioner/customer_content_notification.rb', line 38
def title
record.params[:translatable_options][:title]
end
|
#translatable_options ⇒ Object
27
28
29
30
31
32
|
# File 'app/notifications/spree_cm_commissioner/customer_content_notification.rb', line 27
def translatable_options
{
title: customer_notification.title,
message: customer_notification.excerpt
}
end
|
#type ⇒ Object
42
43
44
|
# File 'app/notifications/spree_cm_commissioner/customer_content_notification.rb', line 42
def type
'customer_notification'
end
|