Class: Google::Apis::Messages::Webpush

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#headersObject

Returns the value of attribute headers.



89
90
91
# File 'lib/google/apis/messages/classes.rb', line 89

def headers
  @headers
end

#notificationObject

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