public class TaxArea extends java.lang.Object implements XMLMarshallable
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="taxArea">
<xs:complexType>
<xs:attribute name="stateName" type="xs:string"/>
<xs:attribute name="countyName" type="xs:string"/>
<xs:attribute name="taxCode" type="xs:string"/>
<xs:attribute name="countryCode" type="xs:string"/>
<xs:attribute name="countryName" type="xs:string"/>
<xs:attribute name="cityName" type="xs:string"/>
<xs:attribute name="stateCode" type="xs:string"/>
</xs:complexType>
</xs:element>
| Constructor and Description |
|---|
TaxArea()
Builds an empty tax area.
|
TaxArea(java.lang.String countryCode,
java.lang.String zipCode)
Builds a tax area from a party address.
|
TaxArea(java.lang.String countryCode,
java.lang.String countryName,
java.lang.String stateCode,
java.lang.String stateName,
java.lang.String countyName,
java.lang.String cityName,
java.lang.String zipCode,
java.lang.String taxCode)
Builds a tax area.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
java.lang.String |
buildTaxCode()
Builds a tax code (with normal tax rate)
from the current tax area.
|
java.lang.String |
buildTaxCode(int rateType)
Builds a tax code (with a specified tax rate)
from the current tax area.
|
java.lang.String |
getCityName()
Returns the city name of the city
which contains this area.
|
java.lang.String |
getCountryCode()
Returns the country code of the country
which contains this area.
|
java.lang.String |
getCountryName()
Returns the name of the country which contains
this area.
|
java.lang.String |
getCountyName()
Returns the county name of the county
which contains this area.
|
java.lang.String |
getLabel()
Gets the label.
|
java.lang.String |
getStateCode()
Returns the code of the state which contains
this area.
|
java.lang.String |
getStateName()
Returns the state name of the state
which contains this area.
|
java.lang.String |
getTaxCode()
Gets the tax code.
|
java.lang.String |
getZipCode()
Gets the zip code.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
public TaxArea()
public TaxArea(java.lang.String countryCode,
java.lang.String countryName,
java.lang.String stateCode,
java.lang.String stateName,
java.lang.String countyName,
java.lang.String cityName,
java.lang.String zipCode,
java.lang.String taxCode)
countryCode - The ISO code of the countrycountryName - The name of the countrystateCode - The code of a state into a given countrystateName - The name of the statecountyName - The name of the targetted countycityName - The name of the cityzipCode - The zip codepublic TaxArea(java.lang.String countryCode,
java.lang.String zipCode)
countryCode - The ISO code of the countryzipCode - The zip codepublic java.lang.String getCountryCode()
public java.lang.String getCountryName()
public java.lang.String getStateCode()
public java.lang.String getStateName()
public java.lang.String getCountyName()
public java.lang.String getCityName()
public java.lang.String getZipCode()
public java.lang.String getTaxCode()
public java.lang.String buildTaxCode()
public java.lang.String buildTaxCode(int rateType)
rateType - The targeted rate type. The available values are:
Tax.VatRateCode.NORMAL_TAX_RATETax.VatRateCode.INTERMEDIARY_TAX_RATETax.VatRateCode.REDUCED_TAX_RATETax.VatRateCode.SUPER_REDUCED_TAX_RATETax.VatRateCode.ZERO_TAX_RATETax.VatRateCode.SPECIAL_TAX_RATETax.VatRateCode.NO_TAX_RATE_FLAGpublic java.lang.String getLabel()
public void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into