Skip to main content

ReceiptIntegration

Trait ReceiptIntegration 

Source
pub trait ReceiptIntegration {
    // Required methods
    fn create_receipt(&self, action: ActionRecord) -> SisterResult<ReceiptId>;
    fn get_receipt(&self, id: ReceiptId) -> SisterResult<Receipt>;
    fn list_receipts(&self, filter: ReceiptFilter) -> SisterResult<Vec<Receipt>>;

    // Provided methods
    fn receipt_count(&self) -> SisterResult<u64> { ... }
    fn receipts_for_action(
        &self,
        action_type: &str,
    ) -> SisterResult<Vec<Receipt>> { ... }
}
Expand description

Receipt integration trait.

Sisters that create auditable actions implement this trait to integrate with Identity for receipt creation.

Required Methods§

Source

fn create_receipt(&self, action: ActionRecord) -> SisterResult<ReceiptId>

Create a receipt for an action (via Identity).

Source

fn get_receipt(&self, id: ReceiptId) -> SisterResult<Receipt>

Get receipt by ID (from Identity).

Source

fn list_receipts(&self, filter: ReceiptFilter) -> SisterResult<Vec<Receipt>>

List receipts for this sister.

Provided Methods§

Source

fn receipt_count(&self) -> SisterResult<u64>

Get receipt count.

Source

fn receipts_for_action(&self, action_type: &str) -> SisterResult<Vec<Receipt>>

Get receipts for a specific action type.

Implementors§