diff --git a/src/Work/ExternalContact/Client.php b/src/Work/ExternalContact/Client.php index 385cccb31..79bf665ec 100644 --- a/src/Work/ExternalContact/Client.php +++ b/src/Work/ExternalContact/Client.php @@ -116,6 +116,57 @@ public function transfer(string $externalUserId, string $handoverUserId, string return $this->httpPostJson('cgi-bin/externalcontact/transfer', $params); } + /** + * 分配在职成员的客户. + * + * @see https://work.weixin.qq.com/api/doc/90000/90135/92125 + * + * @param array $externalUserId + * @param string $handoverUserId + * @param string $takeoverUserId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function transferCustomer(array $externalUserId, string $handoverUserId, string $takeoverUserId, string $transferSuccessMessage) + { + $params = [ + 'external_userid' => $externalUserId, + 'handover_userid' => $handoverUserId, + 'takeover_userid' => $takeoverUserId, + 'transfer_success_msg' => $transferSuccessMessage + ]; + + return $this->httpPostJson('cgi-bin/externalcontact/transfer_customer', $params); + } + + /** + * 分配离职成员的客户. + * + * @see https://work.weixin.qq.com/api/doc/90000/90135/94081 + * + * @param array $externalUserId + * @param string $handoverUserId + * @param string $takeoverUserId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function resignedTransferCustomer(array $externalUserId, string $handoverUserId, string $takeoverUserId) + { + $params = [ + 'external_userid' => $externalUserId, + 'handover_userid' => $handoverUserId, + 'takeover_userid' => $takeoverUserId, + ]; + + return $this->httpPostJson('cgi-bin/externalcontact/resigned/transfer_customer', $params); + } + /** * 获取企业标签库. *