SetAttributesAction

class SetAttributesAction(channelProvider: () -> AirshipChannel = { Airship.channel }, contactProvider: () -> Contact = { Airship.contact }) : Action(source)

An action that sets attributes.

Accepted situations: all

Accepted argument value types: A JSON payload for setting or removing attributes. An example JSON payload:

{
"channel": {
set: {"key_1": value_1, "key_2": value_2},
remove: ["attribute_1", "attribute_2", "attribute_3"]
},
"named_user": {
set: {"key_4": value_4, "key_5": value_5},
remove: ["attribute_4", "attribute_5", "attribute_6"]
}

Constructors

Link copied to clipboard
constructor(channelProvider: () -> AirshipChannel = { Airship.channel }, contactProvider: () -> Contact = { Airship.contact })

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun acceptsArguments(arguments: ActionArguments): Boolean

Called before an action is performed to determine if the the action can accept the arguments.

Link copied to clipboard
open override fun perform(arguments: ActionArguments): ActionResult

Performs the action.

Inherited functions

Link copied to clipboard
open fun onFinish(arguments: ActionArguments, result: ActionResult)

Called after the action performs.

Link copied to clipboard
open fun onStart(arguments: ActionArguments)

Called before an action is performed.

Link copied to clipboard

Performs the action, with pre/post execution calls, if it accepts the provided arguments.

Link copied to clipboard

Determines which thread runs the action.