Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DeliveryCustomer

A class that extends Customer.

Hierarchy

Index

Constructors

constructor

  • new DeliveryCustomer(id: number, name: string, nextOrderNumber: string | number, subscriptionType: "basic" | "enterprise"): DeliveryCustomer
  • The constructor of the DeliveryCustomer class.

    Parameters

    • id: number

      the customer's database ID

    • name: string

      the customer's name

    • nextOrderNumber: string | number

      the next number to use when this customer places an order

    • subscriptionType: "basic" | "enterprise"

      whether this customer has a basic or enterprise subscription

    Returns DeliveryCustomer

Properties

Readonly id

id: number

A public readonly property.

name

name: string

A public property that can be reassigned.

Protected Optional contactName

contactName?: string

An optional protected property.

Optional preferredCourierId

preferredCourierId?: number

A property defined on the subclass.

Readonly subscriptionType

subscriptionType: "basic" | "enterprise"

Another property defined on the subclass.

Accessors

nextOrderNumber

  • get nextOrderNumber(): string
  • set nextOrderNumber(value: string | number): void
  • A getter that prepends a number sign to the private _nextOrderNumber property.

    Returns string

  • A setter that takes in either a string or a number and sets the private _nextOrderNumber property.

    Parameters

    • value: string | number

    Returns void

Methods

onOrderPlaced

  • onOrderPlaced(): void

onOrderPlacedArrowFunction

  • onOrderPlacedArrowFunction(): void

Protected isValid

  • isValid(): boolean

Generated using TypeDoc