stripe/model/
payment_method_card_present.rs

1use serde::{Serialize, Deserialize};
2///
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct PaymentMethodCardPresent {
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    ///The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
9    #[serde(skip_serializing_if = "Option::is_none")]
10    pub cardholder_name: Option<String>,
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    pub exp_month: i64,
16    ///Four-digit number representing the card's expiration year.
17    pub exp_year: i64,
18    /**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.
19
20*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.**/
21    #[serde(skip_serializing_if = "Option::is_none")]
22    pub fingerprint: Option<String>,
23    ///Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
24    #[serde(skip_serializing_if = "Option::is_none")]
25    pub funding: Option<String>,
26    ///The last four digits of the card.
27    #[serde(skip_serializing_if = "Option::is_none")]
28    pub last4: Option<String>,
29    ///Contains information about card networks that can be used to process the payment.
30    #[serde(skip_serializing_if = "Option::is_none")]
31    pub networks: Option<serde_json::Value>,
32    ///How card details were read in this transaction.
33    #[serde(skip_serializing_if = "Option::is_none")]
34    pub read_method: Option<String>,
35}
36impl std::fmt::Display for PaymentMethodCardPresent {
37    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
38        write!(f, "{}", serde_json::to_string(self).unwrap())
39    }
40}