GET | /scheduling/{UserId}/credit-check | Check to see if a particular credit can be used to book a certain class or service. |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class CreditCheckRequest : CreditCheckRequestDto(), IRestrictedApiRequest
{
/**
* Api Key - grants access to resources
*/
@ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
var ApiKey:String? = null
/**
* Chain ID
*/
@ApiMember(DataType="integer", Description="Chain ID", Name="ChainId", ParameterType="query")
var ChainId:Int? = null
/**
* Store ID
*/
@ApiMember(DataType="integer", Description="Store ID", Name="StoreId", ParameterType="query")
var StoreId:Int? = null
/**
* ClubReady User ID
*/
@ApiMember(DataType="integer", Description="ClubReady User ID", IsRequired=true, Name="UserId", ParameterType="path")
var UserId:Int? = null
/**
* ClubReady Customer Session ID
*/
@ApiMember(DataType="integer", Description="ClubReady Customer Session ID", IsRequired=true, Name="CustomerSessionId", ParameterType="query")
var CustomerSessionId:Int? = null
/**
* ClubReady Class ID
*/
@ApiMember(DataType="integer", Description="ClubReady Class ID", Name="ClassId", ParameterType="query")
var ClassId:Int? = null
/**
* ClubReady Session Size ID
*/
@ApiMember(DataType="integer", Description="ClubReady Session Size ID", Name="SessionSizeId", ParameterType="query")
var SessionSizeId:Int? = null
var RestrictedId:Int? = null
var RestrictedResourceType:RestrictedResourceType? = null
}
open class CreditCheckRequestDto : ApiDtoBase()
{
var UserId:Int? = null
var CustomerSessionId:Int? = null
var ClassId:Int? = null
var SessionSizeId:Int? = null
}
open class ApiDtoBase
{
var ApiKey:String? = null
var StoreId:Int? = null
var ChainId:Int? = null
}
enum class RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
open class CreditCheckResponse : CreditCheckResponseDto()
{
var Success:Boolean? = null
var Message:String? = null
var CanUse:Boolean? = null
}
open class CreditCheckResponseDto : ApiResponseBase()
{
var CanUse:Boolean? = null
}
open class ApiResponseBase
{
var Success:Boolean? = null
var Message:String? = null
}
Kotlin CreditCheckRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Success":false,"Message":"String","CanUse":false}