pub struct CashDiscountCreate {
pub account_id: i64,
pub note: String,
pub rate: i64,
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.
note: StringTrimmed description. Supply a nonblank value because the stored model requires a string.
rate: i64Whole percentage points: 2 means 2%. This endpoint currently accepts only integers and does not validate a percentage range.
extra: Map<String, Value>Fields not described by the spec, e.g. instance-specific DB fields.
Trait Implementations§
Source§impl Clone for CashDiscountCreate
impl Clone for CashDiscountCreate
Source§impl Debug for CashDiscountCreate
impl Debug for CashDiscountCreate
Source§impl Default for CashDiscountCreate
impl Default for CashDiscountCreate
Source§impl<'de> Deserialize<'de> for CashDiscountCreate
impl<'de> Deserialize<'de> for CashDiscountCreate
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 CashDiscountCreate
impl PartialEq for CashDiscountCreate
Source§impl Serialize for CashDiscountCreate
impl Serialize for CashDiscountCreate
impl StructuralPartialEq for CashDiscountCreate
Auto Trait Implementations§
impl Freeze for CashDiscountCreate
impl RefUnwindSafe for CashDiscountCreate
impl Send for CashDiscountCreate
impl Sync for CashDiscountCreate
impl Unpin for CashDiscountCreate
impl UnsafeUnpin for CashDiscountCreate
impl UnwindSafe for CashDiscountCreate
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