CreditInfoGateway::getCreditInfo()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 7
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 1
1
<?php
2
/*
3
* This file is part of the PayBreak/paybreak-sdk-php package.
4
*
5
* (c) PayBreak <[email protected]>
6
*
7
* For the full copyright and license information, please view the LICENSE
8
* file that was distributed with this source code.
9
*/
10
11
namespace PayBreak\Sdk\Gateways;
12
13
/**
14
 * Credit Info Gateway
15
 *
16
 * @author WN
17
 * @package PayBreak\Sdk\Gateways
18
 */
19
class CreditInfoGateway extends AbstractGateway
20
{
21
    /**
22
     * @author WN
23
     * @param string $installation
24
     * @param int $amount
25
     * @param string $token
26
     * @return array
27
     * @throws \App\Exceptions\Exception
28
     */
29 1
    public function getCreditInfo($installation, $amount, $token)
30
    {
31 1
        return $this->fetchDocument(
32 1
            '/v4/installations/' . $installation . '/credit-information',
33 1
            $token,
34 1
            'Application',
35 1
            ['order_amount' => $amount]
36 1
        );
37
    }
38
}
39