use {
crate::models,
serde::{Deserialize, Serialize},
};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PersonalIdentification {
#[serde(rename = "externalReferenceId")]
pub external_reference_id: String,
#[serde(rename = "entityType")]
pub entity_type: EntityType,
#[serde(rename = "participantRelationshipType")]
pub participant_relationship_type: models::ParticipantRelationshipType,
#[serde(rename = "fullName")]
pub full_name: models::PersonalIdentificationFullName,
#[serde(rename = "dateOfBirth")]
pub date_of_birth: String,
#[serde(rename = "postalAddress")]
pub postal_address: models::PostalAddress,
}
impl PersonalIdentification {
pub fn new(
external_reference_id: String,
entity_type: EntityType,
participant_relationship_type: models::ParticipantRelationshipType,
full_name: models::PersonalIdentificationFullName,
date_of_birth: String,
postal_address: models::PostalAddress,
) -> PersonalIdentification {
PersonalIdentification {
external_reference_id,
entity_type,
participant_relationship_type,
full_name,
date_of_birth,
postal_address,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum EntityType {
#[serde(rename = "INDIVIDUAL")]
Individual,
}
impl Default for EntityType {
fn default() -> EntityType {
Self::Individual
}
}