Class: PairingStatus
- Inherits:
-
Object
- Object
- PairingStatus
- Defined in:
- lib/toopher_api.rb
Overview
Contains information about a particular pairing request
Instance Attribute Summary collapse
-
#enabled ⇒ Boolean
Indicates whether or not the pairing has been acknowledged and enabled by the user.
-
#id ⇒ String
A unique identifier generated and returned by the Toopher web service that is used to identify this pairing.
-
#raw ⇒ hash
The raw data returned from the Toopher API.
-
#user_id ⇒ String
A unique identifier generated and returned by the Toopher web service for a given user.
-
#user_name ⇒ String
The human recognizable user name associated with the given id.
Instance Method Summary collapse
-
#initialize(json_obj) ⇒ PairingStatus
constructor
A new instance of PairingStatus.
Constructor Details
#initialize(json_obj) ⇒ PairingStatus
Returns a new instance of PairingStatus.
153 154 155 156 157 158 159 |
# File 'lib/toopher_api.rb', line 153 def initialize(json_obj) @id = json_obj['id'] @enabled = json_obj['enabled'] @user_id = json_obj['user']['id'] @user_name = json_obj['user']['name'] @raw = json_obj end |
Instance Attribute Details
#enabled ⇒ Boolean
Returns Indicates whether or not the pairing has been acknowledged and enabled by the user.
139 140 141 |
# File 'lib/toopher_api.rb', line 139 def enabled @enabled end |
#id ⇒ String
Returns A unique identifier generated and returned by the Toopher web service that is used to identify this pairing. It can be used to request status information for the pairing and must be included in subsequent authentication requests for this user.
135 136 137 |
# File 'lib/toopher_api.rb', line 135 def id @id end |
#raw ⇒ hash
Returns The raw data returned from the Toopher API.
151 152 153 |
# File 'lib/toopher_api.rb', line 151 def raw @raw end |
#user_id ⇒ String
Returns A unique identifier generated and returned by the Toopher web service for a given user.
143 144 145 |
# File 'lib/toopher_api.rb', line 143 def user_id @user_id end |
#user_name ⇒ String
Returns The human recognizable user name associated with the given id.
147 148 149 |
# File 'lib/toopher_api.rb', line 147 def user_name @user_name end |