1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#![deny(clippy::all)]
#![forbid(unsafe_code)]

pub mod addresses;
mod cents;
pub mod fulfillments;
pub mod i18n;
pub mod line_item_options;
pub mod line_items;
pub mod orders;
mod views;

pub use cents::Cents;
pub use views::format_order_id;

pub trait ToView<T> {
    fn to_view(&self, fmt: &i18n::Formatter) -> T;
}

pub struct OrderFulfillment {
    pub fulfillment: fulfillments::Fulfillment,
    pub invoice_address: addresses::Address,
    pub shipping_address: addresses::Address,
    pub line_items: Vec<(line_items::LineItem, Vec<line_item_options::LineItemOption>)>,
}