GranifyInlineViewLabel
@objc(GFYGranifyInlineViewLabel)
public class GranifyInlineViewLabel : NSObject
A label that defines identifying information for a GranifyInlineView
Since
Since 6.0.0-
Unique string identifier for the associated
GranifyInlineView
Declaration
Swift
public let name: String
-
The ID of the associated product. Required when the associated
GranifyInlineView
is unique to a specific product. For example, anyGranifyInlineView
on a product page must have the productId included in the label.Declaration
Swift
public let productId: String?
-
The SKU of the associated product. Required only when the associated
GranifyInlineView
is unique to a specific productID/SKU combination.Declaration
Swift
public let sku: String?
-
Initialization function
Declaration
Swift
@objc public init(name: String, productId: String? = nil, sku: String? = nil)
Parameters
name
Required field. Identifies the associated
GranifyInlineView
. This field must be unique per location on a parent view.productId
The ID of the associated product. Required when the
GranifyInlineView
is located on a product page, or on any page where it is associated with a specific product (ie. inlines associated with a cart product).sku
Field that is required when the associated
GranifyInlineView
is associated with a specific productID/SKU combination. -
Returns a Boolean value that indicates whether the receiver and a given object are equal.
Declaration
Swift
override public func isEqual(_ object: Any?) -> Bool
Parameters
object
The object to be compared to the receiver. May be nil, in which case this method returns false.
-
Evaluates if a [String: String] hash matches the label
Declaration
Swift
public func matchesHash(hash: [String : String]) -> Bool
Parameters
hash
The hash to evaluate