using System;
using System.Collections.Generic;
namespace Retailcrm.Versions.V5
{
public partial class Client
{
///
/// Update user status
///
///
///
///
public Response UsersStatus(int id, string status)
{
List statuses = new List { "free", "busy", "dinner", "break"};
if (!statuses.Contains(status))
{
throw new ArgumentException("Parameter `status` must be equal one of these values: `free|busy|dinner|break`");
}
return Request.MakeRequest(
$"/users/{id}/status",
Request.MethodPost,
new Dictionary
{
{ "status", status }
}
);
}
}
}