Skip to main content

KycProfile

Struct KycProfile 

Source
pub struct KycProfile {
Show 16 fields pub declared_purpose: String, pub expected_monthly_turnover: TurnoverBand, pub expected_transaction_frequency: FrequencyBand, pub expected_categories: Vec<ExpectedCategory>, pub source_of_funds: SourceOfFunds, pub source_of_wealth: Option<SourceOfWealth>, pub geographic_exposure: Vec<CountryExposure>, pub cash_intensity: CashIntensity, pub beneficial_owner_complexity: u8, pub international_rate: f64, pub large_transaction_rate: f64, pub large_transaction_threshold: u64, pub completeness_score: f64, pub true_source_of_funds: Option<SourceOfFunds>, pub true_turnover: Option<TurnoverBand>, pub is_truthful: bool,
}
Expand description

KYC profile defining expected customer activity.

Fields§

§declared_purpose: String

Declared purpose of the account

§expected_monthly_turnover: TurnoverBand

Expected monthly turnover band

§expected_transaction_frequency: FrequencyBand

Expected transaction frequency band

§expected_categories: Vec<ExpectedCategory>

Expected merchant/transaction categories

§source_of_funds: SourceOfFunds

Declared source of funds

§source_of_wealth: Option<SourceOfWealth>

Declared source of wealth (for HNW)

§geographic_exposure: Vec<CountryExposure>

Geographic exposure (countries)

§cash_intensity: CashIntensity

Expected cash intensity

§beneficial_owner_complexity: u8

Beneficial owner complexity score (0-10)

§international_rate: f64

Expected international transaction rate (0.0-1.0)

§large_transaction_rate: f64

Expected large transaction rate (0.0-1.0)

§large_transaction_threshold: u64

Threshold for “large” transaction

§completeness_score: f64

KYC completeness score (0.0-1.0)

§true_source_of_funds: Option<SourceOfFunds>

True source of funds (if different from declared)

§true_turnover: Option<TurnoverBand>

True expected turnover (if different from declared)

§is_truthful: bool

Whether the KYC profile is truthful

Implementations§

Source§

impl KycProfile

Source

pub fn new(purpose: &str, source_of_funds: SourceOfFunds) -> Self

Create a new KYC profile.

Source

pub fn retail_standard() -> Self

Create a profile for a retail customer.

Source

pub fn high_net_worth() -> Self

Create a profile for a high net worth customer.

Source

pub fn small_business() -> Self

Create a profile for a small business.

Source

pub fn cash_intensive_business() -> Self

Create a profile for a cash-intensive business.

Source

pub fn with_turnover(self, turnover: TurnoverBand) -> Self

Set turnover band.

Source

pub fn with_frequency(self, frequency: FrequencyBand) -> Self

Set frequency band.

Source

pub fn with_expected_category(self, category: ExpectedCategory) -> Self

Add expected category.

Source

pub fn with_country_exposure(self, exposure: CountryExposure) -> Self

Add geographic exposure.

Source

pub fn with_cash_intensity(self, intensity: CashIntensity) -> Self

Set cash intensity.

Source

pub fn with_deception( self, true_source: SourceOfFunds, true_turnover: Option<TurnoverBand>, ) -> Self

Set as deceptive (ground truth differs from declared).

Source

pub fn calculate_risk_score(&self) -> u8

Calculate risk score based on profile.

Source

pub fn is_within_expected_turnover(&self, actual_monthly: u64) -> bool

Check if actual activity matches expected.

Source

pub fn is_within_expected_frequency(&self, actual_count: u32) -> bool

Check if transaction frequency is within expected.

Trait Implementations§

Source§

impl Clone for KycProfile

Source§

fn clone(&self) -> KycProfile

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 KycProfile

Source§

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

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

impl Default for KycProfile

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for KycProfile

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 KycProfile

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>,