GET | /club/visit-history | Return list of club visits, by club or entire chain. |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class ClubVisitHistoryRequest extends ClubVisitHistoryRequestDto 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;
/**
* Either StoreId or ChainId is required
*/
@ApiMember(DataType="integer", Description="Either StoreId or ChainId is required", Name="StoreId", ParameterType="query")
public Integer StoreId = null;
/**
* Either StoreId or ChainId is required
*/
@ApiMember(DataType="integer", Description="Either StoreId or ChainId is required", Name="ChainId", ParameterType="query")
public Integer ChainId = null;
/**
* UTC Format
*/
@ApiMember(DataType="date", Description="UTC Format", IsRequired=true, Name="FromDate", ParameterType="query")
public Date FromDate = null;
/**
* Max 24 Hours (UTC Format)
*/
@ApiMember(DataType="date", Description="Max 24 Hours (UTC Format)", IsRequired=true, Name="ToDate", ParameterType="query")
public Date ToDate = null;
public Integer RestrictedId = null;
public RestrictedResourceType RestrictedResourceType = null;
public String getApiKey() { return ApiKey; }
public ClubVisitHistoryRequest setApiKey(String value) { this.ApiKey = value; return this; }
public Integer getStoreId() { return StoreId; }
public ClubVisitHistoryRequest setStoreId(Integer value) { this.StoreId = value; return this; }
public Integer getChainId() { return ChainId; }
public ClubVisitHistoryRequest setChainId(Integer value) { this.ChainId = value; return this; }
public Date getFromDate() { return FromDate; }
public ClubVisitHistoryRequest setFromDate(Date value) { this.FromDate = value; return this; }
public Date getToDate() { return ToDate; }
public ClubVisitHistoryRequest setToDate(Date value) { this.ToDate = value; return this; }
public Integer getRestrictedId() { return RestrictedId; }
public ClubVisitHistoryRequest setRestrictedId(Integer value) { this.RestrictedId = value; return this; }
public RestrictedResourceType getRestrictedResourceType() { return RestrictedResourceType; }
public ClubVisitHistoryRequest setRestrictedResourceType(RestrictedResourceType value) { this.RestrictedResourceType = value; return this; }
}
public static class ClubVisitHistoryRequestDto extends ApiDtoBase
{
public Date FromDate = null;
public Date ToDate = null;
public Date getFromDate() { return FromDate; }
public ClubVisitHistoryRequestDto setFromDate(Date value) { this.FromDate = value; return this; }
public Date getToDate() { return ToDate; }
public ClubVisitHistoryRequestDto setToDate(Date value) { this.ToDate = 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 ClubVisitHistoryResponse extends ClubVisitHistoryResponseDto
{
public Boolean Success = null;
public String Message = null;
public Integer TotalVisits = null;
public ArrayList<ClubVisitHistoryItem> Visits = null;
public Boolean isSuccess() { return Success; }
public ClubVisitHistoryResponse setSuccess(Boolean value) { this.Success = value; return this; }
public String getMessage() { return Message; }
public ClubVisitHistoryResponse setMessage(String value) { this.Message = value; return this; }
public Integer getTotalVisits() { return TotalVisits; }
public ClubVisitHistoryResponse setTotalVisits(Integer value) { this.TotalVisits = value; return this; }
public ArrayList<ClubVisitHistoryItem> getVisits() { return Visits; }
public ClubVisitHistoryResponse setVisits(ArrayList<ClubVisitHistoryItem> value) { this.Visits = value; return this; }
}
public static class ClubVisitHistoryResponseDto extends ApiResponseBase
{
public Integer TotalVisits = null;
public ArrayList<ClubVisitHistoryItem> Visits = null;
public Integer getTotalVisits() { return TotalVisits; }
public ClubVisitHistoryResponseDto setTotalVisits(Integer value) { this.TotalVisits = value; return this; }
public ArrayList<ClubVisitHistoryItem> getVisits() { return Visits; }
public ClubVisitHistoryResponseDto setVisits(ArrayList<ClubVisitHistoryItem> value) { this.Visits = 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 ClubVisitHistoryItem
{
public Integer CheckinLogId = null;
public Integer UserId = null;
public String FirstName = null;
public String LastName = null;
public Integer CheckinStoreId = null;
public String CheckinLocationName = null;
public Integer HomeStoreId = null;
public String HomeStoreLocationName = null;
public Date UtcTime = null;
public Integer getCheckinLogId() { return CheckinLogId; }
public ClubVisitHistoryItem setCheckinLogId(Integer value) { this.CheckinLogId = value; return this; }
public Integer getUserId() { return UserId; }
public ClubVisitHistoryItem setUserId(Integer value) { this.UserId = value; return this; }
public String getFirstName() { return FirstName; }
public ClubVisitHistoryItem setFirstName(String value) { this.FirstName = value; return this; }
public String getLastName() { return LastName; }
public ClubVisitHistoryItem setLastName(String value) { this.LastName = value; return this; }
public Integer getCheckinStoreId() { return CheckinStoreId; }
public ClubVisitHistoryItem setCheckinStoreId(Integer value) { this.CheckinStoreId = value; return this; }
public String getCheckinLocationName() { return CheckinLocationName; }
public ClubVisitHistoryItem setCheckinLocationName(String value) { this.CheckinLocationName = value; return this; }
public Integer getHomeStoreId() { return HomeStoreId; }
public ClubVisitHistoryItem setHomeStoreId(Integer value) { this.HomeStoreId = value; return this; }
public String getHomeStoreLocationName() { return HomeStoreLocationName; }
public ClubVisitHistoryItem setHomeStoreLocationName(String value) { this.HomeStoreLocationName = value; return this; }
public Date getUtcTime() { return UtcTime; }
public ClubVisitHistoryItem setUtcTime(Date value) { this.UtcTime = value; return this; }
}
}
Java ClubVisitHistoryRequest 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.
GET /club/visit-history HTTP/1.1 Host: clubready.com Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Success":false,"Message":"String","TotalVisits":0,"Visits":[{"CheckinLogId":0,"UserId":0,"FirstName":"String","LastName":"String","CheckinStoreId":0,"CheckinLocationName":"String","HomeStoreId":0,"HomeStoreLocationName":"String","UtcTime":"0001-01-01T00:00:00.0000000"}]}