GET | /scheduling/class-roster | Get booked and waitlisted users for a class. |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class ClassRosterRequest : ClassRosterRequestDto(), IRestrictedApiRequest
{
/**
* Api Key - grants access to resources
*/
@ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
var ApiKey:String? = null
/**
* Store Id or Chain Id is required
*/
@ApiMember(DataType="integer", Description="Store Id or Chain Id is required", Name="StoreId", ParameterType="query")
var StoreId:Int? = null
/**
* Store Id or Chain Id is required
*/
@ApiMember(DataType="integer", Description="Store Id or Chain Id is required", Name="ChainId", ParameterType="query")
var ChainId:Int? = null
/**
* Class Schedule ID
*/
@ApiMember(DataType="integer", Description="Class Schedule ID", IsRequired=true, Name="ClassScheduleId", ParameterType="query")
var ClassScheduleId:Int? = null
var RestrictedId:Int? = null
var RestrictedResourceType:RestrictedResourceType? = null
}
open class ClassRosterRequestDto : ApiDtoBase()
{
var ClassScheduleId:Int? = null
}
open class ApiDtoBase
{
var ApiKey:String? = null
var StoreId:Int? = null
var ChainId:Int? = null
}
enum class RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
open class ClassRosterResponse : ClassRosterResponseDto()
{
var Success:Boolean? = null
var Message:String? = null
var ClassDate:Date? = null
var FreeSpots:Int? = null
var MaxSpots:Int? = null
var TotalBooked:Int? = null
var LocationType:String? = null
var VirtualLink:String? = null
var ClassRoster:ArrayList<ClassRosterItem> = ArrayList<ClassRosterItem>()
var WaitList:ArrayList<ClassRosterItem> = ArrayList<ClassRosterItem>()
}
open class ClassRosterResponseDto : ApiResponseBase()
{
var ClassRoster:ArrayList<ClassRosterItem> = ArrayList<ClassRosterItem>()
var WaitList:ArrayList<ClassRosterItem> = ArrayList<ClassRosterItem>()
}
open class ApiResponseBase
{
var Success:Boolean? = null
var Message:String? = null
}
open class ClassRosterItem
{
var BookingId:Int? = null
var UserId:Int? = null
var FirstName:String? = null
var LastName:String? = null
var Email:String? = null
var Phone:String? = null
var BookingMade:Date? = null
var FirstTimeBooking:Boolean? = null
var PackageName:String? = null
var PackageId:Int? = null
var LeadTypeName:String? = null
var LeadTypeId:Int? = null
var IsMember:Boolean? = null
var MemberExpiration:Date? = null
var CreditType:ClassRosterCreditType? = null
var CreditsRemaining:Int? = null
var NextCreditExpiration:Date? = null
var BookingStatusId:Short? = null
var BookingStatusDescription:String? = null
}
enum class ClassRosterCreditType(val value:Int)
{
Uninitialized(0),
PaidCredit(1),
FreeCredit(2),
AmenityCredit(3),
MembershipTypeCredit(4),
ClassPassCredit(5),
Error(-1),
}
Kotlin ClassRosterRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /scheduling/class-roster HTTP/1.1 Host: clubready.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ClassRosterResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Scheduling.Model"> <Message xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Message> <Success xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">false</Success> <ClassRoster xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models"> <ClassRosterItem> <BookingId>0</BookingId> <BookingMade>0001-01-01T00:00:00</BookingMade> <BookingStatusDescription>String</BookingStatusDescription> <BookingStatusId>0</BookingStatusId> <CreditType>Uninitialized</CreditType> <CreditsRemaining>0</CreditsRemaining> <Email>String</Email> <FirstName>String</FirstName> <FirstTimeBooking>false</FirstTimeBooking> <IsMember>false</IsMember> <IsWaitList>false</IsWaitList> <LastName>String</LastName> <LeadTypeId>0</LeadTypeId> <LeadTypeName>String</LeadTypeName> <MemberExpiration>0001-01-01T00:00:00</MemberExpiration> <NextCreditExpiration>0001-01-01T00:00:00</NextCreditExpiration> <PackageId>0</PackageId> <PackageName>String</PackageName> <Phone>String</Phone> <UserId>0</UserId> </ClassRosterItem> </ClassRoster> <WaitList xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models"> <ClassRosterItem> <BookingId>0</BookingId> <BookingMade>0001-01-01T00:00:00</BookingMade> <BookingStatusDescription>String</BookingStatusDescription> <BookingStatusId>0</BookingStatusId> <CreditType>Uninitialized</CreditType> <CreditsRemaining>0</CreditsRemaining> <Email>String</Email> <FirstName>String</FirstName> <FirstTimeBooking>false</FirstTimeBooking> <IsMember>false</IsMember> <IsWaitList>false</IsWaitList> <LastName>String</LastName> <LeadTypeId>0</LeadTypeId> <LeadTypeName>String</LeadTypeName> <MemberExpiration>0001-01-01T00:00:00</MemberExpiration> <NextCreditExpiration>0001-01-01T00:00:00</NextCreditExpiration> <PackageId>0</PackageId> <PackageName>String</PackageName> <Phone>String</Phone> <UserId>0</UserId> </ClassRosterItem> </WaitList> <ClassDate>0001-01-01T00:00:00</ClassDate> <FreeSpots>0</FreeSpots> <LocationType>String</LocationType> <MaxSpots>0</MaxSpots> <TotalBooked>0</TotalBooked> <VirtualLink>String</VirtualLink> </ClassRosterResponse>