SaveUser::getRequestMethod()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
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\Users;
14
15
16
use MuCTS\Sobot\Contracts\Sobot;
17
18
/**
19
 * Class SaveUser
20
 * 创建客户信息
21
 *
22
 * 接口说明:
23
 * 创建客户信息,根据优先级:对接ID>邮箱>手机查找,查询到客户已存在则直接返回,否则新建。
24
 *
25
 * 备注:
26
 * 1、如果企业设置了客户自定义字段,那么在创建客户信息时可以选择查询相对应的自定义字段配置信息进行扩展信息的添加。
27
 *
28
 * @property-write string $user_nick 客户昵称
29
 * @property-write string|null $user_name 客户名称
30
 * @property-write string|null $user_tels 手机号码,如多号码请采用英文分号";"隔开
31
 * @property-write string|null $user_emails 邮箱,如多邮箱请采用英文分号";"隔开
32
 * @property-write int|null $user_level 客户等级,0普通,1VIP
33
 * @property-write string|null $vip_level VIP级别,选项id,通过接口查询客户固定字段信息获取
34
 * @property-write string|null $user_label 客户标签,如多标签用英文分号";"隔开
35
 * @property-write int|null $user_status 客户状态,0 普通,1 永久拉黑,默认0
36
 * @property-write string|null $enterprise_name 企业名称,企业名称请填写全称,非简称
37
 * @property-write string|null $partnerid 对接ID
38
 * @property-write array|null $extend_field_params 扩展字段信息,格式:[["fieldid"=>"","扩展字段ID","field_value"=>"扩展字段值"]]
39
 * @property-write string|null $remark 备注
40
 *
41
 * @method SaveUser userNick(string $value) 客户昵称
42
 * @method SaveUser userName(?string $value) 客户名称
43
 * @method SaveUser userTels(?string $value) 手机号码,如多号码请采用英文分号";"隔开
44
 * @method SaveUser userEmails(?string $value) 邮箱,如多邮箱请采用英文分号";"隔开
45
 * @method SaveUser userLevel(?int $value) 客户等级,0普通,1VIP
46
 * @method SaveUser vipLevel(?string $value) VIP级别,选项id,通过接口查询客户固定字段信息获取
47
 * @method SaveUser userLabel(?string $value) 客户标签,如多标签用英文分号";"隔开
48
 * @method SaveUser userStatus(?int $value) 客户状态,0 普通,1 永久拉黑,默认0
49
 * @method SaveUser enterpriseName(?string $value) 企业名称,企业名称请填写全称,非简称
50
 * @method SaveUser partnerid(?string $value) 对接ID
51
 * @method SaveUser extendFieldParams(?array $value) 扩展字段信息,格式:[["fieldid" => "", "扩展字段ID", "field_value" => "扩展字段值"]]
52
 * @method SaveUser remark(?string $value) 备注
53
 *
54
 * @package MuCTS\Sobot\Users
55
 */
56
class SaveUser extends Sobot
57
{
58
59
    public function getRequestMethod(): string
60
    {
61
        return self::METHOD_POST;
62
    }
63
64
    public function getRequestPath(): string
65
    {
66
        return '/api/crm/5/user/save_user';
67
    }
68
}