InboxMessage

data class InboxMessage(val id: String, val subject: InboxMessage.InboxStyledText? = null, val sound: String? = null, val media: InboxMessage.InboxMedia? = null, val startDateUtc: Date? = null, val endDateUtc: Date? = null, val sendDateUtc: Date? = null, val custom: String? = null, val customKeys: Map<String, String>? = null, val subtitle: InboxMessage.InboxStyledText? = null, val inboxMessage: InboxMessage.InboxStyledText? = null, val notificationMessage: NotificationMessage? = null, val messageType: InboxMessage.InboxMessageType, var deleted: Boolean = false, val source: Event.Producer = Event.Producer.MCE_MODULE, val action: InboxMessage.InboxAction = InboxAction(), val buttons: List<InboxMessage.InboxButton>? = null, val audienceType: String = AudienceType.DEVICE)

An Inbox message from MCE or MAM (source). Render subject, subtitle and inboxMessage; the push copy of a message that was also sent as a push notification is on notificationMessage.

Constructors

Link copied to clipboard
constructor(id: String, subject: InboxMessage.InboxStyledText? = null, sound: String? = null, media: InboxMessage.InboxMedia? = null, startDateUtc: Date? = null, endDateUtc: Date? = null, sendDateUtc: Date? = null, custom: String? = null, customKeys: Map<String, String>? = null, subtitle: InboxMessage.InboxStyledText? = null, inboxMessage: InboxMessage.InboxStyledText? = null, notificationMessage: NotificationMessage? = null, messageType: InboxMessage.InboxMessageType, deleted: Boolean = false, source: Event.Producer = Event.Producer.MCE_MODULE, action: InboxMessage.InboxAction = InboxAction(), buttons: List<InboxMessage.InboxButton>? = null, audienceType: String = AudienceType.DEVICE)

Types

Link copied to clipboard

The audienceType values the server sends today.

Link copied to clipboard
data class InboxAction

The call-to-action on an inbox message. MAM sends it directly; on the classic MCE and push paths it is derived from the message url.

Link copied to clipboard
data class InboxButton

A call-to-action button on a MAM inbox message. A button without an id is not surfaced (taps are resolved by id); a button without text is kept with an empty text; a button without an action carries a NONE action.

Link copied to clipboard
data class InboxMedia

Media on an inbox message. url is never null: media that arrives with only altText or a mediaType keeps an empty url rather than being dropped.

Link copied to clipboard

Represents the type of an inbox message.

Link copied to clipboard
data class InboxStyledText

A text value on an inbox message. Read the display string from text. The owning property is nullable (absent → null); when present, text itself is guaranteed non-null.

Properties

Link copied to clipboard

The message call-to-action; never null. MAM sends it directly. On the classic MCE and push paths it is derived from the message url: OTHER with the url as its value, or NONE when there is no url. A deleted tombstone and a message without one carry NONE.

Link copied to clipboard
@JvmField
val audienceType: String

Audience-targeting metadata; AudienceType.DEVICE when absent (the classic MCE path never sends it). Retained even on a deleted tombstone (like requestId). Passed through verbatim and case-sensitive; not limited to the AudienceType values, so keep an else branch.

Link copied to clipboard
@JvmField
val buttons: List<InboxMessage.InboxButton>?

MAM inbox CTA buttons; null on the classic MCE path. Round-trips via toJson.

Link copied to clipboard
@JvmField
val custom: String?
Link copied to clipboard
@JvmField
val customKeys: Map<String, String>?
Link copied to clipboard
var deleted: Boolean
Link copied to clipboard
@JvmField
val endDateUtc: Date?
Link copied to clipboard
@JvmField
val id: String
Link copied to clipboard

The inbox body. MCE: inboxMessage (Inbox 2.0). MAM: message. A push alert (Alert+Inbox or PCTI) is on notificationMessage, not here.

Link copied to clipboard
Link copied to clipboard

The type the SDK computes for this message. MCE: from the server messageType and contentType. MAM: InboxMessageType.PCTI or InboxMessageType.ADV. A message from any other source is expected to be InboxMessageType.LEGACY. Use messageType.index for the integer value.

Link copied to clipboard

The push content of a message that was also sent as a push notification: MCE PCTI and Alert+Inbox, and MAM PCTI. null for an inbox-only message, and when the send has no alert.

Link copied to clipboard
var read: Boolean
Link copied to clipboard
@JvmField
val sendDateUtc: Date?
Link copied to clipboard
@JvmField
val sound: String?
Link copied to clipboard
@JvmField
val source: Event.Producer

The server the message came from: Event.Producer.MCE_MODULE or Event.Producer.MAM_MODULE.

Link copied to clipboard
@JvmField
val startDateUtc: Date?
Link copied to clipboard
Link copied to clipboard

The inbox subtitle. MCE: inboxSubtitle (Inbox 2.0). MAM: subtitle. A push subtitle (Alert+Inbox or PCTI) is on notificationMessage, not here.