Class: HaveAPI::Authentication::Token::ActionResult

Inherits:
Object
  • Object
show all
Defined in:
lib/haveapi/authentication/token/action_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeActionResult

Returns a new instance of ActionResult.



24
25
26
# File 'lib/haveapi/authentication/token/action_result.rb', line 24

def initialize
  @ok = false
end

Instance Attribute Details

#completeBoolean

Parameters:

Returns:



6
7
8
# File 'lib/haveapi/authentication/token/action_result.rb', line 6

def complete
  @complete
end

#errorString?

Parameters:

  • error (String)

Returns:

  • (String, nil)


10
11
12
# File 'lib/haveapi/authentication/token/action_result.rb', line 10

def error
  @error
end

#next_actionString?

Parameters:

  • next_action (String)

Returns:

  • (String, nil)


22
23
24
# File 'lib/haveapi/authentication/token/action_result.rb', line 22

def next_action
  @next_action
end

#tokenString?

Parameters:

  • token (String)

Returns:

  • (String, nil)


14
15
16
# File 'lib/haveapi/authentication/token/action_result.rb', line 14

def token
  @token
end

#valid_toTime?

Parameters:

  • valid_to (Time)

Returns:

  • (Time, nil)


18
19
20
# File 'lib/haveapi/authentication/token/action_result.rb', line 18

def valid_to
  @valid_to
end

Instance Method Details

#complete?Boolean

Returns:



37
38
39
# File 'lib/haveapi/authentication/token/action_result.rb', line 37

def complete?
  @complete ? true : false
end

#okObject



28
29
30
31
# File 'lib/haveapi/authentication/token/action_result.rb', line 28

def ok
  @ok = true
  self
end

#ok?Boolean

Returns:



33
34
35
# File 'lib/haveapi/authentication/token/action_result.rb', line 33

def ok?
  @ok && @error.nil?
end