Exception: Ably::Models::DevicePushDetails
- Inherits:
-
Exceptions::BaseAblyException
- Object
- StandardError
- Exceptions::BaseAblyException
- Ably::Models::DevicePushDetails
- Includes:
- Ably::Modules::ModelCommon
- Defined in:
- lib/submodules/ably-ruby/lib/ably/models/device_push_details.rb
Overview
An object with the push notification details for Ably::Modules::Conversions#DeviceDetails object
Instance Attribute Summary
Attributes included from Ably::Modules::ModelCommon
Attributes inherited from Exceptions::BaseAblyException
#code, #message, #request_id, #status
Instance Method Summary collapse
- #attributes ⇒ Object
-
#error_reason ⇒ Ably::Models::ErrorInfo
An ErrorInfo object describing the most recent error when the state is Failing or Failed.
- #error_reason=(val) ⇒ Object
-
#initialize(hash_object = {}) ⇒ DevicePushDetails
constructor
A new instance of DevicePushDetails.
-
#recipient ⇒ Hash?
A JSON object of key-value pairs that contains of the push transport and address.
- #recipient=(val) ⇒ Object
-
#state ⇒ Symbol
The current state of the push registration.
- #state=(val) ⇒ Object
Methods included from Ably::Modules::ModelCommon
#==, #[], #as_json, included, #to_json, #to_s
Methods included from Ably::Modules::MessagePack
Methods inherited from Exceptions::BaseAblyException
Constructor Details
#initialize(hash_object = {}) ⇒ DevicePushDetails
Returns a new instance of DevicePushDetails.
29 30 31 32 |
# File 'lib/submodules/ably-ruby/lib/ably/models/device_push_details.rb', line 29 def initialize(hash_object = {}) @raw_hash_object = hash_object || {} @hash_object = IdiomaticRubyWrapper(@raw_hash_object) end |
Instance Method Details
#attributes ⇒ Object
90 91 92 |
# File 'lib/submodules/ably-ruby/lib/ably/models/device_push_details.rb', line 90 def attributes @hash_object end |
#error_reason ⇒ Ably::Models::ErrorInfo
An ErrorInfo object describing the most recent error when the state is Failing or Failed.
74 75 76 |
# File 'lib/submodules/ably-ruby/lib/ably/models/device_push_details.rb', line 74 def error_reason attributes[:error_reason] end |
#error_reason=(val) ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/submodules/ably-ruby/lib/ably/models/device_push_details.rb', line 78 def error_reason=(val) unless val.nil? || val.kind_of?(Hash) || val.kind_of?(Ably::Models::ErrorInfo) raise ArgumentError, "error_reason must be nil, a Hash value or a ErrorInfo object" end attributes[:error_reason] = if val.nil? nil else ErrorInfo(val) end end |
#recipient ⇒ Hash?
A JSON object of key-value pairs that contains of the push transport and address.
57 58 59 |
# File 'lib/submodules/ably-ruby/lib/ably/models/device_push_details.rb', line 57 def recipient attributes[:recipient] || {} end |
#recipient=(val) ⇒ Object
61 62 63 64 65 66 |
# File 'lib/submodules/ably-ruby/lib/ably/models/device_push_details.rb', line 61 def recipient=(val) unless val.nil? || val.kind_of?(Hash) raise ArgumentError, "recipient must be nil or a Hash value" end attributes[:recipient] = val end |
#state ⇒ Symbol
The current state of the push registration.
40 41 42 |
# File 'lib/submodules/ably-ruby/lib/ably/models/device_push_details.rb', line 40 def state attributes[:state] end |
#state=(val) ⇒ Object
44 45 46 47 48 49 |
# File 'lib/submodules/ably-ruby/lib/ably/models/device_push_details.rb', line 44 def state=(val) unless val.nil? || val.kind_of?(String) raise ArgumentError, "state must be nil or a string value" end attributes[:state] = val end |