public function setLetterType($letterType): PostageInfo
    {
        if (!in_array($letterType, Envelope::getLetterTypeOptions())) {
            throw new InvalidArgumentException(
                sprintf('Property %s is not supported for %s', $letterType, __FUNCTION__)
            );
        }

        $this->letter['type'] = $letterType;

        return $this;
    }
public function setLetterType($letterType): PostageInfo
    {
        if (!in_array($letterType, Envelope::getLetterTypeOptions())) {
            throw new InvalidArgumentException(
                sprintf('Property %s is not supported for %s', $letterType, __FUNCTION__)
            );
        }

        $this->letter['type'] = $letterType;

        return $this;
    }
public function setLetterType ( $ letterType ) : PostageInfo { if ( ! in_array ( $ letterType , Envelope :: getLetterTypeOptions ( ) ) ) { throw new InvalidArgumentException ( sprintf ( 'Property %s is not supported for %s' , $ letterType , __FUNCTION__ ) ) ; } $ this -> letter [ 'type' ] = $ letterType ; return $ this ; }
Set the letter type

@param string $letterType

@return self
@throws InvalidArgumentException
Set the letter type