AccountDel 删除客服账号 see https://developer.work.weixin.qq.com/document/path/94663
(options AccountDelOptions)
| 62 | // AccountDel 删除客服账号 |
| 63 | // see https://developer.work.weixin.qq.com/document/path/94663 |
| 64 | func (r *Client) AccountDel(options AccountDelOptions) (info util.CommonError, err error) { |
| 65 | var ( |
| 66 | accessToken string |
| 67 | data []byte |
| 68 | ) |
| 69 | if accessToken, err = r.ctx.GetAccessToken(); err != nil { |
| 70 | return |
| 71 | } |
| 72 | if data, err = util.PostJSON(fmt.Sprintf(accountDelAddr, accessToken), options); err != nil { |
| 73 | return |
| 74 | } |
| 75 | if err = json.Unmarshal(data, &info); err != nil { |
| 76 | return |
| 77 | } |
| 78 | if info.ErrCode != 0 { |
| 79 | return info, NewSDKErr(info.ErrCode, info.ErrMsg) |
| 80 | } |
| 81 | return info, nil |
| 82 | } |
| 83 | |
| 84 | // AccountUpdateOptions 修改客服账号请求参数 |
| 85 | type AccountUpdateOptions struct { |
nothing calls this directly
no test coverage detected