StorylyProductDelegate
@objc(StorylyProductDelegate)
public protocol StorylyProductDelegate
This delegate represents the class which notifies application when an product related event occurs in StorylyView.
-
This function will notify you to get ids of products
Declaration
Swift
@objc optional func storylyHydration(_ storylyView: StorylyView, products: [STRProductInformation])
Parameters
storylyView
StorylyView instance in which the user interacted with a component
products
Found list of product information in stories
-
This function will notify you about all Storyly events and let you to send these events to specific data platforms
Declaration
Swift
@objc optional func storylyEvent(_ storylyView: StorylyView, event: StorylyEvent)
Parameters
storylyView
StorylyView instance in which the event is received
event
Storyly event type which is received
-
This function will notify you about updates the cart in a StorylyView component
Declaration
Swift
@objc optional func storylyUpdateCartEvent( storylyView: StorylyView, event: StorylyEvent, cart: STRCart?, change: STRCartItem?, onSuccess: ((STRCart?) -> Void)?, onFail: ((STRCartEventResult) -> Void)? )
Parameters
storylyView
StorylyView instance in which the event is received
event
Storyly event type which is received
cart
Contains information about the items in the cart
change
Represents the item being changed in the cart.
onSuccess
It represents a callback function that will be executed if the “update cart” operation is successful
onFail
It represents a callback function that will be executed if the “update cart” operation fails