Total Complexity | 3 |
Total Lines | 61 |
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?page_size={$this->page_size}"; |
||
19 | |||
20 | $this->verb = 'get'; |
||
21 | |||
22 | return $this->doPayPalRequest(); |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * Update a dispute. |
||
27 | * |
||
28 | * @param string $dispute_id |
||
29 | * @param array $data |
||
30 | * |
||
31 | * @throws \Throwable |
||
32 | * |
||
33 | * @return array|\Psr\Http\Message\StreamInterface|string |
||
34 | * |
||
35 | * @see https://developer.paypal.com/docs/api/customer-disputes/v1/#disputes_patch |
||
36 | */ |
||
37 | public function updateDispute(string $dispute_id, array $data) |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * Get dispute details. |
||
50 | * |
||
51 | * @param string $dispute_id |
||
52 | * |
||
53 | * @throws \Throwable |
||
54 | * |
||
55 | * @return array|\Psr\Http\Message\StreamInterface|string |
||
56 | * |
||
57 | * @see https://developer.paypal.com/docs/api/customer-disputes/v1/#disputes_get |
||
58 | */ |
||
59 | public function showDisputeDetails(string $dispute_id) |
||
68 |