Class: PairingStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/toopher_api.rb

Overview

Contains information about a particular pairing request

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#enabledBoolean

Returns Indicates whether or not the pairing has been acknowledged and enabled by the user.

Returns:

  • (Boolean)

    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

#idString

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.

Returns:

  • (String)

    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

#rawhash

Returns The raw data returned from the Toopher API.

Returns:

  • (hash)

    The raw data returned from the Toopher API



151
152
153
# File 'lib/toopher_api.rb', line 151

def raw
  @raw
end

#user_idString

Returns A unique identifier generated and returned by the Toopher web service for a given user.

Returns:

  • (String)

    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_nameString

Returns The human recognizable user name associated with the given id.

Returns:

  • (String)

    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