Package com.broadleafcommerce.tax.domain
Class TaxRequest
- java.lang.Object
-
- com.broadleafcommerce.tax.domain.TaxRequest
-
- All Implemented Interfaces:
Serializable
public class TaxRequest extends Object implements Serializable
A grouping of items and address(es) to be used to determine taxes as a request DTO sent toTaxProvider. This represents a fulfillment group.- Author:
- Chad Harchar (charchar)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TaxRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)Map<String,Object>getAttributes()Additional attributes for this tax group.javax.money.CurrencyUnitgetCurrency()StringgetCustomer()The customer that these taxes will apply to.TaxAddressgetFromAddress()The address that the items will be shipped from.StringgetFulfillmentGroupReferenceNumber()The fulfillment group reference number.List<TaxItem>getTaxItems()The list of items to be taxed.TaxAddressgetToAddress()The address that the items will be shipped to.inthashCode()booleanisTemporaryCalculation()For tax services that support it, records the transaction in the tax service for reporting purposes.voidsetAttributes(Map<String,Object> attributes)Additional attributes for this tax group.voidsetCurrency(javax.money.CurrencyUnit currency)voidsetCustomer(String customer)The customer that these taxes will apply to.voidsetFromAddress(TaxAddress fromAddress)The address that the items will be shipped from.voidsetFulfillmentGroupReferenceNumber(String fulfillmentGroupReferenceNumber)The fulfillment group reference number.voidsetTaxItems(List<TaxItem> taxItems)The list of items to be taxed.voidsetTemporaryCalculation(boolean temporaryCalculation)For tax services that support it, records the transaction in the tax service for reporting purposes.voidsetToAddress(TaxAddress toAddress)The address that the items will be shipped to.StringtoString()
-
-
-
Method Detail
-
getCurrency
public javax.money.CurrencyUnit getCurrency()
-
getTaxItems
public List<TaxItem> getTaxItems()
The list of items to be taxed.- Returns:
- The list of items to be taxed.
-
getFromAddress
public TaxAddress getFromAddress()
The address that the items will be shipped from.- Returns:
- The address that the items will be shipped from.
-
getToAddress
public TaxAddress getToAddress()
The address that the items will be shipped to.- Returns:
- The address that the items will be shipped to.
-
getCustomer
public String getCustomer()
The customer that these taxes will apply to.- Returns:
- The customer that these taxes will apply to.
-
getFulfillmentGroupReferenceNumber
public String getFulfillmentGroupReferenceNumber()
The fulfillment group reference number.- Returns:
- The fulfillment group reference number
-
isTemporaryCalculation
public boolean isTemporaryCalculation()
For tax services that support it, records the transaction in the tax service for reporting purposes. (May require a separate commit operation with providers like Avalara)
-
getAttributes
public Map<String,Object> getAttributes()
Additional attributes for this tax group.- Returns:
- Additional attributes for this tax group.
-
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency)
-
setTaxItems
public void setTaxItems(List<TaxItem> taxItems)
The list of items to be taxed.- Parameters:
taxItems- The list of items to be taxed.
-
setFromAddress
public void setFromAddress(TaxAddress fromAddress)
The address that the items will be shipped from.- Parameters:
fromAddress- The address that the items will be shipped from.
-
setToAddress
public void setToAddress(TaxAddress toAddress)
The address that the items will be shipped to.- Parameters:
toAddress- The address that the items will be shipped to.
-
setCustomer
public void setCustomer(String customer)
The customer that these taxes will apply to.- Parameters:
customer- The customer that these taxes will apply to.
-
setFulfillmentGroupReferenceNumber
public void setFulfillmentGroupReferenceNumber(String fulfillmentGroupReferenceNumber)
The fulfillment group reference number.- Parameters:
fulfillmentGroupReferenceNumber- The fulfillment group reference number
-
setTemporaryCalculation
public void setTemporaryCalculation(boolean temporaryCalculation)
For tax services that support it, records the transaction in the tax service for reporting purposes. (May require a separate commit operation with providers like Avalara)
-
setAttributes
public void setAttributes(Map<String,Object> attributes)
Additional attributes for this tax group.- Parameters:
attributes- Additional attributes for this tax group.
-
canEqual
protected boolean canEqual(Object other)
-
-