pub struct Tender {Show 14 fields
pub id: Option<String>,
pub location_id: Option<String>,
pub transaction_id: Option<String>,
pub created_at: Option<DateTime>,
pub note: Option<String>,
pub amount_money: Option<Money>,
pub tip_money: Option<Money>,
pub processing_fee_money: Option<Money>,
pub customer_id: Option<String>,
pub type: TenderType,
pub card_details: Option<TenderCardDetails>,
pub cash_details: Option<TenderCashDetails>,
pub additional_recipients: Option<Vec<AdditionalRecipient>>,
pub payment_id: Option<String>,
}
Expand description
Represents a tender (i.e., a method of payment) used in a Square transaction.
Fields§
§id: Option<String>
The tender’s unique ID.
location_id: Option<String>
The ID of the transaction’s associated location.
transaction_id: Option<String>
The ID of the tender’s associated transaction.
created_at: Option<DateTime>
Read only The timestamp for when the tender was created.
note: Option<String>
An optional note associated with the tender at the time of payment.
amount_money: Option<Money>
The total amount of the tender, including tip_money
. If the tender has a payment_id
, the
total_money
of the corresponding [Payment] will be equal to the amount_money
of the
tender.
tip_money: Option<Money>
The tip’s amount of the tender.
processing_fee_money: Option<Money>
The amount of any Square processing fees applied to the tender.
This field is not immediately populated when a new transaction is created. It is usually available after about ten seconds.
customer_id: Option<String>
If the tender is associated with a customer or represents a customer’s card on file, this is the ID of the associated customer.
type: TenderType
Required The type of tender, such as CARD
or CASH
.
card_details: Option<TenderCardDetails>
The details of the card tender.
This value is present only if the value of type
is CARD
.
cash_details: Option<TenderCashDetails>
The details of the cash tender.
This value is present only if the value of type
is CASH
.
additional_recipients: Option<Vec<AdditionalRecipient>>
Additional recipients (other than the merchant) receiving a portion of this tender. For example, fees assessed on the purchase by a third party integration.
payment_id: Option<String>
The ID of the [Payment] that corresponds to this tender. This value is only present for payments created with the v2 Payments API.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tender
impl<'de> Deserialize<'de> for Tender
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 Tender
impl StructuralPartialEq for Tender
Auto Trait Implementations§
impl Freeze for Tender
impl RefUnwindSafe for Tender
impl Send for Tender
impl Sync for Tender
impl Unpin for Tender
impl UnwindSafe for Tender
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.