Terminal

public class Terminal : CustomStringConvertible

Terminal base implementation. Create instance of TerminalApi to connect to payment terminal.

Most simple usage is using synchronous methods like this example:

 
 // Create settings with Terminal-ID of terminal to connect to
 let terminalSettings = try TerminalSettings()
 terminalSettings.terminalId = 12345678

// Create terminal var terminal = try Terminal(settings: terminalSettings)

// Run transaction terminal.transaction(com.six.constants.TransactionType.PURCHASE, new com.six.Amount(8.5, com.six.constants.Currency.CHF))

// Disconnect from terminal and clean up properly terminal.dispose()

The above example blocks until the transaction finishes. To create a responsive application use asynchronous methods like this example:

 
 // Asynchronous listener handling terminal events.
 class TerminalHandler extends com.six.DefaultTerminalListener {
    {@literal @}Override
    public func transactionCompleted(com.six.TimEvent event, final com.six.TransactionResponse data) {
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            {@literal @}Override
            public func run() {
                // handle transaction finished using data
            }
        })
    }
 }

// Create settings with Terminal-ID of terminal to connect to com.six.TerminalSettings settings = new com.six.TerminalSettings() settings.setTerminalId(12345678)

// Create terminal com.six.Terminal terminal = new com.six.Terminal(settings)

// Add listener to handle events terminal.addListener(new TerminalHandler())

// Run transaction terminal.transactionAsync(com.six.constants.TransactionType.PURCHASE, new com.six.Amount(8.5, com.six.constants.Currency.CHF))

// Once the transaction completes TerminalHandler.transactionCompleted will be called

  • TCP/IP communication driver identifier.

    Declaration

    Swift

    public static let COMM_DRIVER_TCPIP: String
  • Tim Api Build Version. @seeterminalSettings

    Declaration

    Swift

    public static var timApiVersion: String { get }
  • Create terminal using configuration.

    Declaration

    Swift

    public init(settings: TerminalSettings) throws
  • Dispose of terminal.

    Declaration

    Swift

    public func dispose()
  • Opens a user shift. If the shift is already open, no error is returned.

    Declaration

    Swift

    public func activate() throws -> ActivateResponse
  • Opens a user shift. If the shift is already open, no error is returned. Asynchronous version of Terminal.activate(...). Returns immediately and calls TerminalListener.activateCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func activateAsync() throws
  • Requests the list of brands available on the terminal.

    Side-Effect: Updates Brands member with all brands available on the terminal. Use Terminal.getBrands(...) to retrieve them.

    Declaration

    Swift

    public func applicationInformation() throws
  • Requests the list of brands available on the terminal. Asynchronous version of Terminal.applicationInformation(...). Returns immediately and calls TerminalListener.applicationInformationCompleted(...) on all notifiers once finished.

    Side-Effect: Updates Brands member with all brands available on the terminal. Use Terminal.getBrands() to retrieve them.

    Declaration

    Swift

    public func applicationInformationAsync() throws
  • Forces the EFT Terminal to transmit all transactions to the host system as well to do the daily closing.

    Declaration

    Swift

    public func balance() throws -> BalanceResponse
  • Forces the EFT Terminal to transmit all transactions to the host system as well to do the daily closing. Asynchronous version of balance(...). Returns immediately and calls TerminalListener.balanceCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func balanceAsync() throws
  • Aborts an open asynchronous Financial Transaction or Non-Financial Transaction request, except for a Terminal.commit(...) or Terminal.rollbackAsync(...) request, which cannot be cancelled.

    Further information: A Cancel-request is a best effort request. The EFT Terminal can ignore the Cancel-request if the request in progress is in a state it can not be cancelled. A Cancel-request has no effect if there’s no open request of a Financial Transaction or Non-financial Transaction. If the EFT Terminal cancels the request in progress an error response is send back for the cancelled request (see chapter Abort Purchase for an example). Cancel-requests can be send multiple times in an attempt to cancel a request in progress but should be spaced by a few seconds. Cancel-requests themselves are never acknowledged by the EFT Terminal.

    The Transaction request can only be cancelled before a Commit has been performed. Also the underlying payment protocol can restrict this functionality.

    Declaration

    Swift

    public func cancel() throws
  • Aborts an open asynchronous Financial Transaction or Non-Financial Transaction request, except for a Terminal.commit(...) or Terminal.rollbackAsync(...) request, which cannot be cancelled.

    Further information: A Cancel-request is a best effort request. The EFT Terminal can ignore the Cancel-request if the request in progress is in a state it can not be cancelled. A Cancel-request has no effect if there’s no open request of a Financial Transaction or Non-financial Transaction. If the EFT Terminal cancels the request in progress an error response is send back for the cancelled request (see chapter Abort Purchase for an example). Cancel-requests can be send multiple times in an attempt to cancel a request in progress but should be spaced by a few seconds. Cancel-requests themselves are never acknowledged by the EFT Terminal.

    The Transaction request can only be cancelled before a Commit has been performed. Also the underlying payment protocol can restrict this functionality.

    Declaration

    Swift

    public func cancel(silent: Bool, retainCard: Bool) throws
  • Changes configuration parameters of the EFT Terminal.

    Declaration

    Swift

    public func changeSettings(settings: [CSettingType : String]) throws

    Parameters

    settings

    Dictionary of values for settings types to change.

  • Changes configuration parameters of the EFT Terminal. Asynchronous version of Terminal.changeSettings(...). Returns immediately and calls TerminalListener.changeSettingsCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func changeSettingsAsync(settings: [CSettingType : String]) throws

    Parameters

    settings

    Dictionary of values for settings types to change.

  • Performs Commit-operation after a successful Transaction call.

    Declaration

    Swift

    public func commit() throws
  • Performs Commit-operation after a successful call to Terminal.transaction(...) or Terminal.transactionAsync(...). Asynchronous version of Terminal.commit(...). Returns immediately and calls TerminalListener.commitCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func commitAsync() throws
  • Performs Commit-operation after a successful Transaction call.

    Declaration

    Swift

    public func commit(amount: Amount) throws
  • Performs Commit-operation after a successful call to Terminal.transaction(...) or Terminal.transactionAsync(...). Asynchronous version of Terminal.commit(...). Returns immediately and calls TerminalListener.commitCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func commitAsync(amount: Amount) throws
  • Initiates a connection to the EFT Terminal. Calling the Terminal.connect(...) is not needed normally, because all methods make first a connect, if not connected.

    Declaration

    Swift

    public func connect() throws
  • Initiates a connection to the EFT Terminal. Asynchronous version of Terminal.connect(...). Returns immediately and calls TerminalListener.connectCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func connectAsync() throws
  • Get counter information’s from the EFT Terminal.

    Declaration

    Swift

    public func counterRequest(type: CCounterType) throws -> Counters
  • Get counter information’s from the EFT Terminal. Asynchronous version of Terminal.counterRequest(...). Returns immediately and calls TerminalListener.counterRequestCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func counterRequestAsync(type: CCounterType) throws
  • Closes a user shift. If the shift is already closed, no error is returned.

    Declaration

    Swift

    public func deactivate() throws -> DeactivateResponse
  • Closes a user shift. If the shift is already closed, no error is returned. Asynchronous version of Terminal.deactivate(...). Returns immediately and calls TerminalListener.deactivateCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func deactivateAsync() throws
  • Interrupts the connection to the EFT Terminal.

    Declaration

    Swift

    public func disconnect() throws
  • Interrupts the connection to the EFT Terminal. Asynchronous version of Terminal.disconnect(...). Returns immediately and calls TerminalListener.disconnectCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func disconnectAsync() throws
  • Requests DCC rates from the EFT Terminal. The DCC rates are returned as receipt.

    Declaration

    Swift

    public func dccRates() throws -> PrintData
  • Requests DCC rates from the EFT Terminal. The DCC rates are returned as receipt. Asynchronous version of Terminal.dccRates(...). Returns immediately and calls TerminalListener.dccRatesCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func dccRatesAsync() throws
  • Get hardware information from the EFT Terminal.

    Declaration

    Swift

    public func hardwareInformation() throws -> HardwareInformationResponse?
  • Get hardware information from the EFT Terminal. Asynchronous version of Terminal.hardwareInformation(...). Returns immediately and calls TerminalListener.hardwareInformationCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func hardwareInformationAsync() throws
  • Initialize a transaction knowing the amount or the card type.

    Declaration

    Swift

    public func initTransaction(displayAmount: Bool, amount: Amount?) throws -> CardData?
  • Initialize a transaction knowing the amount or the card type.

    Declaration

    Swift

    public func initTransactionAsync(displayAmount: Bool, amount: Amount?) throws
  • Activate a communication session between the ECR and the terminal.

    Note: Before calling set the print options, POS identifier and manufacturer flags set in the terminal instance.

    Side-Effect: After completing the request updates the features, brands and terminal identifier in the terminal instance. Fetching these information can be disabled if Auto-FetchBrands is disabled in TerminalSettings.

    Declaration

    Swift

    public func login() throws
  • Activate a communication session between the ECR and the terminal. Asynchronous version of Terminal.login(...). Returns immediately and calls TerminalListener.loginCompleted(...) on all notifiers once finished.

    Note: Before calling set the print options, POS identifier and manufacturer flags properties in the terminal instance.

    Side-Effect: After completing the request updates the features, brands and terminal identifier is set in the terminal instance. Fetching these information can be disabled with Auto-FetchBrands in TerminalSettings.

    Declaration

    Swift

    public func loginAsync() throws
  • Terminates an active communication session between the ECR and the terminal.

    Declaration

    Swift

    public func logout() throws
  • Terminates an active communication session between the ECR and the terminal. Asynchronous version of Terminal.logout(...). Returns immediately and calls TerminalListener.logoutCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func logoutAsync() throws
  • Force the EFT Terminal to reboot.

    Declaration

    Swift

    public func reboot() throws
  • Force the EFT Terminal to reboot. Asynchronous version of Terminal.reboot(...). Returns immediately and calls TerminalListener.rebootCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func rebootAsync() throws
  • Force the EFT Terminal to transmit all financial transactions to the host system.

    Declaration

    Swift

    public func reconciliation() throws -> ReconciliationResponse
  • Force the EFT Terminal to transmit all financial transactions to the host system. Asynchronous version of Terminal.reconciliation(...). Returns immediately and calls TerminalListener.reconciliationCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func reconciliationAsync() throws
  • Receive the latest receipt or a list of silent receipts.

    Declaration

    Swift

    public func receiptRequest(type: CReceiptRequestType) throws -> ReceiptRequestResponse

    Parameters

    type

    Type of receipts to request from the EFT Terminal.

  • Receive the latest receipt or a list of silent receipts. Asynchronous version of Terminal.receiptRequest(...). Returns immediately and calls TerminalListener.receiptRequestCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func receiptRequestAsync(type: CReceiptRequestType) throws
  • Force the EFT Terminal to get the configuration from the service center.

    Declaration

    Swift

    public func reconfig() throws -> PrintData
  • Force the EFT Terminal to get the configuration from the service center. Asynchronous version of Terminal.reconfig(...). Returns immediately and calls TerminalListener.reconfigCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func reconfigAsync() throws
  • Prevents a transaction from being committed to the transaction log and generates a technical reversal of the authorization. For payment protocols supporting the function a declined receipt may be generated.

    Declaration

    Swift

    public func rollback() throws -> PrintData
  • Prevents a transaction from being committed to the transaction log and generates a technical reversal of the authorization. For payment protocols supporting the function a declined receipt may be generated. Asynchronous version of Terminal.rollback(...). Returns immediately and calls TerminalListener.rollbackCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func rollbackAsync() throws
  • Force the EFT Terminal to start a Software Update.

    Declaration

    Swift

    public func softwareUpdate() throws -> CUpdateStatus
  • Force the EFT Terminal to start a Software Update.

    Declaration

    Swift

    public func softwareUpdateAsync() throws
  • Request system information from the EFT Terminal.

    Note: Set EcrData property before calling SystemInformation.

    Declaration

    Swift

    public func systemInformation() throws -> SystemInformationResponse
  • Request system information from the EFT Terminal. Asynchronous version of Terminal.systemInformation(...). Returns immediately and calls TerminalListener.systemInformationCompleted(...) on all notifiers once finished.

    Note: Set EcrData property before calling SystemInformation.

    Declaration

    Swift

    public func systemInformationAsync() throws
  • Starts an EFT Terminal Transaction.

    Note: The transaction parameters are taken from TransactionRequest terminal property since those do not change often if at all (default parameters).

    Declaration

    Swift

    public func transaction(type: CTransactionType, amount: Amount?) throws -> TransactionResponse

    Parameters

    type

    Financial Transaction Function.

    amount

    Transaction amount.

  • Starts an EFT Terminal Transaction.

    Note: The transaction parameters are taken from TransactionRequest terminal property since those do not change often if at all (default parameters).

    Declaration

    Swift

    public func transaction(type: CTransactionType, request: TransactionRequest) throws -> TransactionResponse

    Parameters

    type

    Financial Transaction Function.

    request

    Transaction parameters without using TransactionRequest property.

  • Starts an EFT Terminal Transaction. Asynchronous version of Terminal.transaction(...). Returns immediately and calls TerminalListener.transactionCompleted(...) on all notifiers once finished.

    Note: The transaction parameters are taken from TransactionRequest terminal property since those do not change often if at all (default parameters).

    Declaration

    Swift

    public func transactionAsync(type: CTransactionType, amount: Amount?) throws

    Parameters

    type

    Financial Transaction Function.

    amount

    Transaction amount.

  • Starts an EFT Terminal Transaction.

    Note: The transaction parameters are taken from TransactionRequest terminal property since those do not change often if at all (default parameters).

    Declaration

    Swift

    public func transactionAsync(type: CTransactionType, request: TransactionRequest) throws

    Parameters

    type

    Financial Transaction Function.

    request

    Transaction parameters without using TransactionRequest property.

  • Starts an EFT Terminal Transaction with Tip amount.

    Note: The transaction parameters are taken from TransactionRequest terminal property since those do not change often if at all (default parameters).

    Note: This method is only available if CGuides.gastro is enabled.

    Declaration

    Swift

    public func transactionTip(type: CTransactionType, amount: Amount?, tipAmount: Amount?) throws -> TransactionResponse

    Parameters

    type

    Financial Transaction Function.

    amount

    Transaction amount.

    tipAmount

    Proposed tip amount.

  • Starts an EFT Terminal Transaction. Asynchronous version of Terminal.transaction(...). Returns immediately and calls TerminalListener.transactionCompleted(...) on all notifiers once finished.

    Note: The transaction parameters are taken from TransactionRequest terminal property since those do not change often if at all (default parameters).

    Note: This method is only available if CGuides.gastro is enabled.

    Declaration

    Swift

    public func transactionTipAsync(type: CTransactionType, amount: Amount?, tipAmount: Amount?) throws

    Parameters

    type

    Financial Transaction Function.

    amount

    Transaction amount.

    tipAmount

    Proposed tip amount.

  • Close the shutter of the card reader.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func closeReader() throws
  • Close the shutter of the card reader.

    Asynchronous version of Terminal.closeReader(...). Returns immediately and calls TerminalListener.closeReaderCompleted(...) on all notifiers once finished.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func closeReaderAsync() throws
  • Open the shutter of the card reader.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func openReader() throws
  • Open the shutter of the card reader.

    Asynchronous version of Terminal.openReader(...). Returns immediately and calls TerminalListener.openReaderCompleted(...) on all notifiers once finished.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func openReaderAsync() throws
  • Eject a card from the card reader.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func ejectCard() throws
  • Eject a card from the card reader.

    Asynchronous version of Terminal.ejectCard(...). Returns immediately and calls TerminalListener.ejectCardCompleted(...) on all notifiers once finished.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func ejectCardAsync() throws
  • Opens the maintenance window to the terminal so it can perform collected maintenance requests on its own, without interaction with the ECR. The terminal shall respond immediately to the ECR request whether it is able to handle the request or not.

    If the terminal is able to handle the request, the ECR is free itself to perform maintenance as well or it can monitor the terminal by reading the TerminalStatus notifications.

    It is possible that the connection between ECR and EFT terminal is terminated due to one or multiple reboot processes.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func openMaintenanceWindow() throws
  • Opens the maintenance window to the terminal so it can perform collected maintenance requests on its own, without interaction with the ECR. The terminal shall respond immediately to the ECR request whether it is able to handle the request or not.

    If the terminal is able to handle the request, the ECR is free itself to perform maintenance as well or it can monitor the terminal by reading the TerminalStatus notifications.

    It is possible that the connection between ECR and EFT terminal is terminated due to one or multiple reboot processes.

    Asynchronous version of Terminal.openMaintenanceWindow(...). Returns immediately and calls TerminalListener.openMaintenanceWindowCompleted(...) on all notifiers once finished.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func openMaintenanceWindowAsync() throws
  • Closes the maintenance window to the terminal so it can perform collected maintenance requests on its own, without interaction with the ECR. The terminal shall respond immediately to the ECR request whether it is able to handle the request or not.

    If the terminal is able to handle the request, the ECR is free itself to perform maintenance as well or it can monitor the terminal by reading the TerminalStatus notifications.

    It is possible that the connection between ECR and EFT terminal is terminated due to one or multiple reboot processes.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func closeMaintenanceWindow() throws
  • Closes the maintenance window to the terminal so it can perform collected maintenance requests on its own, without interaction with the ECR. The terminal shall respond immediately to the ECR request whether it is able to handle the request or not.

    If the terminal is able to handle the request, the ECR is free itself to perform maintenance as well or it can monitor the terminal by reading the TerminalStatus notifications.

    It is possible that the connection between ECR and EFT terminal is terminated due to one or multiple reboot processes.

    Asynchronous version of Terminal.closeMaintenanceWindow(...). Returns immediately and calls TerminalListener.closeMaintenanceWindowCompleted(...) on all notifiers once finished.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func closeMaintenanceWindowAsync() throws
  • Extends the Commit timeout if the terminal needs additional time before the Commit shall be performed. An example could be on a public transport vending machine: if the machine is printing multiple tickets and this printing action would extend the commit timeout, a HoldCommit notification shall be sent to extend the Commit timeout as well. If the printing action fails after some tickets a partial commit can be performed.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func holdCommit() throws
  • Activate service menu.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func activateServiceMenu() throws
  • Activate service menu.

    Asynchronous version of Terminal.activateServiceMenu(...). Returns immediately and calls TerminalListener.activateServiceMenuCompleted(...) on all notifiers once finished.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func activateServiceMenuAsync() throws
  • Amount adjustment request.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func amtAdjustment(amount: Amount) throws
  • Amount adjustment request.

    Note: This method is only available if CGuides.unattended is enabled.

    Declaration

    Swift

    public func amtAdjustment(amount: Amount, amountDiscount: AmountDiscount?,
                              loyaltyCouponList: [LoyaltyCoupon]?,
                              loyaltyInformationList: [LoyaltyInformation]?) throws
  • This function is used to query and configure loyalty information.

    Note: This method is only available if CGuides.valueAddedServices is enabled.

    Declaration

    Swift

    public func loyaltyData(functionType: CLoyaltyFunctionType, dataType: String?, data: Data, retainCard: Bool) throws -> CardData

    Parameters

    functionType

    Defines what kind of loyalty mode will beused.

    dataType

    Specifies type of loyalty data. Mandatory for .init, .update and .deinit

    data

    Loyalty data.

    retainCard

    True to not eject card otherwise false.

  • This function is used to query and configure loyalty information.

    Note: This method is only available if CGuides.valueAddedServices is enabled.

    Declaration

    Swift

    public func loyaltyDataAsync(functionType: CLoyaltyFunctionType, dataType: String?, data: Data, retainCard: Bool) throws

    Parameters

    functionType

    Defines what kind of loyalty mode will beused.

    dataType

    Specifies type of loyalty data. Mandatory for .init, .update and .deinit

    data

    Loyalty data.

    retainCard

    True to not eject card otherwise false.

  • This function is used to start a checkout process at the POS to collect card and/or cardholder loyalty information before a transaction is started.

    Therefore the SIX QR code is displayed at the terminal. The timeout how long the QR code shall be displayed on the terminal before returning to its Idle screen can be defined in the Login request using the OptionType - QRCTimeout, see SIXml Book C: Appendix for further information.

    Note: This method is only available if CGuides.valueAddedServices guide is enabled.

    Declaration

    Swift

    public func startCheckout() throws
  • This function is used to start a checkout process at the POS to collect card and/or cardholder loyalty information before a transaction is started.

    Therefore the SIX QR code is displayed at the terminal. The timeout how long the QR code shall be displayed on the terminal before returning to its Idle screen can be defined in the Login request using the OptionType - QRCTimeout, see SIXml Book C: Appendix for further information.

    Note: This method is only available if CGuides.valueAddedServices guide is enabled.

    Declaration

    Swift

    public func startCheckoutAsync() throws
  • This function is used to finish a previously started checkout process with StartCheckout and to retrieve consumer loyalty data from the terminal that has been collected during this checkout process.

    Note: This method is only available if CGuides.valueAddedServices guide is enabled.

    Declaration

    Swift

    public func finishCheckout() throws -> VasCheckoutInformation
  • This function is used to finish a previously started checkout process with StartCheckout and to retrieve consumer loyalty data from the terminal that has been collected during this checkout process.

    Note: This method is only available if CGuides.valueAddedServices guide is enabled.

    Declaration

    Swift

    public func finishCheckoutAsync() throws
  • This function is used to provide the terminal with a LoyaltyBasket if the correspondig loyalty scheme requires it.

    Note: This method is only available if CGuides.valueAddedServices guide is enabled.

    Declaration

    Swift

    public func provideLoyaltyBasket(basket: [LoyaltyItem]) throws -> [LoyaltyItem]
  • This function is used to provide the terminal with a LoyaltyBasket if the correspondig loyalty scheme requires it.

    Note: This method is only available if CGuides.valueAddedServices guide is enabled.

    Declaration

    Swift

    public func provideLoyaltyBasketAsync(basket: [LoyaltyItem]) throws
  • Open dialog mode on the terminal.

    Note: This method is only available if CGuides.dialog is enabled.

    Declaration

    Swift

    public func openDialogMode() throws
  • Open dialog mode on the terminal.

    Asynchronous version of Terminal.openDialogMode(...). Returns immediately and calls TerminalListener.openDialogModeCompleted(...) on all notifiers once finished.

    Note: This method is only available if CGuides.dialog is enabled.

    Declaration

    Swift

    public func openDialogModeAsync() throws
  • Close dialog mode on the terminal.

    Note: This method is only available if CGuides.dialog is enabled.

    Declaration

    Swift

    public func closeDialogMode() throws
  • Close dialog mode on the terminal.

    Asynchronous version of Terminal.closeDialogMode(...). Returns immediately and calls TerminalListener.closeDialogModeCompleted(...) on all notifiers once finished.

    Note: This method is only available if CGuides.dialog is enabled.

    Declaration

    Swift

    public func closeDialogModeAsync() throws
  • Show signature capture on the terminal.

    Can be called only if dialog mode is open.

    Note: This method is only available if CGuides.dialog is enabled.

    Declaration

    Swift

    public func showSignatureCapture(request: ShowSignatureCaptureRequest) throws -> ShowSignatureCaptureResponse
  • Show signature capture on the terminal.

    Asynchronous version of Terminal.showSignatureCapture(...). Returns immediately and calls TerminalListener.showSignatureCaptureCompleted(...) on all notifiers once finished.

    Note: This method is only available if CGuides.dialog is enabled.

    Declaration

    Swift

    public func showSignatureCaptureAsync(request: ShowSignatureCaptureRequest) throws
  • Show dialog on the terminal.

    Can be called only if dialog mode is open.

    Note: This method is only available if CGuides.dialog is enabled.

    Declaration

    Swift

    public func showDialog(request: ShowDialogRequest) throws -> ShowDialogResponse
  • Show dialog on the terminal.

    Asynchronous version of Terminal.showDialog(...). Returns immediately and calls TerminalListener.showDialogCompleted(...) on all notifiers once finished.

    Note: This method is only available if CGuides.dialog is enabled.

    Declaration

    Swift

    public func showDialogAsync(request: ShowDialogRequest) throws
  • Send card command to card.

    Can be called only if dialog mode is open.

    Note: This method is only available if CGuides.dialog guide is enabled.

    Declaration

    Swift

    public func sendCardCommand(requests: [CommandRequest]) throws -> [CommandResponse]
  • Send card command to card.

    Asynchronous version of Terminal.sendCardCommand(...). Returns immediately and calls TerminalListener.sendCardCommandCompleted(...) on all notifiers once finished.

    Note: This method is only available if CGuides.dialog guide is enabled.

    Declaration

    Swift

    public func sendCardCommandAsync(requests: [CommandRequest]) throws
  • Get information about the current account balance of the inserted card.

    Note: This method is only available if CGuides.advancedRetail is enabled.

    Declaration

    Swift

    public func balanceInquiry() throws -> BalanceInquiryResponse
  • Get information about the current account balance of the inserted card.

    Asynchronous version of Terminal.balanceInquiry(...). Returns immediately and calls TerminalListener.balanceInquiryCompleted(...) on all notifiers once finished.

    Note: This method is only available if CGuides.advancedRetail is enabled.

    Declaration

    Swift

    public func balanceInquiryAsync() throws
  • The RequestAlias-function is used to request a Saferpay Alias for Alias-based transactions. Saferpay offers these kind of transactions which can be performed only using a secure Alias that can be created out of card information from a precious transaction. This Alias then can be used to perform a transaction without having the same card present.

    An Alias can be used for the following transactions:

    • Purchase
    • Credit
    • Reservation
    • Recurring

    @returns The Alias created by Saferpay.

    Declaration

    Swift

    public func requestAlias(sixTransRef: String) throws -> String

    Parameters

    sixTransRef

    The SIX omni channel reference number.

  • The RequestAlias-function is used to request a Saferpay Alias for Alias-based transactions. Saferpay offers these kind of transactions which can be performed only using a secure Alias that can be created out of card information from a precious transaction. This Alias then can be used to perform a transaction without having the same card present.

    An Alias can be used for the following transactions:

    • Purchase
    • Credit
    • Reservation
    • Recurring

    Asynchronous version of Terminal.requestAlias(...). Returns immediately and calls TerminalListener.requestAliasCompleted(...) on all notifiers once finished.

    Declaration

    Swift

    public func requestAliasAsync(sixTransRef: String) throws

    Parameters

    sixTransRef

    The SIX omni channel reference number.

  • Register listener. @throws IllegalArgumentException listener is null. @throws IllegalArgumentException listener is registered.

    Declaration

    Swift

    public func addListener(listener: TerminalListener)
  • Unregister listener. @throws IllegalArgumentException listener is null. @throws IllegalArgumentException listener is not registered.

    Declaration

    Swift

    public func removeListener(listener: TerminalListener)
  • Dcc is available.

    Declaration

    Swift

    public func canDcc() -> Bool
  • Declined receipts is available.

    Declaration

    Swift

    public func canDeclinedReceipts() -> Bool
  • Multi account selection is available.

    Declaration

    Swift

    public func canMultiAccountSelection() -> Bool
  • Software update is available.

    Declaration

    Swift

    public func hasSwUpdate() -> Bool
  • Terminal settings.

    Declaration

    Swift

    public private(set) var settings: TerminalSettingsImmutable!
  • POS identifier.

    Declaration

    Swift

    public var posId: String { get set }
  • User identifier.

    Declaration

    Swift

    public var userId: Int { get set }
  • ECR Data.

    Declaration

    Swift

    public var ecrData: [EcrInfo] { get set }
  • Add ECR data replacing existing one if present. To remove elements use ecrData property instead.

    Declaration

    Swift

    public func addEcrData(ecrInfo: EcrInfo)
  • Print options.

    Declaration

    Swift

    public var printOptions: [PrintOption] { get set }
  • Merchant options.

    Declaration

    Swift

    public var merchantOptions: [CMerchantOptionType : String] { get set }
  • Transaction data to use for transaction requests unless overwritten in transaction(type:request:) or transactionAsync(type:request:).

    Declaration

    Swift

    public var transactionData: TransactionData { get set }
  • Receipt formatter.

    Declaration

    Swift

    public var receiptFormatter: ReceiptFormatter
  • Get terminal status.

    Declaration

    Swift

    public var terminalStatus: TerminalStatus { get }
  • Get brands or nil if not retrieved yet.

    Declaration

    Swift

    public var brands: [Brands]? { get }
  • Get features or nil if not retrieved yet.

    Declaration

    Swift

    public var features: Features? { get }
  • Activation sequence counter.

    Declaration

    Swift

    public var actSeqCounter: Int { get }
  • Get configuration data or nil if not retrieved yet.

    Declaration

    Swift

    public var configData: ConfigData? { get }
  • Logger name for entire tim api package.

    Declaration

    Swift

    public static let loggerNameModule: String
  • Logger name for class.

    Declaration

    Swift

    public private(set) lazy var loggerName: String { get set }
  • Logger.

    Declaration

    Swift

    public private(set) lazy var logger: Logger { get set }
  • Global logger matching all TimApi related logging.

    Declaration

    Swift

    public static let globalLogger: Logger
  • Terminal identifier of connected terminal. Returns empty string if the terminal identifier is not known. The terminal identifier is available after logging in to the terminal. The terminal identifier obtained from the terminal is potentially different from the terminal identifier set in the TerminalSettings. This is especially true if CConnectionMode.onFixIp is used.

    Declaration

    Swift

    public var terminalId: String { get set }
  • String representation for debugging purpose.

    Declaration

    Swift

    public var description: String { get }