otf-api 0.6.4__py3-none-any.whl → 0.7.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- otf_api/__init__.py +1 -9
- otf_api/api.py +76 -111
- otf_api/auth.py +11 -10
- otf_api/exceptions.py +18 -0
- otf_api/models/__init__.py +25 -32
- otf_api/models/base.py +1 -16
- otf_api/models/{responses/body_composition_list.py → body_composition_list.py} +3 -14
- otf_api/models/book_class.py +89 -0
- otf_api/models/bookings.py +119 -0
- otf_api/models/cancel_booking.py +49 -0
- otf_api/models/{responses/challenge_tracker_detail.py → challenge_tracker_detail.py} +12 -13
- otf_api/models/classes.py +80 -0
- otf_api/models/enums.py +87 -0
- otf_api/models/{responses/favorite_studios.py → favorite_studios.py} +17 -19
- otf_api/models/{responses/lifetime_stats.py → lifetime_stats.py} +0 -18
- otf_api/models/{responses/member_detail.py → member_detail.py} +16 -19
- otf_api/models/{responses/member_purchases.py → member_purchases.py} +10 -10
- otf_api/models/mixins.py +44 -0
- otf_api/models/{responses/out_of_studio_workout_history.py → out_of_studio_workout_history.py} +3 -3
- otf_api/models/{responses/performance_summary_list.py → performance_summary_list.py} +2 -5
- otf_api/models/studio_detail.py +109 -0
- otf_api/models/{responses/studio_services.py → studio_services.py} +2 -2
- {otf_api-0.6.4.dist-info → otf_api-0.7.0.dist-info}/METADATA +3 -3
- otf_api-0.7.0.dist-info/RECORD +36 -0
- otf_api/models/responses/__init__.py +0 -57
- otf_api/models/responses/book_class.py +0 -407
- otf_api/models/responses/bookings.py +0 -160
- otf_api/models/responses/cancel_booking.py +0 -95
- otf_api/models/responses/classes.py +0 -148
- otf_api/models/responses/enums.py +0 -23
- otf_api/models/responses/studio_detail.py +0 -113
- otf_api-0.6.4.dist-info/RECORD +0 -35
- /otf_api/models/{responses/challenge_tracker_content.py → challenge_tracker_content.py} +0 -0
- /otf_api/models/{responses/latest_agreement.py → latest_agreement.py} +0 -0
- /otf_api/models/{responses/member_membership.py → member_membership.py} +0 -0
- /otf_api/models/{responses/performance_summary_detail.py → performance_summary_detail.py} +0 -0
- /otf_api/models/{responses/telemetry.py → telemetry.py} +0 -0
- /otf_api/models/{responses/telemetry_hr_history.py → telemetry_hr_history.py} +0 -0
- /otf_api/models/{responses/telemetry_max_hr.py → telemetry_max_hr.py} +0 -0
- /otf_api/models/{responses/total_classes.py → total_classes.py} +0 -0
- {otf_api-0.6.4.dist-info → otf_api-0.7.0.dist-info}/AUTHORS.md +0 -0
- {otf_api-0.6.4.dist-info → otf_api-0.7.0.dist-info}/LICENSE +0 -0
- {otf_api-0.6.4.dist-info → otf_api-0.7.0.dist-info}/WHEEL +0 -0
@@ -1,407 +0,0 @@
|
|
1
|
-
from datetime import datetime
|
2
|
-
from typing import Any
|
3
|
-
|
4
|
-
from pydantic import Field
|
5
|
-
|
6
|
-
from otf_api.models.base import OtfItemBase
|
7
|
-
|
8
|
-
|
9
|
-
class MemberProfile(OtfItemBase):
|
10
|
-
is_latest_agreement_signed: bool = Field(..., alias="isLatestAgreementSigned")
|
11
|
-
|
12
|
-
|
13
|
-
class StudioProfiles(OtfItemBase):
|
14
|
-
studio_id: int = Field(..., alias="studioId")
|
15
|
-
is_franchise_agreement_enabled: int = Field(..., alias="isFranchiseAgreementEnabled")
|
16
|
-
|
17
|
-
|
18
|
-
class HomeStudio(OtfItemBase):
|
19
|
-
studio_uuid: str = Field(..., alias="studioUUId")
|
20
|
-
studio_name: str = Field(..., alias="studioName")
|
21
|
-
description: str
|
22
|
-
contact_email: str = Field(..., alias="contactEmail")
|
23
|
-
status: str
|
24
|
-
logo_url: str = Field(..., alias="logoUrl")
|
25
|
-
time_zone: str = Field(..., alias="timeZone")
|
26
|
-
mbo_studio_id: int = Field(..., alias="mboStudioId")
|
27
|
-
studio_id: int = Field(..., alias="studioId")
|
28
|
-
allows_cr_waitlist: bool = Field(..., alias="allowsCRWaitlist")
|
29
|
-
cr_waitlist_flag_last_updated: datetime = Field(..., alias="crWaitlistFlagLastUpdated")
|
30
|
-
studio_profiles: StudioProfiles = Field(..., alias="studioProfiles")
|
31
|
-
|
32
|
-
|
33
|
-
class MemberService(OtfItemBase):
|
34
|
-
member_service_id: int = Field(..., alias="memberServiceId")
|
35
|
-
member_service_uuid: str = Field(..., alias="memberServiceUUId")
|
36
|
-
service_name: str = Field(..., alias="serviceName")
|
37
|
-
studio_id: int = Field(..., alias="studioId")
|
38
|
-
mbo_client_service_id: int = Field(..., alias="mboClientServiceId")
|
39
|
-
current: bool
|
40
|
-
member_id: int = Field(..., alias="memberId")
|
41
|
-
service_id: int = Field(..., alias="serviceId")
|
42
|
-
remaining: int
|
43
|
-
count: int
|
44
|
-
payment_date: datetime = Field(..., alias="paymentDate")
|
45
|
-
expiration_date: datetime = Field(..., alias="expirationDate")
|
46
|
-
active_date: datetime = Field(..., alias="activeDate")
|
47
|
-
created_by: str | None = Field(None, alias="createdBy")
|
48
|
-
created_date: datetime | None = Field(None, alias="createdDate")
|
49
|
-
updated_by: str | None = Field(None, alias="updatedBy")
|
50
|
-
updated_date: datetime | None = Field(None, alias="updatedDate")
|
51
|
-
is_deleted: bool = Field(..., alias="isDeleted")
|
52
|
-
|
53
|
-
|
54
|
-
class ServiceItem(OtfItemBase):
|
55
|
-
service_id: int = Field(..., alias="serviceId")
|
56
|
-
name: str
|
57
|
-
member_service: MemberService = Field(..., alias="MemberService")
|
58
|
-
|
59
|
-
|
60
|
-
class Member(OtfItemBase):
|
61
|
-
member_id: int = Field(..., alias="memberId")
|
62
|
-
member_uuid: str = Field(..., alias="memberUUId")
|
63
|
-
cognito_id: str = Field(..., alias="cognitoId")
|
64
|
-
home_studio_id: int = Field(..., alias="homeStudioId")
|
65
|
-
mbo_studio_id: int = Field(..., alias="mboStudioId")
|
66
|
-
mbo_id: str = Field(..., alias="mboId")
|
67
|
-
mbo_unique_id: int = Field(..., alias="mboUniqueId")
|
68
|
-
mbo_status: str = Field(..., alias="mboStatus")
|
69
|
-
user_name: str = Field(..., alias="userName")
|
70
|
-
first_name: str = Field(..., alias="firstName")
|
71
|
-
last_name: str = Field(..., alias="lastName")
|
72
|
-
email: str
|
73
|
-
profile_picture_url: str | None = Field(..., alias="profilePictureUrl")
|
74
|
-
alternate_emails: None = Field(..., alias="alternateEmails")
|
75
|
-
address_line1: str | None = Field(..., alias="addressLine1")
|
76
|
-
address_line2: str | None = Field(..., alias="addressLine2")
|
77
|
-
city: str | None
|
78
|
-
state: str | None
|
79
|
-
postal_code: str | None = Field(..., alias="postalCode")
|
80
|
-
phone_number: str = Field(..., alias="phoneNumber")
|
81
|
-
home_phone: str = Field(..., alias="homePhone")
|
82
|
-
work_phone: str | None = Field(..., alias="workPhone")
|
83
|
-
phone_type: None = Field(..., alias="phoneType")
|
84
|
-
birth_day: str = Field(..., alias="birthDay")
|
85
|
-
cc_last4: str = Field(..., alias="ccLast4")
|
86
|
-
cc_type: str = Field(..., alias="ccType")
|
87
|
-
gender: str
|
88
|
-
liability: None
|
89
|
-
locale: str
|
90
|
-
weight: int
|
91
|
-
weight_measure: str = Field(..., alias="weightMeasure")
|
92
|
-
height: int
|
93
|
-
height_measure: str = Field(..., alias="heightMeasure")
|
94
|
-
max_hr: int = Field(..., alias="maxHr")
|
95
|
-
intro_neccessary: bool = Field(..., alias="introNeccessary")
|
96
|
-
online_signup: None = Field(..., alias="onlineSignup")
|
97
|
-
year_imported: int = Field(..., alias="yearImported")
|
98
|
-
is_member_verified: bool = Field(..., alias="isMemberVerified")
|
99
|
-
lead_prospect: bool = Field(..., alias="leadProspect")
|
100
|
-
created_by: str | None = Field(None, alias="createdBy")
|
101
|
-
created_date: datetime | None = Field(None, alias="createdDate")
|
102
|
-
updated_by: str | None = Field(None, alias="updatedBy")
|
103
|
-
updated_date: datetime | None = Field(None, alias="updatedDate")
|
104
|
-
is_deleted: bool = Field(..., alias="isDeleted")
|
105
|
-
member_profile: MemberProfile = Field(..., alias="memberProfile")
|
106
|
-
home_studio: HomeStudio = Field(..., alias="homeStudio")
|
107
|
-
membership: None
|
108
|
-
service: list[ServiceItem]
|
109
|
-
notes: str
|
110
|
-
|
111
|
-
|
112
|
-
class Studio(OtfItemBase):
|
113
|
-
studio_uuid: str = Field(..., alias="studioUUId")
|
114
|
-
studio_name: str = Field(..., alias="studioName")
|
115
|
-
description: str
|
116
|
-
contact_email: str = Field(..., alias="contactEmail")
|
117
|
-
status: str
|
118
|
-
logo_url: str = Field(..., alias="logoUrl")
|
119
|
-
time_zone: str = Field(..., alias="timeZone")
|
120
|
-
mbo_studio_id: int = Field(..., alias="mboStudioId")
|
121
|
-
studio_id: int = Field(..., alias="studioId")
|
122
|
-
allows_cr_waitlist: bool = Field(..., alias="allowsCRWaitlist")
|
123
|
-
cr_waitlist_flag_last_updated: datetime = Field(..., alias="crWaitlistFlagLastUpdated")
|
124
|
-
|
125
|
-
|
126
|
-
class Location(OtfItemBase):
|
127
|
-
location_id: int = Field(..., alias="locationId")
|
128
|
-
location_uuid: str = Field(..., alias="locationUUId")
|
129
|
-
|
130
|
-
|
131
|
-
class Coach(OtfItemBase):
|
132
|
-
coach_uuid: str = Field(..., alias="coachUUId")
|
133
|
-
first_name: str = Field(..., alias="firstName")
|
134
|
-
last_name: str = Field(..., alias="lastName")
|
135
|
-
mbo_coach_id: int = Field(..., alias="mboCoachId")
|
136
|
-
name: str
|
137
|
-
|
138
|
-
|
139
|
-
class Class(OtfItemBase):
|
140
|
-
class_id: int = Field(..., alias="classId")
|
141
|
-
class_uuid: str = Field(..., alias="classUUId")
|
142
|
-
mbo_studio_id: int = Field(..., alias="mboStudioId")
|
143
|
-
mbo_class_id: int = Field(..., alias="mboClassId")
|
144
|
-
mbo_class_schedule_id: int = Field(..., alias="mboClassScheduleId")
|
145
|
-
mbo_program_id: int = Field(..., alias="mboProgramId")
|
146
|
-
studio_id: int = Field(..., alias="studioId")
|
147
|
-
coach_id: int = Field(..., alias="coachId")
|
148
|
-
location_id: int = Field(..., alias="locationId")
|
149
|
-
name: str
|
150
|
-
description: str
|
151
|
-
program_name: str = Field(..., alias="programName")
|
152
|
-
program_schedule_type: str = Field(..., alias="programScheduleType")
|
153
|
-
program_cancel_offset: int = Field(..., alias="programCancelOffset")
|
154
|
-
max_capacity: int = Field(..., alias="maxCapacity")
|
155
|
-
total_booked: int = Field(..., alias="totalBooked")
|
156
|
-
web_capacity: int = Field(..., alias="webCapacity")
|
157
|
-
web_booked: int = Field(..., alias="webBooked")
|
158
|
-
total_booked_waitlist: int = Field(..., alias="totalBookedWaitlist")
|
159
|
-
start_date_time: datetime = Field(..., alias="startDateTime")
|
160
|
-
end_date_time: datetime = Field(..., alias="endDateTime")
|
161
|
-
is_cancelled: bool = Field(..., alias="isCancelled")
|
162
|
-
substitute: bool
|
163
|
-
is_active: bool = Field(..., alias="isActive")
|
164
|
-
is_waitlist_available: bool = Field(..., alias="isWaitlistAvailable")
|
165
|
-
is_enrolled: bool = Field(..., alias="isEnrolled")
|
166
|
-
is_hide_cancel: bool = Field(..., alias="isHideCancel")
|
167
|
-
is_available: bool = Field(..., alias="isAvailable")
|
168
|
-
room_number: int = Field(..., alias="roomNumber")
|
169
|
-
created_by: str | None = Field(None, alias="createdBy")
|
170
|
-
created_date: datetime | None = Field(None, alias="createdDate")
|
171
|
-
updated_by: str | None = Field(None, alias="updatedBy")
|
172
|
-
updated_date: datetime | None = Field(None, alias="updatedDate")
|
173
|
-
is_deleted: bool = Field(..., alias="isDeleted")
|
174
|
-
studio: Studio
|
175
|
-
location: Location
|
176
|
-
coach: Coach
|
177
|
-
attributes: dict[str, Any]
|
178
|
-
|
179
|
-
|
180
|
-
class Class1(OtfItemBase):
|
181
|
-
mbo_studio_id: int = Field(..., alias="mboStudioId")
|
182
|
-
studio_uuid: str = Field(..., alias="studioUUId")
|
183
|
-
|
184
|
-
|
185
|
-
class CustomData(OtfItemBase):
|
186
|
-
otf_class: Class1 = Field(..., alias="class")
|
187
|
-
|
188
|
-
|
189
|
-
class SavedBooking(OtfItemBase):
|
190
|
-
class_booking_id: int = Field(..., alias="classBookingId")
|
191
|
-
class_booking_uuid: str = Field(..., alias="classBookingUUId")
|
192
|
-
studio_id: int = Field(..., alias="studioId")
|
193
|
-
class_id: int = Field(..., alias="classId")
|
194
|
-
is_intro: bool = Field(..., alias="isIntro")
|
195
|
-
member_id: int = Field(..., alias="memberId")
|
196
|
-
mbo_member_id: str = Field(..., alias="mboMemberId")
|
197
|
-
mbo_class_id: int = Field(..., alias="mboClassId")
|
198
|
-
mbo_visit_id: int | None = Field(..., alias="mboVisitId")
|
199
|
-
mbo_waitlist_entry_id: int | None = Field(..., alias="mboWaitlistEntryId")
|
200
|
-
mbo_sync_message: str | None = Field(..., alias="mboSyncMessage")
|
201
|
-
status: str
|
202
|
-
booked_date: datetime = Field(..., alias="bookedDate")
|
203
|
-
checked_in_date: datetime | None = Field(..., alias="checkedInDate")
|
204
|
-
cancelled_date: datetime | None = Field(..., alias="cancelledDate")
|
205
|
-
created_by: str | None = Field(None, alias="createdBy")
|
206
|
-
created_date: datetime | None = Field(None, alias="createdDate")
|
207
|
-
updated_by: str | None = Field(None, alias="updatedBy")
|
208
|
-
updated_date: datetime | None = Field(None, alias="updatedDate")
|
209
|
-
is_deleted: bool = Field(..., alias="isDeleted")
|
210
|
-
member: Member
|
211
|
-
otf_class: Class = Field(..., alias="class")
|
212
|
-
custom_data: CustomData = Field(..., alias="customData")
|
213
|
-
attributes: dict[str, Any]
|
214
|
-
|
215
|
-
|
216
|
-
class FieldModel(OtfItemBase):
|
217
|
-
xsi_nil: str = Field(..., alias="xsiNil")
|
218
|
-
|
219
|
-
|
220
|
-
class FacilitySquareFeet(OtfItemBase):
|
221
|
-
field_: FieldModel
|
222
|
-
|
223
|
-
|
224
|
-
class TreatmentRooms(OtfItemBase):
|
225
|
-
field_: FieldModel
|
226
|
-
|
227
|
-
|
228
|
-
class Location1(OtfItemBase):
|
229
|
-
site_id: str | Any = Field(..., alias="siteId")
|
230
|
-
business_description: str | Any = Field(..., alias="businessDescription")
|
231
|
-
additional_image_ur_ls: str | Any = Field(..., alias="additionalImageUrLs")
|
232
|
-
facility_square_feet: FacilitySquareFeet | Any = Field(..., alias="facilitySquareFeet")
|
233
|
-
treatment_rooms: TreatmentRooms | Any = Field(..., alias="treatmentRooms")
|
234
|
-
has_classes: str = Field(..., alias="hasClasses")
|
235
|
-
id: str
|
236
|
-
name: str
|
237
|
-
address: str
|
238
|
-
address2: str
|
239
|
-
tax1: str
|
240
|
-
tax2: str
|
241
|
-
tax3: str
|
242
|
-
tax4: str
|
243
|
-
tax5: str
|
244
|
-
phone: str
|
245
|
-
city: str
|
246
|
-
state_prov_code: str = Field(..., alias="stateProvCode")
|
247
|
-
postal_code: str = Field(..., alias="postalCode")
|
248
|
-
latitude: str
|
249
|
-
longitude: str
|
250
|
-
|
251
|
-
|
252
|
-
class MaxCapacity(OtfItemBase):
|
253
|
-
field_: FieldModel | Any
|
254
|
-
|
255
|
-
|
256
|
-
class WebCapacity(OtfItemBase):
|
257
|
-
field_: FieldModel | Any
|
258
|
-
|
259
|
-
|
260
|
-
class TotalBookedWaitlist(OtfItemBase):
|
261
|
-
field_: FieldModel | Any
|
262
|
-
|
263
|
-
|
264
|
-
class WebBooked(OtfItemBase):
|
265
|
-
field_: FieldModel | Any
|
266
|
-
|
267
|
-
|
268
|
-
class SemesterId(OtfItemBase):
|
269
|
-
field_: FieldModel | Any
|
270
|
-
|
271
|
-
|
272
|
-
class Program(OtfItemBase):
|
273
|
-
id: str
|
274
|
-
name: str
|
275
|
-
schedule_type: str = Field(..., alias="scheduleType")
|
276
|
-
cancel_offset: str = Field(..., alias="cancelOffset")
|
277
|
-
|
278
|
-
|
279
|
-
class DefaultTimeLength(OtfItemBase):
|
280
|
-
field_: FieldModel
|
281
|
-
|
282
|
-
|
283
|
-
class SessionType(OtfItemBase):
|
284
|
-
default_time_length: DefaultTimeLength = Field(..., alias="defaultTimeLength")
|
285
|
-
program_id: str = Field(..., alias="programId")
|
286
|
-
num_deducted: str = Field(..., alias="numDeducted")
|
287
|
-
id: str
|
288
|
-
name: str
|
289
|
-
site_id: str = Field(..., alias="siteId")
|
290
|
-
cross_regional_booking_performed: str = Field(..., alias="crossRegionalBookingPerformed")
|
291
|
-
available_for_add_on: str = Field(..., alias="availableForAddOn")
|
292
|
-
|
293
|
-
|
294
|
-
class ClassDescription(OtfItemBase):
|
295
|
-
id: str
|
296
|
-
name: str
|
297
|
-
description: str
|
298
|
-
prereq: str
|
299
|
-
notes: str
|
300
|
-
last_updated: datetime = Field(..., alias="lastUpdated")
|
301
|
-
program: Program
|
302
|
-
session_type: SessionType = Field(..., alias="sessionType")
|
303
|
-
|
304
|
-
|
305
|
-
class Staff(OtfItemBase):
|
306
|
-
email: str
|
307
|
-
mobile_phone: str = Field(..., alias="mobilePhone")
|
308
|
-
state: str
|
309
|
-
country: str
|
310
|
-
sort_order: str = Field(..., alias="sortOrder")
|
311
|
-
appointment_trn: str = Field(..., alias="appointmentTrn")
|
312
|
-
reservation_trn: str = Field(..., alias="reservationTrn")
|
313
|
-
independent_contractor: str = Field(..., alias="independentContractor")
|
314
|
-
always_allow_double_booking: str = Field(..., alias="alwaysAllowDoubleBooking")
|
315
|
-
id: str
|
316
|
-
name: str
|
317
|
-
first_name: str = Field(..., alias="firstName")
|
318
|
-
last_name: str = Field(..., alias="lastName")
|
319
|
-
bio: str
|
320
|
-
is_male: str = Field(..., alias="isMale")
|
321
|
-
|
322
|
-
|
323
|
-
class AgreementDate(OtfItemBase):
|
324
|
-
field_: FieldModel
|
325
|
-
|
326
|
-
|
327
|
-
class ReleasedBy(OtfItemBase):
|
328
|
-
field_: FieldModel
|
329
|
-
|
330
|
-
|
331
|
-
class Liability(OtfItemBase):
|
332
|
-
is_released: str = Field(..., alias="isReleased")
|
333
|
-
agreement_date: AgreementDate = Field(..., alias="agreementDate")
|
334
|
-
released_by: ReleasedBy = Field(..., alias="releasedBy")
|
335
|
-
|
336
|
-
|
337
|
-
class FirstAppointmentDate(OtfItemBase):
|
338
|
-
field_: FieldModel
|
339
|
-
|
340
|
-
|
341
|
-
class Client(OtfItemBase):
|
342
|
-
notes: str
|
343
|
-
mobile_provider: str = Field(..., alias="mobileProvider")
|
344
|
-
appointment_gender_preference: str = Field(..., alias="appointmentGenderPreference")
|
345
|
-
is_company: str = Field(..., alias="isCompany")
|
346
|
-
liability_release: str = Field(..., alias="liabilityRelease")
|
347
|
-
promotional_email_opt_in: str = Field(..., alias="promotionalEmailOptIn")
|
348
|
-
creation_date: datetime = Field(..., alias="creationDate")
|
349
|
-
liability: Liability
|
350
|
-
unique_id: str = Field(..., alias="uniqueId")
|
351
|
-
action: str
|
352
|
-
id: str
|
353
|
-
first_name: str = Field(..., alias="firstName")
|
354
|
-
last_name: str = Field(..., alias="lastName")
|
355
|
-
email: str
|
356
|
-
email_opt_in: str = Field(..., alias="emailOptIn")
|
357
|
-
address_line1: str = Field(..., alias="addressLine1")
|
358
|
-
address_line2: str = Field(..., alias="addressLine2")
|
359
|
-
city: str
|
360
|
-
state: str
|
361
|
-
postal_code: str = Field(..., alias="postalCode")
|
362
|
-
country: str
|
363
|
-
mobile_phone: str = Field(..., alias="mobilePhone")
|
364
|
-
home_phone: str = Field(..., alias="homePhone")
|
365
|
-
birth_date: datetime = Field(..., alias="birthDate")
|
366
|
-
first_appointment_date: FirstAppointmentDate = Field(..., alias="firstAppointmentDate")
|
367
|
-
referred_by: str = Field(..., alias="referredBy")
|
368
|
-
red_alert: str = Field(..., alias="redAlert")
|
369
|
-
is_prospect: str = Field(..., alias="isProspect")
|
370
|
-
contact_method: str = Field(..., alias="contactMethod")
|
371
|
-
member_uuid: str = Field(..., alias="memberUUId")
|
372
|
-
|
373
|
-
|
374
|
-
class MboClass(OtfItemBase):
|
375
|
-
class_schedule_id: str = Field(..., alias="classScheduleId")
|
376
|
-
location: Location1
|
377
|
-
max_capacity: MaxCapacity = Field(..., alias="maxCapacity")
|
378
|
-
web_capacity: WebCapacity = Field(..., alias="webCapacity")
|
379
|
-
total_booked: int | None = Field(..., alias="totalBooked")
|
380
|
-
total_booked_waitlist: TotalBookedWaitlist = Field(..., alias="totalBookedWaitlist")
|
381
|
-
web_booked: WebBooked = Field(..., alias="webBooked")
|
382
|
-
semester_id: SemesterId = Field(..., alias="semesterId")
|
383
|
-
is_canceled: str = Field(..., alias="isCanceled")
|
384
|
-
substitute: str
|
385
|
-
active: str
|
386
|
-
is_waitlist_available: str = Field(..., alias="isWaitlistAvailable")
|
387
|
-
is_enrolled: str = Field(..., alias="isEnrolled")
|
388
|
-
hide_cancel: str = Field(..., alias="hideCancel")
|
389
|
-
id: str
|
390
|
-
is_available: str = Field(..., alias="isAvailable")
|
391
|
-
start_date_time: datetime = Field(..., alias="startDateTime")
|
392
|
-
end_date_time: datetime = Field(..., alias="endDateTime")
|
393
|
-
class_description: ClassDescription = Field(..., alias="classDescription")
|
394
|
-
staff: Staff
|
395
|
-
class_uuid: str = Field(..., alias="classUUId")
|
396
|
-
client: Client
|
397
|
-
|
398
|
-
|
399
|
-
class MboResponseItem(OtfItemBase):
|
400
|
-
class_booking_uuid: str | Any = Field(..., alias="classBookingUUId")
|
401
|
-
action: str | Any
|
402
|
-
otf_class: MboClass | Any = Field(..., alias="class")
|
403
|
-
|
404
|
-
|
405
|
-
class BookClass(OtfItemBase):
|
406
|
-
saved_bookings: list[SavedBooking] = Field(..., alias="savedBookings")
|
407
|
-
mbo_response: list[MboResponseItem] = Field(..., alias="mboResponse")
|
@@ -1,160 +0,0 @@
|
|
1
|
-
from datetime import datetime
|
2
|
-
from enum import Enum
|
3
|
-
from typing import ClassVar
|
4
|
-
|
5
|
-
from pydantic import Field
|
6
|
-
|
7
|
-
from otf_api.models.base import OtfItemBase, OtfListBase
|
8
|
-
from otf_api.models.responses.classes import OtfClassTimeMixin
|
9
|
-
|
10
|
-
|
11
|
-
class StudioStatus(str, Enum):
|
12
|
-
OTHER = "OTHER"
|
13
|
-
ACTIVE = "Active"
|
14
|
-
INACTIVE = "Inactive"
|
15
|
-
COMING_SOON = "Coming Soon"
|
16
|
-
TEMP_CLOSED = "Temporarily Closed"
|
17
|
-
PERM_CLOSED = "Permanently Closed"
|
18
|
-
|
19
|
-
|
20
|
-
class BookingStatus(str, Enum):
|
21
|
-
CheckedIn = "Checked In"
|
22
|
-
CancelCheckinPending = "Cancel Checkin Pending"
|
23
|
-
CancelCheckinRequested = "Cancel Checkin Requested"
|
24
|
-
Cancelled = "Cancelled"
|
25
|
-
LateCancelled = "Late Cancelled"
|
26
|
-
Booked = "Booked"
|
27
|
-
Waitlisted = "Waitlisted"
|
28
|
-
CheckinPending = "Checkin Pending"
|
29
|
-
CheckinRequested = "Checkin Requested"
|
30
|
-
CheckinCancelled = "Checkin Cancelled"
|
31
|
-
|
32
|
-
@classmethod
|
33
|
-
def get_case_insensitive(cls, value: str) -> str:
|
34
|
-
lcase_to_actual = {item.value.lower(): item.value for item in cls}
|
35
|
-
return lcase_to_actual[value.lower()]
|
36
|
-
|
37
|
-
|
38
|
-
class Location(OtfItemBase):
|
39
|
-
address_one: str = Field(alias="address1")
|
40
|
-
address_two: str | None = Field(alias="address2")
|
41
|
-
city: str
|
42
|
-
country: str | None = None
|
43
|
-
distance: float | None = None
|
44
|
-
latitude: float = Field(alias="latitude")
|
45
|
-
location_name: str | None = Field(None, alias="locationName")
|
46
|
-
longitude: float = Field(alias="longitude")
|
47
|
-
phone_number: str = Field(alias="phone")
|
48
|
-
postal_code: str | None = Field(None, alias="postalCode")
|
49
|
-
state: str | None = None
|
50
|
-
|
51
|
-
|
52
|
-
class Coach(OtfItemBase):
|
53
|
-
coach_uuid: str = Field(alias="coachUUId")
|
54
|
-
name: str
|
55
|
-
first_name: str = Field(alias="firstName")
|
56
|
-
last_name: str = Field(alias="lastName")
|
57
|
-
image_url: str = Field(alias="imageUrl", exclude=True)
|
58
|
-
profile_picture_url: str | None = Field(None, alias="profilePictureUrl", exclude=True)
|
59
|
-
|
60
|
-
|
61
|
-
class Currency(OtfItemBase):
|
62
|
-
currency_alphabetic_code: str = Field(alias="currencyAlphabeticCode")
|
63
|
-
|
64
|
-
|
65
|
-
class DefaultCurrency(OtfItemBase):
|
66
|
-
currency_id: int = Field(alias="currencyId")
|
67
|
-
currency: Currency
|
68
|
-
|
69
|
-
|
70
|
-
class StudioLocationCountry(OtfItemBase):
|
71
|
-
country_currency_code: str = Field(alias="countryCurrencyCode")
|
72
|
-
default_currency: DefaultCurrency = Field(alias="defaultCurrency")
|
73
|
-
|
74
|
-
|
75
|
-
class StudioLocation(OtfItemBase):
|
76
|
-
latitude: float = Field(alias="latitude")
|
77
|
-
longitude: float = Field(alias="longitude")
|
78
|
-
phone_number: str = Field(alias="phoneNumber")
|
79
|
-
physical_city: str = Field(alias="physicalCity")
|
80
|
-
physical_address: str = Field(alias="physicalAddress")
|
81
|
-
physical_address2: str | None = Field(alias="physicalAddress2")
|
82
|
-
physical_state: str = Field(alias="physicalState")
|
83
|
-
physical_postal_code: str = Field(alias="physicalPostalCode")
|
84
|
-
physical_region: str = Field(alias="physicalRegion", exclude=True)
|
85
|
-
physical_country_id: int = Field(alias="physicalCountryId", exclude=True)
|
86
|
-
physical_country: str = Field(alias="physicalCountry")
|
87
|
-
country: StudioLocationCountry = Field(alias="country", exclude=True)
|
88
|
-
|
89
|
-
|
90
|
-
class Studio(OtfItemBase):
|
91
|
-
studio_uuid: str = Field(alias="studioUUId")
|
92
|
-
studio_name: str = Field(alias="studioName")
|
93
|
-
description: str | None = None
|
94
|
-
contact_email: str = Field(alias="contactEmail", exclude=True)
|
95
|
-
status: StudioStatus
|
96
|
-
logo_url: str | None = Field(alias="logoUrl", exclude=True)
|
97
|
-
time_zone: str = Field(alias="timeZone")
|
98
|
-
mbo_studio_id: int = Field(alias="mboStudioId", exclude=True)
|
99
|
-
studio_id: int = Field(alias="studioId")
|
100
|
-
allows_cr_waitlist: bool | None = Field(None, alias="allowsCRWaitlist")
|
101
|
-
cr_waitlist_flag_last_updated: datetime = Field(alias="crWaitlistFlagLastUpdated", exclude=True)
|
102
|
-
studio_location: StudioLocation = Field(alias="studioLocation", exclude=True)
|
103
|
-
|
104
|
-
|
105
|
-
class OtfClass(OtfItemBase, OtfClassTimeMixin):
|
106
|
-
class_uuid: str = Field(alias="classUUId")
|
107
|
-
name: str
|
108
|
-
description: str | None = Field(None, exclude=True)
|
109
|
-
starts_at_local: datetime = Field(alias="startDateTime")
|
110
|
-
ends_at_local: datetime = Field(alias="endDateTime")
|
111
|
-
is_available: bool = Field(alias="isAvailable")
|
112
|
-
is_cancelled: bool = Field(alias="isCancelled")
|
113
|
-
program_name: str = Field(alias="programName")
|
114
|
-
coach_id: int = Field(alias="coachId")
|
115
|
-
studio: Studio
|
116
|
-
coach: Coach
|
117
|
-
location: Location
|
118
|
-
virtual_class: bool | None = Field(None, alias="virtualClass")
|
119
|
-
|
120
|
-
|
121
|
-
class Member(OtfItemBase):
|
122
|
-
member_uuid: str = Field(alias="memberUUId")
|
123
|
-
first_name: str = Field(alias="firstName")
|
124
|
-
last_name: str = Field(alias="lastName")
|
125
|
-
email: str
|
126
|
-
phone_number: str = Field(alias="phoneNumber")
|
127
|
-
gender: str
|
128
|
-
cc_last_4: str = Field(alias="ccLast4", exclude=True)
|
129
|
-
|
130
|
-
|
131
|
-
class Booking(OtfItemBase):
|
132
|
-
class_booking_id: int = Field(alias="classBookingId")
|
133
|
-
class_booking_uuid: str = Field(alias="classBookingUUId")
|
134
|
-
studio_id: int = Field(alias="studioId")
|
135
|
-
class_id: int = Field(alias="classId")
|
136
|
-
is_intro: bool = Field(alias="isIntro")
|
137
|
-
member_id: int = Field(alias="memberId")
|
138
|
-
mbo_member_id: str = Field(alias="mboMemberId", exclude=True)
|
139
|
-
mbo_class_id: int = Field(alias="mboClassId", exclude=True)
|
140
|
-
mbo_visit_id: int | None = Field(None, alias="mboVisitId", exclude=True)
|
141
|
-
mbo_waitlist_entry_id: int | None = Field(alias="mboWaitlistEntryId", exclude=True)
|
142
|
-
mbo_sync_message: str | None = Field(alias="mboSyncMessage", exclude=True)
|
143
|
-
status: BookingStatus
|
144
|
-
booked_date: datetime | None = Field(None, alias="bookedDate")
|
145
|
-
checked_in_date: datetime | None = Field(alias="checkedInDate")
|
146
|
-
cancelled_date: datetime | None = Field(alias="cancelledDate")
|
147
|
-
created_by: str = Field(alias="createdBy", exclude=True)
|
148
|
-
created_date: datetime = Field(alias="createdDate")
|
149
|
-
updated_by: str = Field(alias="updatedBy", exclude=True)
|
150
|
-
updated_date: datetime = Field(alias="updatedDate")
|
151
|
-
is_deleted: bool = Field(alias="isDeleted")
|
152
|
-
member: Member = Field(exclude=True)
|
153
|
-
waitlist_position: int | None = Field(None, alias="waitlistPosition")
|
154
|
-
otf_class: OtfClass = Field(alias="class")
|
155
|
-
is_home_studio: bool | None = Field(None, description="Custom helper field to determine if at home studio")
|
156
|
-
|
157
|
-
|
158
|
-
class BookingList(OtfListBase):
|
159
|
-
collection_field: ClassVar[str] = "bookings"
|
160
|
-
bookings: list[Booking]
|
@@ -1,95 +0,0 @@
|
|
1
|
-
from datetime import datetime
|
2
|
-
|
3
|
-
from pydantic import Field
|
4
|
-
|
5
|
-
from otf_api.models.base import OtfItemBase
|
6
|
-
|
7
|
-
|
8
|
-
class Studio(OtfItemBase):
|
9
|
-
studio_uuid: str = Field(..., alias="studioUUId")
|
10
|
-
studio_name: str = Field(..., alias="studioName")
|
11
|
-
description: str
|
12
|
-
contact_email: str = Field(..., alias="contactEmail")
|
13
|
-
status: str
|
14
|
-
logo_url: str = Field(..., alias="logoUrl")
|
15
|
-
time_zone: str = Field(..., alias="timeZone")
|
16
|
-
mbo_studio_id: int = Field(..., alias="mboStudioId")
|
17
|
-
studio_id: int = Field(..., alias="studioId")
|
18
|
-
allows_cr_waitlist: bool = Field(..., alias="allowsCRWaitlist")
|
19
|
-
cr_waitlist_flag_last_updated: datetime = Field(..., alias="crWaitlistFlagLastUpdated")
|
20
|
-
|
21
|
-
|
22
|
-
class Coach(OtfItemBase):
|
23
|
-
coach_uuid: str = Field(..., alias="coachUUId")
|
24
|
-
name: str
|
25
|
-
first_name: str = Field(..., alias="firstName")
|
26
|
-
last_name: str = Field(..., alias="lastName")
|
27
|
-
mbo_coach_id: int = Field(..., alias="mboCoachId")
|
28
|
-
|
29
|
-
|
30
|
-
class Class(OtfItemBase):
|
31
|
-
class_uuid: str = Field(..., alias="classUUId")
|
32
|
-
name: str
|
33
|
-
description: str
|
34
|
-
start_date_time: datetime = Field(..., alias="startDateTime")
|
35
|
-
end_date_time: datetime = Field(..., alias="endDateTime")
|
36
|
-
is_available: bool = Field(..., alias="isAvailable")
|
37
|
-
is_cancelled: bool = Field(..., alias="isCancelled")
|
38
|
-
total_booked: int = Field(..., alias="totalBooked")
|
39
|
-
mbo_class_id: int = Field(..., alias="mboClassId")
|
40
|
-
mbo_studio_id: int = Field(..., alias="mboStudioId")
|
41
|
-
studio: Studio
|
42
|
-
coach: Coach
|
43
|
-
|
44
|
-
|
45
|
-
class HomeStudio(OtfItemBase):
|
46
|
-
studio_uuid: str = Field(..., alias="studioUUId")
|
47
|
-
studio_name: str = Field(..., alias="studioName")
|
48
|
-
description: str
|
49
|
-
contact_email: str = Field(..., alias="contactEmail")
|
50
|
-
status: str
|
51
|
-
logo_url: str = Field(..., alias="logoUrl")
|
52
|
-
time_zone: str = Field(..., alias="timeZone")
|
53
|
-
mbo_studio_id: int = Field(..., alias="mboStudioId")
|
54
|
-
studio_id: int = Field(..., alias="studioId")
|
55
|
-
allows_cr_waitlist: bool = Field(..., alias="allowsCRWaitlist")
|
56
|
-
cr_waitlist_flag_last_updated: datetime = Field(..., alias="crWaitlistFlagLastUpdated")
|
57
|
-
|
58
|
-
|
59
|
-
class Member(OtfItemBase):
|
60
|
-
member_id: int = Field(..., alias="memberId")
|
61
|
-
member_uuid: str = Field(..., alias="memberUUId")
|
62
|
-
email: str
|
63
|
-
phone_number: str = Field(..., alias="phoneNumber")
|
64
|
-
first_name: str = Field(..., alias="firstName")
|
65
|
-
last_name: str = Field(..., alias="lastName")
|
66
|
-
mbo_id: str = Field(..., alias="mboId")
|
67
|
-
cc_last4: str = Field(..., alias="ccLast4")
|
68
|
-
mbo_studio_id: int = Field(..., alias="mboStudioId")
|
69
|
-
home_studio: HomeStudio = Field(..., alias="homeStudio")
|
70
|
-
|
71
|
-
|
72
|
-
class CancelBooking(OtfItemBase):
|
73
|
-
class_booking_id: int = Field(..., alias="classBookingId")
|
74
|
-
class_booking_uuid: str = Field(..., alias="classBookingUUId")
|
75
|
-
studio_id: int = Field(..., alias="studioId")
|
76
|
-
class_id: int = Field(..., alias="classId")
|
77
|
-
is_intro: bool = Field(..., alias="isIntro")
|
78
|
-
member_id: int = Field(..., alias="memberId")
|
79
|
-
mbo_member_id: str = Field(..., alias="mboMemberId")
|
80
|
-
mbo_class_id: int = Field(..., alias="mboClassId")
|
81
|
-
mbo_visit_id: int = Field(..., alias="mboVisitId")
|
82
|
-
mbo_waitlist_entry_id: int | None = Field(..., alias="mboWaitlistEntryId")
|
83
|
-
mbo_sync_message: str = Field(..., alias="mboSyncMessage")
|
84
|
-
status: str
|
85
|
-
booked_date: datetime = Field(..., alias="bookedDate")
|
86
|
-
checked_in_date: datetime | None = Field(..., alias="checkedInDate")
|
87
|
-
cancelled_date: datetime = Field(..., alias="cancelledDate")
|
88
|
-
created_by: str = Field(..., alias="createdBy")
|
89
|
-
created_date: datetime = Field(..., alias="createdDate")
|
90
|
-
updated_by: str = Field(..., alias="updatedBy")
|
91
|
-
updated_date: datetime = Field(..., alias="updatedDate")
|
92
|
-
is_deleted: bool = Field(..., alias="isDeleted")
|
93
|
-
otf_class: Class = Field(..., alias="class")
|
94
|
-
member: Member
|
95
|
-
continue_retry: bool = Field(..., alias="continueRetry")
|