pub struct Deposit { /* private fields */ }Expand description
Deposit amount, status, refund window, and payment reference for a reservation.
Implementations§
Source§impl Deposit
impl Deposit
Sourcepub const fn required(amount: Money) -> Self
pub const fn required(amount: Money) -> Self
Starts a deposit record that still needs front-desk collection.
Sourcepub fn paid(amount: Money, payment_reference: Reference) -> Self
pub fn paid(amount: Money, payment_reference: Reference) -> Self
Creates a deposit already reconciled to a payment reference.
Sourcepub const fn waived(amount: Money) -> Self
pub const fn waived(amount: Money) -> Self
Starts a deposit record waived by manager exception.
Sourcepub fn with_refundable_until(self, refundable_until: DateTime<Utc>) -> Self
pub fn with_refundable_until(self, refundable_until: DateTime<Utc>) -> Self
Sets the deadline through which the deposit remains refundable.
Sourcepub fn mark_paid(self, payment_reference: Reference) -> Self
pub fn mark_paid(self, payment_reference: Reference) -> Self
Marks the deposit as collected and stores the payment reference.
Sourcepub const fn amount(&self) -> &Money
pub const fn amount(&self) -> &Money
Returns the deposit amount recorded for payment review and reconciliation.
Sourcepub const fn refundable_until(&self) -> Option<DateTime<Utc>>
pub const fn refundable_until(&self) -> Option<DateTime<Utc>>
Returns the deposit refundable until recorded for payment review and reconciliation.
Sourcepub const fn status(&self) -> DepositStatus
pub const fn status(&self) -> DepositStatus
Returns the deposit status recorded for payment review and reconciliation.
Sourcepub const fn payment_reference(&self) -> Option<&Reference>
pub const fn payment_reference(&self) -> Option<&Reference>
Returns the deposit payment reference recorded for payment review and reconciliation.
Sourcepub const fn requires_collection(&self) -> bool
pub const fn requires_collection(&self) -> bool
Reports whether this deposit still requires collection from the customer.