using System.Collections.Generic;
namespace Retailcrm.Versions.V4
{
public partial class Client
{
///
/// Get users
///
///
///
///
///
public Response Users(Dictionary filter = null, int page = 0, int limit = 0)
{
Dictionary parameters = new Dictionary();
if (filter != null && filter.Count > 0)
{
parameters.Add("filter", filter);
}
if (page > 0)
{
parameters.Add("page", page);
}
if (limit > 0)
{
parameters.Add("limit", limit);
}
return Request.MakeRequest("/users", Request.MethodGet, parameters);
}
///
/// Get users groups
///
///
///
///
public Response UsersGroups(int page = 1, int limit = 20)
{
Dictionary parameters = new Dictionary();
if (page > 0)
{
parameters.Add("page", page);
}
if (limit > 0)
{
parameters.Add("limit", limit);
}
return Request.MakeRequest("/user-groups", Request.MethodGet, parameters);
}
///
/// Get user
///
///
///
public Response User(int id)
{
return Request.MakeRequest($"/users/{id}", Request.MethodGet);
}
}
}