ClubReady Api

<back to all web services

CreditDetailRequest

The following routes are available for this service:
GET/scheduling/{UserId}/credit-detailBreakdown of a user's credits.
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class CreditDetailRequest extends ApiDtoBase 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;

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

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

        /**
        * ClubReady User ID
        */
        @ApiMember(DataType="integer", Description="ClubReady User ID", IsRequired=true, Name="UserId", ParameterType="path")
        public Integer UserId = null;

        /**
        * Determines if the list of the user's credits are broken out by store ID.
        */
        @ApiMember(DataType="Boolean", Description="Determines if the list of the user's credits are broken out by store ID.", Name="FullDetail", ParameterType="query")
        public Boolean FullDetail = null;

        public Integer RestrictedId = null;
        public RestrictedResourceType RestrictedResourceType = null;
        
        public String getApiKey() { return ApiKey; }
        public CreditDetailRequest setApiKey(String value) { this.ApiKey = value; return this; }
        public Integer getChainId() { return ChainId; }
        public CreditDetailRequest setChainId(Integer value) { this.ChainId = value; return this; }
        public Integer getStoreId() { return StoreId; }
        public CreditDetailRequest setStoreId(Integer value) { this.StoreId = value; return this; }
        public Integer getUserId() { return UserId; }
        public CreditDetailRequest setUserId(Integer value) { this.UserId = value; return this; }
        public Boolean isFullDetail() { return FullDetail; }
        public CreditDetailRequest setFullDetail(Boolean value) { this.FullDetail = value; return this; }
        public Integer getRestrictedId() { return RestrictedId; }
        public CreditDetailRequest setRestrictedId(Integer value) { this.RestrictedId = value; return this; }
        public RestrictedResourceType getRestrictedResourceType() { return RestrictedResourceType; }
        public CreditDetailRequest setRestrictedResourceType(RestrictedResourceType value) { this.RestrictedResourceType = 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 CreditDetailResponse extends CreditDetailResponseDto
    {
        public Boolean Success = null;
        public String Message = null;
        public Integer TotalPurchased = null;
        public Integer TotalAvailable = null;
        public ArrayList<SessionCreditDetail> Credits = null;
        
        public Boolean isSuccess() { return Success; }
        public CreditDetailResponse setSuccess(Boolean value) { this.Success = value; return this; }
        public String getMessage() { return Message; }
        public CreditDetailResponse setMessage(String value) { this.Message = value; return this; }
        public Integer getTotalPurchased() { return TotalPurchased; }
        public CreditDetailResponse setTotalPurchased(Integer value) { this.TotalPurchased = value; return this; }
        public Integer getTotalAvailable() { return TotalAvailable; }
        public CreditDetailResponse setTotalAvailable(Integer value) { this.TotalAvailable = value; return this; }
        public ArrayList<SessionCreditDetail> getCredits() { return Credits; }
        public CreditDetailResponse setCredits(ArrayList<SessionCreditDetail> value) { this.Credits = value; return this; }
    }

    public static class CreditDetailResponseDto extends ApiResponseBase
    {
        public Integer TotalPurchased = null;
        public Integer TotalAvailable = null;
        public ArrayList<SessionCreditDetail> Credits = null;
        
        public Integer getTotalPurchased() { return TotalPurchased; }
        public CreditDetailResponseDto setTotalPurchased(Integer value) { this.TotalPurchased = value; return this; }
        public Integer getTotalAvailable() { return TotalAvailable; }
        public CreditDetailResponseDto setTotalAvailable(Integer value) { this.TotalAvailable = value; return this; }
        public ArrayList<SessionCreditDetail> getCredits() { return Credits; }
        public CreditDetailResponseDto setCredits(ArrayList<SessionCreditDetail> value) { this.Credits = 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; }
    }

    public static class SessionCreditDetail
    {
        public Integer ServiceId = null;
        public Integer SessionSizeId = null;
        public Integer ClassId = null;
        public String Name = null;
        public Integer Total = null;
        public Integer Available = null;
        public Integer StoreId = null;
        
        public Integer getServiceId() { return ServiceId; }
        public SessionCreditDetail setServiceId(Integer value) { this.ServiceId = value; return this; }
        public Integer getSessionSizeId() { return SessionSizeId; }
        public SessionCreditDetail setSessionSizeId(Integer value) { this.SessionSizeId = value; return this; }
        public Integer getClassId() { return ClassId; }
        public SessionCreditDetail setClassId(Integer value) { this.ClassId = value; return this; }
        public String getName() { return Name; }
        public SessionCreditDetail setName(String value) { this.Name = value; return this; }
        public Integer getTotal() { return Total; }
        public SessionCreditDetail setTotal(Integer value) { this.Total = value; return this; }
        public Integer getAvailable() { return Available; }
        public SessionCreditDetail setAvailable(Integer value) { this.Available = value; return this; }
        public Integer getStoreId() { return StoreId; }
        public SessionCreditDetail setStoreId(Integer value) { this.StoreId = value; return this; }
    }

}

Java CreditDetailRequest 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.

GET /scheduling/{UserId}/credit-detail HTTP/1.1 
Host: clubready.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CreditDetailResponse 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>
  <Credits xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">
    <SessionCreditDetail>
      <Available>0</Available>
      <ClassId>0</ClassId>
      <Name>String</Name>
      <ServiceId>0</ServiceId>
      <SessionSizeId>0</SessionSizeId>
      <StoreId>0</StoreId>
      <Total>0</Total>
    </SessionCreditDetail>
  </Credits>
  <TotalAvailable xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</TotalAvailable>
  <TotalPurchased xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</TotalPurchased>
</CreditDetailResponse>