#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Cent {
#[prost(int64, tag = "1")]
pub val: i64,
}
#[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>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Address {
#[prost(string, tag = "10")]
pub line1: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub line2: ::prost::alloc::string::String,
#[prost(string, tag = "15")]
pub city: ::prost::alloc::string::String,
#[prost(string, tag = "20")]
pub country: ::prost::alloc::string::String,
#[prost(string, tag = "30")]
pub postal_code: ::prost::alloc::string::String,
#[prost(string, tag = "40")]
pub state: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BillingInfo {
#[prost(string, tag = "10")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "20")]
pub address: ::core::option::Option<Address>,
#[prost(string, tag = "30")]
pub email: ::prost::alloc::string::String,
#[prost(string, tag = "40")]
pub tax_id_type: ::prost::alloc::string::String,
#[prost(string, tag = "41")]
pub tax_number: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CardDetails {
#[prost(string, tag = "10")]
pub brand: ::prost::alloc::string::String,
#[prost(int64, tag = "20")]
pub exp_month: i64,
#[prost(int64, tag = "30")]
pub exp_year: i64,
#[prost(string, tag = "40")]
pub last4: ::prost::alloc::string::String,
}
#[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,
}
#[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>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LinkDetails {
#[prost(string, tag = "1")]
pub email: ::prost::alloc::string::String,
}
#[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,
}
#[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 {
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",
}
}
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,
}
}
}