Class: Yoti::DocScan::Session::Create::OrthogonalRestrictionsFilterBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/yoti/doc_scan/session/create/orthogonal_restrictions_filter.rb

Instance Method Summary collapse

Instance Method Details

#buildOrthogonalRestrictionsFilter



93
94
95
# 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) ⇒ self

Parameters:

  • country_codes (Array<String>)

Returns:

  • (self)


56
57
58
59
60
61
62
# 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) ⇒ self

Parameters:

  • document_types (Array<String>)

Returns:

  • (self)


82
83
84
85
86
87
88
# 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) ⇒ self

Parameters:

  • country_codes (Array<String>)

Returns:

  • (self)


43
44
45
46
47
48
49
# 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) ⇒ self

Parameters:

  • document_types (Array<String>)

Returns:

  • (self)


69
70
71
72
73
74
75
# 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