R/tax.R

Defines functions lds_get_tax lds_post_tax lds_put_tax lds_delete_tax

Documented in lds_delete_tax lds_get_tax lds_post_tax lds_put_tax

#' Get information about areas
#' @export
lds_get_tax <- function(...) {
  
  lds_call("taxes", "GET", query = ...)
  
}

#' Create areas
#' @export
lds_post_tax <- function(name) {
  
  lds_call("taxes", "POST", body = list(
    tax = data.frame(name)
  ))
  
}

#' Update area
#' @export
lds_put_tax <- function(global_id, name) {
  
  lds_call("taxes", "PUT", body = list(
    tax = data.frame(name, global_id)
  ))
  
}

#' Delete area
#' @export
lds_delete_tax <- function(global_id) {
  
  lds_call("taxes", "DELETE", global_id = global_id)
  
}
CannaData/CannaLeafDataSystems documentation built on May 17, 2019, 8:03 a.m.