digikraaft /
flutterwave-php
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Digikraaft\Flutterwave; |
||
| 4 | |||
| 5 | use Digikraaft\Flutterwave\ApiOperations\Fetch; |
||
| 6 | |||
| 7 | class Chargeback extends ApiResource |
||
| 8 | { |
||
| 9 | const OBJECT_NAME = 'chargebacks'; |
||
| 10 | |||
| 11 | use ApiOperations\All; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @param string $reference |
||
| 15 | * @param array $params |
||
| 16 | * @return array|object |
||
| 17 | * @link https://developer.flutterwave.com/reference#validate-otp-1 |
||
| 18 | */ |
||
| 19 | public static function fetch(string $reference, array $params) |
||
|
0 ignored issues
–
show
|
|||
| 20 | { |
||
| 21 | $url = static::buildQueryString("", $params); |
||
| 22 | |||
| 23 | return static::staticRequest('GET', $url); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $chargeBackId |
||
| 28 | * @return array|object |
||
| 29 | * @link https://developer.flutterwave.com/reference#acceptdecline-a-chargeback |
||
| 30 | */ |
||
| 31 | public static function accept(string $chargeBackId) |
||
| 32 | { |
||
| 33 | $params = [ |
||
| 34 | 'action' => 'accept', |
||
| 35 | ]; |
||
| 36 | $url = static::endPointUrl("{$chargeBackId}"); |
||
| 37 | |||
| 38 | return static::staticRequest('GET', $url, $params); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param string $chargeBackId |
||
| 43 | * @return array|object |
||
| 44 | * @link https://developer.flutterwave.com/reference#acceptdecline-a-chargeback |
||
| 45 | */ |
||
| 46 | public static function decline(string $chargeBackId) |
||
| 47 | { |
||
| 48 | $params = [ |
||
| 49 | 'action' => 'decline', |
||
| 50 | ]; |
||
| 51 | $url = static::endPointUrl("{$chargeBackId}"); |
||
| 52 | |||
| 53 | return static::staticRequest('GET', $url, $params); |
||
| 54 | } |
||
| 55 | } |
||
| 56 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.