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