protected function buildEndpoint($type, $resource, $datetime)
    {
        $accountType = $this->isSubAccount ? 'SubAccounts' : 'Accounts';
        $sig = strtoupper(md5($this->accountSid . $this->accountToken . $datetime));
        return sprintf(self::ENDPOINT_TEMPLATE, self::SERVER_IP, self::SERVER_PORT, self::SDK_VERSION, $accountType, $this->accountSid, $type, $resource, $sig);
    }