stripe/model/setup_attempt_payment_method_details_card.rs
1use serde::{Serialize, Deserialize};
2///
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct SetupAttemptPaymentMethodDetailsCard {
5 ///Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
6 #[serde(skip_serializing_if = "Option::is_none")]
7 pub brand: Option<String>,
8 ///Check results by Card networks on Card address and CVC at the time of authorization
9 #[serde(skip_serializing_if = "Option::is_none")]
10 pub checks: Option<serde_json::Value>,
11 ///Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
12 #[serde(skip_serializing_if = "Option::is_none")]
13 pub country: Option<String>,
14 ///Two-digit number representing the card's expiration month.
15 #[serde(skip_serializing_if = "Option::is_none")]
16 pub exp_month: Option<i64>,
17 ///Four-digit number representing the card's expiration year.
18 #[serde(skip_serializing_if = "Option::is_none")]
19 pub exp_year: Option<i64>,
20 /**Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
21
22*As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.**/
23 #[serde(skip_serializing_if = "Option::is_none")]
24 pub fingerprint: Option<String>,
25 ///Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
26 #[serde(skip_serializing_if = "Option::is_none")]
27 pub funding: Option<String>,
28 ///The last four digits of the card.
29 #[serde(skip_serializing_if = "Option::is_none")]
30 pub last4: Option<String>,
31 ///Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
32 #[serde(skip_serializing_if = "Option::is_none")]
33 pub network: Option<String>,
34 ///Populated if this authorization used 3D Secure authentication.
35 #[serde(skip_serializing_if = "Option::is_none")]
36 pub three_d_secure: Option<serde_json::Value>,
37 ///If this Card is part of a card wallet, this contains the details of the card wallet.
38 #[serde(skip_serializing_if = "Option::is_none")]
39 pub wallet: Option<serde_json::Value>,
40}
41impl std::fmt::Display for SetupAttemptPaymentMethodDetailsCard {
42 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
43 write!(f, "{}", serde_json::to_string(self).unwrap())
44 }
45}