ChatConnect   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 3
c 1
b 0
f 0
dl 0
loc 11
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRequestMethod() 0 3 1
A getRequestPath() 0 3 1
1
<?php
2
/**
3
 * This file is part of the mucts.com.
4
 *
5
 * This source file is subject to the MIT license that is bundled
6
 * with this source code in the file LICENSE.
7
 *
8
 * @version 1.0
9
 * @author herry<[email protected]>
10
 * @copyright © 2020  MuCTS.com All Rights Reserved.
11
 */
12
13
namespace MuCTS\Sobot\OnlineService;
14
15
16
use MuCTS\Sobot\Contracts\Sobot;
17
18
/**
19
 * Class ChatConnect
20
 *
21
 * 请求人工客服
22
 *
23
 * 接口说明:
24
 * 接口类型:主动调用接口
25
 * 接口作用:可通过调用该接口以用户的身份来发起用户和客服之间的会话请求,并建立会话。
26
 *
27
 * @property-write string $partnerid 企业自己的用户id,可自行传值
28
 * @property-write int|null $source 客户来源,0-pc,1-微信,2-sdk,3-微博,4-h5
29
 * @property-write string|null $agentid 指定客服的id
30
 * @property-write int|null $tran_flag 是否必须转入指定客服,1-是,0-否
31
 * @property-write string|null $groupid 指定技能组
32
 * @property-write string|null $params 自定义参数
33
 * @property-write string|null $user_tels 用户电话
34
 * @property-write string|null $user_emails 用户邮箱
35
 * @property-write string|null $user_face 用户头像
36
 * @property-write string|null $user_name 用户真实姓名
37
 * @property-write string|null $user_nick 用户昵称
38
 * @property-write string|null $user_img 用户头像
39
 * 
40
 * @method ChatConnect partnerid(string $partnerid)	String	是	企业自己的用户id,可自行传值
41
 * @method ChatConnect source(?int $source) 客户来源,0-pc,1-微信,2-sdk,3-微博,4-h5
42
 * @method ChatConnect agentid(?string $agentid) 指定客服的id
43
 * @method ChatConnect tranFlag(?int $tranFlag) 是否必须转入指定客服,1-是,0-否
44
 * @method ChatConnect groupid(?string $groupid) 指定技能组
45
 * @method ChatConnect params(?string $params) 自定义参数
46
 * @method ChatConnect userTels(?string $userTels) 用户电话
47
 * @method ChatConnect userEmails(?string $userEmails) 用户邮箱
48
 * @method ChatConnect userFace(?string $userFace) 用户头像
49
 * @method ChatConnect userName(?string $userName) 用户真实姓名
50
 * @method ChatConnect userNick(?string $userNick) 用户昵称
51
 * @method ChatConnect userImg(?string $userImg) 用户头像
52
 * @package MuCTS\Sobot\OnlineService
53
 */
54
class ChatConnect extends Sobot
55
{
56
57
    public function getRequestMethod(): string
58
    {
59
        return self::METHOD_POST;
60
    }
61
62
    public function getRequestPath(): string
63
    {
64
        return '/api/chat/5/user/chat_connect';
65
    }
66
}