BaseModel

abstract class BaseModel<Key : Keyword, Self : BaseModel<Key, Self>>(properties: Map<Key, Serializable>?)

Abstract class that wraps around a map to control access to its contents. Provides helper functions to control the map's key type

Inheritors

Constructors

Link copied to clipboard
constructor(properties: Map<Key, Serializable>?)

Functions

Link copied to clipboard
operator fun get(key: Key): Serializable?
Link copied to clipboard
open fun merge(other: Self): BaseModel<Key, Self>

Merges attributes from another object into this one

Link copied to clipboard
operator fun set(key: Key, value: Serializable?)
operator fun set(key: String, value: Serializable)
Link copied to clipboard
abstract fun setProperty(key: Key, value: Serializable): BaseModel<Key, Self>

Adds a custom property to the map. Custom attributes can define any key name that isn't already reserved by Klaviyo

abstract fun setProperty(key: String, value: Serializable): BaseModel<Key, Self>

Add a custom property to the map. Custom attributes can define any key name that isn't already reserved by Klaviyo

Link copied to clipboard

Convert this data model into a simple map