Skip to content

BookingV2

Address pydantic-model

Bases: AddressMixin, OtfItemBase

Address associated with a studio in the v2 bookings endpoint.

Show JSON schema:
{
  "description": "Address associated with a studio in the v2 bookings endpoint.",
  "properties": {
    "line1": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Line1"
    },
    "line2": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Line2"
    },
    "city": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "City"
    },
    "postal_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Postal Code"
    },
    "state": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "State"
    },
    "country": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Country"
    },
    "physicalRegion": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Physicalregion"
    },
    "physicalCountryId": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Physicalcountryid"
    }
  },
  "title": "Address",
  "type": "object"
}

Fields:

  • address_line1 (str | None)
  • address_line2 (str | None)
  • city (str | None)
  • postal_code (str | None)
  • state (str | None)
  • country (str | None)
  • region (str | None)
  • country_id (int | None)

Rating pydantic-model

Bases: OtfItemBase

A rating given by a member for a class or coach.

Show JSON schema:
{
  "description": "A rating given by a member for a class or coach.",
  "properties": {
    "id": {
      "description": "Unique identifier for the rating.",
      "title": "Id",
      "type": "string"
    },
    "description": {
      "description": "Human-readable label for the rating level.",
      "title": "Description",
      "type": "string"
    },
    "value": {
      "description": "Numeric rating value.",
      "title": "Value",
      "type": "integer"
    }
  },
  "required": [
    "id",
    "description",
    "value"
  ],
  "title": "Rating",
  "type": "object"
}

Fields:

id pydantic-field

id

Unique identifier for the rating.

description pydantic-field

description

Human-readable label for the rating level.

value pydantic-field

value

Numeric rating value.

BookingV2Studio pydantic-model

Bases: PhoneLongitudeLatitudeMixin, OtfItemBase

Studio details from the v2 bookings endpoint.

Show JSON schema:
{
  "$defs": {
    "Address": {
      "description": "Address associated with a studio in the v2 bookings endpoint.",
      "properties": {
        "line1": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Line1"
        },
        "line2": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Line2"
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "City"
        },
        "postal_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Postal Code"
        },
        "state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "State"
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Country"
        },
        "physicalRegion": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Physicalregion"
        },
        "physicalCountryId": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Physicalcountryid"
        }
      },
      "title": "Address",
      "type": "object"
    }
  },
  "description": "Studio details from the v2 bookings endpoint.",
  "properties": {
    "phone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Phone"
    },
    "latitude": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Latitude"
    },
    "longitude": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Longitude"
    },
    "id": {
      "description": "Unique identifier for the studio.",
      "title": "Id",
      "type": "string"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Name of the studio.",
      "title": "Name"
    },
    "time_zone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "IANA time zone of the studio.",
      "title": "Time Zone"
    },
    "email": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Contact email for the studio.",
      "title": "Email"
    },
    "address": {
      "anyOf": [
        {
          "$ref": "#/$defs/Address"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Physical address of the studio."
    },
    "currency_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Currency Code"
    },
    "mbo_studio_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "MindBody attr",
      "title": "Mbo Studio Id"
    }
  },
  "required": [
    "id"
  ],
  "title": "BookingV2Studio",
  "type": "object"
}

Fields:

studio_uuid pydantic-field

studio_uuid

Unique identifier for the studio.

name pydantic-field

name = None

Name of the studio.

time_zone pydantic-field

time_zone = None

IANA time zone of the studio.

email pydantic-field

email = None

Contact email for the studio.

address pydantic-field

address = None

Physical address of the studio.

mbo_studio_id pydantic-field

mbo_studio_id = None

MindBody attr

BookingV2Class pydantic-model

Bases: ApiMixin, OtfItemBase

Class details from the v2 bookings endpoint.

Show JSON schema:
{
  "$defs": {
    "Address": {
      "description": "Address associated with a studio in the v2 bookings endpoint.",
      "properties": {
        "line1": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Line1"
        },
        "line2": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Line2"
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "City"
        },
        "postal_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Postal Code"
        },
        "state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "State"
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Country"
        },
        "physicalRegion": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Physicalregion"
        },
        "physicalCountryId": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Physicalcountryid"
        }
      },
      "title": "Address",
      "type": "object"
    },
    "BookingV2Studio": {
      "description": "Studio details from the v2 bookings endpoint.",
      "properties": {
        "phone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Phone"
        },
        "latitude": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Latitude"
        },
        "longitude": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Longitude"
        },
        "id": {
          "description": "Unique identifier for the studio.",
          "title": "Id",
          "type": "string"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Name of the studio.",
          "title": "Name"
        },
        "time_zone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "IANA time zone of the studio.",
          "title": "Time Zone"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Contact email for the studio.",
          "title": "Email"
        },
        "address": {
          "anyOf": [
            {
              "$ref": "#/$defs/Address"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Physical address of the studio."
        },
        "currency_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Currency Code"
        },
        "mbo_studio_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "MindBody attr",
          "title": "Mbo Studio Id"
        }
      },
      "required": [
        "id"
      ],
      "title": "BookingV2Studio",
      "type": "object"
    },
    "ClassType": {
      "description": "High-level classification of OTF class formats.",
      "enum": [
        "ORANGE_60",
        "ORANGE_90",
        "OTHER",
        "STRENGTH_50",
        "TREAD_50"
      ],
      "title": "ClassType",
      "type": "string"
    }
  },
  "description": "Class details from the v2 bookings endpoint.",
  "properties": {
    "id": {
      "description": "Matches the `class_id` attribute of the OtfClass model",
      "title": "Id",
      "type": "string"
    },
    "name": {
      "description": "The name of the class.",
      "title": "Name",
      "type": "string"
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/$defs/ClassType"
        }
      ],
      "description": "The high-level class format category."
    },
    "starts_at_local": {
      "description": "The start time of the class. Reflects local time, but the object does not have a timezone.",
      "format": "date-time",
      "title": "Starts At Local",
      "type": "string"
    },
    "studio": {
      "anyOf": [
        {
          "$ref": "#/$defs/BookingV2Studio"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The studio where the class takes place."
    },
    "coach": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "First name of the coach leading the class.",
      "title": "Coach"
    },
    "ot_base_class_uuid": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Only present when class is ratable",
      "title": "Ot Base Class Uuid"
    },
    "starts_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Starts At"
    }
  },
  "required": [
    "id",
    "name",
    "type",
    "starts_at_local"
  ],
  "title": "BookingV2Class",
  "type": "object"
}

Fields:

class_id pydantic-field

class_id

Matches the class_id attribute of the OtfClass model

name pydantic-field

name

The name of the class.

class_type pydantic-field

class_type

The high-level class format category.

starts_at pydantic-field

starts_at

The start time of the class. Reflects local time, but the object does not have a timezone.

studio pydantic-field

studio = None

The studio where the class takes place.

coach pydantic-field

coach = None

First name of the coach leading the class.

class_uuid pydantic-field

class_uuid = None

Only present when class is ratable

coach_name property

coach_name

Shortcut to get the coach's name, to be compatible with old Booking OtfClass model.

ends_at property

ends_at

Emulates the end time of the class, to be compatible with old Booking OtfClass model.

get_booking

get_booking()

Returns a BookingV2 instance for this class.

Raises:

Type Description
ResourceNotFoundError

If the booking does not exist.

ValueError

If class_uuid is None or empty string or if the API instance is not set.

cancel_booking

cancel_booking()

Cancels the booking by calling the proper API method.

Raises:

Type Description
ResourceNotFoundError

If the booking does not exist.

ValueError

If class_uuid is None or empty string or if the API instance is not set.

BookingV2Workout pydantic-model

Bases: OtfItemBase

Workout summary data attached to a v2 booking, available after the class is completed.

Show JSON schema:
{
  "description": "Workout summary data attached to a v2 booking, available after the class is completed.",
  "properties": {
    "id": {
      "description": "Unique identifier for the workout.",
      "title": "Id",
      "type": "string"
    },
    "calories_burned": {
      "description": "Total calories burned during the workout.",
      "title": "Calories Burned",
      "type": "integer"
    },
    "splat_points": {
      "description": "Total splat points earned during the workout.",
      "title": "Splat Points",
      "type": "integer"
    },
    "step_count": {
      "description": "Total step count during the workout.",
      "title": "Step Count",
      "type": "integer"
    },
    "active_time_seconds": {
      "description": "Total active time in seconds.",
      "title": "Active Time Seconds",
      "type": "integer"
    }
  },
  "required": [
    "id",
    "calories_burned",
    "splat_points",
    "step_count",
    "active_time_seconds"
  ],
  "title": "BookingV2Workout",
  "type": "object"
}

Fields:

performance_summary_id pydantic-field

performance_summary_id

Unique identifier for the workout.

calories_burned pydantic-field

calories_burned

Total calories burned during the workout.

splat_points pydantic-field

splat_points

Total splat points earned during the workout.

step_count pydantic-field

step_count

Total step count during the workout.

active_time_seconds pydantic-field

active_time_seconds

Total active time in seconds.

BookingV2 pydantic-model

Bases: ApiMixin, OtfItemBase

A class booking from the v2 bookings endpoint, used by the current OTF app.

Show JSON schema:
{
  "$defs": {
    "Address": {
      "description": "Address associated with a studio in the v2 bookings endpoint.",
      "properties": {
        "line1": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Line1"
        },
        "line2": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Line2"
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "City"
        },
        "postal_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Postal Code"
        },
        "state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "State"
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Country"
        },
        "physicalRegion": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Physicalregion"
        },
        "physicalCountryId": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Physicalcountryid"
        }
      },
      "title": "Address",
      "type": "object"
    },
    "BookingV2Class": {
      "description": "Class details from the v2 bookings endpoint.",
      "properties": {
        "id": {
          "description": "Matches the `class_id` attribute of the OtfClass model",
          "title": "Id",
          "type": "string"
        },
        "name": {
          "description": "The name of the class.",
          "title": "Name",
          "type": "string"
        },
        "type": {
          "allOf": [
            {
              "$ref": "#/$defs/ClassType"
            }
          ],
          "description": "The high-level class format category."
        },
        "starts_at_local": {
          "description": "The start time of the class. Reflects local time, but the object does not have a timezone.",
          "format": "date-time",
          "title": "Starts At Local",
          "type": "string"
        },
        "studio": {
          "anyOf": [
            {
              "$ref": "#/$defs/BookingV2Studio"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The studio where the class takes place."
        },
        "coach": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "First name of the coach leading the class.",
          "title": "Coach"
        },
        "ot_base_class_uuid": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Only present when class is ratable",
          "title": "Ot Base Class Uuid"
        },
        "starts_at": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Starts At"
        }
      },
      "required": [
        "id",
        "name",
        "type",
        "starts_at_local"
      ],
      "title": "BookingV2Class",
      "type": "object"
    },
    "BookingV2Studio": {
      "description": "Studio details from the v2 bookings endpoint.",
      "properties": {
        "phone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Phone"
        },
        "latitude": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Latitude"
        },
        "longitude": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Longitude"
        },
        "id": {
          "description": "Unique identifier for the studio.",
          "title": "Id",
          "type": "string"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Name of the studio.",
          "title": "Name"
        },
        "time_zone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "IANA time zone of the studio.",
          "title": "Time Zone"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Contact email for the studio.",
          "title": "Email"
        },
        "address": {
          "anyOf": [
            {
              "$ref": "#/$defs/Address"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Physical address of the studio."
        },
        "currency_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Currency Code"
        },
        "mbo_studio_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "MindBody attr",
          "title": "Mbo Studio Id"
        }
      },
      "required": [
        "id"
      ],
      "title": "BookingV2Studio",
      "type": "object"
    },
    "BookingV2Workout": {
      "description": "Workout summary data attached to a v2 booking, available after the class is completed.",
      "properties": {
        "id": {
          "description": "Unique identifier for the workout.",
          "title": "Id",
          "type": "string"
        },
        "calories_burned": {
          "description": "Total calories burned during the workout.",
          "title": "Calories Burned",
          "type": "integer"
        },
        "splat_points": {
          "description": "Total splat points earned during the workout.",
          "title": "Splat Points",
          "type": "integer"
        },
        "step_count": {
          "description": "Total step count during the workout.",
          "title": "Step Count",
          "type": "integer"
        },
        "active_time_seconds": {
          "description": "Total active time in seconds.",
          "title": "Active Time Seconds",
          "type": "integer"
        }
      },
      "required": [
        "id",
        "calories_burned",
        "splat_points",
        "step_count",
        "active_time_seconds"
      ],
      "title": "BookingV2Workout",
      "type": "object"
    },
    "ClassType": {
      "description": "High-level classification of OTF class formats.",
      "enum": [
        "ORANGE_60",
        "ORANGE_90",
        "OTHER",
        "STRENGTH_50",
        "TREAD_50"
      ],
      "title": "ClassType",
      "type": "string"
    },
    "Rating": {
      "description": "A rating given by a member for a class or coach.",
      "properties": {
        "id": {
          "description": "Unique identifier for the rating.",
          "title": "Id",
          "type": "string"
        },
        "description": {
          "description": "Human-readable label for the rating level.",
          "title": "Description",
          "type": "string"
        },
        "value": {
          "description": "Numeric rating value.",
          "title": "Value",
          "type": "integer"
        }
      },
      "required": [
        "id",
        "description",
        "value"
      ],
      "title": "Rating",
      "type": "object"
    }
  },
  "description": "A class booking from the v2 bookings endpoint, used by the current OTF app.",
  "properties": {
    "id": {
      "description": "The booking ID used to cancel the booking - must be canceled through new endpoint",
      "title": "Id",
      "type": "string"
    },
    "member_id": {
      "description": "Unique identifier for the member.",
      "title": "Member Id",
      "type": "string"
    },
    "service_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Represents tier of member",
      "title": "Service Name"
    },
    "cross_regional": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Whether the booking is at a non-home studio.",
      "title": "Cross Regional"
    },
    "intro": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Whether this is an introductory class booking.",
      "title": "Intro"
    },
    "checked_in": {
      "description": "Whether the member has checked in.",
      "title": "Checked In",
      "type": "boolean"
    },
    "canceled": {
      "description": "Whether the booking has been cancelled.",
      "title": "Canceled",
      "type": "boolean"
    },
    "late_canceled": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Whether the booking was cancelled late.",
      "title": "Late Canceled"
    },
    "canceled_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "When the booking was cancelled.",
      "title": "Canceled At"
    },
    "ratable": {
      "description": "Whether the class is eligible for rating.",
      "title": "Ratable",
      "type": "boolean"
    },
    "waitlist_position": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Position on the waitlist, if applicable.",
      "title": "Waitlist Position"
    },
    "class": {
      "allOf": [
        {
          "$ref": "#/$defs/BookingV2Class"
        }
      ],
      "description": "The class associated with this booking."
    },
    "workout": {
      "anyOf": [
        {
          "$ref": "#/$defs/BookingV2Workout"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Workout summary, present after class is completed."
    },
    "coach_rating": {
      "anyOf": [
        {
          "$ref": "#/$defs/Rating"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Rating given to the coach."
    },
    "class_rating": {
      "anyOf": [
        {
          "$ref": "#/$defs/Rating"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Rating given to the class."
    },
    "paying_studio_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Studio ID responsible for billing.",
      "title": "Paying Studio Id"
    },
    "mbo_booking_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Mbo Booking Id"
    },
    "mbo_unique_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Mbo Unique Id"
    },
    "mbo_paying_unique_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Mbo Paying Unique Id"
    },
    "person_id": {
      "description": "Person identifier in the OTF system.",
      "title": "Person Id",
      "type": "string"
    },
    "created_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Date the booking was created in the system",
      "title": "Created At"
    },
    "updated_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Date the booking was updated in the system",
      "title": "Updated At"
    }
  },
  "required": [
    "id",
    "member_id",
    "checked_in",
    "canceled",
    "ratable",
    "class",
    "person_id"
  ],
  "title": "BookingV2",
  "type": "object"
}

Fields:

booking_id pydantic-field

booking_id

The booking ID used to cancel the booking - must be canceled through new endpoint

member_uuid pydantic-field

member_uuid

Unique identifier for the member.

service_name pydantic-field

service_name = None

Represents tier of member

cross_regional pydantic-field

cross_regional = None

Whether the booking is at a non-home studio.

intro pydantic-field

intro = None

Whether this is an introductory class booking.

checked_in pydantic-field

checked_in

Whether the member has checked in.

canceled pydantic-field

canceled

Whether the booking has been cancelled.

late_canceled pydantic-field

late_canceled = None

Whether the booking was cancelled late.

canceled_at pydantic-field

canceled_at = None

When the booking was cancelled.

ratable pydantic-field

ratable

Whether the class is eligible for rating.

waitlist_position pydantic-field

waitlist_position = None

Position on the waitlist, if applicable.

otf_class pydantic-field

otf_class

The class associated with this booking.

workout pydantic-field

workout = None

Workout summary, present after class is completed.

coach_rating pydantic-field

coach_rating = None

Rating given to the coach.

class_rating pydantic-field

class_rating = None

Rating given to the class.

paying_studio_id pydantic-field

paying_studio_id = None

Studio ID responsible for billing.

person_id pydantic-field

person_id

Person identifier in the OTF system.

created_at pydantic-field

created_at = None

Date the booking was created in the system

updated_at pydantic-field

updated_at = None

Date the booking was updated in the system

status property

status

Emulates the booking status from the old API, but with less specificity.

studio_uuid property

studio_uuid

Shortcut to get the studio UUID.

class_uuid property

class_uuid

Shortcut to get the class UUID.

starts_at property

starts_at

Shortcut to get the class start time.

ends_at property

ends_at

Shortcut to get the class end time.

cancelled_date property

cancelled_date

Returns the canceled_at value in a backward-compatible way.

id_value property

id_value

Returns the booking_id, to be compatible with old Booking model.

cancel

cancel()

Cancels the booking by calling the proper API method.

Raises:

Type Description
ValueError

If the API instance is not set.

get_sort_key

get_sort_key()

Returns a tuple for sorting bookings, used when attempting to remove duplicates.

get_end_time

get_end_time(start_time, class_type)

Get the end time of a class based on the start time and class type.