Class: Idnow::Identification

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Jsonable
Defined in:
lib/idnow/models/identification.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Jsonable

#to_h, #to_json

Constructor Details

#initialize(data) ⇒ Identification

Returns a new instance of Identification.



13
14
15
16
17
18
19
20
21
# File 'lib/idnow/models/identification.rb', line 13

def initialize(data)
  @identification_process  = IdentificationProcess.new(data['identificationprocess'])
  @contact_data            = ContactData.new(data['contactdata'])
  @user_data               = UserData.new(data['userdata'])
  @identification_document = IdentificationDocument.new(data.fetch('identificationdocument', {}))
  @attachments             = data['attachments']
  @esigning                = data['esigning']
  @raw_data                = data
end

Instance Attribute Details

#attachmentsObject

Returns the value of attribute attachments.



10
11
12
# File 'lib/idnow/models/identification.rb', line 10

def attachments
  @attachments
end

#contact_dataObject

Returns the value of attribute contact_data.



10
11
12
# File 'lib/idnow/models/identification.rb', line 10

def contact_data
  @contact_data
end

#esigningObject

Returns the value of attribute esigning.



10
11
12
# File 'lib/idnow/models/identification.rb', line 10

def esigning
  @esigning
end

#identification_documentObject

Returns the value of attribute identification_document.



10
11
12
# File 'lib/idnow/models/identification.rb', line 10

def identification_document
  @identification_document
end

#identification_processObject

Returns the value of attribute identification_process.



10
11
12
# File 'lib/idnow/models/identification.rb', line 10

def identification_process
  @identification_process
end

#raw_dataObject

Returns the value of attribute raw_data.



10
11
12
# File 'lib/idnow/models/identification.rb', line 10

def raw_data
  @raw_data
end

#user_dataObject

Returns the value of attribute user_data.



10
11
12
# File 'lib/idnow/models/identification.rb', line 10

def user_data
  @user_data
end

Instance Method Details

#esigning?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/idnow/models/identification.rb', line 23

def esigning?
  !@esigning.nil?
end