Class: DocFox::KycEntityTemplate::Facade

Inherits:
Object
  • Object
show all
Defined in:
lib/doc_fox/kyc_entity_template/facade.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Facade

Returns a new instance of Facade.



7
8
9
10
11
12
13
14
15
16
# File 'lib/doc_fox/kyc_entity_template/facade.rb', line 7

def initialize(hash)
  @id         = hash.dig('data', 'id') || hash['id']
  @attributes = hash.dig('data', 'attributes') || hash['attributes']

  @created_at               = attributes['created_at']
  @kyc_entity_type_name     = attributes['kyc_entity_type_name']
  @kyc_entity_type_category = attributes['kyc_entity_type_category']
  @profile_schema           = attributes['profile_schema']
  @updated_at               = attributes['updated_at']
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



4
5
6
# File 'lib/doc_fox/kyc_entity_template/facade.rb', line 4

def attributes
  @attributes
end

#created_atObject (readonly)

Returns the value of attribute created_at.



4
5
6
# File 'lib/doc_fox/kyc_entity_template/facade.rb', line 4

def created_at
  @created_at
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/doc_fox/kyc_entity_template/facade.rb', line 4

def id
  @id
end

#kyc_entity_type_categoryObject (readonly)

Returns the value of attribute kyc_entity_type_category.



4
5
6
# File 'lib/doc_fox/kyc_entity_template/facade.rb', line 4

def kyc_entity_type_category
  @kyc_entity_type_category
end

#kyc_entity_type_nameObject (readonly)

Returns the value of attribute kyc_entity_type_name.



4
5
6
# File 'lib/doc_fox/kyc_entity_template/facade.rb', line 4

def kyc_entity_type_name
  @kyc_entity_type_name
end

#profile_schemaObject (readonly)

Returns the value of attribute profile_schema.



4
5
6
# File 'lib/doc_fox/kyc_entity_template/facade.rb', line 4

def profile_schema
  @profile_schema
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



4
5
6
# File 'lib/doc_fox/kyc_entity_template/facade.rb', line 4

def updated_at
  @updated_at
end