checkout_controller 0.0.7

a set of interfaces to create robust backends for a pleasant checkout experience
1
2
3
4
5
6
7
8
9
10
11
12
use crate::{item::Item, money::Currency, CheckoutError};
use async_trait::async_trait;

#[async_trait]
pub trait PriceCalculator {
    async fn update_item_prices(
        &mut self,
        currency: &Currency,
        promo_codes: &Vec<String>,
        items: &mut Vec<Item>,
    ) -> Result<(), CheckoutError>;
}