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
//! GrabMart: the mart API client, models, cart and quote parsing (see
//! docs/mart.md).
//!
//! Browsing uses the mart `public` API with reCAPTCHA tokens minted in the CDP
//! browser ([`recaptcha`]); results are cached under namespace `"mart"`. The
//! cart is a value the caller keeps; quotes hit `protected/cart` with the
//! logged-in session; the order path is gated exactly like GrabFood's
//! ([`order`]). Build a [`client::Mart`] from a [`grabcli_core::Context`].
//!
//! # Example: keep a cart in memory
//!
//! ```
//! use grabmart::{Cart, CartItem};
//!
//! let mut cart = Cart::default();
//! cart.add("store-id", "Example store", CartItem {
//! item_id: "item-id".into(),
//! quantity: 2,
//! name: "Example item".into(),
//! unit_price_minor: 5_000,
//! campaign_id: None,
//! comment: String::new(),
//! })?;
//! assert!(!cart.is_empty());
//! # Ok::<(), grabcli_core::Error>(())
//! ```
//!
//! This example makes no network calls. A cart price is only a display snapshot;
//! obtain a live quote through [`Mart`] before considering an order.
pub use ;
pub use ;
/// Package README examples, compiled as doctests.
;