Class: SpreeCmCommissioner::OrderCompleteNotification

Inherits:
NoticedFcmBase
  • Object
show all
Defined in:
app/notifications/spree_cm_commissioner/order_complete_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, #message, #payload, #title

Instance Method Details

#extra_payloadObject



11
12
13
14
15
16
17
# File 'app/notifications/spree_cm_commissioner/order_complete_notification.rb', line 11

def extra_payload
  {
    order_id: order.id,
    order_number: order.number,
    notification_type: type
  }
end

#notificableObject



3
4
5
# File 'app/notifications/spree_cm_commissioner/order_complete_notification.rb', line 3

def notificable
  order
end

#orderObject



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

def order
  params[:order]
end

#translatable_optionsObject



19
20
21
22
23
# File 'app/notifications/spree_cm_commissioner/order_complete_notification.rb', line 19

def translatable_options
  {
    order_number: order.number
  }
end

#typeObject



25
26
27
# File 'app/notifications/spree_cm_commissioner/order_complete_notification.rb', line 25

def type
  'order_complete_notification'
end