Products

public class Products: NSObject

Wrapper class to manage Product instances

  • Add a product - parameter product: a product instance - returns: the product added

    Declaration

    Swift

    public func add(_ product: Product) -> Product

    Parameters

    product

    a product instance

    Return Value

    the product added

  • Add a product - parameter productId: the product identifier - returns: the new product instance

    Declaration

    Swift

    public func add(_ productId: String) -> Product

    Parameters

    productId

    the product identifier

    Return Value

    the new product instance

  • Add a product

    Declaration

    Swift

    public func add(_ productId: String, category1: String) -> Product

    Parameters

    productId

    the product identifier

    category1

    category1 label

    Return Value

    the new product instance

  • Add a product

    Declaration

    Swift

    public func add(_ productId: String, category1: String, category2: String) -> Product

    Parameters

    productId

    the product identifier

    category1

    category1 label

    category2

    category2 label

    Return Value

    the new product instance

  • Add a product

    Declaration

    Swift

    public func add(_ productId: String, category1: String, category2: String, category3: String) -> Product

    Parameters

    productId

    the product identifier

    category1

    category1 label

    category2

    category2 label

    category3

    category3 label

    Return Value

    the new product instance

  • Add a product

    Declaration

    Swift

    public func add(_ productId: String, category1: String, category2: String, category3: String, category4: String) -> Product

    Parameters

    productId

    the product identifier

    category1

    category1 label

    category2

    category2 label

    category3

    category3 label

    category4

    category4 label

    Return Value

    the new product instance

  • Add a product

    Declaration

    Swift

    public func add(_ productId: String, category1: String, category2: String, category3: String, category4: String, category5: String) -> Product

    Parameters

    productId

    the product identifier

    category1

    category1 label

    category2

    category2 label

    category3

    category3 label

    category4

    category4 label

    category5

    category5 label

    Return Value

    the new product instance

  • Add a product

    Declaration

    Swift

    public func add(_ productId: String, category1: String, category2: String, category3: String, category4: String, category5: String, category6: String) -> Product

    Parameters

    productId

    the product identifier

    category1

    category1 label

    category2

    category2 label

    category3

    category3 label

    category4

    category4 label

    category5

    category5 label

    category6

    category6 label

    Return Value

    the new product instance

  • Remove a product

    Declaration

    Swift

    public func remove(_ productId: String)

    Parameters

    productId

    the product identifier

  • Remove all the products

    Declaration

    Swift

    public func removeAll()
  • Send viewed products

    Declaration

    Swift

    public func sendViews()