Package com.liferay.commerce.test.util
Class CommerceTaxTestUtil
java.lang.Object
com.liferay.commerce.test.util.CommerceTaxTestUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.liferay.commerce.tax.model.CommerceTaxMethod
addCommerceByAddressTaxMethod
(long userId, long commerceChannelGroupId, boolean percentage) static long
addTaxCategoryId
(long groupId) static long
getDefaultCompanyTaxCategory
(long groupId) static BigDecimal
getPriceWithoutTaxAmount
(BigDecimal priceWithTaxAmount, BigDecimal taxRate, RoundingMode roundingMode) static BigDecimal
getPriceWithTaxAmount
(BigDecimal price, BigDecimal taxRate, RoundingMode roundingMode) static void
setCommerceMethodTaxRate
(long userId, long commerceChannelGroupId, long cpTaxCategoryId, long commerceTaxMethodId, double rate)
-
Constructor Details
-
CommerceTaxTestUtil
public CommerceTaxTestUtil()
-
-
Method Details
-
addCommerceByAddressTaxMethod
public static com.liferay.commerce.tax.model.CommerceTaxMethod addCommerceByAddressTaxMethod(long userId, long commerceChannelGroupId, boolean percentage) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
addTaxCategoryId
public static long addTaxCategoryId(long groupId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getDefaultCompanyTaxCategory
public static long getDefaultCompanyTaxCategory(long groupId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getPriceWithoutTaxAmount
public static BigDecimal getPriceWithoutTaxAmount(BigDecimal priceWithTaxAmount, BigDecimal taxRate, RoundingMode roundingMode) -
getPriceWithTaxAmount
public static BigDecimal getPriceWithTaxAmount(BigDecimal price, BigDecimal taxRate, RoundingMode roundingMode) -
setCommerceMethodTaxRate
public static void setCommerceMethodTaxRate(long userId, long commerceChannelGroupId, long cpTaxCategoryId, long commerceTaxMethodId, double rate) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-