Skip to main content

CustomerService

Service for managing customers.

Constructors

new CustomerService()

new CustomerService(): CustomerService

Returns

CustomerService

Methods

addCustomer()

addCustomer(
customer,
contactInfo,
billingInfo): CustomerAccount

Add a new customer.

Parameters

ParameterTypeDescription
customerCustomerThe customer to be added.
contactInfoCustomerContactThe contact information for the customer.
billingInfoCustomerBillingThe billing information for the customer.

Returns

CustomerAccount

The added customer account.


getAllCustomers()

getAllCustomers(): CustomerAccount[]

Get all customer accounts.

Returns

CustomerAccount[]

An array of all customer accounts.


getCustomerById()

getCustomerById(customerId): undefined | CustomerAccount

Get a customer account by ID.

Parameters

ParameterTypeDescription
customerIdstringThe ID of the customer.

Returns

undefined | CustomerAccount

The customer account with the specified ID.