Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /homepage/scheduler/settings | Update homepage scheduler settings | Update homepage scheduler settings on the company of the currently logged in user, only administrators are allowed to update homepage menu. |
---|
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 HomepageScheduleField
'''<Summary>
'''The field id.
'''</Summary>
<ApiMember(Description:="The field id.", IsRequired:=true)>
Public Overridable Property Id As Integer
'''<Summary>
'''If the field showed on the booking.
'''</Summary>
<ApiMember(Description:="If the field showed on the booking.", IsRequired:=true)>
Public Overridable Property ShowOnBooking As Boolean
'''<Summary>
'''If the field showed on the bookings tooltip.
'''</Summary>
<ApiMember(Description:="If the field showed on the bookings tooltip.", IsRequired:=true)>
Public Overridable Property ShowOnTooltip As Boolean
End Class
Public Partial Class HomepageSchedulerFieldOptionsResponse
'''<Summary>
'''The field id.
'''</Summary>
<ApiMember(Description:="The field id.")>
Public Overridable Property Id As Integer
'''<Summary>
'''The field name.
'''</Summary>
<ApiMember(Description:="The field name.")>
Public Overridable Property Name As String
'''<Summary>
'''The field description.
'''</Summary>
<ApiMember(Description:="The field description.")>
Public Overridable Property Description As String
'''<Summary>
'''The field sort order when listing.
'''</Summary>
<ApiMember(Description:="The field sort order when listing.")>
Public Overridable Property SortOrder As Integer
End Class
Public Partial Class HomepageSchedulerFieldResponse
'''<Summary>
'''The field id.
'''</Summary>
<ApiMember(Description:="The field id.")>
Public Overridable Property Id As Integer
'''<Summary>
'''If the field should be shown on booking.
'''</Summary>
<ApiMember(Description:="If the field should be shown on booking.")>
Public Overridable Property ShowOnBooking As Boolean
'''<Summary>
'''If the field should be shown on tooltip.
'''</Summary>
<ApiMember(Description:="If the field should be shown on tooltip.")>
Public Overridable Property ShowOnTooltip As Boolean
End Class
Public Partial Class HomepageSchedulerResource
'''<Summary>
'''The resource id.
'''</Summary>
<ApiMember(Description:="The resource id.")>
Public Overridable Property Id As Integer
End Class
Public Partial Class HomepageSchedulerResourceResponse
'''<Summary>
'''The resource id.
'''</Summary>
<ApiMember(Description:="The resource id.")>
Public Overridable Property Id As Integer
'''<Summary>
'''The resource name.
'''</Summary>
<ApiMember(Description:="The resource name.")>
Public Overridable Property Name As String
'''<Summary>
'''The resource description.
'''</Summary>
<ApiMember(Description:="The resource description.")>
Public Overridable Property Description As String
'''<Summary>
'''The resource image url.
'''</Summary>
<ApiMember(Description:="The resource image url.")>
Public Overridable Property ImageUrl As Uri
End Class
Public Partial Class HomepageSchedulerService
'''<Summary>
'''The service id.
'''</Summary>
<ApiMember(Description:="The service id.")>
Public Overridable Property Id As Integer
End Class
Public Partial Class HomepageSchedulerServiceResponse
'''<Summary>
'''The service id.
'''</Summary>
<ApiMember(Description:="The service id.")>
Public Overridable Property Id As Integer
'''<Summary>
'''The service name.
'''</Summary>
<ApiMember(Description:="The service name.")>
Public Overridable Property Name As String
'''<Summary>
'''The service description.
'''</Summary>
<ApiMember(Description:="The service description.")>
Public Overridable Property Description As String
'''<Summary>
'''The service image url.
'''</Summary>
<ApiMember(Description:="The service image url.")>
Public Overridable Property ImageUrl As Uri
End Class
Public Partial Class HomepageSchedulerSettingsQueryResponse
Public Sub New()
Services = New List(Of HomepageSchedulerServiceResponse)
Resources = New List(Of HomepageSchedulerResourceResponse)
Fields = New List(Of HomepageSchedulerFieldResponse)
FieldOptions = New List(Of HomepageSchedulerFieldOptionsResponse)
ScheduleViewOptions = New List(Of ScheduleViewResponse)
End Sub
'''<Summary>
'''The company id.
'''</Summary>
<ApiMember(Description:="The company id.")>
Public Overridable Property CompanyId As Guid
'''<Summary>
'''If the user schedule is activated.
'''</Summary>
<ApiMember(Description:="If the user schedule is activated.")>
Public Overridable Property Active As Boolean
'''<Summary>
'''If the user schedule views id.
'''</Summary>
<ApiMember(Description:="If the user schedule views id.")>
Public Overridable Property ScheduleViewId As Integer
'''<Summary>
'''If the user schedule time slots in minutes.
'''</Summary>
<ApiMember(Description:="If the user schedule time slots in minutes.")>
Public Overridable Property ScheduleTimeSlotMinutes As Integer
'''<Summary>
'''If the user schedule time start time.
'''</Summary>
<ApiMember(Description:="If the user schedule time start time.")>
Public Overridable Property StartTime As Nullable(Of TimeSpan)
'''<Summary>
'''If the user schedule time end time.
'''</Summary>
<ApiMember(Description:="If the user schedule time end time.")>
Public Overridable Property EndTime As Nullable(Of TimeSpan)
'''<Summary>
'''If the user schedule should contain time exceptions.
'''</Summary>
<ApiMember(Description:="If the user schedule should contain time exceptions.")>
Public Overridable Property ShowTimeExceptions As Boolean
'''<Summary>
'''If allow booking in the scheduler.
'''</Summary>
<ApiMember(Description:="If allow booking in the scheduler.")>
Public Overridable Property EnableBooking As Boolean
'''<Summary>
'''The homepage schedule services that are selected
'''</Summary>
<ApiMember(Description:="The homepage schedule services that are selected")>
Public Overridable Property Services As List(Of HomepageSchedulerServiceResponse)
'''<Summary>
'''The homepage schedule resources that are selected
'''</Summary>
<ApiMember(Description:="The homepage schedule resources that are selected")>
Public Overridable Property Resources As List(Of HomepageSchedulerResourceResponse)
'''<Summary>
'''The homepage schedule fields that are selected
'''</Summary>
<ApiMember(Description:="The homepage schedule fields that are selected")>
Public Overridable Property Fields As List(Of HomepageSchedulerFieldResponse)
'''<Summary>
'''The homepage schedule fields select from
'''</Summary>
<ApiMember(Description:="The homepage schedule fields select from")>
Public Overridable Property FieldOptions As List(Of HomepageSchedulerFieldOptionsResponse)
'''<Summary>
'''The available schedule view options to choose from
'''</Summary>
<ApiMember(Description:="The available schedule view options to choose from")>
Public Overridable Property ScheduleViewOptions As List(Of ScheduleViewResponse)
End Class
Public Partial Class ScheduleViewResponse
Public Overridable Property Id As Integer
Public Overridable Property Name As String
End Class
<ValidateRequest(Validator:="IsAuthenticated")>
Public Partial Class UpdateHomepageSchedulerSettings
Implements ICompany
Public Sub New()
Resources = New List(Of HomepageSchedulerResource)
Services = New List(Of HomepageSchedulerService)
Fields = New List(Of HomepageScheduleField)
End Sub
'''<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>
'''If the user schedule is activated.
'''</Summary>
<ApiMember(Description:="If the user schedule is activated.")>
Public Overridable Property Active As Nullable(Of Boolean)
'''<Summary>
'''If the user schedule views id.
'''</Summary>
<ApiMember(Description:="If the user schedule views id.")>
Public Overridable Property ScheduleViewId As Nullable(Of Integer)
'''<Summary>
'''If the user schedule time slots in minutes.
'''</Summary>
<ApiMember(Description:="If the user schedule time slots in minutes.")>
Public Overridable Property ScheduleTimeSlotMinutes As Nullable(Of Integer)
'''<Summary>
'''If the user schedule time start time.
'''</Summary>
<ApiMember(Description:="If the user schedule time start time.")>
Public Overridable Property StartTime As Nullable(Of TimeSpan)
'''<Summary>
'''If the user schedule time end time.
'''</Summary>
<ApiMember(Description:="If the user schedule time end time.")>
Public Overridable Property EndTime As Nullable(Of TimeSpan)
'''<Summary>
'''If the user schedule should contain time exceptions.
'''</Summary>
<ApiMember(Description:="If the user schedule should contain time exceptions.")>
Public Overridable Property ShowTimeExceptions As Nullable(Of Boolean)
'''<Summary>
'''If allow booking in the scheduler.
'''</Summary>
<ApiMember(Description:="If allow booking in the scheduler.")>
Public Overridable Property EnableBooking As Nullable(Of Boolean)
'''<Summary>
'''What resources you want to be shown in scheduler.
'''</Summary>
<ApiMember(Description:="What resources you want to be shown in scheduler.")>
Public Overridable Property Resources As List(Of HomepageSchedulerResource)
'''<Summary>
'''What services you want to be shown in scheduler.
'''</Summary>
<ApiMember(Description:="What services you want to be shown in scheduler.")>
Public Overridable Property Services As List(Of HomepageSchedulerService)
'''<Summary>
'''What fields you want to be shown in scheduler.
'''</Summary>
<ApiMember(Description:="What fields you want to be shown in scheduler.")>
Public Overridable Property Fields As List(Of HomepageScheduleField)
End Class
End Namespace
End Namespace
VB.NET UpdateHomepageSchedulerSettings DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /homepage/scheduler/settings HTTP/1.1
Host: testapi.bokamera.se
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
CompanyId: 00000000-0000-0000-0000-000000000000,
Active: False,
ScheduleViewId: 0,
ScheduleTimeSlotMinutes: 0,
StartTime: PT0S,
EndTime: PT0S,
ShowTimeExceptions: False,
EnableBooking: False,
Resources:
[
{
Id: 0
}
],
Services:
[
{
Id: 0
}
],
Fields:
[
{
Id: 0,
ShowOnBooking: False,
ShowOnTooltip: False
}
]
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Active: False, ScheduleViewId: 0, ScheduleTimeSlotMinutes: 0, StartTime: PT0S, EndTime: PT0S, ShowTimeExceptions: False, EnableBooking: False, Services: [ { Id: 0, Name: String, Description: String } ], Resources: [ { Id: 0, Name: String, Description: String } ], Fields: [ { Id: 0, ShowOnBooking: False, ShowOnTooltip: False } ], FieldOptions: [ { Id: 0, Name: String, Description: String, SortOrder: 0 } ], ScheduleViewOptions: [ { Id: 0, Name: String } ] }