/// <summary> /// The Update /// </summary> /// <param name="client">The <see cref="RestClient"/></param> /// <param name="schema">The <see cref="UserSchema"/></param> public static void Update(RestClient client, UserSchema schema) { var uri = string.Format("/user_schemas/{0}", schema.Id); var body = new { description = schema.Description, structure = schema.Structure }; var request = new RestRequest(uri, Method.PUT); Rest.Execute <UserSchemaResponse>(client, request, body); }
/// <summary> /// The Create /// </summary> /// <param name="client">The <see cref="RestClient"/></param> /// <param name="schema">The <see cref="UserSchema"/></param> /// <returns>The <see cref="UserSchema"/></returns> public static UserSchema Create(RestClient client, UserSchema schema) { var uri = "/user_schemas"; var request = new RestRequest(uri, Method.POST); var body = new { description = schema.Description, structure = schema.Structure }; var result = Rest.Execute <UserSchemaResponse>(client, request, body); return(result.Data.Schema); }
/// <summary> /// The Deactivate /// </summary> /// <param name="userSchemaId">The <see cref="string"/></param> public void Deactivate(string userSchemaId) { UserSchema.Delete(client, userSchemaId, true); }
/// <summary> /// The Delete /// </summary> /// <param name="userSchemaId">The <see cref="string"/></param> public void Delete(string userSchemaId) { UserSchema.Delete(client, userSchemaId, false); }
/// <summary> /// The List /// </summary> /// <param name="start">The <see cref="int"/></param> /// <param name="limit">The <see cref="int"/></param> /// <returns>The <see cref="UserSchemaList"/></returns> public UserSchemaList List(int start, int limit) { return(UserSchema.List(client, start, limit)); }
/// <summary> /// The Create /// </summary> /// <param name="schema">The <see cref="UserSchema"/></param> /// <returns>The <see cref="UserSchema"/></returns> public UserSchema Create(UserSchema schema) { return(UserSchema.Create(client, schema)); }
/// <summary> /// The Update /// </summary> /// <param name="schema">The <see cref="UserSchema"/></param> public void Update(UserSchema schema) { UserSchema.Update(client, schema); }