src/ClearSaleID/Entity/Request/AbstractCustomer.php
public function setLegalDocument2( $legalDocument2 )
    {
        $legalDocument2 = preg_replace( '/\D/', '', $legalDocument2 );

        if (empty( $legalDocument2 )) {
            throw new InvalidArgumentException( 'LegalDocument2 is empty!' );
        }

        $this->legalDocument2 = $legalDocument2;

        return $this;
    }
public function setLegalDocument2( $legalDocument2 )
    {
        $legalDocument2 = preg_replace( '/\D/', '', $legalDocument2 );

        if (empty( $legalDocument2 )) {
            throw new InvalidArgumentException( 'LegalDocument2 is empty!' );
        }

        $this->legalDocument2 = $legalDocument2;

        return $this;
    }
@param  string $legalDocument2

@return $this
@throws \InvalidArgumentException