Profile

class Profile

Properties

Link copied to clipboard

The consented objectives IDs of this profile in a list, e.g. {"tracking", "advertising"}. Passing a property that was already set with values will cause the old values to be removed.

Link copied to clipboard
Link copied to clipboard
val id: String?

Returns the ID of the profile.

Link copied to clipboard

The privacy legislation for this profile, e.g. "GDPR". Passing a property that was already set with values will cause the old values to be removed.

Link copied to clipboard
Link copied to clipboard

The refused objectives IDs of this profile in a list, e.g. {"tracking", "advertising"}. Passing a property that was already set with values will cause the old values to be removed.

Functions

Link copied to clipboard
fun addConsentedObjective(objectiveId: String, callback: Callback? = null)

Adds a single objective ID to the consented objectives for this profile. If there are already values for a property the new value will be added. Values for a property need to be unique; passing the same value multiple times will have no effect.

Link copied to clipboard
fun addRefusedObjective(objectiveId: String, callback: Callback? = null)

Adds a single objective ID to the refused objectives for this profile. If there are already values for a property the new value will be added. Values for a property need to be unique; passing the same value multiple times will have no effect.

Link copied to clipboard
fun addValue(property: String, value: String, callback: Callback? = null)

Adds a single property value to the profile. If there are already values for a property the new value will be added. Values for a property need to be unique; passing the same value multiple times will have no effect.

Link copied to clipboard
fun addValues(property: String, values: Collection<String>, callback: Callback? = null)

Adds property values to the profile. The values from the collection are added to the profile. If there are already values for a property the new values will be added. Values for a property need to be unique; passing the same values multiple times will have no effect.

Link copied to clipboard

Returns the first value for a given profile property.

Link copied to clipboard

Returns the values for a given profile property. For example, it can return all the values in a list of hobbies, e.g. {"tennis", "soccer"}.

Link copied to clipboard
fun incrementValue(property: String, value: String?, callback: Callback? = null)

Increments a single property value to the profile. If there are already values for a property the new value will be the sum of all values.

Link copied to clipboard
fun setValue(property: String, value: String?, callback: Callback? = null)

Sets a value on the profile. Passing a property that was already set with values will cause for the old values to be removed.

Link copied to clipboard
fun setValues(property: String, values: Collection<String>, callback: Callback? = null)

Sets values on the profile. Passing a property that was already set with values will cause for the old values to be removed.