com.github.xiaoyuge5201.enums.CloopenSmsApiErrorCode Maven / Gradle / Ivy
The newest version!
package com.github.xiaoyuge5201.enums;
/**
* 容联云短信错误码
*/
public enum CloopenSmsApiErrorCode {
OK("000000", "调用成功"), EXTEND_CODE_ERROR("111100", "【账号】请求URL账号格式不正确"),
DOMESTIC_NUMBER_NOT_SUPPORTED("111101", "【账号】请求包头Authorization参数为空"),
DAY_LIMIT_CONTROL("111102", "【账号】请求包头Authorization参数Base64解码失败"),
SMS_CONTENT_ILLEGAL("111103", "【账号】请求包头Authorization参数解码后格式有误"),
SMS_SIGN_ILLEGAL("111104", "【账号】请求包头Authorization参数解码后账户ID为空"),
RAM_PERMISSION_DENY("111105", "【账号】请求包头Authorization参数解码后时间戳为空"),
OUT_OF_SERVICE("111106", "【账号】请求包头Authorization参数解码后时间戳过期"),
PRODUCT_UN_SUBSCRIPT("160000", "【短信】系统错误"),
ACCOUNT_NOT_EXISTS("160030", "【短信】请求包体为空"),
ACCOUNT_ABNORMAL("160031", "【短信】参数解析失败"),
SMS_TEMPLATE_ILLEGAL("160032", "【短信】短信模板无效"),
SMS_SIGNATURE_ILLEGAL("160033", "短信签名不合法"),
INVALID_PARAMETERS("160036", "【短信】短信模板类型未知"),
SYSTEM_ERROR("160037", "【短信】短信内容长度限制"),
MOBILE_NUMBER_ILLEGAL("160038", "【短信】短信验证码发送过频繁"),
MOBILE_COUNT_OVER_LIMIT("160039", "【短信】发送数量超出同模板同号天发送次数上限"),
TEMPLATE_MISSING_PARAMETERS("160040", "【短信】验证码超出同模板同号码天发送上限"),
BUSINESS_LIMIT_CONTROL("160042", "【短信】号码格式有误"),
INVALID_JSON_PARAM("160043", "【短信】应用与模板id不匹配"),
BLACK_KEY_CONTROL_LIMIT("160044", "【短信】发送号码为空"),
PARAM_LENGTH_LIMIT("160048", "【短信】号码数超200限制"),
PARAM_NOT_SUPPORT_URL("160049", "【短信】短信内容含敏感词"),
AMOUNT_NOT_ENOUGH("160050 ", "【短信】短信发送失败"),
TEMPLATE_PARAMS_ILLEGAL("160052", "【短信】模板变量格式有误");
private final String code;
private final String message;
private CloopenSmsApiErrorCode(String code, String message) {
this.code = code;
this.message = message;
}
public static String getMessage(String code) {
if (code != null) {
for (CloopenSmsApiErrorCode aliyunSmsApiErrorCode : CloopenSmsApiErrorCode.values()) {
if (aliyunSmsApiErrorCode.code.equals(code)) {
return aliyunSmsApiErrorCode.message;
}
}
}
return null;
}
public String getCode() {
return code;
}
public String getMessage() {
return message;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy