R/rt_ticket_merge.R

Defines functions rt_ticket_merge

Documented in rt_ticket_merge

#' Merge two tickets
#'
#' @param origin (character|numeric) Ticket ID to merge into \code{into}
#' @param into (character|numeric) Ticket ID to merge \code{origin} into
#'
#' @return (numeric) The ID of ticket both tickets were merged into
#'
#' @export
#'
#' @examples
#' \dontrun{
#' # First, create two tickets
#' ticket_one <- rt_ticket_create("General")
#' ticket_two <- rt_ticket_create("General")
#'
#' # Then merge them together
#' ticket_merge(ticket_one, ticket_two)
#' }
rt_ticket_merge <- function(origin, into) {
  url <- rt_url("ticket", origin, "merge", into)
  response <- rt_POST(url)
  stopforstatus(response)

  message(response$body)
  invisible(into)
}

Try the rt package in your browser

Any scripts or data that you put into this service are public.

rt documentation built on May 15, 2021, 9:06 a.m.