Class: SynapsePayRest::Question Deprecated
- Inherits:
-
Object
- Object
- SynapsePayRest::Question
- Defined in:
- lib/synapse_pay_rest/models/user/question.rb
Overview
Deprecated.
Represents a question that is triggered when a document is returned with status MFA|PENDING.
Instance Attribute Summary collapse
-
#answers ⇒ Hash{Integer=>String}
readonly
The answer choice numbers and text.
-
#choice ⇒ Object
Returns the value of attribute choice.
-
#id ⇒ Integer
readonly
The number of the question in the question_set.
-
#question ⇒ String
readonly
The text of the question.
Instance Method Summary collapse
-
#initialize(id:, question:, answers:) ⇒ Question
constructor
A new instance of Question.
-
#to_hash ⇒ Object
Converts the question/answer to a hash for use in JSON.
Constructor Details
#initialize(id:, question:, answers:) ⇒ Question
Note:
This is initialized automatically by SynapsePayRest::VirtualDocument.
Returns a new instance of Question.
18 19 20 21 22 23 |
# File 'lib/synapse_pay_rest/models/user/question.rb', line 18 def initialize(id:, question:, answers:) @id = id @question = question @answers = answers @choice = nil end |
Instance Attribute Details
#answers ⇒ Hash{Integer=>String} (readonly)
Returns the answer choice numbers and text.
15 |
# File 'lib/synapse_pay_rest/models/user/question.rb', line 15 attr_reader :question, :answers, :id, :choice |
#choice ⇒ Object
Returns the value of attribute choice.
15 |
# File 'lib/synapse_pay_rest/models/user/question.rb', line 15 attr_reader :question, :answers, :id, :choice |
#id ⇒ Integer (readonly)
Returns the number of the question in the question_set.
15 |
# File 'lib/synapse_pay_rest/models/user/question.rb', line 15 attr_reader :question, :answers, :id, :choice |
#question ⇒ String (readonly)
Returns the text of the question.
15 16 17 |
# File 'lib/synapse_pay_rest/models/user/question.rb', line 15 def question @question end |
Instance Method Details
#to_hash ⇒ Object
Note:
You should not need to call this directly.
Converts the question/answer to a hash for use in JSON.
43 44 45 |
# File 'lib/synapse_pay_rest/models/user/question.rb', line 43 def to_hash {'question_id' => id, 'answer_id' => choice} end |