|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gbanga.api.Event
org.gbanga.api.Trade
public class Trade
A trade is a deal between two parties.
For the JSON object serialization, the field names are used. Eg.
{
partner: { name: "some name" },
offerings: [
{ id: 4343 },
{ id: 3422 }
]
}
Fields annotated with PrimaryKey are used, if not the whole object is sent. HideIfNull indicates that the field is not sent at all, if the value is not set.
| Nested Class Summary | |
|---|---|
static class |
Trade.TradeItem
A container class for general items used in a trade. |
| Field Summary | |
|---|---|
static java.lang.String |
ABORTED
The Event.partner has declined the trade |
static java.lang.String |
ACCEPTED
The Event.partner has accepted the trade |
static java.lang.String |
OFFERED
Offering and request have been sent to Event.partner |
Trade.TradeItem[] |
offerings
The items currently included in the offer that would go to the Event.partner |
static java.lang.String |
PREPARING
The trade is to be started (initial phase where offerings are being prepared) |
Trade.TradeItem[] |
requests
Items requested from the Event.partner's Pocket |
java.lang.String |
state
State this trade is in |
int |
type
The type of a Trade Event. |
| Fields inherited from class org.gbanga.api.Event |
|---|
booleanParameters, cell, CELL_DISCOVERED, CHALLENGE, CHAT_MESSAGE_RECEIVED, CONVERSATION, CONVERSATION_MESSAGE_RECEIVED, FRIEND_BROKE, gbangoo, GBANGOO_DROPPED, GBANGOO_LIFTED, GIFT_IN_POCKET_RECEIVED, id, infrastructure, longParameters, partner, player, PLAYER_ARRIVED, PLAYER_LEFT, POCKET_ITEM_LOST, PUZZLE_COMPLETED, resource, shortParameters, SHOUT_MESSAGE_RECEIVED, stringParameters, t, tag, TAG_CODE_ENTERED, tile, TRADE, TRADE_OFFER_RECEIVED, UNKNOWN, VISIT |
| Constructor Summary | |
|---|---|
Trade()
Creates a new Trade object. |
|
| Method Summary |
|---|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ABORTED
Event.partner has declined the trade
public static final java.lang.String ACCEPTED
Event.partner has accepted the trade
public static final java.lang.String OFFERED
Event.partner
public Trade.TradeItem[] offerings
Event.partner
public static final java.lang.String PREPARING
public Trade.TradeItem[] requests
Event.partner's Pocket
public java.lang.String state
PREPARING,
OFFERED,
ACCEPTED,
ABORTED@PrimaryKey public int type
Trade Event.
| Constructor Detail |
|---|
public Trade()
Trade object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||