Class CommerceTaxTestUtil

java.lang.Object
com.liferay.commerce.test.util.CommerceTaxTestUtil

public class CommerceTaxTestUtil extends Object
  • 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