1 | <?php |
||
12 | class Invoice |
||
13 | { |
||
14 | /** |
||
15 | * @var string Invoice serial number |
||
16 | */ |
||
17 | private $serial; |
||
18 | |||
19 | /** |
||
20 | * @var Seller Registered seller |
||
21 | */ |
||
22 | private $seller; |
||
23 | |||
24 | /** |
||
25 | * @var Buyer Registered buyer |
||
26 | */ |
||
27 | private $buyer; |
||
28 | |||
29 | /** |
||
30 | * @var string Message to buyer |
||
31 | */ |
||
32 | private $message; |
||
33 | |||
34 | /** |
||
35 | * @var string Payment reference number |
||
36 | */ |
||
37 | private $ocr; |
||
38 | |||
39 | /** |
||
40 | * @var ItemBasket Container for charged items |
||
41 | */ |
||
42 | private $itemBasket = []; |
||
43 | |||
44 | /** |
||
45 | * @var \DateTime Creation date |
||
46 | */ |
||
47 | private $billDate; |
||
48 | |||
49 | /** |
||
50 | * @var integer Number of days before invoice expires |
||
51 | */ |
||
52 | private $expiresAfter; |
||
53 | |||
54 | /** |
||
55 | * @var Amount Prepaid amound to deduct |
||
56 | */ |
||
57 | private $deduction; |
||
58 | |||
59 | /** |
||
60 | * @var string 3-letter ISO 4217 currency code indicating currency |
||
61 | */ |
||
62 | private $currency; |
||
63 | |||
64 | /** |
||
65 | * Construct invoice |
||
66 | * |
||
67 | * @param string $serial Invoice serial number |
||
68 | * @param Seller $seller Registered seller |
||
69 | * @param Buyer $buyer Registered buyer |
||
70 | * @param string $message Invoice message |
||
71 | * @param string $ocr Payment reference number |
||
72 | * @param ItemBasket $itemBasket Container for charged items |
||
73 | * @param \DateTime|null $billDate Date of invoice creation |
||
74 | * @param integer $expiresAfter Nr of days before invoice expires |
||
75 | * @param Amount|null $deduction Prepaid amound to deduct |
||
76 | * @param string $currency 3-letter ISO 4217 currency code indicating currency |
||
77 | */ |
||
78 | 15 | public function __construct( |
|
101 | |||
102 | /** |
||
103 | * Get invoice serial number |
||
104 | */ |
||
105 | 1 | public function getSerial(): string |
|
109 | |||
110 | /** |
||
111 | * Get seller |
||
112 | */ |
||
113 | 1 | public function getSeller(): Seller |
|
117 | |||
118 | /** |
||
119 | * Get buyer |
||
120 | */ |
||
121 | 1 | public function getBuyer(): Buyer |
|
125 | |||
126 | /** |
||
127 | * Get invoice message |
||
128 | */ |
||
129 | 2 | public function getMessage(): string |
|
133 | |||
134 | /** |
||
135 | * Get invoice reference number |
||
136 | */ |
||
137 | 4 | public function getOcr(): string |
|
141 | |||
142 | /** |
||
143 | * Get item container |
||
144 | */ |
||
145 | 2 | public function getItems(): ItemBasket |
|
149 | |||
150 | /** |
||
151 | * Get charged amount (including VAT and deduction) |
||
152 | */ |
||
153 | 1 | public function getInvoiceTotal(): Amount |
|
157 | |||
158 | /** |
||
159 | * Get date of invoice creation |
||
160 | */ |
||
161 | 3 | public function getBillDate(): \DateTime |
|
165 | |||
166 | /** |
||
167 | * Get number of days before invoice expires |
||
168 | */ |
||
169 | 2 | public function getExpiresAfter(): int |
|
173 | |||
174 | /** |
||
175 | * Get date when invoice expires |
||
176 | */ |
||
177 | 1 | public function getExpirationDate(): \DateTime |
|
184 | |||
185 | /** |
||
186 | * Get prepaid amound to deduct |
||
187 | */ |
||
188 | 3 | public function getDeduction(): Amount |
|
192 | |||
193 | /** |
||
194 | * Get the 3-letter ISO 4217 currency code indicating the invoice currency |
||
195 | */ |
||
196 | 2 | public function getCurrency(): string |
|
200 | } |
||
201 |