1 | <?php namespace Ups\Entity\AddressValidation; |
||
3 | class AVAddress |
||
4 | { |
||
5 | /** |
||
6 | * @var null|AddressClassification |
||
7 | */ |
||
8 | public $addressClassification; |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | public $consigneeName; |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | public $buildingName; |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | public $addressLine; |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | public $addressLine2; |
||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | public $addressLine3; |
||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | public $region; |
||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | public $politicalDivision2; |
||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | public $politicalDivision1; |
||
41 | /** |
||
42 | * @var string |
||
43 | */ |
||
44 | public $postcodePrimaryLow; |
||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | public $postcodeExtendedLow; |
||
49 | /** |
||
50 | * @var string |
||
51 | */ |
||
52 | public $urbanization; |
||
53 | /** |
||
54 | * @var |
||
55 | */ |
||
56 | public $countryCode; |
||
57 | |||
58 | /** |
||
59 | * Address constructor. |
||
60 | * @param \SimpleXMLElement $xmlDoc |
||
61 | */ |
||
62 | 2 | public function __construct(\SimpleXMLElement $xmlDoc) |
|
84 | |||
85 | /** |
||
86 | * Convenience methods. Even though all properties are public, these methods provide a convenient interface to |
||
87 | * retrieve commonly requested parts so that the user doesn't have to remember which API fields reference |
||
88 | * which piece of information. For example, I won't have to remember that the city is in 'PoliticalDivision2'. |
||
89 | */ |
||
90 | |||
91 | /** |
||
92 | * @return string |
||
93 | */ |
||
94 | 1 | public function getCity() |
|
98 | |||
99 | /** |
||
100 | * @return string |
||
101 | */ |
||
102 | public function getRegion() |
||
106 | |||
107 | /** |
||
108 | * @return string |
||
109 | */ |
||
110 | public function getConsigneeName() |
||
114 | |||
115 | /** |
||
116 | * @return string |
||
117 | */ |
||
118 | public function getUrbanization() |
||
122 | |||
123 | /** |
||
124 | * @return string |
||
125 | */ |
||
126 | public function getBuildingName() |
||
130 | |||
131 | /** |
||
132 | * @return string |
||
133 | */ |
||
134 | 1 | public function getStateProvince() |
|
138 | |||
139 | /** |
||
140 | * Return the address postal code |
||
141 | * |
||
142 | * @return string |
||
143 | */ |
||
144 | 1 | public function getPostalCode() |
|
148 | |||
149 | /** |
||
150 | * Return the address postal code with extension (i.e. the U.S. extended zip+4 postal code) |
||
151 | * |
||
152 | * @param string $divider |
||
153 | * @return string |
||
154 | */ |
||
155 | 1 | public function getPostalCodeWithExtension($divider = '-') |
|
159 | |||
160 | /** |
||
161 | * @return string |
||
162 | * |
||
163 | * @param int $lineNumber |
||
164 | * @return string |
||
165 | */ |
||
166 | public function getAddressLine($lineNumber = 1) |
||
171 | } |
||
172 |