Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /homepage/widget/settings | Update homepage widget settings | Update homepage widget 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 HomepageWidgetServiceLayoutsResponse() =
///<summary>
///The layout id.
///</summary>
[<ApiMember(Description="The layout id.")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///The layout name.
///</summary>
[<ApiMember(Description="The layout name.")>]
member val Name:String = null with get,set
///<summary>
///The layout description.
///</summary>
[<ApiMember(Description="The layout description.")>]
member val Description:String = null with get,set
///<summary>
///The layout code.
///</summary>
[<ApiMember(Description="The layout code.")>]
member val Code:String = null with get,set
[<AllowNullLiteral>]
type HomepageWidgetTimeLayoutsResponse() =
///<summary>
///The layout id.
///</summary>
[<ApiMember(Description="The layout id.")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///The layout name.
///</summary>
[<ApiMember(Description="The layout name.")>]
member val Name:String = null with get,set
///<summary>
///The layout description.
///</summary>
[<ApiMember(Description="The layout description.")>]
member val Description:String = null with get,set
///<summary>
///The layout code.
///</summary>
[<ApiMember(Description="The layout code.")>]
member val Code:String = null with get,set
[<AllowNullLiteral>]
type HomepageWidgetBookingLayoutsResponse() =
///<summary>
///The layout id.
///</summary>
[<ApiMember(Description="The layout id.")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///The layout name.
///</summary>
[<ApiMember(Description="The layout name.")>]
member val Name:String = null with get,set
///<summary>
///The layout description.
///</summary>
[<ApiMember(Description="The layout description.")>]
member val Description:String = null with get,set
///<summary>
///The layout code.
///</summary>
[<ApiMember(Description="The layout code.")>]
member val Code:String = null with get,set
[<AllowNullLiteral>]
type HomepageWidgetBookingMethodsResponse() =
///<summary>
///The layout id.
///</summary>
[<ApiMember(Description="The layout id.")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///The layout name.
///</summary>
[<ApiMember(Description="The layout name.")>]
member val Name:String = null with get,set
///<summary>
///The layout description.
///</summary>
[<ApiMember(Description="The layout description.")>]
member val Description:String = null with get,set
///<summary>
///The layout code.
///</summary>
[<ApiMember(Description="The layout code.")>]
member val Code:String = null with get,set
[<AllowNullLiteral>]
type HomepageWidgetSettingsQueryResponse() =
///<summary>
///The company id.
///</summary>
[<ApiMember(Description="The company id.")>]
member val CompanyId:Guid = new Guid() with get,set
///<summary>
///The service layouts id.
///</summary>
[<ApiMember(Description="The service layouts id.")>]
member val ServiceLayoutId:Int32 = new Int32() with get,set
///<summary>
///The time layouts id.
///</summary>
[<ApiMember(Description="The time layouts id.")>]
member val TimeLayoutId:Int32 = new Int32() with get,set
///<summary>
///The booking layouts id.
///</summary>
[<ApiMember(Description="The booking layouts id.")>]
member val BookingLayoutId:Int32 = new Int32() with get,set
///<summary>
///The primary color of the booking widget.
///</summary>
[<ApiMember(Description="The primary color of the booking widget.")>]
member val PrimaryColor:String = null with get,set
///<summary>
///If you should show the service image in the booking widget.
///</summary>
[<ApiMember(Description="If you should show the service image in the booking widget.")>]
member val ShowServiceImage:Boolean = new Boolean() with get,set
///<summary>
///If you should show the rebate code field in the booking widget.
///</summary>
[<ApiMember(Description="If you should show the rebate code field in the booking widget.")>]
member val ShowRebateCodeField:Boolean = new Boolean() with get,set
///<summary>
///If you should show the next available time in the booking widget.
///</summary>
[<ApiMember(Description="If you should show the next available time in the booking widget.")>]
member val ShowNextAvailableTime:Boolean = new Boolean() with get,set
///<summary>
///If you should show the subscribe to newsletter checkbox in the booking widget.
///</summary>
[<ApiMember(Description="If you should show the subscribe to newsletter checkbox in the booking widget.")>]
member val ShowSubscribeToNewsletter:Boolean = new Boolean() with get,set
///<summary>
///If you should show the create account option.
///</summary>
[<ApiMember(Description="If you should show the create account option.")>]
member val EnableCreateAccount:Boolean = new Boolean() with get,set
///<summary>
///If you should show the login to account option.
///</summary>
[<ApiMember(Description="If you should show the login to account option.")>]
member val EnableLogin:Boolean = new Boolean() with get,set
///<summary>
///If you should show the facebook login to account option.
///</summary>
[<ApiMember(Description="If you should show the facebook login to account option.")>]
member val EnableFacebookLogin:Boolean = new Boolean() with get,set
///<summary>
///If you should show the direct booking option. This enables customer to book with entering contact information.
///</summary>
[<ApiMember(Description="If you should show the direct booking option. This enables customer to book with entering contact information.")>]
member val EnableDirectBooking:Boolean = new Boolean() with get,set
///<summary>
///If the site should have dark theme or not.
///</summary>
[<ApiMember(Description="If the site should have dark theme or not.")>]
member val DarkTheme:Boolean = new Boolean() with get,set
///<summary>
///If you should show the end time in the booking widget.
///</summary>
[<ApiMember(Description="If you should show the end time in the booking widget.")>]
member val ShowEndTime:Boolean = new Boolean() with get,set
///<summary>
///What text to show on booked time slots. Default text is Booked
///</summary>
[<ApiMember(Description="What text to show on booked time slots. Default text is Booked")>]
member val BookedTimeSlotText:String = null with get,set
member val ServiceLayoutOptions:ResizeArray<HomepageWidgetServiceLayoutsResponse> = new ResizeArray<HomepageWidgetServiceLayoutsResponse>() with get,set
member val TimeLayoutOptions:ResizeArray<HomepageWidgetTimeLayoutsResponse> = new ResizeArray<HomepageWidgetTimeLayoutsResponse>() with get,set
member val BookingLayoutOptions:ResizeArray<HomepageWidgetBookingLayoutsResponse> = new ResizeArray<HomepageWidgetBookingLayoutsResponse>() with get,set
member val BookingMethodOptions:ResizeArray<HomepageWidgetBookingMethodsResponse> = new ResizeArray<HomepageWidgetBookingMethodsResponse>() with get,set
[<ValidateRequest(Validator="IsAuthenticated")>]
[<AllowNullLiteral>]
type UpdateHomepageWidgetSettings() =
///<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>
///Serivce Layout.
///</summary>
[<ApiMember(Description="Serivce Layout.")>]
member val ServiceLayoutId:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///Time Layout.
///</summary>
[<ApiMember(Description="Time Layout.")>]
member val TimeLayoutId:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///Booking Layout.
///</summary>
[<ApiMember(Description="Booking Layout.")>]
member val BookingLayoutId:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///The primary color of the booking widget.
///</summary>
[<ApiMember(Description="The primary color of the booking widget.")>]
member val PrimaryColor:String = null with get,set
///<summary>
///If the site should have dark theme or not.
///</summary>
[<ApiMember(Description="If the site should have dark theme or not.")>]
member val DarkTheme:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///If you should show the service image in the booking widget.
///</summary>
[<ApiMember(Description="If you should show the service image in the booking widget.")>]
member val ShowServiceImage:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///If you should show the rebate code field in the booking widget.
///</summary>
[<ApiMember(Description="If you should show the rebate code field in the booking widget.")>]
member val ShowRebateCodeField:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///If you should show the next available time in the booking widget.
///</summary>
[<ApiMember(Description="If you should show the next available time in the booking widget.")>]
member val ShowNextAvailableTime:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///If you should show the end time in the booking widget.
///</summary>
[<ApiMember(Description="If you should show the end time in the booking widget.")>]
member val ShowEndTime:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///Show subscribe to newsletter checkbox on the page
///</summary>
[<ApiMember(Description="Show subscribe to newsletter checkbox on the page")>]
member val ShowSubscribeToNewsletter:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///What text to show on booked time slots. Default text is Booked
///</summary>
[<ApiMember(Description="What text to show on booked time slots. Default text is Booked")>]
member val BookedTimeSlotText:String = null with get,set
///<summary>
///If you should show the create account option.
///</summary>
[<ApiMember(Description="If you should show the create account option.")>]
member val EnableCreateAccount:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///If you should show the login to account option.
///</summary>
[<ApiMember(Description="If you should show the login to account option.")>]
member val EnableLogin:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///If you should show the facebook login to account option.
///</summary>
[<ApiMember(Description="If you should show the facebook login to account option.")>]
member val EnableFacebookLogin:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///If you should show the direct booking option. This enables customer to book with entering contact information.
///</summary>
[<ApiMember(Description="If you should show the direct booking option. This enables customer to book with entering contact information.")>]
member val EnableDirectBooking:Nullable<Boolean> = new Nullable<Boolean>() with get,set
F# UpdateHomepageWidgetSettings DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /homepage/widget/settings HTTP/1.1
Host: api.bokamera.se
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<UpdateHomepageWidgetSettings xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<BookedTimeSlotText>String</BookedTimeSlotText>
<BookingLayoutId>0</BookingLayoutId>
<CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
<DarkTheme>false</DarkTheme>
<EnableCreateAccount>false</EnableCreateAccount>
<EnableDirectBooking>false</EnableDirectBooking>
<EnableFacebookLogin>false</EnableFacebookLogin>
<EnableLogin>false</EnableLogin>
<PrimaryColor>String</PrimaryColor>
<ServiceLayoutId>0</ServiceLayoutId>
<ShowEndTime>false</ShowEndTime>
<ShowNextAvailableTime>false</ShowNextAvailableTime>
<ShowRebateCodeField>false</ShowRebateCodeField>
<ShowServiceImage>false</ShowServiceImage>
<ShowSubscribeToNewsletter>false</ShowSubscribeToNewsletter>
<TimeLayoutId>0</TimeLayoutId>
</UpdateHomepageWidgetSettings>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <HomepageWidgetSettingsQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos"> <BookedTimeSlotText>String</BookedTimeSlotText> <BookingLayoutId>0</BookingLayoutId> <BookingLayoutOptions> <HomepageWidgetBookingLayoutsResponse> <Code>String</Code> <Description>String</Description> <Id>0</Id> <Name>String</Name> </HomepageWidgetBookingLayoutsResponse> </BookingLayoutOptions> <BookingMethodOptions> <HomepageWidgetBookingMethodsResponse> <Code>String</Code> <Description>String</Description> <Id>0</Id> <Name>String</Name> </HomepageWidgetBookingMethodsResponse> </BookingMethodOptions> <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId> <DarkTheme>false</DarkTheme> <EnableCreateAccount>false</EnableCreateAccount> <EnableDirectBooking>false</EnableDirectBooking> <EnableFacebookLogin>false</EnableFacebookLogin> <EnableLogin>false</EnableLogin> <PrimaryColor>String</PrimaryColor> <ServiceLayoutId>0</ServiceLayoutId> <ServiceLayoutOptions> <HomepageWidgetServiceLayoutsResponse> <Code>String</Code> <Description>String</Description> <Id>0</Id> <Name>String</Name> </HomepageWidgetServiceLayoutsResponse> </ServiceLayoutOptions> <ShowEndTime>false</ShowEndTime> <ShowNextAvailableTime>false</ShowNextAvailableTime> <ShowRebateCodeField>false</ShowRebateCodeField> <ShowServiceImage>false</ShowServiceImage> <ShowSubscribeToNewsletter>false</ShowSubscribeToNewsletter> <TimeLayoutId>0</TimeLayoutId> <TimeLayoutOptions> <HomepageWidgetTimeLayoutsResponse> <Code>String</Code> <Description>String</Description> <Id>0</Id> <Name>String</Name> </HomepageWidgetTimeLayoutsResponse> </TimeLayoutOptions> </HomepageWidgetSettingsQueryResponse>