pub struct PaymentMethod {Show 18 fields
pub id: Uuid,
pub customer_id: CustomerId,
pub method_type: PaymentMethodType,
pub is_default: bool,
pub card_brand: Option<CardBrand>,
pub card_last4: Option<String>,
pub card_exp_month: Option<i32>,
pub card_exp_year: Option<i32>,
pub cardholder_name: Option<String>,
pub bank_name: Option<String>,
pub account_last4: Option<String>,
pub wallet_address: Option<String>,
pub blockchain_network: Option<BlockchainNetwork>,
pub stablecoin_type: Option<StablecoinType>,
pub external_id: Option<String>,
pub billing_address: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
A stored payment method for a customer
Fields§
§id: UuidUnique ID
customer_id: CustomerIdCustomer ID
method_type: PaymentMethodTypePayment method type
is_default: boolWhether this is the default payment method
card_brand: Option<CardBrand>Card brand (if card)
card_last4: Option<String>Last 4 digits (if card)
card_exp_month: Option<i32>Expiry month (if card)
card_exp_year: Option<i32>Expiry year (if card)
cardholder_name: Option<String>Cardholder name
bank_name: Option<String>Bank name (if bank transfer)
account_last4: Option<String>Last 4 of account (if bank)
wallet_address: Option<String>Wallet address (for crypto/stablecoin payments)
blockchain_network: Option<BlockchainNetwork>Preferred blockchain network
stablecoin_type: Option<StablecoinType>Preferred stablecoin type
external_id: Option<String>External ID from payment processor
billing_address: Option<String>Billing address
created_at: DateTime<Utc>When the method was created
updated_at: DateTime<Utc>When the method was last updated
Trait Implementations§
Source§impl Clone for PaymentMethod
impl Clone for PaymentMethod
Source§fn clone(&self) -> PaymentMethod
fn clone(&self) -> PaymentMethod
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PaymentMethod
impl Debug for PaymentMethod
Source§impl<'de> Deserialize<'de> for PaymentMethod
impl<'de> Deserialize<'de> for PaymentMethod
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PaymentMethod, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PaymentMethod, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PaymentMethod
impl Serialize for PaymentMethod
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for PaymentMethod
impl RefUnwindSafe for PaymentMethod
impl Send for PaymentMethod
impl Sync for PaymentMethod
impl Unpin for PaymentMethod
impl UnsafeUnpin for PaymentMethod
impl UnwindSafe for PaymentMethod
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more