Smlouva::generovaniFaktur()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 2
nc 1
nop 0
1
<?php
2
/**
3
 * FlexiPeeHP - Contract Class.
4
 *              Objekt Smlouvy.
5
 *
6
 * @author     Vítězslav Dvořák <[email protected]>
7
 * @copyright  (C) 2018 Spoje.Net
8
 */
9
10
namespace FlexiPeeHP;
11
12
/**
13
 * Smlouva
14
 * 
15
 * @link https://demo.flexibee.eu/c/demo/smlouva/properties Vlastnosti evidence
16
 */
17
class Smlouva extends RW
18
{
19
20
    use Stitky;
21
    use Firma;
22
    /**
23
     * Evidence užitá objektem.
24
     *
25
     * @var string
26
     */
27
    public $evidence = 'smlouva';
28
29
    /**
30
     * Generuje faktury ze smluv. Pokud je nastaven sloupec <strong>id</strong> generují se pouze z této smlouvy.
31
     *
32
     * @link https://www.flexibee.eu/api/dokumentace/ref/generovani-faktur/ Interní dokumentace
33
     * 
34
     * @return boolean
35
     */
36
    public function generovaniFaktur()
37
    {
38
        $this->performRequest(($this->getMyKey() ? $this->getMyKey().'/' : '' ).'generovani-faktur',
39
            'PUT');
40
        return $this->lastResponseCode == 200;
41
    }
42
}
43