pub struct GiftCard {
pub id: Option<String>,
pub type: GiftCardType,
pub balance_money: Option<Money>,
pub created_at: Option<DateTime>,
pub customer_ids: Option<Vec<String>>,
pub gan: Option<String>,
pub gan_source: Option<GiftCardGANSource>,
pub state: Option<GiftCardStatus>,
}
Expand description
Represents a Square gift card.
Fields§
§id: Option<String>
Read only The Square-assigned ID of the gift card.
type: GiftCardType
The gift card type.
balance_money: Option<Money>
Read only The current gift card balance. This balance is always greater than or equal to zero.
created_at: Option<DateTime>
Read only The timestamp when the gift card was created, in RFC 3339 format. In the case of a digital gift card, it is the time when you create a card (using the Square Point of Sale application, Seller Dashboard, or Gift Cards API).
In the case of a plastic gift card, it is the time when Square associates the card with the seller at the time of activation.
customer_ids: Option<Vec<String>>
Read only The IDs of the customer profiles to whom this gift card is linked.
gan: Option<String>
The gift card account number (GAN). Buyers can use the GAN to make purchases or check the gift card balance.
gan_source: Option<GiftCardGANSource>
The source that generated the gift card account number (GAN). The default value is SQUARE
.
state: Option<GiftCardStatus>
Read only The current gift card state.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GiftCard
impl<'de> Deserialize<'de> for GiftCard
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>,
impl Eq for GiftCard
impl StructuralPartialEq for GiftCard
Auto Trait Implementations§
impl Freeze for GiftCard
impl RefUnwindSafe for GiftCard
impl Send for GiftCard
impl Sync for GiftCard
impl Unpin for GiftCard
impl UnwindSafe for GiftCard
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.