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
//! One saved instrument a provider holds, as
//! [`Provider::instruments`](crate::Provider::instruments) lists it.
use crateInstrumentId;
use crateRaw;
/// One instrument a provider holds against a customer.
///
/// # Not always a card
///
/// Mollie's saved instrument is a mandate against a bank account, not a card
/// at all, so nothing here assumes one — no brand, no expiry, no last four.
/// What every provider can answer is an identity, something to show a payer
/// choosing between saved instruments, and its own untouched response; that
/// is what this carries. The richer, provider-specific type — iyzico's
/// `classic::StoredCard`, Stripe's `saved::StoredCard`, Mollie's `Mandate` —
/// stays on each adapter's own listing method, where it already was, for
/// whatever more than that a caller working against one provider wants.
///
/// Every field is public and the struct is open, for the same reason
/// [`Charge`](crate::Charge) is: an adapter in someone else's repository has
/// to be able to build one.