Class OrderChangePaymentInfoFieldValidator
java.lang.Object
de.hybris.platform.ndc182shoppingwebservices.validators.impl.AbstractOrderValidator
de.hybris.platform.ndc182shoppingwebservices.validators.impl.OrderChangePaymentInfoFieldValidator
- All Implemented Interfaces:
NDCFieldValidator<IATAOrderChangeRQ,List<ErrorType>>
public class OrderChangePaymentInfoFieldValidator
extends AbstractOrderValidator
implements NDCFieldValidator<IATAOrderChangeRQ,List<ErrorType>>
The Ndc order change payment info field validator. Checks if the list of paymentInfos are present. If yes, checks if the
paymentInfos contain the amount, the payment method and the payment type.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected de.hybris.platform.servicelayer.time.TimeServiceGets time service.voidsetTimeService(de.hybris.platform.servicelayer.time.TimeService timeService) Sets time service.voidvalidate(IATAOrderChangeRQ request, List<ErrorType> errors) Validate.protected voidvalidateCurrency(List<PaymentInfoType> paymentInfo, List<ErrorType> errors) Validates the currency inside the payment infos.protected voidvalidateExpirationDate(String expirationDate, List<ErrorType> errors) Validates the expiration date.protected voidvalidateOfferAssociations(List<OfferAssociationType> offerAssociation, List<ErrorType> errors) Validates offer associations.protected voidvalidatePaymentMethod(PaymentMethodType paymentMethod, List<ErrorType> errors) Validates the payment method.Methods inherited from class de.hybris.platform.ndc182shoppingwebservices.validators.impl.AbstractOrderValidator
addError
-
Constructor Details
-
OrderChangePaymentInfoFieldValidator
public OrderChangePaymentInfoFieldValidator()
-
-
Method Details
-
validate
Description copied from interface:NDCFieldValidatorValidate.- Specified by:
validatein interfaceNDCFieldValidator<IATAOrderChangeRQ,List<ErrorType>> - Parameters:
request- the requesterrors- the errors
-
validateCurrency
Validates the currency inside the payment infos. If the currency is present, it must be the same for all the payments.- Parameters:
paymentInfo- the payment infoerrors- the errors
-
validateOfferAssociations
protected void validateOfferAssociations(List<OfferAssociationType> offerAssociation, List<ErrorType> errors) Validates offer associations. A paymentInfo must be associated to offerIDs only, not to offerItems.- Parameters:
offerAssociation- the offer associationerrors- the errors
-
validatePaymentMethod
Validates the payment method. Checks if cardHolder, number and expiration date of the credit card are present.- Parameters:
paymentMethod- the payment methoderrors-
-
validateExpirationDate
Validates the expiration date. It must be a future date.- Parameters:
expirationDate- the expiration dateerrors- the errors
-
getTimeService
protected de.hybris.platform.servicelayer.time.TimeService getTimeService()Gets time service.- Returns:
- the time service
-
setTimeService
public void setTimeService(de.hybris.platform.servicelayer.time.TimeService timeService) Sets time service.- Parameters:
timeService- the time service
-