models_sumsub

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

map document type to idDocType

Map enum values to their string representations

Map string representations back to enum values

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	Token  string `json:"token"`
	UserId string `json:"userId"`
}

type Applicant

type Applicant struct {
	ID                string    `json:"id,omitempty"`
	CreatedAt         string    `json:"createdAt,omitempty"`
	CreatedBy         string    `json:"createdBy,omitempty"`
	Key               string    `json:"sourceKey,omitempty"`
	ClientID          string    `json:"clientId,omitempty"`
	InspectionID      string    `json:"inspectionId,omitempty"`
	ExternalUserID    string    `json:"externalUserId,omitempty"`
	Info              FixedInfo `json:"info,omitempty"`
	FixedInfo         FixedInfo `json:"fixedInfo,omitempty"`
	ApplicantPlatform string    `json:"applicantPlatform,omitempty"`
	RequiredIdDocs    struct {
		DocSets []struct {
			IdDocSetType  string   `json:"idDocSetType,omitempty"`
			Types         []string `json:"idDocType,omitempty"`
			VideoRequired string   `json:"videoRequired,omitempty"`
		} `json:"docSets,omitempty"`
	} `json:"requiredIdDocs,omitempty"`
	Review struct {
		ReviewID              string    `json:"reviewId,omitempty"`
		AttemptID             string    `json:"attemptId,omitempty"`
		AttemptCnt            int       `json:"attemptCnt,omitempty"`
		LevelName             string    `json:"levelName,omitempty"`
		LevelAutoCheckMode    string    `json:"levelAutoCheckMode,omitempty"`
		CreateDate            string    `json:"createDate,omitempty"`
		ReviewStatus          string    `json:"reviewStatus,omitempty"`
		Priority              int       `json:"priority,omitempty"`
		ElapsedSincePendingMs int       `json:"elapsedSincePendingMs,omitempty"`
		ElapsedSinceQueuedMs  int       `json:"elapsedSinceQueuedMs,omitempty"`
		Reprocessing          bool      `json:"reprocessing,omitempty"`
		ReviewDate            time.Time `json:"reviewDate,omitempty"`
		StartDate             string    `json:"startDate,omitempty"`
		ReviewResult          struct {
			ReviewAnswer string `json:"reviewAnswer,omitempty"`
		} `json:"reviewResult,omitempty"`
		NotificationFailureCnt int `json:"notificationFailureCnt,omitempty"`
	} `json:"review,omitempty"`
	Lang            string          `json:"lang,omitempty"`
	Type            string          `json:"type,omitempty"`
	WebhookResponse WebhookResponse `json:"webhookResponse,omitempty"`
}

type FixedInfo

type FixedInfo struct {
	FirstName  string       `json:"firstName,omitempty"`
	MiddleName string       `json:"middleName,omitempty"`
	LastName   string       `json:"lastName,omitempty"`
	Dob        string       `json:"dob,omitempty"` //yyyy-mm-dd format
	Gender     string       `json:"gender,omitempty"`
	Country    string       `json:"country,omitempty"`
	Addresses  []RawAddress `json:"addresses,omitempty"`
}

type IdDoc

type IdDoc struct {
	IdDocType    string `json:"idDocType,omitempty"`
	Country      string `json:"country,omitempty"`
	FirstName    string `json:"firstName,omitempty"`
	FirstNameEn  string `json:"firstNameEn,omitempty"`
	MiddleName   string `json:"middleName,omitempty"`
	MiddleNameEn string `json:"middleNameEn,omitempty"`
	LastName     string `json:"lastName,omitempty"`
	LastNameEn   string `json:"lastNameEn,omitempty"`
	DateOfBirth  string `json:"dob,omitempty"` // yyyy-mm-dd format
}

type IdDocType

type IdDocType int
const (
	IDCard IdDocType = iota
	Passport
	Drivers
	ResidencePermit
	UtilityBill
	Selfie
	VideoSelfie
	ProfileImage
	IdDocPhoto
	Agreement
	Contract
	DriversTranslation
	InvesterDoc
	VehicleRegistrationCertificate
	IncomeSource
	PaymentMethod
	BankCard
	CovidVaccinationForm
	ArbitraryDoc
	Other
)

Enum values for IdDocType, source: https://developers.sumsub.com/api-reference/#id-documents

func ParseIdDocType

func ParseIdDocType(s string) (IdDocType, error)

Parse string to Status enum

func (IdDocType) String

func (s IdDocType) String() string

String method for Status to get the name

type RawAddress

type RawAddress struct {
	Line1      string `json:"street,omitempty"`
	Line2      string `json:"flatNumber,omitempty"`
	City       string `json:"town"`
	Region     string `json:"state"`
	PostalCode string `json:"postCode"`
	Country    string `json:"country"`
}

Address represents the address fields

type WebhookResponse

type WebhookResponse struct {
	ApplicantID    string `json:"applicantId,omitempty"`
	InspectionID   string `json:"inspectionId,omitempty"`
	CorrelationID  string `json:"correlationId,omitempty"`
	LevelName      string `json:"levelName,omitempty"`
	ExternalUserID string `json:"externalUserId,omitempty"`
	Type           string `json:"type,omitempty"`
	SandboxMode    bool   `json:"sandboxMode,omitempty"`
	ReviewStatus   string `json:"reviewStatus,omitempty"`
	CreatedAtMs    string `json:"createdAtMs,omitempty"`
	ClientID       string `json:"clientId,omitempty"`
	ApplicantType  string `json:"applicantType,omitempty"`
	ReviewResult   struct {
		ReviewAnswer     string   `json:"reviewAnswer,omitempty"`
		RejectLabels     []string `json:"rejectLabels,omitempty"`
		ReviewRejectType string   `json:"reviewRejectType,omitempty"`
		ButtonIds        []string `json:"buttonIds,omitempty"`
	} `json:"reviewResult,omitempty"`
	ApplicantActionID         string `json:"applicantActionId,omitempty"`
	ExternalApplicantActionID string `json:"externalApplicantActionId,omitempty"`
}

Jump to

Keyboard shortcuts

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