|
@@ 256-266 (lines=11) @@
|
| 253 |
|
* @throws \SimpleUPS\Api\ResponseErrorException |
| 254 |
|
* @throws \SimpleUPS\Api\MissingParameterException |
| 255 |
|
*/ |
| 256 |
|
private static function _performAddressValidation(Address $address) |
| 257 |
|
{ |
| 258 |
|
if (self::$addressValidationResponse === null || self::$addressValidationResponse->getAddress() != $address) { |
| 259 |
|
$request = new AddressValidate\Request(); |
| 260 |
|
$request->setAddress($address); |
| 261 |
|
|
| 262 |
|
self::$addressValidationResponse = $request->sendRequest(); |
| 263 |
|
} |
| 264 |
|
|
| 265 |
|
return self::$addressValidationResponse; |
| 266 |
|
} |
| 267 |
|
|
| 268 |
|
/** |
| 269 |
|
* Perform validation on the provided region of the address if not already performed |
|
@@ 280-290 (lines=11) @@
|
| 277 |
|
* @throws \SimpleUPS\Api\ResponseErrorException |
| 278 |
|
* @throws \SimpleUPS\Api\MissingParameterException |
| 279 |
|
*/ |
| 280 |
|
private static function _performRegionValidation(Address $address) |
| 281 |
|
{ |
| 282 |
|
if (self::$regionValidationResponse === null || self::$regionValidationResponse->getAddress() != $address) { |
| 283 |
|
$request = new RegionValidate\Request(); |
| 284 |
|
$request->setAddress($address); |
| 285 |
|
|
| 286 |
|
self::$regionValidationResponse = $request->sendRequest(); |
| 287 |
|
} |
| 288 |
|
|
| 289 |
|
return self::$regionValidationResponse; |
| 290 |
|
} |
| 291 |
|
|
| 292 |
|
/** |
| 293 |
|
* Set the UPS Access License Number, User ID, Password and Account Number. |