Skip to content

typedoc-vitepress-theme-example / customer / CustomerService

CustomerService

Service for managing customers.

Constructors

new CustomerService()

ts
new CustomerService(): CustomerService

Returns

CustomerService

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

CustomerAccount

The added customer account.


getAllCustomers()

ts
getAllCustomers(): CustomerAccount[]

Get all customer accounts.

Returns

CustomerAccount[]

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

CustomerAccount

The customer account with the specified ID.