com.avalara.avatax.services.address
Class ValidateRequest

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

public class ValidateRequest
extends java.lang.Object
implements java.io.Serializable

Data to pass to AddressSvcSoap.validate(com.avalara.avatax.services.address.ValidateRequest).

 Example:
 [Java]
 EngineConfiguration config = new FileProvider("avatax4j.wsdd");
 AddressSvcLocator addressSvcLoc = new AddressSvcLocator(config);

 AddressSvcSoap svc = addressSvcLoc.getAddressSvcSoap(new URL("http://www.avalara.com/services/"));

 // Set the profile
 Profile profile = new Profile();
 profile.setClient("AddressSvcTest,4.0.0.0");
 svc.setProfile(profile);

 // Set security
 Security security = new Security();
 security.setAccount("account");
 security.setLicense("license number");
 svc.setSecurity(security);

 Address address = new Address();
 address.setLine1("900 Winslow Way");
 address.setCity("Bainbridge Island");
 address.setRegion("WA");
 address.setPostalCode("98110");

 ValidateRequest validateRequest = new ValidateRequest();
 validateRequest.setAddress(address);
 validateRequest.setTextCase(TextCase.Upper);

 ValidateResult result = svc.validate(validateRequest);
 ArrayOfValidAddress arrValids = result.getValidAddresses();
 int numAddresses = (arrValids == null ||
         arrValids.getValidAddress() == null ? 0 :
         arrValids.getValidAddress().length);
 System.out.println("Number of Addresses is " + numAddresses);
 

See Also:
Serialized Form

Constructor Summary
ValidateRequest()
          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.
 Address getAddress()
          The address to Validate.
 boolean getCoordinates()
          Gets the coordinates value for this ValidateRequest.
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.
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.
 TextCase getTextCase()
          The casing to apply to the validated address(es).
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.
 boolean isTaxability()
          Gets the taxability value for this ValidateRequest.
 void setAddress(Address address)
          The address to Validate.
 void setCoordinates(boolean coordinates)
          Sets the coordinates value for this ValidateRequest.
 void setTaxability(boolean taxability)
          Sets the taxability value for this ValidateRequest.
 void setTextCase(TextCase textCase)
          The casing to apply to the validated address(es).
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidateRequest

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

Method Detail

getAddress

public Address getAddress()
The address to Validate.
 Example:
 [Java]
 Address address = new Address();
 address.setLine1("900 Winslow Way");
 address.setCity("Bainbridge Island");
 address.setRegion("WA");
 address.setPostalCode("98110");

 ValidateRequest validateRequest = new ValidateRequest();
 validateRequest.setAddress(address);
 validateRequest.setTextCase(TextCase.Upper);

 ValidateResult result = svc.validate(validateRequest);
 

Returns:
address

setAddress

public void setAddress(Address address)
The address to Validate.
 Example:
 [Java]
 Address address = new Address();
 address.setLine1("900 Winslow Way");
 address.setCity("Bainbridge Island");
 address.setRegion("WA");
 address.setPostalCode("98110");

 ValidateRequest validateRequest = new ValidateRequest();
 validateRequest.setAddress(address);
 validateRequest.setTextCase(TextCase.Upper);

 ValidateResult result = svc.validate(validateRequest);
 

Parameters:
address -

getTextCase

public TextCase getTextCase()
The casing to apply to the validated address(es).
 Example:
 [Java]
 Address address = new Address();
 address.setLine1("900 Winslow Way");
 address.setCity("Bainbridge Island");
 address.setRegion("WA");
 address.setPostalCode("98110");

 ValidateRequest validateRequest = new ValidateRequest();
 validateRequest.setAddress(address);
 validateRequest.setTextCase(TextCase.Upper);

 ValidateResult result = svc.validate(validateRequest);
 

Returns:
textCase

setTextCase

public void setTextCase(TextCase textCase)
The casing to apply to the validated address(es).
 Example:
 [Java]
 Address address = new Address();
 address.setLine1("900 Winslow Way");
 address.setCity("Bainbridge Island");
 address.setRegion("WA");
 address.setPostalCode("98110");

 ValidateRequest validateRequest = new ValidateRequest();
 validateRequest.setAddress(address);
 validateRequest.setTextCase(TextCase.Upper);

 ValidateResult result = svc.validate(validateRequest);
 

Parameters:
textCase -

getCoordinates

public boolean getCoordinates()
Gets the coordinates value for this ValidateRequest.

Returns:
coordinates

setCoordinates

public void setCoordinates(boolean coordinates)
Sets the coordinates value for this ValidateRequest.

True will return the @see ValidAddresses#Latitude and @see ValidAddresses#Longitude values for the @see ValidAddresses Default value is false

Parameters:
coordinates -

isTaxability

public boolean isTaxability()
Gets the taxability value for this ValidateRequest.

Returns:
taxability

setTaxability

public void setTaxability(boolean taxability)
Sets the taxability value for this ValidateRequest.

Parameters:
taxability -

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 java.lang.Object
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 java.lang.Object
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