GET | /scheduling/{UserId}/credit-check | Check to see if a particular credit can be used to book a certain class or service. |
---|
export class ApiDtoBase
{
public ApiKey: string;
public StoreId?: number;
public ChainId?: number;
public constructor(init?: Partial<ApiDtoBase>) { (Object as any).assign(this, init); }
}
export class CreditCheckRequestDto extends ApiDtoBase
{
public UserId: number;
public CustomerSessionId: number;
public ClassId?: number;
public SessionSizeId?: number;
public constructor(init?: Partial<CreditCheckRequestDto>) { super(init); (Object as any).assign(this, init); }
}
export enum RestrictedResourceType
{
Store = 'Store',
Chain = 'Chain',
User = 'User',
Undefined = 'Undefined',
}
export class CreditCheckRequest extends CreditCheckRequestDto 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 ApiKey: string;
/**
* Chain ID
*/
// @ApiMember(DataType="integer", Description="Chain ID", Name="ChainId", ParameterType="query")
public ChainId?: number;
/**
* Store ID
*/
// @ApiMember(DataType="integer", Description="Store ID", Name="StoreId", ParameterType="query")
public StoreId?: number;
/**
* ClubReady User ID
*/
// @ApiMember(DataType="integer", Description="ClubReady User ID", IsRequired=true, Name="UserId", ParameterType="path")
public UserId: number;
/**
* ClubReady Customer Session ID
*/
// @ApiMember(DataType="integer", Description="ClubReady Customer Session ID", IsRequired=true, Name="CustomerSessionId", ParameterType="query")
public CustomerSessionId: number;
/**
* ClubReady Class ID
*/
// @ApiMember(DataType="integer", Description="ClubReady Class ID", Name="ClassId", ParameterType="query")
public ClassId?: number;
/**
* ClubReady Session Size ID
*/
// @ApiMember(DataType="integer", Description="ClubReady Session Size ID", Name="SessionSizeId", ParameterType="query")
public SessionSizeId?: number;
public RestrictedId?: number;
public RestrictedResourceType: RestrictedResourceType;
public constructor(init?: Partial<CreditCheckRequest>) { super(init); (Object as any).assign(this, init); }
}
export class ApiResponseBase
{
public Success: boolean;
public Message: string;
public constructor(init?: Partial<ApiResponseBase>) { (Object as any).assign(this, init); }
}
export class CreditCheckResponseDto extends ApiResponseBase
{
public CanUse: boolean;
public constructor(init?: Partial<CreditCheckResponseDto>) { super(init); (Object as any).assign(this, init); }
}
export class CreditCheckResponse extends CreditCheckResponseDto
{
public Success: boolean;
public Message: string;
public CanUse: boolean;
public constructor(init?: Partial<CreditCheckResponse>) { super(init); (Object as any).assign(this, init); }
}
TypeScript CreditCheckRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /scheduling/{UserId}/credit-check HTTP/1.1 Host: clubready.com Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Success: False, Message: String, CanUse: False }