Skip to content
Snippets Groups Projects
Verified Commit bd4d4f86 authored by Jan Loewe's avatar Jan Loewe :speech_balloon:
Browse files

fix(location): fix location

parent a4d5b587
No related branches found
No related tags found
No related merge requests found
...@@ -2,25 +2,40 @@ import { TextBlock } from "./TextBlock"; ...@@ -2,25 +2,40 @@ import { TextBlock } from "./TextBlock";
import { XMLElement } from "../XMLElement"; import { XMLElement } from "../XMLElement";
export class Location extends XMLElement { export class Location extends XMLElement {
further: TextBlock; further?: TextBlock;
street: XMLElement; street?: XMLElement;
streetNo: XMLElement; streetNo?: XMLElement;
postOfficeBox: XMLElement; postOfficeBox?: XMLElement;
postCode: XMLElement; postCode?: XMLElement;
city: XMLElement; city?: XMLElement;
state: XMLElement; state?: XMLElement;
countryCode: XMLElement; countryCode?: XMLElement;
constructor(options: Partial<Location> = {}) { constructor(options: Partial<Location> = {}) {
super(options); super(options);
this.further = new TextBlock(options.further); if (options.further)
this.street = new XMLElement(options.street); this.further = new TextBlock(options.further);
this.streetNo = new XMLElement(options.streetNo);
this.postOfficeBox = new XMLElement(options.postOfficeBox); if (options.street)
this.postCode = new XMLElement(options.postCode); this.street = new XMLElement(options.street);
this.city = new XMLElement(options.city);
this.state = new XMLElement(options.state); if (options.streetNo)
this.countryCode = new XMLElement(options.countryCode); this.streetNo = new XMLElement(options.streetNo);
if (options.postOfficeBox)
this.postOfficeBox = new XMLElement(options.postOfficeBox);
if (options.postCode)
this.postCode = new XMLElement(options.postCode);
if (options.city)
this.city = new XMLElement(options.city);
if (options.state)
this.state = new XMLElement(options.state);
if (options.countryCode)
this.countryCode = new XMLElement(options.countryCode);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment