Class: StandardId::Otp::IssueResult
- Inherits:
-
Data
- Object
- Data
- StandardId::Otp::IssueResult
- Defined in:
- lib/standard_id/otp.rb
Overview
Result returned by .issue.
-
success?: true/false
-
challenge: the created CodeChallenge (nil on failure)
-
code: raw OTP code — only populated when delivery: :manual
-
error_code: machine-readable symbol on failure
-
error_message: human-readable message on failure
Instance Attribute Summary collapse
-
#challenge ⇒ Object
readonly
Returns the value of attribute challenge.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
-
#success? ⇒ Object
readonly
Returns the value of attribute success?.
Instance Method Summary collapse
-
#error ⇒ Object
Parallel naming with VerificationService::Result, which exposes the human-readable message as #error.
Instance Attribute Details
#challenge ⇒ Object (readonly)
Returns the value of attribute challenge
70 71 72 |
# File 'lib/standard_id/otp.rb', line 70 def challenge @challenge end |
#code ⇒ Object (readonly)
Returns the value of attribute code
70 71 72 |
# File 'lib/standard_id/otp.rb', line 70 def code @code end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code
70 71 72 |
# File 'lib/standard_id/otp.rb', line 70 def error_code @error_code end |
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message
70 71 72 |
# File 'lib/standard_id/otp.rb', line 70 def @error_message end |
#success? ⇒ Object (readonly)
Returns the value of attribute success?
70 71 72 |
# File 'lib/standard_id/otp.rb', line 70
def success?
@success?
end
|
Instance Method Details
#error ⇒ Object
Parallel naming with VerificationService::Result, which exposes the human-readable message as #error. Kept as an alias so callers can mix issue/verify results without remembering which accessor is which.
74 |
# File 'lib/standard_id/otp.rb', line 74 def error = |