| 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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<FindRoundStats xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Greyhounds.WebApi.ServiceModel">
<CurrentPage>0</CurrentPage>
<PageSize>0</PageSize>
<PeriodFrom>0001-01-01T00:00:00</PeriodFrom>
<PeriodTo>0001-01-01T00:00:00</PeriodTo>
</FindRoundStats>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PaginatedResultOfRoundStatsHTcU5Hwp xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Greyhounds.ReadModel">
<CurrentPage>0</CurrentPage>
<Data>
<RoundStats>
<BalanceAmount>0</BalanceAmount>
<BalancePct>0</BalancePct>
<BetCount>0</BetCount>
<CanceledAmount>0</CanceledAmount>
<CanceledCount>0</CanceledCount>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<Id>String</Id>
<StakeAmount>0</StakeAmount>
<Status>Pending</Status>
<WinningsAmount>0</WinningsAmount>
</RoundStats>
</Data>
<PageSize>0</PageSize>
<TotalItems>0</TotalItems>
<TotalPages>0</TotalPages>
</PaginatedResultOfRoundStatsHTcU5Hwp>