filter

package
v3.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountryRestriction

type CountryRestriction struct {
	Inclusion    string   `json:"inclusion"`
	CountryCodes []string `json:"country_codes"`
}

CountryRestriction is a restriction of the country in which a document pertains to

type RequestedDocumentFilter

type RequestedDocumentFilter interface {
	Type() string
}

RequestedDocumentFilter filters for a required document, allowing specification of restrictive parameters

type RequestedDocumentRestriction

type RequestedDocumentRestriction struct {
	DocumentTypes []string `json:"document_types,omitempty"`
	CountryCodes  []string `json:"country_codes,omitempty"`
}

RequestedDocumentRestriction represents a document filter for checks and tasks

Example
docRestriction, err := NewRequestedDocumentRestrictionBuilder().
	WithDocumentTypes([]string{"PASSPORT"}).
	WithCountryCodes([]string{"GBR"}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(docRestriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"document_types":["PASSPORT"],"country_codes":["GBR"]}

type RequestedDocumentRestrictionBuilder

type RequestedDocumentRestrictionBuilder struct {
	// contains filtered or unexported fields
}

RequestedDocumentRestrictionBuilder builds a RequestedDocumentRestriction

func NewRequestedDocumentRestrictionBuilder

func NewRequestedDocumentRestrictionBuilder() *RequestedDocumentRestrictionBuilder

NewRequestedDocumentRestrictionBuilder creates a new RequestedDocumentRestrictionBuilder

func (*RequestedDocumentRestrictionBuilder) Build

Build creates a new RequestedDocumentRestriction

func (*RequestedDocumentRestrictionBuilder) WithCountryCodes

WithCountryCodes sets the country codes of the filter

Example
docRestriction, err := NewRequestedDocumentRestrictionBuilder().
	WithCountryCodes([]string{"GBR"}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(docRestriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"country_codes":["GBR"]}

func (*RequestedDocumentRestrictionBuilder) WithDocumentTypes

WithDocumentTypes sets the document types of the filter

Example
docRestriction, err := NewRequestedDocumentRestrictionBuilder().
	WithDocumentTypes([]string{"PASSPORT"}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(docRestriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"document_types":["PASSPORT"]}

type RequestedDocumentRestrictionsFilter

type RequestedDocumentRestrictionsFilter struct {
	// contains filtered or unexported fields
}

RequestedDocumentRestrictionsFilter filters for a required document, allowing specification of restrictive parameters

func (*RequestedDocumentRestrictionsFilter) MarshalJSON

func (r *RequestedDocumentRestrictionsFilter) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding

func (RequestedDocumentRestrictionsFilter) Type

Type is the type of the document restriction filter

type RequestedDocumentRestrictionsFilterBuilder

type RequestedDocumentRestrictionsFilterBuilder struct {
	// contains filtered or unexported fields
}

RequestedDocumentRestrictionsFilterBuilder builds a RequestedDocumentRestrictionsFilter

Example (WithAllowNonLatinDocuments)
restriction, err := NewRequestedDocumentRestrictionsFilterBuilder().
	WithAllowNonLatinDocuments(true).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(restriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"DOCUMENT_RESTRICTIONS","inclusion":"","documents":[],"allow_non_latin_documents":true}
Example (WithDenyExpiredDocuments)
restriction, err := NewRequestedDocumentRestrictionsFilterBuilder().
	WithExpiredDocuments(false).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(restriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"DOCUMENT_RESTRICTIONS","inclusion":"","documents":[],"allow_expired_documents":false}
Example (WithDenyNonLatinDocuments)
restriction, err := NewRequestedDocumentRestrictionsFilterBuilder().
	WithAllowNonLatinDocuments(false).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(restriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"DOCUMENT_RESTRICTIONS","inclusion":"","documents":[],"allow_non_latin_documents":false}
Example (WithExpiredDocuments)
restriction, err := NewRequestedDocumentRestrictionsFilterBuilder().
	WithExpiredDocuments(true).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(restriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"DOCUMENT_RESTRICTIONS","inclusion":"","documents":[],"allow_expired_documents":true}

func NewRequestedDocumentRestrictionsFilterBuilder

func NewRequestedDocumentRestrictionsFilterBuilder() *RequestedDocumentRestrictionsFilterBuilder

NewRequestedDocumentRestrictionsFilterBuilder creates a new RequestedDocumentRestrictionsFilterBuilder

func (*RequestedDocumentRestrictionsFilterBuilder) Build

Build creates a new RequestedDocumentRestrictionsFilter

func (*RequestedDocumentRestrictionsFilterBuilder) ForExcludeList

ForExcludeList sets the type restriction to EXCLUDE the document restrictions

Example
docRestriction, err := NewRequestedDocumentRestrictionBuilder().
	WithDocumentTypes([]string{"PASSPORT"}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

var docFilter *RequestedDocumentRestrictionsFilter
docFilter, err = NewRequestedDocumentRestrictionsFilterBuilder().
	ForExcludeList().
	WithDocumentRestriction(docRestriction).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(docFilter)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"DOCUMENT_RESTRICTIONS","inclusion":"BLACKLIST","documents":[{"document_types":["PASSPORT"]}]}

func (*RequestedDocumentRestrictionsFilterBuilder) ForIncludeList

ForIncludeList sets the type restriction to INCLUDE the document restrictions

Example
docRestriction, err := NewRequestedDocumentRestrictionBuilder().
	WithDocumentTypes([]string{"PASSPORT"}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

var docFilter *RequestedDocumentRestrictionsFilter
docFilter, err = NewRequestedDocumentRestrictionsFilterBuilder().
	ForIncludeList().
	WithDocumentRestriction(docRestriction).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(docFilter)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"DOCUMENT_RESTRICTIONS","inclusion":"WHITELIST","documents":[{"document_types":["PASSPORT"]}]}

func (*RequestedDocumentRestrictionsFilterBuilder) WithAllowNonLatinDocuments added in v3.10.0

func (b *RequestedDocumentRestrictionsFilterBuilder) WithAllowNonLatinDocuments(allowNonLatinDocuments bool) *RequestedDocumentRestrictionsFilterBuilder

WithExpiredDocuments sets a bool value to allowExpiredDocuments on filter

func (*RequestedDocumentRestrictionsFilterBuilder) WithDocumentRestriction

WithDocumentRestriction adds a document restriction to the filter

func (*RequestedDocumentRestrictionsFilterBuilder) WithExpiredDocuments added in v3.10.0

func (b *RequestedDocumentRestrictionsFilterBuilder) WithExpiredDocuments(allowExpiredDocuments bool) *RequestedDocumentRestrictionsFilterBuilder

WithExpiredDocuments sets a bool value to allowExpiredDocuments on filter

type RequestedOrthogonalRestrictionsFilter

type RequestedOrthogonalRestrictionsFilter struct {
	// contains filtered or unexported fields
}

RequestedOrthogonalRestrictionsFilter filters for a required document, allowing specification of restrictive parameters

func (RequestedOrthogonalRestrictionsFilter) MarshalJSON

func (r RequestedOrthogonalRestrictionsFilter) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding

func (RequestedOrthogonalRestrictionsFilter) Type

Type returns the type of the RequestedOrthogonalRestrictionsFilter

type RequestedOrthogonalRestrictionsFilterBuilder

type RequestedOrthogonalRestrictionsFilterBuilder struct {
	// contains filtered or unexported fields
}

RequestedOrthogonalRestrictionsFilterBuilder builds a RequestedOrthogonalRestrictionsFilter

Example (WithDenyExpiredDocuments)
restriction, err := NewRequestedOrthogonalRestrictionsFilterBuilder().
	WithExpiredDocuments(false).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(restriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"ORTHOGONAL_RESTRICTIONS","allow_expired_documents":false}
Example (WithDenyNonLatinDocuments)
restriction, err := NewRequestedOrthogonalRestrictionsFilterBuilder().
	WithNonLatinDocuments(false).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(restriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"ORTHOGONAL_RESTRICTIONS","allow_non_latin_documents":false}
Example (WithExpiredDocuments)
restriction, err := NewRequestedOrthogonalRestrictionsFilterBuilder().
	WithExpiredDocuments(true).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(restriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"ORTHOGONAL_RESTRICTIONS","allow_expired_documents":true}
Example (WithNonLatinDocuments)
restriction, err := NewRequestedOrthogonalRestrictionsFilterBuilder().
	WithNonLatinDocuments(true).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(restriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"ORTHOGONAL_RESTRICTIONS","allow_non_latin_documents":true}

func NewRequestedOrthogonalRestrictionsFilterBuilder

func NewRequestedOrthogonalRestrictionsFilterBuilder() *RequestedOrthogonalRestrictionsFilterBuilder

NewRequestedOrthogonalRestrictionsFilterBuilder creates a new RequestedOrthogonalRestrictionsFilterBuilder

func (*RequestedOrthogonalRestrictionsFilterBuilder) Build

Build creates a new RequestedOrthogonalRestrictionsFilter

func (*RequestedOrthogonalRestrictionsFilterBuilder) WithExcludedCountries

WithExcludedCountries sets an "EXCLUDE" slice of country codes on the filter

Example
restriction, err := NewRequestedOrthogonalRestrictionsFilterBuilder().
	WithExcludedCountries([]string{"CAN", "FJI"}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(restriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"ORTHOGONAL_RESTRICTIONS","country_restriction":{"inclusion":"BLACKLIST","country_codes":["CAN","FJI"]}}

func (*RequestedOrthogonalRestrictionsFilterBuilder) WithExcludedDocumentTypes

WithExcludedDocumentTypes sets an "EXCLUDE" slice of document types on the filter

Example
restriction, err := NewRequestedOrthogonalRestrictionsFilterBuilder().
	WithExcludedDocumentTypes([]string{"NATIONAL_ID", "PASS_CARD"}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(restriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"ORTHOGONAL_RESTRICTIONS","type_restriction":{"inclusion":"BLACKLIST","document_types":["NATIONAL_ID","PASS_CARD"]}}

func (*RequestedOrthogonalRestrictionsFilterBuilder) WithExpiredDocuments added in v3.9.0

WithExpiredDocuments sets a bool value to allowExpiredDocuments on filter

func (*RequestedOrthogonalRestrictionsFilterBuilder) WithIncludedCountries

WithIncludedCountries sets an "INCLUDE" slice of country codes on the filter

Example
restriction, err := NewRequestedOrthogonalRestrictionsFilterBuilder().
	WithIncludedCountries([]string{"KEN", "CIV"}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(restriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"ORTHOGONAL_RESTRICTIONS","country_restriction":{"inclusion":"WHITELIST","country_codes":["KEN","CIV"]}}

func (*RequestedOrthogonalRestrictionsFilterBuilder) WithIncludedDocumentTypes

WithIncludedDocumentTypes sets an "INCLUDE" slice of document types on the filter

Example
restriction, err := NewRequestedOrthogonalRestrictionsFilterBuilder().
	WithIncludedDocumentTypes([]string{"PASSPORT", "DRIVING_LICENCE"}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(restriction)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"ORTHOGONAL_RESTRICTIONS","type_restriction":{"inclusion":"WHITELIST","document_types":["PASSPORT","DRIVING_LICENCE"]}}

func (*RequestedOrthogonalRestrictionsFilterBuilder) WithNonLatinDocuments added in v3.9.0

WithNonLatinDocuments sets a bool value to allowNonLatinDocuments on filter

type RequiredDocument

type RequiredDocument interface {
	Type() string
	MarshalJSON() ([]byte, error)
}

RequiredDocument is a document to be required for the session

type RequiredIDDocument

type RequiredIDDocument struct {
	Filter RequestedDocumentFilter
}

RequiredIDDocument details a required identity document

func (*RequiredIDDocument) MarshalJSON

func (i *RequiredIDDocument) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding

Example
docRestriction, err := NewRequestedDocumentRestrictionBuilder().
	WithDocumentTypes([]string{"PASSPORT"}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

var docFilter *RequestedDocumentRestrictionsFilter
docFilter, err = NewRequestedDocumentRestrictionsFilterBuilder().
	ForIncludeList().
	WithDocumentRestriction(docRestriction).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

var requiredIDDocument *RequiredIDDocument
requiredIDDocument, err = NewRequiredIDDocumentBuilder().
	WithFilter(docFilter).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(requiredIDDocument)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"ID_DOCUMENT","filter":{"type":"DOCUMENT_RESTRICTIONS","inclusion":"WHITELIST","documents":[{"document_types":["PASSPORT"]}]}}

func (*RequiredIDDocument) Type

func (i *RequiredIDDocument) Type() string

Type returns the type of the identity document

type RequiredIDDocumentBuilder

type RequiredIDDocumentBuilder struct {
	// contains filtered or unexported fields
}

RequiredIDDocumentBuilder builds a RequiredIDDocument

func NewRequiredIDDocumentBuilder

func NewRequiredIDDocumentBuilder() *RequiredIDDocumentBuilder

NewRequiredIDDocumentBuilder creates a new RequiredIDDocumentBuilder

func (RequiredIDDocumentBuilder) Build

Build builds the RequiredIDDocument struct

func (RequiredIDDocumentBuilder) WithFilter

WithFilter sets the filter on the required ID document

type RequiredSupplementaryDocument added in v3.3.0

type RequiredSupplementaryDocument struct {
	Filter        RequestedDocumentFilter
	DocumentTypes []string
	CountryCodes  []string
	Objective     objective.Objective
}

RequiredSupplementaryDocument details a required supplementary document

Example
var requiredSupplementaryDocument *RequiredSupplementaryDocument
requiredSupplementaryDocument, err := NewRequiredSupplementaryDocumentBuilder().
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(requiredSupplementaryDocument)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"SUPPLEMENTARY_DOCUMENT"}

func (*RequiredSupplementaryDocument) MarshalJSON added in v3.3.0

func (r *RequiredSupplementaryDocument) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding

func (*RequiredSupplementaryDocument) Type added in v3.3.0

Type returns the type of the supplementary document

type RequiredSupplementaryDocumentBuilder added in v3.3.0

type RequiredSupplementaryDocumentBuilder struct {
	// contains filtered or unexported fields
}

RequiredSupplementaryDocumentBuilder builds a RequiredSupplementaryDocument

func NewRequiredSupplementaryDocumentBuilder added in v3.3.0

func NewRequiredSupplementaryDocumentBuilder() *RequiredSupplementaryDocumentBuilder

NewRequiredSupplementaryDocumentBuilder creates a new RequiredSupplementaryDocumentBuilder

func (*RequiredSupplementaryDocumentBuilder) Build added in v3.3.0

Build builds the RequiredSupplementaryDocument struct

func (*RequiredSupplementaryDocumentBuilder) WithCountryCodes added in v3.3.0

WithCountryCodes sets the country codes on the required supplementary document

Example
var requiredSupplementaryDocument *RequiredSupplementaryDocument
requiredSupplementaryDocument, err := NewRequiredSupplementaryDocumentBuilder().
	WithCountryCodes([]string{"SOME_COUNTRY"}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(requiredSupplementaryDocument)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"SUPPLEMENTARY_DOCUMENT","country_codes":["SOME_COUNTRY"]}
Example (Empty)
var requiredSupplementaryDocument *RequiredSupplementaryDocument
requiredSupplementaryDocument, err := NewRequiredSupplementaryDocumentBuilder().
	WithCountryCodes([]string{}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(requiredSupplementaryDocument)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"SUPPLEMENTARY_DOCUMENT"}

func (*RequiredSupplementaryDocumentBuilder) WithDocumentTypes added in v3.3.0

WithDocumentTypes sets the document types on the required supplementary document

Example
var requiredSupplementaryDocument *RequiredSupplementaryDocument
requiredSupplementaryDocument, err := NewRequiredSupplementaryDocumentBuilder().
	WithDocumentTypes([]string{"SOME_DOCUMENT_TYPE"}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(requiredSupplementaryDocument)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"SUPPLEMENTARY_DOCUMENT","document_types":["SOME_DOCUMENT_TYPE"]}
Example (Empty)
var requiredSupplementaryDocument *RequiredSupplementaryDocument
requiredSupplementaryDocument, err := NewRequiredSupplementaryDocumentBuilder().
	WithDocumentTypes([]string{}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(requiredSupplementaryDocument)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"SUPPLEMENTARY_DOCUMENT"}

func (*RequiredSupplementaryDocumentBuilder) WithFilter added in v3.3.0

WithFilter sets the filter on the required supplementary document

Example
docRestriction, err := NewRequestedDocumentRestrictionBuilder().
	WithDocumentTypes([]string{"UTILITY_BILL"}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

var docFilter *RequestedDocumentRestrictionsFilter
docFilter, err = NewRequestedDocumentRestrictionsFilterBuilder().
	ForIncludeList().
	WithDocumentRestriction(docRestriction).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

var requiredSupplementaryDocument *RequiredSupplementaryDocument
requiredSupplementaryDocument, err = NewRequiredSupplementaryDocumentBuilder().
	WithFilter(docFilter).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(requiredSupplementaryDocument)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"SUPPLEMENTARY_DOCUMENT","filter":{"type":"DOCUMENT_RESTRICTIONS","inclusion":"WHITELIST","documents":[{"document_types":["UTILITY_BILL"]}]}}

func (*RequiredSupplementaryDocumentBuilder) WithObjective added in v3.3.0

WithObjective sets the objective for the required supplementary document

Example
var requiredSupplementaryDocument *RequiredSupplementaryDocument
requiredSupplementaryDocument, err := NewRequiredSupplementaryDocumentBuilder().
	WithObjective(&mockObjective{}).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(requiredSupplementaryDocument)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"SUPPLEMENTARY_DOCUMENT","objective":{"type":"SOME_OBJECTIVE"}}
Example (ProofOfAddress)
var proofOfAddress objective.Objective
proofOfAddress, err := objective.NewProofOfAddressObjectiveBuilder().Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

var requiredSupplementaryDocument *RequiredSupplementaryDocument
requiredSupplementaryDocument, err = NewRequiredSupplementaryDocumentBuilder().
	WithObjective(proofOfAddress).
	Build()
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

data, err := json.Marshal(requiredSupplementaryDocument)
if err != nil {
	fmt.Printf("error: %s", err.Error())
	return
}

fmt.Println(string(data))
Output:

{"type":"SUPPLEMENTARY_DOCUMENT","objective":{"type":"PROOF_OF_ADDRESS"}}

type TypeRestriction

type TypeRestriction struct {
	Inclusion     string   `json:"inclusion"`
	DocumentTypes []string `json:"document_types"`
}

TypeRestriction is a restriction of the type of document required

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL