pub struct ShortPayment {Show 20 fields
pub short_payment_id: String,
pub company_code: String,
pub customer_id: String,
pub payment_id: String,
pub invoice_id: String,
pub expected_amount: Decimal,
pub paid_amount: Decimal,
pub short_amount: Decimal,
pub currency: String,
pub payment_date: NaiveDate,
pub reason_code: ShortPaymentReasonCode,
pub reason_description: Option<String>,
pub disposition: ShortPaymentDisposition,
pub credit_memo_id: Option<String>,
pub write_off_je_id: Option<String>,
pub rebill_invoice_id: Option<String>,
pub created_at: DateTime<Utc>,
pub created_by: Option<String>,
pub resolved_at: Option<DateTime<Utc>>,
pub notes: Option<String>,
}Expand description
A short payment record (customer paid less than owed).
Fields§
§short_payment_id: StringUnique short payment identifier.
company_code: StringCompany code.
customer_id: StringCustomer ID.
payment_id: StringPayment ID that was short.
invoice_id: StringInvoice ID that was shorted.
expected_amount: DecimalExpected payment amount.
paid_amount: DecimalActual paid amount.
short_amount: DecimalShort amount (expected - paid).
currency: StringCurrency.
payment_date: NaiveDatePayment date.
reason_code: ShortPaymentReasonCodeReason code for the short payment.
reason_description: Option<String>Reason description.
disposition: ShortPaymentDispositionDisposition of the short payment.
credit_memo_id: Option<String>Credit memo ID if issued.
write_off_je_id: Option<String>Write-off JE ID if written off.
rebill_invoice_id: Option<String>Re-bill invoice ID if re-billed.
created_at: DateTime<Utc>Created timestamp.
created_by: Option<String>Created by user.
resolved_at: Option<DateTime<Utc>>Resolved timestamp.
notes: Option<String>Notes.
Implementations§
Source§impl ShortPayment
impl ShortPayment
Sourcepub fn new(
short_payment_id: String,
company_code: String,
customer_id: String,
payment_id: String,
invoice_id: String,
expected_amount: Decimal,
paid_amount: Decimal,
currency: String,
payment_date: NaiveDate,
reason_code: ShortPaymentReasonCode,
) -> Self
pub fn new( short_payment_id: String, company_code: String, customer_id: String, payment_id: String, invoice_id: String, expected_amount: Decimal, paid_amount: Decimal, currency: String, payment_date: NaiveDate, reason_code: ShortPaymentReasonCode, ) -> Self
Creates a new short payment record.
Sourcepub fn with_reason(self, description: String) -> Self
pub fn with_reason(self, description: String) -> Self
Sets the reason description.
Sourcepub fn issue_credit_memo(&mut self, credit_memo_id: String)
pub fn issue_credit_memo(&mut self, credit_memo_id: String)
Issues a credit memo for the short amount.
Trait Implementations§
Source§impl Clone for ShortPayment
impl Clone for ShortPayment
Source§fn clone(&self) -> ShortPayment
fn clone(&self) -> ShortPayment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShortPayment
impl Debug for ShortPayment
Source§impl<'de> Deserialize<'de> for ShortPayment
impl<'de> Deserialize<'de> for ShortPayment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ShortPayment
impl RefUnwindSafe for ShortPayment
impl Send for ShortPayment
impl Sync for ShortPayment
impl Unpin for ShortPayment
impl UnwindSafe for ShortPayment
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