IssuedDocumentPaymentApiModelInsert   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 72
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setElectronicRecordsOfSales() 0 6 1
A getModelMap() 0 6 1
A getDateMap() 0 7 1
1
<?php
2
3
namespace Fousky\Component\iDoklad\Model\IssuedDocumentPayments;
4
5
use Fousky\Component\iDoklad\Model\iDokladAbstractModel;
6
use Fousky\Component\iDoklad\Model\RegisteredSale\ElectronicRecordsOfSalesApiModel;
7
use Symfony\Component\Validator\Constraints as Assert;
8
9
/**
10
 * @method null|\DateTime getDateOfPayment()
11
 * @method null|\DateTime getDateOfVatApplication()
12
 * @method null|ElectronicRecordsOfSalesApiModel getElectronicRecordsOfSales()
13
 * @method null|int getInvoiceId()
14
 * @method null|float getPaymentAmount()
15
 * @method null|int getPaymentOptionId()
16
 * @method null|int getSalesPosEquipmentId()
17
 *
18
 * @author Lukáš Brzák <[email protected]>
19
 */
20
class IssuedDocumentPaymentApiModelInsert extends iDokladAbstractModel
21
{
22
    /**
23
     * @Assert\DateTime()
24
     */
25
    public $DateOfPayment;
26
27
    /**
28
     * @Assert\DateTime()
29
     */
30
    public $DateOfVatApplication;
31
32
    /**
33
     * @var null|ElectronicRecordsOfSalesApiModel
34
     * @Assert\Valid()
35
     */
36
    public $ElectronicRecordsOfSales;
37
38
    /**
39
     * @Assert\NotBlank()
40
     * @Assert\Type(type="int")
41
     */
42
    public $InvoiceId;
43
44
    /**
45
     * @Assert\Type(type="float")
46
     */
47
    public $PaymentAmount;
48
49
    /**
50
     * @Assert\Type(type="int")
51
     */
52
    public $PaymentOptionId;
53
54
    /**
55
     * @Assert\Type(type="int")
56
     */
57
    public $SalesPosEquipmentId;
58
59
    /**
60
     * @param ElectronicRecordsOfSalesApiModel $ElectronicRecordsOfSales
61
     *
62
     * @return $this
63
     */
64
    public function setElectronicRecordsOfSales(ElectronicRecordsOfSalesApiModel $ElectronicRecordsOfSales)
65
    {
66
        $this->ElectronicRecordsOfSales = $ElectronicRecordsOfSales;
67
68
        return $this;
69
    }
70
71
    /**
72
     * @return array
73
     */
74
    public static function getModelMap(): array
75
    {
76
        return [
77
            'ElectronicRecordsOfSales' => ElectronicRecordsOfSalesApiModel::class,
78
        ];
79
    }
80
81
    /**
82
     * @return array
83
     */
84
    public static function getDateMap(): array
85
    {
86
        return [
87
            'DateOfPayment',
88
            'DateOfVatApplication',
89
        ];
90
    }
91
}
92