stripe/model/identity_verification_report.rs
1use serde::{Serialize, Deserialize};
2use super::{
3 GelatoDocumentReport, GelatoIdNumberReport, GelatoSelfieReport,
4 GelatoVerificationReportOptions,
5};
6/**A VerificationReport is the result of an attempt to collect and verify data from a user.
7The collection of verification checks performed is determined from the `type` and `options`
8parameters used. You can find the result of each verification check performed in the
9appropriate sub-resource: `document`, `id_number`, `selfie`.
10
11Each VerificationReport contains a copy of any data collected by the user as well as
12reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files)
13API. To configure and create VerificationReports, use the
14[VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API.
15
16Related guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).*/
17#[derive(Debug, Clone, Serialize, Deserialize, Default)]
18pub struct IdentityVerificationReport {
19 ///Time at which the object was created. Measured in seconds since the Unix epoch.
20 pub created: i64,
21 ///Result from a document check
22 #[serde(skip_serializing_if = "Option::is_none")]
23 pub document: Option<GelatoDocumentReport>,
24 ///Unique identifier for the object.
25 pub id: String,
26 ///Result from an id_number check
27 #[serde(skip_serializing_if = "Option::is_none")]
28 pub id_number: Option<GelatoIdNumberReport>,
29 ///Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
30 pub livemode: bool,
31 ///String representing the object's type. Objects of the same type share the same value.
32 pub object: String,
33 ///
34 #[serde(skip_serializing_if = "Option::is_none")]
35 pub options: Option<GelatoVerificationReportOptions>,
36 ///Result from a selfie check
37 #[serde(skip_serializing_if = "Option::is_none")]
38 pub selfie: Option<GelatoSelfieReport>,
39 ///Type of report.
40 #[serde(rename = "type")]
41 #[serde(skip_serializing_if = "Option::is_none")]
42 pub type_: Option<String>,
43 ///ID of the VerificationSession that created this report.
44 #[serde(skip_serializing_if = "Option::is_none")]
45 pub verification_session: Option<String>,
46}
47impl std::fmt::Display for IdentityVerificationReport {
48 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
49 write!(f, "{}", serde_json::to_string(self).unwrap())
50 }
51}