Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5/** @license For full copyright and license information, please see the LICENSE.md file. */
6
7namespace App\Modules\Integrations\Domain\Contract;
8
9defined('AMMONLY_APP') || exit('Direct script access is forbidden.');
10
11/**
12 * Contract for exchange rates providers (e.g. National Bank of Poland NBP).
13 */
14interface ExchangeRatesProviderInterface
15{
16    /**
17     * Unique driver machine name matching driver in a_mod_integrations_records.
18     */
19    public function getDriver(): string;
20
21    /**
22     * Fetches current mid exchange rates against base currency (e.g. PLN).
23     *
24     * @return array{table: string, effective_date: string, rates: array<string, float>}
25     */
26    public function fetchExchangeRates(): array;
27}