1 | <?php namespace Ups\Entity\AddressValidation; |
||
3 | class AVAddress |
||
4 | { |
||
5 | public $addressClassification; |
||
6 | public $consigneeName; |
||
7 | public $buildingName; |
||
8 | public $addressLine; |
||
9 | public $region; |
||
10 | public $politicalDivision2; |
||
11 | public $politicalDivision1; |
||
12 | public $postcodePrimaryLow; |
||
13 | public $postcodeExtendedLow; |
||
14 | public $urbanization; |
||
15 | public $countryCode; |
||
16 | |||
17 | /** |
||
18 | * Address constructor. |
||
19 | * @param \SimpleXMLElement $xmlDoc |
||
20 | */ |
||
21 | 2 | public function __construct(\SimpleXMLElement $xmlDoc) |
|
38 | |||
39 | /** |
||
40 | * Convenience methods. Even though all properties are public, these methods provide a convenient interface to |
||
41 | * retrieve commonly requested parts so that the user doesn't have to remember which API fields reference |
||
42 | * which piece of information. For example, I won't have to remember that the city is in 'PoliticalDivision2'. |
||
43 | */ |
||
44 | |||
45 | /** |
||
46 | * @return string |
||
47 | */ |
||
48 | 1 | public function getCity() |
|
52 | |||
53 | /** |
||
54 | * @return string |
||
55 | */ |
||
56 | 1 | public function getStateProvince() |
|
60 | |||
61 | /** |
||
62 | * @param bool $withExtended |
||
63 | * @param string $extendedDivider |
||
64 | * @return string |
||
65 | */ |
||
66 | 1 | public function getPostalCode($withExtended = false, $extendedDivider = '-') |
|
73 | } |
||
74 |