Greyhounds.WebApi

<back to all web services

FindStimulations

The following routes are available for this service:
All Verbs/stimulations
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;

public class dtos
{

    public static class FindStimulations extends PaginatedQuery
    {
        public String targetQry = null;
        public String prizeQry = null;
        public StimulationStatus status = null;
        public Date periodFrom = null;
        public Date periodTo = null;
        
        public String getTargetQry() { return targetQry; }
        public FindStimulations setTargetQry(String value) { this.targetQry = value; return this; }
        public String getPrizeQry() { return prizeQry; }
        public FindStimulations setPrizeQry(String value) { this.prizeQry = value; return this; }
        public StimulationStatus getStatus() { return status; }
        public FindStimulations setStatus(StimulationStatus value) { this.status = value; return this; }
        public Date getPeriodFrom() { return periodFrom; }
        public FindStimulations setPeriodFrom(Date value) { this.periodFrom = value; return this; }
        public Date getPeriodTo() { return periodTo; }
        public FindStimulations setPeriodTo(Date value) { this.periodTo = value; return this; }
    }

    public static class PaginatedQuery
    {
        public Integer currentPage = null;
        public Integer pageSize = null;
        
        public Integer getCurrentPage() { return currentPage; }
        public PaginatedQuery setCurrentPage(Integer value) { this.currentPage = value; return this; }
        public Integer getPageSize() { return pageSize; }
        public PaginatedQuery setPageSize(Integer value) { this.pageSize = value; return this; }
    }

    public static enum StimulationStatus
    {
        @SerializedName("0") Pending(0),
        @SerializedName("1") Canceled(1),
        @SerializedName("2") Executed(2),
        @SerializedName("3") Rejected(3);

        private final int value;
        StimulationStatus(final int intValue) { value = intValue; }
        public int getValue() { return value; }
    }

    public static class PaginatedResult<T>
    {
        public ArrayList<RoundStats> data = null;
        public Integer currentPage = null;
        public Integer pageSize = null;
        public Integer totalItems = null;
        public Integer totalPages = null;
        
        public ArrayList<RoundStats> getData() { return data; }
        public PaginatedResult<T> setData(ArrayList<RoundStats> value) { this.data = value; return this; }
        public Integer getCurrentPage() { return currentPage; }
        public PaginatedResult<T> setCurrentPage(Integer value) { this.currentPage = value; return this; }
        public Integer getPageSize() { return pageSize; }
        public PaginatedResult<T> setPageSize(Integer value) { this.pageSize = value; return this; }
        public Integer getTotalItems() { return totalItems; }
        public PaginatedResult<T> setTotalItems(Integer value) { this.totalItems = value; return this; }
        public Integer getTotalPages() { return totalPages; }
        public PaginatedResult<T> setTotalPages(Integer value) { this.totalPages = value; return this; }
    }

    public static class RoundStats
    {
        public String id = null;
        public Date createdAt = null;
        public RoundStatus status = null;
        public Integer canceledCount = null;
        public BigDecimal canceledAmount = null;
        public Integer betCount = null;
        public BigDecimal stakeAmount = null;
        public BigDecimal winningsAmount = null;
        public BigDecimal balanceAmount = null;
        public BigDecimal balancePct = null;
        
        public String getId() { return id; }
        public RoundStats setId(String value) { this.id = value; return this; }
        public Date getCreatedAt() { return createdAt; }
        public RoundStats setCreatedAt(Date value) { this.createdAt = value; return this; }
        public RoundStatus getStatus() { return status; }
        public RoundStats setStatus(RoundStatus value) { this.status = value; return this; }
        public Integer getCanceledCount() { return canceledCount; }
        public RoundStats setCanceledCount(Integer value) { this.canceledCount = value; return this; }
        public BigDecimal getCanceledAmount() { return canceledAmount; }
        public RoundStats setCanceledAmount(BigDecimal value) { this.canceledAmount = value; return this; }
        public Integer getBetCount() { return betCount; }
        public RoundStats setBetCount(Integer value) { this.betCount = value; return this; }
        public BigDecimal getStakeAmount() { return stakeAmount; }
        public RoundStats setStakeAmount(BigDecimal value) { this.stakeAmount = value; return this; }
        public BigDecimal getWinningsAmount() { return winningsAmount; }
        public RoundStats setWinningsAmount(BigDecimal value) { this.winningsAmount = value; return this; }
        public BigDecimal getBalanceAmount() { return balanceAmount; }
        public RoundStats setBalanceAmount(BigDecimal value) { this.balanceAmount = value; return this; }
        public BigDecimal getBalancePct() { return balancePct; }
        public RoundStats setBalancePct(BigDecimal value) { this.balancePct = value; return this; }
    }

    public static enum RoundStatus
    {
        @SerializedName("0") Pending(0),
        @SerializedName("1") InProgress(1),
        @SerializedName("2") Ended(2);

        private final int value;
        RoundStatus(final int intValue) { value = intValue; }
        public int getValue() { return value; }
    }

}

Java FindStimulations DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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

POST /stimulations HTTP/1.1 
Host: grh1.api.bettor.webhop.biz 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	targetQry: String,
	prizeQry: String,
	status: 0,
	periodFrom: 0001-01-01,
	periodTo: 0001-01-01,
	currentPage: 0,
	pageSize: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	data: 
	[
		{
			id: String,
			scheduledAt: 0001-01-01,
			scheduledBy: String,
			target: 
			{
				id: String,
				value: String
			},
			pool: 
			{
				id: 0,
				name: String
			},
			cancellationInfo: 
			{
				canceledBy: String,
				canceledAt: 0001-01-01
			},
			confirmationInfo: 
			{
				confirmedAt: 0001-01-01,
				slipId: String,
				betId: String,
				amountAwarded: 0
			},
			status: 0,
			failInfo: 
			{
				failures: 
				{
					String: String
				},
				lastFailAt: 0001-01-01,
				failureCount: 0
			}
		}
	],
	currentPage: 0,
	pageSize: 0,
	totalItems: 0,
	totalPages: 0
}