示例#1
0
        /// <summary>
        /// Updates a conversation by changing the assignee id, the inbox, any tags, and/or altering the status
        /// Currently defaults to archiving conversations if no status is passed via the API
        /// </summary>
        /// <param name="conversationId">Id of the requested conversation</param>
        /// <param name="updateConversation">The details to be updated including the assignee id, the inbox, any tags, and/or the status</param>
        public void Update(string conversationId, UpdateConversationRequest updateConversation)
        {
            var request = base.BuildRequest(Method.PATCH);

            request.Resource += "/{conversationId}";
            request.AddParameter("conversationId", conversationId, ParameterType.UrlSegment);

            _client.Execute <Conversation>(request, updateConversation);
        }
 /// <summary>Snippet for UpdateConversation</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateConversationRequestObject()
 {
     // Create client
     ContactCenterInsightsClient contactCenterInsightsClient = ContactCenterInsightsClient.Create();
     // Initialize request argument(s)
     UpdateConversationRequest request = new UpdateConversationRequest
     {
         Conversation = new Conversation(),
         UpdateMask   = new FieldMask(),
     };
     // Make the request
     Conversation response = contactCenterInsightsClient.UpdateConversation(request);
 }
        /// <summary>Snippet for UpdateConversationAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task UpdateConversationRequestObjectAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            UpdateConversationRequest request = new UpdateConversationRequest
            {
                Conversation = new Conversation(),
                UpdateMask   = new FieldMask(),
            };
            // Make the request
            Conversation response = await contactCenterInsightsClient.UpdateConversationAsync(request);
        }
示例#4
0
        public async void update(long device_id, [FromQuery] string account_id, [FromBody] UpdateConversationRequest request)
        {
            using (var dbContext = new PulseDbContext())
            {
                var(_, conversation) = await GetConversation(dbContext, device_id, account_id);

                if (conversation == null)
                {
                    return;
                }

                request.CloneTo(conversation);

                await dbContext.SaveChangesAsync();
            }
        }