| All Verbs | /rounds/stats |
|---|
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 FindRoundStats
{
public Date periodFrom = null;
public Date periodTo = null;
public Integer currentPage = null;
public Integer pageSize = null;
public Date getPeriodFrom() { return periodFrom; }
public FindRoundStats setPeriodFrom(Date value) { this.periodFrom = value; return this; }
public Date getPeriodTo() { return periodTo; }
public FindRoundStats setPeriodTo(Date value) { this.periodTo = value; return this; }
public Integer getCurrentPage() { return currentPage; }
public FindRoundStats setCurrentPage(Integer value) { this.currentPage = value; return this; }
public Integer getPageSize() { return pageSize; }
public FindRoundStats setPageSize(Integer value) { this.pageSize = value; return this; }
}
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; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /rounds/stats HTTP/1.1
Host: grh1.api.bettor.webhop.biz
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
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,
createdAt: 0001-01-01,
status: 0,
canceledCount: 0,
canceledAmount: 0,
betCount: 0,
stakeAmount: 0,
winningsAmount: 0,
balanceAmount: 0,
balancePct: 0
}
],
currentPage: 0,
pageSize: 0,
totalItems: 0,
totalPages: 0
}