| 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; }
}
}
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 /stimulations HTTP/1.1
Host: grh1.api.bettor.webhop.biz
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<FindStimulations 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>
<PrizeQry>String</PrizeQry>
<Status>Pending</Status>
<TargetQry>String</TargetQry>
</FindStimulations>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PaginatedResultOfStimulationHTcU5Hwp xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Greyhounds.ReadModel">
<CurrentPage>0</CurrentPage>
<Data>
<Stimulation>
<CancellationInfo>
<CanceledAt>0001-01-01T00:00:00</CanceledAt>
<CanceledBy>String</CanceledBy>
</CancellationInfo>
<ConfirmationInfo>
<AmountAwarded>0</AmountAwarded>
<BetId>String</BetId>
<ConfirmedAt>0001-01-01T00:00:00</ConfirmedAt>
<SlipId>String</SlipId>
</ConfirmationInfo>
<FailInfo>
<FailureCount>0</FailureCount>
<Failures xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</Failures>
<LastFailAt>0001-01-01T00:00:00</LastFailAt>
</FailInfo>
<Id>String</Id>
<Pool>
<Id>0</Id>
<Name>String</Name>
</Pool>
<ScheduledAt>0001-01-01T00:00:00</ScheduledAt>
<ScheduledBy>String</ScheduledBy>
<Status>Pending</Status>
<Target>
<Id>String</Id>
<Value>String</Value>
</Target>
</Stimulation>
</Data>
<PageSize>0</PageSize>
<TotalItems>0</TotalItems>
<TotalPages>0</TotalPages>
</PaginatedResultOfStimulationHTcU5Hwp>