Class: Firebase::Admin::Messaging::APNSPayload
- Inherits:
-
Object
- Object
- Firebase::Admin::Messaging::APNSPayload
- Defined in:
- lib/firebase/admin/messaging/apns_payload.rb
Overview
Represents the payload of an APNs message.
Mainly consists of the ‘aps` dictionary. But may also contain other arbitrary custom keys.
Instance Attribute Summary collapse
-
#aps ⇒ APS
The aps instance to be included in the payload.
-
#data ⇒ Hash
Custom fields to include in the payload.
Instance Method Summary collapse
-
#initialize(aps:, data: nil) ⇒ APNSPayload
constructor
Initializes a payload.
Constructor Details
#initialize(aps:, data: nil) ⇒ APNSPayload
Initializes a payload.
21 22 23 24 |
# File 'lib/firebase/admin/messaging/apns_payload.rb', line 21 def initialize(aps:, data: nil) @aps = aps @data = data end |
Instance Attribute Details
#aps ⇒ APS
Returns The aps instance to be included in the payload.
10 11 12 |
# File 'lib/firebase/admin/messaging/apns_payload.rb', line 10 def aps @aps end |
#data ⇒ Hash
Returns Custom fields to include in the payload.
13 14 15 |
# File 'lib/firebase/admin/messaging/apns_payload.rb', line 13 def data @data end |