class Yoti::DocScan::Session::Create::DocumentRestriction

Public Class Methods

builder() click to toggle source

@return [DocumentRestrictionBuilder]

# File lib/yoti/doc_scan/session/create/document_restrictions_filter.rb, line 104
def self.builder
  DocumentRestrictionBuilder.new
end
new(country_codes, document_types) click to toggle source

@param [Array<String>] country_codes @param [Array<String>] document_types

# File lib/yoti/doc_scan/session/create/document_restrictions_filter.rb, line 82
def initialize(country_codes, document_types)
  Validation.assert_is_a(Array, country_codes, 'country_codes', true)
  @country_codes = country_codes

  Validation.assert_is_a(Array, document_types, 'document_types', true)
  @document_types = document_types
end

Public Instance Methods

as_json(*_args) click to toggle source
# File lib/yoti/doc_scan/session/create/document_restrictions_filter.rb, line 94
def as_json(*_args)
  json = {}
  json[:document_types] = @document_types unless @document_types.nil?
  json[:country_codes] = @country_codes unless @country_codes.nil?
  json
end
to_json(*_args) click to toggle source
# File lib/yoti/doc_scan/session/create/document_restrictions_filter.rb, line 90
def to_json(*_args)
  as_json.to_json
end