Trait PaymentProviderAccountStore
pub trait PaymentProviderAccountStore {
// Required methods
fn transaction<T>(
&mut self,
operation: impl FnOnce(&mut Self) -> Result<T, u16>,
) -> Result<T, u16>
where Self: Sized;
fn existing_account(
&self,
app_id: &str,
owner_resource_type: &str,
owner_resource_id: i64,
provider_id: &str,
) -> Option<Value>;
fn upsert_account_state(
&mut self,
update: PaymentProviderAccountUpdate<'_>,
) -> Result<PaymentProviderAccountMutation, i32>;
fn append_audit_event(
&mut self,
event: PaymentProviderAuditEvent<'_>,
) -> Result<(), i32>;
fn append_callback_nonce(
&mut self,
nonce: PaymentProviderCallbackNonce<'_>,
) -> Result<(), i32>;
fn claim_callback_nonce(
&mut self,
app_id: &str,
owner_resource_type: &str,
owner_resource_id: i64,
provider_id: &str,
nonce_hash: &str,
issued_for_revision: i64,
now: &str,
) -> Result<(), i32>;
}Expand description
Framework-owned persistence boundary for provider lifecycle state.