plaid/model/
beacon_user_id_number.rs

1use serde::{Serialize, Deserialize};
2use super::IdNumberType;
3///The ID number associated with a Beacon User.
4#[derive(Debug, Clone, Serialize, Deserialize)]
5pub struct BeaconUserIdNumber {
6    ///A globally unique and human readable ID type, specific to the country and document category. For more context on this field, see [Hybrid Input Validation](https://plaid.com/docs/identity-verification/hybrid-input-validation).
7    #[serde(rename = "type")]
8    pub type_: IdNumberType,
9    ///Value of identity document value typed in by user. Alpha-numeric, with all formatting characters stripped. For specific format requirements by ID type, see [Hybrid Input Validation](https://plaid.com/docs/identity-verification/hybrid-input-validation/).
10    pub value: String,
11}
12impl std::fmt::Display for BeaconUserIdNumber {
13    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14        write!(f, "{}", serde_json::to_string(self).unwrap())
15    }
16}