Package com.xero.models.accounting
Class Purchase
- java.lang.Object
-
- com.xero.models.accounting.Purchase
-
public class Purchase extends Object
Purchase
-
-
Constructor Summary
Constructors Constructor Description Purchase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PurchaseaccountCode(String accountCode)Default account code to be used for purchased/sale.PurchasecoGSAccountCode(String coGSAccountCode)Cost of goods sold account.booleanequals(Object o)StringgetAccountCode()Default account code to be used for purchased/sale.StringgetCoGSAccountCode()Cost of goods sold account.StringgetTaxType()The tax type from TaxRatesDoublegetUnitPrice()Unit Price of the item.inthashCode()voidsetAccountCode(String accountCode)Default account code to be used for purchased/sale.voidsetCoGSAccountCode(String coGSAccountCode)Cost of goods sold account.voidsetTaxType(String taxType)The tax type from TaxRatesvoidsetUnitPrice(Double unitPrice)Unit Price of the item.PurchasetaxType(String taxType)The tax type from TaxRatesStringtoString()PurchaseunitPrice(Double unitPrice)Unit Price of the item.
-
-
-
Method Detail
-
unitPrice
public Purchase unitPrice(Double unitPrice)
Unit Price of the item. By default UnitPrice is rounded to two decimal places. You can use 4 decimal places by adding the unitdp=4 querystring parameter to your request.- Parameters:
unitPrice- Double- Returns:
- Purchase
-
getUnitPrice
public Double getUnitPrice()
Unit Price of the item. By default UnitPrice is rounded to two decimal places. You can use 4 decimal places by adding the unitdp=4 querystring parameter to your request.- Returns:
- unitPrice
-
setUnitPrice
public void setUnitPrice(Double unitPrice)
Unit Price of the item. By default UnitPrice is rounded to two decimal places. You can use 4 decimal places by adding the unitdp=4 querystring parameter to your request.- Parameters:
unitPrice- Double
-
accountCode
public Purchase accountCode(String accountCode)
Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items- Parameters:
accountCode- String- Returns:
- Purchase
-
getAccountCode
public String getAccountCode()
Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items- Returns:
- accountCode
-
setAccountCode
public void setAccountCode(String accountCode)
Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items- Parameters:
accountCode- String
-
coGSAccountCode
public Purchase coGSAccountCode(String coGSAccountCode)
Cost of goods sold account. Only applicable to the purchase details of tracked items.- Parameters:
coGSAccountCode- String- Returns:
- Purchase
-
getCoGSAccountCode
public String getCoGSAccountCode()
Cost of goods sold account. Only applicable to the purchase details of tracked items.- Returns:
- coGSAccountCode
-
setCoGSAccountCode
public void setCoGSAccountCode(String coGSAccountCode)
Cost of goods sold account. Only applicable to the purchase details of tracked items.- Parameters:
coGSAccountCode- String
-
taxType
public Purchase taxType(String taxType)
The tax type from TaxRates- Parameters:
taxType- String- Returns:
- Purchase
-
getTaxType
public String getTaxType()
The tax type from TaxRates- Returns:
- taxType
-
setTaxType
public void setTaxType(String taxType)
The tax type from TaxRates- Parameters:
taxType- String
-
-