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

CrossBorder   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 112
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 112
rs 10
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A queryBalance() 0 3 1
A stockTaking() 0 3 1
A orderList() 0 3 1
A orderConfirm() 0 3 1
A stockTransform() 0 3 1
A OrderInterception() 0 3 1
A bankAccountVerify() 0 3 1
A warehouseInOutboundEvent() 0 3 1
1
<?php
2
3
namespace Abbotton\DouDian\Api;
4
5
use Illuminate\Http\Client\RequestException;
6
use Psr\SimpleCache\InvalidArgumentException;
7
8
class CrossBorder extends BaseRequest
9
{
10
    /**
11
     * 查询跨境商家资金信息接口.
12
     *
13
     * @param  array  $params
14
     * @return array
15
     *
16
     * @throws RequestException
17
     * @throws InvalidArgumentException
18
     */
19
    public function queryBalance(array $params): array
20
    {
21
        return $this->httpPost('crossBorder/queryBalance', $params);
22
    }
23
24
    /**
25
     * 银行信息校验.
26
     *
27
     * @param  array  $params
28
     * @return array
29
     *
30
     * @throws RequestException
31
     * @throws InvalidArgumentException
32
     */
33
    public function bankAccountVerify(array $params): array
34
    {
35
        return $this->httpPost('crossBorder/bankAccountVerify', $params);
36
    }
37
38
    /**
39
     * 查询跨境订单列表.
40
     *
41
     * @param  array  $params
42
     * @return array
43
     *
44
     * @throws InvalidArgumentException
45
     * @throws RequestException
46
     */
47
    public function orderList(array $params): array
48
    {
49
        return $this->httpPost('crossBorder/orderList', $params);
50
    }
51
52
    /**
53
     * 商家接单.
54
     *
55
     * @param  array  $params
56
     * @return array
57
     *
58
     * @throws InvalidArgumentException
59
     * @throws RequestException
60
     */
61
    public function orderConfirm(array $params): array
62
    {
63
        return $this->httpPost('dutyFree/orderConfirm', $params);
64
    }
65
66
    /**
67
     * 入库和提货出库回告.
68
     *
69
     * @param  array  $params
70
     * @return array
71
     *
72
     * @throws InvalidArgumentException
73
     * @throws RequestException
74
     */
75
    public function warehouseInOutboundEvent(array $params): array
76
    {
77
        return $this->httpPost('crossborder/warehouseInOutboundEvent', $params);
78
    }
79
80
    /**
81
     * 库存盘点回告.
82
     *
83
     * @param  array  $params
84
     * @return array
85
     *
86
     * @throws InvalidArgumentException
87
     * @throws RequestException
88
     */
89
    public function stockTaking(array $params): array
90
    {
91
        return $this->httpPost('crossborder/stockTaking', $params);
92
    }
93
94
    /**
95
     * 库存类型变动回告.
96
     *
97
     * @param  array  $params
98
     * @return array
99
     *
100
     * @throws InvalidArgumentException
101
     * @throws RequestException
102
     */
103
    public function stockTransform(array $params): array
104
    {
105
        return $this->httpPost('crossborder/stockTransform', $params);
106
    }
107
108
    /**
109
     * 服务商锁单结果回告.
110
     *
111
     * @param  array  $params
112
     * @return array
113
     *
114
     * @throws InvalidArgumentException
115
     * @throws RequestException
116
     */
117
    public function OrderInterception(array $params): array
118
    {
119
        return $this->httpPost('crossborder/OrderInterception', $params);
120
    }
121
}
122