ClubReady Api

<back to all web services

CreateClassBookingRequest

The following routes are available for this service:
POST/scheduling/class-bookingCreate a Class Booking
POST/v2/{ApiKey}/club/{StoreId}/booking(obsolete) Create a Class Booking
POST/v2/{ApiKey}/club/{StoreId}/class-booking(obsolete) Create a Class Booking
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class CreateClassBookingRequest extends CreateClassBookingRequestDto 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;

        /**
        * UserID
        */
        @ApiMember(DataType="string", Description="UserID", IsRequired=true, Name="UserId", ParameterType="query")
        public Integer UserId = null;

        /**
        * Store ID
        */
        @ApiMember(DataType="integer", Description="Store ID", IsRequired=true, Name="StoreId", ParameterType="query")
        public Integer StoreId = null;

        /**
        * Class Schedule ID
        */
        @ApiMember(DataType="integer", Description="Class Schedule ID", IsRequired=true, Name="ScheduleId", ParameterType="query")
        public Integer ScheduleId = null;

        /**
        * Put user in wait list when possible
        */
        @ApiMember(DataType="bool", Description="Put user in wait list when possible", Name="AllowWaitList", ParameterType="query")
        public Boolean AllowWaitList = null;

        public Integer RestrictedId = null;
        public RestrictedResourceType RestrictedResourceType = null;
        
        public String getApiKey() { return ApiKey; }
        public CreateClassBookingRequest setApiKey(String value) { this.ApiKey = value; return this; }
        public Integer getUserId() { return UserId; }
        public CreateClassBookingRequest setUserId(Integer value) { this.UserId = value; return this; }
        public Integer getStoreId() { return StoreId; }
        public CreateClassBookingRequest setStoreId(Integer value) { this.StoreId = value; return this; }
        public Integer getScheduleId() { return ScheduleId; }
        public CreateClassBookingRequest setScheduleId(Integer value) { this.ScheduleId = value; return this; }
        public Boolean isAllowWaitList() { return AllowWaitList; }
        public CreateClassBookingRequest setAllowWaitList(Boolean value) { this.AllowWaitList = value; return this; }
        public Integer getRestrictedId() { return RestrictedId; }
        public CreateClassBookingRequest setRestrictedId(Integer value) { this.RestrictedId = value; return this; }
        public RestrictedResourceType getRestrictedResourceType() { return RestrictedResourceType; }
        public CreateClassBookingRequest setRestrictedResourceType(RestrictedResourceType value) { this.RestrictedResourceType = value; return this; }
    }

    public static class CreateClassBookingRequestDto extends ApiDtoBase
    {
        public Integer UserId = null;
        public Integer ScheduleId = null;
        public Boolean AllowWaitList = null;
        
        public Integer getUserId() { return UserId; }
        public CreateClassBookingRequestDto setUserId(Integer value) { this.UserId = value; return this; }
        public Integer getScheduleId() { return ScheduleId; }
        public CreateClassBookingRequestDto setScheduleId(Integer value) { this.ScheduleId = value; return this; }
        public Boolean isAllowWaitList() { return AllowWaitList; }
        public CreateClassBookingRequestDto setAllowWaitList(Boolean value) { this.AllowWaitList = 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 CreateClassBookingResponse extends CreateClassBookingResponseDto
    {
        public Integer BookingId = null;
        public String Message = null;
        
        public Integer getBookingId() { return BookingId; }
        public CreateClassBookingResponse setBookingId(Integer value) { this.BookingId = value; return this; }
        public String getMessage() { return Message; }
        public CreateClassBookingResponse setMessage(String value) { this.Message = value; return this; }
    }

    public static class CreateClassBookingResponseDto
    {
        public Integer BookingId = null;
        public String Message = null;
        
        public Integer getBookingId() { return BookingId; }
        public CreateClassBookingResponseDto setBookingId(Integer value) { this.BookingId = value; return this; }
        public String getMessage() { return Message; }
        public CreateClassBookingResponseDto setMessage(String value) { this.Message = value; return this; }
    }

}

Java CreateClassBookingRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /scheduling/class-booking HTTP/1.1 
Host: clubready.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ApiKey: String,
	UserId: 0,
	StoreId: 0,
	ScheduleId: 0,
	AllowWaitList: False,
	RestrictedId: 0,
	RestrictedResourceType: Store,
	ChainId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	BookingId: 0,
	Message: String
}