public void WhenICallGetByIdOnTheZendeskApiClient() { if (!_savedSingleTicket.Id.HasValue) throw new ArgumentException("Cannot get by id when id is null"); _singleTicketResponse = _client.Tickets.Get(_savedSingleTicket.Id.Value).Item; }
public void GivenATicketInZendeskWithTheSubjectAndDescription(string subject, string description) { var requesterId = _supportUserClient.Search.Find<User>(new ZendeskQuery<User>().WithCustomFilter("email", ConfigurationManager.AppSettings["zendeskenduserusername"], FilterOperator.Equals)).Results.First().Id; var ticket = new Ticket { Subject = subject, Comment = new TicketComment {Body = description}, RequesterId = requesterId, Type = TicketType.question, Status = TicketStatus.Solved }; var ticketRequest = new TicketRequest {Item = ticket}; _ticket = _supportUserClient.Tickets.Post(ticketRequest).Item; _ticket.Status = TicketStatus.Solved; _ticket = _supportUserClient.Tickets.Put(new TicketRequest { Item = _ticket } ).Item; }
public void GivenATicketInZendeskWithTheSubjectAndDescriptionTWorkInTheseConditions(string subject, string description, string type) { _savedSingleTicket = _client.Tickets.Post(new TicketRequest { Item = new Ticket { Subject = subject, Description = description, Type = (TicketType)Enum.Parse(typeof(TicketType), type)} }).Item; }
public void GivenATicketInZendeskWithTheSubjectAndDescriptionTWorkInTheseConditions(string subject, string description) { _savedSingleTicket = _client.Tickets.Post(new TicketRequest { Item = new Ticket {Subject = subject, Description = description, Type = TicketType.task} }).Item; }