Required role: | superadmin |
DELETE | /superadmin/company/{Id} | Deletes a customer and everything realted to customer, including administrators and bookings etc. |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Imports BokaMera.API.ServiceModel.Db
Namespace Global
Namespace BokaMera.API.ServiceModel.Db
Public Partial Class BaseModel
End Class
Public Partial Class Country
Inherits BaseModel
<References(GetType(Currency))>
Public Overridable Property CurrencyId As String
Public Overridable Property CurrencyInfo As Currency
<Required>
Public Overridable Property Name As String
Public Overridable Property Culture As String
Public Overridable Property TimeZone As String
Public Overridable Property ModifiedDate As Nullable(Of DateTimeOffset)
<Required>
Public Overridable Property Id As String
End Class
Public Partial Class Currency
Inherits BaseModel
<Required>
Public Overridable Property Name As String
<Required>
Public Overridable Property CurrencySign As String
<Required>
Public Overridable Property Active As Boolean
Public Overridable Property ModifiedDate As Nullable(Of DateTimeOffset)
<Required>
Public Overridable Property Id As String
End Class
Public Partial Class License
Inherits BaseModel
Public Overridable Property Type As LicenseType
<Required>
Public Overridable Property CompanyId As Guid
Public Overridable Property Id As Integer
<Required>
Public Overridable Property TypeId As Integer
<Required>
Public Overridable Property ValidFrom As Date
<Required>
Public Overridable Property ValidTo As Date
<Required>
Public Overridable Property Active As Boolean
<Required>
Public Overridable Property Updated As Date
<Required>
Public Overridable Property Created As Date
Public Overridable Property ModifiedDate As Nullable(Of DateTimeOffset)
Public Overridable Property MetaData As String
End Class
Public Partial Class LicensePrice
Inherits BaseModel
<Ignore>
Public Overridable Property Country As Country
<Ignore>
Public Overridable Property MonthlyPayment As Boolean
<Required>
Public Overridable Property LicenseTypeId As Integer
<Required>
Public Overridable Property CountryId As String
<Required>
Public Overridable Property Price As Integer
Public Overridable Property ModifiedDate As Nullable(Of DateTimeOffset)
End Class
Public Partial Class LicenseType
Inherits BaseModel
<Ignore>
Public Overridable Property LicenseItems As IList(Of LicenseTypeItem)
<Ignore>
Public Overridable Property Prices As IList(Of LicensePrice)
<Ignore>
Public Overridable Property PeriodOfNoticeDays As Integer
<Ignore>
Public Overridable Property NextLicenseOption As LicenseType
<Required>
Public Overridable Property Name As String
<Required>
Public Overridable Property Description As String
<Required>
Public Overridable Property ExtraLicenseOption As Boolean
Public Overridable Property ModifiedDate As Nullable(Of DateTimeOffset)
Public Overridable Property Active As Boolean
Public Overridable Property Id As Integer
End Class
Public Partial Class LicenseTypeItem
Inherits BaseModel
<Ignore>
Public Overridable Property Name As String
<Ignore>
Public Overridable Property LicenseType As LicenseType
<Required>
Public Overridable Property LicenseTypesId As Integer
<Required>
Public Overridable Property LicenseItemsId As Integer
<Required>
Public Overridable Property NumberOfItems As Integer
Public Overridable Property Id As Integer
Public Overridable Property ModifiedDate As Nullable(Of DateTimeOffset)
End Class
End Namespace
Namespace BokaMera.API.ServiceModel.Dtos
<ApiResponse(Description:="", StatusCode:=400)>
<ApiResponse(Description:="Returned if the current user is not allowed to perform the action", StatusCode:=401)>
Public Partial Class DeleteCustomerSuperAdminUser
Implements ICompany
'''<Summary>
'''Enter the companyId for the customer
'''</Summary>
<ApiMember(Description:="Enter the companyId for the customer", ParameterType:="query")>
Public Overridable Property CompanyId As Nullable(Of Guid)
'''<Summary>
'''Id (guid) of company you wish to delete.
'''</Summary>
<ApiMember(Description:="Id (guid) of company you wish to delete.", IsRequired:=true)>
Public Overridable Property Id As Guid
Public Overridable Property GotApprovedByAdmin As Boolean
End Class
Public Partial Class DeletedCustomerInfoResponse
Public Sub New()
ActiveLicenses = New List(Of License)
End Sub
Public Overridable Property CompanyId As Nullable(Of Guid)
Public Overridable Property ActiveLicenses As List(Of License)
Public Overridable Property Comment As String
End Class
End Namespace
End Namespace
VB.NET DeleteCustomerSuperAdminUser DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {Unable to show example output for type 'DeletedCustomerInfoResponse' using the custom 'other' filter}One or more errors occurred. (License type not handled in NextLicenseOption)