|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.avalara.avatax.services.address.Address
public class Address
Contains address data; Can be passed to AddressSvcSoap.validate(com.avalara.avatax.services.address.ValidateRequest)
using ValidateRequest
; Also part of the GetTaxRequest
result returned from the TaxSvcSoap.getTax(com.avalara.avatax.services.tax.GetTaxRequest)
tax calculation service.
Example:
[Java] EngineConfiguration config = new FileProvider("avatax4j.wsdd"); AddressSvc AddressSvc = new AddressSvcLocator(config); AddressSvcSoap port = AddressSvc.getAddressSvcSoap(new URL("http://www.avalara.com/services/")); // Set the profile Profile profile = new Profile(); profile.setClient("AddressSvcTest,4.0.0.0"); port.setProfile(profile); // Set security Security security = new Security(); security.setAccount("account"); security.setLicense("license number"); port.setSecurity(security); 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 = port.validate(request); Address[] addresses = result.getValidAddresses().getValidAddress(); System.out.println("Number of addresses returned is " + addresses == null ? "0" : Integer.toString(addresses.length));
Constructor Summary | |
---|---|
Address()
Initializes a new instance of the class. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Overrides the default implementation of Object.equals(java.lang.Object) . |
java.lang.String |
getAddressCode()
Programmatically determined value used internally by the adapter. |
java.lang.String |
getCity()
City name. |
java.lang.String |
getCountry()
Country name. |
static org.apache.axis.encoding.Deserializer |
getDeserializer(java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType)
Get Custom Deserializer for this object for use with Axis. |
java.lang.String |
getLine1()
Address line 1 value. |
java.lang.String |
getLine2()
Address line 2. |
java.lang.String |
getLine3()
Address line 3. |
java.lang.String |
getPostalCode()
Postal or ZIP code. |
java.lang.String |
getRegion()
State or province name or abbreviation. |
static org.apache.axis.encoding.Serializer |
getSerializer(java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType)
Get Custom Serializer for this object for use with Axis. |
int |
getTaxRegionId()
Gets the taxRegionId value for this BaseAddress. |
static org.apache.axis.description.TypeDesc |
getTypeDesc()
Return TypeDesc metadata object for use with Axis. |
int |
hashCode()
Gets the default hash code for the object (as returned by Object.hashCode() ) |
void |
setAddressCode(java.lang.String addressCode)
Programmatically determined value used internally by the adapter. |
void |
setCity(java.lang.String city)
City name. |
void |
setCountry(java.lang.String country)
Country name. |
void |
setLine1(java.lang.String line1)
Address line 1. |
void |
setLine2(java.lang.String line2)
Address line 2. |
void |
setLine3(java.lang.String line3)
Address line 3. |
void |
setPostalCode(java.lang.String postalCode)
Postal or ZIP code. |
void |
setRegion(java.lang.String region)
State or province name or abbreviation. |
void |
setTaxRegionId(int taxRegionId)
Sets the taxRegionId value for this BaseAddress. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Address()
Method Detail |
---|
public java.lang.String getAddressCode()
Address
object.
public void setAddressCode(java.lang.String addressCode)
Address
object.
addressCode
- public java.lang.String getLine1()
public void setLine1(java.lang.String line1)
line1
- address line 1public java.lang.String getLine2()
public void setLine2(java.lang.String line2)
line2
- Address line 2.public java.lang.String getLine3()
public void setLine3(java.lang.String line3)
line3
- Address line 3public java.lang.String getCity()
public void setCity(java.lang.String city)
city
- city namepublic java.lang.String getRegion()
public void setRegion(java.lang.String region)
region
- - state or province name or abbreviationpublic java.lang.String getPostalCode()
public void setPostalCode(java.lang.String postalCode)
postalCode
- - Postal or ZIP codepublic java.lang.String getCountry()
public void setCountry(java.lang.String country)
country
- - country namepublic int getTaxRegionId()
public void setTaxRegionId(int taxRegionId)
TaxRegionId provides the ability to override the tax region assignment for an address.
taxRegionId
- public boolean equals(java.lang.Object obj)
Object.equals(java.lang.Object)
.
Equality is determined by first comparing referential equality (they are the same object). Returns true if the two objects are referentially equal. If they are not, then it tests that the object passed into the Equals method is an Address object. Returns false if the compare object is not of type Address. Otherwise, it will compare the two objects on a field by field basis, such that Line1 is compared to Line1 of the compare object, Line2 to Line2 of the compare object, and so on. All fields must be identical (case-insensitive) in order for the two objects to be considered equal.
Example: The following will return true:
[Java] Address address1 = new Address(); address1.Line1 = "900 Winslow Way"; address1.Region = "WA"; address1.PostalCode = "98110"; Address address2 = address1; bool isEqual = address1.Equals(address2);
The following will also return true:
[Java] Address address1 = new Address(); address1.Line1 = "900 Winslow Way"; address1.Region = "WA"; address1.PostalCode = "98110"; Address address2 = new Address(); address2.Line1 = "900 WINSLOW WAY"; address2.Region = "wa"; address2.PostalCode = "98110"; bool isEqual = address1.Equals(address2);
equals
in class java.lang.Object
obj
- The object to compare.
public int hashCode()
Object.hashCode()
)
hashCode
in class java.lang.Object
public static org.apache.axis.description.TypeDesc getTypeDesc()
TypeDesc
public static org.apache.axis.encoding.Serializer getSerializer(java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType)
Serializer
public static org.apache.axis.encoding.Deserializer getDeserializer(java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType)
Deserializer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |