Class: Spear::Structure::User::CheckExisting

Inherits:
Base
  • Object
show all
Defined in:
lib/spear/structure/user/check_existing.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#error_message, #response, #root, #status

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ CheckExisting

Returns a new instance of CheckExisting.



7
8
9
10
11
12
13
# File 'lib/spear/structure/user/check_existing.rb', line 7

def initialize(response)
  super(response)

  @external_id = @root["ResponseExternalID"]
  @oauth_token = @root["ResponseOAuthToken"]
  @check_status = @root['UserCheckStatus']
end

Instance Attribute Details

#check_statusObject (readonly)

Returns the value of attribute check_status.



5
6
7
# File 'lib/spear/structure/user/check_existing.rb', line 5

def check_status
  @check_status
end

#external_idObject (readonly)

Returns the value of attribute external_id.



5
6
7
# File 'lib/spear/structure/user/check_existing.rb', line 5

def external_id
  @external_id
end

#oauth_tokenObject (readonly)

Returns the value of attribute oauth_token.



5
6
7
# File 'lib/spear/structure/user/check_existing.rb', line 5

def oauth_token
  @oauth_token
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/spear/structure/user/check_existing.rb', line 15

def success?
  super and @check_status.eql?('EmailExistsPasswordsMatch')
end