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