Total Complexity | 3 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | trait Disputes |
||
6 | { |
||
7 | /** |
||
8 | * List disputes. |
||
9 | * |
||
10 | * @throws \Throwable |
||
11 | * |
||
12 | * @return array|\Psr\Http\Message\StreamInterface|string |
||
13 | * |
||
14 | * @see https://developer.paypal.com/docs/api/customer-disputes/v1/#disputes_list |
||
15 | */ |
||
16 | public function listDisputes() |
||
17 | { |
||
18 | $this->apiEndPoint = "v1/customer/disputes"; |
||
1 ignored issue
–
show
|
|||
19 | $this->apiUrl = collect([$this->apiUrl, $this->apiEndPoint])->implode('/'); |
||
1 ignored issue
–
show
|
|||
20 | |||
21 | $this->verb = 'get'; |
||
1 ignored issue
–
show
|
|||
22 | |||
23 | return $this->doPayPalRequest(); |
||
1 ignored issue
–
show
|
|||
24 | } |
||
25 | |||
26 | /** |
||
27 | * Update a dispute. |
||
28 | * |
||
29 | * @param array $data |
||
30 | * @param string $dispute_id |
||
31 | * |
||
32 | * @throws \Throwable |
||
33 | * |
||
34 | * @return array|\Psr\Http\Message\StreamInterface|string |
||
35 | * |
||
36 | * @see https://developer.paypal.com/docs/api/customer-disputes/v1/#disputes_patch |
||
37 | */ |
||
38 | public function updateDispute(array $data, $dispute_id) |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * Get dispute details. |
||
52 | * |
||
53 | * @param string $dispute_id |
||
54 | * |
||
55 | * @throws \Throwable |
||
56 | * |
||
57 | * @return array|\Psr\Http\Message\StreamInterface|string |
||
58 | * |
||
59 | * @see https://developer.paypal.com/docs/api/customer-disputes/v1/#disputes_get |
||
60 | */ |
||
61 | public function showDisputeDetails($dispute_id) |
||
71 |