Total Complexity | 3 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class Biller extends ApiResource |
||
6 | { |
||
7 | const OBJECT_NAME = 'billers'; |
||
8 | |||
9 | use ApiOperations\All; |
||
10 | use ApiOperations\Create; |
||
11 | |||
12 | /** |
||
13 | * @param string $billerCode |
||
14 | * @return array|object |
||
15 | * @link https://developer.flutterwave.com/reference#get-products-under-a-agency |
||
16 | */ |
||
17 | public static function products(string $billerCode) |
||
18 | { |
||
19 | $url = static::endPointUrl("{$billerCode}/products"); |
||
20 | |||
21 | return static::staticRequest('GET', $url); |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @param string $billerCode |
||
26 | * @param string $productCode |
||
27 | * @return array|object |
||
28 | * @link https://developer.flutterwave.com/reference#get-amount-to-be-paid-for-a-product |
||
29 | */ |
||
30 | public static function productAmount(string $billerCode, string $productCode) |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param string $orderId |
||
39 | * @param array $params |
||
40 | * @return array|object |
||
41 | * @link https://developer.flutterwave.com/reference#get-amount-to-be-paid-for-a-product |
||
42 | */ |
||
43 | public static function updateOrder(string $orderId, array $params) |
||
51 |