public static function create_and_verify($params = null, $apiKey = null)
    {
        $class = get_class();
        if (!isset($params['address']) || !is_array($params['address'])) {
            $clone = $params;
            unset($params);
            $params['address'] = $clone;
        }

        $requestor = new Requestor($apiKey);
        $url = self::classUrl($class);
        list($response, $apiKey) = $requestor->request('post', $url.'/create_and_verify', $params);

        if (isset($response['address'])) {
            $verified_address = Util::convertToEasyPostObject($response['address'], $apiKey);
            if (!empty($response['message'])) {
                $verified_address->message = $response['message'];
                $verified_address->_immutableValues[] = 'message';
            }

            return $verified_address;
        } else {

            return Util::convertToEasyPostObject($response, $apiKey);
        }
    }
public static function create_and_verify($params = null, $apiKey = null)
    {
        $class = get_class();
        if (!isset($params['address']) || !is_array($params['address'])) {
            $clone = $params;
            unset($params);
            $params['address'] = $clone;
        }

        $requestor = new Requestor($apiKey);
        $url = self::classUrl($class);
        list($response, $apiKey) = $requestor->request('post', $url.'/create_and_verify', $params);

        if (isset($response['address'])) {
            $verified_address = Util::convertToEasyPostObject($response['address'], $apiKey);
            if (!empty($response['message'])) {
                $verified_address->message = $response['message'];
                $verified_address->_immutableValues[] = 'message';
            }

            return $verified_address;
        } else {

            return Util::convertToEasyPostObject($response, $apiKey);
        }
    }
public static function create_and_verify ( $ params = null , $ apiKey = null ) { $ class = get_class ( ) ; if ( ! isset ( $ params [ 'address' ] ) || ! is_array ( $ params [ 'address' ] ) ) { $ clone = $ params ; unset ( $ params ) ; $ params [ 'address' ] = $ clone ; } $ requestor = new Requestor ( $ apiKey ) ; $ url = self :: classUrl ( $ class ) ; list ( $ response , $ apiKey ) = $ requestor -> request ( 'post' , $ url . '/create_and_verify' , $ params ) ; if ( isset ( $ response [ 'address' ] ) ) { $ verified_address = Util :: convertToEasyPostObject ( $ response [ 'address' ] , $ apiKey ) ; if ( ! empty ( $ response [ 'message' ] ) ) { $ verified_address -> message = $ response [ 'message' ] ; $ verified_address -> _immutableValues [ ] = 'message' ; } return $ verified_address ; } else { return Util :: convertToEasyPostObject ( $ response , $ apiKey ) ; } }
create and verify an address

@param mixed  $params
@param string $apiKey
@return mixed
create and verify an address