Class: Google::Apis::Messages::Webpush
- Inherits:
-
Object
- Object
- Google::Apis::Messages::Webpush
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/messages/classes.rb,
lib/google/apis/messages/representations.rb,
lib/google/apis/messages/representations.rb
Defined Under Namespace
Classes: Representation
Instance Attribute Summary collapse
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#notification ⇒ Object
Returns the value of attribute notification.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Webpush
constructor
A new instance of Webpush.
- #update!(**args) ⇒ Object
Constructor Details
#initialize(**args) ⇒ Webpush
Returns a new instance of Webpush.
92 93 94 |
# File 'lib/google/apis/messages/classes.rb', line 92 def initialize(**args) update!(**args) end |
Instance Attribute Details
#headers ⇒ Object
Returns the value of attribute headers.
89 90 91 |
# File 'lib/google/apis/messages/classes.rb', line 89 def headers @headers end |
#notification ⇒ Object
Returns the value of attribute notification.
90 91 92 |
# File 'lib/google/apis/messages/classes.rb', line 90 def notification @notification end |
Instance Method Details
#update!(**args) ⇒ Object
96 97 98 99 |
# File 'lib/google/apis/messages/classes.rb', line 96 def update!(**args) @headers = args[:headers] if args.key?(:headers) @notification = WebNotification.new(icon: args[:icon]) end |