stripe/model/
setup_attempt_payment_method_details.rs

1use serde::{Serialize, Deserialize};
2use super::{
3    SetupAttemptPaymentMethodDetailsAcssDebit,
4    SetupAttemptPaymentMethodDetailsAuBecsDebit,
5    SetupAttemptPaymentMethodDetailsBacsDebit,
6    SetupAttemptPaymentMethodDetailsBancontact, SetupAttemptPaymentMethodDetailsBoleto,
7    SetupAttemptPaymentMethodDetailsCard, SetupAttemptPaymentMethodDetailsCardPresent,
8    SetupAttemptPaymentMethodDetailsCashapp, SetupAttemptPaymentMethodDetailsIdeal,
9    SetupAttemptPaymentMethodDetailsKlarna, SetupAttemptPaymentMethodDetailsLink,
10    SetupAttemptPaymentMethodDetailsPaypal, SetupAttemptPaymentMethodDetailsSepaDebit,
11    SetupAttemptPaymentMethodDetailsSofort, SetupAttemptPaymentMethodDetailsUsBankAccount,
12};
13///
14#[derive(Debug, Clone, Serialize, Deserialize, Default)]
15pub struct SetupAttemptPaymentMethodDetails {
16    ///
17    #[serde(skip_serializing_if = "Option::is_none")]
18    pub acss_debit: Option<SetupAttemptPaymentMethodDetailsAcssDebit>,
19    ///
20    #[serde(skip_serializing_if = "Option::is_none")]
21    pub au_becs_debit: Option<SetupAttemptPaymentMethodDetailsAuBecsDebit>,
22    ///
23    #[serde(skip_serializing_if = "Option::is_none")]
24    pub bacs_debit: Option<SetupAttemptPaymentMethodDetailsBacsDebit>,
25    ///
26    #[serde(skip_serializing_if = "Option::is_none")]
27    pub bancontact: Option<SetupAttemptPaymentMethodDetailsBancontact>,
28    ///
29    #[serde(skip_serializing_if = "Option::is_none")]
30    pub boleto: Option<SetupAttemptPaymentMethodDetailsBoleto>,
31    ///
32    #[serde(skip_serializing_if = "Option::is_none")]
33    pub card: Option<SetupAttemptPaymentMethodDetailsCard>,
34    ///
35    #[serde(skip_serializing_if = "Option::is_none")]
36    pub card_present: Option<SetupAttemptPaymentMethodDetailsCardPresent>,
37    ///
38    #[serde(skip_serializing_if = "Option::is_none")]
39    pub cashapp: Option<SetupAttemptPaymentMethodDetailsCashapp>,
40    ///
41    #[serde(skip_serializing_if = "Option::is_none")]
42    pub ideal: Option<SetupAttemptPaymentMethodDetailsIdeal>,
43    ///
44    #[serde(skip_serializing_if = "Option::is_none")]
45    pub klarna: Option<SetupAttemptPaymentMethodDetailsKlarna>,
46    ///
47    #[serde(skip_serializing_if = "Option::is_none")]
48    pub link: Option<SetupAttemptPaymentMethodDetailsLink>,
49    ///
50    #[serde(skip_serializing_if = "Option::is_none")]
51    pub paypal: Option<SetupAttemptPaymentMethodDetailsPaypal>,
52    ///
53    #[serde(skip_serializing_if = "Option::is_none")]
54    pub sepa_debit: Option<SetupAttemptPaymentMethodDetailsSepaDebit>,
55    ///
56    #[serde(skip_serializing_if = "Option::is_none")]
57    pub sofort: Option<SetupAttemptPaymentMethodDetailsSofort>,
58    ///The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method.
59    #[serde(rename = "type")]
60    pub type_: String,
61    ///
62    #[serde(skip_serializing_if = "Option::is_none")]
63    pub us_bank_account: Option<SetupAttemptPaymentMethodDetailsUsBankAccount>,
64}
65impl std::fmt::Display for SetupAttemptPaymentMethodDetails {
66    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
67        write!(f, "{}", serde_json::to_string(self).unwrap())
68    }
69}