| POST | /cmd/pool-transaction/request |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class RequestPoolTransaction
{
public String id = null;
public PoolTransaction transaction = null;
public String getId() { return id; }
public RequestPoolTransaction setId(String value) { this.id = value; return this; }
public PoolTransaction getTransaction() { return transaction; }
public RequestPoolTransaction setTransaction(PoolTransaction value) { this.transaction = value; return this; }
}
public static class PoolTransaction
{
public PoolRef source = null;
public PoolRef destination = null;
public BigDecimal amount = null;
public PoolRef getSource() { return source; }
public PoolTransaction setSource(PoolRef value) { this.source = value; return this; }
public PoolRef getDestination() { return destination; }
public PoolTransaction setDestination(PoolRef value) { this.destination = value; return this; }
public BigDecimal getAmount() { return amount; }
public PoolTransaction setAmount(BigDecimal value) { this.amount = value; return this; }
}
public static class PoolRef
{
public Integer id = null;
public String name = null;
public Integer getId() { return id; }
public PoolRef setId(Integer value) { this.id = value; return this; }
public String getName() { return name; }
public PoolRef setName(String value) { this.name = value; return this; }
}
}
Java RequestPoolTransaction DTOs
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 /cmd/pool-transaction/request HTTP/1.1
Host: s4w1.api.bettor.webhop.biz
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
id: String,
transaction:
{
source:
{
id: 0,
name: String
},
destination:
{
id: 0,
name: String
},
amount: 0
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}