stripe/model/issuing_token.rs
1use serde::{Serialize, Deserialize};
2use super::IssuingNetworkTokenNetworkData;
3///An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://stripe.com/docs/issuing), you can [view and manage these tokens](https://stripe.com/docs/issuing/controls/token-management) through Stripe.
4#[derive(Debug, Clone, Serialize, Deserialize, Default)]
5pub struct IssuingToken {
6 ///Card associated with this token.
7 pub card: serde_json::Value,
8 ///Time at which the object was created. Measured in seconds since the Unix epoch.
9 pub created: i64,
10 ///The hashed ID derived from the device ID from the card network associated with the token
11 #[serde(skip_serializing_if = "Option::is_none")]
12 pub device_fingerprint: Option<String>,
13 ///Unique identifier for the object.
14 pub id: String,
15 ///The last four digits of the token.
16 #[serde(skip_serializing_if = "Option::is_none")]
17 pub last4: Option<String>,
18 ///Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
19 pub livemode: bool,
20 ///The token service provider / card network associated with the token.
21 pub network: String,
22 ///
23 #[serde(skip_serializing_if = "Option::is_none")]
24 pub network_data: Option<IssuingNetworkTokenNetworkData>,
25 ///Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch.
26 pub network_updated_at: i64,
27 ///String representing the object's type. Objects of the same type share the same value.
28 pub object: String,
29 ///The usage state of the token.
30 pub status: String,
31 ///The digital wallet for this token, if one was used.
32 #[serde(skip_serializing_if = "Option::is_none")]
33 pub wallet_provider: Option<String>,
34}
35impl std::fmt::Display for IssuingToken {
36 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
37 write!(f, "{}", serde_json::to_string(self).unwrap())
38 }
39}