-
Notifications
You must be signed in to change notification settings - Fork 448
/
identity_verificationsession.go
147 lines (133 loc) · 8.25 KB
/
identity_verificationsession.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
//
//
// File generated from our OpenAPI spec
//
//
package stripe
type IdentityVerificationSessionLastErrorCode string
const (
IdentityVerificationSessionLastErrorCodeAbandoned IdentityVerificationSessionLastErrorCode = "abandoned"
IdentityVerificationSessionLastErrorCodeConsentDeclined IdentityVerificationSessionLastErrorCode = "consent_declined"
IdentityVerificationSessionLastErrorCodeCountryNotSupported IdentityVerificationSessionLastErrorCode = "country_not_supported"
IdentityVerificationSessionLastErrorCodeDeviceNotSupported IdentityVerificationSessionLastErrorCode = "device_not_supported"
IdentityVerificationSessionLastErrorCodeDocumentExpired IdentityVerificationSessionLastErrorCode = "document_expired"
IdentityVerificationSessionLastErrorCodeDocumentTypeNotSupported IdentityVerificationSessionLastErrorCode = "document_type_not_supported"
IdentityVerificationSessionLastErrorCodeDocumentUnverifiedOther IdentityVerificationSessionLastErrorCode = "document_unverified_other"
IdentityVerificationSessionLastErrorCodeIDNumberInsufficientDocumentData IdentityVerificationSessionLastErrorCode = "id_number_insufficient_document_data"
IdentityVerificationSessionLastErrorCodeIDNumberMismatch IdentityVerificationSessionLastErrorCode = "id_number_mismatch"
IdentityVerificationSessionLastErrorCodeIDNumberUnverifiedOther IdentityVerificationSessionLastErrorCode = "id_number_unverified_other"
IdentityVerificationSessionLastErrorCodeSelfieDocumentMissingPhoto IdentityVerificationSessionLastErrorCode = "selfie_document_missing_photo"
IdentityVerificationSessionLastErrorCodeSelfieFaceMismatch IdentityVerificationSessionLastErrorCode = "selfie_face_mismatch"
IdentityVerificationSessionLastErrorCodeSelfieManipulated IdentityVerificationSessionLastErrorCode = "selfie_manipulated"
IdentityVerificationSessionLastErrorCodeSelfieUnverifiedOther IdentityVerificationSessionLastErrorCode = "selfie_unverified_other"
IdentityVerificationSessionLastErrorCodeUnderSupportedAge IdentityVerificationSessionLastErrorCode = "under_supported_age"
)
type IdentityVerificationSessionOptionsDocumentAllowedType string
const (
IdentityVerificationSessionOptionsDocumentAllowedTypeDrivingLicense IdentityVerificationSessionOptionsDocumentAllowedType = "driving_license"
IdentityVerificationSessionOptionsDocumentAllowedTypeIDCard IdentityVerificationSessionOptionsDocumentAllowedType = "id_card"
IdentityVerificationSessionOptionsDocumentAllowedTypePassport IdentityVerificationSessionOptionsDocumentAllowedType = "passport"
)
type IdentityVerificationSessionRedactionStatus string
const (
IdentityVerificationSessionRedactionStatusProcessing IdentityVerificationSessionRedactionStatus = "processing"
IdentityVerificationSessionRedactionStatusRedacted IdentityVerificationSessionRedactionStatus = "redacted"
)
type IdentityVerificationSessionStatus string
const (
IdentityVerificationSessionStatusCanceled IdentityVerificationSessionStatus = "canceled"
IdentityVerificationSessionStatusProcessing IdentityVerificationSessionStatus = "processing"
IdentityVerificationSessionStatusRequiresInput IdentityVerificationSessionStatus = "requires_input"
IdentityVerificationSessionStatusVerified IdentityVerificationSessionStatus = "verified"
)
type IdentityVerificationSessionType string
const (
IdentityVerificationSessionTypeDocument IdentityVerificationSessionType = "document"
IdentityVerificationSessionTypeIDNumber IdentityVerificationSessionType = "id_number"
)
type IdentityVerificationSessionVerifiedOutputsIDNumberType string
const (
IdentityVerificationSessionVerifiedOutputsIDNumberTypeBRCPF IdentityVerificationSessionVerifiedOutputsIDNumberType = "br_cpf"
IdentityVerificationSessionVerifiedOutputsIDNumberTypeSGNRIC IdentityVerificationSessionVerifiedOutputsIDNumberType = "sg_nric"
IdentityVerificationSessionVerifiedOutputsIDNumberTypeUSSSN IdentityVerificationSessionVerifiedOutputsIDNumberType = "us_ssn"
)
type IdentityVerificationSessionOptionsDocumentParams struct {
AllowedTypes []*string `form:"allowed_types"`
RequireIDNumber *bool `form:"require_id_number"`
RequireLiveCapture *bool `form:"require_live_capture"`
RequireMatchingSelfie *bool `form:"require_matching_selfie"`
}
type IdentityVerificationSessionOptionsParams struct {
Document *IdentityVerificationSessionOptionsDocumentParams `form:"document"`
}
type IdentityVerificationSessionParams struct {
Params `form:"*"`
Options *IdentityVerificationSessionOptionsParams `form:"options"`
ReturnURL *string `form:"return_url"`
Type *string `form:"type"`
}
type IdentityVerificationSessionListParams struct {
ListParams `form:"*"`
Created *int64 `form:"created"`
CreatedRange *RangeQueryParams `form:"created"`
Status *string `form:"status"`
}
type IdentityVerificationSessionCancelParams struct {
Params `form:"*"`
}
type IdentityVerificationSessionRedactParams struct {
Params `form:"*"`
}
type IdentityVerificationSessionLastError struct {
Code IdentityVerificationSessionLastErrorCode `json:"code"`
Reason string `json:"reason"`
}
type IdentityVerificationSessionOptionsDocument struct {
AllowedTypes []IdentityVerificationSessionOptionsDocumentAllowedType `json:"allowed_types"`
RequireIDNumber bool `json:"require_id_number"`
RequireLiveCapture bool `json:"require_live_capture"`
RequireMatchingSelfie bool `json:"require_matching_selfie"`
}
type IdentityVerificationSessionOptionsIDNumber struct{}
type IdentityVerificationSessionOptions struct {
Document *IdentityVerificationSessionOptionsDocument `json:"document"`
IDNumber *IdentityVerificationSessionOptionsIDNumber `json:"id_number"`
}
type IdentityVerificationSessionRedaction struct {
Status IdentityVerificationSessionRedactionStatus `json:"status"`
}
type IdentityVerificationSessionVerifiedOutputsDOB struct {
Day int64 `json:"day"`
Month int64 `json:"month"`
Year int64 `json:"year"`
}
type IdentityVerificationSessionVerifiedOutputs struct {
Address *Address `json:"address"`
DOB *IdentityVerificationSessionVerifiedOutputsDOB `json:"dob"`
FirstName string `json:"first_name"`
IDNumber string `json:"id_number"`
IDNumberType IdentityVerificationSessionVerifiedOutputsIDNumberType `json:"id_number_type"`
LastName string `json:"last_name"`
}
type IdentityVerificationSession struct {
APIResource
ClientSecret string `json:"client_secret"`
Created int64 `json:"created"`
ID string `json:"id"`
LastError *IdentityVerificationSessionLastError `json:"last_error"`
LastVerificationReport *IdentityVerificationReport `json:"last_verification_report"`
Livemode bool `json:"livemode"`
Metadata map[string]string `json:"metadata"`
Object string `json:"object"`
Options *IdentityVerificationSessionOptions `json:"options"`
Redaction *IdentityVerificationSessionRedaction `json:"redaction"`
Status IdentityVerificationSessionStatus `json:"status"`
Type IdentityVerificationSessionType `json:"type"`
URL string `json:"url"`
VerifiedOutputs *IdentityVerificationSessionVerifiedOutputs `json:"verified_outputs"`
}
type IdentityVerificationSessionList struct {
APIResource
ListMeta
Data []*IdentityVerificationSession `json:"data"`
}