Class: Idnow::IdentificationProcess
- Inherits:
-
Object
- Object
- Idnow::IdentificationProcess
- Includes:
- Jsonable
- Defined in:
- lib/idnow/models/identification_process.rb
Constant Summary collapse
- SUCCESSFUL_RESPONSES =
%w[SUCCESS SUCCESS_DATA_CHANGED].freeze
Instance Attribute Summary collapse
-
#agentname ⇒ Object
Returns the value of attribute agentname.
-
#company_id ⇒ Object
Returns the value of attribute company_id.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#href ⇒ Object
Returns the value of attribute href.
-
#id ⇒ Object
Returns the value of attribute id.
-
#identification_time ⇒ Object
Returns the value of attribute identification_time.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#result ⇒ Object
Returns the value of attribute result.
-
#transaction_number ⇒ Object
Returns the value of attribute transaction_number.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data) ⇒ IdentificationProcess
constructor
A new instance of IdentificationProcess.
- #review_pending? ⇒ Boolean
- #successful? ⇒ Boolean
Methods included from Jsonable
Constructor Details
#initialize(data) ⇒ IdentificationProcess
Returns a new instance of IdentificationProcess.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/idnow/models/identification_process.rb', line 10 def initialize(data) @result = data['result'] @reason = data['reason'] @company_id = data['companyid'] @filename = data['filename'] @agentname = data['agentname'] @identification_time = data['identificationtime'] @id = data['id'] @href = data['href'] @type = data['type'] @transaction_number = data['transactionnumber'] end |
Instance Attribute Details
#agentname ⇒ Object
Returns the value of attribute agentname.
8 9 10 |
# File 'lib/idnow/models/identification_process.rb', line 8 def agentname @agentname end |
#company_id ⇒ Object
Returns the value of attribute company_id.
8 9 10 |
# File 'lib/idnow/models/identification_process.rb', line 8 def company_id @company_id end |
#filename ⇒ Object
Returns the value of attribute filename.
8 9 10 |
# File 'lib/idnow/models/identification_process.rb', line 8 def filename @filename end |
#href ⇒ Object
Returns the value of attribute href.
8 9 10 |
# File 'lib/idnow/models/identification_process.rb', line 8 def href @href end |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/idnow/models/identification_process.rb', line 8 def id @id end |
#identification_time ⇒ Object
Returns the value of attribute identification_time.
8 9 10 |
# File 'lib/idnow/models/identification_process.rb', line 8 def identification_time @identification_time end |
#reason ⇒ Object
Returns the value of attribute reason.
8 9 10 |
# File 'lib/idnow/models/identification_process.rb', line 8 def reason @reason end |
#result ⇒ Object
Returns the value of attribute result.
8 9 10 |
# File 'lib/idnow/models/identification_process.rb', line 8 def result @result end |
#transaction_number ⇒ Object
Returns the value of attribute transaction_number.
8 9 10 |
# File 'lib/idnow/models/identification_process.rb', line 8 def transaction_number @transaction_number end |
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/idnow/models/identification_process.rb', line 8 def type @type end |
Instance Method Details
#review_pending? ⇒ Boolean
27 28 29 |
# File 'lib/idnow/models/identification_process.rb', line 27 def review_pending? result == 'REVIEW_PENDING' || result == 'FRAUD_SUSPICION_PENDING' end |
#successful? ⇒ Boolean
23 24 25 |
# File 'lib/idnow/models/identification_process.rb', line 23 def successful? SUCCESSFUL_RESPONSES.include?(result) end |