Completed
Push — master ( 2b02b3...defb0d )
by Lukáš
04:54
created

GetChangedPaymentOptions::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Fousky\Component\iDoklad\Functions\PaymentOptions;
4
5
/**
6
 * @see https://app.idoklad.cz/developer/Help/v2/cs/Api?apiId=GET-api-v2-PaymentOptions-GetChanges_lastCheck
7
 *
8
 * @author Lukáš Brzák <[email protected]>
9
 */
10
class GetChangedPaymentOptions extends GetPaymentOptions
11
{
12
    /** @var \DateTime $lastCheckedAt */
13
    protected $lastCheckedAt;
14
15
    /**
16
     * @param \DateTime $lastCheckedAt
17
     */
18
    public function __construct(\DateTime $lastCheckedAt)
19
    {
20
        $this->lastCheckedAt = $lastCheckedAt;
21
    }
22
23
    /**
24
     * @return string
25
     */
26
    public function getUri(): string
27
    {
28
        return sprintf(
29
            'PaymentOptions/GetChanges?lastCheck=%s',
30
            $this->lastCheckedAt->format('Y-m-d H:i:s')
31
        );
32
    }
33
}
34