/// <summary> /// Creates a Support Ticket /// </summary> /// <param name="createTicketRequest"></param> /// <returns></returns> public GetTicketResponse CreateTicket(CreateTicketInfo createTicketRequest) { if (createTicketRequest == null) { throw new ArgumentNullException("createTicketRequest"); } return(DoRequest <GetTicketResponse>(UriForPath("/api/v2/tickets.json"), "POST", JsonConvert.SerializeObject(createTicketRequest))); }
/// <summary> /// Creates a Support Ticket with an attachment /// </summary> /// <param name="createTicketRequest"></param> /// <param name="attachments"></param> /// <returns></returns> public GetTicketResponse CreateTicketWithAttachment(CreateTicketInfo createTicketRequest, IEnumerable <Attachment> attachments) { if (createTicketRequest == null) { throw new ArgumentNullException("createTicketRequest"); } if (attachments == null) { throw new ArgumentNullException("attachments"); } return(DoMultipartFormRequest <GetTicketResponse>(UriForPath("/api/v2/tickets.json"), createTicketRequest, attachments, "helpdesk_ticket", "attachments[]")); }