public final class CheckoutResult
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CheckoutResult.Builder
Builder class for constructing CheckoutResult objects.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.util.Date |
getCreatedAt()
The date and time when the transaction was completed, as determined by the client device.
|
java.lang.String |
getLocationId()
The unique ID of the location to which the transaction was credited.
|
java.util.Set<Tender> |
getTenders()
The set of tenders associated with a successful transaction.
|
Money |
getTotalMoney()
The total amount collected during checkout.
|
Money |
getTotalTipMoney()
The total tip amount applied to the transaction across all tenders and included as part of
totalMoney . |
java.lang.String |
getTransactionClientId()
A unique client-generated ID for successful transactions.
|
java.lang.String |
getTransactionId()
A unique ID issued by Square's servers for successful transactions that include one or more
card tenders.
|
int |
hashCode() |
static CheckoutResult.Builder |
newBuilder(java.lang.String locationId,
Money totalMoney,
java.lang.String transactionClientId)
Creates a new CheckoutResult builder with default values.
|
java.lang.String |
toString() |
@NonNull public static CheckoutResult.Builder newBuilder(@NonNull java.lang.String locationId, @NonNull Money totalMoney, @NonNull java.lang.String transactionClientId)
Creates a new CheckoutResult builder with default values.
This method is provided for testing purposes.
@NonNull public java.lang.String getLocationId()
@NonNull public Money getTotalMoney()
totalMoney
amounts for all tenders in the transaction, including tips.@NonNull public java.lang.String getTransactionClientId()
A unique client-generated ID for successful transactions. All successful transactions
include a client-generated ID. Transactions with card tenders also include a transaction ID
that is assigned when the card is processed.
To reconcile transactions that do not have card tenders, use
getTransactionClientId()
to match client-generated transactions to the client_id
field in transactions returned by the
ListTransactions endpoint of the Connect v2 Transactions API.
@Nullable public java.lang.String getTransactionId()
transactionId
is null for transactions that have no card tenders
(for example, a cash transaction). Transaction IDs can be used to lookup transaction details or
refund transactions at a later time via the
Transactions API@NonNull public Money getTotalTipMoney()
totalMoney
.@NonNull public java.util.Date getCreatedAt()
@NonNull public java.util.Set<Tender> getTenders()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object