pub struct CustomerGenerator { /* private fields */ }Expand description
Generator for customer master data.
Implementations§
Source§impl CustomerGenerator
impl CustomerGenerator
Sourcepub fn with_config(seed: u64, config: CustomerGeneratorConfig) -> Self
pub fn with_config(seed: u64, config: CustomerGeneratorConfig) -> Self
Create a new customer generator with custom configuration.
Sourcepub fn generate_customer(
&mut self,
company_code: &str,
_effective_date: NaiveDate,
) -> Customer
pub fn generate_customer( &mut self, company_code: &str, _effective_date: NaiveDate, ) -> Customer
Generate a single customer.
Sourcepub fn generate_intercompany_customer(
&mut self,
company_code: &str,
partner_company_code: &str,
effective_date: NaiveDate,
) -> Customer
pub fn generate_intercompany_customer( &mut self, company_code: &str, partner_company_code: &str, effective_date: NaiveDate, ) -> Customer
Generate an intercompany customer (always intercompany).
Sourcepub fn generate_customer_with_credit(
&mut self,
company_code: &str,
credit_rating: CreditRating,
credit_limit: Decimal,
effective_date: NaiveDate,
) -> Customer
pub fn generate_customer_with_credit( &mut self, company_code: &str, credit_rating: CreditRating, credit_limit: Decimal, effective_date: NaiveDate, ) -> Customer
Generate a customer with specific credit profile.
Sourcepub fn generate_customer_pool(
&mut self,
count: usize,
company_code: &str,
effective_date: NaiveDate,
) -> CustomerPool
pub fn generate_customer_pool( &mut self, count: usize, company_code: &str, effective_date: NaiveDate, ) -> CustomerPool
Generate a customer pool with specified count.
Sourcepub fn generate_customer_pool_with_ic(
&mut self,
count: usize,
company_code: &str,
partner_company_codes: &[String],
effective_date: NaiveDate,
) -> CustomerPool
pub fn generate_customer_pool_with_ic( &mut self, count: usize, company_code: &str, partner_company_codes: &[String], effective_date: NaiveDate, ) -> CustomerPool
Generate a customer pool with intercompany customers.
Sourcepub fn generate_diverse_pool(
&mut self,
count: usize,
company_code: &str,
effective_date: NaiveDate,
) -> CustomerPool
pub fn generate_diverse_pool( &mut self, count: usize, company_code: &str, effective_date: NaiveDate, ) -> CustomerPool
Generate a diverse customer pool with various credit profiles.
Auto Trait Implementations§
impl Freeze for CustomerGenerator
impl RefUnwindSafe for CustomerGenerator
impl Send for CustomerGenerator
impl Sync for CustomerGenerator
impl Unpin for CustomerGenerator
impl UnwindSafe for CustomerGenerator
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