WishListItem
@objc(GFYWishListItem)
public class WishListItem : NSObject, Encodable
Represents a product within a wish list
-
The parent ID of the product
Declaration
Swift
@objc public let productId: String -
Whether the item is currently in stock
Declaration
Swift
@objc public let inStock: Bool -
The specific SKU of the product/variant (optional)
Declaration
Swift
@objc public let sku: String? -
The current unit price of the product, after discount or sale pricing (optional)
Declaration
Swift
@objc public let price: Price? -
The regular price of the product before sales or discounts (optional)
Declaration
Swift
@objc public let regularPrice: Price? -
The name or title of the product (optional)
Declaration
Swift
@objc public let title: String? -
The address of the product image (optional)
Declaration
Swift
@objc public let image: URL? -
The date when the product was added to the list (optional)
Declaration
Swift
@objc public let dateAdded: Date? -
The price of the product when it was added to the list (optional)
Declaration
Swift
@objc public let priceWhenAdded: Price? -
Address of the product’s anchor tag in the list page (optional)
Declaration
Swift
@objc public let callToAction: URL? -
Address of the product page (optional)
Declaration
Swift
@objc public let productPage: URL? -
init(productId:inStock: sku: price: regularPrice: title: image: dateAdded: priceWhenAdded: callToAction: productPage: ) Creates a
WishListIteminstance from each distinct item propertyDeclaration
Parameters
productIdThe parent ID of the product
inStockWhether the item is currently in stock
skuThe specific SKU of the product/variant (optional)
priceThe current unit price of the product, after discount or sale pricing (optional)
regularPriceThe regular price of the product before sales or discounts (optional)
titleThe name or title of the product (optional)
imageThe address of the product image (optional)
dateAddedThe date when the product was added to the list (optional)
priceWhenAddedThe price of the product when it was added to the list (optional)
callToActionAddress of the product’s anchor tag in the list page (optional)
productPageAddress of the product page (optional)
-
Creates a
WishListIteminstance from aProductand any additional (optional) property values.Declaration
Parameters
productThe product in the wish list
dateAddedThe date when the product was added to the list (optional)
priceWhenAddedThe price of the product when it was added to the list (optional)
callToActionAddress of the product’s anchor tag in the list page (optional)
productPageAddress of the product page (optional)
-
Encodes an instance of
WishListItemSince
2.0.0Declaration
Swift
public func encode(to encoder: Encoder) throws
WishListItem Class Reference