Class: SpreeCmCommissioner::OrderRejectedNotification
- Inherits:
-
NoticedFcmBase
- Object
- Noticed::Base
- NoticedFcmBase
- SpreeCmCommissioner::OrderRejectedNotification
show all
- Defined in:
- app/notifications/spree_cm_commissioner/order_rejected_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, #image_url, #message, #payload, #title
Instance Method Details
15
16
17
18
19
20
21
22
23
|
# File 'app/notifications/spree_cm_commissioner/order_rejected_notification.rb', line 15
def
{
order_number: order.number,
title: notification_title,
message: notification_message,
notification_type: type
}
end
|
#notificable ⇒ Object
3
4
5
|
# File 'app/notifications/spree_cm_commissioner/order_rejected_notification.rb', line 3
def notificable
order
end
|
#notification_message ⇒ Object
29
30
31
32
33
|
# File 'app/notifications/spree_cm_commissioner/order_rejected_notification.rb', line 29
def notification_message
I18n.t('notifications.spree_cm_commissioner.order_rejected_notification.message',
vendor_name: vendor&.name
)
end
|
#notification_title ⇒ Object
25
26
27
|
# File 'app/notifications/spree_cm_commissioner/order_rejected_notification.rb', line 25
def notification_title
I18n.t('notifications.spree_cm_commissioner.order_rejected_notification.title')
end
|
#order ⇒ Object
7
8
9
|
# File 'app/notifications/spree_cm_commissioner/order_rejected_notification.rb', line 7
def order
params[:order]
end
|
#translatable_options ⇒ Object
35
36
37
38
39
40
|
# File 'app/notifications/spree_cm_commissioner/order_rejected_notification.rb', line 35
def translatable_options
{
order_number: order.number,
vendor_name: vendor&.name
}
end
|
#type ⇒ Object
42
43
44
|
# File 'app/notifications/spree_cm_commissioner/order_rejected_notification.rb', line 42
def type
'order_rejected_notification'
end
|
#vendor ⇒ Object
11
12
13
|
# File 'app/notifications/spree_cm_commissioner/order_rejected_notification.rb', line 11
def vendor
order.line_items.first.vendor
end
|