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. |
---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ScheduleViewResponse:
id: int = 0
name: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WeekNumberSettingResponse:
id: int = 0
name: Optional[str] = None
description: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BookingTemplateResponse:
id: int = 0
name: Optional[str] = None
description: Optional[str] = None
used_by_application: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CalendarTypeResponse:
id: int = 0
name: Optional[str] = None
description: Optional[str] = None
active: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BookingStatusOptions:
id: int = 0
name: Optional[str] = None
description: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FreeSpotTextsResponse:
id: int = 0
text_singular: Optional[str] = None
text_plural: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SettingResponse:
company_id: Optional[str] = None
# @ApiMember(DataType="int", Description="")
booking_status_id: int = 0
"""
"""
# @ApiMember(DataType="int", Description="")
schedule_view_id: int = 0
"""
"""
# @ApiMember(DataType="int", Description="")
booking_template_id: int = 0
"""
"""
# @ApiMember(DataType="int", Description="")
calendar_type_id: int = 0
"""
"""
# @ApiMember(DataType="boolean", Description="")
allow_booking_on_unbooked_times: bool = False
"""
"""
# @ApiMember(DataType="boolean", Description="")
send_email_reminder: bool = False
"""
"""
# @ApiMember(DataType="boolean", Description="")
send_sms_reminder: bool = False
"""
"""
# @ApiMember(DataType="boolean", Description="")
send_email_confirmation: bool = False
"""
"""
# @ApiMember(DataType="boolean", Description="")
send_sms_confirmation: bool = False
"""
"""
# @ApiMember(DataType="string", Description="Message text field that could be used inside message templates using [MessageText].")
message_text: Optional[str] = None
"""
Message text field that could be used inside message templates using [MessageText].
"""
# @ApiMember(DataType="int", Description="")
email_reminder_time: int = 0
"""
"""
# @ApiMember(DataType="int", Description="")
sms_reminder_time: int = 0
"""
"""
# @ApiMember(DataType="int", Description="")
max_active_bookings: int = 0
"""
"""
# @ApiMember(DataType="boolean", Description="")
send_notifications: bool = False
"""
"""
# @ApiMember(DataType="string", Description="")
send_notifications_email: Optional[str] = None
"""
"""
# @ApiMember(DataType="boolean", Description="")
enable_mobile_app: bool = False
"""
"""
# @ApiMember(Description="")
schedule_start_time: Optional[datetime.timedelta] = None
"""
"""
# @ApiMember(DataType="boolean", Description="")
schedule_end_time: Optional[datetime.timedelta] = None
"""
"""
# @ApiMember(DataType="boolean", Description="The admin scheduler if each resources should be shown in a seperate group")
schedule_group_resources: bool = False
"""
The admin scheduler if each resources should be shown in a seperate group
"""
# @ApiMember(DataType="boolean", Description="The admin scheduler if the horizontal scrolling should be turned off")
scheduler_disable_horizontal_scrolling: bool = False
"""
The admin scheduler if the horizontal scrolling should be turned off
"""
# @ApiMember(DataType="string", Description="")
receipt_template: Optional[str] = None
"""
"""
# @ApiMember(DataType="int", Description="")
schedule_time_slot_minutes: int = 0
"""
"""
# @ApiMember(DataType="boolean", Description="")
show_free_times_left: bool = False
"""
"""
# @ApiMember(DataType="int", Description="")
free_spot_texts_id: int = 0
"""
"""
# @ApiMember(DataType="boolean", Description="")
enable_i_cal_group_bookings: bool = False
"""
"""
# @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#")
agreement_template: Optional[str] = None
"""
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#
"""
# @ApiMember(DataType="boolean", Description="")
schedule_show_time_exeptions: bool = False
"""
"""
# @ApiMember(DataType="boolean", Description="")
enable_bookings_on_same_time: bool = False
"""
"""
# @ApiMember(DataType="int", Description="")
show_week_number_setting_id: int = 0
"""
"""
# @ApiMember(DataType="boolean", Description="")
enable_show_booked_times: bool = False
"""
"""
# @ApiMember(DataType="", Description="")
book_spot_user_response_minutes: Optional[int] = None
"""
"""
# @ApiMember(DataType="", Description="")
is_book_spot_directly: bool = False
"""
"""
# @ApiMember(DataType="", Description="")
book_spot_directly_time_left_minutes: int = 0
"""
"""
# @ApiMember(DataType="", Description="")
send_email_notification_queue: Optional[bool] = None
"""
"""
# @ApiMember(DataType="", Description="")
send_s_m_s_notification_queue: Optional[bool] = None
"""
"""
# @ApiMember(Description="")
enable_send_follow_up_message: bool = False
"""
"""
# @ApiMember(Description="When follow up message should be sent in hours after the booking.")
follow_up_message_time: int = 0
"""
When follow up message should be sent in hours after the booking.
"""
# @ApiMember(DataType="boolean", Description="If it's only allowed for existing customers to book")
book_only_on_existing_customers: bool = False
"""
If it's only allowed for existing customers to book
"""
# @ApiMember(DataType="boolean", Description="If a unique pin code should be generated for the customer")
auto_generate_unique_pin_code: bool = False
"""
If a unique pin code should be generated for the customer
"""
# @ApiMember(DataType="boolean", Description="If a user profile should be created when customer is booking time. With the property customer can login.")
auto_create_user_profile: bool = False
"""
If a user profile should be created when customer is booking time. With the property customer can login.
"""
# @ApiMember(Description="The available schedule view options to choose from")
schedule_view_options: Optional[List[ScheduleViewResponse]] = None
"""
The available schedule view options to choose from
"""
# @ApiMember(Description="The available week number options to choose from")
week_number_options: Optional[List[WeekNumberSettingResponse]] = None
"""
The available week number options to choose from
"""
# @ApiMember(Description="The booking template options to choose from")
booking_template_options: Optional[List[BookingTemplateResponse]] = None
"""
The booking template options to choose from
"""
# @ApiMember(Description="The calendar type options to choose from")
calendar_type_options: Optional[List[CalendarTypeResponse]] = None
"""
The calendar type options to choose from
"""
# @ApiMember(Description="The booking status options to choose from")
booking_status_options: Optional[List[BookingStatusOptions]] = None
"""
The booking status options to choose from
"""
# @ApiMember(Description="The free spot text options to choose from")
free_spot_text_options: Optional[List[FreeSpotTextsResponse]] = None
"""
The free spot text options to choose from
"""
# @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.")
weighted_prices: bool = False
"""
If you have different prices over different times per day and want it to calculate the weighted price for the booked time.
"""
# @ApiMember(DataType="boolean", Description="")
show_multi_day_as_time: bool = False
"""
"""
# @ApiMember(DataType="boolean", Description="")
show_multiple_resources_as_one: bool = False
"""
"""
# @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(Validator="IsAuthenticated")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UpdateSetting(ICompany):
# @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
company_id: Optional[str] = None
"""
The company id, if empty will use the company id for the user you are logged in with.
"""
# @ApiMember(DataType="int", Description="")
booking_status_id: Optional[int] = None
"""
"""
# @ApiMember(DataType="int", Description="")
schedule_view_id: Optional[int] = None
"""
"""
# @ApiMember(DataType="int", Description="")
booking_template_id: Optional[int] = None
"""
"""
# @ApiMember(DataType="int", Description="")
calendar_type_id: Optional[int] = None
"""
"""
# @ApiMember(DataType="bool", Description="")
allow_booking_on_unbooked_times: Optional[bool] = None
"""
"""
# @ApiMember(DataType="boolean", Description="")
send_email_reminder: Optional[bool] = None
"""
"""
# @ApiMember(DataType="boolean", Description="")
send_sms_reminder: Optional[bool] = None
"""
"""
# @ApiMember(DataType="boolean", Description="")
send_email_confirmation: Optional[bool] = None
"""
"""
# @ApiMember(DataType="boolean", Description="")
send_sms_confirmation: Optional[bool] = None
"""
"""
# @ApiMember(DataType="int", Description="")
email_reminder_time: Optional[int] = None
"""
"""
# @ApiMember(DataType="int", Description="")
sms_reminder_time: Optional[int] = None
"""
"""
# @ApiMember(DataType="int", Description="")
max_active_bookings: Optional[int] = None
"""
"""
# @ApiMember(DataType="bool", Description="")
send_notifications: Optional[bool] = None
"""
"""
# @ApiMember(DataType="string", Description="")
send_notifications_email: Optional[str] = None
"""
"""
# @ApiMember(DataType="string", Description="Message text field that could be used inside message templates using [MessageText].")
message_text: Optional[str] = None
"""
Message text field that could be used inside message templates using [MessageText].
"""
# @ApiMember(DataType="bool", Description="")
enable_mobile_app: Optional[bool] = None
"""
"""
# @ApiMember(Description="The admin scheduler start time to show as default")
schedule_start_time: Optional[datetime.timedelta] = None
"""
The admin scheduler start time to show as default
"""
# @ApiMember(Description="The admin scheduler end time to show as default")
schedule_end_time: Optional[datetime.timedelta] = None
"""
The admin scheduler end time to show as default
"""
# @ApiMember(DataType="string", Description="Booking receipt text.")
receipt_template: Optional[str] = None
"""
Booking receipt text.
"""
# @ApiMember(Description="The admin scheduler minutes of each timeslot")
schedule_time_slot_minutes: Optional[int] = None
"""
The admin scheduler minutes of each timeslot
"""
# @ApiMember(Description="The admin scheduler if each resources should be shown in a seperate group")
schedule_group_resources: Optional[bool] = None
"""
The admin scheduler if each resources should be shown in a seperate group
"""
# @ApiMember(DataType="boolean", Description="The admin scheduler if the horizontal scrolling should be turned off")
scheduler_disable_horizontal_scrolling: Optional[bool] = None
"""
The admin scheduler if the horizontal scrolling should be turned off
"""
# @ApiMember(DataType="boolean", Description="If it's only allowed for existing customers to book")
book_only_on_existing_customers: Optional[bool] = None
"""
If it's only allowed for existing customers to book
"""
# @ApiMember(DataType="boolean", Description="If a unique pin code should be generated for the customer")
auto_generate_unique_pin_code: Optional[bool] = None
"""
If a unique pin code should be generated for the customer
"""
# @ApiMember(DataType="boolean", Description="If a user profile should be created when customer is booking time. With the property customer can login.")
auto_create_user_profile: Optional[bool] = None
"""
If a user profile should be created when customer is booking time. With the property customer can login.
"""
# @ApiMember(Description="When follow up message should be sent in hours after the booking.")
follow_up_message_time: Optional[int] = None
"""
When follow up message should be sent in hours after the booking.
"""
# @ApiMember(Description="")
show_free_times_left: Optional[bool] = None
"""
"""
# @ApiMember(Description="")
free_spot_texts_id: Optional[int] = None
"""
"""
# @ApiMember(Description="")
enable_i_cal_group_bookings: Optional[bool] = None
"""
"""
# @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#")
agreement_template: Optional[str] = None
"""
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#
"""
# @ApiMember(Description="")
schedule_show_time_exeptions: Optional[bool] = None
"""
"""
# @ApiMember(Description="")
enable_bookings_on_same_time: Optional[bool] = None
"""
"""
# @ApiMember(Description="")
show_week_number_setting_id: Optional[int] = None
"""
"""
# @ApiMember(Description="")
enable_show_booked_times: Optional[bool] = None
"""
"""
# @ApiMember(Description="")
enable_send_follow_up_message: Optional[bool] = None
"""
"""
# @ApiMember(DataType="int", Description="")
book_spot_user_response_minutes: Optional[int] = None
"""
"""
# @ApiMember(DataType="boolean", Description="")
is_book_spot_directly: Optional[bool] = None
"""
"""
# @ApiMember(DataType="int", Description="")
book_spot_directly_time_left_minutes: Optional[int] = None
"""
"""
# @ApiMember(DataType="int", Description="")
send_email_notification_queue: Optional[bool] = None
"""
"""
# @ApiMember(DataType="boolean", Description="")
send_s_m_s_notification_queue: Optional[bool] = None
"""
"""
# @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.")
weighted_prices: Optional[bool] = None
"""
If you have different prices over different times per day and want it to calculate the weighted price for the booked time.
"""
# @ApiMember(DataType="boolean", Description="")
show_multi_day_as_time: Optional[bool] = None
"""
"""
# @ApiMember(DataType="boolean", Description="")
show_multiple_resources_as_one: Optional[bool] = None
"""
"""
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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/jsonl
Content-Type: text/jsonl
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":"00:00:00","ScheduleEndTime":"00:00:00","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/jsonl 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":"00:00:00","ScheduleEndTime":"00:00:00","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}