. */ declare(strict_types=1); namespace FireflyIII\Services\Bunq; use bunq\Model\Generated\Endpoint\BunqResponsePaymentList; use bunq\Model\Generated\Endpoint\Payment as BunqPayment; use Exception; use FireflyIII\Exceptions\FireflyException; /** * Class Payment * @codeCoverageIgnore */ class Payment { /** * @param int|null $monetaryAccountId * @param array|null $params * @param array|null $customHeaders * * @throws FireflyException * @return BunqResponsePaymentList */ public function listing(int $monetaryAccountId = null, array $params = null, array $customHeaders = null): BunqResponsePaymentList { $monetaryAccountId = $monetaryAccountId ?? 0; $params = $params ?? []; $customHeaders = $customHeaders ?? []; try { $result = BunqPayment::listing($monetaryAccountId, $params, $customHeaders); } catch (Exception $e) { throw new FireflyException($e->getMessage()); } return $result; } }