R/cancel_ach_transfer.R

Defines functions cancel_ach_transfer

Documented in cancel_ach_transfer

#' Cancel an ACH transfer from your RobinHood account
#'
#' @param RH object of class RobinHood
#' @param cancel_url (string) cancel url returned from initiating a transfer with place_ach_transfer()
#' @import httr magrittr
#' @export
cancel_ach_transfer <- function(RH, cancel_url) {

  cancel_ach <- api_ach(RH, action = "cancel", cancel_url = cancel_url)

  if (length(cancel_ach) == 0) cat("Transfer Canceled \n")

  if (length(cancel_ach) >  0) {
    cat("Not able to verify cancelation, check get_ach(RH, action = 'status', ...)")
  }

}

Try the RobinHood package in your browser

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

RobinHood documentation built on March 1, 2021, 5:08 p.m.