pub struct PaymentMethod {
pub id: Option<i32>,
pub type: Option<String>,
pub credit_card_ends_with: Option<String>,
pub name_on_card: Option<String>,
pub expiration_month: Option<i32>,
pub expiration_year: Option<i32>,
pub links: Option<Vec<Link>>,
}Expand description
Payment method information
Fields§
§id: Option<i32>Payment method ID
type: Option<String>Card type (e.g., “Mastercard”, “Visa”)
credit_card_ends_with: Option<String>Last digits of the credit card.
Kept as Option<String>, but deserialized with a number-or-string
helper: the OpenAPI schema documents a string, yet the live API returns
creditCardEndsWith as a JSON number. Accepting both keeps the public
type stable while tolerating the real response (a plain String failed
to deserialize — see #120). A string is preserved as-is, so a value with
leading zeros ("0042") is not lost if the API ever sends one.
name_on_card: Option<String>Name on the card
expiration_month: Option<i32>Expiration month (1-12)
expiration_year: Option<i32>Expiration year
links: Option<Vec<Link>>HATEOAS links
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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. 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