Skip to main content

PaymentProcessor

Trait PaymentProcessor 

Source
pub trait PaymentProcessor {
    // Required method
    fn calculate_payments(
        &self,
        time_since_ready: i64,
        balance_change: i64,
        forgo_commission: bool,
    ) -> PaymentDetails;

    // Provided methods
    fn should_pay(&self, balance_change: i64) -> bool { ... }
    fn calculate_reimbursement(&self, balance_change: i64) -> u64 { ... }
}
Expand description

Trait for processing payments

Required Methods§

Source

fn calculate_payments( &self, time_since_ready: i64, balance_change: i64, forgo_commission: bool, ) -> PaymentDetails

Provided Methods§

Source

fn should_pay(&self, balance_change: i64) -> bool

Source

fn calculate_reimbursement(&self, balance_change: i64) -> u64

Implementors§