use crate::{CostCenter, CostCenters, Created, EmptyResponse, Request, RequestBuilder, Uuid};
pub fn get_a_cost_center(id: Uuid, code: &str) -> Request<CostCenter> {
RequestBuilder::new(http::Method::GET, "/v1/costcenters/costcenter/")
.path_param(id)
.query_param("code", code)
.build()
}
pub fn update_a_cost_center(body: &CostCenter) -> Request<EmptyResponse> {
RequestBuilder::new(http::Method::PUT, "/v1/costcenters/costcenter")
.body(body)
.build()
}
pub fn create_a_cost_center(body: &CostCenter) -> Request<Created> {
RequestBuilder::new(http::Method::POST, "/v1/costcenters/costcenter")
.body(body)
.build()
}
pub fn delete_a_cost_center(id: Uuid, code: &str) -> Request<EmptyResponse> {
RequestBuilder::new(http::Method::DELETE, "/v1/costcenters/costcenter/")
.path_param(id)
.query_param("code", code)
.build()
}
pub fn get_all_cost_centers(id: Uuid) -> Request<CostCenters> {
RequestBuilder::new(http::Method::GET, "/v1/costcenters/costcenters/")
.path_param(id)
.build()
}
pub fn create_multiple_cost_centers(body: &CostCenters) -> Request<Created> {
RequestBuilder::new(http::Method::POST, "/v1/costcenters/costcenters")
.body(body)
.build()
}