pub struct CreditCard {
pub number: String,
pub _type: String,
pub expire_month: i32,
pub expire_year: i32,
pub cvv2: Option<String>,
pub first_name: Option<String>,
pub last_name: Option<String>,
pub billing_address: Option<Address>,
pub links: Vec<LinkDescription>,
}
Expand description
A credit card
Fields§
§number: String
The credit card number. Value is numeric characters only with no spaces or punctuation. Must conform to the modulo and length required by each credit card type. Redacted in responses.
_type: String
The credit card type. Value is visa, mastercard, discover, or amex. Do not use these lowercase values for display.
expire_month: i32
The expiration month with no leading zero. Value is from 1 to 12.
expire_year: i32
The four-digit expiration year.
cvv2: Option<String>
The three- to four-digit card validation code.
first_name: Option<String>
The card holder’s first name.
last_name: Option<String>
The card holder’s last name.
billing_address: Option<Address>
The billing address for this card.
links: Vec<LinkDescription>
An array of request-related HATEOAS links.
Trait Implementations§
Source§impl Debug for CreditCard
impl Debug for CreditCard
Source§impl<'de> Deserialize<'de> for CreditCard
impl<'de> Deserialize<'de> for CreditCard
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 CreditCard
impl RefUnwindSafe for CreditCard
impl Send for CreditCard
impl Sync for CreditCard
impl Unpin for CreditCard
impl UnwindSafe for CreditCard
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more