Skip to content

CustomerModule.Class.CustomerAccount

tgreyuk edited this page Apr 25, 2024 · 1 revision

github-wiki-example / CustomerModule / CustomerAccount

Class: CustomerAccount

Class representing a customer account. Manages and integrates different aspects of customer data and interactions with the business.

Constructors

new CustomerAccount()

new CustomerAccount(customer, contactInfo, billingInfo): CustomerAccount

Constructs a new CustomerAccount instance.

Parameters

Parameter Type Description
customer Customer Basic customer profile information.
contactInfo CustomerContact Contact details for the customer.
billingInfo CustomerBilling Customer's billing information.

Returns

CustomerAccount

Source

customer.ts:88

Properties

Property Modifier Type
billingInfo private CustomerBilling
contactInfo private CustomerContact
customer private Customer
orderHistory private CustomerOrderHistory[]

Methods

addOrderToHistory()

addOrderToHistory(order): void

Adds a new order to the customer's historical record.

Parameters

Parameter Type Description
order CustomerOrderHistory The order to be added to the history.

Returns

void

Source

customer.ts:127


getBillingInfo()

getBillingInfo(): CustomerBilling

Retrieves the billing information of the customer.

Returns

CustomerBilling

The billing details.

Source

customer.ts:119


getContactInfo()

getContactInfo(): CustomerContact

Retrieves the contact information of the customer.

Returns

CustomerContact

The contact details.

Source

customer.ts:111


getCustomer()

getCustomer(): Customer

Retrieves the stored customer profile information.

Returns

Customer

The customer's profile data.

Source

customer.ts:103


getOrderHistory()

getOrderHistory(): CustomerOrderHistory[]

Retrieves the full history of orders made by the customer.

Returns

CustomerOrderHistory[]

An array of order history records.

Source

customer.ts:135

Clone this wiki locally