pub struct AccountAnomalyRules {
pub high_risk_prefixes: Vec<String>,
pub high_risk_multiplier: f64,
pub reconciliation_account_patterns: Vec<String>,
pub reconciliation_error_types: Vec<AnomalyType>,
pub revenue_account_patterns: Vec<String>,
pub revenue_fraud_types: Vec<AnomalyType>,
pub intercompany_account_patterns: Vec<String>,
pub intercompany_error_types: Vec<AnomalyType>,
}Expand description
Rules for account-specific anomaly patterns.
Fields§
§high_risk_prefixes: Vec<String>High-risk account prefixes (e.g., “8” for suspense).
high_risk_multiplier: f64Error multiplier for high-risk accounts.
reconciliation_account_patterns: Vec<String>Reconciliation account patterns.
reconciliation_error_types: Vec<AnomalyType>Error types for reconciliation accounts.
revenue_account_patterns: Vec<String>Revenue account patterns.
revenue_fraud_types: Vec<AnomalyType>Fraud types for revenue accounts.
intercompany_account_patterns: Vec<String>Intercompany account patterns.
intercompany_error_types: Vec<AnomalyType>Error types for intercompany accounts.
Implementations§
Source§impl AccountAnomalyRules
impl AccountAnomalyRules
Sourcepub fn is_high_risk(&self, account_code: &str) -> bool
pub fn is_high_risk(&self, account_code: &str) -> bool
Checks if an account is high-risk.
Sourcepub fn is_reconciliation_account(&self, account_code: &str) -> bool
pub fn is_reconciliation_account(&self, account_code: &str) -> bool
Checks if an account is a reconciliation account.
Sourcepub fn is_revenue_account(&self, account_code: &str) -> bool
pub fn is_revenue_account(&self, account_code: &str) -> bool
Checks if an account is a revenue account.
Sourcepub fn is_intercompany_account(&self, account_code: &str) -> bool
pub fn is_intercompany_account(&self, account_code: &str) -> bool
Checks if an account is an intercompany account.
Sourcepub fn get_multiplier(&self, context: &AccountContext) -> f64
pub fn get_multiplier(&self, context: &AccountContext) -> f64
Gets the error rate multiplier for an account.
Sourcepub fn get_applicable_types(&self, context: &AccountContext) -> Vec<AnomalyType>
pub fn get_applicable_types(&self, context: &AccountContext) -> Vec<AnomalyType>
Gets applicable anomaly types for an account context.
Trait Implementations§
Source§impl Clone for AccountAnomalyRules
impl Clone for AccountAnomalyRules
Source§fn clone(&self) -> AccountAnomalyRules
fn clone(&self) -> AccountAnomalyRules
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AccountAnomalyRules
impl Debug for AccountAnomalyRules
Source§impl Default for AccountAnomalyRules
impl Default for AccountAnomalyRules
Source§impl<'de> Deserialize<'de> for AccountAnomalyRules
impl<'de> Deserialize<'de> for AccountAnomalyRules
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AccountAnomalyRules
impl RefUnwindSafe for AccountAnomalyRules
impl Send for AccountAnomalyRules
impl Sync for AccountAnomalyRules
impl Unpin for AccountAnomalyRules
impl UnwindSafe for AccountAnomalyRules
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more