From 088323deb24f2587dd20cc3eee6984a911c65c96 Mon Sep 17 00:00:00 2001 From: Jiri Dajc Date: Mon, 3 Jun 2024 10:21:58 +0200 Subject: [PATCH 1/2] Fio API URL changed. --- src/FioApi/UrlBuilder.php | 2 +- tests/FioApi/UrlBuilderTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FioApi/UrlBuilder.php b/src/FioApi/UrlBuilder.php index 8a065f1..ca95c36 100644 --- a/src/FioApi/UrlBuilder.php +++ b/src/FioApi/UrlBuilder.php @@ -5,7 +5,7 @@ class UrlBuilder { - const BASE_URL = 'https://www.fio.cz/ib_api/rest/'; + const BASE_URL = 'https://fioapi.fio.cz/v1/rest/'; /** * @var string diff --git a/tests/FioApi/UrlBuilderTest.php b/tests/FioApi/UrlBuilderTest.php index 4e6ddd9..1b19c62 100644 --- a/tests/FioApi/UrlBuilderTest.php +++ b/tests/FioApi/UrlBuilderTest.php @@ -29,7 +29,7 @@ public function testBuildPeriodsUrlReturnValidUrl() { $urlBuilder = new UrlBuilder('token1'); $this->assertEquals( - 'https://www.fio.cz/ib_api/rest/periods/token1/2015-03-25/2015-03-31/transactions.json', + 'https://fioapi.fio.cz/v1/rest/periods/token1/2015-03-25/2015-03-31/transactions.json', $urlBuilder->buildPeriodsUrl(new \DateTime('2015-03-25'), new \DateTime('2015-03-31')) ); } From 8de34d28e5e80c7d3b58df0e0c1ae11070f83ab1 Mon Sep 17 00:00:00 2001 From: Jiri Dajc Date: Mon, 3 Jun 2024 11:20:50 +0200 Subject: [PATCH 2/2] SenderName added to Transaction class --- src/FioApi/Transaction.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/FioApi/Transaction.php b/src/FioApi/Transaction.php index 7abe1e1..2a2d4e5 100644 --- a/src/FioApi/Transaction.php +++ b/src/FioApi/Transaction.php @@ -24,6 +24,9 @@ class Transaction /** @var string */ protected $senderBankName; + /** @var string */ + protected $senderName; + /** @var int */ protected $constantSymbol; @@ -62,6 +65,7 @@ protected function __construct( $senderAccountNumber, $senderBankCode, $senderBankName, + $senderName, $constantSymbol, $variableSymbol, $specificSymbol, @@ -80,6 +84,7 @@ protected function __construct( $this->senderAccountNumber = $senderAccountNumber; $this->senderBankCode = $senderBankCode; $this->senderBankName = $senderBankName; + $this->senderName = $senderName; $this->constantSymbol = $constantSymbol; $this->variableSymbol = $variableSymbol; $this->specificSymbol = $specificSymbol; @@ -106,6 +111,7 @@ public static function create(\stdClass $data) !empty($data->column2) ? $data->column2->value : null, //Protiúčet !empty($data->column3) ? $data->column3->value : null, //Kód banky !empty($data->column12) ? $data->column12->value : null, //Název banky + !empty($data->column10) ? $data->column10->value : null, //Název protiuctu !empty($data->column4) ? $data->column4->value : null, //KS !empty($data->column5) ? $data->column5->value : null, //VS !empty($data->column6) ? $data->column6->value : null, //SS @@ -175,6 +181,14 @@ public function getSenderBankName() return $this->senderBankName; } + /** + * @return string + */ + public function getSenderName() + { + return $this->senderName; + } + /** * @return int */