|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace ZpgRtf\Objects; |
|
4
|
|
|
|
|
5
|
|
|
/** |
|
6
|
|
|
* This object describes any ongoing service charges which are applicable. Note that you can only specify one of |
|
7
|
|
|
* per_unit_area_units or frequency. |
|
8
|
|
|
*/ |
|
9
|
|
|
class ServiceChargeObject implements \JsonSerializable |
|
10
|
|
|
{ |
|
11
|
|
|
/** @var float */ |
|
12
|
|
|
private $charge; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* Enum (sq_feet, sq_yards, sq_metres, acres, hectares) |
|
16
|
|
|
* |
|
17
|
|
|
* @var string |
|
18
|
|
|
*/ |
|
19
|
|
|
private $perUnitAreaUnits; |
|
20
|
|
|
|
|
21
|
|
|
/** |
|
22
|
|
|
* Enum (per_person_per_week, per_week, per_month, per_quarter, per_year) |
|
23
|
|
|
* |
|
24
|
|
|
* @var string |
|
25
|
|
|
*/ |
|
26
|
|
|
private $frequency; |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* @return float |
|
30
|
|
|
*/ |
|
31
|
2 |
|
public function getCharge() |
|
32
|
|
|
{ |
|
33
|
2 |
|
return $this->charge; |
|
34
|
|
|
} |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* @param float $charge |
|
38
|
|
|
* |
|
39
|
|
|
* @return ServiceChargeObject |
|
40
|
|
|
*/ |
|
41
|
1 |
|
public function setCharge($charge) |
|
42
|
|
|
{ |
|
43
|
1 |
|
$this->charge = $charge; |
|
44
|
|
|
|
|
45
|
1 |
|
return $this; |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @return string |
|
50
|
|
|
*/ |
|
51
|
2 |
|
public function getPerUnitAreaUnits() |
|
52
|
|
|
{ |
|
53
|
2 |
|
return $this->perUnitAreaUnits; |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* @param string $perUnitAreaUnits |
|
58
|
|
|
* |
|
59
|
|
|
* @return ServiceChargeObject |
|
60
|
|
|
*/ |
|
61
|
1 |
|
public function setPerUnitAreaUnits($perUnitAreaUnits) |
|
62
|
|
|
{ |
|
63
|
1 |
|
$this->perUnitAreaUnits = $perUnitAreaUnits; |
|
64
|
|
|
|
|
65
|
1 |
|
return $this; |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
/** |
|
69
|
|
|
* @return string |
|
70
|
|
|
*/ |
|
71
|
2 |
|
public function getFrequency() |
|
72
|
|
|
{ |
|
73
|
2 |
|
return $this->frequency; |
|
74
|
|
|
} |
|
75
|
|
|
|
|
76
|
|
|
/** |
|
77
|
|
|
* @param string $frequency |
|
78
|
|
|
* |
|
79
|
|
|
* @return ServiceChargeObject |
|
80
|
|
|
*/ |
|
81
|
1 |
|
public function setFrequency($frequency) |
|
82
|
|
|
{ |
|
83
|
1 |
|
$this->frequency = $frequency; |
|
84
|
|
|
|
|
85
|
1 |
|
return $this; |
|
86
|
|
|
} |
|
87
|
|
|
|
|
88
|
|
|
/** {@inheritDoc} */ |
|
89
|
1 |
|
public function jsonSerialize() |
|
90
|
|
|
{ |
|
91
|
|
|
return [ |
|
92
|
1 |
|
'charge' => $this->getCharge(), |
|
93
|
1 |
|
'per_unit_area_units' => $this->getPerUnitAreaUnits(), |
|
94
|
1 |
|
'frequency' => $this->getFrequency(), |
|
95
|
|
|
]; |
|
96
|
|
|
} |
|
97
|
|
|
} |
|
98
|
|
|
|