typedoc-vitepress-theme-example / customer / CustomerService
CustomerService
Service for managing customers.
Constructors
new CustomerService()
ts
new CustomerService(): CustomerServiceReturns
Properties
customers
ts
private customers: CustomerAccount[] = [];Methods
addCustomer()
ts
addCustomer(
customer,
contactInfo,
billingInfo): CustomerAccountAdd 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): CustomerAccountGet a customer account by ID.
Parameters
• customerId: string
The ID of the customer.
Returns
The customer account with the specified ID.