pub struct P2PGenerator { /* private fields */ }Expand description
Generator for P2P document flows.
Implementations§
Source§impl P2PGenerator
impl P2PGenerator
Sourcepub fn with_config(seed: u64, config: P2PGeneratorConfig) -> Self
pub fn with_config(seed: u64, config: P2PGeneratorConfig) -> Self
Create a new P2P generator with custom configuration.
Sourcepub fn generate_chain(
&mut self,
company_code: &str,
vendor: &Vendor,
materials: &[&Material],
po_date: NaiveDate,
fiscal_year: u16,
fiscal_period: u8,
created_by: &str,
) -> P2PDocumentChain
pub fn generate_chain( &mut self, company_code: &str, vendor: &Vendor, materials: &[&Material], po_date: NaiveDate, fiscal_year: u16, fiscal_period: u8, created_by: &str, ) -> P2PDocumentChain
Generate a complete P2P chain.
Sourcepub fn generate_purchase_order(
&mut self,
company_code: &str,
vendor: &Vendor,
materials: &[&Material],
po_date: NaiveDate,
fiscal_year: u16,
fiscal_period: u8,
created_by: &str,
) -> PurchaseOrder
pub fn generate_purchase_order( &mut self, company_code: &str, vendor: &Vendor, materials: &[&Material], po_date: NaiveDate, fiscal_year: u16, fiscal_period: u8, created_by: &str, ) -> PurchaseOrder
Generate a purchase order.
Sourcepub fn generate_chains(
&mut self,
count: usize,
company_code: &str,
vendors: &VendorPool,
materials: &MaterialPool,
date_range: (NaiveDate, NaiveDate),
fiscal_year: u16,
created_by: &str,
) -> Vec<P2PDocumentChain>
pub fn generate_chains( &mut self, count: usize, company_code: &str, vendors: &VendorPool, materials: &MaterialPool, date_range: (NaiveDate, NaiveDate), fiscal_year: u16, created_by: &str, ) -> Vec<P2PDocumentChain>
Generate multiple P2P chains.
Auto Trait Implementations§
impl Freeze for P2PGenerator
impl RefUnwindSafe for P2PGenerator
impl Send for P2PGenerator
impl Sync for P2PGenerator
impl Unpin for P2PGenerator
impl UnwindSafe for P2PGenerator
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