Skip to content

customer.Class.CustomerAccount

tgreyuk edited this page Mar 23, 2025 · 9 revisions

github-wiki-example / customer / CustomerAccount

Class: CustomerAccount

Defined in: customer.ts:76

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

Constructors

Constructor

new CustomerAccount(customer, contactInfo, billingInfo): CustomerAccount

Defined in: customer.ts:88

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

Methods

addOrderToHistory()

addOrderToHistory(order): void

Defined in: customer.ts:127

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


getBillingInfo()

getBillingInfo(): CustomerBilling

Defined in: customer.ts:119

Retrieves the billing information of the customer.

Returns

CustomerBilling

The billing details.


getContactInfo()

getContactInfo(): CustomerContact

Defined in: customer.ts:111

Retrieves the contact information of the customer.

Returns

CustomerContact

The contact details.


getCustomer()

getCustomer(): Customer

Defined in: customer.ts:103

Retrieves the stored customer profile information.

Returns

Customer

The customer's profile data.


getOrderHistory()

getOrderHistory(): CustomerOrderHistory[]

Defined in: customer.ts:135

Retrieves the full history of orders made by the customer.

Returns

CustomerOrderHistory[]

An array of order history records.

Clone this wiki locally