ConversationSummary

data class ConversationSummary(val id: String = "", val siteId: String = "", val visitorId: String = "", val status: ConversationStatus = ConversationStatus.OPEN, val seq: Int = 0, val visitorUnread: Int = 0, val lastMessageAt: Instant? = null, val lastMessagePreview: String? = null, val lastMessageSenderType: SenderType? = null, val assigneeKind: String? = null, val assigneeId: String? = null, val firstResponseAt: Instant? = null, val resolvedAt: Instant? = null, val subject: String? = null, val createdAt: Instant? = null, val updatedAt: Instant? = null, val raw: JsonObject = EmptyJsonObject)

A conversation as the gateway reports it on ready / conversation.start.

Constructors

Link copied to clipboard
constructor(id: String = "", siteId: String = "", visitorId: String = "", status: ConversationStatus = ConversationStatus.OPEN, seq: Int = 0, visitorUnread: Int = 0, lastMessageAt: Instant? = null, lastMessagePreview: String? = null, lastMessageSenderType: SenderType? = null, assigneeKind: String? = null, assigneeId: String? = null, firstResponseAt: Instant? = null, resolvedAt: Instant? = null, subject: String? = null, createdAt: Instant? = null, updatedAt: Instant? = null, raw: JsonObject = EmptyJsonObject)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@SerialName(value = "assignee_id")
val assigneeId: String? = null

Assignee id.

Link copied to clipboard
@SerialName(value = "assignee_kind")
val assigneeKind: String? = null

user or bot.

Link copied to clipboard
@Serializable(with = InstantOrNullSerializer::class)
@SerialName(value = "created_at")
val createdAt: Instant? = null

Creation time.

Link copied to clipboard
@Serializable(with = InstantOrNullSerializer::class)
@SerialName(value = "first_response_at")
val firstResponseAt: Instant? = null

When the team first replied.

Link copied to clipboard
val id: String

Conversation id.

Link copied to clipboard
@Serializable(with = InstantOrNullSerializer::class)
@SerialName(value = "last_message_at")
val lastMessageAt: Instant? = null

When the last message was sent.

Link copied to clipboard
@SerialName(value = "last_message_preview")
val lastMessagePreview: String? = null

Preview of the last message.

Link copied to clipboard
@SerialName(value = "last_message_sender_type")
val lastMessageSenderType: SenderType? = null

Who sent the last message.

Link copied to clipboard
@Transient
val raw: JsonObject

The full wire payload.

Link copied to clipboard
@Serializable(with = InstantOrNullSerializer::class)
@SerialName(value = "resolved_at")
val resolvedAt: Instant? = null

When it was resolved.

Link copied to clipboard
val seq: Int = 0

Latest sequence number.

Link copied to clipboard
@SerialName(value = "site_id")
val siteId: String

Site id.

Link copied to clipboard

Current status.

Link copied to clipboard
val subject: String? = null

Subject line.

Link copied to clipboard
@Serializable(with = InstantOrNullSerializer::class)
@SerialName(value = "updated_at")
val updatedAt: Instant? = null

Last update time.

Link copied to clipboard
@SerialName(value = "visitor_id")
val visitorId: String

Visitor id.

Link copied to clipboard
@SerialName(value = "visitor_unread")
val visitorUnread: Int = 0

Messages the visitor has not read.

Functions

Link copied to clipboard
fun toJson(): JsonObject

The wire shape (unknown fields from raw kept).