@@ 76-84 (lines=9) @@ | ||
73 | * @throws \SimpleUPS\Api\InvalidParameterException |
|
74 | * @return Address |
|
75 | */ |
|
76 | public function setCity($city) |
|
77 | { |
|
78 | if (!$this->isResponse() && $city != null && strlen($city) > 40) { |
|
79 | throw new InvalidParameterException('City must be between 1-40 characters'); |
|
80 | } |
|
81 | ||
82 | $this->city = (string)$city; |
|
83 | return $this; |
|
84 | } |
|
85 | ||
86 | /** |
|
87 | * Get the city |
|
@@ 104-111 (lines=8) @@ | ||
101 | * @throws \SimpleUPS\Api\InvalidParameterException |
|
102 | * @return Address |
|
103 | */ |
|
104 | public function setStateProvinceCode($stateProvinceCode) |
|
105 | { |
|
106 | if (!$this->isResponse() && $stateProvinceCode != null && strlen($stateProvinceCode) != 2) |
|
107 | throw new InvalidParameterException('State/Province Code must be 2 characters'); |
|
108 | ||
109 | $this->stateProvinceCode = (string)$stateProvinceCode; |
|
110 | return $this; |
|
111 | } |
|
112 | ||
113 | /** |
|
114 | * Get the state or province |
|
@@ 189-196 (lines=8) @@ | ||
186 | * @return Address |
|
187 | * @throws \SimpleUPS\Api\InvalidParameterException |
|
188 | */ |
|
189 | public function setCountryCode($countryCode) |
|
190 | { |
|
191 | if (!$this->isResponse() && $countryCode != null && strlen($countryCode) != 2) |
|
192 | throw new InvalidParameterException('Country Code must be 2 characters'); |
|
193 | ||
194 | $this->countryCode = (string)$countryCode; |
|
195 | return $this; |
|
196 | } |
|
197 | ||
198 | /** |
|
199 | * Get the country code |