Class: RubyPushNotifications::WNS::WNSLimitError
- Defined in:
- lib/ruby-push-notifications/wns/wns_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 WNSResult
RubyPushNotifications::WNS::WNSResult::X_DEVICE_CONNECTION_STATUS, RubyPushNotifications::WNS::WNSResult::X_NOTIFICATION_STATUS, RubyPushNotifications::WNS::WNSResult::X_STATUS
Instance Attribute Summary collapse
-
#device_connection_status ⇒ String
. The connection status of the device..
-
#notification_status ⇒ String
by the Windows Notification Service.
-
#status ⇒ String
. Notification status..
Attributes inherited from WNSResult
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(device_url, headers) ⇒ WNSLimitError
constructor
A new instance of WNSLimitError.
Constructor Details
#initialize(device_url, headers) ⇒ WNSLimitError
Returns a new instance of WNSLimitError.
117 118 119 120 121 122 |
# File 'lib/ruby-push-notifications/wns/wns_result.rb', line 117 def initialize(device_url, headers) @device_url = device_url @notification_status = headers[X_NOTIFICATION_STATUS] @device_connection_status = headers[X_DEVICE_CONNECTION_STATUS] @status = headers[X_STATUS] end |
Instance Attribute Details
#device_connection_status ⇒ String
Returns . The connection status of the device.
112 113 114 |
# File 'lib/ruby-push-notifications/wns/wns_result.rb', line 112 def device_connection_status @device_connection_status end |
#notification_status ⇒ String
by the Windows Notification Service.
109 110 111 |
# File 'lib/ruby-push-notifications/wns/wns_result.rb', line 109 def notification_status @notification_status end |
#status ⇒ String
Returns . Notification status.
115 116 117 |
# File 'lib/ruby-push-notifications/wns/wns_result.rb', line 115 def status @status end |
Instance Method Details
#==(other) ⇒ Object
124 125 126 127 128 129 130 |
# File 'lib/ruby-push-notifications/wns/wns_result.rb', line 124 def ==(other) (other.is_a?(WNSLimitError) && device_url == other.device_url && notification_status == other.notification_status && device_connection_status == other.device_connection_status && status == other.status) || super(other) end |