Skip to main content

PaymentProviderAccountStore

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.

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>

Implementations on Foreign Types§

§

impl PaymentProviderAccountStore for Value

§

fn transaction<T>( &mut self, operation: impl FnOnce(&mut Value) -> Result<T, u16>, ) -> Result<T, u16>

§

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>

Implementors§