Package com.six.timapi
Class TransactionResponse
- java.lang.Object
-
- com.six.timapi.TransactionResponse
-
public class TransactionResponse extends Object
Contains the result of a transaction finished after callingTerminal.transaction(com.six.timapi.constants.TransactionType, com.six.timapi.Amount)
orTerminal.transactionAsync(com.six.timapi.constants.TransactionType, com.six.timapi.Amount)
. Immutable class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TransactionResponse.Action
Action.
-
Constructor Summary
Constructors Constructor Description TransactionResponse(TransactionType transactionType, Amount amount, Amount amountOther, Amount amountDue, AmountDcc amountDcc, Amount amountSaldo, TransactionInformation transactionInformation, String dccDisclaimer, CardData cardData, PrintData printData, Amount amountTip, Map<Long,String> additionalInfo, Basket basket, Amount amountLoyaltyCashback, Amount amountSurcharge)
Create transaction response.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Integer
cardCountryCode()
Card country code if present.Map<Long,String>
getAdditionalInfo()
Additional information list.Amount
getAmount()
Amount authorized by the transaction.AmountDcc
getAmountDcc()
DCC amount authorized by the transaction if present.Amount
getAmountDue()
Due amount in the transaction.Amount
getAmountOther()
Amount other authorized by the transaction.Amount
getAmountSaldo()
Saldo amount if present.Amount
getAmountSurcharge()
Surcharge amount or null;Amount
getAmountTip()
Tip amount.Basket
getBasket()
Petrol: Basket.CardData
getCardData()
Information about payment card used by the cardholder if present.String
getDccDisclaimer()
Disclaimer sent by host.Amount
getLoyaltyCashbackAmount()
Loyalty cashback amounr.PrintData
getPrintData()
Print information for merchant and cardholder receipts.Amount
getTipAmount()
Deprecated.UsegetAmountTip()
.TransactionInformation
getTransactionInformation()
Information about completed transaction.TransactionType
getTransactionType()
Transaction type.boolean
isDomestic()
Determines if transaction has been domestic.TransactionResponse.Action
needsAction()
Transaction requires an action.Integer
terminalCountryCode()
Terminal country code if present.String
toString()
String representation for debugging purpose.boolean
wasDcc()
Transaction has been using DCC.boolean
wasPartialApproval()
Transaction has been partially approved.boolean
wasTip()
Transaction has been using TIP.
-
-
-
Constructor Detail
-
TransactionResponse
public TransactionResponse(TransactionType transactionType, Amount amount, Amount amountOther, Amount amountDue, AmountDcc amountDcc, Amount amountSaldo, TransactionInformation transactionInformation, String dccDisclaimer, CardData cardData, PrintData printData, Amount amountTip, Map<Long,String> additionalInfo, Basket basket, Amount amountLoyaltyCashback, Amount amountSurcharge)
Create transaction response.
-
-
Method Detail
-
getTransactionType
public TransactionType getTransactionType()
Transaction type.
-
getAmount
public Amount getAmount()
Amount authorized by the transaction.
-
getAmountOther
public Amount getAmountOther()
Amount other authorized by the transaction.
-
getAmountDue
public Amount getAmountDue()
Due amount in the transaction.
-
getAmountDcc
public AmountDcc getAmountDcc()
DCC amount authorized by the transaction if present.
-
getAmountSaldo
public Amount getAmountSaldo()
Saldo amount if present.
-
getTransactionInformation
public TransactionInformation getTransactionInformation()
Information about completed transaction.
-
getDccDisclaimer
public String getDccDisclaimer()
Disclaimer sent by host.
-
getCardData
public CardData getCardData()
Information about payment card used by the cardholder if present.
-
getPrintData
public PrintData getPrintData()
Print information for merchant and cardholder receipts.
-
getAmountTip
public Amount getAmountTip()
Tip amount. This parameter is only used ifGuides.GASTRO
is enabled.
-
getTipAmount
public Amount getTipAmount()
Deprecated.UsegetAmountTip()
.
-
getBasket
public Basket getBasket()
Petrol: Basket.
-
getLoyaltyCashbackAmount
public Amount getLoyaltyCashbackAmount()
Loyalty cashback amounr.
-
getAmountSurcharge
public Amount getAmountSurcharge()
Surcharge amount or null;
-
wasDcc
public boolean wasDcc()
Transaction has been using DCC.
-
wasTip
public boolean wasTip()
Transaction has been using TIP.
-
needsAction
public TransactionResponse.Action needsAction()
Transaction requires an action.
-
wasPartialApproval
public boolean wasPartialApproval()
Transaction has been partially approved.
-
cardCountryCode
public Integer cardCountryCode()
Card country code if present.
-
terminalCountryCode
public Integer terminalCountryCode()
Terminal country code if present.
-
isDomestic
public boolean isDomestic()
Determines if transaction has been domestic. Returns true if card country code and terminal country code are both set and are equal.
-
-