pub struct SqliteVendorCreditRepository { /* private fields */ }Available on crate feature
sqlite only.Implementations§
Source§impl SqliteVendorCreditRepository
impl SqliteVendorCreditRepository
pub const fn new(pool: Pool<SqliteConnectionManager>) -> Self
Trait Implementations§
Source§impl Debug for SqliteVendorCreditRepository
impl Debug for SqliteVendorCreditRepository
Source§impl VendorCreditRepository for SqliteVendorCreditRepository
impl VendorCreditRepository for SqliteVendorCreditRepository
Source§fn create(&self, input: CreateVendorCredit) -> Result<VendorCredit>
fn create(&self, input: CreateVendorCredit) -> Result<VendorCredit>
Create a new vendor credit.
Source§fn get(&self, id: VendorCreditId) -> Result<Option<VendorCredit>>
fn get(&self, id: VendorCreditId) -> Result<Option<VendorCredit>>
Get a vendor credit by ID.
Source§fn list(&self, filter: VendorCreditFilter) -> Result<Vec<VendorCredit>>
fn list(&self, filter: VendorCreditFilter) -> Result<Vec<VendorCredit>>
List vendor credits with filter.
Source§fn apply(
&self,
id: VendorCreditId,
input: ApplyVendorCredit,
) -> Result<VendorCredit>
fn apply( &self, id: VendorCreditId, input: ApplyVendorCredit, ) -> Result<VendorCredit>
Apply a vendor credit against a bill or payment obligation. Decrements
the remaining balance and records an application.
Source§fn list_applications(
&self,
id: VendorCreditId,
) -> Result<Vec<VendorCreditApplication>>
fn list_applications( &self, id: VendorCreditId, ) -> Result<Vec<VendorCreditApplication>>
List applications for a vendor credit.
Source§fn reverse_application(
&self,
id: VendorCreditId,
application_id: VendorCreditApplicationId,
) -> Result<VendorCredit>
fn reverse_application( &self, id: VendorCreditId, application_id: VendorCreditApplicationId, ) -> Result<VendorCredit>
Reverse a previously-recorded application, restoring the balance.
Source§fn cancel(&self, id: VendorCreditId) -> Result<VendorCredit>
fn cancel(&self, id: VendorCreditId) -> Result<VendorCredit>
Cancel a vendor credit (only when it has no active applications).
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteVendorCreditRepository
impl !UnwindSafe for SqliteVendorCreditRepository
impl Freeze for SqliteVendorCreditRepository
impl Send for SqliteVendorCreditRepository
impl Sync for SqliteVendorCreditRepository
impl Unpin for SqliteVendorCreditRepository
impl UnsafeUnpin for SqliteVendorCreditRepository
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