Skip to main content

Line

Struct Line 

Source
pub struct Line {
Show 24 fields pub id: String, pub name: String, pub net: Amount, pub tax: TaxCategory, pub quantity: Option<Quantity>, pub unit: Option<Code>, pub price: Option<Price>, pub note: Option<String>, pub description: Option<String>, pub period: Option<Period>, pub allowances: Vec<LineAllowanceCharge>, pub charges: Vec<LineAllowanceCharge>, pub standard_id: Option<Identifier>, pub item_id: Option<Identifier>, pub buyer_id: Option<Identifier>, pub order_line: Option<String>, pub accounting_reference: Option<String>, pub attributes: Vec<ItemAttribute>, pub origin_country: Option<Code>, pub classifications: Vec<Identifier>, pub invoiced_object: Option<Identifier>, pub invoiced_object_code: Option<Code>, pub extra_tax: Vec<TaxCategory>, pub tax_total: Option<InvoiceAmount>,
}

Fields§

§id: String

BT-126 line identifier, not a GTIN (BT-157).

§name: String

BT-153 item name.

§net: Amount

BT-131 line net amount.

§tax: TaxCategory

BT-151 / BT-152 classified tax category.

§quantity: Option<Quantity>

BT-129 invoiced quantity.

§unit: Option<Code>

BT-130 unit of measure.

§price: Option<Price>

BG-29 item price.

§note: Option<String>

BT-127 line note.

§description: Option<String>

BT-154 item description.

§period: Option<Period>

BG-26 invoicing period (BT-134/BT-135). Not Invoice::period (BG-14).

§allowances: Vec<LineAllowanceCharge>§charges: Vec<LineAllowanceCharge>§standard_id: Option<Identifier>

BT-157 Item standard identifier (often GTIN). UBL StandardItemIdentification; scheme ICD (BR-64 / BR-CL-21). Not BT-155.

§item_id: Option<Identifier>

BT-155 Seller’s item identifier. UBL SellersItemIdentification. Not BT-156, not BT-157.

§buyer_id: Option<Identifier>

BT-156 Buyer’s item identifier. UBL BuyersItemIdentification. Not BT-155, not BT-157.

§order_line: Option<String>

BT-132 referenced purchase order line (OrderLineReference/LineID). Not BT-13, not BT-126.

§accounting_reference: Option<String>

BT-133 invoice line buyer accounting reference (cbc:AccountingCost). Not header BT-19.

§attributes: Vec<ItemAttribute>

BG-32 item attributes (BT-160 name, BT-161 value). Not BT-158 classifications.

§origin_country: Option<Code>

BT-159 item origin country (BR-CL-15), not BT-80.

§classifications: Vec<Identifier>

BG-32 classification identifiers (PINT-MY CLASS is listID CG, not LHDN).

§invoiced_object: Option<Identifier>

Line invoiced object (BT-128). Peppol R101: DocumentTypeCode 130 only.

§invoiced_object_code: Option<Code>

UBL DocumentTypeCode on the line DocumentReference. Absent means 130.

§extra_tax: Vec<TaxCategory>

Extra ClassifiedTaxCategory after BT-151 (PINT-MY TTX beside HVG/SA). Not BT-151.

§tax_total: Option<InvoiceAmount>

Line TaxTotal/cbc:TaxAmount. ALIGNED-IBRP-TTX-09-MY sums this on TTX lines. Not BT-117.

Implementations§

Source§

impl Line

Source

pub fn new( id: impl Into<String>, name: impl Into<String>, net: Amount, tax: TaxCategory, ) -> Self

Trait Implementations§

Source§

impl Clone for Line

Source§

fn clone(&self) -> Line

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Line

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Line

Source§

impl PartialEq for Line

Source§

fn eq(&self, other: &Line) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Line

Auto Trait Implementations§

§

impl Freeze for Line

§

impl RefUnwindSafe for Line

§

impl Send for Line

§

impl Sync for Line

§

impl Unpin for Line

§

impl UnsafeUnpin for Line

§

impl UnwindSafe for Line

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.