Skip to content

Commit d92a81a

Browse files
author
liyan.90210
committed
feat auto update sdk
1 parent 8d00c7e commit d92a81a

8 files changed

Lines changed: 126 additions & 1 deletion

File tree

Changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Change log
22

3+
2026-01-29 Bumped to version v1.0.259
4+
- Updated apis for vms
5+
36
2026-01-22 Bumped to version v1.0.258
47
- Updated apis for visual
58

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package com.volcengine.example.vms;
2+
3+
import com.alibaba.fastjson.JSON;
4+
import com.volcengine.service.vms.VmsService;
5+
import com.volcengine.service.vms.impl.VmsServiceImpl;
6+
import com.volcengine.service.vms.request.QueryRiskDenyInfoRequest;
7+
import com.volcengine.service.vms.response.QueryRiskDenyInfoResponse;
8+
9+
/**
10+
* @author changke.233
11+
* @Date 2025/1/22
12+
*/
13+
public class QueryRiskDenyInfoDemo {
14+
// Make sure only get instance once throughout the entire running program.
15+
// We suggest using Singleton design model to get the instance.
16+
// And using the Singleton instance to call functions
17+
private static VmsService vmsService = VmsServiceImpl.getInstance();
18+
19+
static {
20+
vmsService.setAccessKey("you access key");
21+
vmsService.setSecretKey("you secret key");
22+
}
23+
public static void main(String[] args) {
24+
try {
25+
QueryRiskDenyInfoRequest request = new QueryRiskDenyInfoRequest();
26+
request.setMobile("13900000000ToMd5");
27+
request.setAccountRequestId("20260122150000000000000000000000");
28+
request.setEncryptType(1);
29+
QueryRiskDenyInfoResponse response = vmsService.queryRiskDenyInfo(request);
30+
System.out.println("结果:" + JSON.toJSONString(response));
31+
} catch (Exception exception) {
32+
System.out.println(exception.getMessage());
33+
}
34+
}
35+
}

volc-sdk-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.volcengine</groupId>
7-
<version>1.0.258</version>
7+
<version>1.0.259</version>
88
<artifactId>volc-sdk-java</artifactId>
99

1010
<name>volc-sdk-java</name>

volc-sdk-java/src/main/java/com/volcengine/service/vms/VmsConfig.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,20 @@ public class VmsConfig {
225225
}
226226
}
227227
));
228+
put("QueryRiskDenyInfo", new ApiInfo(
229+
new HashMap<String, Object>() {
230+
{
231+
put(Const.Method, Const.POST);
232+
put(Const.Path, DEFAULT_PATH);
233+
put(Const.Query, new ArrayList<NameValuePair>() {
234+
{
235+
add(new BasicNameValuePair(ACTION, "QueryRiskDenyInfo"));
236+
add(new BasicNameValuePair(VERSION, DEFAULT_VERSION));
237+
}
238+
});
239+
}
240+
}
241+
));
228242
put("Click2CallLite", new ApiInfo(
229243
new HashMap<String, Object>() {
230244
{

volc-sdk-java/src/main/java/com/volcengine/service/vms/VmsService.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,15 @@ public interface VmsService extends IBaseService {
104104
*/
105105
CreateNumberPoolResponse createNumberPool(CreateNumberPoolRequest request) throws Exception;
106106

107+
/**
108+
* 请求号码风控数据
109+
*
110+
* @param request
111+
* @return
112+
* @throws Exception
113+
*/
114+
QueryRiskDenyInfoResponse queryRiskDenyInfo(QueryRiskDenyInfoRequest request) throws Exception;
115+
107116
/**
108117
* 更新号码池
109118
*

volc-sdk-java/src/main/java/com/volcengine/service/vms/impl/VmsServiceImpl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import org.apache.http.NameValuePair;
1616
import org.apache.http.message.BasicNameValuePair;
1717

18+
import java.nio.charset.StandardCharsets;
1819
import java.util.ArrayList;
1920
import java.util.Arrays;
2021
import java.util.Collections;
@@ -326,6 +327,11 @@ public CreateNumberPoolResponse createNumberPool(CreateNumberPoolRequest request
326327
return JSON.parseObject(response.getData(), CreateNumberPoolResponse.class);
327328
}
328329

330+
@Override
331+
public QueryRiskDenyInfoResponse queryRiskDenyInfo(QueryRiskDenyInfoRequest request) throws Exception {
332+
return doJson("QueryRiskDenyInfo", request, new TypeReference<QueryRiskDenyInfoResponse>(){});
333+
}
334+
329335
@Override
330336
public UpdateNumberPoolResponse updateNumberPool(UpdateNumberPoolRequest request) throws Exception {
331337
RawResponse response = formPost("UpdateNumberPool", Utils.mapToPairList(Utils.paramsToMap(request)));
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package com.volcengine.service.vms.request;
2+
3+
import com.alibaba.fastjson.annotation.JSONField;
4+
import lombok.AllArgsConstructor;
5+
import lombok.Builder;
6+
import lombok.Data;
7+
import lombok.NoArgsConstructor;
8+
9+
import javax.jws.HandlerChain;
10+
import java.util.List;
11+
12+
/**
13+
* @author changke.233
14+
* @Date 2025/1/22
15+
*/
16+
@Data
17+
@Builder
18+
@NoArgsConstructor
19+
@AllArgsConstructor
20+
public class QueryRiskDenyInfoRequest {
21+
@JSONField(name = "Mobile")
22+
private String mobile;
23+
24+
@JSONField(name = "AccountRequestId")
25+
private String accountRequestId;
26+
27+
@JSONField(name = "EncryptType")
28+
private Integer encryptType;
29+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package com.volcengine.service.vms.response;
2+
3+
import com.alibaba.fastjson.annotation.JSONField;
4+
import com.volcengine.model.response.ResponseMetadata;
5+
import lombok.Data;
6+
7+
import java.util.List;
8+
9+
@Data
10+
public class QueryRiskDenyInfoResponse {
11+
12+
@JSONField(name = "ResponseMetadata")
13+
private ResponseMetadata responseMetadata;
14+
15+
@JSONField(name = "Result")
16+
private Result result;
17+
18+
@Data
19+
public static class Result {
20+
@JSONField(name = "AccountRequestId")
21+
private String accountRequestId;
22+
@JSONField(name = "Level")
23+
private int level;
24+
@JSONField(name = "Mobile")
25+
private String mobile;
26+
@JSONField(name = "Score")
27+
private int score;
28+
}
29+
}

0 commit comments

Comments
 (0)