| 限定符和类型 | 字段和说明 |
|---|---|
private int |
maxSize
已过时。
|
private String |
URI_ADD_TEMPLATE
添加模板
|
private String |
URI_AES_SUBMIT
aes128 加密发送
|
private String |
URI_BATCH_SUBMIT_BY_TEMPLATE
批量模板短信发送
|
private String |
URI_DEL_TEMPLATE
删除模板
|
private String |
URI_MODIFY_TEMPLATE
修改模板
|
private String |
URI_QUERY_TEMPLATE_STATUS
查询模板状态
|
private String |
URI_SUBMIT_BY_TEMPLATE
模板短信发送
|
MAX_REQUESTS_PER_HOST, okHttpClient, token, URI_BALANCE, URI_BATCHSUBMIT, URI_DAILY_STATS, URI_DELIVRD, URI_REPORT, URI_SUBMITMAX_BATCH_CONTENT, MAX_BATCH_PHONE| 构造器和说明 |
|---|
V4Client(String url,
String spId,
String spKey) |
V4Client(String url,
String spId,
String spKey,
Integer requestPerHost) |
V4Client(String url,
String spId,
String spKey,
Integer requestPerHost,
String fetchURL,
String templateURL)
初始化
|
getDeliver, getReport, submit, submitprivate String URI_AES_SUBMIT
private String URI_ADD_TEMPLATE
private String URI_MODIFY_TEMPLATE
private String URI_DEL_TEMPLATE
private String URI_QUERY_TEMPLATE_STATUS
private String URI_SUBMIT_BY_TEMPLATE
private String URI_BATCH_SUBMIT_BY_TEMPLATE
@Deprecated private int maxSize
public V4Client(String url, String spId, String spKey, Integer requestPerHost, String fetchURL, String templateURL) throws IllegalArgumentException
url - 短信接口提交地址spId - 我方提供的发送账号的唯一标识spKey - 我方提供的发送账号的预共享密钥的requestPerHost - http窗口数量fetchURL - 获取状态/上行报告地址templateURL - 模板报备发送提交urlIllegalArgumentExceptionpublic V4Client(String url, String spId, String spKey, Integer requestPerHost) throws IllegalArgumentException
public V4Client(String url, String spId, String spKey) throws IllegalArgumentException
public BalanceResp getBalance()
public DailyStatsResp getDailyStats(String date)
BaseApidate - 查询的日期 日期格式化:yyyyMMddprotected okhttp3.Request makeRequest(Sms sms)
makeRequest 在类中 V2Clientsms - @Deprecated protected okhttp3.Request makeRequest(List<Sms> smsContents)
makeRequest 在类中 V2ClientsmsContents - public void setMaxSize(int maxSize)
protected okhttp3.Request makeRequest(String url)
makeRequest 在类中 V2Clienturl - public boolean submitByAes(Sms sms, java.util.function.Consumer<SubmitResp> consumer) throws Exception
sms - consumer - Exceptionpublic boolean addOrModifyTemplate(boolean isAdd,
SmsTemplate smsTemplate,
java.util.function.Consumer<SmsTemplateAddResp> consumer)
throws Exception
isAdd - true 添加模板 false 修改模板smsTemplate - consumer - Exceptionpublic boolean deleteTemplate(Long templateCode, java.util.function.Consumer<Resp> consumer) throws Exception
templateCode - 模板编号consumer - Exceptionpublic boolean queryTemplateStatus(List<Long> templateCodes, java.util.function.Consumer<SmsTemplateQueryStatusResp> consumer) throws Exception
templateCodes - 短信模板唯一编号列表 一批次最多100consumer - Exceptionpublic boolean submitByTemplateCode(SmsSubimtByTemplateReqVo smsSubimtByTemplateReqVo, java.util.function.Consumer<SmsSubimtByTemplateResp> consumer) throws Exception
smsSubimtByTemplateReqVo - 模板短信发送 请求参数consumer - Exceptionpublic boolean batchSubmitByTemplateCode(List<SmsSubimtByTemplateReqVo> smsSubimtByTemplateReqVoList, java.util.function.Consumer<SmsBatchSubimtByTemplateResp> consumer) throws Exception
smsSubimtByTemplateReqVoList - 模板短信发送 请求参数consumer - ExceptionCopyright © 2022. All rights reserved.