保誠-保戶業務員媒合平台
Tomas
2021-11-23 c2d8465faade429e8b8f677864b0bc2da763e71c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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;
    }
}