ClubReady Api

<back to all web services

PackageEligibilityRequest

The following routes are available for this service:
GET/sales/members/{MemberId}/package-eligibilityFind out is a user is eligible to purchase a certain package.
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

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

        /**
        * ID of the member to lookup
        */
        @ApiMember(DataType="integer", Description="ID of the member to lookup", IsRequired=true, Name="MemberId", ParameterType="path")
        public Integer MemberId = null;

        /**
        * ID of the package to check
        */
        @ApiMember(DataType="integer", Description="ID of the package to check", IsRequired=true, Name="PackageId", ParameterType="query")
        public Integer PackageId = null;

        public Integer RestrictedId = null;
        public RestrictedResourceType RestrictedResourceType = null;
        
        public String getApiKey() { return ApiKey; }
        public PackageEligibilityRequest setApiKey(String value) { this.ApiKey = value; return this; }
        public Integer getStoreId() { return StoreId; }
        public PackageEligibilityRequest setStoreId(Integer value) { this.StoreId = value; return this; }
        public Integer getMemberId() { return MemberId; }
        public PackageEligibilityRequest setMemberId(Integer value) { this.MemberId = value; return this; }
        public Integer getPackageId() { return PackageId; }
        public PackageEligibilityRequest setPackageId(Integer value) { this.PackageId = value; return this; }
        public Integer getRestrictedId() { return RestrictedId; }
        public PackageEligibilityRequest setRestrictedId(Integer value) { this.RestrictedId = value; return this; }
        public RestrictedResourceType getRestrictedResourceType() { return RestrictedResourceType; }
        public PackageEligibilityRequest setRestrictedResourceType(RestrictedResourceType value) { this.RestrictedResourceType = value; return this; }
    }

    public static class PackageEligibilityRequestDto extends ApiDtoBase
    {
        public Integer PackageId = null;
        public Integer MemberId = null;
        
        public Integer getPackageId() { return PackageId; }
        public PackageEligibilityRequestDto setPackageId(Integer value) { this.PackageId = value; return this; }
        public Integer getMemberId() { return MemberId; }
        public PackageEligibilityRequestDto setMemberId(Integer value) { this.MemberId = 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 PackageEligibilityResponse extends PackageEligibilityResponseDto
    {
        public PackageEligibility EligibilityInfo = null;
        
        public PackageEligibility getEligibilityInfo() { return EligibilityInfo; }
        public PackageEligibilityResponse setEligibilityInfo(PackageEligibility value) { this.EligibilityInfo = value; return this; }
    }

    public static class PackageEligibilityResponseDto extends ApiResponseBase
    {
        public PackageEligibility EligibilityInfo = null;
        
        public PackageEligibility getEligibilityInfo() { return EligibilityInfo; }
        public PackageEligibilityResponseDto setEligibilityInfo(PackageEligibility value) { this.EligibilityInfo = 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 PackageEligibility
    {
        public Boolean IsEligible = null;
        public ArrayList<PackageEligibilityItem> Eligibility = null;
        
        public Boolean getIsEligible() { return IsEligible; }
        public PackageEligibility setIsEligible(Boolean value) { this.IsEligible = value; return this; }
        public ArrayList<PackageEligibilityItem> getEligibility() { return Eligibility; }
        public PackageEligibility setEligibility(ArrayList<PackageEligibilityItem> value) { this.Eligibility = value; return this; }
    }

    public static class PackageEligibilityItem
    {
        public String Name = null;
        public String Value = null;
        public Boolean IsEligible = null;
        public String Message = null;
        
        public String getName() { return Name; }
        public PackageEligibilityItem setName(String value) { this.Name = value; return this; }
        public String getValue() { return Value; }
        public PackageEligibilityItem setValue(String value) { this.Value = value; return this; }
        public Boolean getIsEligible() { return IsEligible; }
        public PackageEligibilityItem setIsEligible(Boolean value) { this.IsEligible = value; return this; }
        public String getMessage() { return Message; }
        public PackageEligibilityItem setMessage(String value) { this.Message = value; return this; }
    }

}

Java PackageEligibilityRequest 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

HTTP + JSON

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

GET /sales/members/{MemberId}/package-eligibility HTTP/1.1 
Host: clubready.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"EligibilityInfo":{"IsEligible":false,"Eligibility":[{"Name":"String","Value":"String","IsEligible":false,"Message":"String"}]},"Success":false,"Message":"String"}