Class: Google::Apis::FcmV1::Notification
- Inherits:
-
Object
- Object
- Google::Apis::FcmV1::Notification
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/fcm_v1/classes.rb,
lib/google/apis/fcm_v1/representations.rb,
lib/google/apis/fcm_v1/representations.rb
Overview
Basic notification template to use across all platforms.
Instance Attribute Summary collapse
-
#body ⇒ String
The notification's body text.
-
#image ⇒ String
Contains the URL of an image that is going to be downloaded on the device and displayed in a notification.
-
#title ⇒ String
The notification's title.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Notification
constructor
A new instance of Notification.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Notification
Returns a new instance of Notification.
716 717 718 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 716 def initialize(**args) update!(**args) end |
Instance Attribute Details
#body ⇒ String
The notification's body text.
Corresponds to the JSON property body
699 700 701 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 699 def body @body end |
#image ⇒ String
Contains the URL of an image that is going to be downloaded on the device and
displayed in a notification. JPEG, PNG, BMP have full support across platforms.
Animated GIF and video only work on iOS. WebP and HEIF have varying levels of
support across platforms and platform versions. Android has 1MB image size
limit. Quota usage and implications/costs for hosting image on Firebase
Storage: https://firebase.google.com/pricing
Corresponds to the JSON property image
709 710 711 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 709 def image @image end |
#title ⇒ String
The notification's title.
Corresponds to the JSON property title
714 715 716 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 714 def title @title end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
721 722 723 724 725 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 721 def update!(**args) @body = args[:body] if args.key?(:body) @image = args[:image] if args.key?(:image) @title = args[:title] if args.key?(:title) end |