MCPcopy
hub / github.com/silenceper/wechat / AccountDel

Method AccountDel

work/kf/account.go:64–82  ·  view source on GitHub ↗

AccountDel 删除客服账号 see https://developer.work.weixin.qq.com/document/path/94663

(options AccountDelOptions)

Source from the content-addressed store, hash-verified

62// AccountDel 删除客服账号
63// see https://developer.work.weixin.qq.com/document/path/94663
64func (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 修改客服账号请求参数
85type AccountUpdateOptions struct {

Callers

nothing calls this directly

Calls 3

PostJSONFunction · 0.92
NewSDKErrFunction · 0.70
GetAccessTokenMethod · 0.65

Tested by

no test coverage detected