Class: SpreeCmCommissioner::OrderGeneralNotification

Inherits:
NoticedFcmBase
  • Object
show all
Defined in:
app/notifications/spree_cm_commissioner/order_general_notification.rb

Instance Method Summary collapse

Methods inherited from NoticedFcmBase

#android_settings, #apns_settings, #cleanup_device_token, #convert_hash_values_to_str, #fcm_credentials, #fcm_device_tokens, #format_for_database, #format_notification, #image_url, #payload, #translatable_options

Instance Method Details

#extra_payloadObject



11
12
13
# File 'app/notifications/spree_cm_commissioner/order_general_notification.rb', line 11

def extra_payload
  { title: title, message: message, notification_type: type, order_number: notificable.number }.merge(params[:payload] || {})
end

#messageObject



5
# File 'app/notifications/spree_cm_commissioner/order_general_notification.rb', line 5

def message     = params[:message]

#notificableObject



3
# File 'app/notifications/spree_cm_commissioner/order_general_notification.rb', line 3

def notificable = params[:notificable]

#titleObject



4
# File 'app/notifications/spree_cm_commissioner/order_general_notification.rb', line 4

def title       = params[:title]

#typeObject



7
8
9
# File 'app/notifications/spree_cm_commissioner/order_general_notification.rb', line 7

def type
  'order_general_notification'
end