Interface AddressService
- All Superinterfaces:
Service
public interface AddressService extends Service
Service for working with Address objects.
The components available to and required by each Country vary.
See
CountryCodes
for a complete description.-
Method Summary
Modifier and Type Method Description Address
createAddress(Country country)
Returns a new Address in-memory for the given Country.Address
fromDelimitedText(java.lang.String text)
Given tilde-delimited text (such as that used by the ONE csv processor for inbound/outbound interfaces), returns an Address object.java.lang.String
toDelimitedText(Address address)
Given an Address, returns a tilde-delimited address that can be interpreted by the ONE csv processor for inbound/outbound interfaces.
-
Method Details
-
createAddress
Returns a new Address in-memory for the given Country. The client should set the appropriate component values on the given Address before attempting to write the Address as a field on a Model.- Parameters:
country
- country of the address
-
toDelimitedText
Given an Address, returns a tilde-delimited address that can be interpreted by the ONE csv processor for inbound/outbound interfaces. See alsoCountryCodes
.- Parameters:
address
- Address to be converted- Returns:
- tilde-delimited value, for example: US~TX~Dallas~~~~4055 Valley View Ln~Suite 1000~~75222~~~
-
fromDelimitedText
Given tilde-delimited text (such as that used by the ONE csv processor for inbound/outbound interfaces), returns an Address object. See alsoCountryCodes
.- Parameters:
tilde
- -delimited value, for example: US~TX~Dallas~~~~4055 Valley View Ln~Suite 1000~~75222~~~- Returns:
- Address object
-