Skip to main content

IndustryTransactionGenerator

Trait IndustryTransactionGenerator 

Source
pub trait IndustryTransactionGenerator: Send + Sync {
    type Transaction: IndustryTransaction;
    type Anomaly: IndustryAnomaly;

    // Required methods
    fn generate_transactions(
        &self,
        start_date: NaiveDate,
        end_date: NaiveDate,
        count: usize,
    ) -> Vec<Self::Transaction>;
    fn generate_anomalies(
        &self,
        transactions: &[Self::Transaction],
    ) -> Vec<Self::Anomaly>;
    fn gl_accounts(&self) -> Vec<IndustryGlAccount>;
}
Expand description

Trait for industry-specific transaction generators.

This is the intended future API for pluggable industry modules. Concrete implementations will be added as each industry vertical is built out.

Required Associated Types§

Source

type Transaction: IndustryTransaction

The transaction type produced by this generator.

Source

type Anomaly: IndustryAnomaly

The anomaly type produced by this generator.

Required Methods§

Source

fn generate_transactions( &self, start_date: NaiveDate, end_date: NaiveDate, count: usize, ) -> Vec<Self::Transaction>

Generates transactions for a period.

Source

fn generate_anomalies( &self, transactions: &[Self::Transaction], ) -> Vec<Self::Anomaly>

Generates industry-specific anomalies.

Source

fn gl_accounts(&self) -> Vec<IndustryGlAccount>

Returns industry-specific GL accounts.

Implementors§