Class: Firebase::Admin::Messaging::APS
- Inherits:
-
Object
- Object
- Firebase::Admin::Messaging::APS
- Defined in:
- lib/firebase/admin/messaging/aps.rb
Overview
Aps dictionary to be included in an APNS payload.
Instance Attribute Summary collapse
-
#alert ⇒ Firebase::Admin::Messaging::APSAlert, ...
Alert to be included in the message.
-
#badge ⇒ Integer?
Badge to be displayed with the message.
-
#category ⇒ String?
Type of the notification.
-
#content_available ⇒ Boolean?
Specifies whether to configure a background update notification.
-
#custom_data ⇒ Hash
App-specific custom fields.
-
#mutable_content ⇒ Boolean?
Specifies whether to set the ‘mutable-content` property on the message so the clients can modify the notification via app extensions.
-
#sound ⇒ Firebase::Admin::Messaging::CriticalSound, ...
Sound to be played with the message.
-
#thread_id ⇒ String?
An app-specific identifier for grouping notifications.
Instance Method Summary collapse
-
#initialize(alert: nil, badge: nil, sound: nil, content_available: nil, mutable_content: nil, category: nil, thread_id: nil, custom_data: nil) ⇒ APS
constructor
Initializes an APS.
Constructor Details
#initialize(alert: nil, badge: nil, sound: nil, content_available: nil, mutable_content: nil, category: nil, thread_id: nil, custom_data: nil) ⇒ APS
Initializes an Firebase::Admin::Messaging::APS.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/firebase/admin/messaging/aps.rb', line 60 def initialize( alert: nil, badge: nil, sound: nil, content_available: nil, mutable_content: nil, category: nil, thread_id: nil, custom_data: nil ) self.alert = alert self.badge = badge self.sound = sound self.content_available = content_available self.mutable_content = mutable_content self.category = category self.thread_id = thread_id self.custom_data = custom_data end |
Instance Attribute Details
#alert ⇒ Firebase::Admin::Messaging::APSAlert, ...
Returns Alert to be included in the message.
8 9 10 |
# File 'lib/firebase/admin/messaging/aps.rb', line 8 def alert @alert end |
#badge ⇒ Integer?
Returns Badge to be displayed with the message. Set to 0 to remove the badge. When not specified, the badge will remain unchanged.
13 14 15 |
# File 'lib/firebase/admin/messaging/aps.rb', line 13 def badge @badge end |
#category ⇒ String?
Returns Type of the notification.
30 31 32 |
# File 'lib/firebase/admin/messaging/aps.rb', line 30 def category @category end |
#content_available ⇒ Boolean?
Returns Specifies whether to configure a background update notification.
21 22 23 |
# File 'lib/firebase/admin/messaging/aps.rb', line 21 def content_available @content_available end |
#custom_data ⇒ Hash
Returns App-specific custom fields.
38 39 40 |
# File 'lib/firebase/admin/messaging/aps.rb', line 38 def custom_data @custom_data end |
#mutable_content ⇒ Boolean?
Returns Specifies whether to set the ‘mutable-content` property on the message so the clients can modify the notification via app extensions.
26 27 28 |
# File 'lib/firebase/admin/messaging/aps.rb', line 26 def mutable_content @mutable_content end |
#sound ⇒ Firebase::Admin::Messaging::CriticalSound, ...
Returns Sound to be played with the message.
17 18 19 |
# File 'lib/firebase/admin/messaging/aps.rb', line 17 def sound @sound end |
#thread_id ⇒ String?
Returns An app-specific identifier for grouping notifications.
34 35 36 |
# File 'lib/firebase/admin/messaging/aps.rb', line 34 def thread_id @thread_id end |