pub struct Prepayments { /* private fields */ }Expand description
Prepayment operations.
Implementations§
Source§impl Prepayments
impl Prepayments
Sourcepub fn is_supported(&self) -> bool
pub fn is_supported(&self) -> bool
Whether prepayments are supported by the active backend.
Sourcepub fn create(&self, input: CreatePrepayment) -> Result<Prepayment>
pub fn create(&self, input: CreatePrepayment) -> Result<Prepayment>
Create a new prepayment.
Sourcepub fn get(&self, id: PrepaymentId) -> Result<Option<Prepayment>>
pub fn get(&self, id: PrepaymentId) -> Result<Option<Prepayment>>
Get a prepayment by ID.
Sourcepub fn list(&self, filter: PrepaymentFilter) -> Result<Vec<Prepayment>>
pub fn list(&self, filter: PrepaymentFilter) -> Result<Vec<Prepayment>>
List prepayments with optional filtering.
Sourcepub fn apply(
&self,
id: PrepaymentId,
input: ApplyPrepayment,
) -> Result<Prepayment>
pub fn apply( &self, id: PrepaymentId, input: ApplyPrepayment, ) -> Result<Prepayment>
Apply a prepayment against a bill or payment obligation.
Sourcepub fn list_applications(
&self,
id: PrepaymentId,
) -> Result<Vec<PrepaymentApplication>>
pub fn list_applications( &self, id: PrepaymentId, ) -> Result<Vec<PrepaymentApplication>>
List applications for a prepayment.
Sourcepub fn reverse_application(
&self,
id: PrepaymentId,
application_id: PrepaymentApplicationId,
) -> Result<Prepayment>
pub fn reverse_application( &self, id: PrepaymentId, application_id: PrepaymentApplicationId, ) -> Result<Prepayment>
Reverse a previously-recorded application.
Sourcepub fn refund(&self, id: PrepaymentId) -> Result<Prepayment>
pub fn refund(&self, id: PrepaymentId) -> Result<Prepayment>
Refund the remaining balance, closing the prepayment.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Prepayments
impl !UnwindSafe for Prepayments
impl Freeze for Prepayments
impl Send for Prepayments
impl Sync for Prepayments
impl Unpin for Prepayments
impl UnsafeUnpin for Prepayments
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