Completed
Pull Request — develop (#42)
by Evan
04:00
created

SupportingDocumentGateway::addDocument()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 12
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 6
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
    public function addDocument($token, $installation, $application, $category, $filename, $path)
32
    {
33
        return $this->postDocument(
34
            '/v4/installations/' . $installation . '/applications/' . $application . '/supporting-documents',
35
            [
36
                'category' => $category,
37
                'filename' => $filename,
38
                'path' => $path,
39
40
            ],
41
            $token,
42
            'Supporting documents'
43
        );
44
    }
45
}
46