Skip to content

Commit

Permalink
Merge pull request #6 from wscrlhs/transfer-customer
Browse files Browse the repository at this point in the history
客户分配
  • Loading branch information
jianzhenchen authored Dec 27, 2021
2 parents a1c26d6 + 5e8df06 commit 13217d5
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions src/Work/ExternalContact/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
* 获取企业标签库.
*
Expand Down

0 comments on commit 13217d5

Please sign in to comment.