Class: Google::Apis::FcmV1::ApnsConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/fcm_v1/classes.rb,
generated/google/apis/fcm_v1/representations.rb,
generated/google/apis/fcm_v1/representations.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ApnsConfig

Returns a new instance of ApnsConfig.



409
410
411
# File 'generated/google/apis/fcm_v1/classes.rb', line 409

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#fcm_optionsGoogle::Apis::FcmV1::ApnsFcmOptions

Options for features provided by the FCM SDK for iOS. Corresponds to the JSON property fcmOptions



388
389
390
# File 'generated/google/apis/fcm_v1/classes.rb', line 388

def fcm_options
  @fcm_options
end

#headersHash<String,String>

HTTP request headers defined in Apple Push Notification Service. Refer to APNs request headers for supported headers, e.g. "apns-priority": "10". Corresponds to the JSON property headers

Returns:

  • (Hash<String,String>)


397
398
399
# File 'generated/google/apis/fcm_v1/classes.rb', line 397

def headers
  @headers
end

#payloadHash<String,Object>

APNs payload as a JSON object, including both aps dictionary and custom payload. See Payload Key Reference. If present, it overrides google.firebase.fcm.v1.Notification.title and google.firebase.fcm.v1.Notification.body. Corresponds to the JSON property payload

Returns:

  • (Hash<String,Object>)


407
408
409
# File 'generated/google/apis/fcm_v1/classes.rb', line 407

def payload
  @payload
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



414
415
416
417
418
# File 'generated/google/apis/fcm_v1/classes.rb', line 414

def update!(**args)
  @fcm_options = args[:fcm_options] if args.key?(:fcm_options)
  @headers = args[:headers] if args.key?(:headers)
  @payload = args[:payload] if args.key?(:payload)
end