pub struct ReceiptAccessEventMessage {
pub kind: PrivateMessageKind,
pub app_id: Option<PaykitAppId>,
pub event_id: Option<EventId>,
pub receipt_id: Option<ReceiptId>,
pub raw_json: String,
pub access: Result<ReceiptAccess, String>,
}Expand description
A recognized Receipt Access Event Message plus the raw JSON payload received from the Encrypted Link.
Fields§
§kind: PrivateMessageKindPrivate message kind selected from the message header.
app_id: Option<PaykitAppId>Application that issued this Receipt Access event.
event_id: Option<EventId>Parsed top-level Event ID when present and valid.
receipt_id: Option<ReceiptId>Parsed top-level Receipt ID when present and valid.
raw_json: StringRaw JSON plaintext as sent over the Encrypted Link.
access: Result<ReceiptAccess, String>Parsed Receipt Access, or an error string explaining why this recognized message failed structural validation.
Implementations§
Source§impl ReceiptAccessEventMessage
impl ReceiptAccessEventMessage
Sourcepub fn kind(&self) -> PrivateMessageKind
pub fn kind(&self) -> PrivateMessageKind
Return the Private Message Kind for this event message.
Sourcepub fn app_id(&self) -> Option<&PaykitAppId>
pub fn app_id(&self) -> Option<&PaykitAppId>
Return the application that issued this event, when valid.
Sourcepub fn parsed_access(&self) -> Option<&ReceiptAccess>
pub fn parsed_access(&self) -> Option<&ReceiptAccess>
Access the parsed Receipt Access when structural validation succeeded.
Sourcepub fn validation_error(&self) -> Option<&str>
pub fn validation_error(&self) -> Option<&str>
Access the validation error when structural validation failed.
Sourcepub fn event_id(&self) -> Option<&EventId>
pub fn event_id(&self) -> Option<&EventId>
Access the Event ID.
Returns None when the recognized message is malformed and the Event ID
could not be parsed as a valid Event ID.
Sourcepub fn receipt_id(&self) -> Option<&ReceiptId>
pub fn receipt_id(&self) -> Option<&ReceiptId>
Access the Receipt ID carried by this Receipt Access event.
Returns None when the recognized message is malformed and the Receipt
ID could not be parsed as a valid Receipt ID.