BokaMera.API.Host

<back to all web services

UpdateHomepageSchedulerSettings

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/homepage/scheduler/settingsUpdate homepage scheduler settingsUpdate homepage scheduler settings on the company of the currently logged in user, only administrators are allowed to update homepage menu.
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 HomepageSchedulerServiceResponse() = 
        ///<summary>
        ///The service id.
        ///</summary>
        [<ApiMember(Description="The service id.")>]
        member val Id:Int32 = new Int32() with get,set

        ///<summary>
        ///The service name.
        ///</summary>
        [<ApiMember(Description="The service name.")>]
        member val Name:String = null with get,set

        ///<summary>
        ///The service description.
        ///</summary>
        [<ApiMember(Description="The service description.")>]
        member val Description:String = null with get,set

        ///<summary>
        ///The service image url.
        ///</summary>
        [<ApiMember(Description="The service image url.")>]
        member val ImageUrl:Uri = null with get,set

    [<AllowNullLiteral>]
    type HomepageSchedulerResourceResponse() = 
        ///<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 description.
        ///</summary>
        [<ApiMember(Description="The resource description.")>]
        member val Description:String = null with get,set

        ///<summary>
        ///The resource image url.
        ///</summary>
        [<ApiMember(Description="The resource image url.")>]
        member val ImageUrl:Uri = null with get,set

    [<AllowNullLiteral>]
    type HomepageSchedulerFieldResponse() = 
        ///<summary>
        ///The field id.
        ///</summary>
        [<ApiMember(Description="The field id.")>]
        member val Id:Int32 = new Int32() with get,set

        ///<summary>
        ///If the field should be shown on booking.
        ///</summary>
        [<ApiMember(Description="If the field should be shown on booking.")>]
        member val ShowOnBooking:Boolean = new Boolean() with get,set

        ///<summary>
        ///If the field should be shown on tooltip.
        ///</summary>
        [<ApiMember(Description="If the field should be shown on tooltip.")>]
        member val ShowOnTooltip:Boolean = new Boolean() with get,set

    [<AllowNullLiteral>]
    type HomepageSchedulerFieldOptionsResponse() = 
        ///<summary>
        ///The field id.
        ///</summary>
        [<ApiMember(Description="The field id.")>]
        member val Id:Int32 = new Int32() with get,set

        ///<summary>
        ///The field name.
        ///</summary>
        [<ApiMember(Description="The field name.")>]
        member val Name:String = null with get,set

        ///<summary>
        ///The field description.
        ///</summary>
        [<ApiMember(Description="The field description.")>]
        member val Description:String = null with get,set

        ///<summary>
        ///The field sort order when listing.
        ///</summary>
        [<ApiMember(Description="The field sort order when listing.")>]
        member val SortOrder:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type ScheduleViewResponse() = 
        member val Id:Int32 = new Int32() with get,set
        member val Name:String = null with get,set

    [<AllowNullLiteral>]
    type HomepageSchedulerSettingsQueryResponse() = 
        ///<summary>
        ///The company id.
        ///</summary>
        [<ApiMember(Description="The company id.")>]
        member val CompanyId:Guid = new Guid() with get,set

        ///<summary>
        ///If the user schedule is activated.
        ///</summary>
        [<ApiMember(Description="If the user schedule is activated.")>]
        member val Active:Boolean = new Boolean() with get,set

        ///<summary>
        ///If the user schedule views id.
        ///</summary>
        [<ApiMember(Description="If the user schedule views id.")>]
        member val ScheduleViewId:Int32 = new Int32() with get,set

        ///<summary>
        ///If the user schedule time slots in minutes.
        ///</summary>
        [<ApiMember(Description="If the user schedule time slots in minutes.")>]
        member val ScheduleTimeSlotMinutes:Int32 = new Int32() with get,set

        ///<summary>
        ///If the user schedule time start time.
        ///</summary>
        [<ApiMember(Description="If the user schedule time start time.")>]
        member val StartTime:Nullable<TimeSpan> = new Nullable<TimeSpan>() with get,set

        ///<summary>
        ///If the user schedule time end time.
        ///</summary>
        [<ApiMember(Description="If the user schedule time end time.")>]
        member val EndTime:Nullable<TimeSpan> = new Nullable<TimeSpan>() with get,set

        ///<summary>
        ///If the user schedule should contain time exceptions.
        ///</summary>
        [<ApiMember(Description="If the user schedule should contain time exceptions.")>]
        member val ShowTimeExceptions:Boolean = new Boolean() with get,set

        ///<summary>
        ///If allow booking in the scheduler.
        ///</summary>
        [<ApiMember(Description="If allow booking in the scheduler.")>]
        member val EnableBooking:Boolean = new Boolean() with get,set

        ///<summary>
        ///The homepage schedule services that are selected
        ///</summary>
        [<ApiMember(Description="The homepage schedule services that are selected")>]
        member val Services:ResizeArray<HomepageSchedulerServiceResponse> = new ResizeArray<HomepageSchedulerServiceResponse>() with get,set

        ///<summary>
        ///The homepage schedule resources that are selected
        ///</summary>
        [<ApiMember(Description="The homepage schedule resources that are selected")>]
        member val Resources:ResizeArray<HomepageSchedulerResourceResponse> = new ResizeArray<HomepageSchedulerResourceResponse>() with get,set

        ///<summary>
        ///The homepage schedule fields that are selected
        ///</summary>
        [<ApiMember(Description="The homepage schedule fields that are selected")>]
        member val Fields:ResizeArray<HomepageSchedulerFieldResponse> = new ResizeArray<HomepageSchedulerFieldResponse>() with get,set

        ///<summary>
        ///The homepage schedule fields select from
        ///</summary>
        [<ApiMember(Description="The homepage schedule fields select from")>]
        member val FieldOptions:ResizeArray<HomepageSchedulerFieldOptionsResponse> = new ResizeArray<HomepageSchedulerFieldOptionsResponse>() with get,set

        ///<summary>
        ///The available schedule view options to choose from
        ///</summary>
        [<ApiMember(Description="The available schedule view options to choose from")>]
        member val ScheduleViewOptions:ResizeArray<ScheduleViewResponse> = new ResizeArray<ScheduleViewResponse>() with get,set

    [<AllowNullLiteral>]
    type HomepageSchedulerResource() = 
        ///<summary>
        ///The resource id.
        ///</summary>
        [<ApiMember(Description="The resource id.")>]
        member val Id:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type HomepageSchedulerService() = 
        ///<summary>
        ///The service id.
        ///</summary>
        [<ApiMember(Description="The service id.")>]
        member val Id:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type HomepageScheduleField() = 
        ///<summary>
        ///The field id.
        ///</summary>
        [<ApiMember(Description="The field id.", IsRequired=true)>]
        member val Id:Int32 = new Int32() with get,set

        ///<summary>
        ///If the field showed on the booking.
        ///</summary>
        [<ApiMember(Description="If the field showed on the booking.", IsRequired=true)>]
        member val ShowOnBooking:Boolean = new Boolean() with get,set

        ///<summary>
        ///If the field showed on the bookings tooltip.
        ///</summary>
        [<ApiMember(Description="If the field showed on the bookings tooltip.", IsRequired=true)>]
        member val ShowOnTooltip:Boolean = new Boolean() with get,set

    [<ValidateRequest(Validator="IsAuthenticated")>]
    [<AllowNullLiteral>]
    type UpdateHomepageSchedulerSettings() = 
        ///<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.")>]
        member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set

        ///<summary>
        ///If the user schedule is activated.
        ///</summary>
        [<ApiMember(Description="If the user schedule is activated.")>]
        member val Active:Nullable<Boolean> = new Nullable<Boolean>() with get,set

        ///<summary>
        ///If the user schedule views id.
        ///</summary>
        [<ApiMember(Description="If the user schedule views id.")>]
        member val ScheduleViewId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///If the user schedule time slots in minutes.
        ///</summary>
        [<ApiMember(Description="If the user schedule time slots in minutes.")>]
        member val ScheduleTimeSlotMinutes:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///If the user schedule time start time.
        ///</summary>
        [<ApiMember(Description="If the user schedule time start time.")>]
        member val StartTime:Nullable<TimeSpan> = new Nullable<TimeSpan>() with get,set

        ///<summary>
        ///If the user schedule time end time.
        ///</summary>
        [<ApiMember(Description="If the user schedule time end time.")>]
        member val EndTime:Nullable<TimeSpan> = new Nullable<TimeSpan>() with get,set

        ///<summary>
        ///If the user schedule should contain time exceptions.
        ///</summary>
        [<ApiMember(Description="If the user schedule should contain time exceptions.")>]
        member val ShowTimeExceptions:Nullable<Boolean> = new Nullable<Boolean>() with get,set

        ///<summary>
        ///If allow booking in the scheduler.
        ///</summary>
        [<ApiMember(Description="If allow booking in the scheduler.")>]
        member val EnableBooking:Nullable<Boolean> = new Nullable<Boolean>() with get,set

        ///<summary>
        ///What resources you want to be shown in scheduler.
        ///</summary>
        [<ApiMember(Description="What resources you want to be shown in scheduler.")>]
        member val Resources:ResizeArray<HomepageSchedulerResource> = new ResizeArray<HomepageSchedulerResource>() with get,set

        ///<summary>
        ///What services you want to be shown in scheduler.
        ///</summary>
        [<ApiMember(Description="What services you want to be shown in scheduler.")>]
        member val Services:ResizeArray<HomepageSchedulerService> = new ResizeArray<HomepageSchedulerService>() with get,set

        ///<summary>
        ///What fields you want to be shown in scheduler.
        ///</summary>
        [<ApiMember(Description="What fields you want to be shown in scheduler.")>]
        member val Fields:ResizeArray<HomepageScheduleField> = new ResizeArray<HomepageScheduleField>() with get,set

F# UpdateHomepageSchedulerSettings 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

HTTP + JSON

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: application/json
Content-Type: application/json
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","Active":false,"ScheduleViewId":0,"ScheduleTimeSlotMinutes":0,"StartTime":"00:00:00","EndTime":"00:00:00","ShowTimeExceptions":false,"EnableBooking":false,"Resources":[{"Id":0}],"Services":[{"Id":0}],"Fields":[{"Id":0,"ShowOnBooking":false,"ShowOnTooltip":false}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Active":false,"ScheduleViewId":0,"ScheduleTimeSlotMinutes":0,"StartTime":"00:00:00","EndTime":"00:00:00","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"}]}