SCPLocalMobileConnectionConfigurationBuilder

Objective-C


@interface SCPLocalMobileConnectionConfigurationBuilder
    : SCPBuilder <SCPLocalMobileConnectionConfiguration *>

Swift

class LocalMobileConnectionConfigurationBuilder : SCPBuilder<LocalMobileConnectionConfiguration>

A builder class for SCPLocalMobileConnectionConfiguration.

  • Declaration

    Objective-C

    - (nonnull instancetype)initWithLocationId:(nonnull NSString *)locationId;

    Swift

    init(locationId: String)

    Parameters

    locationId

    ID of the location to be associated with the reader.

  • Note

    This is a required attribute of the connection configuration and cannot be nil or empty.

    Declaration

    Objective-C

    - (nonnull SCPLocalMobileConnectionConfigurationBuilder *)setLocationId:
        (nonnull NSString *)locationId;

    Swift

    func setLocationId(_ locationId: String) -> LocalMobileConnectionConfigurationBuilder

    Parameters

    locationId

    ID of the location to be associated with the reader.

  • Declaration

    Objective-C

    - (nonnull SCPLocalMobileConnectionConfigurationBuilder *)setOnBehalfOf:
        (nullable NSString *)onBehalfOf;

    Swift

    func setOnBehalfOf(_ onBehalfOf: String?) -> LocalMobileConnectionConfigurationBuilder

    Parameters

    onBehalfOf

    Connected account id that the merchant is taking payments on behalf of.

  • Declaration

    Objective-C

    - (nonnull SCPLocalMobileConnectionConfigurationBuilder *)
        setMerchantDisplayName:(nullable NSString *)merchantDisplayName;

    Swift

    func setMerchantDisplayName(_ merchantDisplayName: String?) -> LocalMobileConnectionConfigurationBuilder

    Parameters

    merchantDisplayName

    Cardholder facing merchant display name that will be used in the prompt for the cardholder to present their card.

  • Note

    If not set, defaults to YES.

    Declaration

    Objective-C

    - (nonnull SCPLocalMobileConnectionConfigurationBuilder *)
        setTosAcceptancePermitted:(BOOL)tosAcceptancePermitted;

    Swift

    func setTosAcceptancePermitted(_ tosAcceptancePermitted: Bool) -> LocalMobileConnectionConfigurationBuilder

    Parameters

    tosAcceptancePermitted

    Determines how to handle the situation where merchant-specific terms of service need to be presented in order to connect to a reader.

  • Declaration

    Objective-C

    - (nonnull SCPLocalMobileConnectionConfigurationBuilder *)
        setReturnReadResultImmediatelyEnabled:
            (BOOL)returnReadResultImmediatelyEnabled;

    Swift

    func setReturnReadResultImmediatelyEnabled(_ returnReadResultImmediatelyEnabled: Bool) -> LocalMobileConnectionConfigurationBuilder

    Parameters

    returnReadResultImmediatelyEnabled

    When possible the card read results are returned as early as possible, prior to the complete dismissal of card reader UI.

  • When set to true, the Terminal SDK will attempt a local mobile auto-reconnection on any unexpected disconnect. You must also set an autoReconnectionDelegate for your application to respond accordingly to reconnection attempts. Enabling autoReconnectOnUnexpectedDisconnect without providing an autoReconnectionDelegate will error with SCPErrorReaderConnectionConfigurationInvalid.

    When set to false, we will immediately surface any disconnection through TerminalDelegate.

    Defaults to false.

    Declaration

    Objective-C

    - (nonnull SCPLocalMobileConnectionConfigurationBuilder *)
        setAutoReconnectOnUnexpectedDisconnect:
            (BOOL)autoReconnectOnUnexpectedDisconnect;

    Swift

    func setAutoReconnectOnUnexpectedDisconnect(_ autoReconnectOnUnexpectedDisconnect: Bool) -> LocalMobileConnectionConfigurationBuilder
  • Contains callback methods for local mobile auto-reconnection.

    Declaration

    Objective-C

    - (nonnull SCPLocalMobileConnectionConfigurationBuilder *)
        setAutoReconnectionDelegate:
            (nullable id<SCPReconnectionDelegate>)autoReconnectionDelegate;

    Swift

    func setAutoReconnectionDelegate(_ autoReconnectionDelegate: ReconnectionDelegate?) -> LocalMobileConnectionConfigurationBuilder
  • Unavailable

    Use initWithLocationId:

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Unavailable

    Use initWithLocationId:

    Declaration

    Objective-C

    + (nonnull instancetype)new;