pub struct Item {
pub id: String,
pub entity: String,
pub name: String,
pub description: Option<String>,
pub amount: i64,
pub currency: String,
pub active: bool,
pub unit: Option<String>,
pub hsn_code: Option<String>,
pub sac_code: Option<String>,
pub tax_rate: Option<f64>,
pub created_at: i64,
}Expand description
A reusable priced line item.
Fields§
§id: StringUnique identifier, e.g. item_7Oxp4hmm6T4SCn.
entity: StringAlways "item".
name: StringDisplay name.
description: Option<String>Longer description.
amount: i64Unit price in the smallest currency unit.
currency: StringISO 4217 currency code.
active: boolWhether the item can still be used.
unit: Option<String>Unit of measure, e.g. kg.
hsn_code: Option<String>HSN code for tax reporting.
sac_code: Option<String>SAC code for tax reporting.
tax_rate: Option<f64>Tax rate applied, in basis points.
created_at: i64Creation time as a Unix timestamp in seconds.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Item
impl<'de> Deserialize<'de> for Item
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
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnsafeUnpin for Item
impl UnwindSafe for Item
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