Skip to content

Commit 59f143e

Browse files
publish jdcloud-sdk-go version 1.0.15
1 parent 3adb026 commit 59f143e

6 files changed

Lines changed: 147 additions & 1 deletion

File tree

services/cloudauth/ChangeLog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,11 @@ Date: 2024-06-18
4040
1.0.13:
4141
Date: 2024-07-16
4242
更新: 新版活体检测
43+
44+
1.0.14:
45+
Date: 2024-08-20
46+
更新: 增加与图下单接口
47+
48+
1.0.15:
49+
Date: 2024-09-11
50+
更新: H5活体检测返回结果增减是否收费标记。新增手机号码状态检测接口。

services/cloudauth/apis/GetAliveResult.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,6 @@ type GetAliveResultResult struct {
106106
RxResult string `json:"rxResult"`
107107
Score string `json:"score"`
108108
Desc string `json:"desc"`
109+
H5ChargeFlag int `json:"h5ChargeFlag"`
110+
RxChargeFlag int `json:"rxChargeFlag"`
109111
}

services/cloudauth/apis/GetAliveResultNew.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,6 @@ type GetAliveResultNewResult struct {
106106
RxResult string `json:"rxResult"`
107107
Score string `json:"score"`
108108
Desc string `json:"desc"`
109+
H5ChargeFlag int `json:"h5ChargeFlag"`
110+
RxChargeFlag int `json:"rxChargeFlag"`
109111
}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
// Copyright 2018 JDCLOUD.COM
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// NOTE: This class is auto generated by the jdcloud code generator program.
16+
17+
package apis
18+
19+
import (
20+
"github.com/jdcloud-api/jdcloud-sdk-go/core"
21+
)
22+
23+
type MobileStatusRequest struct {
24+
25+
core.JDCloudRequest
26+
27+
/* 手机号码 */
28+
Mobile string `json:"mobile"`
29+
}
30+
31+
/*
32+
* param mobile: 手机号码 (Required)
33+
*
34+
* @Deprecated, not compatible when mandatory parameters changed
35+
*/
36+
func NewMobileStatusRequest(
37+
mobile string,
38+
) *MobileStatusRequest {
39+
40+
return &MobileStatusRequest{
41+
JDCloudRequest: core.JDCloudRequest{
42+
URL: "/mobile:status",
43+
Method: "POST",
44+
Header: nil,
45+
Version: "v1",
46+
},
47+
Mobile: mobile,
48+
}
49+
}
50+
51+
/*
52+
* param mobile: 手机号码 (Required)
53+
*/
54+
func NewMobileStatusRequestWithAllParams(
55+
mobile string,
56+
) *MobileStatusRequest {
57+
58+
return &MobileStatusRequest{
59+
JDCloudRequest: core.JDCloudRequest{
60+
URL: "/mobile:status",
61+
Method: "POST",
62+
Header: nil,
63+
Version: "v1",
64+
},
65+
Mobile: mobile,
66+
}
67+
}
68+
69+
/* This constructor has better compatible ability when API parameters changed */
70+
func NewMobileStatusRequestWithoutParam() *MobileStatusRequest {
71+
72+
return &MobileStatusRequest{
73+
JDCloudRequest: core.JDCloudRequest{
74+
URL: "/mobile:status",
75+
Method: "POST",
76+
Header: nil,
77+
Version: "v1",
78+
},
79+
}
80+
}
81+
82+
/* param mobile: 手机号码(Required) */
83+
func (r *MobileStatusRequest) SetMobile(mobile string) {
84+
r.Mobile = mobile
85+
}
86+
87+
88+
// GetRegionId returns path parameter 'regionId' if exist,
89+
// otherwise return empty string
90+
func (r MobileStatusRequest) GetRegionId() string {
91+
return ""
92+
}
93+
94+
type MobileStatusResponse struct {
95+
RequestID string `json:"requestId"`
96+
Error core.ErrorResponse `json:"error"`
97+
Result MobileStatusResult `json:"result"`
98+
}
99+
100+
type MobileStatusResult struct {
101+
Code string `json:"code"`
102+
Message string `json:"message"`
103+
ChargeFlag string `json:"chargeFlag"`
104+
Area string `json:"area"`
105+
Operator string `json:"operator"`
106+
Status string `json:"status"`
107+
MnpStatus string `json:"mnpStatus"`
108+
}

services/cloudauth/client/CloudauthClient.go

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func NewCloudauthClient(credential *core.Credential) *CloudauthClient {
4040
Credential: *credential,
4141
Config: *config,
4242
ServiceName: "cloudauth",
43-
Revision: "1.0.13",
43+
Revision: "1.0.15",
4444
Logger: core.NewDefaultLogger(core.LogInfo),
4545
}}
4646
}
@@ -77,6 +77,26 @@ func (c *CloudauthClient) DescribeApplyStatus(request *cloudauth.DescribeApplySt
7777
return jdResp, err
7878
}
7979

80+
/* 手机号码状态查询 */
81+
func (c *CloudauthClient) MobileStatus(request *cloudauth.MobileStatusRequest) (*cloudauth.MobileStatusResponse, error) {
82+
if request == nil {
83+
return nil, errors.New("Request object is nil. ")
84+
}
85+
resp, err := c.Send(request, c.ServiceName)
86+
if err != nil {
87+
return nil, err
88+
}
89+
90+
jdResp := &cloudauth.MobileStatusResponse{}
91+
err = json.Unmarshal(resp, jdResp)
92+
if err != nil {
93+
c.Logger.Log(core.LogError, "Unmarshal json failed, resp: %s", string(resp))
94+
return nil, err
95+
}
96+
97+
return jdResp, err
98+
}
99+
80100
/* 个人手机号三要素详版 */
81101
func (c *CloudauthClient) PersonalMobile(request *cloudauth.PersonalMobileRequest) (*cloudauth.PersonalMobileResponse, error) {
82102
if request == nil {

services/cloudauth/models/AliveResultInfo.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,10 @@ type AliveResultInfo struct {
4242

4343
/* 描述 (Optional) */
4444
Desc string `json:"desc"`
45+
46+
/* 活体检测是否收费:0不收费,1收费 (Optional) */
47+
H5ChargeFlag int `json:"h5ChargeFlag"`
48+
49+
/* 活体检测是否收费:0不收费,1收费 (Optional) */
50+
RxChargeFlag int `json:"rxChargeFlag"`
4551
}

0 commit comments

Comments
 (0)