Required role: | superadmin |
DELETE | /superadmin/company/{Id} | Deletes a customer and everything realted to customer, including administrators and bookings etc. |
---|
namespace BokaMera.API.ServiceModel.Db
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type BaseModel() =
class end
[<AllowNullLiteral>]
type LicenseTypeItem() =
inherit BaseModel()
[<Ignore>]
member val Name:String = null with get,set
[<Ignore>]
member val LicenseType:LicenseType = null with get,set
[<Required>]
member val LicenseTypesId:Int32 = new Int32() with get,set
[<Required>]
member val LicenseItemsId:Int32 = new Int32() with get,set
[<Required>]
member val NumberOfItems:Int32 = new Int32() with get,set
member val Id:Int32 = new Int32() with get,set
member val ModifiedDate:Nullable<DateTimeOffset> = new Nullable<DateTimeOffset>() with get,set
[<AllowNullLiteral>]
type Currency() =
inherit BaseModel()
[<Required>]
member val Name:String = null with get,set
[<Required>]
member val CurrencySign:String = null with get,set
[<Required>]
member val Active:Boolean = new Boolean() with get,set
member val ModifiedDate:Nullable<DateTimeOffset> = new Nullable<DateTimeOffset>() with get,set
[<Required>]
member val Id:String = null with get,set
[<AllowNullLiteral>]
type Country() =
inherit BaseModel()
[<References(typeof<Currency>)>]
member val CurrencyId:String = null with get,set
member val CurrencyInfo:Currency = null with get,set
[<Required>]
member val Name:String = null with get,set
member val Culture:String = null with get,set
member val TimeZone:String = null with get,set
member val ModifiedDate:Nullable<DateTimeOffset> = new Nullable<DateTimeOffset>() with get,set
[<Required>]
member val Id:String = null with get,set
[<AllowNullLiteral>]
type LicensePrice() =
inherit BaseModel()
[<Ignore>]
member val Country:Country = null with get,set
[<Ignore>]
member val MonthlyPayment:Boolean = new Boolean() with get,set
[<Required>]
member val LicenseTypeId:Int32 = new Int32() with get,set
[<Required>]
member val CountryId:String = null with get,set
[<Required>]
member val Price:Int32 = new Int32() with get,set
member val ModifiedDate:Nullable<DateTimeOffset> = new Nullable<DateTimeOffset>() with get,set
[<AllowNullLiteral>]
type LicenseType() =
inherit BaseModel()
[<Ignore>]
member val LicenseItems:IList<LicenseTypeItem> = null with get,set
[<Ignore>]
member val Prices:IList<LicensePrice> = null with get,set
[<Ignore>]
member val PeriodOfNoticeDays:Int32 = new Int32() with get,set
[<Ignore>]
member val NextLicenseOption:LicenseType = null with get,set
[<Required>]
member val Name:String = null with get,set
[<Required>]
member val Description:String = null with get,set
[<Required>]
member val ExtraLicenseOption:Boolean = new Boolean() with get,set
member val ModifiedDate:Nullable<DateTimeOffset> = new Nullable<DateTimeOffset>() with get,set
member val Active:Boolean = new Boolean() with get,set
member val Id:Int32 = new Int32() with get,set
[<AllowNullLiteral>]
type License() =
inherit BaseModel()
member val Type:LicenseType = null with get,set
[<Required>]
member val CompanyId:Guid = new Guid() with get,set
member val Id:Int32 = new Int32() with get,set
[<Required>]
member val TypeId:Int32 = new Int32() with get,set
[<Required>]
member val ValidFrom:DateTime = new DateTime() with get,set
[<Required>]
member val ValidTo:DateTime = new DateTime() with get,set
[<Required>]
member val Active:Boolean = new Boolean() with get,set
[<Required>]
member val Updated:DateTime = new DateTime() with get,set
[<Required>]
member val Created:DateTime = new DateTime() with get,set
member val ModifiedDate:Nullable<DateTimeOffset> = new Nullable<DateTimeOffset>() with get,set
member val MetaData:String = null with get,set
[<AllowNullLiteral>]
type DeletedCustomerInfoResponse() =
member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set
member val ActiveLicenses:ResizeArray<License> = new ResizeArray<License>() with get,set
member val Comment:String = null with get,set
[<ApiResponse(Description="", StatusCode=400)>]
[<ApiResponse(Description="Returned if the current user is not allowed to perform the action", StatusCode=401)>]
[<AllowNullLiteral>]
type DeleteCustomerSuperAdminUser() =
///<summary>
///Enter the companyId for the customer
///</summary>
[<ApiMember(Description="Enter the companyId for the customer", ParameterType="query")>]
member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set
///<summary>
///Id (guid) of company you wish to delete.
///</summary>
[<ApiMember(Description="Id (guid) of company you wish to delete.", IsRequired=true)>]
member val Id:Guid = new Guid() with get,set
member val GotApprovedByAdmin:Boolean = new Boolean() with get,set
F# DeleteCustomerSuperAdminUser 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/company/{Id} HTTP/1.1 Host: api.bokamera.se Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {Unable to show example output for type 'DeletedCustomerInfoResponse' using the custom 'csv' filter}One or more errors occurred. (License type not handled in NextLicenseOption)