Class TmaPaymentMethodResourceStrategy
java.lang.Object
de.hybris.platform.b2ctelcoservices.order.resourcestrategies.impl.TmaPaymentMethodResourceStrategy
- All Implemented Interfaces:
TmaAbstractOrderResourceStrategy
public class TmaPaymentMethodResourceStrategy
extends Object
implements TmaAbstractOrderResourceStrategy
Resource strategy implementation. Validates and updates payment method.
- Since:
- 1911
-
Constructor Summary
ConstructorsConstructorDescriptionTmaPaymentMethodResourceStrategy(de.hybris.platform.commerceservices.customer.CustomerAccountService customerAccountService, de.hybris.platform.servicelayer.model.ModelService modelService) TmaPaymentMethodResourceStrategy(de.hybris.platform.commerceservices.customer.CustomerAccountService customerAccountService, de.hybris.platform.servicelayer.model.ModelService modelService, TmaDirectDebitPaymentInfoService directDebitPaymentInfoService) -
Method Summary
Modifier and TypeMethodDescriptionprotected de.hybris.platform.commerceservices.customer.CustomerAccountServiceprotected TmaDirectDebitPaymentInfoServiceprotected de.hybris.platform.servicelayer.model.ModelServicevoidupdateResource(CommerceCartParameter commerceCartParameter, CommerceCartModification commerceCartModification) Adds a payment method to the cart if one is provided or removes the payment method from the cart if none is provided.validateResource(CommerceCartParameter parameter) Validates that the resources from theCommerceCartParameterare valid to be stored on cart.
-
Constructor Details
-
TmaPaymentMethodResourceStrategy
public TmaPaymentMethodResourceStrategy(de.hybris.platform.commerceservices.customer.CustomerAccountService customerAccountService, de.hybris.platform.servicelayer.model.ModelService modelService) -
TmaPaymentMethodResourceStrategy
public TmaPaymentMethodResourceStrategy(de.hybris.platform.commerceservices.customer.CustomerAccountService customerAccountService, de.hybris.platform.servicelayer.model.ModelService modelService, TmaDirectDebitPaymentInfoService directDebitPaymentInfoService)
-
-
Method Details
-
validateResource
Description copied from interface:TmaAbstractOrderResourceStrategyValidates that the resources from theCommerceCartParameterare valid to be stored on cart.- Specified by:
validateResourcein interfaceTmaAbstractOrderResourceStrategy- Parameters:
parameter- the commerce cart parameter storing information to be stored on cart- Returns:
TmaCartValidationResult
-
updateResource
public void updateResource(CommerceCartParameter commerceCartParameter, CommerceCartModification commerceCartModification) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException Adds a payment method to the cart if one is provided or removes the payment method from the cart if none is provided.- Specified by:
updateResourcein interfaceTmaAbstractOrderResourceStrategy- Parameters:
commerceCartParameter- contains attributes used for cart updatescommerceCartModification- contains the updates made on the cart- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException- in case of any error occurs during payment method update
-
getCustomerAccountService
protected de.hybris.platform.commerceservices.customer.CustomerAccountService getCustomerAccountService() -
getModelService
protected de.hybris.platform.servicelayer.model.ModelService getModelService() -
getDirectDebitPaymentInfoService
-