RetailEventTemplate
@objc(UARetailEventTemplate)
public class RetailEventTemplate : NSObject
A RetailEventTemplate represents a custom retail event template for the application.
-
The event’s value. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.
Declaration
Swift
@objc public var eventValue: NSNumber?
-
The event’s transaction ID. The transaction ID’s length must not exceed 255 characters or it will invalidate the event.
Declaration
Swift
@objc public var transactionID: String?
-
The event’s ID.
Declaration
Swift
@objc public var identifier: String?
-
The event’s category.
Declaration
Swift
@objc public var category: String?
-
The event’s description.
Declaration
Swift
@objc public var eventDescription: String?
-
The brand.
Declaration
Swift
@objc public var brand: String?
-
If the item is new or not.
Declaration
Swift
@objc public var isNewItem: Bool { get set }
-
The currency.
Declaration
Swift
@objc public var currency: String?
-
Factory method for creating a browsed event template.
Declaration
Swift
@objc(browsedTemplate) public class func browsedTemplate() -> RetailEventTemplate
Return Value
A Retail event template instance
-
Factory method for creating a browsed event template with a value.
Declaration
Swift
@objc(browsedTemplateWithValueFromString:) public class func browsedTemplate(valueString: String?) -> RetailEventTemplate
Parameters
valueString
The value of the event as as string. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.
Return Value
A Retail event template instance
-
Factory method for creating a browsed event template with a value.
Declaration
Swift
@objc(browsedTemplateWithValue:) public class func browsedTemplate(value: NSNumber?) -> RetailEventTemplate
Parameters
value
The value of the event. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.
Return Value
A Retail event template instance
-
Factory method for creating an addedToCart event template.
Declaration
Swift
@objc(addedToCartTemplate) public class func addedToCartTemplate() -> RetailEventTemplate
Return Value
A Retail event template instance
-
Factory method for creating an addedToCart event template with a value.
Declaration
Swift
@objc(addedToCartTemplateWithValueFromString:) public class func addedToCartTemplate(valueString: String?) -> RetailEventTemplate
Parameters
valueString
The value of the event as as string. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.
Return Value
A Retail event template instance
-
Factory method for creating an addedToCart event template with a value.
Declaration
Swift
@objc(addedToCartTemplateWithValue:) public class func addedToCartTemplate(value: NSNumber?) -> RetailEventTemplate
Parameters
value
The value of the event. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.
Return Value
A Retail event template instance
-
Factory method for creating a starredProduct event template
Declaration
Swift
@objc(starredProductTemplate) public class func starredProductTemplate() -> RetailEventTemplate
Return Value
A Retail event template instance
-
Factory method for creating a starredProduct event template with a value.
Declaration
Swift
@objc(starredProductTemplateWithValueFromString:) public class func starredProductTemplate(valueString: String?) -> RetailEventTemplate
Parameters
valueString
The value of the event as as string. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.
Return Value
A Retail event template instance
-
Factory method for creating a starredProduct event template with a value.
Declaration
Swift
@objc(starredProductTemplateWithValue:) public class func starredProductTemplate(value: NSNumber?) -> RetailEventTemplate
Parameters
value
The value of the event. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.
Return Value
A Retail event template instance
-
Factory method for creating a purchased event template.
Declaration
Swift
@objc(purchasedTemplate) public class func purchasedTemplate() -> RetailEventTemplate
Return Value
A Retail event template instance
-
Factory method for creating a purchased event template with a value.
Declaration
Swift
@objc(purchasedTemplateWithValueFromString:) public class func purchasedTemplate(valueString: String?) -> RetailEventTemplate
Parameters
valueString
The value of the event as as string. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.
Return Value
A Retail event template instance
-
Factory method for creating a purchased event template with a value.
Declaration
Swift
@objc(purchasedTemplateWithValue:) public class func purchasedTemplate(value: NSNumber?) -> RetailEventTemplate
Parameters
value
The value of the event. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.
Return Value
A Retail event template instance
-
Factory method for creating a sharedProduct template event.
Declaration
Swift
@objc(sharedProductTemplate) public class func sharedProductTemplate() -> RetailEventTemplate
Return Value
A Retail event template instance
-
Factory method for creating a sharedProduct event template with a value.
Declaration
Swift
@objc(sharedProductTemplateWithValueFromString:) public class func sharedProductTemplate(valueString: String?) -> RetailEventTemplate
Parameters
valueString
The value of the event as as string. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.
Return Value
A Retail event template instance
-
Factory method for creating a sharedProduct event template with a value.
Declaration
Swift
@objc(sharedProductTemplateWithValue:) public class func sharedProductTemplate(value: NSNumber?) -> RetailEventTemplate
Parameters
value
The value of the event. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.
Return Value
A Retail event template instance
-
Factory method for creating a sharedProduct event template.
Declaration
Swift
@objc(sharedProductTemplateWithSource:withMedium:) public class func sharedProductTemplate(source: String?, medium: String?) -> RetailEventTemplate
Parameters
source
The source as an NSString.
medium
The medium as an NSString
Return Value
A Retail event template instance.
-
Factory method for creating a sharedProduct event template with a value.
Declaration
Swift
@objc(sharedProductTemplateWithValueFromString:withSource:withMedium:) public class func sharedProductTemplate( valueString: String?, source: String?, medium: String? ) -> RetailEventTemplate
Parameters
valueString
The value of the event as as string. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.
source
The source as an NSString.
medium
The medium as an NSString.
Return Value
A Retail event template instance
-
Factory method for creating a sharedProduct event template with a value.
Declaration
Swift
@objc(sharedProductTemplateWithValue:withSource:withMedium:) public class func sharedProductTemplate( value: NSNumber?, source: String?, medium: String? ) -> RetailEventTemplate
Parameters
value
The value of the event. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.
source
The source as an NSString.
medium
The medium as an NSString.
Return Value
A Retail event template instance
-
Factory method for creating a wishlist event template.
Declaration
Swift
@objc(wishlistTemplate) public class func wishlistTemplate() -> RetailEventTemplate
Return Value
A Retail event template instance
-
Factory method for creating a wishlist event template with a wishlist name and ID.
Declaration
Swift
@objc(wishlistTemplateWithName:wishlistID:) public class func wishlistTemplate(name: String?, wishlistID: String?) -> RetailEventTemplate
Parameters
name
The name of the wishlist as as string.
wishlistID
The ID of the wishlist as as string.
Return Value
A Retail event template instance
-
Creates the custom media event.
Declaration
Swift
@objc public func createEvent() -> CustomEvent