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

    Author

    Craig Tweedy

    This object allows the developer to interact with brands.

    Declaration

    Swift

    public var brand: BrandRequest { get }

    Return Value

    A BrandRequest object, inheriting from MoltinRequest, with the config from the Moltin class.

  • Entry point to requesting information about your cart

    Author

    Craig Tweedy

    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 CartRequest object, inheriting from MoltinRequest, with the config from the Moltin class.

  • Entry point to requesting information about categories

    Author

    Craig Tweedy

    This object allows the developer to interact with categories.

    Declaration

    Swift

    public var category: CategoryRequest { get }

    Return Value

    A CategoryRequest object, inheriting from MoltinRequest, with the config from the Moltin class.

  • Entry point to requesting information about collections

    Author

    Craig Tweedy

    This object allows the developer to interact with collections.

    Declaration

    Swift

    public var collection: CollectionRequest { get }

    Return Value

    A CollectionRequest object, inheriting from MoltinRequest, with the config from the Moltin class.

  • Entry point to requesting information about currencies

    Author

    Craig Tweedy

    This object allows the developer to interact with currencies.

    Declaration

    Swift

    public var currency: CurrencyRequest { get }

    Return Value

    A CurrencyRequest object, inheriting from MoltinRequest, with the config from the Moltin class.

  • Entry point to requesting information about customers and related entries

    Author

    Craig Tweedy

    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) -> CustomerRequest

    Return Value

    A CustomerRequest object, inheriting from MoltinRequest, with the config from the Moltin class.

  • Entry point to requesting information about files

    Author

    Craig Tweedy

    This object allows the developer to interact with files.

    Declaration

    Swift

    public var file: FileRequest { get }

    Return Value

    A FileRequest object, inheriting from MoltinRequest, with the config from the Moltin class.

  • Entry point to requesting information about fields

    Author

    Craig Tweedy

    This object allows the developer to interact with fields.

    Declaration

    Swift

    public var field: FieldRequest { get }

    Return Value

    A FieldRequest object, inheriting from MoltinRequest, with the config from the Moltin class.

  • Entry point to requesting information about flows

    Author

    Craig Tweedy

    This object allows the developer to interact with flows.

    Declaration

    Swift

    public var flow: FlowRequest { get }

    Return Value

    A FlowRequest object, inheriting from MoltinRequest, with the config from the Moltin class.

  • Entry point to requesting information about orders

    Author

    Craig Tweedy

    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) -> OrderRequest

    Return Value

    A OrderRequest object, inheriting from MoltinRequest, with the config from the Moltin class.

  • Entry point to requesting information about products

    Author

    Craig Tweedy

    This object allows the developer to interact with products.

    Declaration

    Swift

    public var product: ProductRequest { get }

    Return Value

    A ProductRequest object, inheriting from MoltinRequest, with the config from the Moltin class.

  • Allows the user to set up a instance of the Moltin object with a client ID and an optional configuration object

    Author

    Craig Tweedy

    Declaration

    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 object

    Return 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 object

    Author

    Craig Tweedy

    Declaration

    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