Skip to content

CustomerModule.Class.CustomerService

tgreyuk edited this page Apr 25, 2024 · 1 revision

github-wiki-example / CustomerModule / CustomerService

Class: CustomerService

Service for managing customers.

Constructors

new CustomerService()

new CustomerService(): CustomerService

Returns

CustomerService

Properties

Property Modifier Type Default value
customers private CustomerAccount[] []

Methods

addCustomer()

addCustomer(customer, contactInfo, billingInfo): CustomerAccount

Add a new customer.

Parameters

Parameter Type Description
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.

Source

customer.ts:153


getAllCustomers()

getAllCustomers(): CustomerAccount[]

Get all customer accounts.

Returns

CustomerAccount[]

An array of all customer accounts.

Source

customer.ts:171


getCustomerById()

getCustomerById(customerId): undefined | CustomerAccount

Get a customer account by ID.

Parameters

Parameter Type Description
customerId string The ID of the customer.

Returns

undefined | CustomerAccount

The customer account with the specified ID.

Source

customer.ts:180

Clone this wiki locally