pub struct Payment { /* private fields */ }Expand description
A payment value with reference, amount, method, direction, and status.
Implementations§
Source§impl Payment
impl Payment
Sourcepub const fn new(
reference: PaymentReference,
amount: Money,
method: PaymentMethod,
direction: PaymentDirection,
) -> Payment
pub const fn new( reference: PaymentReference, amount: Money, method: PaymentMethod, direction: PaymentDirection, ) -> Payment
Creates a pending payment.
Sourcepub const fn reference(&self) -> &PaymentReference
pub const fn reference(&self) -> &PaymentReference
Returns the payment reference.
Sourcepub const fn method(&self) -> PaymentMethod
pub const fn method(&self) -> PaymentMethod
Returns the payment method.
Sourcepub const fn direction(&self) -> PaymentDirection
pub const fn direction(&self) -> PaymentDirection
Returns the payment direction.
Sourcepub const fn status(&self) -> PaymentStatus
pub const fn status(&self) -> PaymentStatus
Returns the payment status.
Sourcepub const fn with_status(self, status: PaymentStatus) -> Payment
pub const fn with_status(self, status: PaymentStatus) -> Payment
Sets the payment status.
Trait Implementations§
impl Eq for Payment
impl StructuralPartialEq for Payment
Auto Trait Implementations§
impl Freeze for Payment
impl RefUnwindSafe for Payment
impl Send for Payment
impl Sync for Payment
impl Unpin for Payment
impl UnsafeUnpin for Payment
impl UnwindSafe for Payment
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