use crate::core::macros::{tmf_struct, tmf_value};
use crate::core::{Attachment, TimePeriod, Timestamp};
tmf_struct! {
@name = "PartyCreditProfile";
pub struct PartyCreditProfile {
id: String,
href: String,
credit_agency_name: String,
credit_agency_type: String,
rating_reference: String,
rating_score: i64,
valid_for: TimePeriod,
}
}
tmf_struct! {
@name = "IndividualIdentification";
pub struct PartyIdentification {
identification_id: String,
identification_type: String,
issuing_authority: String,
issuing_date: Timestamp,
valid_for: TimePeriod,
attachment: Attachment,
}
}
impl PartyIdentification {
pub const ORGANIZATION_TYPE: &'static str = "OrganizationIdentification";
#[must_use]
pub fn for_organization(mut self) -> Self {
Self::ORGANIZATION_TYPE.clone_into(&mut self.at_type);
self
}
}
tmf_value! {
pub struct OtherNameIndividual {
family_name: String,
family_name_prefix: String,
given_name: String,
middle_name: String,
full_name: String,
formatted_name: String,
legal_name: String,
preferred_given_name: String,
title: String,
aristocratic_title: String,
generation: String,
valid_for: TimePeriod,
}
}
tmf_struct! {
@name = "OtherNameOrganization";
pub struct OtherNameOrganization {
name: String,
name_type: String,
trading_name: String,
valid_for: TimePeriod,
}
}
tmf_value! {
pub struct Disability {
disability_code: String,
disability_name: String,
valid_for: TimePeriod,
}
}
tmf_value! {
pub struct LanguageAbility {
language_code: String,
language_name: String,
is_favourite_language: bool,
listening_proficiency: String,
reading_proficiency: String,
speaking_proficiency: String,
writing_proficiency: String,
valid_for: TimePeriod,
}
}
tmf_value! {
pub struct Skill {
skill_code: String,
skill_name: String,
evaluated_level: String,
comment: String,
valid_for: TimePeriod,
}
}