You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
2.1 KiB
51 lines
2.1 KiB
using RemitInboundAPI.Common.Helper;
|
|
using RemitInboundAPI.Common.Model;
|
|
using RemitInboundAPI.Common.Model.RemitModel;
|
|
|
|
namespace RemitInboundAPI.Business.Helper.ValidationHelper
|
|
{
|
|
public class ExRateValidationHelper
|
|
{
|
|
public async Task<ApiResponse> ValidateExrateRequest(ExRateModel model)
|
|
{
|
|
ApiResponse _response;
|
|
if (string.IsNullOrEmpty(model.SendingCountryCode))
|
|
{
|
|
_response = new ApiResponse(ResponseHelper.FAILED, "SendingCountryCode can not be empty.");
|
|
}
|
|
else if (string.IsNullOrEmpty(model.SendingCurrencyCode))
|
|
{
|
|
_response = new ApiResponse(ResponseHelper.FAILED, "SendingCurrencyCode can not be empty.");
|
|
}
|
|
else if (string.IsNullOrEmpty(model.PayoutCountryCode))
|
|
{
|
|
_response = new ApiResponse(ResponseHelper.FAILED, "PayoutCountryCode can not be empty.");
|
|
}
|
|
else if (string.IsNullOrEmpty(model.PayoutCurrencyCode))
|
|
{
|
|
_response = new ApiResponse(ResponseHelper.FAILED, "PayoutCurrencyCode can not be empty.");
|
|
}
|
|
else if (string.IsNullOrEmpty(model.CollectionAmount))
|
|
{
|
|
_response = new ApiResponse(ResponseHelper.FAILED, "CollectionAmount can not be empty.");
|
|
}
|
|
else if (string.IsNullOrEmpty(model.PayoutAmount))
|
|
{
|
|
_response = new ApiResponse(ResponseHelper.FAILED, "PayoutAmount can not be empty.");
|
|
}
|
|
else if (string.IsNullOrEmpty(model.PayoutTypeCode))
|
|
{
|
|
_response = new ApiResponse(ResponseHelper.FAILED, "PaymentTypeCode can not be empty.");
|
|
}
|
|
else if (string.IsNullOrEmpty(model.CalcBy))
|
|
{
|
|
_response = new ApiResponse(ResponseHelper.FAILED, "CalcBy can not be empty.");
|
|
}
|
|
else
|
|
{
|
|
_response = new ApiResponse(ResponseHelper.SUCCESS, ResponseMessageHelper.SUCCESS);
|
|
}
|
|
return _response;
|
|
}
|
|
}
|
|
}
|