Moltin
public class Moltin
Allows access to Moltin API. Create this class with a Moltin client ID and an optional configuration to access the Moltin API, and get information such as products, categories, or interact with carts.
-
The config used for connecting to the Moltin API.
Declaration
Swift
public var config: MoltinConfig
-
Entry point to requesting information about brands
This object allows the developer to interact with brands.
Declaration
Swift
public var brand: BrandRequest
Return Value
A
BrandRequest
object, inheriting fromMoltinRequest
, with the config from theMoltin
class. -
Entry point to requesting information about your cart
This object allows the developer to interact with their cart, such as adding items to the cart, or checking out the cart.
Declaration
Swift
public var cart: CartRequest
Return Value
A
CartRequest
object, inheriting fromMoltinRequest
, with the config from theMoltin
class. -
Entry point to requesting information about categories
This object allows the developer to interact with categories.
Declaration
Swift
public var category: CategoryRequest
Return Value
A
CategoryRequest
object, inheriting fromMoltinRequest
, with the config from theMoltin
class. -
Entry point to requesting information about collections
This object allows the developer to interact with collections.
Declaration
Swift
public var collection: CollectionRequest
Return Value
A
CollectionRequest
object, inheriting fromMoltinRequest
, with the config from theMoltin
class. -
Entry point to requesting information about currencies
This object allows the developer to interact with currencies.
Declaration
Swift
public var currency: CurrencyRequest
Return Value
A
CurrencyRequest
object, inheriting fromMoltinRequest
, with the config from theMoltin
class. -
Entry point to requesting information about files
This object allows the developer to interact with files.
Declaration
Swift
public var file: FileRequest
Return Value
A
FileRequest
object, inheriting fromMoltinRequest
, with the config from theMoltin
class. -
Entry point to requesting information about fields
This object allows the developer to interact with fields.
Declaration
Swift
public var field: FieldRequest
Return Value
A
FieldRequest
object, inheriting fromMoltinRequest
, with the config from theMoltin
class. -
Entry point to requesting information about flows
This object allows the developer to interact with flows.
Declaration
Swift
public var flow: FlowRequest
Return Value
A
FlowRequest
object, inheriting fromMoltinRequest
, with the config from theMoltin
class. -
Entry point to requesting information about products
This object allows the developer to interact with products.
Declaration
Swift
public var product: ProductRequest
Return Value
A
ProductRequest
object, inheriting fromMoltinRequest
, with the config from theMoltin
class. -
Allows the user to set up a instance of the
Moltin
object with a client ID and an optional configuration objectDeclaration
Swift
public init(withClientID clientID: String, withConfiguration configuration: MoltinConfig? = nil, withLocale locale: Locale? = Locale.current)
Parameters
withClientID
Your Moltin Client ID
withConfiguration
An optional configuration object
withLocale
An optional
Locale
objectReturn Value
A instance of the Moltin object for users to interact with in order to call the API
-
Allows the user to set up a instance of the
Moltin
object with a configuration objectDeclaration
Swift
public init(withConfiguration configuration: MoltinConfig)
Parameters
withConfiguration
A configuration object. Must contain a client ID.
Return Value
A instance of the Moltin object for users to interact with in order to call the API