Options

public struct Options

Used to initate ZalandoCommerceAPI.

Note: can be fully or partially filled with data from Info.plist file. More on wiki

  • Identifier of a client / business entity / app. Required for correct operation, provided after access granted. See more

    Declaration

    Swift

    public let clientId: String
  • Identifier of a sales channel. Required for correct operation, provided after access granted. See more

    Declaration

    Swift

    public let salesChannel: String
  • Switches between sandbox and production environment.

    Declaration

    Swift

    public let useSandboxEnvironment: Bool
  • Sets language of the interface. Overrides sales channel default language.

    Declaration

    Swift

    public let interfaceLanguage: String?
  • Sets config service URL. In regular cases it shouldn’t be changed.

    Declaration

    Swift

    public let configurationURL: URL
  • Sets if recommendations are handled by the host app.

    Declaration

    Swift

    public let useRecommendations: Bool
  • Initializes options for ZalandoCommerceAPI.

    Note

    Fallback flow:

    1. the value from init
    2. Info.plist
    3. Options.Default

    Declaration

    Swift

    public init(clientId: String? = nil,
                    salesChannel: String? = nil,
                    useSandboxEnvironment: Bool? = nil,
                    interfaceLanguage: String? = nil,
                    configurationURL: URL? = nil,
                    useRecommendations: Bool? = nil,
                    infoBundle bundle: Bundle = Bundle.main)

    Parameters

    clientId

    See Options.clientId

    salesChannel

    See

    See Options.salesChannel
    useSandboxEnvironment

    See

    See Options.useSandboxEnvironment
    interfaceLanguage

    See

    See Options.interfaceLanguage
    configurationURL

    See

    See Options.configurationURL
    useRecommendations

    See

    See Options.useRecommendations
    bundle

    bundle to look for Info.plist file with Options keys.

  • Initializes options for ZalandoCommerceAPI.

    Note

    Fallback flow:

    1. the value from init
    2. Info.plist
    3. Options.Default

    Declaration

    Swift

    public var description: String