Passed
Push — main ( 27e66b...25b76e )
by Abbotton
12:06
created

BuyIn::orienPlanList()   A

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
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Abbotton\DouDian\Api;
4
5
use Illuminate\Http\Client\RequestException;
6
use Psr\SimpleCache\InvalidArgumentException;
7
8
class BuyIn extends BaseRequest
9
{
10
    /**
11
     * 商品定向计划管理.
12
     *
13
     * @param  array  $params
14
     * @return array
15
     *
16
     * @throws RequestException
17
     * @throws InvalidArgumentException
18
     */
19
    public function orienPlanCtrl(array $params): array
20
    {
21
        return $this->httpPost('buyin/orienPlanCtrl', $params);
22
    }
23
24
    /**
25
     * 商品定向计划查询.
26
     *
27
     * @param  array  $params
28
     * @return array
29
     *
30
     * @throws InvalidArgumentException
31
     * @throws RequestException
32
     */
33
    public function orienPlanList(array $params): array
34
    {
35
        return $this->httpPost('buyin/orienPlanList', $params);
36
    }
37
38
    /**
39
     * 向指定定向计划中添加达人.
40
     *
41
     * @param  array  $params
42
     * @return array
43
     *
44
     * @throws InvalidArgumentException
45
     * @throws RequestException
46
     */
47
    public function orienPlanAuthorsAdd(array $params): array
48
    {
49
        return $this->httpPost('buyin/orienPlanAuthorsAdd', $params);
50
    }
51
52
    /**
53
     * 定向计划达人申请审核.
54
     *
55
     * @param  array  $params
56
     * @return array
57
     *
58
     * @throws InvalidArgumentException
59
     * @throws RequestException
60
     */
61
    public function orienPlanAudit(array $params): array
62
    {
63
        return $this->httpPost('buyin/orienPlanAudit', $params);
64
    }
65
66
    /**
67
     * 创建/修改商品定向计划.
68
     *
69
     * @param  array  $params
70
     * @return array
71
     *
72
     * @throws InvalidArgumentException
73
     * @throws RequestException
74
     */
75
    public function createOrUpdateOrienPlan(array $params): array
76
    {
77
        return $this->httpPost('buyin/createOrUpdateOrienPlan', $params);
78
    }
79
80
    /**
81
     * 查询定向计划作者列表.
82
     *
83
     * @param  array  $params
84
     * @return array
85
     *
86
     * @throws InvalidArgumentException
87
     * @throws RequestException
88
     */
89
    public function orienPlanAuthors(array $params): array
90
    {
91
        return $this->httpPost('buyin/orienPlanAuthors', $params);
92
    }
93
94
    /**
95
     * 团长活动查询接口.
96
     *
97
     * @param  array  $params
98
     * @return array
99
     *
100
     * @throws InvalidArgumentException
101
     * @throws RequestException
102
     */
103
    public function activitySearch(array $params): array
104
    {
105
        return $this->httpPost('buyin/activitySearch', $params);
106
    }
107
108
    /**
109
     * 商品团长活动提报接口.
110
     *
111
     * @param  array  $params
112
     * @return array
113
     *
114
     * @throws InvalidArgumentException
115
     * @throws RequestException
116
     */
117
    public function applyActivities(array $params): array
118
    {
119
        return $this->httpPost('buyin/applyActivities', $params);
120
    }
121
122
    /**
123
     * 创建/修改商品专属推广计划.
124
     *
125
     * @param  array  $params
126
     * @return array
127
     *
128
     * @throws InvalidArgumentException
129
     * @throws RequestException
130
     */
131
    public function exclusivePlan(array $params): array
132
    {
133
        return $this->httpPost('buyin/exclusivePlan', $params);
134
    }
135
136
    /**
137
     * 创建/修改普通商品推广计划.
138
     *
139
     * @param  array  $params
140
     * @return array
141
     *
142
     * @throws InvalidArgumentException
143
     * @throws RequestException
144
     */
145
    public function simplePlan(array $params): array
146
    {
147
        return $this->httpPost('buyin/simplePlan', $params);
148
    }
149
}
150