Package org.bhn.promotion.core.adapter
Interface InputAdapter
- All Known Implementing Classes:
PricingServiceInputAdapter
public interface InputAdapter
InputAdapter interface.
-
Method Summary
Modifier and TypeMethodDescriptionconvertToEligibilityRequest(org.json.JSONObject data) Convert between input json to an EligibilityRequest objectconvertToEvaluationRequest(org.json.JSONObject data) Convert between input json to an EvaluationRequest objectconvertToRedemptionRequest(org.json.JSONObject data) Convert between input json to an RedemptionRequest object
-
Method Details
-
convertToEvaluationRequest
EvaluationRequest convertToEvaluationRequest(org.json.JSONObject data) throws com.fasterxml.jackson.core.JsonProcessingException Convert between input json to an EvaluationRequest object
- Parameters:
data- input data to be converted into an evaluation request- Returns:
EvaluationRequestThe evaluation request to be used for promotion operation- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if input data is not valid json
-
convertToRedemptionRequest
RedemptionRequestDto convertToRedemptionRequest(org.json.JSONObject data) throws com.fasterxml.jackson.core.JsonProcessingException Convert between input json to an RedemptionRequest object
- Parameters:
data- input data to be converted into a redemption request- Returns:
RedemptionRequestDtoThe redemption request to be used for promotion operation- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if input data is not valid json
-
convertToEligibilityRequest
EligibilityRequestDto convertToEligibilityRequest(org.json.JSONObject data) throws com.fasterxml.jackson.core.JsonProcessingException Convert between input json to an EligibilityRequest object
- Parameters:
data- input data to be converted into a eligibility request- Returns:
EligibilityRequestDtoThe eligibility request to be used for promotion operation- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if input data is not valid json
-