public function setDestination($address) { $destination = new \SimpleUPS\Address(); $destination->setStreet($address->get('street1')); $destination->setCity($address->get('city')); $destination->setStateProvinceCode($address->get('state')); $destination->setPostalCode($address->get('postalCode')); $destination->setCountryCode('US'); if (UPS::isValidRegion($destination)) { } if (UPS::isValidAddress($destination)) { } //var_dump($destination); $destination = UPS::getCorrectedAddress($destination); $this->destination = new \SimpleUPS\InstructionalAddress($destination); $this->destination->setAddressee($address->get('name')); $this->destination->setAddressLine2($address->get('street2', null)); $this->destination->setAddressLine3($address->get('street3', null)); //var_dump($this->destination); //die(); return $this; }