projects/core/src/model/address.model.ts
Properties |
|
cellphone |
cellphone:
|
Type : string
|
Optional |
companyName |
companyName:
|
Type : string
|
Optional |
country |
country:
|
Type : Country
|
Optional |
defaultAddress |
defaultAddress:
|
Type : boolean
|
Optional |
district |
district:
|
Type : string
|
Optional |
email:
|
Type : string
|
Optional |
firstName |
firstName:
|
Type : string
|
Optional |
formattedAddress |
formattedAddress:
|
Type : string
|
Optional |
id |
id:
|
Type : string
|
Optional |
lastName |
lastName:
|
Type : string
|
Optional |
line1 |
line1:
|
Type : string
|
Optional |
line2 |
line2:
|
Type : string
|
Optional |
phone |
phone:
|
Type : string
|
Optional |
postalCode |
postalCode:
|
Type : string
|
Optional |
region |
region:
|
Type : Region
|
Optional |
shippingAddress |
shippingAddress:
|
Type : boolean
|
Optional |
title |
title:
|
Type : string
|
Optional |
titleCode |
titleCode:
|
Type : string
|
Optional |
town |
town:
|
Type : string
|
Optional |
visibleInAddressBook |
visibleInAddressBook:
|
Type : boolean
|
Optional |
import { ErrorModel } from './misc.model';
export interface Country {
isocode?: string;
name?: string;
}
export enum CountryType {
BILLING = 'BILLING',
SHIPPING = 'SHIPPING',
}
export interface Region {
countryIso?: string;
isocode?: string;
isocodeShort?: string;
name?: string;
}
export interface Address {
id?: string;
title?: string;
titleCode?: string;
email?: string;
firstName?: string;
lastName?: string;
companyName?: string;
line1?: string;
line2?: string;
postalCode?: string;
town?: string;
region?: Region;
district?: string;
country?: Country;
cellphone?: string;
defaultAddress?: boolean;
shippingAddress?: boolean;
formattedAddress?: string;
phone?: string;
visibleInAddressBook?: boolean;
}
export interface AddressValidation {
decision?: string;
// TODO: Simplify with converter
errors?: { errors: ErrorModel[] };
suggestedAddresses?: Address[];
}