|  Description: The ID of the Zendesk Support ticket created from this chat. Available only if using version 2 of the Zendesk Chat-Support integration
777002
def zendesk_ticket(self):
        
        if self.api and self.zendesk_ticket_id:
            return self.api._get_zendesk_ticket(self.zendesk_ticket_id)
1171880
public static function checkTelegram(int $chat_id)
    {
        $user_meta = static::findOne(['notification_telegram' => $chat_id]);
        if ($user_meta) {
            return $user_meta->notification_telegram;
        }
        return null;
    }
954860
function CleanRideID(ride_id) {
    var capture = regexTidyID.exec(ride_id);
    if (capture && capture.length > 1) {
        return capture[1];
    }
    return ride_id;
}
1129204
def id(self):
        
        m = re.match(r'Bug #(\d+) does not exist', self.message)
        return m.group(1)
501526
def wf_message_id?(id)
      return true if id.is_a?(String) && id =~ /^\w+::\w+$/
      raise Wavefront::Exception::InvalidMessageId
    end
1320017
def show(self, ticket_field, custom_field_option):
        
        return self._query_zendesk(self.endpoint.show, 'custom_field_option', ticket_field, custom_field_option)
336612
function getConversationId(req, res, options) {
    var cookieName = options.conversationIdCookieName;
    var headerName = options.conversationIdHeader;
    var conversationId = req.headers[headerName] || req.cookies && req.cookies[cookieName];
    if (!conversationId) {
        conversationId = uuid.v1();
    }
    req.conversationId = conversationId;
    res.cookie(cookieName, conversationId, { path: '/' });
    return conversationId;
}
45352
def chat_show(self, chat_id, **kwargs):
        ""
        api_path = "/api/v2/chats/{chat_id}"
        api_path = api_path.format(chat_id=chat_id)
        return self.call(api_path, **kwargs)
820595
public OvhTicket tickets_ticketId_GET(Long ticketId) throws IOException {
		String qPath = "/support/tickets/{ticketId}";
		StringBuilder sb = path(qPath, ticketId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhTicket.class);
	}
973852
def Message(self, Id=0):
        
        o = ChatMessage(self, Id)
        o.Status # Test if such an id is known.
        return o
858077
protected function getTicketFromWeChat()
    {
        $url    = sprintf(self::TICKET_URL, $this->getAccessToken()->getAccessToken());
        $client = $this->getHttpClient();
        $client->setUrl($url);
        $client->setHeaderArray(['Content-Type: application/json']);

        if (!$client->exec()) {
            throw new Exception("error when get js api ticket from WeChat({$url})");
        }

        $result = json_decode($client->getResponse(), true);
        if (!(isset($result['ticket']) && (isset($result['expires_in'])))) {
            throw new Exception("error result when get js api ticket from WeChat({$url})");
        }

        return ['ticket' => $result['ticket'], 'expire'=> $result['expires_in']];
    }
1353460
def GetNewEventId(self, event_time=None):
    """"""
    if event_time is None:
      event_time = int(time.time() * 1e6)

    return "%s:%s:%s" % (event_time, socket.gethostname(), os.getpid())
1183216
def ticket_comments(self, ticket_id, **kwargs):
        ""
        api_path = "/api/v2/tickets/{ticket_id}/comments.json"
        api_path = api_path.format(ticket_id=ticket_id)
        return self.call(api_path, **kwargs)
756462
def devid(self):
        
        d = self.device
        vend_id = d.get('ID_VENDOR_ID')
        model_id = d.get('ID_MODEL_ID')
        return (vend_id, model_id)
1249071
private static function messageId(){
    return sprintf("%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
      mt_rand(0, 0xffff),
      mt_rand(0, 0xffff),
      mt_rand(0, 0xffff),
      mt_rand(0, 0x0fff) | 0x4000,
      mt_rand(0, 0x3fff) | 0x8000,
      mt_rand(0, 0xffff),
      mt_rand(0, 0xffff),
      mt_rand(0, 0xffff)
    );
  }
1141129
def ticket_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/tickets/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
25398
def create_ticket(subject, tags, ticket_body, requester_email=None,
                  custom_fields=[]):
    

    payload = {'ticket': {
        'subject': subject,
        'comment': {
            'body': ticket_body
        },
        'group_id': settings.ZENDESK_GROUP_ID,
        'tags': tags,
        'custom_fields': custom_fields
    }}

    if requester_email:
        payload['ticket']['requester'] = {
            'name': 'Sender: %s' % requester_email.split('@')[0],
            'email': requester_email,
        }
    else:
        payload['ticket']['requester_id'] = settings.ZENDESK_REQUESTER_ID

    requests.post(
        get_ticket_endpoint(),
        data=json.dumps(payload),
        auth=zendesk_auth(),
        headers={'content-type': 'application/json'}).raise_for_status()