1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace DMT\VatServiceEu\Response; |
4
|
|
|
|
5
|
|
|
use DateTime; |
6
|
|
|
use JMS\Serializer\Annotation as JMS; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Class CheckVatResponse |
10
|
|
|
* |
11
|
|
|
* @JMS\AccessType("public_method") |
12
|
|
|
* @JMS\XmlNamespace("urn:ec.europa.eu:taxud:vies:services:checkVat:types") |
13
|
|
|
* @JMS\XmlRoot("checkVatResponse") |
14
|
|
|
*/ |
15
|
|
|
class CheckVatResponse implements ResponseInterface |
16
|
|
|
{ |
17
|
|
|
/** |
18
|
|
|
* @JMS\Type("string") |
19
|
|
|
* @JMS\XmlElement(cdata=false, namespace="urn:ec.europa.eu:taxud:vies:services:checkVat:types") |
20
|
|
|
* |
21
|
|
|
* @var string |
22
|
|
|
*/ |
23
|
|
|
protected $countryCode; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* @JMS\Type("string") |
27
|
|
|
* @JMS\XmlElement(cdata=false, namespace="urn:ec.europa.eu:taxud:vies:services:checkVat:types") |
28
|
|
|
* |
29
|
|
|
* @var string |
30
|
|
|
*/ |
31
|
|
|
protected $vatNumber; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @JMS\Type("DateTime<'Y-m-dP'>") |
35
|
|
|
* @JMS\XmlElement(cdata=false, namespace="urn:ec.europa.eu:taxud:vies:services:checkVat:types") |
36
|
|
|
* |
37
|
|
|
* @var DateTime |
38
|
|
|
*/ |
39
|
|
|
protected $requestDate; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* @JMS\Type("boolean") |
43
|
|
|
* @JMS\XmlElement(cdata=false, namespace="urn:ec.europa.eu:taxud:vies:services:checkVat:types") |
44
|
|
|
* |
45
|
|
|
* @var boolean |
46
|
|
|
*/ |
47
|
|
|
protected $valid; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* @JMS\Type("string") |
51
|
|
|
* @JMS\XmlElement(cdata=false, namespace="urn:ec.europa.eu:taxud:vies:services:checkVat:types") |
52
|
|
|
* |
53
|
|
|
* @var string |
54
|
|
|
*/ |
55
|
|
|
protected $name; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @JMS\Type("string") |
59
|
|
|
* @JMS\XmlElement(cdata=false, namespace="urn:ec.europa.eu:taxud:vies:services:checkVat:types") |
60
|
|
|
* |
61
|
|
|
* @var string |
62
|
|
|
*/ |
63
|
|
|
protected $address; |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* @return string |
67
|
|
|
*/ |
68
|
2 |
|
public function getCountryCode(): ?string |
69
|
|
|
{ |
70
|
2 |
|
return $this->countryCode; |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* @param string $countryCode |
75
|
|
|
*/ |
76
|
2 |
|
public function setCountryCode(string $countryCode): void |
77
|
|
|
{ |
78
|
2 |
|
$this->countryCode = $countryCode; |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* @return string |
83
|
|
|
*/ |
84
|
2 |
|
public function getVatNumber(): ?string |
85
|
|
|
{ |
86
|
2 |
|
return $this->vatNumber; |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* @param string $vatNumber |
91
|
|
|
*/ |
92
|
2 |
|
public function setVatNumber(string $vatNumber): void |
93
|
|
|
{ |
94
|
2 |
|
$this->vatNumber = $vatNumber; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* @return DateTime |
99
|
|
|
*/ |
100
|
1 |
|
public function getRequestDate(): ?DateTime |
101
|
|
|
{ |
102
|
1 |
|
return $this->requestDate; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* @param DateTime $requestDate |
107
|
|
|
*/ |
108
|
2 |
|
public function setRequestDate(DateTime $requestDate): void |
109
|
|
|
{ |
110
|
2 |
|
$this->requestDate = $requestDate; |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* @return bool |
115
|
|
|
*/ |
116
|
2 |
|
public function isValid(): ?bool |
117
|
|
|
{ |
118
|
2 |
|
return $this->valid; |
119
|
|
|
} |
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* @param bool $valid |
123
|
|
|
*/ |
124
|
2 |
|
public function setValid(bool $valid): void |
125
|
|
|
{ |
126
|
2 |
|
$this->valid = $valid; |
127
|
|
|
} |
128
|
|
|
|
129
|
|
|
/** |
130
|
|
|
* @return string |
131
|
|
|
*/ |
132
|
1 |
|
public function getName(): ?string |
133
|
|
|
{ |
134
|
1 |
|
return $this->name; |
135
|
|
|
} |
136
|
|
|
|
137
|
|
|
/** |
138
|
|
|
* @param string $name |
139
|
|
|
*/ |
140
|
2 |
|
public function setName(string $name): void |
141
|
|
|
{ |
142
|
2 |
|
$this->name = $name; |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* @return string |
147
|
|
|
*/ |
148
|
1 |
|
public function getAddress(): ?string |
149
|
|
|
{ |
150
|
1 |
|
return $this->address; |
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
/** |
154
|
|
|
* @param string $address |
155
|
|
|
*/ |
156
|
2 |
|
public function setAddress(string $address): void |
157
|
|
|
{ |
158
|
2 |
|
$this->address = $address; |
159
|
|
|
} |
160
|
|
|
} |
161
|
|
|
|