Shop::addressCreate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
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 Shop extends BaseRequest
9
{
10
    /**
11
     * 获取店铺的已授权品牌列表.
12
     *
13
     * @throws RequestException
14
     * @throws InvalidArgumentException
15
     *
16
     * @return array
17
     */
18
    public function brandList(): array
19
    {
20
        return $this->httpPost('shop/brandList');
21
    }
22
23
    /**
24
     * 获取店铺后台供商家发布商品的类目.
25
     *
26
     * @param array $params
27
     *
28
     * @throws RequestException
29
     * @throws InvalidArgumentException
30
     *
31
     * @return array
32
     */
33
    public function getShopCategory(array $params): array
34
    {
35
        return $this->httpPost('shop/getShopCategory', $params);
36
    }
37
38
    /**
39
     * 售后地址列表接口.
40
     *
41
     * @param array $params
42
     *
43
     * @throws RequestException
44
     * @throws InvalidArgumentException
45
     *
46
     * @return array
47
     */
48
    public function addressList(array $params): array
49
    {
50
        return $this->httpPost('address/list', $params);
51
    }
52
53
    /**
54
     * 店铺创建售后地址接口.
55
     *
56
     * @param array $params
57
     *
58
     * @throws RequestException
59
     * @throws InvalidArgumentException
60
     *
61
     * @return array
62
     */
63
    public function addressCreate(array $params): array
64
    {
65
        return $this->httpPost('address/create', $params);
66
    }
67
68
    /**
69
     * 店铺创建售后地址接口.
70
     *
71
     * @param array $params
72
     *
73
     * @throws RequestException
74
     * @throws InvalidArgumentException
75
     *
76
     * @return array
77
     */
78
    public function addressUpdate(array $params): array
79
    {
80
        return $this->httpPost('address/update', $params);
81
    }
82
83
    /**
84
     * 设置尾款信息.
85
     *
86
     * @param  array  $params
87
     *
88
     * @return array
89
     * @throws InvalidArgumentException
90
     *
91
     * @throws RequestException
92
     */
93
    public function setFinalPayment(array $params): array
94
    {
95
        return $this->httpPost('shop/setFinalPayment', $params);
96
    }
97
98
    /**
99
     * 查询店铺的应用权益.
100
     *
101
     * @param  array  $params
102
     *
103
     * @return array
104
     * @throws InvalidArgumentException
105
     *
106
     * @throws RequestException
107
     */
108
    public function rightsInfo(array $params): array
109
    {
110
        return $this->httpPost('rights/info', $params);
111
    }
112
}
113