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
use *;
/// A PaymentIntent as returned by Stripe's REST API.
///
/// A PaymentIntent tracks one customer payment attempt from creation
/// through authentication to capture. The `next_action` field tells the
/// browser what it still owes the user, and `latest_charge` links to
/// the Charge Stripe created once the payment settled.
///
/// Read accessors are generated by `#[derive(Getter)]`. Only the fields
/// a caller acts on are marked; `amount` and `currency` are deliberately
/// unmarked because the pair is only meaningful together, so
/// `get_amount` pairs them into a `Money` by hand instead of exposing
/// two independently readable halves.