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 { get }Return Value
A
BrandRequestobject, inheriting fromMoltinRequest, with the config from theMoltinclass. -
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 { get }Return Value
A
CartRequestobject, inheriting fromMoltinRequest, with the config from theMoltinclass. -
Entry point to requesting information about categories
This object allows the developer to interact with categories.
Declaration
Swift
public var category: CategoryRequest { get }Return Value
A
CategoryRequestobject, inheriting fromMoltinRequest, with the config from theMoltinclass. -
Entry point to requesting information about collections
This object allows the developer to interact with collections.
Declaration
Swift
public var collection: CollectionRequest { get }Return Value
A
CollectionRequestobject, inheriting fromMoltinRequest, with the config from theMoltinclass. -
Entry point to requesting information about currencies
This object allows the developer to interact with currencies.
Declaration
Swift
public var currency: CurrencyRequest { get }Return Value
A
CurrencyRequestobject, inheriting fromMoltinRequest, with the config from theMoltinclass. -
Entry point to requesting information about customers and related entries
This object allows the developer to interact with customers and related entires such as addresses. Customers and Addresses can only be accessed with valid customer tokens.
Declaration
Swift
public func customer(withCustomerToken customerToken: String) -> CustomerRequestReturn Value
A
CustomerRequestobject, inheriting fromMoltinRequest, with the config from theMoltinclass. -
Entry point to requesting information about files
This object allows the developer to interact with files.
Declaration
Swift
public var file: FileRequest { get }Return Value
A
FileRequestobject, inheriting fromMoltinRequest, with the config from theMoltinclass. -
Entry point to requesting information about fields
This object allows the developer to interact with fields.
Declaration
Swift
public var field: FieldRequest { get }Return Value
A
FieldRequestobject, inheriting fromMoltinRequest, with the config from theMoltinclass. -
Entry point to requesting information about flows
This object allows the developer to interact with flows.
Declaration
Swift
public var flow: FlowRequest { get }Return Value
A
FlowRequestobject, inheriting fromMoltinRequest, with the config from theMoltinclass. -
Entry point to requesting information about orders
This object allows the developer to interact with orders. Orders can only be accessed with customer tokens.
Declaration
Swift
public func order(withCustomerToken customerToken: String) -> OrderRequestReturn Value
A
OrderRequestobject, inheriting fromMoltinRequest, with the config from theMoltinclass. -
Entry point to requesting information about products
This object allows the developer to interact with products.
Declaration
Swift
public var product: ProductRequest { get }Return Value
A
ProductRequestobject, inheriting fromMoltinRequest, with the config from theMoltinclass. -
Allows the user to set up a instance of the
Moltinobject 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
withClientIDYour Moltin Client ID
withConfigurationAn optional configuration object
withLocaleAn optional
LocaleobjectReturn 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
Moltinobject with a configuration objectDeclaration
Swift
public init(withConfiguration configuration: MoltinConfig)Parameters
withConfigurationA 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
View on GitHub
Moltin Class Reference