Class: Firebase::Admin::Messaging::SendResponse
- Inherits:
-
Object
- Object
- Firebase::Admin::Messaging::SendResponse
- Defined in:
- lib/firebase/admin/messaging/send_response.rb
Overview
The response received from an individual batched request.
Instance Attribute Summary collapse
-
#error ⇒ Error
readonly
The error if one occurred while sending the message.
-
#message_id ⇒ String
readonly
A message id string that uniquely identifies the message.
Instance Method Summary collapse
-
#initialize(message_id:, error:) ⇒ SendResponse
constructor
Initializes the object.
-
#success? ⇒ Boolean
A boolean indicating if the request was successful.
Constructor Details
#initialize(message_id:, error:) ⇒ SendResponse
Initializes the object.
24 25 26 27 |
# File 'lib/firebase/admin/messaging/send_response.rb', line 24 def initialize(message_id:, error:) @message_id = @error = error end |
Instance Attribute Details
#error ⇒ Error (readonly)
The error if one occurred while sending the message.
12 13 14 |
# File 'lib/firebase/admin/messaging/send_response.rb', line 12 def error @error end |
#message_id ⇒ String (readonly)
A message id string that uniquely identifies the message.
8 9 10 |
# File 'lib/firebase/admin/messaging/send_response.rb', line 8 def @message_id end |
Instance Method Details
#success? ⇒ Boolean
A boolean indicating if the request was successful.
16 17 18 |
# File 'lib/firebase/admin/messaging/send_response.rb', line 16 def success? !!@message_id end |