inappmessaging / com.rakuten.tech.mobile.inappmessaging.runtime.data.models.appevents / BaseEvent

BaseEvent

abstract class BaseEvent : Event

BaseEvent will be the base class of all local events objects, including CustomEvent. During initialization, constructor parameters will be checked for validity if there are reasons to believe that parameter could be invalid.

Constructors

| <init> | BaseEvent will be the base class of all local events objects, including CustomEvent. During initialization, constructor parameters will be checked for validity if there are reasons to believe that parameter could be invalid.BaseEvent(eventType: EventType, eventName: String, isPersistent: Boolean) |

Functions

| getAttributeMap | This method is intended to be used by child classes which doesn’t override this method. Returns an empty map.open fun getAttributeMap(): Map<String, Attribute?> | | getEventName | This method returns the event name.open fun getEventName(): String? | | getEventType | This method returns the event type id.open fun getEventType(): Int | | getRatEventMap | A map will be created containing event’s base attributes like event name, and timestamp.open fun getRatEventMap(): Map<String, Any> | | getTimestamp | This method returns the timestamp.open fun getTimestamp(): Long | | isPersistentType | This method returns event is persistent type (can be used by campaigns multiple times). If persistent type, event will not be removed in LocalEventRepository when used by a campaign.open fun isPersistentType(): Boolean |

Inheritors

| AppStartEvent | App start logEvent for host app to use. Host app can send this event after every app launch, including first launch, or resume. It is recommended to log this event in host app’s base activity’s onResume().class AppStartEvent : BaseEvent | | CustomEvent | Logging custom event for client to use. Note: Please don’t use the same attribute’s name more than once because the new attribute will replace the old one.class CustomEvent : BaseEvent | | LoginSuccessfulEvent | Login Successful Event for host app to use. Please note: this will trigger InAppMessaging SDK to update current session data to the new user.class LoginSuccessfulEvent : BaseEvent | | PurchaseSuccessfulEvent | Purchase successful Event for host app to use.class PurchaseSuccessfulEvent : BaseEvent |