package com.pollex.pam.service.dto;
|
|
public class OtpResponseDTO {
|
private final String indexKey;
|
private final boolean success;
|
private final String failCode;
|
private final String failReason;
|
|
public OtpResponseDTO(String[] strings) {
|
if(strings.length == 4) {
|
this.indexKey = strings[0];
|
this.success = "0".equals(strings[1]);
|
this.failCode = strings[2];
|
this.failReason = strings[3];
|
}
|
else {
|
throw new RuntimeException("the otp response can't format");
|
}
|
}
|
|
public String getIndexKey() {
|
return indexKey;
|
}
|
|
public boolean isSuccess() {
|
return success;
|
}
|
|
public String getFailCode() {
|
return failCode;
|
}
|
|
public String getFailReason() {
|
return failReason;
|
}
|
}
|