R/inventory_type.R

Defines functions lds_get_inventory_types lds_post_inventory_types

Documented in lds_get_inventory_types lds_post_inventory_types

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

#' Create areas
#' @export
lds_post_inventory_types <- function(external_id, name, type, intermediate_type = NA, uom,
                                     created_at = NA, updated_at = NA, global_id = NA, 
                                     global_mme_id = NA, global_user_id = NA) {
  
  lds_call("inventory_types", "POST", body = list(
    inventory_type = data.frame(name, type, intermediate_type, uom,
                                 created_at, updated_at, global_id, 
                                 global_mme_id, global_user_id)
  ))
  
}

#' #' Update area
#' #' @export
#' lds_put_inventory_types <- function(global_id, ...) {
#'   
#'   lds_call("inventory_types", "PUT", body = list(
#'     inventory_types = data.frame(..., global_id)
#'   ))
#'   
#' }
#' 
#' #' Delete area
#' #' @export
#' lds_delete_inventory_types <- function(global_id) {
#'   
#'   lds_call("inventory_types", "DELETE", global_id = global_id)
#'   
#' }
CannaData/CannaLeafDataSystems documentation built on May 17, 2019, 8:03 a.m.