Package com.liferay.commerce.test.util
Class CommerceTestUtil
java.lang.Object
com.liferay.commerce.test.util.CommerceTestUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.liferay.account.model.AccountEntryaddAccount(long groupId, long userId) static com.liferay.commerce.model.CommerceOrderaddB2BCommerceOrder(long groupId, long userId, long commerceAccountId, long commerceCurrencyId) static com.liferay.commerce.model.CommerceOrderaddB2CCommerceOrder(long userId, long groupId, long commerceCurrencyId) static com.liferay.commerce.model.CommerceOrderaddB2CCommerceOrder(long userId, long groupId, com.liferay.commerce.currency.model.CommerceCurrency commerceCurrency) static com.liferay.commerce.model.CommerceOrderaddCheckoutDetailsToCommerceOrder(com.liferay.commerce.model.CommerceOrder commerceOrder, long userId, boolean paymentSubscription) static com.liferay.commerce.model.CommerceOrderaddCheckoutDetailsToCommerceOrder(com.liferay.commerce.model.CommerceOrder commerceOrder, long userId, boolean paymentSubscription, boolean deliverySubscription) static com.liferay.commerce.model.CommerceOrderaddCheckoutDetailsToCommerceOrder(com.liferay.commerce.model.CommerceOrder commerceOrder, long userId, boolean paymentSubscription, boolean deliverySubscription, double cpInstancePrice) static com.liferay.commerce.product.model.CommerceCatalogaddCommerceCatalog(long companyId, long groupId, long userId, String commerceCurrencyCode) static com.liferay.commerce.product.model.CommerceChanneladdCommerceChannel(long groupId, String commerceCurrencyCode) static com.liferay.commerce.product.model.CommerceChanneladdCommerceChannel(String commerceCurrencyCode) static com.liferay.commerce.product.model.CommerceChannelReladdCommerceChannelRel(long groupId, long commerceChannelId, long warehouseId) static com.liferay.commerce.model.CommerceOrderItemaddCommerceOrderItem(long commerceOrderId, long cpInstanceId, BigDecimal quantity) static com.liferay.commerce.model.CommerceOrderItemaddCommerceOrderItem(long commerceOrderId, long cpInstanceId, BigDecimal quantity, com.liferay.commerce.context.CommerceContext commerceContext) static com.liferay.commerce.model.CommerceOrderItemaddCommerceOrderItem(long commerceOrderId, long cpInstanceId, BigDecimal quantity, String unitOfMeasureKey) static com.liferay.commerce.model.CommerceOrderItemaddCommerceOrderItem(long commerceOrderId, long cpInstanceId, BigDecimal quantity, String unitOfMeasureKey, com.liferay.commerce.context.CommerceContext commerceContext) static com.liferay.commerce.model.CommerceOrderaddCommerceOrderShippingDetails(com.liferay.commerce.model.CommerceOrder commerceOrder, BigDecimal value) static com.liferay.commerce.payment.model.CommercePaymentMethodGroupReladdCommercePaymentMethodGroupRel(long userId, long groupId) static com.liferay.commerce.shipping.engine.fixed.model.CommerceShippingFixedOptionaddCommerceShippingFixedOption(com.liferay.commerce.model.CommerceShippingMethod commerceShippingMethod) static com.liferay.commerce.shipping.engine.fixed.model.CommerceShippingFixedOptionaddCommerceShippingFixedOption(com.liferay.commerce.model.CommerceShippingMethod commerceShippingMethod, BigDecimal value) static com.liferay.commerce.model.CommerceShippingMethodaddCommerceShippingMethod(long userId, long groupId) static com.liferay.commerce.model.CommerceShippingMethodaddCommerceShippingMethod(long userId, long groupId, Map<Locale, String> shippingMethodName, Map<Locale, String> shippingMethodDescription, boolean active, String engineKey) static com.liferay.commerce.tax.engine.fixed.model.CommerceTaxFixedRateaddCommerceTaxFixedRate(long userId, long groupId, long cpTaxCategoryId, boolean percentage, boolean active) static com.liferay.commerce.model.CommerceShippingMethodaddFixedRateCommerceShippingMethod(long userId, long groupId, BigDecimal value) static com.liferay.commerce.model.CommerceAddressaddUserCommerceAddress(long groupId, long userId) static com.liferay.commerce.product.model.CommerceChannelReladdWarehouseCommerceChannelRel(long warehouseId, long commerceChannelId) static com.liferay.commerce.model.CommerceOrdercreateCommerceOrderForShipping(long userId, long groupId, long commerceCurrencyId, long cpInstanceId, BigDecimal amount, BigDecimal quantity, int commerceOrderItemQuantity) static com.liferay.commerce.model.CPDefinitionInventoryupdateBackOrderCPDefinitionInventory(com.liferay.commerce.product.model.CPDefinition cpDefinition)
-
Constructor Details
-
CommerceTestUtil
public CommerceTestUtil()
-
-
Method Details
-
addAccount
public static com.liferay.account.model.AccountEntry addAccount(long groupId, long userId) throws Exception - Throws:
Exception
-
addB2BCommerceOrder
public static com.liferay.commerce.model.CommerceOrder addB2BCommerceOrder(long groupId, long userId, long commerceAccountId, long commerceCurrencyId) throws Exception - Throws:
Exception
-
addB2CCommerceOrder
public static com.liferay.commerce.model.CommerceOrder addB2CCommerceOrder(long userId, long groupId, com.liferay.commerce.currency.model.CommerceCurrency commerceCurrency) throws Exception - Throws:
Exception
-
addB2CCommerceOrder
public static com.liferay.commerce.model.CommerceOrder addB2CCommerceOrder(long userId, long groupId, long commerceCurrencyId) throws Exception - Throws:
Exception
-
addCheckoutDetailsToCommerceOrder
public static com.liferay.commerce.model.CommerceOrder addCheckoutDetailsToCommerceOrder(com.liferay.commerce.model.CommerceOrder commerceOrder, long userId, boolean paymentSubscription) throws Exception - Throws:
Exception
-
addCheckoutDetailsToCommerceOrder
public static com.liferay.commerce.model.CommerceOrder addCheckoutDetailsToCommerceOrder(com.liferay.commerce.model.CommerceOrder commerceOrder, long userId, boolean paymentSubscription, boolean deliverySubscription) throws Exception - Throws:
Exception
-
addCheckoutDetailsToCommerceOrder
public static com.liferay.commerce.model.CommerceOrder addCheckoutDetailsToCommerceOrder(com.liferay.commerce.model.CommerceOrder commerceOrder, long userId, boolean paymentSubscription, boolean deliverySubscription, double cpInstancePrice) throws Exception - Throws:
Exception
-
addCommerceCatalog
public static com.liferay.commerce.product.model.CommerceCatalog addCommerceCatalog(long companyId, long groupId, long userId, String commerceCurrencyCode) throws Exception - Throws:
Exception
-
addCommerceChannel
public static com.liferay.commerce.product.model.CommerceChannel addCommerceChannel(long groupId, String commerceCurrencyCode) throws Exception - Throws:
Exception
-
addCommerceChannel
public static com.liferay.commerce.product.model.CommerceChannel addCommerceChannel(String commerceCurrencyCode) throws Exception - Throws:
Exception
-
addCommerceChannelRel
public static com.liferay.commerce.product.model.CommerceChannelRel addCommerceChannelRel(long groupId, long commerceChannelId, long warehouseId) throws Exception - Throws:
Exception
-
addCommerceOrderItem
public static com.liferay.commerce.model.CommerceOrderItem addCommerceOrderItem(long commerceOrderId, long cpInstanceId, BigDecimal quantity) throws Exception - Throws:
Exception
-
addCommerceOrderItem
public static com.liferay.commerce.model.CommerceOrderItem addCommerceOrderItem(long commerceOrderId, long cpInstanceId, BigDecimal quantity, com.liferay.commerce.context.CommerceContext commerceContext) throws Exception - Throws:
Exception
-
addCommerceOrderItem
public static com.liferay.commerce.model.CommerceOrderItem addCommerceOrderItem(long commerceOrderId, long cpInstanceId, BigDecimal quantity, String unitOfMeasureKey) throws Exception - Throws:
Exception
-
addCommerceOrderItem
public static com.liferay.commerce.model.CommerceOrderItem addCommerceOrderItem(long commerceOrderId, long cpInstanceId, BigDecimal quantity, String unitOfMeasureKey, com.liferay.commerce.context.CommerceContext commerceContext) throws Exception - Throws:
Exception
-
addCommerceOrderShippingDetails
public static com.liferay.commerce.model.CommerceOrder addCommerceOrderShippingDetails(com.liferay.commerce.model.CommerceOrder commerceOrder, BigDecimal value) throws Exception - Throws:
Exception
-
addCommercePaymentMethodGroupRel
public static com.liferay.commerce.payment.model.CommercePaymentMethodGroupRel addCommercePaymentMethodGroupRel(long userId, long groupId) throws Exception - Throws:
Exception
-
addCommerceShippingFixedOption
public static com.liferay.commerce.shipping.engine.fixed.model.CommerceShippingFixedOption addCommerceShippingFixedOption(com.liferay.commerce.model.CommerceShippingMethod commerceShippingMethod) throws Exception - Throws:
Exception
-
addCommerceShippingFixedOption
public static com.liferay.commerce.shipping.engine.fixed.model.CommerceShippingFixedOption addCommerceShippingFixedOption(com.liferay.commerce.model.CommerceShippingMethod commerceShippingMethod, BigDecimal value) throws Exception - Throws:
Exception
-
addCommerceShippingMethod
public static com.liferay.commerce.model.CommerceShippingMethod addCommerceShippingMethod(long userId, long groupId) throws Exception - Throws:
Exception
-
addCommerceShippingMethod
public static com.liferay.commerce.model.CommerceShippingMethod addCommerceShippingMethod(long userId, long groupId, Map<Locale, String> shippingMethodName, Map<Locale, throws ExceptionString> shippingMethodDescription, boolean active, String engineKey) - Throws:
Exception
-
addCommerceTaxFixedRate
public static com.liferay.commerce.tax.engine.fixed.model.CommerceTaxFixedRate addCommerceTaxFixedRate(long userId, long groupId, long cpTaxCategoryId, boolean percentage, boolean active) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
addFixedRateCommerceShippingMethod
public static com.liferay.commerce.model.CommerceShippingMethod addFixedRateCommerceShippingMethod(long userId, long groupId, BigDecimal value) throws Exception - Throws:
Exception
-
addUserCommerceAddress
public static com.liferay.commerce.model.CommerceAddress addUserCommerceAddress(long groupId, long userId) throws Exception - Throws:
Exception
-
addWarehouseCommerceChannelRel
public static com.liferay.commerce.product.model.CommerceChannelRel addWarehouseCommerceChannelRel(long warehouseId, long commerceChannelId) throws Exception - Throws:
Exception
-
createCommerceOrderForShipping
public static com.liferay.commerce.model.CommerceOrder createCommerceOrderForShipping(long userId, long groupId, long commerceCurrencyId, long cpInstanceId, BigDecimal amount, BigDecimal quantity, int commerceOrderItemQuantity) throws Exception - Throws:
Exception
-
updateBackOrderCPDefinitionInventory
public static com.liferay.commerce.model.CPDefinitionInventory updateBackOrderCPDefinitionInventory(com.liferay.commerce.product.model.CPDefinition cpDefinition) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-