Pickup Runner
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.
Types
The PickupAttachment data class represents an attachment in the pickup functionality. It includes the attachment ID and the attachment data.
The PickupResponse
data class represents the response from the pickup functionality. It includes the type of response (PickupResponseType
) and a Message
object.
The PickupResponseType enum class represents the response types for the pickup functionality. The response types can be either "status" or "delivery".
Functions
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.