ProductStock

@objc(GFYProductStock)
public class ProductStock : NSObject, Codable

Contains product stock information

  • The number of the product in stock

    Declaration

    Swift

    @objc
    public let count: Int
  • Creates a ProductStock instance

    Declaration

    Swift

    @objc
    public init(count: Int)

    Parameters

    count

    The number of the product in stock

  • Queries whether the product is currently in stock

    Declaration

    Swift

    @objc
    public func inStock() -> Bool

    Return Value

    true if the product stock count is greater than 0; false otherwise

  • Retrieves String representation of ProductStock

    Declaration

    Swift

    public override var description: String { get }