Address
An address is used across the Medusa backend within other schemas and object types. For example, a customer's billing and shipping addresses both use the Address entity.
Constructors
constructor
**new Address**()
An address is used across the Medusa backend within other schemas and object types. For example, a customer's billing and shipping addresses both use the Address entity.
Properties
address_1null | stringRequiredAddress line 1
address_2null | stringRequiredAddress line 2
citynull | stringRequiredCity
companynull | stringRequiredCompany name
A country object.
country_codenull | stringRequiredThe 2 character ISO code of the country in lower case
created_atDateRequiredThe date with timezone at which the resource was created.
Available if the relation
customer is expanded.customer_idnull | stringRequiredID of the customer this address belongs to
deleted_atnull | DateRequiredThe date with timezone at which the resource was deleted.
first_namenull | stringRequiredFirst name
idstringRequiredID of the address
last_namenull | stringRequiredLast name
metadataRecord<string, unknown>RequiredAn optional key-value map with additional details
phonenull | stringRequiredPhone Number
postal_codenull | stringRequiredPostal Code
provincenull | stringRequiredProvince
updated_atDateRequiredThe date with timezone at which the resource was updated.
Methods
beforeInsert
Private **beforeInsert**(): void
Returns
void
voidvoidWas this section helpful?