Class: Identisure::Document::UploadResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/identisure/document.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, document_hash:) ⇒ UploadResponse

Returns a new instance of UploadResponse.



8
9
10
# File 'lib/identisure/document.rb', line 8

def initialize(id:, document_hash:)
  @id = id; @document_hash = document_hash
end

Instance Attribute Details

#document_hash ⇒ Object (readonly)

Returns the value of attribute document_hash.



6
7
8
# File 'lib/identisure/document.rb', line 6

def document_hash
  @document_hash
end

#id ⇒ Object (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/identisure/document.rb', line 6

def id
  @id
end

Class Method Details

.from_json(d) ⇒ Object



13
# File 'lib/identisure/document.rb', line 13

def self.from_json(d) = new(id: d['id'], document_hash: d['hash'])

Instance Method Details

#deconstruct_keys(_) ⇒ Object



12
# File 'lib/identisure/document.rb', line 12

def deconstruct_keys(_) = { id: @id, document_hash: @document_hash }