MoltinConfig
public struct MoltinConfig
MoltinConfig holds information about the general configuration of the SDK, such as the client ID or the locale, for use during API calls.
-
The moltin client ID to use to connect to a store
Declaration
Swift
public var clientID: String -
HTTP or HTTPS
Declaration
Swift
public var scheme: String -
The URL host of the API
Declaration
Swift
public var host: String -
The version of the API
Declaration
Swift
public var version: String -
The locale to use for langauges and currencies
Declaration
Swift
public var locale: Locale -
Initialise the config with a clientID, scheme, host, and version
Declaration
Swift
public init(clientID: String, scheme: String, host: String, version: String) -
Initialise the config with a clientID, scheme, host, version, and locale
Declaration
Swift
public init(clientID: String, scheme: String, host: String, version: String, locale: Locale) -
Returns a default config set up with a clientID
Declaration
Swift
public static func `default`(withClientID clientID: String) -> MoltinConfig -
Returns a default config set up with a clientID and a locale
Declaration
Swift
public static func `default`(withClientID clientID: String, withLocale locale: Locale) -> MoltinConfig
View on GitHub
MoltinConfig Structure Reference