stripe/model/
setup_attempt_payment_method_details.rs1use 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#[derive(Debug, Clone, Serialize, Deserialize, Default)]
15pub struct SetupAttemptPaymentMethodDetails {
16 #[serde(skip_serializing_if = "Option::is_none")]
18 pub acss_debit: Option<SetupAttemptPaymentMethodDetailsAcssDebit>,
19 #[serde(skip_serializing_if = "Option::is_none")]
21 pub au_becs_debit: Option<SetupAttemptPaymentMethodDetailsAuBecsDebit>,
22 #[serde(skip_serializing_if = "Option::is_none")]
24 pub bacs_debit: Option<SetupAttemptPaymentMethodDetailsBacsDebit>,
25 #[serde(skip_serializing_if = "Option::is_none")]
27 pub bancontact: Option<SetupAttemptPaymentMethodDetailsBancontact>,
28 #[serde(skip_serializing_if = "Option::is_none")]
30 pub boleto: Option<SetupAttemptPaymentMethodDetailsBoleto>,
31 #[serde(skip_serializing_if = "Option::is_none")]
33 pub card: Option<SetupAttemptPaymentMethodDetailsCard>,
34 #[serde(skip_serializing_if = "Option::is_none")]
36 pub card_present: Option<SetupAttemptPaymentMethodDetailsCardPresent>,
37 #[serde(skip_serializing_if = "Option::is_none")]
39 pub cashapp: Option<SetupAttemptPaymentMethodDetailsCashapp>,
40 #[serde(skip_serializing_if = "Option::is_none")]
42 pub ideal: Option<SetupAttemptPaymentMethodDetailsIdeal>,
43 #[serde(skip_serializing_if = "Option::is_none")]
45 pub klarna: Option<SetupAttemptPaymentMethodDetailsKlarna>,
46 #[serde(skip_serializing_if = "Option::is_none")]
48 pub link: Option<SetupAttemptPaymentMethodDetailsLink>,
49 #[serde(skip_serializing_if = "Option::is_none")]
51 pub paypal: Option<SetupAttemptPaymentMethodDetailsPaypal>,
52 #[serde(skip_serializing_if = "Option::is_none")]
54 pub sepa_debit: Option<SetupAttemptPaymentMethodDetailsSepaDebit>,
55 #[serde(skip_serializing_if = "Option::is_none")]
57 pub sofort: Option<SetupAttemptPaymentMethodDetailsSofort>,
58 #[serde(rename = "type")]
60 pub type_: String,
61 #[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}