Class: Firebase::Admin::Messaging::APSAlert
- Inherits:
-
Object
- Object
- Firebase::Admin::Messaging::APSAlert
- Defined in:
- lib/firebase/admin/messaging/aps_alert.rb
Overview
An alert that can be included in an APS.
Instance Attribute Summary collapse
-
#action_loc_key ⇒ String?
Key of the text in the app’s string resources to use to localize the action button text.
-
#body ⇒ String?
Body of the alert.
-
#custom_data ⇒ Hash?
A Hash of custom key-value pairs to be included in the APSAlert.
-
#launch_image ⇒ String?
Image for the notification action.
-
#loc_args ⇒ Array<String>?
A list of resource keys that will be used in place of the format specifiers in #loc_key.
-
#loc_key ⇒ String?
Key of the body string in the app’s string resources to use to localize the body text.
-
#subtitle ⇒ String?
Subtitle of the alert.
-
#subtitle_loc_args ⇒ Array<String>?
A list of resource keys that will be used in place of the format specifiers in #subtitle_loc_key.
-
#subtitle_loc_key ⇒ String?
Key of the subtitle string in the app’s string resources to use to localize the subtitle text.
-
#title ⇒ String?
Title of the alert.
-
#title_loc_args ⇒ Array<String>?
A list of resource keys that will be used in place of the format specifiers in #title_loc_key.
-
#title_loc_key ⇒ String?
Key of the title string in the app’s string resources to use to localize the title text.
Instance Method Summary collapse
-
#initialize(title: nil, subtitle: nil, body: nil, loc_key: nil, loc_args: nil, title_loc_key: nil, title_loc_args: nil, subtitle_loc_key: nil, subtitle_loc_args: nil, action_loc_key: nil, launch_image: nil, custom_data: nil) ⇒ APSAlert
constructor
Initializes an APSAlert.
Constructor Details
#initialize(title: nil, subtitle: nil, body: nil, loc_key: nil, loc_args: nil, title_loc_key: nil, title_loc_args: nil, subtitle_loc_key: nil, subtitle_loc_args: nil, action_loc_key: nil, launch_image: nil, custom_data: nil) ⇒ APSAlert
Initializes an Firebase::Admin::Messaging::APSAlert.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/firebase/admin/messaging/aps_alert.rb', line 80 def initialize( title: nil, subtitle: nil, body: nil, loc_key: nil, loc_args: nil, title_loc_key: nil, title_loc_args: nil, subtitle_loc_key: nil, subtitle_loc_args: nil, action_loc_key: nil, launch_image: nil, custom_data: nil ) self.title = title self.subtitle = subtitle self.body = body self.loc_key = loc_key self.loc_args = loc_args self.title_loc_key = title_loc_key self.title_loc_args = title_loc_args self.subtitle_loc_key = subtitle_loc_key self.subtitle_loc_args = subtitle_loc_args self.action_loc_key = action_loc_key self.launch_image = launch_image self.custom_data = custom_data end |
Instance Attribute Details
#action_loc_key ⇒ String?
Returns Key of the text in the app’s string resources to use to localize the action button text.
44 45 46 |
# File 'lib/firebase/admin/messaging/aps_alert.rb', line 44 def action_loc_key @action_loc_key end |
#body ⇒ String?
Returns Body of the alert. If specified, overrides the body set via Notification.
16 17 18 |
# File 'lib/firebase/admin/messaging/aps_alert.rb', line 16 def body @body end |
#custom_data ⇒ Hash?
Returns A Hash of custom key-value pairs to be included in the Firebase::Admin::Messaging::APSAlert.
52 53 54 |
# File 'lib/firebase/admin/messaging/aps_alert.rb', line 52 def custom_data @custom_data end |
#launch_image ⇒ String?
Returns Image for the notification action.
48 49 50 |
# File 'lib/firebase/admin/messaging/aps_alert.rb', line 48 def launch_image @launch_image end |
#loc_args ⇒ Array<String>?
Returns A list of resource keys that will be used in place of the format specifiers in #loc_key.
24 25 26 |
# File 'lib/firebase/admin/messaging/aps_alert.rb', line 24 def loc_args @loc_args end |
#loc_key ⇒ String?
Returns Key of the body string in the app’s string resources to use to localize the body text.
20 21 22 |
# File 'lib/firebase/admin/messaging/aps_alert.rb', line 20 def loc_key @loc_key end |
#subtitle ⇒ String?
Returns Subtitle of the alert.
12 13 14 |
# File 'lib/firebase/admin/messaging/aps_alert.rb', line 12 def subtitle @subtitle end |
#subtitle_loc_args ⇒ Array<String>?
Returns A list of resource keys that will be used in place of the format specifiers in #subtitle_loc_key.
40 41 42 |
# File 'lib/firebase/admin/messaging/aps_alert.rb', line 40 def subtitle_loc_args @subtitle_loc_args end |
#subtitle_loc_key ⇒ String?
Returns Key of the subtitle string in the app’s string resources to use to localize the subtitle text.
36 37 38 |
# File 'lib/firebase/admin/messaging/aps_alert.rb', line 36 def subtitle_loc_key @subtitle_loc_key end |
#title ⇒ String?
Returns Title of the alert. If specified, overrides the title set via Notification.
8 9 10 |
# File 'lib/firebase/admin/messaging/aps_alert.rb', line 8 def title @title end |
#title_loc_args ⇒ Array<String>?
Returns A list of resource keys that will be used in place of the format specifiers in #title_loc_key.
32 33 34 |
# File 'lib/firebase/admin/messaging/aps_alert.rb', line 32 def title_loc_args @title_loc_args end |
#title_loc_key ⇒ String?
Returns Key of the title string in the app’s string resources to use to localize the title text.
28 29 30 |
# File 'lib/firebase/admin/messaging/aps_alert.rb', line 28 def title_loc_key @title_loc_key end |