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
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
getBillingInfo()
getBillingInfo(): CustomerBilling
Retrieves the billing information of the customer.
Returns
The billing details.
getContactInfo()
getContactInfo(): CustomerContact
Retrieves the contact information of the customer.
Returns
The contact details.
getCustomer()
getCustomer(): Customer
Retrieves the stored customer profile information.
Returns
The customer's profile data.
getOrderHistory()
getOrderHistory(): CustomerOrderHistory[]
Retrieves the full history of orders made by the customer.
Returns
An array of order history records.