Banka::stahnoutVypisyOnline()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * FlexiPeeHP - Bank Class.
5
 *              Objekt Banky.
6
 *
7
 * @author     Vítězslav Dvořák <[email protected]>
8
 * @copyright  (C) 2015-2017 Spoje.Net
9
 */
10
11
namespace FlexiPeeHP;
12
13
use FlexiPeeHP\Firma;
14
use FlexiPeeHP\RW;
15
use FlexiPeeHP\Stitky;
16
17
/**
18
 * Banka
19
 * 
20
 * @link https://demo.flexibee.eu/c/demo/banka/properties Vlastnosti evidence
21
 */
22
class Banka extends RW
23
{
24
    use Stitky;
25
    use Firma;
26
    
27
    /**
28
     * Evidence užitá objektem.
29
     *
30
     * @var string
31
     */
32
    public $evidence = 'banka';
33
34
    /**
35
     * Stáhne bankovní výpisy  ( trvá delší dobu )
36
     *
37
     * @return boolean
38
     */
39
    public function stahnoutVypisyOnline()
40
    {
41
        $this->performRequest('nacteni-vypisu-online.json', 'PUT', 'txt');
42
        return $this->lastResponseCode == 200;
43
    }
44
45
    /**
46
     * Start invoice automatic matching process ( it takes longer time )
47
     * Spustí proces automatického párování plateb. ( trvá delší dobu )
48
     *
49
     * @link https://demo.flexibee.eu/devdoc/parovani-plateb Interní dokumentace
50
     * 
51
     * @param boolean $advanced Use Advanced matching method ?
52
     * @param string $filter Filter bank records before pairing ?
53
     * 
54
     * @return boolean
55
     */
56
    public function automatickeParovani($advanced = false, $filter = null)
57
    {
58
        $filterUrl = $filter === null ? "" : rtrim($filter, '/') . '/';
59
        $this->performRequest($filterUrl . 'automaticke-parovani'.($advanced ? '-pokrocile' : '' ), 'PUT');
60
        return $this->lastResponseCode == 200;
61
    }
62
}
63