/** * @param \AvaTax\ValidateRequest $soapRequest * * @return array */ public function normalizeValidateRequest(AvaTax\ValidateRequest $soapRequest) { $soapAddress = $soapRequest->getAddress(); $request = array('Address' => array('Line1' => $soapAddress ? $soapAddress->getLine1() : '', 'Line2' => $soapAddress ? $soapAddress->getLine2() : '', 'Line3' => $soapAddress ? $soapAddress->getLine3() : '', 'City' => $soapAddress ? $soapAddress->getCity() : '', 'Region' => $soapAddress ? $soapAddress->getRegion() : '', 'Country' => $soapAddress ? $soapAddress->getCountry() : '', 'PostalCode' => $soapAddress ? $soapAddress->getPostalCode() : ''), 'TextCase' => $soapRequest->getTextCase(), 'Coordinates' => $soapRequest->getCoordinates()); return $this->recursiveKeySort($request); }