com.avalara.avatax.services.address
Class ValidAddress

java.lang.Object
  extended by com.avalara.avatax.services.address.Address
      extended by com.avalara.avatax.services.address.ValidAddress
All Implemented Interfaces:
java.io.Serializable

public class ValidAddress
extends Address
implements java.io.Serializable

A fully validated address based on initial Address data passed to AddressSvcSoap.validate(com.avalara.avatax.services.address.ValidateRequest).

 Example:
 [Java]
  ValidateRequest request = new ValidateRequest();
  Address address = new Address();
  address.setLine1("900 Winslow Way");
  address.setLine2("Suite 130");
  address.setCity("Bainbridge Is");
  address.setRegion("WA");
  address.setPostalCode("98110-2450");
  request.setAddress(address);
  request.setTextCase(TextCase.Upper);

  ValidateResult result;
  result = svc.validate(request);

  if (SeverityLevel.Success.equals(result.getResultCode()))
  {
      ArrayOfValidAddress arrValids = result.getValidAddresses();
      if (arrValids != null && arrValids.getValidAddress() != null &&
              arrValids.getValidAddress().length > 0)
      {
          ValidAddress validAddress = result.getValidAddresses().getValidAddress(0);
          System.out.println(validAddress.getLine1()); // "900 WINSLOW WAY E STE 130",
          System.out.println(validAddress.getLine4()); // "BAINBRIDGE IS WA 98110-2450"
          System.out.println(validAddress.getFipsCode()); // "5303500000"
          System.out.println(validAddress.getCounty()); // "KITSAP"
      }
  }
 

See Also:
ArrayOfValidAddress, Address, Serialized Form

Constructor Summary
ValidAddress()
          Initializes a new instance of the class.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Determines whether the specified Object is equal to the current Object.
 java.lang.String getAddressType()
           
 java.lang.String getCarrierRoute()
          The carrier route associated with the input address (USA).
 java.lang.String getCounty()
          County Name.
static org.apache.axis.encoding.Deserializer getDeserializer(java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType)
          Get Axis Custom Deserializer; this method is used internally by the adapter and not intended to be used by external implementation code.
 java.lang.String getFipsCode()
          Federal Information Processing Standards Code (USA).
 java.lang.String getLatitude()
          Address Type - The type of address that was coded (PO Box, Rural Route, and so on), using the input address.
 java.lang.String getLine4()
          Address line 4.
 java.lang.String getLongitude()
          Gets the longitude value for this ValidAddress.
 java.lang.String getPostNet()
          A 12-digit POSTNet barcode (USA).
static org.apache.axis.encoding.Serializer getSerializer(java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType)
          Get Axis Custom Serializer; this method is used internally by the adapter and not intended to be used by external implementation code.
static org.apache.axis.description.TypeDesc getTypeDesc()
          Return Axis type metadata object; this method is used internally by the adapter and not intended to be used by external implementation code.
 int hashCode()
          Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
 void setAddressType(java.lang.String addressType)
          Address Type - The type of address that was coded (PO Box, Rural Route, and so on), using the input address.
 void setCarrierRoute(java.lang.String carrierRoute)
          The carrier route associated with the input address (USA).
 void setCounty(java.lang.String county)
          County Name.
 void setFipsCode(java.lang.String fipsCode)
          Federal Information Processing Standards Code (USA).
 void setLatitude(java.lang.String latitude)
          Sets the latitude value for this ValidAddress.
 void setLine4(java.lang.String line4)
          Address line 4.
 void setLongitude(java.lang.String longitude)
          Sets the longitude value for this ValidAddress.
 void setPostNet(java.lang.String postNet)
          A 12-digit POSTNet barcode (USA).
 
Methods inherited from class com.avalara.avatax.services.address.Address
getAddressCode, getCity, getCountry, getLine1, getLine2, getLine3, getPostalCode, getRegion, getTaxRegionId, setAddressCode, setCity, setCountry, setLine1, setLine2, setLine3, setPostalCode, setRegion, setTaxRegionId
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidAddress

public ValidAddress()
Initializes a new instance of the class.

Method Detail

getLine4

public java.lang.String getLine4()
Address line 4.

Returns:
line4 - Address line 4

setLine4

public void setLine4(java.lang.String line4)
Address line 4.

Parameters:
line4 - - Address line 4

getCounty

public java.lang.String getCounty()
County Name.

Returns:
county - County Name

setCounty

public void setCounty(java.lang.String county)
County Name.

Parameters:
county - - County Name

getFipsCode

public java.lang.String getFipsCode()
Federal Information Processing Standards Code (USA).

This is a unique code representing each geographic combination of state, county, and city. The code is made up of the Federal Information Processing Code (FIPS) that uniquely identifies each state, county, and city in the U.S. See Federal Information Processing Standards (FIPS) Codes for more details.

Digits Description
1-2 State code
3-5County code
6-10City code

Returns:
fipsCode

setFipsCode

public void setFipsCode(java.lang.String fipsCode)
Federal Information Processing Standards Code (USA).

This is a unique code representing each geographic combination of state, county, and city. The code is made up of the Federal Information Processing Code (FIPS) that uniquely identifies each state, county, and city in the U.S. See Federal Information Processing Standards (FIPS) Codes for more details.

Digits Description
1-2 State code
3-5County code
6-10City code

Parameters:
fipsCode -

getCarrierRoute

public java.lang.String getCarrierRoute()
The carrier route associated with the input address (USA).

The CarrierRoute Property is a 4 character string set after a successful return from the VerifyAddress Method.

The first character of this property is always alphabetic, and the last three characters are numeric. For example, "R001" or "C027" would be typical carrier routes. The alphabetic letter indicates the type of delivery associated with this address.

Term Description
B PO Box
C City Delivery
G General Delivery
H Highway Contract
R Rural Route

Returns:
carrierRoute

setCarrierRoute

public void setCarrierRoute(java.lang.String carrierRoute)
The carrier route associated with the input address (USA).

The CarrierRoute Property is a 4 character string set after a successful return from the VerifyAddress Method.

The first character of this property is always alphabetic, and the last three characters are numeric. For example, "R001" or "C027" would be typical carrier routes. The alphabetic letter indicates the type of delivery associated with this address.

Term Description
B PO Box
C City Delivery
G General Delivery
H Highway Contract
R Rural Route

Parameters:
carrierRoute -

getPostNet

public java.lang.String getPostNet()
A 12-digit POSTNet barcode (USA).
Digits Description
1-5ZIP Code
6-9Plus4 code
10-11Delivery point
12Check digit

Returns:
postNet

setPostNet

public void setPostNet(java.lang.String postNet)
A 12-digit POSTNet barcode (USA).
Digits Description
1-5ZIP Code
6-9Plus4 code
10-11Delivery point
12Check digit

Parameters:
postNet -

getLatitude

public java.lang.String getLatitude()
Address Type - The type of address that was coded (PO Box, Rural Route, and so on), using the input address. /** Gets the latitude value for this ValidAddress.

Returns:
latitude

setLatitude

public void setLatitude(java.lang.String latitude)
Sets the latitude value for this ValidAddress.

Parameters:
latitude -

getLongitude

public java.lang.String getLongitude()
Gets the longitude value for this ValidAddress.

Returns:
longitude

setLongitude

public void setLongitude(java.lang.String longitude)
Sets the longitude value for this ValidAddress.

Parameters:
longitude -

getAddressType

public java.lang.String getAddressType()

setAddressType

public void setAddressType(java.lang.String addressType)
Address Type - The type of address that was coded (PO Box, Rural Route, and so on), using the input address.
Code Type
FFirm or company address
GGeneral Delivery address
HHigh-rise or business complexs
PPO Box address
RRural route address
SStreet or residential address
Code Type
FFirm or company address
GGeneral Delivery address
HHigh-rise or business complexs
PPO Box address
RRural route address
SStreet or residential address

NOTE: AddressTypeString is no longer available.

Parameters:
addressType -

equals

public boolean equals(java.lang.Object obj)
Determines whether the specified Object is equal to the current Object. Note: In current implementation all Java Strings members of the two objects must be exactly alike, including in case, for equal to return true.

Overrides:
equals in class Address
Parameters:
obj -
Returns:
true or false, indicating if the two objects are equal.

hashCode

public int hashCode()
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

Overrides:
hashCode in class Address
Returns:
hash code for this GetTaxRequest object
See Also:
Object.hashCode()

getTypeDesc

public static org.apache.axis.description.TypeDesc getTypeDesc()
Return Axis type metadata object; this method is used internally by the adapter and not intended to be used by external implementation code.

Returns:
Type Description

getSerializer

public static org.apache.axis.encoding.Serializer getSerializer(java.lang.String mechType,
                                                                java.lang.Class _javaType,
                                                                javax.xml.namespace.QName _xmlType)
Get Axis Custom Serializer; this method is used internally by the adapter and not intended to be used by external implementation code.

Parameters:
mechType -
_javaType -
_xmlType -
Returns:
Serializer

getDeserializer

public static org.apache.axis.encoding.Deserializer getDeserializer(java.lang.String mechType,
                                                                    java.lang.Class _javaType,
                                                                    javax.xml.namespace.QName _xmlType)
Get Axis Custom Deserializer; this method is used internally by the adapter and not intended to be used by external implementation code.

Parameters:
mechType -
_javaType -
_xmlType -
Returns:
Deserializer