pub struct ICMatchingEngine { /* private fields */ }Expand description
IC Matching Engine for reconciliation.
Implementations§
Source§impl ICMatchingEngine
impl ICMatchingEngine
Sourcepub fn new(config: ICMatchingConfig) -> Self
pub fn new(config: ICMatchingConfig) -> Self
Create a new matching engine.
Sourcepub fn add_receivable(
&mut self,
creditor: &str,
debtor: &str,
amount: Decimal,
ic_reference: Option<&str>,
date: NaiveDate,
)
pub fn add_receivable( &mut self, creditor: &str, debtor: &str, amount: Decimal, ic_reference: Option<&str>, date: NaiveDate, )
Add a receivable entry to the engine.
Sourcepub fn add_payable(
&mut self,
debtor: &str,
creditor: &str,
amount: Decimal,
ic_reference: Option<&str>,
date: NaiveDate,
)
pub fn add_payable( &mut self, debtor: &str, creditor: &str, amount: Decimal, ic_reference: Option<&str>, date: NaiveDate, )
Add a payable entry to the engine.
Sourcepub fn load_matched_pairs(&mut self, pairs: &[ICMatchedPair])
pub fn load_matched_pairs(&mut self, pairs: &[ICMatchedPair])
Load matched pairs into the engine.
Sourcepub fn load_journal_entries(&mut self, entries: &[JournalEntry])
pub fn load_journal_entries(&mut self, entries: &[JournalEntry])
Load journal entries and extract IC items.
Sourcepub fn run_matching(&mut self, as_of_date: NaiveDate) -> ICMatchingResult
pub fn run_matching(&mut self, as_of_date: NaiveDate) -> ICMatchingResult
Perform matching process.
Sourcepub fn get_balances(&self) -> Vec<&ICAggregatedBalance>
pub fn get_balances(&self) -> Vec<&ICAggregatedBalance>
Get aggregated balances.
Sourcepub fn get_unmatched_balances(&self) -> Vec<&ICAggregatedBalance>
pub fn get_unmatched_balances(&self) -> Vec<&ICAggregatedBalance>
Get unmatched balances.
Sourcepub fn get_balance(
&self,
creditor: &str,
debtor: &str,
) -> Option<&ICAggregatedBalance>
pub fn get_balance( &self, creditor: &str, debtor: &str, ) -> Option<&ICAggregatedBalance>
Get balance for a specific company pair.
Sourcepub fn generate_netting(
&self,
companies: Vec<String>,
period_start: NaiveDate,
period_end: NaiveDate,
settlement_date: NaiveDate,
) -> ICNettingArrangement
pub fn generate_netting( &self, companies: Vec<String>, period_start: NaiveDate, period_end: NaiveDate, settlement_date: NaiveDate, ) -> ICNettingArrangement
Generate netting arrangement.
Sourcepub fn get_statistics(&self) -> MatchingStatistics
pub fn get_statistics(&self) -> MatchingStatistics
Get matching statistics.
Source§impl ICMatchingEngine
impl ICMatchingEngine
Sourcepub fn identify_discrepancies(&self) -> Vec<ICDiscrepancy>
pub fn identify_discrepancies(&self) -> Vec<ICDiscrepancy>
Identify discrepancies requiring action.
Auto Trait Implementations§
impl Freeze for ICMatchingEngine
impl RefUnwindSafe for ICMatchingEngine
impl Send for ICMatchingEngine
impl Sync for ICMatchingEngine
impl Unpin for ICMatchingEngine
impl UnwindSafe for ICMatchingEngine
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