Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
DELETE | /services/prices/{Id} | Delete a price | Delete a price on a service |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Namespace Global
Namespace BokaMera.API.ServiceModel.Dtos
Public Partial Class DayOfWeekDto
Public Overridable Property DayOfWeekId As Integer
Public Overridable Property DotNetDayOfWeekId As Integer
Public Overridable Property DayOfWeek As String
End Class
<ValidateRequest(Validator:="IsAuthenticated")>
Public Partial Class DeleteServicePrice
'''<Summary>
'''The company id, if empty will use the company id for the user you are logged in with.
'''</Summary>
<ApiMember(Description:="The company id, if empty will use the company id for the user you are logged in with.")>
Public Overridable Property CompanyId As Nullable(Of Guid)
'''<Summary>
'''The price id
'''</Summary>
<ApiMember(Description:="The price id")>
Public Overridable Property Id As Integer
End Class
Public Partial Class GroupBookingSettings
Public Overridable Property Active As Boolean
Public Overridable Property Min As Integer
Public Overridable Property Max As Integer
End Class
Public Partial Class MultipleResourceSettings
Public Overridable Property Active As Boolean
Public Overridable Property Min As Integer
Public Overridable Property Max As Integer
End Class
Public Partial Class ServiceInfoResponse
Public Overridable Property Id As Integer
Public Overridable Property Name As String
Public Overridable Property Description As String
Public Overridable Property ImageUrl As Uri
Public Overridable Property LengthInMinutes As Nullable(Of Integer)
Public Overridable Property MaxNumberOfSpotsPerBooking As Integer
Public Overridable Property MinNumberOfSpotsPerBooking As Integer
Public Overridable Property GroupBooking As GroupBookingSettings
Public Overridable Property MultipleResource As MultipleResourceSettings
Public Overridable Property IsGroupBooking As Boolean
Public Overridable Property IsPaymentEnabled As Boolean
End Class
Public Partial Class ServicePriceResponse
Public Sub New()
DaysOfWeek = New List(Of DayOfWeekDto)
End Sub
'''<Summary>
'''The company id
'''</Summary>
<ApiMember(Description:="The company id")>
Public Overridable Property CompanyId As Guid
'''<Summary>
'''The price id
'''</Summary>
<ApiMember(Description:="The price id")>
Public Overridable Property Id As Integer
'''<Summary>
'''The service id
'''</Summary>
<ApiMember(Description:="The service id")>
Public Overridable Property ServiceId As Integer
'''<Summary>
'''The price
'''</Summary>
<ApiMember(Description:="The price")>
Public Overridable Property Price As Double
'''<Summary>
'''The price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day
'''</Summary>
<ApiMember(Description:="The price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day")>
Public Overridable Property CalculationTypeId As Integer
'''<Summary>
'''The price currency
'''</Summary>
<ApiMember(Description:="The price currency")>
Public Overridable Property CurrencyId As String
'''<Summary>
'''The price sign
'''</Summary>
<ApiMember(Description:="The price sign")>
Public Overridable Property PriceSign As String
'''<Summary>
'''The price VAT in percent
'''</Summary>
<ApiMember(Description:="The price VAT in percent")>
Public Overridable Property VAT As Decimal
'''<Summary>
'''The price category if price has a category
'''</Summary>
<ApiMember(Description:="The price category if price has a category")>
Public Overridable Property Category As String
'''<Summary>
'''The price text to display
'''</Summary>
<ApiMember(Description:="The price text to display")>
Public Overridable Property PriceText As String
'''<Summary>
'''The valid from date for the price.
'''</Summary>
<ApiMember(Description:="The valid from date for the price.")>
Public Overridable Property From As Date
'''<Summary>
'''The valid to date for the price.
'''</Summary>
<ApiMember(Description:="The valid to date for the price.")>
Public Overridable Property To As Date
'''<Summary>
'''If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.
'''</Summary>
<ApiMember(Description:="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.")>
Public Overridable Property DaysOfWeek As List(Of DayOfWeekDto)
'''<Summary>
'''If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.
'''</Summary>
<ApiMember(Description:="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.")>
Public Overridable Property FromTime As Nullable(Of TimeSpan)
'''<Summary>
'''If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.
'''</Summary>
<ApiMember(Description:="If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.")>
Public Overridable Property ToTime As Nullable(Of TimeSpan)
Public Overridable Property Service As ServiceInfoResponse
'''<Summary>
'''If the price is only valid for a specific time span
'''</Summary>
<ApiMember(Description:="If the price is only valid for a specific time span")>
Public Overridable Property IsTimeSpecific As Boolean
'''<Summary>
'''If the price is only valid for specific days of week
'''</Summary>
<ApiMember(Description:="If the price is only valid for specific days of week")>
Public Overridable Property IsDaysOfWeekSpecific As Boolean
End Class
End Namespace
End Namespace
VB.NET DeleteServicePrice DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
DELETE /services/prices/{Id} HTTP/1.1 Host: api.bokamera.se Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Id":0,"ServiceId":0,"Price":0,"CalculationTypeId":0,"CurrencyId":"String","PriceSign":"String","VAT":0,"Category":"String","PriceText":"String","DaysOfWeek":[{"DayOfWeekId":0,"DotNetDayOfWeekId":0,"DayOfWeek":"String"}],"FromTime":"00:00:00","ToTime":"00:00:00","Service":{"Id":0,"Name":"String","Description":"String","LengthInMinutes":0,"MaxNumberOfSpotsPerBooking":0,"MinNumberOfSpotsPerBooking":0,"GroupBooking":{"Active":false,"Min":0,"Max":0},"MultipleResource":{"Active":false,"Min":0,"Max":0},"IsGroupBooking":false,"IsPaymentEnabled":false},"IsTimeSpecific":false,"IsDaysOfWeekSpecific":false}