POST | /scheduling/class-schedule | Create 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 .csv suffix or ?format=csv
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: clubready.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"ApiKey":"String","StoreId":0,"ClassId":0,"ClassDateTime":"0001-01-01T00:00:00.0000000","TrainerId":0,"AlternateClassName":"String","RestrictedId":0,"RestrictedResourceType":"Store","ChainId":0}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Success":false,"ClassScheduleId":0,"Message":"String"}