PickupRunner

class PickupRunner(message: Message, mercury: Mercury)(source)

The PickupRunner class is responsible for processing Message objects related to pickup requests and delivering them using the Mercury service. It provides methods to run the pickup request and process the response.

Constructors

Link copied to clipboard
constructor(message: Message, mercury: Mercury)

Types

Link copied to clipboard
data class PickupAttachment(val attachmentId: String, val data: String)

The PickupAttachment data class represents an attachment in the pickup functionality. It includes the attachment ID and the attachment data.

Link copied to clipboard
data class PickupResponse(val type: PickupRunner.PickupResponseType, val message: Message)

The PickupResponse data class represents the response from the pickup functionality. It includes the type of response (PickupResponseType) and a Message object.

Link copied to clipboard

The PickupResponseType enum class represents the response types for the pickup functionality. The response types can be either "status" or "delivery".

Functions

Link copied to clipboard

Runs the pickup functionality and returns an array of pairs containing attachment IDs and unpacked messages. If the type of the pickup response is DELIVERY, it processes the attachments, unpacks the messages, and returns them as an array. If the type is not DELIVERY, it returns an empty array.