TransactionResponse
public class TransactionResponse : CustomStringConvertible
Contains the result of a transaction finished after calling {@link Terminal#transaction} or {@link Terminal#transactionAsync}. Immutable class.
-
Required actions
See moreDeclaration
Swift
public enum Action
-
init(transactionType:amount:amountOther:amountDue:amountDcc:amountSaldo:transactionInformation:dccDisclaimer:cardData:printData:amountTip:additionalInfo:basket:)
Create transaction response.
Declaration
Swift
public init(transactionType: CTransactionType, amount: Amount?, amountOther: Amount?, amountDue: Amount?, amountDcc: AmountDcc?, amountSaldo: Amount?, transactionInformation: TransactionInformation?, dccDisclaimer: String?, cardData: CardData?, printData: PrintData?, amountTip: Amount?, additionalInfo: [Int: String]?, basket: Basket?)
-
Function indicating if transaction has dcc amount
Declaration
Swift
public func wasDcc() -> Bool
Return Value
true if dcc amount was given, else false
-
Function indicating if transaction has tip amount
Declaration
Swift
public func wasTip() -> Bool
Return Value
true if tip amount was given, else false
-
Function indicating if an action is required
Declaration
Swift
public func needsAction() -> Action
Return Value
returns The needed transaction if there is one, else ‘.none’
-
Function indicating if transaction was partial approval
Declaration
Swift
public func wasPartialApproval() -> Bool
Return Value
true if amount due was given, else false
-
Card country code if present.
Declaration
Swift
public func cardCountryCode() -> Int?
-
Terminal country code if present.
Declaration
Swift
public func terminalCountryCode() -> Int?
-
Determines if transaction has been domestic. Returns true if card country code and terminal country code are both set and are equal.
Declaration
Swift
public func isDomestic() -> Bool
-
Transaction type.
Declaration
Swift
public let transactionType: CTransactionType
-
Amount authorized by the transaction.
Declaration
Swift
public let amount: Amount?
-
Amount other authorized by the transaction.
Declaration
Swift
public let amountOther: Amount?
-
Due amount in the transaction.
Declaration
Swift
public let amountDue: Amount?
-
DCC amount authorized by the transaction if present.
Declaration
Swift
public let amountDcc: AmountDcc?
-
Saldo amount if present.
Declaration
Swift
public let amountSaldo: Amount?
-
Information about completed transaction.
Declaration
Swift
public let transactionInformation: TransactionInformation?
-
Disclaimer sent by host.
Declaration
Swift
public let dccDisclaimer: String?
-
Information about payment card used by the cardholder if present.
Declaration
Swift
public let cardData: CardData?
-
Print information for merchant and cardholder receipts.
Declaration
Swift
public let printData: PrintData?
-
Tip amount.
This parameter is only used if {@link com.six.timapi.constants.Guides#GASTRO} is enabled.
Declaration
Swift
public let amountTip: Amount?
-
Additional information list.
Declaration
Swift
public var additionalInfo: [Int : String]?
-
Petrol: Basket.
Declaration
Swift
public var basket: Basket?
-
Textual representation.
Declaration
Swift
public var description: String { get }