Class: RubyPushNotifications::MPNS::MPNSLimitError
- Inherits:
-
MPNSResult
- Object
- MPNSResult
- RubyPushNotifications::MPNS::MPNSLimitError
- Defined in:
- lib/ruby-push-notifications/mpns/mpns_result.rb
Overview
This error occurs when an unauthenticated cloud service has reached the per-day throttling limit for a subscription, or when a cloud service (authenticated or unauthenticated) has sent too many notifications per second.
Constant Summary
Constants inherited from MPNSResult
RubyPushNotifications::MPNS::MPNSResult::X_DEVICE_CONNECTION_STATUS, RubyPushNotifications::MPNS::MPNSResult::X_NOTIFICATION_STATUS, RubyPushNotifications::MPNS::MPNSResult::X_SUBSCRIPTION_STATUS
Instance Attribute Summary collapse
-
#device_connection_status ⇒ String
. The connection status of the device..
-
#notification_status ⇒ String
by the Microsoft Push Notification Service.
-
#subscription_status ⇒ String
. The subscription status..
Attributes inherited from MPNSResult
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(device_url, headers) ⇒ MPNSLimitError
constructor
A new instance of MPNSLimitError.
Constructor Details
#initialize(device_url, headers) ⇒ MPNSLimitError
Returns a new instance of MPNSLimitError.
119 120 121 122 123 124 |
# File 'lib/ruby-push-notifications/mpns/mpns_result.rb', line 119 def initialize(device_url, headers) @device_url = device_url @notification_status = headers[X_NOTIFICATION_STATUS] @device_connection_status = headers[X_DEVICE_CONNECTION_STATUS] @subscription_status = headers[X_SUBSCRIPTION_STATUS] end |
Instance Attribute Details
#device_connection_status ⇒ String
Returns . The connection status of the device.
114 115 116 |
# File 'lib/ruby-push-notifications/mpns/mpns_result.rb', line 114 def device_connection_status @device_connection_status end |
#notification_status ⇒ String
by the Microsoft Push Notification Service.
111 112 113 |
# File 'lib/ruby-push-notifications/mpns/mpns_result.rb', line 111 def notification_status @notification_status end |
#subscription_status ⇒ String
Returns . The subscription status.
117 118 119 |
# File 'lib/ruby-push-notifications/mpns/mpns_result.rb', line 117 def subscription_status @subscription_status end |
Instance Method Details
#==(other) ⇒ Object
126 127 128 129 130 131 132 |
# File 'lib/ruby-push-notifications/mpns/mpns_result.rb', line 126 def ==(other) (other.is_a?(MPNSLimitError) && device_url == other.device_url && notification_status == other.notification_status && device_connection_status == other.device_connection_status && subscription_status == other.subscription_status) || super(other) end |