java.lang.Object
com.broadleafcommerce.fulfillment.common.domain.Address

public class Address extends Object
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 Details

    • Address

      public Address()
  • Method Details

    • getAddress1

      public String 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

      public String 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

      public String 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

      public String getCity()
      The name of a city in which this address or partial address is located.
    • getRegion

      public String getRegion()
      State, Province, or Region in which this address or partial address is located.
    • getCountry

      public String getCountry()
      Country code. This should not be null. We should know in which country, at least, this address (or partial address) is located.
    • getPostalCode

      public String 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

      public Double 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

      public Double 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

      public void setAddress1(String address1)
      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

      public void setAddress2(String address2)
      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

      public void setAddress3(String address3)
      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

      public void setCity(String city)
      The name of a city in which this address or partial address is located.
    • setRegion

      public void setRegion(String region)
      State, Province, or Region in which this address or partial address is located.
    • setCountry

      public void setCountry(String country)
      Country code. This should not be null. We should know in which country, at least, this address (or partial address) is located.
    • setPostalCode

      public void setPostalCode(String postalCode)
      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

      public void setLatitude(Double latitude)
      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

      public void setLongitude(Double longitude)
      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.