|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.avalara.avatax.services.tax.Line
public class Line
A single line within a document containing data used for calculating tax.
GetTaxRequest
,
ArrayOfLine
,
Serialized FormConstructor Summary | |
---|---|
Line()
Creates a new line object. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.math.BigDecimal |
getAmount()
The total amount for this line item ( getQty() * UnitPrice). |
java.lang.String |
getCustomerUsageType()
Allows to fetch the customer or usage type at the line level. |
java.lang.String |
getDescription()
Gets the description which defines the description for the product or item. |
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 |
getDestinationCode()
Used internally by the adapter to reference the getDestinationAddress() . |
java.lang.String |
getExemptionNo()
Exemption number for this line. |
java.lang.String |
getItemCode()
Item Code (SKU) |
java.lang.String |
getNo()
Line Number. |
java.lang.String |
getOriginCode()
Used internally by the adapter to reference the getOriginAddress() . |
java.math.BigDecimal |
getQty()
The quantity represented by this line. |
java.lang.String |
getRef1()
Client specific reference field. |
java.lang.String |
getRef2()
Client specific reference field. |
java.lang.String |
getRevAcct()
Revenue Account. |
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. |
java.lang.String |
getTaxCode()
System or Custom Tax Code. |
TaxOverride |
getTaxOverride()
Gets the taxOverride value for this Line. |
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 |
isDiscounted()
True if the document discount should be applied to this line. |
boolean |
isTaxIncluded()
True if tax is included in the line. |
void |
setAmount(java.math.BigDecimal amount)
The total amount for this line item ( getQty() * UnitPrice). |
void |
setCustomerUsageType(java.lang.String customerUsageType)
Allows specifying the customer or usage type at the line level. |
void |
setDescription(java.lang.String description)
Sets the description which defines the description for the product or item. |
void |
setDestinationCode(java.lang.String destinationCode)
Used internally by the adapter to reference the getDestinationAddress() . |
void |
setDiscounted(boolean discounted)
True if the document discount should be applied to this line. |
void |
setExemptionNo(java.lang.String exemptionNo)
Exemption number for this line. |
void |
setItemCode(java.lang.String itemCode)
Item Code (SKU) |
void |
setNo(java.lang.String no)
Line Number. |
void |
setOriginCode(java.lang.String originCode)
Used internally by the adapter to reference the getOriginAddress() . |
void |
setQty(java.math.BigDecimal qty)
The quantity represented by this line. |
void |
setRef1(java.lang.String ref1)
Client specific reference field. |
void |
setRef2(java.lang.String ref2)
Client specific reference field. |
void |
setRevAcct(java.lang.String revAcct)
Revenue Account. |
void |
setTaxCode(java.lang.String taxCode)
System or Custom Tax Code. |
void |
setTaxIncluded(boolean taxIncluded)
True if tax is included in the line. |
void |
setTaxOverride(TaxOverride taxOverride)
Sets the taxOverride value for this Line. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Line()
Example: [Java] Line line = new Line();
Method Detail |
---|
public java.lang.String getNo()
Lines are added to a GetTaxRequest
object when preparing a document for tax calculation.
The line No unqiuely identifies a particular line item for the client.
[Java] GetTaxRequest request = new GetTaxRequest(); Line line = new Line(request); line.setNo("01"); line = new Line(request); line.setNo("02"); System.out.println("No Lines: " + request.getLines().getLine().length); // 2 Lines System.out.println("1st Line's Number: " + request.getLines().getLine(0).getNo()); // "01" System.out.println("1st Line's Number: " + request.getLines().getLine(1).getNo()); // "02"
public void setNo(java.lang.String no)
Lines are added to a GetTaxRequest
object when preparing a document for tax calculation.
The line No unqiuely identifies a particular line item for the client.
[Java] GetTaxRequest request = new GetTaxRequest(); Line line = new Line(request); line.setNo("01"); line = new Line(request); line.setNo("02"); System.out.println("No Lines: " + request.getLines().getLine().length); // 2 Lines System.out.println("1st Line's Number: " + request.getLines().getLine(0).getNo()); // "01" System.out.println("1st Line's Number: " + request.getLines().getLine(1).getNo()); // "02"
no
- public java.lang.String getOriginCode()
getOriginAddress()
.
Same as the OriginAddress's BaseAddress.getAddressCode()
.
originCode
public void setOriginCode(java.lang.String originCode)
getOriginAddress()
.
Same as the OriginAddress's BaseAddress.getAddressCode()
.
Made private to avoid data corruption.
originCode
- public java.lang.String getDestinationCode()
getDestinationAddress()
.
Same as the DestinationAddress's BaseAddress.getAddressCode()
.
public void setDestinationCode(java.lang.String destinationCode)
getDestinationAddress()
.
Same as the DestinationAddress's BaseAddress.getAddressCode()
.
Made private to avoid data corruption.
destinationCode
- public java.lang.String getItemCode()
public void setItemCode(java.lang.String itemCode)
itemCode
- public java.lang.String getTaxCode()
This is used only by sellers who are managing their own tax code mapping.
public void setTaxCode(java.lang.String taxCode)
This is used only by sellers who are managing their own tax code mapping.
taxCode
- public java.math.BigDecimal getQty()
Qty is not used in conjunction with getAmount()
when calculating tax. Amount should already
be a product of Qty * UnitPrice. For example, if a line represents 2 items, each sold at $10 then,
[Java] BigDecimal qty = line.getQty(); BigDecimal amount = line.getAmount();
setAmount(java.math.BigDecimal)
public void setQty(java.math.BigDecimal qty)
Qty is not used in conjunction with getAmount()
when calculating tax. Amount should already
be a product of Qty * UnitPrice. For example, if a line represents 2 items, each sold at $10 then,
[Java] line.setQty(new BigDecimal("2")) line.setAmount(new BigDecimal("20"))
qty
- getAmount()
public java.math.BigDecimal getAmount()
getQty()
* UnitPrice).
public void setAmount(java.math.BigDecimal amount)
getQty()
* UnitPrice).
amount
- public boolean isDiscounted()
public void setDiscounted(boolean discounted)
discounted
- public java.lang.String getRevAcct()
public void setRevAcct(java.lang.String revAcct)
revAcct
- public java.lang.String getRef1()
public void setRef1(java.lang.String ref1)
ref1
- public java.lang.String getRef2()
public void setRef2(java.lang.String ref2)
ref2
- public java.lang.String getExemptionNo()
public void setExemptionNo(java.lang.String exemptionNo)
exemptionNo
- public java.lang.String getCustomerUsageType()
This overrides CustomerUsageType GetTaxRequest.getCustomerUsageType()
at the GetTaxRequest level.
public void setCustomerUsageType(java.lang.String customerUsageType)
This overrides CustomerUsageType GetTaxRequest.getCustomerUsageType()
at the GetTaxRequest level.
customerUsageType
- public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- public TaxOverride getTaxOverride()
public void setTaxOverride(TaxOverride taxOverride)
taxOverride
- public boolean isTaxIncluded()
public void setTaxIncluded(boolean taxIncluded)
taxIncluded
- public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public static org.apache.axis.description.TypeDesc getTypeDesc()
public static org.apache.axis.encoding.Serializer getSerializer(java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType)
mechType
- _javaType
- _xmlType
-
public static org.apache.axis.encoding.Deserializer getDeserializer(java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType)
mechType
- _javaType
- _xmlType
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |