-
public final class CfLogPromoEvent.BuilderCfLogPromoEvent is to log the events associated of the promo lists and promo items and when they are clicked on.
-
-
Field Summary
Fields Modifier and Type Field Description private Stringpromo_idprivate Stringpromo_actionprivate Stringpromo_titleprivate Stringpromo_typeprivate <ERROR CLASS><PromoItemObject>promo_items_list
-
Constructor Summary
Constructors Constructor Description CfLogPromoEvent.Builder(String promo_id, String promo_action, String promo_title, String promo_type, <ERROR CLASS><PromoItemObject> promo_items_list, Object meta, Boolean update_immediately)
-
Method Summary
Modifier and Type Method Description final StringgetPromo_id()final UnitsetPromo_id(String promo_id)final StringgetPromo_action()final UnitsetPromo_action(String promo_action)final StringgetPromo_title()final UnitsetPromo_title(String promo_title)final StringgetPromo_type()final UnitsetPromo_type(String promo_type)final <ERROR CLASS><PromoItemObject>getPromo_items_list()final Unit)>setPromo_items_list(<ERROR CLASS><PromoItemObject> promo_items_list)final <ERROR CLASS>setPromoId(String promo_id)setPromoId is required to set the Id of the promo final <ERROR CLASS>setPromoAction(PromoAction promo_action)setPromoAction is required to set the action for the promo final <ERROR CLASS>setPromoAction(String promo_action)final <ERROR CLASS>setPromoTitle(String promo_title)setPromoTitle is required to set the title of the promo (if any) final <ERROR CLASS>setPromoType(PromoType promo_type)setPromoType is required to set the type of the promo final <ERROR CLASS>setPromoType(String promo_type)final <ERROR CLASS>addItem(PromoItemObject itemModel)addItem can be used to add the item promo is being applied to. final <ERROR CLASS>addItem(String itemJsonString)setItem can be used to pass the whole item as a Json String object as well. final <ERROR CLASS>)>addItemList(<ERROR CLASS><PromoItemObject> itemList)addItemList can be used to add the whole list to the log at once, the format should be ArrayList<PromoItemObject> to log the event successfully. final <ERROR CLASS>addItemList(String itemListString)addItemList can be used to add the whole list to the log at once, the format should be ArrayList<PromoItemObject> to log the event successfully. final <ERROR CLASS>setMeta(Object meta)You can pass any type of value in setMeta. final <ERROR CLASS>updateImmediately(Boolean update_immediately)updateImmediately is responsible for updating the values ot the backend immediately. final <ERROR CLASS>build()build will validate all of the values provided and if passes will call the track function and queue the events based on it's updateImmediately value and also on the user's network resources. -
-
Method Detail
-
getPromo_id
final String getPromo_id()
-
setPromo_id
final Unit setPromo_id(String promo_id)
-
getPromo_action
final String getPromo_action()
-
setPromo_action
final Unit setPromo_action(String promo_action)
-
getPromo_title
final String getPromo_title()
-
setPromo_title
final Unit setPromo_title(String promo_title)
-
getPromo_type
final String getPromo_type()
-
setPromo_type
final Unit setPromo_type(String promo_type)
-
getPromo_items_list
final <ERROR CLASS><PromoItemObject> getPromo_items_list()
-
setPromo_items_list
final Unit )>setPromo_items_list(<ERROR CLASS><PromoItemObject> promo_items_list)
-
setPromoId
final <ERROR CLASS> setPromoId(String promo_id)
setPromoId is required to set the Id of the promo
-
setPromoAction
final <ERROR CLASS> setPromoAction(PromoAction promo_action)
setPromoAction is required to set the action for the promo
-
setPromoAction
final <ERROR CLASS> setPromoAction(String promo_action)
-
setPromoTitle
final <ERROR CLASS> setPromoTitle(String promo_title)
setPromoTitle is required to set the title of the promo (if any)
-
setPromoType
final <ERROR CLASS> setPromoType(PromoType promo_type)
setPromoType is required to set the type of the promo
-
setPromoType
final <ERROR CLASS> setPromoType(String promo_type)
-
addItem
final <ERROR CLASS> addItem(PromoItemObject itemModel)
addItem can be used to add the item promo is being applied to. This log can be used to add one item to the log at a time. Promo item should be in a valid format. With elements of the orderObject as: PromoItemObject(itemID, type)
-
addItem
final <ERROR CLASS> addItem(String itemJsonString)
setItem can be used to pass the whole item as a Json String object as well. You can use the POJO ItemModel to parse the data int he required format and pass that to this function as a string to log the event. You can use Gson to convert the object to string but SDK will parse the Json string back to POJO so pass it in the log. This method should be used with caution and is suitable for react native bridge.
-
addItemList
final <ERROR CLASS> )>addItemList(<ERROR CLASS><PromoItemObject> itemList)
addItemList can be used to add the whole list to the log at once, the format should be ArrayList<PromoItemObject> to log the event successfully. Order item should be in a valid format. With elements as: PromoItemObject(itemID, type)
-
addItemList
final <ERROR CLASS> addItemList(String itemListString)
addItemList can be used to add the whole list to the log at once, the format should be ArrayList<PromoItemObject> to log the event successfully. But the input param is of type string , this is special use case for react native logs where list can be passed as Json string and can be used to log the event. Order item should be in a valid format. With elements of the orderObject as: PromoItemObject(itemID, type)
-
setMeta
final <ERROR CLASS> setMeta(Object meta)
You can pass any type of value in setMeta. It is for developer and partners to log additional information with the log that they find would be helpful for logging and providing more context to the log. Default value for the meta is null.
-
updateImmediately
final <ERROR CLASS> updateImmediately(Boolean update_immediately)
updateImmediately is responsible for updating the values ot the backend immediately. By default this is set to false or whatever the developer has set in the SDK initialisation block. This differs the time for which the logs will be logged, if true, the SDK will log the content instantly and if false it will wait till the end of user session which is whenever the app goes into background.
-
build
final <ERROR CLASS> build()
build will validate all of the values provided and if passes will call the track function and queue the events based on it's updateImmediately value and also on the user's network resources.
-
-
-
-