class Apitool::Client::Role < Apitool::Client::ApitoolClient def index get('/roles') do |response, request, result| if response.code == 200 parse(response) else nil end end end def show(name) get("/roles/#{name}") do |response| if response.code == 200 parse(response) else nil end end end def create(name = nil) parameters = { role: { name: name } } post("/roles", parameters) do |response| if response.code == 200 parse(response) else nil end end end def update(name, new_name) parameters = { role: { name: new_name } } put("/roles/#{name}", parameters) do |response| if response.code == 200 parse(response) else nil end end end def destroy(name) delete("/roles/#{name}") do |response| if response.code == 200 parse(response) else nil end end end end