Skip to main content

Address

Address

Represents a Customer's address.

Signature
class Address extends VendureEntity implements HasCustomFields {
constructor(input?: DeepPartial<Address>)
@Index()
@ManyToOne(type => Customer, customer => customer.addresses)
customer: Customer;
@Column({ default: '' }) fullName: string;
@Column({ default: '' })
company: string;
@Column() streetLine1: string;
@Column({ default: '' })
streetLine2: string;
@Column({ default: '' }) city: string;
@Column({ default: '' })
province: string;
@Column({ default: '' }) postalCode: string;
@Index()
@ManyToOne(type => Country)
country: Country;
@Column({ default: '' })
phoneNumber: string;
@Column({ default: false })
defaultShippingAddress: boolean;
@Column({ default: false })
defaultBillingAddress: boolean;
@Column(type => CustomAddressFields)
customFields: CustomAddressFields;
}

constructor

method
(input?: DeepPartial<Address>) => Address

customer

property

fullName

property
string

company

property
string

streetLine1

property
string

streetLine2

property
string

city

property
string

province

property
string

postalCode

property
string

country

property

phoneNumber

property
string

defaultShippingAddress

property
boolean

defaultBillingAddress

property
boolean

customFields

property
CustomAddressFields