|
@@ -294,3 +294,63 @@ func SetCamsBusiness(phone, custSpaceId, address, description, vertical, email,
|
|
|
|
|
|
return response, nil
|
|
|
}
|
|
|
+
|
|
|
+// GetCamsPhoneVerifyStatus 查询号码验证状态
|
|
|
+func GetCamsPhoneVerifyStatus(phone, custSpaceId string) (*cams20200606.GetPhoneNumberVerificationStatusResponse, error) {
|
|
|
+ client, _err := CreateCamsClient()
|
|
|
+ if _err != nil {
|
|
|
+ return nil, _err
|
|
|
+ }
|
|
|
+
|
|
|
+ request := &cams20200606.GetPhoneNumberVerificationStatusRequest{
|
|
|
+ PhoneNumber: tea.String(phone),
|
|
|
+ CustSpaceId: tea.String(custSpaceId),
|
|
|
+ }
|
|
|
+
|
|
|
+ response, _err := client.GetPhoneNumberVerificationStatus(request)
|
|
|
+ if _err != nil {
|
|
|
+ return nil, _err
|
|
|
+ }
|
|
|
+
|
|
|
+ return response, nil
|
|
|
+}
|
|
|
+
|
|
|
+// RegisterCamsPhoneNumber 号码注册
|
|
|
+func RegisterCamsPhoneNumber(phone, custSpaceId string) (*cams20200606.ChatappPhoneNumberRegisterResponse, error) {
|
|
|
+ client, _err := CreateCamsClient()
|
|
|
+ if _err != nil {
|
|
|
+ return nil, _err
|
|
|
+ }
|
|
|
+
|
|
|
+ request := &cams20200606.ChatappPhoneNumberRegisterRequest{
|
|
|
+ PhoneNumber: tea.String(phone),
|
|
|
+ CustSpaceId: tea.String(custSpaceId),
|
|
|
+ }
|
|
|
+
|
|
|
+ response, _err := client.ChatappPhoneNumberRegister(request)
|
|
|
+ if _err != nil {
|
|
|
+ return nil, _err
|
|
|
+ }
|
|
|
+
|
|
|
+ return response, nil
|
|
|
+}
|
|
|
+
|
|
|
+// DeRegisterCamsPhoneNumber 号码取消注册
|
|
|
+func DeRegisterCamsPhoneNumber(phone, custSpaceId string) (*cams20200606.ChatappPhoneNumberDeregisterResponse, error) {
|
|
|
+ client, _err := CreateCamsClient()
|
|
|
+ if _err != nil {
|
|
|
+ return nil, _err
|
|
|
+ }
|
|
|
+
|
|
|
+ request := &cams20200606.ChatappPhoneNumberDeregisterRequest{
|
|
|
+ PhoneNumber: tea.String(phone),
|
|
|
+ CustSpaceId: tea.String(custSpaceId),
|
|
|
+ }
|
|
|
+
|
|
|
+ response, _err := client.ChatappPhoneNumberDeregister(request)
|
|
|
+ if _err != nil {
|
|
|
+ return nil, _err
|
|
|
+ }
|
|
|
+
|
|
|
+ return response, nil
|
|
|
+}
|