Documentation
// This file is @generated by prost-build.
/// Representation of USD Cents.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Cent {
    #[prost(int64, tag = "1")]
    pub val: i64,
}
/// Payment method types wrapper to allow repeated optional fields.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PaymentMethodTypes {
    #[prost(enumeration = "PaymentMethodType", repeated, tag = "1")]
    pub payment_method_types: ::prost::alloc::vec::Vec<i32>,
}
/// A redacted version of card details. The actual card details are handled by third-party payment providers.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Address {
    /// Address line 1 (e.g., street, PO Box, or company name).
    #[prost(string, tag = "10")]
    pub line1: ::prost::alloc::string::String,
    /// Address line 2 (e.g., apartment, suite, unit, or building).
    #[prost(string, tag = "11")]
    pub line2: ::prost::alloc::string::String,
    /// City, district, suburb, town, or village.
    #[prost(string, tag = "15")]
    pub city: ::prost::alloc::string::String,
    /// Two-letter country code ([ISO 3166-1 alpha-2](<https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>)).
    #[prost(string, tag = "20")]
    pub country: ::prost::alloc::string::String,
    /// ZIP or postal code.
    #[prost(string, tag = "30")]
    pub postal_code: ::prost::alloc::string::String,
    /// State, county, province, or region.
    #[prost(string, tag = "40")]
    pub state: ::prost::alloc::string::String,
}
/// Billing info.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BillingInfo {
    /// The customer's full name or business name.
    #[prost(string, tag = "10")]
    pub name: ::prost::alloc::string::String,
    /// The customer's address.
    #[prost(message, optional, tag = "20")]
    pub address: ::core::option::Option<Address>,
    /// The customer's email.
    #[prost(string, tag = "30")]
    pub email: ::prost::alloc::string::String,
    /// Customer Tax ID type on Stripe ([Stripe Reference](<https://docs.stripe.com/api/tax_ids/customer_create>))
    #[prost(string, tag = "40")]
    pub tax_id_type: ::prost::alloc::string::String,
    /// Customer Tax ID number on Stripe ([Stripe Reference](<https://docs.stripe.com/api/tax_ids/customer_create>))
    #[prost(string, tag = "41")]
    pub tax_number: ::prost::alloc::string::String,
}
/// A redacted version of card details. The actual card details are handled by third-party payment providers.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CardDetails {
    /// Card brand.
    /// Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
    #[prost(string, tag = "10")]
    pub brand: ::prost::alloc::string::String,
    /// Two-digit number representing the card's expiration month.
    #[prost(int64, tag = "20")]
    pub exp_month: i64,
    /// Four-digit number representing the card's expiration year.
    #[prost(int64, tag = "30")]
    pub exp_year: i64,
    /// The last four digits of the card.
    #[prost(string, tag = "40")]
    pub last4: ::prost::alloc::string::String,
}
/// ACH blocked reason.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UsBankAccountBlocked {
    #[prost(string, tag = "10")]
    pub network_code: ::prost::alloc::string::String,
    #[prost(string, tag = "20")]
    pub block_reason: ::prost::alloc::string::String,
}
/// ACH details.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UsBankAccountDetails {
    #[prost(string, tag = "10")]
    pub bank_name: ::prost::alloc::string::String,
    #[prost(string, tag = "20")]
    pub last4: ::prost::alloc::string::String,
    #[prost(string, tag = "30")]
    pub routing_number: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "40")]
    pub blocked: ::core::option::Option<UsBankAccountBlocked>,
}
/// Link payment details.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LinkDetails {
    #[prost(string, tag = "1")]
    pub email: ::prost::alloc::string::String,
}
/// Payment method and details.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PaymentMethod {
    #[prost(string, tag = "10")]
    pub payment_method_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "20")]
    pub billing_info: ::core::option::Option<BillingInfo>,
    #[prost(message, optional, tag = "30")]
    pub card_details: ::core::option::Option<CardDetails>,
    #[prost(message, optional, tag = "31")]
    pub us_bank_account_details: ::core::option::Option<UsBankAccountDetails>,
    #[prost(message, optional, tag = "32")]
    pub link_details: ::core::option::Option<LinkDetails>,
    #[prost(string, tag = "40")]
    pub payment_type: ::prost::alloc::string::String,
}
/// Payment method types.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PaymentMethodType {
    UnknownPmt = 0,
    Card = 10,
    Cashapp = 20,
    Link = 30,
    UsBankAccount = 40,
}
impl PaymentMethodType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::UnknownPmt => "UNKNOWN_PMT",
            Self::Card => "CARD",
            Self::Cashapp => "CASHAPP",
            Self::Link => "LINK",
            Self::UsBankAccount => "US_BANK_ACCOUNT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "UNKNOWN_PMT" => Some(Self::UnknownPmt),
            "CARD" => Some(Self::Card),
            "CASHAPP" => Some(Self::Cashapp),
            "LINK" => Some(Self::Link),
            "US_BANK_ACCOUNT" => Some(Self::UsBankAccount),
            _ => None,
        }
    }
}