public function getCode()
    {
        $data = [
            'suite_id' => $this->getSuiteId(),
        ];

        $result = $this->parseJSON('json', [self::GET_PRE_AUTH_CODE, $data]);

        if (empty($result['pre_auth_code'])) {
            throw new InvalidArgumentException('Invalid response.');
        }

        return $result['pre_auth_code'];
    }
public function getCode()
    {
        $data = [
            'suite_id' => $this->getSuiteId(),
        ];

        $result = $this->parseJSON('json', [self::GET_PRE_AUTH_CODE, $data]);

        if (empty($result['pre_auth_code'])) {
            throw new InvalidArgumentException('Invalid response.');
        }

        return $result['pre_auth_code'];
    }
public function getCode ( ) { $ data = [ 'suite_id' => $ this -> getSuiteId ( ) , ] ; $ result = $ this -> parseJSON ( 'json' , [ self :: GET_PRE_AUTH_CODE , $ data ] ) ; if ( empty ( $ result [ 'pre_auth_code' ] ) ) { throw new InvalidArgumentException ( 'Invalid response.' ) ; } return $ result [ 'pre_auth_code' ] ; }
Get pre auth code.

@throws \EntWeChat\Core\Exceptions\InvalidArgumentException

@return string
Get pre auth code .