Class: Address

Address


new Address( [json])

An address.
Parameters:
Name Type Argument Description
json Object <optional>
See:

Extends

Methods


addField(field)

Add a field
Parameters:
Name Type Description
field Field
Inherited From:
Returns:
this
Type
ExtensibleData

Add a link
Parameters:
Name Type Description
link Link
Inherited From:
Returns:
this
Type
ExtensibleData

getCity()

Get the city
Returns:
Type
String

getCountry()

Get the country
Returns:
Type
String

getFields()

Get the fields
Inherited From:
Returns:
Type
Array.<Field>

getId()

Get the object's id.
Inherited From:
Returns:
Id
Type
String

Get a link
Parameters:
Name Type Description
rel String
Inherited From:
Returns:
Type
Link

Get the links
Inherited From:
Returns:
Type
Array.<Link>

getPostalCode()

Get the postal code
Returns:
Type
String

getStateOrProvince()

Get the state or province
Returns:
Type
String

getStreet()

Get the street
Returns:
Type
String

getStreet2()

Get the street2
Returns:
Type
String

getStreet3()

Get the street3
Returns:
Type
String

getStreet4()

Get the street4
Returns:
Type
String

getStreet5()

Get the street5
Returns:
Type
String

getStreet6()

Get the street6
Returns:
Type
String

getValue()

Get the complete address value
Returns:
Type
String

init(json)

Initialize from JSON
Parameters:
Name Type Description
json Object
Overrides:
Returns:
this
Type
Address

<static> isInstance(obj)

Check whether the given object is an instance of this class.
Parameters:
Name Type Description
obj Object
Returns:
Type
Boolean

setCity(city)

Set the city
Parameters:
Name Type Description
city String
Returns:
Type
Address

setCountry(country)

Set the country
Parameters:
Name Type Description
country String
Returns:
Type
Address

setFields(fields)

Set the fields
Parameters:
Name Type Description
fields Array.<Field>
Inherited From:
Returns:
this
Type
ExtensibleData

setId(id)

Set the object's id.
Parameters:
Name Type Description
id String
Inherited From:
Returns:
This object, for chaining.
Type
ExtensibleData

Set the links
Parameters:
Name Type Description
links Links
Inherited From:
Returns:
this
Type
ExtensibleData

setPostalCode(postalCode)

Set the postal code
Parameters:
Name Type Description
postalCode String
Returns:
Type
Address

setStateOrProvince(stateOrProvince)

Set the state or province
Parameters:
Name Type Description
stateOrProvince String
Returns:
Type
Address

setStreet(street)

Set the street
Parameters:
Name Type Description
street String
Returns:
Type
Address

setStreet2(street2)

Set the street2
Parameters:
Name Type Description
street2 String
Returns:
Type
Address

setStreet3(street3)

Set the street3
Parameters:
Name Type Description
street3 String
Returns:
Type
Address

setStreet4(street4)

Set the street4
Parameters:
Name Type Description
street4 String
Returns:
Type
Address

setStreet5(street5)

Set the street5
Parameters:
Name Type Description
street5 String
Returns:
Type
Address

setStreet6(street6)

Set the street6
Parameters:
Name Type Description
street6 String
Returns:
Type
Address

setValue(value)

Set the complete address value
Parameters:
Name Type Description
value String
Returns:
Type
Address

toJSON()

Export the object as JSON
Overrides:
Returns:
JSON object
Type
Object