pub struct SqliteStoreCreditRepository { /* private fields */ }Available on crate feature
sqlite only.Implementations§
Source§impl SqliteStoreCreditRepository
impl SqliteStoreCreditRepository
pub const fn new(pool: Pool<SqliteConnectionManager>) -> Self
Trait Implementations§
Source§impl Debug for SqliteStoreCreditRepository
impl Debug for SqliteStoreCreditRepository
Source§impl StoreCreditRepository for SqliteStoreCreditRepository
impl StoreCreditRepository for SqliteStoreCreditRepository
Source§fn create(&self, input: CreateStoreCredit) -> Result<StoreCredit>
fn create(&self, input: CreateStoreCredit) -> Result<StoreCredit>
Create a new store credit
Source§fn get(&self, id: StoreCreditId) -> Result<Option<StoreCredit>>
fn get(&self, id: StoreCreditId) -> Result<Option<StoreCredit>>
Get store credit by ID
Source§fn list(&self, filter: StoreCreditFilter) -> Result<Vec<StoreCredit>>
fn list(&self, filter: StoreCreditFilter) -> Result<Vec<StoreCredit>>
List store credits with filter
Source§fn adjust(
&self,
id: StoreCreditId,
input: AdjustStoreCredit,
) -> Result<StoreCredit>
fn adjust( &self, id: StoreCreditId, input: AdjustStoreCredit, ) -> Result<StoreCredit>
Adjust store credit balance
Source§fn apply(
&self,
id: StoreCreditId,
amount: Decimal,
reference_id: Option<String>,
) -> Result<StoreCreditTransaction>
fn apply( &self, id: StoreCreditId, amount: Decimal, reference_id: Option<String>, ) -> Result<StoreCreditTransaction>
Apply store credit to an order (debit)
Source§fn get_transactions(
&self,
store_credit_id: StoreCreditId,
) -> Result<Vec<StoreCreditTransaction>>
fn get_transactions( &self, store_credit_id: StoreCreditId, ) -> Result<Vec<StoreCreditTransaction>>
Get transaction history for a store credit
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteStoreCreditRepository
impl !UnwindSafe for SqliteStoreCreditRepository
impl Freeze for SqliteStoreCreditRepository
impl Send for SqliteStoreCreditRepository
impl Sync for SqliteStoreCreditRepository
impl Unpin for SqliteStoreCreditRepository
impl UnsafeUnpin for SqliteStoreCreditRepository
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more