stripe/resources/generated/
invoice_payment_method_options_acss_debit.rs1use serde::{Deserialize, Serialize};
6
7#[derive(Clone, Debug, Default, Deserialize, Serialize)]
9pub struct InvoicePaymentMethodOptionsAcssDebit {
10 #[serde(skip_serializing_if = "Option::is_none")]
11 pub mandate_options: Option<InvoicePaymentMethodOptionsAcssDebitMandateOptions>,
12
13 #[serde(skip_serializing_if = "Option::is_none")]
15 pub verification_method: Option<InvoicePaymentMethodOptionsAcssDebitVerificationMethod>,
16}
17
18#[derive(Clone, Debug, Default, Deserialize, Serialize)]
19pub struct InvoicePaymentMethodOptionsAcssDebitMandateOptions {
20 pub transaction_type: Option<InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType>,
22}
23
24#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
26#[serde(rename_all = "snake_case")]
27pub enum InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
28 Business,
29 Personal,
30}
31
32impl InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
33 pub fn as_str(self) -> &'static str {
34 match self {
35 InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Business => {
36 "business"
37 }
38 InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType::Personal => {
39 "personal"
40 }
41 }
42 }
43}
44
45impl AsRef<str> for InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
46 fn as_ref(&self) -> &str {
47 self.as_str()
48 }
49}
50
51impl std::fmt::Display for InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
52 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
53 self.as_str().fmt(f)
54 }
55}
56impl std::default::Default for InvoicePaymentMethodOptionsAcssDebitMandateOptionsTransactionType {
57 fn default() -> Self {
58 Self::Business
59 }
60}
61
62#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
64#[serde(rename_all = "snake_case")]
65pub enum InvoicePaymentMethodOptionsAcssDebitVerificationMethod {
66 Automatic,
67 Instant,
68 Microdeposits,
69}
70
71impl InvoicePaymentMethodOptionsAcssDebitVerificationMethod {
72 pub fn as_str(self) -> &'static str {
73 match self {
74 InvoicePaymentMethodOptionsAcssDebitVerificationMethod::Automatic => "automatic",
75 InvoicePaymentMethodOptionsAcssDebitVerificationMethod::Instant => "instant",
76 InvoicePaymentMethodOptionsAcssDebitVerificationMethod::Microdeposits => {
77 "microdeposits"
78 }
79 }
80 }
81}
82
83impl AsRef<str> for InvoicePaymentMethodOptionsAcssDebitVerificationMethod {
84 fn as_ref(&self) -> &str {
85 self.as_str()
86 }
87}
88
89impl std::fmt::Display for InvoicePaymentMethodOptionsAcssDebitVerificationMethod {
90 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
91 self.as_str().fmt(f)
92 }
93}
94impl std::default::Default for InvoicePaymentMethodOptionsAcssDebitVerificationMethod {
95 fn default() -> Self {
96 Self::Automatic
97 }
98}