Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /settings | Update settings for the company of the currently logged in user | Update settings for the company of the currently logged in user. |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;
using BokaMera.API.ServiceModel.Db;
namespace BokaMera.API.ServiceModel.Db
{
public partial class BookingStatusOptions
{
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }
}
}
namespace BokaMera.API.ServiceModel.Dtos
{
public partial class BookingTemplateResponse
{
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }
public virtual string UsedByApplication { get; set; }
}
public partial class CalendarTypeResponse
{
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }
public virtual bool Active { get; set; }
}
public partial class FreeSpotTextsResponse
{
public virtual int Id { get; set; }
public virtual string TextSingular { get; set; }
public virtual string TextPlural { get; set; }
}
public partial class ScheduleViewResponse
{
public virtual int Id { get; set; }
public virtual string Name { get; set; }
}
public partial class SettingResponse
{
public SettingResponse()
{
ScheduleViewOptions = new List<ScheduleViewResponse>{};
WeekNumberOptions = new List<WeekNumberSettingResponse>{};
BookingTemplateOptions = new List<BookingTemplateResponse>{};
CalendarTypeOptions = new List<CalendarTypeResponse>{};
BookingStatusOptions = new List<BookingStatusOptions>{};
FreeSpotTextOptions = new List<FreeSpotTextsResponse>{};
}
public virtual Guid CompanyId { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int BookingStatusId { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int ScheduleViewId { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int BookingTemplateId { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int CalendarTypeId { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual bool AllowBookingOnUnbookedTimes { get; set; }
///<summary>
///
///</summary>
[DataMember(Name="SendEmailReminder")]
[ApiMember(DataType="boolean", Description="")]
public virtual bool SendEmailReminder { get; set; }
///<summary>
///
///</summary>
[DataMember(Name="SendSmsReminder")]
[ApiMember(DataType="boolean", Description="")]
public virtual bool SendSmsReminder { get; set; }
///<summary>
///
///</summary>
[DataMember(Name="SendEmailConfirmation")]
[ApiMember(DataType="boolean", Description="")]
public virtual bool SendEmailConfirmation { get; set; }
///<summary>
///
///</summary>
[DataMember(Name="SendSmsConfirmation")]
[ApiMember(DataType="boolean", Description="")]
public virtual bool SendSmsConfirmation { get; set; }
///<summary>
///Message text field that could be used inside message templates using [MessageText].
///</summary>
[ApiMember(DataType="string", Description="Message text field that could be used inside message templates using [MessageText].")]
public virtual string MessageText { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int EmailReminderTime { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int SmsReminderTime { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int MaxActiveBookings { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual bool SendNotifications { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="string", Description="")]
public virtual string SendNotificationsEmail { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual bool EnableMobileApp { get; set; }
///<summary>
///
///</summary>
[ApiMember(Description="")]
public virtual TimeSpan? ScheduleStartTime { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual TimeSpan? ScheduleEndTime { get; set; }
///<summary>
///The admin scheduler if each resources should be shown in a seperate group
///</summary>
[ApiMember(DataType="boolean", Description="The admin scheduler if each resources should be shown in a seperate group")]
public virtual bool ScheduleGroupResources { get; set; }
///<summary>
///The admin scheduler if the horizontal scrolling should be turned off
///</summary>
[ApiMember(DataType="boolean", Description="The admin scheduler if the horizontal scrolling should be turned off")]
public virtual bool SchedulerDisableHorizontalScrolling { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="string", Description="")]
public virtual string ReceiptTemplate { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int ScheduleTimeSlotMinutes { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual bool ShowFreeTimesLeft { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int FreeSpotTextsId { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual bool EnableICalGroupBookings { get; set; }
///<summary>
///Booking agreement text. All html needs to entered using markup. Read about markup here https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet. Use this editor to create markup https://stackedit.io/app#
///</summary>
[ApiMember(DataType="string", Description="Booking agreement text. All html needs to entered using markup. Read about markup here https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet. Use this editor to create markup https://stackedit.io/app#")]
public virtual string AgreementTemplate { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual bool ScheduleShowTimeExeptions { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual bool EnableBookingsOnSameTime { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int ShowWeekNumberSettingId { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual bool EnableShowBookedTimes { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="", Description="")]
public virtual int? BookSpotUserResponseMinutes { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="", Description="")]
public virtual bool IsBookSpotDirectly { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="", Description="")]
public virtual int BookSpotDirectlyTimeLeftMinutes { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="", Description="")]
public virtual bool? SendEmailNotificationQueue { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="", Description="")]
public virtual bool? SendSMSNotificationQueue { get; set; }
///<summary>
///
///</summary>
[ApiMember(Description="")]
public virtual bool EnableSendFollowUpMessage { get; set; }
///<summary>
///When follow up message should be sent in hours after the booking.
///</summary>
[ApiMember(Description="When follow up message should be sent in hours after the booking.")]
public virtual int FollowUpMessageTime { get; set; }
///<summary>
///If it's only allowed for existing customers to book
///</summary>
[ApiMember(DataType="boolean", Description="If it's only allowed for existing customers to book")]
public virtual bool BookOnlyOnExistingCustomers { get; set; }
///<summary>
///If a unique pin code should be generated for the customer
///</summary>
[ApiMember(DataType="boolean", Description="If a unique pin code should be generated for the customer")]
public virtual bool AutoGenerateUniquePinCode { get; set; }
///<summary>
///If a user profile should be created when customer is booking time. With the property customer can login.
///</summary>
[ApiMember(DataType="boolean", Description="If a user profile should be created when customer is booking time. With the property customer can login.")]
public virtual bool AutoCreateUserProfile { get; set; }
///<summary>
///The available schedule view options to choose from
///</summary>
[ApiMember(Description="The available schedule view options to choose from")]
public virtual List<ScheduleViewResponse> ScheduleViewOptions { get; set; }
///<summary>
///The available week number options to choose from
///</summary>
[ApiMember(Description="The available week number options to choose from")]
public virtual List<WeekNumberSettingResponse> WeekNumberOptions { get; set; }
///<summary>
///The booking template options to choose from
///</summary>
[ApiMember(Description="The booking template options to choose from")]
public virtual List<BookingTemplateResponse> BookingTemplateOptions { get; set; }
///<summary>
///The calendar type options to choose from
///</summary>
[ApiMember(Description="The calendar type options to choose from")]
public virtual List<CalendarTypeResponse> CalendarTypeOptions { get; set; }
///<summary>
///The booking status options to choose from
///</summary>
[ApiMember(Description="The booking status options to choose from")]
public virtual List<BookingStatusOptions> BookingStatusOptions { get; set; }
///<summary>
///The free spot text options to choose from
///</summary>
[ApiMember(Description="The free spot text options to choose from")]
public virtual List<FreeSpotTextsResponse> FreeSpotTextOptions { get; set; }
///<summary>
///If you have different prices over different times per day and want it to calculate the weighted price for the booked time.
///</summary>
[ApiMember(DataType="boolean", Description="If you have different prices over different times per day and want it to calculate the weighted price for the booked time.")]
public virtual bool WeightedPrices { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual bool ShowMultiDayAsTime { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual bool ShowMultipleResourcesAsOne { get; set; }
}
[ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)]
[ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403)]
[ValidateRequest("IsAuthenticated")]
public partial class UpdateSetting
: ICompany
{
///<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 virtual Guid? CompanyId { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int? BookingStatusId { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int? ScheduleViewId { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int? BookingTemplateId { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int? CalendarTypeId { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="bool", Description="")]
public virtual bool? AllowBookingOnUnbookedTimes { get; set; }
///<summary>
///
///</summary>
[DataMember(Name="SendEmailReminder")]
[ApiMember(DataType="boolean", Description="")]
public virtual bool? SendEmailReminder { get; set; }
///<summary>
///
///</summary>
[DataMember(Name="SendSmsReminder")]
[ApiMember(DataType="boolean", Description="")]
public virtual bool? SendSmsReminder { get; set; }
///<summary>
///
///</summary>
[DataMember(Name="SendEmailConfirmation")]
[ApiMember(DataType="boolean", Description="")]
public virtual bool? SendEmailConfirmation { get; set; }
///<summary>
///
///</summary>
[DataMember(Name="SendSmsConfirmation")]
[ApiMember(DataType="boolean", Description="")]
public virtual bool? SendSmsConfirmation { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int? EmailReminderTime { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int? SmsReminderTime { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int? MaxActiveBookings { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="bool", Description="")]
public virtual bool? SendNotifications { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="string", Description="")]
public virtual string SendNotificationsEmail { get; set; }
///<summary>
///Message text field that could be used inside message templates using [MessageText].
///</summary>
[ApiMember(DataType="string", Description="Message text field that could be used inside message templates using [MessageText].")]
public virtual string MessageText { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="bool", Description="")]
public virtual bool? EnableMobileApp { get; set; }
///<summary>
///The admin scheduler start time to show as default
///</summary>
[ApiMember(Description="The admin scheduler start time to show as default")]
public virtual TimeSpan? ScheduleStartTime { get; set; }
///<summary>
///The admin scheduler end time to show as default
///</summary>
[ApiMember(Description="The admin scheduler end time to show as default")]
public virtual TimeSpan? ScheduleEndTime { get; set; }
///<summary>
///Booking receipt text.
///</summary>
[ApiMember(DataType="string", Description="Booking receipt text.")]
public virtual string ReceiptTemplate { get; set; }
///<summary>
///The admin scheduler minutes of each timeslot
///</summary>
[ApiMember(Description="The admin scheduler minutes of each timeslot")]
public virtual int? ScheduleTimeSlotMinutes { get; set; }
///<summary>
///The admin scheduler if each resources should be shown in a seperate group
///</summary>
[ApiMember(Description="The admin scheduler if each resources should be shown in a seperate group")]
public virtual bool? ScheduleGroupResources { get; set; }
///<summary>
///The admin scheduler if the horizontal scrolling should be turned off
///</summary>
[ApiMember(DataType="boolean", Description="The admin scheduler if the horizontal scrolling should be turned off")]
public virtual bool? SchedulerDisableHorizontalScrolling { get; set; }
///<summary>
///If it's only allowed for existing customers to book
///</summary>
[ApiMember(DataType="boolean", Description="If it's only allowed for existing customers to book")]
public virtual bool? BookOnlyOnExistingCustomers { get; set; }
///<summary>
///If a unique pin code should be generated for the customer
///</summary>
[ApiMember(DataType="boolean", Description="If a unique pin code should be generated for the customer")]
public virtual bool? AutoGenerateUniquePinCode { get; set; }
///<summary>
///If a user profile should be created when customer is booking time. With the property customer can login.
///</summary>
[ApiMember(DataType="boolean", Description="If a user profile should be created when customer is booking time. With the property customer can login.")]
public virtual bool? AutoCreateUserProfile { get; set; }
///<summary>
///When follow up message should be sent in hours after the booking.
///</summary>
[ApiMember(Description="When follow up message should be sent in hours after the booking.")]
public virtual int? FollowUpMessageTime { get; set; }
///<summary>
///
///</summary>
[ApiMember(Description="")]
public virtual bool? ShowFreeTimesLeft { get; set; }
///<summary>
///
///</summary>
[ApiMember(Description="")]
public virtual int? FreeSpotTextsId { get; set; }
///<summary>
///
///</summary>
[ApiMember(Description="")]
public virtual bool? EnableICalGroupBookings { get; set; }
///<summary>
///Booking agreement text. All html needs to entered using markup. Read about markup here https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet. Use this editor to create markup https://stackedit.io/app#
///</summary>
[ApiMember(DataType="string", Description="Booking agreement text. All html needs to entered using markup. Read about markup here https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet. Use this editor to create markup https://stackedit.io/app#")]
public virtual string AgreementTemplate { get; set; }
///<summary>
///
///</summary>
[ApiMember(Description="")]
public virtual bool? ScheduleShowTimeExeptions { get; set; }
///<summary>
///
///</summary>
[ApiMember(Description="")]
public virtual bool? EnableBookingsOnSameTime { get; set; }
///<summary>
///
///</summary>
[ApiMember(Description="")]
public virtual int? ShowWeekNumberSettingId { get; set; }
///<summary>
///
///</summary>
[ApiMember(Description="")]
public virtual bool? EnableShowBookedTimes { get; set; }
///<summary>
///
///</summary>
[ApiMember(Description="")]
public virtual bool? EnableSendFollowUpMessage { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int? BookSpotUserResponseMinutes { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual bool? IsBookSpotDirectly { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual int? BookSpotDirectlyTimeLeftMinutes { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="int", Description="")]
public virtual bool? SendEmailNotificationQueue { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual bool? SendSMSNotificationQueue { get; set; }
///<summary>
///If you have different prices over different times per day and want it to calculate the weighted price for the booked time.
///</summary>
[ApiMember(DataType="boolean", Description="If you have different prices over different times per day and want it to calculate the weighted price for the booked time.")]
public virtual bool? WeightedPrices { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual bool? ShowMultiDayAsTime { get; set; }
///<summary>
///
///</summary>
[ApiMember(DataType="boolean", Description="")]
public virtual bool? ShowMultipleResourcesAsOne { get; set; }
}
public partial class WeekNumberSettingResponse
{
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }
}
}
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 /settings HTTP/1.1
Host: api.bokamera.se
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
CompanyId: 00000000-0000-0000-0000-000000000000,
BookingStatusId: 0,
ScheduleViewId: 0,
BookingTemplateId: 0,
CalendarTypeId: 0,
AllowBookingOnUnbookedTimes: False,
SendEmailReminder: False,
SendSmsReminder: False,
SendEmailConfirmation: False,
SendSmsConfirmation: False,
EmailReminderTime: 0,
SmsReminderTime: 0,
MaxActiveBookings: 0,
SendNotifications: False,
SendNotificationsEmail: String,
MessageText: String,
EnableMobileApp: False,
ScheduleStartTime: PT0S,
ScheduleEndTime: PT0S,
ReceiptTemplate: String,
ScheduleTimeSlotMinutes: 0,
ScheduleGroupResources: False,
SchedulerDisableHorizontalScrolling: False,
BookOnlyOnExistingCustomers: False,
AutoGenerateUniquePinCode: False,
AutoCreateUserProfile: False,
FollowUpMessageTime: 0,
ShowFreeTimesLeft: False,
FreeSpotTextsId: 0,
EnableICalGroupBookings: False,
AgreementTemplate: String,
ScheduleShowTimeExeptions: False,
EnableBookingsOnSameTime: False,
ShowWeekNumberSettingId: 0,
EnableShowBookedTimes: False,
EnableSendFollowUpMessage: False,
BookSpotUserResponseMinutes: 0,
IsBookSpotDirectly: False,
BookSpotDirectlyTimeLeftMinutes: 0,
SendEmailNotificationQueue: False,
SendSMSNotificationQueue: False,
WeightedPrices: False,
ShowMultiDayAsTime: False,
ShowMultipleResourcesAsOne: False
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { BookingStatusId: 0, ScheduleViewId: 0, BookingTemplateId: 0, CalendarTypeId: 0, AllowBookingOnUnbookedTimes: False, SendEmailReminder: False, SendSmsReminder: False, SendEmailConfirmation: False, SendSmsConfirmation: False, MessageText: String, EmailReminderTime: 0, SmsReminderTime: 0, MaxActiveBookings: 0, SendNotifications: False, SendNotificationsEmail: String, EnableMobileApp: False, ScheduleStartTime: PT0S, ScheduleEndTime: PT0S, ScheduleGroupResources: False, SchedulerDisableHorizontalScrolling: False, ReceiptTemplate: String, ScheduleTimeSlotMinutes: 0, ShowFreeTimesLeft: False, FreeSpotTextsId: 0, EnableICalGroupBookings: False, AgreementTemplate: String, ScheduleShowTimeExeptions: False, EnableBookingsOnSameTime: False, ShowWeekNumberSettingId: 0, EnableShowBookedTimes: False, BookSpotUserResponseMinutes: 0, IsBookSpotDirectly: False, BookSpotDirectlyTimeLeftMinutes: 0, SendEmailNotificationQueue: False, SendSMSNotificationQueue: False, EnableSendFollowUpMessage: False, FollowUpMessageTime: 0, BookOnlyOnExistingCustomers: False, AutoGenerateUniquePinCode: False, AutoCreateUserProfile: False, ScheduleViewOptions: [ { Id: 0, Name: String } ], WeekNumberOptions: [ { Id: 0, Name: String, Description: String } ], BookingTemplateOptions: [ { Id: 0, Name: String, Description: String, UsedByApplication: String } ], CalendarTypeOptions: [ { Id: 0, Name: String, Description: String, Active: False } ], BookingStatusOptions: [ { Id: 0, Name: String, Description: String } ], FreeSpotTextOptions: [ { Id: 0, TextSingular: String, TextPlural: String } ], WeightedPrices: False, ShowMultiDayAsTime: False, ShowMultipleResourcesAsOne: False }