Class: APNS::NotificationResponse
- Inherits:
-
Object
- Object
- APNS::NotificationResponse
- Defined in:
- lib/apns/notification_response.rb
Instance Method Summary collapse
- #device_unsubscribed? ⇒ Boolean
-
#initialize(response) ⇒ NotificationResponse
constructor
A new instance of NotificationResponse.
- #success? ⇒ Boolean
Constructor Details
#initialize(response) ⇒ NotificationResponse
Returns a new instance of NotificationResponse.
4 5 6 |
# File 'lib/apns/notification_response.rb', line 4 def initialize(response) @response = response end |
Instance Method Details
#device_unsubscribed? ⇒ Boolean
12 13 14 15 16 17 |
# File 'lib/apns/notification_response.rb', line 12 def device_unsubscribed? @response.validation_error? && @response.body['errors'] && @response.body['errors']['device'] && @response.body['errors']['device'].include?('unsubscribed') end |
#success? ⇒ Boolean
8 9 10 |
# File 'lib/apns/notification_response.rb', line 8 def success? @response.success? end |