| Total Complexity | 3 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Payment extends ApiResource |
||
| 10 | { |
||
| 11 | const OBJECT_NAME = 'payments'; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @param array $params |
||
| 15 | * @return array|object |
||
| 16 | * @throws Exceptions\InvalidArgumentException |
||
| 17 | * @throws Exceptions\IsNullException |
||
| 18 | * @link https://docs.mono.co/reference#initiate-payment |
||
| 19 | */ |
||
| 20 | public static function initiate(array $params) |
||
| 21 | { |
||
| 22 | $url = self::endPointUrl("initiate"); |
||
| 23 | |||
| 24 | return self::staticRequest('POST', $url, $params); |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $paymentId |
||
| 29 | * @return array|object |
||
| 30 | * @throws Exceptions\InvalidArgumentException |
||
| 31 | * @throws Exceptions\IsNullException |
||
| 32 | * @link https://docs.mono.co/reference#pull-status |
||
| 33 | */ |
||
| 34 | public static function onetimeDebitStatus(string $paymentId) |
||
| 35 | { |
||
| 36 | $url = self::endPointUrl("debits/{$paymentId}"); |
||
| 37 | |||
| 38 | return self::staticRequest('GET', $url); |
||
| 39 | } |
||
| 40 | |||
| 41 | public static function recurringDebitStatus(string $paymentId) |
||
| 46 | } |
||
| 47 | } |
||
| 48 |