GetDetailByCId   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 getRequestPath() 0 3 1
A getRequestMethod() 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 QueryCIds
20
 * 查询客户会话记录
21
 *
22
 * 接口说明:
23
 * 接口类型:主动调用接口
24
 * 接口作用:可通过调用该接口来获取某条会话的详细会话记录。
25
 *
26
 * 说明:
27
 * 1)cid,visitorid,partnerid+from为三种查询模式,优先级为:cid > visitorid > partnerid+from;
28
 * 2)传入visitorid或者partnerid+from时,表示查询用户的最后一次会话记录。
29
 *
30
 * @method GetDetailByCId whereCid(string $value) 会话id
31
 * @method GetDetailByCId wherePartnerid(?string $value) 企业自己的用户id-供开放平台用户使用
32
 * @method GetDetailByCId whereFrom(?int $value) 来源:0-开放平台,1-pc/h5/sdk
33
 * @method GetDetailByCId whereVisitorid(?string $value) 智齿平台用户id-所有来源用户都可使用
34
 * @method GetDetailByCId whereNameFlag(?int $value) 客服名字类型:0.昵称(默认) 1.真实姓名
35
 *
36
 * @link https://www.sobot.com/developerdocs/service/online_service.html#_2-9%E3%80%81%E6%9F%A5%E8%AF%A2%E5%AE%A2%E6%88%B7%E4%BC%9A%E8%AF%9D%E8%AE%B0%E5%BD%95
37
 * @package MuCTS\Sobot\OnlineService
38
 */
39
class GetDetailByCId extends Sobot
40
{
41
42
    public function getRequestMethod(): string
43
    {
44
        return self::METHOD_POST;
45
    }
46
47
    public function getRequestPath(): string
48
    {
49
        return '/api/chat/5/user/get_detail_by_cid';
50
    }
51
}