Configuration

@objcMembers
public class Configuration : NSObject

Holds global configuration information.

Properties

  • Returns the shared instance of Configuration.

    Declaration

    Swift

    public static let shared: Configuration
  • The Url for the current remote host (protocol, host, port path)

    Declaration

    Swift

    public private(set) var serverUri: String { get }
  • Sets the timeout for the session in seconds.

    Declaration

    Swift

    public private(set) var timeout: Int { get }
  • Optional paypoint ID that will be used in server requests unless overridden.

    Declaration

    Swift

    public private(set) var defaultPaypointId: String? { get }
  • A unique ID that identifies the sender of the message. This should be a UUID generated by the POS application or a MAC address of the POS to maximise uniqueness. The SDK generates a UUID as default but this can be overridden if needed

    Declaration

    Swift

    public var messageSenderId: String
  • The optional unique token that authenticates your point of sale application.

    Declaration

    Swift

    public private(set) var posLicenseKey: String? { get }

Methods

  • Sets up the configuration for the SDK.

    Declaration

    Swift

    public func configure(url: String,
                          timeout: Int,
                          posLicenseKey: String? = nil,
                          paypointId: String? = nil,
                          logger: Logger? = nil)

    Parameters

    url

    The Url for the remote server.

    timeout

    Sets the timeout for the session in seconds.

    posLicenseKey

    The optional unique token that authenticates your point of sale application.

    paypointId

    Optional paypoint ID that will be used in server requests unless overridden.

    logger

    Optional Logger logging interface.