""" Options: Date: 2024-11-21 11:40:16 Version: 8.23 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://api.bokamera.se #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: GroupedServiceQuery.* #ExcludeTypes: #DefaultImports: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum #DataClass: #DataClassJson: """ 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 ServiceQueryResponse: id: int = 0 name: Optional[str] = None description: Optional[str] = None image_url: Optional[str] = None total_spots: int = 0 # @ApiMember(Description="If this setting is turned on the remaining spots (if Totalspots > 1) is locked from be booked by another customer.") lock_spots_to_booking: Optional[bool] = None """ If this setting is turned on the remaining spots (if Totalspots > 1) is locked from be booked by another customer. """ min_number_of_spots_per_booking: int = 0 max_number_of_spots_per_booking: int = 0 min_number_of_resources_to_book: int = 0 max_number_of_resources_to_book: int = 0 unbook_before_days: int = 0 unbook_before_hours: int = 0 unbook_before_minutes: int = 0 # @ApiMember(Description="What type of schedule is connected to the service. RecurringSchedule = 1, DateSchedule = 2") schedule_type: Optional[ScheduleType] = None """ What type of schedule is connected to the service. RecurringSchedule = 1, DateSchedule = 2 """ # @ApiMember(Description="What type of schedule is connected to the service. RecurringSchedule = 1, DateSchedule = 2") schedule_type_id: int = 0 """ What type of schedule is connected to the service. RecurringSchedule = 1, DateSchedule = 2 """ book_before_days: int = 0 book_before_hours: int = 0 book_before_minutes: int = 0 group: Optional[str] = None enable_booking_queue: bool = False enable_code_lock_sync: bool = False enable_customer_manual_payment: bool = False sort_order: int = 0 active: bool = False is_group_booking: bool = False group_booking: Optional[GroupBookingSettings] = None multiple_resource: Optional[MultipleResourceSettings] = None is_payment_enabled: bool = False # @ApiMember(Description="Maximum numbers of minutes the booking payment must be completed before automatically unbooked") max_payment_time: int = 0 """ Maximum numbers of minutes the booking payment must be completed before automatically unbooked """ # @ApiMember(Description="If the booking should be either 1 = Booked) or 3 = Reserved. Default is 1 = Booked.") booking_status_id: int = 0 """ If the booking should be either 1 = Booked) or 3 = Reserved. Default is 1 = Booked. """ only_visible_by_admin: bool = False length_in_minutes: Optional[int] = None duration_type_id: int = 0 duration: Optional[int] = None min_duration: Optional[int] = None max_duration: Optional[int] = None duration_interval: Optional[int] = None pause_after_booking: int = 0 custom_fields: Optional[List[CustomFieldConfigData]] = None custom_field_values: Optional[List[CustomFieldDataResponse]] = None booking_custom_fields: Optional[List[CustomFieldConfigData]] = None customer_custom_fields: Optional[List[CustomFieldConfigData]] = None # @ApiMember(Description="The booking status options to choose from") booking_status_options: Optional[List[BookingStatusOptionsResponse]] = None """ The booking status options to choose from """ prices: Optional[List[ServicePriceResponse]] = None schedules: Optional[ServiceSchedules] = None rating_summary: Optional[CompanyRatingSummary] = None reviews: Optional[List[RatingReviewResponse]] = None resource_types: Optional[List[ServiceResourceTypeResponse]] = None response_status: Optional[ResponseStatus] = None price_view_type_id: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class GroupedServiceQueryResponse: group: Optional[str] = None sort_order: int = 0 items: Optional[List[ServiceQueryResponse]] = None response_status: Optional[ResponseStatus] = None # @Route("/services/grouped", "GET") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class GroupedServiceQuery(QueryDb2[Service, GroupedServiceQueryResponse], IReturn[QueryResponse[GroupedServiceQueryResponse]]): # @ApiMember(Description="Company to show services for", ParameterType="query") company_id: Optional[str] = None """ Company to show services for """ # @ApiMember(DataType="boolean", Description="Service status", ParameterType="query") active: Optional[bool] = None """ Service status """ # @ApiMember(Description="If you want to include the connected resource types and resources", ParameterType="query") include_resources: bool = False """ If you want to include the connected resource types and resources """ # @ApiMember(DataType="boolean", Description="If you want to include the connected schedules", ParameterType="query") include_schedules: bool = False """ If you want to include the connected schedules """ # @ApiMember(DataType="boolean", Description="If you want to include the connected custom fields", ParameterType="query") include_custom_fields: bool = False """ If you want to include the connected custom fields """ # @ApiMember(DataType="boolean", Description="If you want to include the connected resource types and resources", ParameterType="query") include_custom_field_values: bool = False """ If you want to include the connected resource types and resources """ # @ApiMember(DataType="boolean", Description="If you want to include the connected custom fields needs to be entered when booking a new time on the service", ParameterType="query") include_booking_custom_fields: bool = False """ If you want to include the connected custom fields needs to be entered when booking a new time on the service """ # @ApiMember(DataType="boolean", Description="If you want to include the connected custom fields for the customers", ParameterType="query") include_customer_custom_fields: bool = False """ If you want to include the connected custom fields for the customers """ # @ApiMember(DataType="boolean", Description="If you want to include the service prices", ParameterType="query") include_prices: bool = False """ If you want to include the service prices """ # @ApiMember(DataType="dateTime", Description="If you have selected to include the prices, here you can set the date to show the prices for", ParameterType="query") price_date: Optional[datetime.datetime] = None """ If you have selected to include the prices, here you can set the date to show the prices for """ # @ApiMember(DataType="timeSpan", Description="If you have selected to include the prices, here you can set the datetime to show the exact price", ParameterType="query") price_time: Optional[datetime.timedelta] = None """ If you have selected to include the prices, here you can set the datetime to show the exact price """