public function toXML( XMLWriter $XMLWriter )
    {
        $XMLWriter->startElement( 'Endereco' );

        if ($this->street) {
            $XMLWriter->writeElement( 'Logradouro', $this->street );
        } else {
            throw new RequiredFieldException( 'Field Street of the Address object is required' );
        }

        if ($this->complement) {
            $XMLWriter->writeElement( 'Complemento', $this->complement );
        }

        if ($this->number) {
            $XMLWriter->writeElement( 'Numero', $this->number );
        } else {
            throw new RequiredFieldException( 'Field Number of the Address object is required' );
        }

        if ($this->county) {
            $XMLWriter->writeElement( 'Bairro', $this->county );
        } else {
            throw new RequiredFieldException( 'Field County of the Address object is required' );
        }

        if ($this->city) {
            $XMLWriter->writeElement( 'Cidade', $this->city );
        } else {
            throw new RequiredFieldException( 'Field City of the Address object is required' );
        }

        if ($this->state) {
            $XMLWriter->writeElement( 'UF', $this->state );
        } else {
            throw new RequiredFieldException( 'Field State of the Address object is required' );
        }

        if ($this->zipCode) {
            $XMLWriter->writeElement( 'CEP', $this->zipCode );
        } else {
            throw new RequiredFieldException( 'Field ZipCode of the Address object is required' );
        }

        if ($this->country) {
            $XMLWriter->writeElement( 'Pais', $this->country );
        } else {
            throw new RequiredFieldException( 'Field Country of the Address object is required' );
        }

        $XMLWriter->endElement();
    }
public function toXML( XMLWriter $XMLWriter )
    {
        $XMLWriter->startElement( 'Endereco' );

        if ($this->street) {
            $XMLWriter->writeElement( 'Logradouro', $this->street );
        } else {
            throw new RequiredFieldException( 'Field Street of the Address object is required' );
        }

        if ($this->complement) {
            $XMLWriter->writeElement( 'Complemento', $this->complement );
        }

        if ($this->number) {
            $XMLWriter->writeElement( 'Numero', $this->number );
        } else {
            throw new RequiredFieldException( 'Field Number of the Address object is required' );
        }

        if ($this->county) {
            $XMLWriter->writeElement( 'Bairro', $this->county );
        } else {
            throw new RequiredFieldException( 'Field County of the Address object is required' );
        }

        if ($this->city) {
            $XMLWriter->writeElement( 'Cidade', $this->city );
        } else {
            throw new RequiredFieldException( 'Field City of the Address object is required' );
        }

        if ($this->state) {
            $XMLWriter->writeElement( 'UF', $this->state );
        } else {
            throw new RequiredFieldException( 'Field State of the Address object is required' );
        }

        if ($this->zipCode) {
            $XMLWriter->writeElement( 'CEP', $this->zipCode );
        } else {
            throw new RequiredFieldException( 'Field ZipCode of the Address object is required' );
        }

        if ($this->country) {
            $XMLWriter->writeElement( 'Pais', $this->country );
        } else {
            throw new RequiredFieldException( 'Field Country of the Address object is required' );
        }

        $XMLWriter->endElement();
    }
@param  \XMLWriter $XMLWriter

@throws \RodrigoPedra\ClearSaleID\Exception\RequiredFieldException