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) |
|
89 | |||
90 | /** |
||
91 | * Convenience methods. Even though all properties are public, these methods provide a convenient interface to |
||
92 | * retrieve commonly requested parts so that the user doesn't have to remember which API fields reference |
||
93 | * which piece of information. For example, I won't have to remember that the city is in 'PoliticalDivision2'. |
||
94 | */ |
||
95 | |||
96 | /** |
||
97 | * @return string |
||
98 | */ |
||
99 | 1 | public function getCity() |
|
103 | |||
104 | /** |
||
105 | * @return string |
||
106 | */ |
||
107 | 1 | public function getStateProvince() |
|
111 | |||
112 | /** |
||
113 | * Return the address postal code |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | 1 | public function getPostalCode() |
|
121 | |||
122 | /** |
||
123 | * Return the address postal code with extension (i.e. the U.S. extended zip+4 postal code) |
||
124 | * |
||
125 | * @param string $divider |
||
126 | * @return string |
||
127 | */ |
||
128 | 1 | public function getPostalCodeWithExtension($divider = '-') |
|
132 | } |
||
133 |