| 1 |
package sms |
| 2 |
|
| 3 |
import ( |
| 4 |
"net/http" |
| 5 |
|
| 6 |
"github.com/denverdino/aliyungo/common" |
| 7 |
) |
| 8 |
|
| 9 |
里云通信 |
| 10 |
type SendSmsArgs struct { |
| 11 |
PhoneNumbers string |
| 12 |
SignName string |
| 13 |
TemplateCode string |
| 14 |
TemplateParam string |
| 15 |
SmsUpExtendCode string `ArgName:"smsUpExtendCode"` |
| 16 |
OutId string |
| 17 |
} |
| 18 |
|
| 19 |
type QuerySmsArgs struct { |
| 20 |
PhoneNumber string |
| 21 |
BizId string |
| 22 |
SendDate string |
| 23 |
PageSize string |
| 24 |
CurrentPage string |
| 25 |
} |
| 26 |
|
| 27 |
type SendSmsResponse struct { |
| 28 |
common.Response |
| 29 |
Code string |
| 30 |
Message string |
| 31 |
BizId string |
| 32 |
} |
| 33 |
|
| 34 |
type QuerySmsResponse struct { |
| 35 |
common.Response |
| 36 |
Code string |
| 37 |
Message string |
| 38 |
TotalCount int |
| 39 |
TotalPage string |
| 40 |
SmsSendDetailDTOs struct { |
| 41 |
SmsSendDetailDTO []SmsSendDetailDTOsItem |
| 42 |
} |
| 43 |
} |
| 44 |
|
| 45 |
type SmsSendDetailDTOsItem struct { |
| 46 |
PhoneNum string |
| 47 |
SendStatus int |
| 48 |
ErrCode string |
| 49 |
TemplateCode string |
| 50 |
Content string |
| 51 |
SendDate string |
| 52 |
ReceiveDate string |
| 53 |
OutId string |
| 54 |
} |
| 55 |
|
| 56 |
func (this *DYSmsClient) SendSms(args *SendSmsArgs) (*SendSmsResponse, error) { |
| 57 |
resp := SendSmsResponse{} |
| 58 |
return &resp, this.InvokeByAnyMethod(http.MethodGet, SendSms, "", args, &resp) |
| 59 |
} |
| 60 |
|
| 61 |
func (this *DYSmsClient) QuerySms(args *QuerySmsArgs) (*QuerySmsResponse, error) { |
| 62 |
resp := QuerySmsResponse{} |
| 63 |
return &resp, this.InvokeByAnyMethod(http.MethodGet, QuerySms, "", args, &resp) |
| 64 |
} |