| POST | /bets/place |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class ReportBetPlacements
{
public RecordList<BetDto> betPlacements = null;
public RecordList<BetDto> getBetPlacements() { return betPlacements; }
public ReportBetPlacements setBetPlacements(RecordList<BetDto> value) { this.betPlacements = value; return this; }
}
public static class RecordList<T> extends ArrayList<T>
{
}
public static class BetDto extends TransactionDtoBase
{
public BigDecimal min_odds = null;
public BigDecimal max_odds = null;
public BigDecimal min_win = null;
public BigDecimal max_win = null;
public BigDecimal min_bonus = null;
public BigDecimal max_bonus = null;
public BigDecimal max_payout = null;
public BigDecimal promo_amount = null;
public String ticket_id = null;
public TicketDto ticket = null;
public BetType bet_type = null;
public BigDecimal getMinOdds() { return min_odds; }
public BetDto setMinOdds(BigDecimal value) { this.min_odds = value; return this; }
public BigDecimal getMaxOdds() { return max_odds; }
public BetDto setMaxOdds(BigDecimal value) { this.max_odds = value; return this; }
public BigDecimal getMinWin() { return min_win; }
public BetDto setMinWin(BigDecimal value) { this.min_win = value; return this; }
public BigDecimal getMaxWin() { return max_win; }
public BetDto setMaxWin(BigDecimal value) { this.max_win = value; return this; }
public BigDecimal getMinBonus() { return min_bonus; }
public BetDto setMinBonus(BigDecimal value) { this.min_bonus = value; return this; }
public BigDecimal getMaxBonus() { return max_bonus; }
public BetDto setMaxBonus(BigDecimal value) { this.max_bonus = value; return this; }
public BigDecimal getMaxPayout() { return max_payout; }
public BetDto setMaxPayout(BigDecimal value) { this.max_payout = value; return this; }
public BigDecimal getPromoAmount() { return promo_amount; }
public BetDto setPromoAmount(BigDecimal value) { this.promo_amount = value; return this; }
public String getTicketId() { return ticket_id; }
public BetDto setTicketId(String value) { this.ticket_id = value; return this; }
public TicketDto getTicket() { return ticket; }
public BetDto setTicket(TicketDto value) { this.ticket = value; return this; }
public BetType getBetType() { return bet_type; }
public BetDto setBetType(BetType value) { this.bet_type = value; return this; }
}
public static class TransactionDtoBase
{
public String transaction_id = null;
public Date transaction_time = null;
public BigDecimal transaction_amount = null;
public String game_name = null;
public String betting_place_id = null;
public String betting_terminal_id = null;
public String jmbg = null;
public String passport_number = null;
public BetSource source = null;
public String identification_document_country = null;
public String identification_document_type = null;
public String getTransactionId() { return transaction_id; }
public TransactionDtoBase setTransactionId(String value) { this.transaction_id = value; return this; }
public Date getTransactionTime() { return transaction_time; }
public TransactionDtoBase setTransactionTime(Date value) { this.transaction_time = value; return this; }
public BigDecimal getTransactionAmount() { return transaction_amount; }
public TransactionDtoBase setTransactionAmount(BigDecimal value) { this.transaction_amount = value; return this; }
public String getGameName() { return game_name; }
public TransactionDtoBase setGameName(String value) { this.game_name = value; return this; }
public String getBettingPlaceId() { return betting_place_id; }
public TransactionDtoBase setBettingPlaceId(String value) { this.betting_place_id = value; return this; }
public String getBettingTerminalId() { return betting_terminal_id; }
public TransactionDtoBase setBettingTerminalId(String value) { this.betting_terminal_id = value; return this; }
public String getJmbg() { return jmbg; }
public TransactionDtoBase setJmbg(String value) { this.jmbg = value; return this; }
public String getPassportNumber() { return passport_number; }
public TransactionDtoBase setPassportNumber(String value) { this.passport_number = value; return this; }
public BetSource getSource() { return source; }
public TransactionDtoBase setSource(BetSource value) { this.source = value; return this; }
public String getIdentificationDocumentCountry() { return identification_document_country; }
public TransactionDtoBase setIdentificationDocumentCountry(String value) { this.identification_document_country = value; return this; }
public String getIdentificationDocumentType() { return identification_document_type; }
public TransactionDtoBase setIdentificationDocumentType(String value) { this.identification_document_type = value; return this; }
}
public static enum BetSource
{
@SerializedName("0") Landbase(0),
@SerializedName("1") Web(1);
private final int value;
BetSource(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static class TicketDto
{
public String sy = null;
public Integer nc = null;
public BigDecimal ac = null;
public RecordList<RecordList<IBetEvent>> e = null;
public String getSy() { return sy; }
public TicketDto setSy(String value) { this.sy = value; return this; }
public Integer getNc() { return nc; }
public TicketDto setNc(Integer value) { this.nc = value; return this; }
public BigDecimal getAc() { return ac; }
public TicketDto setAc(BigDecimal value) { this.ac = value; return this; }
public RecordList<RecordList<IBetEvent>> getE() { return e; }
public TicketDto setE(RecordList<RecordList<IBetEvent>> value) { this.e = value; return this; }
}
public static enum BetType
{
@SerializedName("0") Real(0),
@SerializedName("1") Promo(1);
private final int value;
BetType(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 /bets/place HTTP/1.1
Host: api.sbbet-prod-mnta.webhop.biz
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ReportBetPlacements xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Starnet.MontenegroTaxationAuthority.WebApi.ServiceModel">
<BetPlacements xmlns:d2p1="http://schemas.datacontract.org/2004/07/Starnet.MontenegroTaxationAuthority.Common">
<d2p1:BetDto>
<d2p1:betting_place_id>String</d2p1:betting_place_id>
<d2p1:betting_terminal_id>String</d2p1:betting_terminal_id>
<d2p1:game_name>String</d2p1:game_name>
<d2p1:identification_document_country>String</d2p1:identification_document_country>
<d2p1:identification_document_type>String</d2p1:identification_document_type>
<d2p1:jmbg>String</d2p1:jmbg>
<d2p1:passport_number>String</d2p1:passport_number>
<d2p1:source>Landbase</d2p1:source>
<d2p1:transaction_amount>0</d2p1:transaction_amount>
<d2p1:transaction_id>String</d2p1:transaction_id>
<d2p1:transaction_time>0001-01-01T00:00:00</d2p1:transaction_time>
<d2p1:bet_type>Real</d2p1:bet_type>
<d2p1:max_bonus>0</d2p1:max_bonus>
<d2p1:max_odds>0</d2p1:max_odds>
<d2p1:max_payout>0</d2p1:max_payout>
<d2p1:max_win>0</d2p1:max_win>
<d2p1:min_bonus>0</d2p1:min_bonus>
<d2p1:min_odds>0</d2p1:min_odds>
<d2p1:min_win>0</d2p1:min_win>
<d2p1:promo_amount>0</d2p1:promo_amount>
<d2p1:ticket>
<d2p1:ac>0</d2p1:ac>
<d2p1:e xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:ArrayOfanyType>
<d5p1:anyType i:nil="true" />
</d5p1:ArrayOfanyType>
</d2p1:e>
<d2p1:nc>0</d2p1:nc>
<d2p1:sy>String</d2p1:sy>
</d2p1:ticket>
<d2p1:ticket_id>String</d2p1:ticket_id>
</d2p1:BetDto>
</BetPlacements>
</ReportBetPlacements>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ResponseStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
<ErrorCode>String</ErrorCode>
<Message>String</Message>
<StackTrace>String</StackTrace>
<Errors>
<ResponseError>
<ErrorCode>String</ErrorCode>
<FieldName>String</FieldName>
<Message>String</Message>
<Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</Meta>
</ResponseError>
</Errors>
<Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringstring>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value>String</d2p1:Value>
</d2p1:KeyValueOfstringstring>
</Meta>
</ResponseStatus>