class Yoti::DocScan::Session::Create::RequiredDocument

Public Class Methods

new(type) click to toggle source

@param [String] type

# File lib/yoti/doc_scan/session/create/required_document.rb, line 11
def initialize(type)
  raise(TypeError, "#{self.class} cannot be instantiated") if instance_of?(RequiredDocument)

  Validation.assert_is_a(String, type, 'type')
  @type = type
end

Public Instance Methods

as_json(*_args) click to toggle source
# File lib/yoti/doc_scan/session/create/required_document.rb, line 22
def as_json(*_args)
  {
    type: @type
  }
end
to_json(*_args) click to toggle source
# File lib/yoti/doc_scan/session/create/required_document.rb, line 18
def to_json(*_args)
  as_json.to_json
end