ClubReady Api

<back to all web services

CreateClassScheduleRequest

The following routes are available for this service:
POST/scheduling/class-scheduleCreate a Class Schedule
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class CreateClassScheduleRequest extends CreateClassScheduleRequestDto 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
        */
        @ApiMember(DataType="integer", Description="Store ID", IsRequired=true, Name="StoreId", ParameterType="query")
        public Integer StoreId = null;

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

        /**
        * Date and Time for Class
        */
        @ApiMember(DataType="date-time", Description="Date and Time for Class", IsRequired=true, Name="ClassDateTime", ParameterType="query")
        public Date ClassDateTime = null;

        /**
        * Trainer ID
        */
        @ApiMember(DataType="integer", Description="Trainer ID", Name="TrainerId", ParameterType="query")
        public Integer TrainerId = null;

        /**
        * Alternate Class Name
        */
        @ApiMember(DataType="string", Description="Alternate Class Name", Name="AlternateClassName", ParameterType="query")
        public String AlternateClassName = null;

        public Integer RestrictedId = null;
        public RestrictedResourceType RestrictedResourceType = null;
        
        public String getApiKey() { return ApiKey; }
        public CreateClassScheduleRequest setApiKey(String value) { this.ApiKey = value; return this; }
        public Integer getStoreId() { return StoreId; }
        public CreateClassScheduleRequest setStoreId(Integer value) { this.StoreId = value; return this; }
        public Integer getClassId() { return ClassId; }
        public CreateClassScheduleRequest setClassId(Integer value) { this.ClassId = value; return this; }
        public Date getClassDateTime() { return ClassDateTime; }
        public CreateClassScheduleRequest setClassDateTime(Date value) { this.ClassDateTime = value; return this; }
        public Integer getTrainerId() { return TrainerId; }
        public CreateClassScheduleRequest setTrainerId(Integer value) { this.TrainerId = value; return this; }
        public String getAlternateClassName() { return AlternateClassName; }
        public CreateClassScheduleRequest setAlternateClassName(String value) { this.AlternateClassName = value; return this; }
        public Integer getRestrictedId() { return RestrictedId; }
        public CreateClassScheduleRequest setRestrictedId(Integer value) { this.RestrictedId = value; return this; }
        public RestrictedResourceType getRestrictedResourceType() { return RestrictedResourceType; }
        public CreateClassScheduleRequest setRestrictedResourceType(RestrictedResourceType value) { this.RestrictedResourceType = value; return this; }
    }

    public static class CreateClassScheduleRequestDto extends ApiDtoBase
    {
        public Integer ClassId = null;
        public Date ClassDateTime = null;
        public Integer TrainerId = null;
        public String AlternateClassName = null;
        
        public Integer getClassId() { return ClassId; }
        public CreateClassScheduleRequestDto setClassId(Integer value) { this.ClassId = value; return this; }
        public Date getClassDateTime() { return ClassDateTime; }
        public CreateClassScheduleRequestDto setClassDateTime(Date value) { this.ClassDateTime = value; return this; }
        public Integer getTrainerId() { return TrainerId; }
        public CreateClassScheduleRequestDto setTrainerId(Integer value) { this.TrainerId = value; return this; }
        public String getAlternateClassName() { return AlternateClassName; }
        public CreateClassScheduleRequestDto setAlternateClassName(String value) { this.AlternateClassName = 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 CreateClassScheduleResponse extends CreateClassScheduleResponseDto
    {
        public Boolean Success = null;
        public Integer ClassScheduleId = null;
        public String Message = null;
        
        public Boolean isSuccess() { return Success; }
        public CreateClassScheduleResponse setSuccess(Boolean value) { this.Success = value; return this; }
        public Integer getClassScheduleId() { return ClassScheduleId; }
        public CreateClassScheduleResponse setClassScheduleId(Integer value) { this.ClassScheduleId = value; return this; }
        public String getMessage() { return Message; }
        public CreateClassScheduleResponse setMessage(String value) { this.Message = value; return this; }
    }

    public static class CreateClassScheduleResponseDto extends ApiResponseBase
    {
        public Integer ClassScheduleId = null;
        
        public Integer getClassScheduleId() { return ClassScheduleId; }
        public CreateClassScheduleResponseDto setClassScheduleId(Integer value) { this.ClassScheduleId = 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; }
    }

}

Java CreateClassScheduleRequest DTOs

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

HTTP + XML

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

POST /scheduling/class-schedule HTTP/1.1 
Host: www.clubready.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CreateClassScheduleRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Scheduling.Model">
  <ApiKey xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</ApiKey>
  <ChainId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ChainId>
  <StoreId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</StoreId>
  <AlternateClassName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</AlternateClassName>
  <ClassDateTime xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0001-01-01T00:00:00</ClassDateTime>
  <ClassId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ClassId>
  <TrainerId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</TrainerId>
</CreateClassScheduleRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CreateClassScheduleResponse 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>
  <ClassScheduleId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ClassScheduleId>
</CreateClassScheduleResponse>