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 with_segmentation_config(
seed: u64,
config: CustomerGeneratorConfig,
segmentation_config: CustomerSegmentationConfig,
) -> Self
pub fn with_segmentation_config( seed: u64, config: CustomerGeneratorConfig, segmentation_config: CustomerSegmentationConfig, ) -> Self
Create a new customer generator with segmentation configuration.
Sourcepub fn set_coa_framework(&mut self, framework: CoAFramework)
pub fn set_coa_framework(&mut self, framework: CoAFramework)
Set the accounting framework for auxiliary GL account generation.
Sourcepub fn set_segmentation_config(
&mut self,
segmentation_config: CustomerSegmentationConfig,
)
pub fn set_segmentation_config( &mut self, segmentation_config: CustomerSegmentationConfig, )
Set segmentation configuration.
Sourcepub fn set_country_pack(&mut self, pack: CountryPack)
pub fn set_country_pack(&mut self, pack: CountryPack)
Set the country pack for locale-aware generation.
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.
Sourcepub fn generate_segmented_pool(
&mut self,
count: usize,
company_code: &str,
effective_date: NaiveDate,
total_annual_revenue: Decimal,
) -> SegmentedCustomerPool
pub fn generate_segmented_pool( &mut self, count: usize, company_code: &str, effective_date: NaiveDate, total_annual_revenue: Decimal, ) -> SegmentedCustomerPool
Generate a segmented customer pool with value segments, lifecycle stages, and networks.
Sourcepub fn generate_pool_with_segmentation(
&mut self,
count: usize,
company_code: &str,
effective_date: NaiveDate,
total_annual_revenue: Decimal,
) -> (CustomerPool, SegmentedCustomerPool)
pub fn generate_pool_with_segmentation( &mut self, count: usize, company_code: &str, effective_date: NaiveDate, total_annual_revenue: Decimal, ) -> (CustomerPool, SegmentedCustomerPool)
Generate a combined output of CustomerPool and SegmentedCustomerPool.