Skip to content

Commit

Permalink
Merge pull request #4 from Spell6inder/patch-1
Browse files Browse the repository at this point in the history
add trantime column to StatementsResponse
  • Loading branch information
sergeynezbritskiy authored Apr 28, 2018
2 parents 79f344b + b4d4bf5 commit 18fb648
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
9 changes: 5 additions & 4 deletions src/Response/StatementsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class StatementsResponse extends AbstractResponse
* <oper>cmt</oper>
* <info>
* <statements status="excellent" credit="0.0" debet="0.3" >
* <statement card="5168742060221193" appcode="591969" trandate="2013-09-02" amount="0.10 UAH" cardamount="-0.10 UAH" rest="0.95 UAH" terminal="Пополнение мобильного +380139917053 через «Приват24»" description="" />
* <statement card="5168742060221193" appcode="991794" trandate="2013-09-02" amount="0.10 UAH" cardamount="-0.10 UAH" rest="1.05 UAH" terminal="Пополнение мобильного +380139917035 через «Приват24»" description="" />
* <statement card="5168742060221193" appcode="801111" trandate="2013-09-02" amount="0.10 UAH" cardamount="-0.10 UAH" rest="1.15 UAH" terminal="Пополнение мобильного +380139910008 через «Приват24»" description="" />
* <statement card="5168742060221193" appcode="591969" trandate="2013-09-02" trantime="13:29:00" amount="0.10 UAH" cardamount="-0.10 UAH" rest="0.95 UAH" terminal="Пополнение мобильного +380139917053 через «Приват24»" description="" />
* <statement card="5168742060221193" appcode="991794" trandate="2013-09-02" trantime="08:50:00" amount="0.10 UAH" cardamount="-0.10 UAH" rest="1.05 UAH" terminal="Пополнение мобильного +380139917035 через «Приват24»" description="" />
* <statement card="5168742060221193" appcode="801111" trandate="2013-09-02" trantime="13:17:00" amount="0.10 UAH" cardamount="-0.10 UAH" rest="1.15 UAH" terminal="Пополнение мобильного +380139910008 через «Приват24»" description="" />
* </statements>
* </info>
* </data>
Expand All @@ -41,6 +41,7 @@ protected function getMap(): array
'card' => '@card',
'appcode' => '@appcode',
'trandate' => '@trandate',
'trantime' => '@trantime',
'amount' => '@amount',
'cardamount' => '@cardamount',
'rest' => '@rest',
Expand All @@ -49,4 +50,4 @@ protected function getMap(): array
],
];
}
}
}
11 changes: 7 additions & 4 deletions tests/Response/StatementsResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public function testSuccessfulResponse()
<oper>cmt</oper>
<info>
<statements status="excellent" credit="0.0" debet="0.3" >
<statement card="5168742060221193" appcode="591969" trandate="2013-09-02" amount="0.10 UAH" cardamount="-0.10 UAH" rest="0.95 UAH" terminal="Пополнение мобильного +380139917053 через «Приват24»" description="" />
<statement card="5168742060221193" appcode="991794" trandate="2013-09-02" amount="0.10 UAH" cardamount="-0.10 UAH" rest="1.05 UAH" terminal="Пополнение мобильного +380139917035 через «Приват24»" description="" />
<statement card="5168742060221193" appcode="801111" trandate="2013-09-02" amount="0.10 UAH" cardamount="-0.10 UAH" rest="1.15 UAH" terminal="Пополнение мобильного +380139910008 через «Приват24»" description="" />
<statement card="5168742060221193" appcode="591969" trandate="2013-09-02" trantime="13:29:00" amount="0.10 UAH" cardamount="-0.10 UAH" rest="0.95 UAH" terminal="Пополнение мобильного +380139917053 через «Приват24»" description="" />
<statement card="5168742060221193" appcode="991794" trandate="2013-09-02" trantime="13:29:00" amount="0.10 UAH" cardamount="-0.10 UAH" rest="1.05 UAH" terminal="Пополнение мобильного +380139917035 через «Приват24»" description="" />
<statement card="5168742060221193" appcode="801111" trandate="2013-09-02" trantime="13:29:00" amount="0.10 UAH" cardamount="-0.10 UAH" rest="1.15 UAH" terminal="Пополнение мобильного +380139910008 через «Приват24»" description="" />
</statements>
</info>
</data>
Expand All @@ -48,6 +48,7 @@ public function testSuccessfulResponse()
'card' => '5168742060221193',
'appcode' => '591969',
'trandate' => '2013-09-02',
'trantime' => '13:29:00',
'amount' => '0.10 UAH',
'cardamount' => '-0.10 UAH',
'rest' => '0.95 UAH',
Expand All @@ -57,6 +58,7 @@ public function testSuccessfulResponse()
'card' => '5168742060221193',
'appcode' => '991794',
'trandate' => '2013-09-02',
'trantime' => '13:29:00',
'amount' => '0.10 UAH',
'cardamount' => '-0.10 UAH',
'rest' => '1.05 UAH',
Expand All @@ -66,6 +68,7 @@ public function testSuccessfulResponse()
'card' => '5168742060221193',
'appcode' => '801111',
'trandate' => '2013-09-02',
'trantime' => '13:29:00',
'amount' => '0.10 UAH',
'cardamount' => '-0.10 UAH',
'rest' => '1.15 UAH',
Expand All @@ -74,4 +77,4 @@ public function testSuccessfulResponse()
]], $result);
}

}
}

0 comments on commit 18fb648

Please sign in to comment.