Skip to main content

BankingCustomer

Struct BankingCustomer 

Source
pub struct BankingCustomer {
Show 34 fields pub customer_id: Uuid, pub customer_type: BankingCustomerType, pub name: CustomerName, pub persona: Option<PersonaVariant>, pub residence_country: String, pub citizenship_country: Option<String>, pub date_of_birth: Option<NaiveDate>, pub tax_id: Option<String>, pub national_id: Option<String>, pub passport_number: Option<String>, pub onboarding_date: NaiveDate, pub kyc_profile: KycProfile, pub risk_tier: RiskTier, pub account_ids: Vec<Uuid>, pub relationships: Vec<CustomerRelationship>, pub beneficial_owners: Vec<BeneficialOwner>, pub email: Option<String>, pub phone: Option<String>, pub address_line1: Option<String>, pub address_line2: Option<String>, pub city: Option<String>, pub state: Option<String>, pub postal_code: Option<String>, pub is_active: bool, pub is_pep: bool, pub pep_category: Option<PepCategory>, pub industry_code: Option<String>, pub industry_description: Option<String>, pub household_id: Option<Uuid>, pub last_kyc_review: Option<NaiveDate>, pub next_kyc_review: Option<NaiveDate>, pub is_mule: bool, pub kyc_truthful: bool, pub true_source_of_funds: Option<SourceOfFunds>,
}
Expand description

A banking customer with full KYC information.

Fields§

§customer_id: Uuid

Unique customer identifier

§customer_type: BankingCustomerType

Customer type (retail, business, trust)

§name: CustomerName

Customer name

§persona: Option<PersonaVariant>

Behavioral persona

§residence_country: String

Country of residence (ISO 3166-1 alpha-2)

§citizenship_country: Option<String>

Country of citizenship (for individuals)

§date_of_birth: Option<NaiveDate>

Date of birth (for individuals) or incorporation (for entities)

§tax_id: Option<String>

Tax identification number

§national_id: Option<String>

National ID number

§passport_number: Option<String>

Passport number

§onboarding_date: NaiveDate

Customer onboarding date

§kyc_profile: KycProfile

KYC profile with expected activity

§risk_tier: RiskTier

Risk tier assigned

§account_ids: Vec<Uuid>

Account IDs owned by this customer

§relationships: Vec<CustomerRelationship>

Relationships with other customers

§beneficial_owners: Vec<BeneficialOwner>

Beneficial owners (for entities/trusts)

§email: Option<String>

Primary contact email

§phone: Option<String>

Primary contact phone

§address_line1: Option<String>

Address line 1

§address_line2: Option<String>

Address line 2

§city: Option<String>

City

§state: Option<String>

State/province

§postal_code: Option<String>

Postal code

§is_active: bool

Whether customer is active

§is_pep: bool

Whether customer is a PEP (Politically Exposed Person)

§pep_category: Option<PepCategory>

PEP category if applicable

§industry_code: Option<String>

Industry/occupation (NAICS code for businesses)

§industry_description: Option<String>

Industry description

§household_id: Option<Uuid>

Household ID for linked retail customers

§last_kyc_review: Option<NaiveDate>

Date of last KYC review

§next_kyc_review: Option<NaiveDate>

Next scheduled KYC review

§is_mule: bool

Whether this is a mule account (ground truth)

§kyc_truthful: bool

Whether KYC information is truthful

§true_source_of_funds: Option<SourceOfFunds>

True source of funds if different from declared

Implementations§

Source§

impl BankingCustomer

Source

pub fn new_retail( customer_id: Uuid, first_name: &str, last_name: &str, residence_country: &str, onboarding_date: NaiveDate, ) -> Self

Create a new retail customer.

Source

pub fn new_business( customer_id: Uuid, legal_name: &str, residence_country: &str, onboarding_date: NaiveDate, ) -> Self

Create a new business customer.

Source

pub fn with_persona(self, persona: PersonaVariant) -> Self

Set the persona.

Source

pub fn with_risk_tier(self, tier: RiskTier) -> Self

Set the risk tier.

Source

pub fn add_account(&mut self, account_id: Uuid)

Add an account.

Source

pub fn add_relationship(&mut self, relationship: CustomerRelationship)

Add a relationship.

Source

pub fn add_beneficial_owner(&mut self, owner: BeneficialOwner)

Add a beneficial owner.

Source

pub fn calculate_risk_score(&self) -> u8

Calculate composite risk score.

Trait Implementations§

Source§

impl Clone for BankingCustomer

Source§

fn clone(&self) -> BankingCustomer

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BankingCustomer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for BankingCustomer

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for BankingCustomer

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,