Passed
Push — master ( a72252...676227 )
by Gergely
02:22
created

SupportingDocumentGateway::addDocument()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 11
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 6
crap 1
1
<?php
2
/*
3
 * This file is part of the PayBreak/basket 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
 * Supporting Document Gateway
15
 *
16
 * @author EB
17
 * @package PayBreak\Sdk\Gateways
18
 */
19
class SupportingDocumentGateway extends AbstractGateway
20
{
21
    /**
22
     * @author EB
23
     * @param string $token
24
     * @param string $installation
25
     * @param string $application
26
     * @param string $category
27
     * @param string $filename
28
     * @param string $path
29
     * @return array
30
     */
31 1
    public function addDocument($token, $installation, $application, $category, $filename, $path)
32
    {
33 1
        return $this->postDocument(
34 1
            '/v4/installations/' . $installation . '/applications/' . $application . '/supporting-documents',
35
            [
36 1
                'category' => $category,
37 1
                'filename' => $filename,
38 1
                'path' => $path,
39 1
            ],
40 1
            $token,
41
            'Supporting documents'
42 1
        );
43
    }
44
}
45