Address

Address

Address of creditor or debtor.

You can either set street, house number, postal code and town (type structured address)
or address line 1 and 2 (type combined address elements). The type is automatically set
once any of these fields is set. Before setting the fields, the address type is undetermined.
If fields of both types are set, the address type becomes conflicting.
Name and country code must always be set unless all fields are empty.

Constructor

new Address()

Source:

Methods

clear()

Clears all fields and sets the type to AddressType.UNDETERMINED.
Source:

equals(obj)

Determines whether the specified object is equal to the current object.
Parameters:
Name Type Description
obj The object to compare with the current object.
Returns:
Type Description
true if the specified object is equal to the current object; otherwise, false.
Source:

getAddressLine1()

Gets the address line 1.

Address line 1 contains street name, house number or P.O. box.

Setting this field sets the address type to AddressType.COMBINED_ELEMENTS unless it's already
AddressType.STRUCTURED, in which case it becomes AddressType.CONFLICTING.

This field is only used for combined elements addresses and is optional.

Returns:
Type Description
The address line 1.
Source:

getAddressLine2()

Gets the address line 2.
Address line 2 contains postal code and town.
Setting this field sets the address type to AddressType.COMBINED_ELEMENTS unless it's already
AddressType.STRUCTURED, in which case it becomes AddressType.CONFLICTING.
This field is only used for combined elements addresses. For this type, it's mandatory.
Returns:
Type Description
The address line 2.
Source:

getCountryCode()

Gets the two-letter ISO country code.

The country code is mandatory unless the entire address contains null or emtpy values.

Returns:
Type Description
The ISO country code.
Source:

getHouseNo()

Gets the house number.

Setting this field sets the address type to AddressType.STRUCTURED unless it's already
AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.

This field is only used for structured addresses and is optional.

Returns:
Type Description
The house number.
Source:

getName()

Gets the name, either the first and last name of a natural person or the
company name of a legal person.
Returns:
Type Description
The name.
Source:

getPostalCode()

Gets the postal code.

Setting this field sets the address type to AddressType.STRUCTURED unless it's already
AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.

This field is only used for structured addresses. For this type, it's mandatory.

Returns:
Type Description
The postal code.
Source:

getStreet()

Gets the street.
The street must be speicfied without house number.
Setting this field sets the address type to AddressType.STRUCTURED unless it's already
AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.
This field is only used for structured addresses and is optional.
Returns:
Type Description
The street.
Source:

getTown()

Gets the town or city.

Setting this field sets the address type to AddressType.STRUCTURED unless it's already
AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.

This field is only used for structured addresses. For this type, it's mandatory.

Returns:
Type Description
The town or city.
Source:

getType()

Gets the address type.

The address type is automatically set by either setting street / house number
or address line 1 and 2. Before setting the fields, the address type is Undetermined.
If fields of both types are set, the address type becomes Conflicting.
Returns:
Type Description
The address type.
Source:

hashCode()

Gets the hash code for this instance.
Returns:
Type Description
A hash code for the current object
.
Source:

setAddressLine1(value:)

Sets the address line 1.

Address line 1 contains street name, house number or P.O. box.

Setting this field sets the address type to AddressType.COMBINED_ELEMENTS unless it's already
AddressType.STRUCTURED, in which case it becomes AddressType.CONFLICTING.

This field is only used for combined elements addresses and is optional.

Parameters:
Name Type Description
value: The address line 1.
Source:

setAddressLine2(value:)

Sets the address line 2.
Address line 2 contains postal code and town.
Setting this field sets the address type to AddressType.COMBINED_ELEMENTS unless it's already
AddressType.STRUCTURED, in which case it becomes AddressType.CONFLICTING.
This field is only used for combined elements addresses. For this type, it's mandatory.
Parameters:
Name Type Description
value: The address line 2.
Source:

setCountryCode(value)

Sets the two-letter ISO country code.

The country code is mandatory unless the entire address contains null or emtpy values.

Parameters:
Name Type Description
value The ISO country code.
Source:

setHouseNo(value:)

Sets the house number.

Setting this field sets the address type to AddressType.STRUCTURED unless it's already
AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.

This field is only used for structured addresses and is optional.

Parameters:
Name Type Description
value: The house number.
Source:

setName(value:)

Sets the name, either the first and last name of a natural person or the
company name of a legal person.
Parameters:
Name Type Description
value: The name.
Source:

setPostalCode(value)

Sets the postal code.

Setting this field sets the address type to AddressType.STRUCTURED unless it's already
AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.

This field is only used for structured addresses. For this type, it's mandatory.

Parameters:
Name Type Description
value The postal code.
Source:

setStreet(value:)

Sets the street.

The street must be speicfied without house number.

Setting this field sets the address type to AddressType.STRUCTURED unless it's already
AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.

This field is only used for structured addresses and is optional.

Parameters:
Name Type Description
value: The street.
Source:

setTown(value)

Sets the town or city.

Setting this field sets the address type to AddressType.STRUCTURED unless it's already
AddressType.COMBINED_ELEMENTS, in which case it becomes AddressType.CONFLICTING.

This field is only used for structured addresses. For this type, it's mandatory.

Parameters:
Name Type Description
value The town or city.
Source: