""" Options: Date: 2024-11-24 13:57:14 Version: 6.50 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://clubready.com/api/current #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: BookingStatusEventsRequest.* #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 class RestrictedResourceType(str, Enum): STORE = 'Store' CHAIN = 'Chain' USER = 'User' UNDEFINED = 'Undefined' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ApiDtoBase: api_key: Optional[str] = None store_id: Optional[int] = None chain_id: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BookingStatusEventsRequestDto(ApiDtoBase): from_date: datetime.datetime = datetime.datetime(1, 1, 1) to_date: datetime.datetime = datetime.datetime(1, 1, 1) booking_type_filter: int = 0 consult_filter: int = 0 status_filter: Optional[int] = None class IRestrictedApiRequest(IApiKeyEndpoint): restricted_id: Optional[int] = None restricted_resource_type: Optional[RestrictedResourceType] = None class IApiKeyEndpoint: api_key: Optional[str] = None class BookingStatus(IntEnum): UNDEFINED = 0 UNAVAILABLE = 1 OPEN = 2 CANCELLED_WITHIN_POLICY = 3 CANCELLED_OUTSIDE_POLICY = 4 COMPLETED = 5 NO_SHOW = 6 RESCHEDULED_WITHIN_POLICY = 8 RESCHEDULED_BY_ADMIN = 9 CANCELLED_BY_ADMIN_NOT_CUSTOMER_FAULT = 10 PENDING = 11 WAIT_LISTED = 12 ERROR = -1 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BookingStatusEventItem: chain_id: Optional[int] = None store_id: Optional[int] = None user_id: int = 0 booking_id: int = 0 class_schedule_id: Optional[int] = None service_id: Optional[int] = None session_size_id: Optional[int] = None booking_date_time: datetime.datetime = datetime.datetime(1, 1, 1) status: Optional[BookingStatus] = None status_id: int = 0 status_changed: datetime.datetime = datetime.datetime(1, 1, 1) consult: bool = False booked_from_wait_list: bool = False @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ApiResponseBase: success: bool = False message: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BookingStatusEventsResponseDto(ApiResponseBase): booking_status_events: Optional[List[BookingStatusEventItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BookingStatusEventsResponse(BookingStatusEventsResponseDto): success: bool = False message: Optional[str] = None booking_status_events: Optional[List[BookingStatusEventItem]] = None # @Route("/scheduling/booking-status-events", "GET") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BookingStatusEventsRequest(BookingStatusEventsRequestDto, IReturn[BookingStatusEventsResponse], IRestrictedApiRequest): # @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query") api_key: Optional[str] = None """ Api Key - grants access to resources """ # @ApiMember(DataType="integer", Description="Chain ID", Name="ChainId", ParameterType="query") chain_id: Optional[int] = None """ Chain ID """ # @ApiMember(DataType="integer", Description="Store ID", Name="StoreId", ParameterType="query") store_id: Optional[int] = None """ Store ID """ # @ApiMember(DataType="date", Description="UTC Format", IsRequired=true, Name="FromDate", ParameterType="query") from_date: datetime.datetime = datetime.datetime(1, 1, 1) """ UTC Format """ # @ApiMember(DataType="date", Description="Max 24 Hours (UTC Format)", IsRequired=true, Name="ToDate", ParameterType="query") to_date: datetime.datetime = datetime.datetime(1, 1, 1) """ Max 24 Hours (UTC Format) """ # @ApiMember(DataType="integer", Description="0 = All, 1 = Classes, 2 = Services", IsRequired=true, Name="BookingTypeFilter", ParameterType="query") booking_type_filter: int = 0 """ 0 = All, 1 = Classes, 2 = Services """ # @ApiMember(DataType="integer", Description="0 = Any, 1 = Only Consults, 2 = Exclude Consults", IsRequired=true, Name="ConsultFilter", ParameterType="query") consult_filter: int = 0 """ 0 = Any, 1 = Only Consults, 2 = Exclude Consults """ # @ApiMember(DataType="integer", Description="Leave blank for any, otherwise use ClubReady BookingStatus enum", Name="StatusFilter", ParameterType="query") status_filter: Optional[int] = None """ Leave blank for any, otherwise use ClubReady BookingStatus enum """ restricted_id: Optional[int] = None restricted_resource_type: Optional[RestrictedResourceType] = None