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>>
👎Deprecated

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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more