Struct lexoffice::model::quotations::LineItems [−][src]
Fields
id: ReadOnly<Uuid>
The field specifies the related id of the product/service.
Read-only.
_type: Type
The type of the item. Possible values are service (the line item is related to a supply of services), material (the line item is related to a physical product), custom (an item without reference in lexoffice and has no id) or text (contains only a name and/or a description for informative purposes).
name: String
The name of the item.
description: Option<String>
The description of the item.
quantity: Option<f64>
The amount of the purchased item. The value can contain up to 4 decimals.
unit_name: Option<String>
The unit name of the purchased item. If the provided unit name is not known in lexoffice it will be created on the fly.
unit_price: Option<UnitPrice>
The unit price of the purchased item. For details see below.
discount_percentage: Option<f64>
The offered discount for the item. The value can contain up to 2 decimals.
line_item_amount: ReadOnly<f64>
The total price of this line item. Depending by the selected taxType in taxConditions, the amount must be given either as net or gross. The value can contain up to 2 decimals.
Read-only.
sub_items: Option<Vec<LineItems>>
A list of subitems of this line item. At this time, all subItems
need to be alternative items.
optional: Option<bool>
If true, the line item is optional (“Optionale Position”). Not a valid attribute for subitems. Defaults to false if unset
alternative: Option<bool>
If true, the line item is an alternative position for its parent item. Currently only valid for subitems, and mandatory to be true in that case. Defaults to false if unset
Implementations
impl LineItems
[src]
pub fn builder() -> LineItemsBuilder<((), (), (), (), (), (), (), (), (), ())>
[src]
Create a builder for building LineItems
.
On the builder, call ._type(...)
, .name(...)
, .description(...)
(optional), .quantity(...)
(optional), .unit_name(...)
(optional), .unit_price(...)
(optional), .discount_percentage(...)
(optional), .sub_items(...)
(optional), .optional(...)
(optional), .alternative(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of LineItems
.
Trait Implementations
impl Clone for LineItems
[src]
impl Debug for LineItems
[src]
impl<'de> Deserialize<'de> for LineItems
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl HasId for LineItems
[src]
impl PartialEq<LineItems> for LineItems
[src]
impl Serialize for LineItems
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for LineItems
[src]
Auto Trait Implementations
impl RefUnwindSafe for LineItems
impl Send for LineItems
impl Sync for LineItems
impl Unpin for LineItems
impl UnwindSafe for LineItems
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,