stripe/resources/generated/
payment_method_options_us_bank_account_mandate_options.rs1use serde::{Deserialize, Serialize};
6
7#[derive(Clone, Debug, Default, Deserialize, Serialize)]
9pub struct PaymentMethodOptionsUsBankAccountMandateOptions {
10 #[serde(skip_serializing_if = "Option::is_none")]
12 pub collection_method: Option<PaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod>,
13}
14
15#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
17#[serde(rename_all = "snake_case")]
18pub enum PaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod {
19 Paper,
20}
21
22impl PaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod {
23 pub fn as_str(self) -> &'static str {
24 match self {
25 PaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod::Paper => "paper",
26 }
27 }
28}
29
30impl AsRef<str> for PaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod {
31 fn as_ref(&self) -> &str {
32 self.as_str()
33 }
34}
35
36impl std::fmt::Display for PaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod {
37 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
38 self.as_str().fmt(f)
39 }
40}
41impl std::default::Default for PaymentMethodOptionsUsBankAccountMandateOptionsCollectionMethod {
42 fn default() -> Self {
43 Self::Paper
44 }
45}