pub struct DeliveryNoteBuilder { /* private fields */ }Expand description
Builder for DeliveryNote entity
Provides a fluent API for constructing DeliveryNote instances. System fields (id, metadata, timestamps) are auto-initialized.
Implementations§
Source§impl DeliveryNoteBuilder
impl DeliveryNoteBuilder
Sourcepub fn delivery_number(self, value: String) -> Self
pub fn delivery_number(self, value: String) -> Self
Set the delivery_number field (required)
Sourcepub fn customer_id(self, value: Uuid) -> Self
pub fn customer_id(self, value: Uuid) -> Self
Set the customer_id field (required)
Sourcepub fn source_so_id(self, value: Uuid) -> Self
pub fn source_so_id(self, value: Uuid) -> Self
Set the source_so_id field (optional)
Sourcepub fn warehouse_id(self, value: Uuid) -> Self
pub fn warehouse_id(self, value: Uuid) -> Self
Set the warehouse_id field (required)
Sourcepub fn posting_date(self, value: NaiveDate) -> Self
pub fn posting_date(self, value: NaiveDate) -> Self
Set the posting_date field (required)
Sourcepub fn total_cogs(self, value: Decimal) -> Self
pub fn total_cogs(self, value: Decimal) -> Self
Set the total_cogs field (default: Decimal::from(0))
Sourcepub fn cogs_account_id(self, value: Uuid) -> Self
pub fn cogs_account_id(self, value: Uuid) -> Self
Set the cogs_account_id field (required)
Sourcepub fn inventory_account_id(self, value: Uuid) -> Self
pub fn inventory_account_id(self, value: Uuid) -> Self
Set the inventory_account_id field (required)
Sourcepub fn transfer_id(self, value: Uuid) -> Self
pub fn transfer_id(self, value: Uuid) -> Self
Set the transfer_id field (optional)
Sourcepub fn status(self, value: DocStatus) -> Self
pub fn status(self, value: DocStatus) -> Self
Set the status field (default: DocStatus::default())
Sourcepub fn posting_state(self, value: GlPostingState) -> Self
pub fn posting_state(self, value: GlPostingState) -> Self
Set the posting_state field (default: GlPostingState::default())
Sourcepub fn journal_id(self, value: Uuid) -> Self
pub fn journal_id(self, value: Uuid) -> Self
Set the journal_id field (optional)
Sourcepub fn accounting_post_id(self, value: Uuid) -> Self
pub fn accounting_post_id(self, value: Uuid) -> Self
Set the accounting_post_id field (optional)
Sourcepub fn build(self) -> Result<DeliveryNote, String>
pub fn build(self) -> Result<DeliveryNote, String>
Build the DeliveryNote entity
Returns Err if any required field without a default is missing.
Trait Implementations§
Source§impl Clone for DeliveryNoteBuilder
impl Clone for DeliveryNoteBuilder
Source§impl Debug for DeliveryNoteBuilder
impl Debug for DeliveryNoteBuilder
Auto Trait Implementations§
impl Freeze for DeliveryNoteBuilder
impl RefUnwindSafe for DeliveryNoteBuilder
impl Send for DeliveryNoteBuilder
impl Sync for DeliveryNoteBuilder
impl Unpin for DeliveryNoteBuilder
impl UnsafeUnpin for DeliveryNoteBuilder
impl UnwindSafe for DeliveryNoteBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more