-
Notifications
You must be signed in to change notification settings - Fork 3
CustomerModule.Class.CustomerService
tgreyuk edited this page Apr 25, 2024
·
1 revision
github-wiki-example / CustomerModule / CustomerService
Service for managing customers.
new CustomerService():
CustomerService
Property | Modifier | Type | Default value |
---|---|---|---|
customers |
private |
CustomerAccount [] |
[] |
addCustomer(
customer
,contactInfo
,billingInfo
):CustomerAccount
Add a new customer.
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. |
The added customer account.
customer.ts:153
getAllCustomers():
CustomerAccount
[]
Get all customer accounts.
An array of all customer accounts.
customer.ts:171
getCustomerById(
customerId
):undefined
|CustomerAccount
Get a customer account by ID.
Parameter | Type | Description |
---|---|---|
customerId |
string |
The ID of the customer. |
undefined
| CustomerAccount
The customer account with the specified ID.
customer.ts:180