Class Address
java.lang.Object
com.broadleafcommerce.fulfillment.common.domain.Address
Represent an address, partial address, or location for the purposes of determining fulfillment
options, prices, and delivery estimates.
Country is typically a required field. Beyond that, providing region, city, and postal code will
help narrow down availability during inventory checks, for example, and will provide more
accurate fulfillment options, given that there may be restrictions in certain regions or cities.
Providing latitude and longitude are also helpful as that allows us to do radius (or geospatial)
searches for inventory or pickup locations as well as same day delivery locations.
- Author:
- Kelly Tisdell (ktisdell)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionStreet address line 1.Street address line 2.Street address line 3.getCity()
The name of a city in which this address or partial address is located.Country code.Latitude for GPS coordinates.Longitude for GPS coordinates.Postal code (or ZIP code in the US) in which this address or partial address is located.State, Province, or Region in which this address or partial address is located.boolean
isPoBox()
Indicates if this address or partial address is a Post Office (PO) Box.void
setAddress1
(String address1) Street address line 1.void
setAddress2
(String address2) Street address line 2.void
setAddress3
(String address3) Street address line 3.void
The name of a city in which this address or partial address is located.void
setCountry
(String country) Country code.void
setLatitude
(Double latitude) Latitude for GPS coordinates.void
setLongitude
(Double longitude) Longitude for GPS coordinates.void
setPoBox
(boolean poBox) Indicates if this address or partial address is a Post Office (PO) Box.void
setPostalCode
(String postalCode) Postal code (or ZIP code in the US) in which this address or partial address is located.void
State, Province, or Region in which this address or partial address is located.
-
Constructor Details
-
Address
public Address()
-
-
Method Details
-
getAddress1
Street address line 1. This is often not required for calculating fulfillment charges, but is included for completeness and in case this detail is required in some cases. -
getAddress2
Street address line 2. This is often not required for calculating fulfillment charges, but is included for completeness and in case this detail is required in some cases. -
getAddress3
Street address line 3. This is often not required for calculating fulfillment charges, but is included for completeness and in case this detail is required in some cases. -
getCity
The name of a city in which this address or partial address is located. -
getRegion
State, Province, or Region in which this address or partial address is located. -
getCountry
Country code. This should not be null. We should know in which country, at least, this address (or partial address) is located. -
getPostalCode
Postal code (or ZIP code in the US) in which this address or partial address is located. -
isPoBox
public boolean isPoBox()Indicates if this address or partial address is a Post Office (PO) Box. Some shipping providers cannot ship to a PO Box. -
getLatitude
Latitude for GPS coordinates. Typically, latitude and longitude can be used to determine an exact location, and can be used instead of other properties like region, city, and postal code. These are usually determined by a geolocation service and are required for distance or radius searches, for example. -
getLongitude
Longitude for GPS coordinates. Typically, latitude and longitude can be used to determine an exact location, and can be used instead of other properties like region, city, and postal code. These are usually determined by a geolocation service and are required for distance or radius searches, for example. -
setAddress1
Street address line 1. This is often not required for calculating fulfillment charges, but is included for completeness and in case this detail is required in some cases. -
setAddress2
Street address line 2. This is often not required for calculating fulfillment charges, but is included for completeness and in case this detail is required in some cases. -
setAddress3
Street address line 3. This is often not required for calculating fulfillment charges, but is included for completeness and in case this detail is required in some cases. -
setCity
The name of a city in which this address or partial address is located. -
setRegion
State, Province, or Region in which this address or partial address is located. -
setCountry
Country code. This should not be null. We should know in which country, at least, this address (or partial address) is located. -
setPostalCode
Postal code (or ZIP code in the US) in which this address or partial address is located. -
setPoBox
public void setPoBox(boolean poBox) Indicates if this address or partial address is a Post Office (PO) Box. Some shipping providers cannot ship to a PO Box. -
setLatitude
Latitude for GPS coordinates. Typically, latitude and longitude can be used to determine an exact location, and can be used instead of other properties like region, city, and postal code. These are usually determined by a geolocation service and are required for distance or radius searches, for example. -
setLongitude
Longitude for GPS coordinates. Typically, latitude and longitude can be used to determine an exact location, and can be used instead of other properties like region, city, and postal code. These are usually determined by a geolocation service and are required for distance or radius searches, for example.
-