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§
Sourcefn create_receipt(&self, action: ActionRecord) -> SisterResult<ReceiptId>
fn create_receipt(&self, action: ActionRecord) -> SisterResult<ReceiptId>
Create a receipt for an action (via Identity).
Sourcefn get_receipt(&self, id: ReceiptId) -> SisterResult<Receipt>
fn get_receipt(&self, id: ReceiptId) -> SisterResult<Receipt>
Get receipt by ID (from Identity).
Sourcefn list_receipts(&self, filter: ReceiptFilter) -> SisterResult<Vec<Receipt>>
fn list_receipts(&self, filter: ReceiptFilter) -> SisterResult<Vec<Receipt>>
List receipts for this sister.
Provided Methods§
Sourcefn receipt_count(&self) -> SisterResult<u64>
fn receipt_count(&self) -> SisterResult<u64>
Get receipt count.
Sourcefn receipts_for_action(&self, action_type: &str) -> SisterResult<Vec<Receipt>>
fn receipts_for_action(&self, action_type: &str) -> SisterResult<Vec<Receipt>>
Get receipts for a specific action type.