GET | /scheduling/class-roster | Get booked and waitlisted users for a class. |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class ClassRosterRequest extends ClassRosterRequestDto implements IRestrictedApiRequest
{
/**
* Api Key - grants access to resources
*/
@ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
public String ApiKey = null;
/**
* Store Id or Chain Id is required
*/
@ApiMember(DataType="integer", Description="Store Id or Chain Id is required", Name="StoreId", ParameterType="query")
public Integer StoreId = null;
/**
* Store Id or Chain Id is required
*/
@ApiMember(DataType="integer", Description="Store Id or Chain Id is required", Name="ChainId", ParameterType="query")
public Integer ChainId = null;
/**
* Class Schedule ID
*/
@ApiMember(DataType="integer", Description="Class Schedule ID", IsRequired=true, Name="ClassScheduleId", ParameterType="query")
public Integer ClassScheduleId = null;
public Integer RestrictedId = null;
public RestrictedResourceType RestrictedResourceType = null;
public String getApiKey() { return ApiKey; }
public ClassRosterRequest setApiKey(String value) { this.ApiKey = value; return this; }
public Integer getStoreId() { return StoreId; }
public ClassRosterRequest setStoreId(Integer value) { this.StoreId = value; return this; }
public Integer getChainId() { return ChainId; }
public ClassRosterRequest setChainId(Integer value) { this.ChainId = value; return this; }
public Integer getClassScheduleId() { return ClassScheduleId; }
public ClassRosterRequest setClassScheduleId(Integer value) { this.ClassScheduleId = value; return this; }
public Integer getRestrictedId() { return RestrictedId; }
public ClassRosterRequest setRestrictedId(Integer value) { this.RestrictedId = value; return this; }
public RestrictedResourceType getRestrictedResourceType() { return RestrictedResourceType; }
public ClassRosterRequest setRestrictedResourceType(RestrictedResourceType value) { this.RestrictedResourceType = value; return this; }
}
public static class ClassRosterRequestDto extends ApiDtoBase
{
public Integer ClassScheduleId = null;
public Integer getClassScheduleId() { return ClassScheduleId; }
public ClassRosterRequestDto setClassScheduleId(Integer value) { this.ClassScheduleId = value; return this; }
}
public static class ApiDtoBase
{
public String ApiKey = null;
public Integer StoreId = null;
public Integer ChainId = null;
public String getApiKey() { return ApiKey; }
public ApiDtoBase setApiKey(String value) { this.ApiKey = value; return this; }
public Integer getStoreId() { return StoreId; }
public ApiDtoBase setStoreId(Integer value) { this.StoreId = value; return this; }
public Integer getChainId() { return ChainId; }
public ApiDtoBase setChainId(Integer value) { this.ChainId = value; return this; }
}
public static enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined;
}
public static class ClassRosterResponse extends ClassRosterResponseDto
{
public Boolean Success = null;
public String Message = null;
public Date ClassDate = null;
public Integer FreeSpots = null;
public Integer MaxSpots = null;
public Integer TotalBooked = null;
public String LocationType = null;
public String VirtualLink = null;
public ArrayList<ClassRosterItem> ClassRoster = null;
public ArrayList<ClassRosterItem> WaitList = null;
public Boolean isSuccess() { return Success; }
public ClassRosterResponse setSuccess(Boolean value) { this.Success = value; return this; }
public String getMessage() { return Message; }
public ClassRosterResponse setMessage(String value) { this.Message = value; return this; }
public Date getClassDate() { return ClassDate; }
public ClassRosterResponse setClassDate(Date value) { this.ClassDate = value; return this; }
public Integer getFreeSpots() { return FreeSpots; }
public ClassRosterResponse setFreeSpots(Integer value) { this.FreeSpots = value; return this; }
public Integer getMaxSpots() { return MaxSpots; }
public ClassRosterResponse setMaxSpots(Integer value) { this.MaxSpots = value; return this; }
public Integer getTotalBooked() { return TotalBooked; }
public ClassRosterResponse setTotalBooked(Integer value) { this.TotalBooked = value; return this; }
public String getLocationType() { return LocationType; }
public ClassRosterResponse setLocationType(String value) { this.LocationType = value; return this; }
public String getVirtualLink() { return VirtualLink; }
public ClassRosterResponse setVirtualLink(String value) { this.VirtualLink = value; return this; }
public ArrayList<ClassRosterItem> getClassRoster() { return ClassRoster; }
public ClassRosterResponse setClassRoster(ArrayList<ClassRosterItem> value) { this.ClassRoster = value; return this; }
public ArrayList<ClassRosterItem> getWaitList() { return WaitList; }
public ClassRosterResponse setWaitList(ArrayList<ClassRosterItem> value) { this.WaitList = value; return this; }
}
public static class ClassRosterResponseDto extends ApiResponseBase
{
public ArrayList<ClassRosterItem> ClassRoster = null;
public ArrayList<ClassRosterItem> WaitList = null;
public ArrayList<ClassRosterItem> getClassRoster() { return ClassRoster; }
public ClassRosterResponseDto setClassRoster(ArrayList<ClassRosterItem> value) { this.ClassRoster = value; return this; }
public ArrayList<ClassRosterItem> getWaitList() { return WaitList; }
public ClassRosterResponseDto setWaitList(ArrayList<ClassRosterItem> value) { this.WaitList = value; return this; }
}
public static class ApiResponseBase
{
public Boolean Success = null;
public String Message = null;
public Boolean isSuccess() { return Success; }
public ApiResponseBase setSuccess(Boolean value) { this.Success = value; return this; }
public String getMessage() { return Message; }
public ApiResponseBase setMessage(String value) { this.Message = value; return this; }
}
public static class ClassRosterItem
{
public Integer BookingId = null;
public Integer UserId = null;
public String FirstName = null;
public String LastName = null;
public String Email = null;
public String Phone = null;
public Date BookingMade = null;
public Boolean FirstTimeBooking = null;
public String PackageName = null;
public Integer PackageId = null;
public String LeadTypeName = null;
public Integer LeadTypeId = null;
public Boolean IsMember = null;
public Date MemberExpiration = null;
public ClassRosterCreditType CreditType = null;
public Integer CreditsRemaining = null;
public Date NextCreditExpiration = null;
public Short BookingStatusId = null;
public String BookingStatusDescription = null;
public Integer getBookingId() { return BookingId; }
public ClassRosterItem setBookingId(Integer value) { this.BookingId = value; return this; }
public Integer getUserId() { return UserId; }
public ClassRosterItem setUserId(Integer value) { this.UserId = value; return this; }
public String getFirstName() { return FirstName; }
public ClassRosterItem setFirstName(String value) { this.FirstName = value; return this; }
public String getLastName() { return LastName; }
public ClassRosterItem setLastName(String value) { this.LastName = value; return this; }
public String getEmail() { return Email; }
public ClassRosterItem setEmail(String value) { this.Email = value; return this; }
public String getPhone() { return Phone; }
public ClassRosterItem setPhone(String value) { this.Phone = value; return this; }
public Date getBookingMade() { return BookingMade; }
public ClassRosterItem setBookingMade(Date value) { this.BookingMade = value; return this; }
public Boolean isFirstTimeBooking() { return FirstTimeBooking; }
public ClassRosterItem setFirstTimeBooking(Boolean value) { this.FirstTimeBooking = value; return this; }
public String getPackageName() { return PackageName; }
public ClassRosterItem setPackageName(String value) { this.PackageName = value; return this; }
public Integer getPackageId() { return PackageId; }
public ClassRosterItem setPackageId(Integer value) { this.PackageId = value; return this; }
public String getLeadTypeName() { return LeadTypeName; }
public ClassRosterItem setLeadTypeName(String value) { this.LeadTypeName = value; return this; }
public Integer getLeadTypeId() { return LeadTypeId; }
public ClassRosterItem setLeadTypeId(Integer value) { this.LeadTypeId = value; return this; }
public Boolean getIsMember() { return IsMember; }
public ClassRosterItem setIsMember(Boolean value) { this.IsMember = value; return this; }
public Date getMemberExpiration() { return MemberExpiration; }
public ClassRosterItem setMemberExpiration(Date value) { this.MemberExpiration = value; return this; }
public ClassRosterCreditType getCreditType() { return CreditType; }
public ClassRosterItem setCreditType(ClassRosterCreditType value) { this.CreditType = value; return this; }
public Integer getCreditsRemaining() { return CreditsRemaining; }
public ClassRosterItem setCreditsRemaining(Integer value) { this.CreditsRemaining = value; return this; }
public Date getNextCreditExpiration() { return NextCreditExpiration; }
public ClassRosterItem setNextCreditExpiration(Date value) { this.NextCreditExpiration = value; return this; }
public Short getBookingStatusId() { return BookingStatusId; }
public ClassRosterItem setBookingStatusId(Short value) { this.BookingStatusId = value; return this; }
public String getBookingStatusDescription() { return BookingStatusDescription; }
public ClassRosterItem setBookingStatusDescription(String value) { this.BookingStatusDescription = value; return this; }
}
public static enum ClassRosterCreditType
{
Uninitialized(0),
PaidCredit(1),
FreeCredit(2),
AmenityCredit(3),
MembershipTypeCredit(4),
ClassPassCredit(5),
Error(-1);
private final int value;
ClassRosterCreditType(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Success":false,"Message":"String","ClassDate":"0001-01-01T00:00:00.0000000","FreeSpots":0,"MaxSpots":0,"TotalBooked":0,"LocationType":"String","VirtualLink":"String","ClassRoster":[{"BookingId":0,"UserId":0,"FirstName":"String","LastName":"String","Email":"String","Phone":"String","BookingMade":"0001-01-01T00:00:00.0000000","FirstTimeBooking":false,"PackageName":"String","PackageId":0,"LeadTypeName":"String","LeadTypeId":0,"IsMember":false,"MemberExpiration":"0001-01-01T00:00:00.0000000","CreditType":"Uninitialized","CreditsRemaining":0,"NextCreditExpiration":"0001-01-01T00:00:00.0000000","BookingStatusId":0,"BookingStatusDescription":"String"}],"WaitList":[{"BookingId":0,"UserId":0,"FirstName":"String","LastName":"String","Email":"String","Phone":"String","BookingMade":"0001-01-01T00:00:00.0000000","FirstTimeBooking":false,"PackageName":"String","PackageId":0,"LeadTypeName":"String","LeadTypeId":0,"IsMember":false,"MemberExpiration":"0001-01-01T00:00:00.0000000","CreditType":"Uninitialized","CreditsRemaining":0,"NextCreditExpiration":"0001-01-01T00:00:00.0000000","BookingStatusId":0,"BookingStatusDescription":"String"}]}