pub struct ReceiptAccess {
pub version: u8,
pub kind: PrivateMessageKind,
pub event_id: EventId,
pub receipt_id: ReceiptId,
pub payment_reference: PaymentReference,
pub payment_request_id: Option<PaymentRequestId>,
pub billing_period: Option<BillingPeriod>,
pub location: String,
pub key: ReceiptDecryptionKey,
}Expand description
Receipt Access descriptor sent over the existing Noise channel.
Fields§
§version: u8Receipt Access message version. Currently always 1.
kind: PrivateMessageKindPrivate message kind. Currently always PrivateMessageKind::ReceiptAccess.
event_id: EventIdEvent ID for idempotent processing.
receipt_id: ReceiptIdReceipt artifact identifier used to derive the Receipt Location path.
payment_reference: PaymentReferencePayment Reference for the receipt.
payment_request_id: Option<PaymentRequestId>Optional Payment Request ID this Receipt Access corresponds to.
billing_period: Option<BillingPeriod>Optional Billing Period for recurring Payment Request receipts.
location: StringHomeserver path of the Encrypted Receipt.
key: ReceiptDecryptionKeySymmetric key needed to decrypt the Receipt.
Implementations§
Source§impl ReceiptAccess
impl ReceiptAccess
Sourcepub fn location_for(receipt_id: &ReceiptId) -> String
pub fn location_for(receipt_id: &ReceiptId) -> String
Return the canonical Receipt Location path for a Receipt ID.
Sourcepub fn validate_location(&self) -> Result<()>
pub fn validate_location(&self) -> Result<()>
Validate that this access descriptor points at the canonical location for its Receipt ID.
This public validator is for caller-supplied values and returns
PaykitError::Validation on mismatch. Wire parsing maps the same
mismatch to PaykitError::InvalidData because incoming private message
payloads are external data.