pub struct CashDiscount {
pub account_id: i64,
pub id: i64,
pub meta: MetaDataEntityId,
pub note: String,
pub rate: f64,
pub extra: Map<String, Value>,
}Expand description
A cash discount defines a percentage for early-payment discounts and the ledger account to which the discount is posted. Its accounting period is determined by that account.
Fields§
§account_id: i64ID of the existing ledger account receiving this amount. It also determines the accounting period.
id: i64§meta: MetaDataEntityId§note: StringTrimmed description. Supply a nonblank value because the stored model requires a string.
rate: f64Percentage points: 2 means 2%. Stored values are floating-point numbers, although this API currently accepts only integer input.
extra: Map<String, Value>Fields not described by the spec, e.g. instance-specific DB fields.
Trait Implementations§
Source§impl Clone for CashDiscount
impl Clone for CashDiscount
Source§impl Debug for CashDiscount
impl Debug for CashDiscount
Source§impl Default for CashDiscount
impl Default for CashDiscount
Source§impl<'de> Deserialize<'de> for CashDiscount
impl<'de> Deserialize<'de> for CashDiscount
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
Source§impl PartialEq for CashDiscount
impl PartialEq for CashDiscount
Source§impl Serialize for CashDiscount
impl Serialize for CashDiscount
impl StructuralPartialEq for CashDiscount
Auto Trait Implementations§
impl Freeze for CashDiscount
impl RefUnwindSafe for CashDiscount
impl Send for CashDiscount
impl Sync for CashDiscount
impl Unpin for CashDiscount
impl UnsafeUnpin for CashDiscount
impl UnwindSafe for CashDiscount
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