class Yoti::DocScan::Session::Create::OrthogonalRestrictionsFilterBuilder

Public Instance Methods

build() click to toggle source

@return [OrthogonalRestrictionsFilter]

# File lib/yoti/doc_scan/session/create/orthogonal_restrictions_filter.rb, line 93
def build
  OrthogonalRestrictionsFilter.new(@country_restriction, @type_restriction)
end
with_excluded_countries(country_codes) click to toggle source

@param [Array<String>] country_codes

@return [self]

# File lib/yoti/doc_scan/session/create/orthogonal_restrictions_filter.rb, line 56
def with_excluded_countries(country_codes)
  @country_restriction = CountryRestriction.new(
    Constants::EXCLUDE,
    country_codes
  )
  self
end
with_excluded_document_types(document_types) click to toggle source

@param [Array<String>] document_types

@return [self]

# File lib/yoti/doc_scan/session/create/orthogonal_restrictions_filter.rb, line 82
def with_excluded_document_types(document_types)
  @type_restriction = TypeRestriction.new(
    Constants::EXCLUDE,
    document_types
  )
  self
end
with_included_countries(country_codes) click to toggle source

@param [Array<String>] country_codes

@return [self]

# File lib/yoti/doc_scan/session/create/orthogonal_restrictions_filter.rb, line 43
def with_included_countries(country_codes)
  @country_restriction = CountryRestriction.new(
    Constants::INCLUDE,
    country_codes
  )
  self
end
with_included_document_types(document_types) click to toggle source

@param [Array<String>] document_types

@return [self]

# File lib/yoti/doc_scan/session/create/orthogonal_restrictions_filter.rb, line 69
def with_included_document_types(document_types)
  @type_restriction = TypeRestriction.new(
    Constants::INCLUDE,
    document_types
  )
  self
end