Skip to main content

O2cDocuments

Struct O2cDocuments 

Source
pub struct O2cDocuments {
    pub so_number: String,
    pub so_id: Uuid,
    pub delivery_number: Option<String>,
    pub delivery_id: Option<Uuid>,
    pub invoice_number: Option<String>,
    pub invoice_id: Option<Uuid>,
    pub receipt_number: Option<String>,
    pub receipt_id: Option<Uuid>,
    pub customer_id: String,
    pub company_code: String,
    pub amount: Decimal,
    pub currency: String,
}
Expand description

O2C document references for event generation.

Fields§

§so_number: String

Sales order number

§so_id: Uuid

Sales order UUID

§delivery_number: Option<String>

Delivery number

§delivery_id: Option<Uuid>

Delivery UUID

§invoice_number: Option<String>

Customer invoice number

§invoice_id: Option<Uuid>

Invoice UUID

§receipt_number: Option<String>

Receipt number

§receipt_id: Option<Uuid>

Receipt UUID

§customer_id: String

Customer ID

§company_code: String

Company code

§amount: Decimal

Total amount

§currency: String

Currency

Implementations§

Source§

impl O2cDocuments

Source

pub fn new( so_number: &str, customer_id: &str, company_code: &str, amount: Decimal, currency: &str, ) -> Self

Create new O2C documents.

Source

pub fn with_delivery(self, delivery_number: &str) -> Self

Set delivery info.

Source

pub fn with_invoice(self, invoice_number: &str) -> Self

Set invoice info.

Source

pub fn with_receipt(self, receipt_number: &str) -> Self

Set receipt info.

Trait Implementations§

Source§

impl Clone for O2cDocuments

Source§

fn clone(&self) -> O2cDocuments

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for O2cDocuments

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V