Class: HeyYou::Builder::FcmPush
- Inherits:
-
Base
- Object
- Base
- HeyYou::Builder::FcmPush
- Defined in:
- lib/hey_you/builder/fcm_push.rb
Constant Summary collapse
- NOTIFICATION_KEYS =
HeyYouFcmPush::MessageObject::Notification::TRANSLATED_KEYS.map(&:to_s).freeze
Instance Attribute Summary collapse
-
#android ⇒ Object
readonly
Returns the value of attribute android.
-
#apns ⇒ Object
readonly
Returns the value of attribute apns.
-
#condition ⇒ Object
readonly
Returns the value of attribute condition.
-
#fcm_options ⇒ Object
readonly
Returns the value of attribute fcm_options.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#notification ⇒ Object
readonly
Returns the value of attribute notification.
-
#push_data ⇒ Object
readonly
Returns the value of attribute push_data.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
-
#webpush ⇒ Object
readonly
Returns the value of attribute webpush.
Instance Method Summary collapse
Instance Attribute Details
#android ⇒ Object (readonly)
Returns the value of attribute android.
7 8 9 |
# File 'lib/hey_you/builder/fcm_push.rb', line 7 def android @android end |
#apns ⇒ Object (readonly)
Returns the value of attribute apns.
7 8 9 |
# File 'lib/hey_you/builder/fcm_push.rb', line 7 def apns @apns end |
#condition ⇒ Object (readonly)
Returns the value of attribute condition.
7 8 9 |
# File 'lib/hey_you/builder/fcm_push.rb', line 7 def condition @condition end |
#fcm_options ⇒ Object (readonly)
Returns the value of attribute fcm_options.
7 8 9 |
# File 'lib/hey_you/builder/fcm_push.rb', line 7 def @fcm_options end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/hey_you/builder/fcm_push.rb', line 7 def name @name end |
#notification ⇒ Object (readonly)
Returns the value of attribute notification.
7 8 9 |
# File 'lib/hey_you/builder/fcm_push.rb', line 7 def notification @notification end |
#push_data ⇒ Object (readonly)
Returns the value of attribute push_data.
7 8 9 |
# File 'lib/hey_you/builder/fcm_push.rb', line 7 def push_data @push_data end |
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
7 8 9 |
# File 'lib/hey_you/builder/fcm_push.rb', line 7 def topic @topic end |
#webpush ⇒ Object (readonly)
Returns the value of attribute webpush.
7 8 9 |
# File 'lib/hey_you/builder/fcm_push.rb', line 7 def webpush @webpush end |
Instance Method Details
#build ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/hey_you/builder/fcm_push.rb', line 11 def build @topic = ch_data.fetch('topic', nil) @condition = ch_data.fetch('condition', nil) @name = ch_data.fetch('name', nil) @notification = interpolate_notification(ch_data.fetch('notification', nil)&.deep_dup) @android = interpolate_notification(ch_data.fetch('android', nil)&.deep_dup) @webpush = interpolate_notification(ch_data.fetch('webpush', nil)&.deep_dup) @apns = interpolate_notification(ch_data.fetch('apns', nil)&.deep_dup) @fcm_options = interpolate_notification(ch_data.fetch('fcm_options', nil)&.deep_dup) @push_data = ch_data.fetch('push_data', nil)&.deep_dup end |