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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! The ordering domain: product orders and their cancellation.
//!
//! Mirrors **TMF622 Product Ordering v5.0.0**, the API that closes the loop
//! from catalog to fulfilment: a [`ProductOrder`] references the
//! [`ProductOffering`](crate::product::ProductOffering)s being bought, and the
//! provider turns each [`ProductOrderItem`] into a product in the inventory.
//!
//! # States are types
//!
//! TMF622 defines three overlapping state enumerations, and this module keeps
//! them apart:
//!
//! - [`ProductOrderState`] — the whole order, thirteen values
//! - [`ProductOrderItemState`] — one line, eleven values
//! - [`InitialProductOrderState`] — the two states a *client* may request
//!
//! The third is the interesting one: `requestedInitialState` accepts only
//! `draft` or `acknowledged`, so asking a server to create an order in
//! `completed` is a compile error rather than a rejected request.
//!
//! # Cancellation is a resource
//!
//! You do not cancel an order by patching its state — see
//! [`CancelProductOrder`].
//!
//! # What an order line acts on lives in `product`
//!
//! A [`ProductOrderItem`] carries a [`Product`](crate::product::Product): the
//! thing the customer will have once the order completes. TMF622 and TMF637
//! declare that schema identically, so it is one type, and it lives with the
//! inventory API that owns it.
pub use ;
pub use ;
// TMF621, TMF622, TMF638 and TMF639 declare `Note` identically, so it is one
// type in `core` rather than one per domain.
pub use crateNote;
pub use ;
pub use ;
pub use ;