1 | <?php namespace SimpleUPS\AddressValidate; |
||
6 | class Address extends \SimpleUPS\InstructionalAddress |
||
7 | { |
||
8 | protected $CLASSIFICATION_UNKNOWN = 0; |
||
9 | |||
10 | protected $CLASSIFICATION_COMMERCIAL = 1; |
||
11 | |||
12 | protected $CLASSIFICATION_RESIDENTIAL = 2; |
||
13 | |||
14 | private $classification; |
||
15 | |||
16 | /** |
||
17 | * @internal |
||
18 | * |
||
19 | * @param integer $classification |
||
20 | * |
||
21 | * @return Address |
||
22 | */ |
||
23 | public function setClassification($classification) |
||
28 | |||
29 | /** |
||
30 | * The classification of a given address by UPS |
||
31 | * @internal |
||
32 | * @return integer |
||
33 | */ |
||
34 | public function getClassification() |
||
38 | |||
39 | /** |
||
40 | * Determine if the address is a commercial location |
||
41 | * It is possible for an address to be "Unknown", meaning it will not be |
||
42 | * either Commercial or Residential. |
||
43 | * This method is only usable when this object is supplied by the |
||
44 | * address validation methods. |
||
45 | * @see \SimpleUPS\AddressValidate\Address::isResidential() |
||
46 | * @see \SimpleUPS\UPS::isValidAddress() |
||
47 | * @return bool |
||
48 | */ |
||
49 | public function isCommercial() |
||
53 | |||
54 | /** |
||
55 | * Determine if the address is a residential location. |
||
56 | * It is possible for an address to be "Unknown", meaning it will not be |
||
57 | * either Commercial or Residential. |
||
58 | * This method is only usable when this object is supplied by the |
||
59 | * address validation methods. |
||
60 | * @see \SimpleUPS\AddressValidate\Address::isCommercial() |
||
61 | * @see \SimpleUPS\UPS::isValidAddress() |
||
62 | * @return bool |
||
63 | */ |
||
64 | public function isResidential() |
||
68 | } |
||
69 |