typedoc-vitepress-theme-example / customer / CustomerService
CustomerService
Service for managing customers.
Constructors
new CustomerService()
ts
new CustomerService(): CustomerService
Returns
Properties
customers
ts
private customers: CustomerAccount[] = [];
Methods
addCustomer()
ts
addCustomer(
customer,
contactInfo,
billingInfo): CustomerAccount
Add a new customer.
Parameters
• customer: Customer
The customer to be added.
• contactInfo: CustomerContact
The contact information for the customer.
• billingInfo: CustomerBilling
The billing information for the customer.
Returns
The added customer account.
getAllCustomers()
ts
getAllCustomers(): CustomerAccount[]
Get all customer accounts.
Returns
An array of all customer accounts.
getCustomerById()
ts
getCustomerById(customerId): CustomerAccount
Get a customer account by ID.
Parameters
• customerId: string
The ID of the customer.
Returns
The customer account with the specified ID.