Requires the role: | superadmin |
DELETE | /superadmin/administrators/{Id} | Delete a administrator from your company | If you want to delete a administrator from your company. |
---|
namespace BokaMera.API.ServiceModel.Dtos
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type CompanyUserResource() =
///<summary>
///The resource id
///</summary>
[<ApiMember(Description="The resource id")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///The resource name
///</summary>
[<ApiMember(Description="The resource name")>]
member val Name:String = null with get,set
///<summary>
///The resource status
///</summary>
[<ApiMember(Description="The resource status")>]
member val Active:Boolean = new Boolean() with get,set
///<summary>
///The resource description
///</summary>
[<ApiMember(Description="The resource description")>]
member val Description:String = null with get,set
///<summary>
///The resource email
///</summary>
[<ApiMember(Description="The resource email")>]
member val Email:String = null with get,set
///<summary>
///The resource phone
///</summary>
[<ApiMember(Description="The resource phone")>]
member val Phone:String = null with get,set
///<summary>
///The resource color
///</summary>
[<ApiMember(Description="The resource color")>]
member val Color:String = null with get,set
///<summary>
///The resource image
///</summary>
[<ApiMember(Description="The resource image")>]
member val ImageUrl:Uri = null with get,set
///<summary>
///If the resource want to receive email notifications
///</summary>
[<ApiMember(Description="If the resource want to receive email notifications")>]
member val EmailNotification:Boolean = new Boolean() with get,set
///<summary>
///If the resource want to receive sms notifications
///</summary>
[<ApiMember(Description="If the resource want to receive sms notifications")>]
member val SMSNotification:Boolean = new Boolean() with get,set
///<summary>
///If the resource want to receive email reminders
///</summary>
[<ApiMember(Description="If the resource want to receive email reminders")>]
member val EmailReminder:Boolean = new Boolean() with get,set
///<summary>
///If the resource want to receive sms reminders
///</summary>
[<ApiMember(Description="If the resource want to receive sms reminders")>]
member val SMSReminder:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type CompanyUserRolesQueryResponse() =
member val RoleId:Guid = new Guid() with get,set
member val Name:String = null with get,set
member val Description:String = null with get,set
[<AllowNullLiteral>]
type CompanyUserQueryResponse() =
member val Id:Guid = new Guid() with get,set
member val CompanyId:Guid = new Guid() with get,set
member val Firstname:String = null with get,set
member val Lastname:String = null with get,set
member val Email:String = null with get,set
member val Phone:String = null with get,set
member val WorkerId:String = null with get,set
member val ResourceId:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///The resource information connected to the administrator.
///</summary>
[<ApiMember(Description="The resource information connected to the administrator.")>]
member val Resource:CompanyUserResource = null with get,set
///<summary>
///The roles that are connected to the administrator.
///</summary>
[<ApiMember(Description="The roles that are connected to the administrator.")>]
member val Roles:ResizeArray<CompanyUserRolesQueryResponse> = new ResizeArray<CompanyUserRolesQueryResponse>() with get,set
member val Active:Boolean = new Boolean() with get,set
member val Created:DateTime = new DateTime() with get,set
member val Updated:DateTime = new DateTime() with get,set
[<ApiResponse(Description="Returned if there is a validation error on the input parameters", StatusCode=400)>]
[<ApiResponse(Description="Returned if the current user is not allowed to perform the action", StatusCode=401)>]
[<AllowNullLiteral>]
type SuperAdminDeleteCompanyUser() =
///<summary>
///Enter the company and id for the application user, if blank company id and you are an admin, your company id will be used.
///</summary>
[<ApiMember(Description="Enter the company and id for the application user, if blank company id and you are an admin, your company id will be used.", ParameterType="query")>]
member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set
///<summary>
///Enter the user id for the administrator.
///</summary>
[<ApiMember(Description="Enter the user id for the administrator.", IsRequired=true, ParameterType="query")>]
member val Id:Guid = new Guid() with get,set
F# SuperAdminDeleteCompanyUser DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
DELETE /superadmin/administrators/{Id} HTTP/1.1 Host: api.bokamera.se Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Firstname":"String","Lastname":"String","Email":"String","Phone":"String","WorkerId":"String","ResourceId":0,"Resource":{"Id":0,"Name":"String","Active":false,"Description":"String","Email":"String","Phone":"String","Color":"String","EmailNotification":false,"SMSNotification":false,"EmailReminder":false,"SMSReminder":false},"Roles":[{"Name":"String","Description":"String"}],"Active":false}