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 -
init(clientId:salesChannel:useSandboxEnvironment:interfaceLanguage:configurationURL:useRecommendations:infoBundle:)Initializes options for
ZalandoCommerceAPI.Note
Fallback flow:
- the value from init
- Info.plist
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
clientIdSee
Options.clientIdsalesChannelSee
SeeOptions.salesChanneluseSandboxEnvironmentSee
SeeOptions.useSandboxEnvironmentinterfaceLanguageSee
SeeOptions.interfaceLanguageconfigurationURLSee
SeeOptions.configurationURLuseRecommendationsSee
SeeOptions.useRecommendationsbundlebundle to look for
Info.plistfile with Options keys.
-
Initializes options for
ZalandoCommerceAPI.Note
Fallback flow:
- the value from init
- Info.plist
Options.Default
Declaration
Swift
public var description: String
View on GitHub
Options Struct Reference