GET | /users/date-added | List of users added in a certain date range. |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class UserListDateAddedRequest extends UserListDateAddedRequestDto 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;
/**
* 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 UserListDateAddedRequest setApiKey(String value) { this.ApiKey = value; return this; }
public Integer getChainId() { return ChainId; }
public UserListDateAddedRequest setChainId(Integer value) { this.ChainId = value; return this; }
public Integer getStoreId() { return StoreId; }
public UserListDateAddedRequest setStoreId(Integer value) { this.StoreId = value; return this; }
public Date getFromDate() { return FromDate; }
public UserListDateAddedRequest setFromDate(Date value) { this.FromDate = value; return this; }
public Date getToDate() { return ToDate; }
public UserListDateAddedRequest setToDate(Date value) { this.ToDate = value; return this; }
public Integer getRestrictedId() { return RestrictedId; }
public UserListDateAddedRequest setRestrictedId(Integer value) { this.RestrictedId = value; return this; }
public RestrictedResourceType getRestrictedResourceType() { return RestrictedResourceType; }
public UserListDateAddedRequest setRestrictedResourceType(RestrictedResourceType value) { this.RestrictedResourceType = value; return this; }
}
public static class UserListDateAddedRequestDto extends ApiDtoBase
{
public Date FromDate = null;
public Date ToDate = null;
public Date getFromDate() { return FromDate; }
public UserListDateAddedRequestDto setFromDate(Date value) { this.FromDate = value; return this; }
public Date getToDate() { return ToDate; }
public UserListDateAddedRequestDto 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 UserListDateAddedResponse extends UserListDateAddedResponseDto
{
public ArrayList<ClubClient> Users = null;
public ArrayList<ClubClient> getUsers() { return Users; }
public UserListDateAddedResponse setUsers(ArrayList<ClubClient> value) { this.Users = value; return this; }
}
public static class UserListDateAddedResponseDto
{
public ArrayList<ClubClient> Users = null;
public ArrayList<ClubClient> getUsers() { return Users; }
public UserListDateAddedResponseDto setUsers(ArrayList<ClubClient> value) { this.Users = value; return this; }
}
public static class ClubClient
{
public Integer UserId = null;
public String Username = null;
public String FirstName = null;
public String LastName = null;
public Integer StoreId = null;
public Date DateAdded = null;
public Integer ReferredBy = null;
public Integer AddedBy = null;
public Integer ReferralTypeId = null;
public String ReferralTypeName = null;
public Integer getUserId() { return UserId; }
public ClubClient setUserId(Integer value) { this.UserId = value; return this; }
public String getUsername() { return Username; }
public ClubClient setUsername(String value) { this.Username = value; return this; }
public String getFirstName() { return FirstName; }
public ClubClient setFirstName(String value) { this.FirstName = value; return this; }
public String getLastName() { return LastName; }
public ClubClient setLastName(String value) { this.LastName = value; return this; }
public Integer getStoreId() { return StoreId; }
public ClubClient setStoreId(Integer value) { this.StoreId = value; return this; }
public Date getDateAdded() { return DateAdded; }
public ClubClient setDateAdded(Date value) { this.DateAdded = value; return this; }
public Integer getReferredBy() { return ReferredBy; }
public ClubClient setReferredBy(Integer value) { this.ReferredBy = value; return this; }
public Integer getAddedBy() { return AddedBy; }
public ClubClient setAddedBy(Integer value) { this.AddedBy = value; return this; }
public Integer getReferralTypeId() { return ReferralTypeId; }
public ClubClient setReferralTypeId(Integer value) { this.ReferralTypeId = value; return this; }
public String getReferralTypeName() { return ReferralTypeName; }
public ClubClient setReferralTypeName(String value) { this.ReferralTypeName = value; return this; }
}
}
Java UserListDateAddedRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /users/date-added HTTP/1.1 Host: clubready.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <UserListDateAddedResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Members.Model"> <Users xmlns:d2p1="http://schemas.datacontract.org/2004/07/ClubReady.Core.Users.Models" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models"> <d2p1:ClubClient> <d2p1:AddedBy>0</d2p1:AddedBy> <d2p1:DateAdded>0001-01-01T00:00:00</d2p1:DateAdded> <d2p1:FirstName>String</d2p1:FirstName> <d2p1:LastName>String</d2p1:LastName> <d2p1:ReferralTypeId>0</d2p1:ReferralTypeId> <d2p1:ReferralTypeName>String</d2p1:ReferralTypeName> <d2p1:ReferredBy>0</d2p1:ReferredBy> <d2p1:StoreId>0</d2p1:StoreId> <d2p1:UserId>0</d2p1:UserId> <d2p1:Username>String</d2p1:Username> </d2p1:ClubClient> </Users> </UserListDateAddedResponse>