Integration with calculation layer
Calculation - The calculation class will contain the calculation logic for given service delivery. Based on the application submitted the calculator class will calculate the tax/charges and call billing service to generate demand.
For our guide, we are going to create a sample calculation class with some dummy logic. For this, we are going to perform the following steps -
i) Create a class under service folder by the name of CalculationService
ii) Now, annotate this class with @Service
annotation and add the following logic within it -
@Service
public class CalculationService {
public Double calculateLaminationCharges(VoterRegistrationApplication application){
// Add calculation logic according to business requirement
return 10.0;
}
}