public void setError(String value) { if (value != null) { throw new ExceptionalReturnContentException(value); } } }
public LivecoinBaseResponse(@JsonProperty("success") Boolean success) { if (success != null && !success) { throw new ExceptionalReturnContentException("Success set to false in response"); } } }
public WithdrawalResponse( @JsonProperty("response") String response, @JsonProperty("error") String error) { if (error != null) { throw new ExceptionalReturnContentException("Error returned: " + error); } this.response = response; }
public TransferResponse( @JsonProperty("success") int success, @JsonProperty("message") String message) { if (success != 1) { throw new ExceptionalReturnContentException("Error returned: " + success); } this.message = message; }
public BithumbResponse( @JsonProperty("status") String status, @JsonProperty("message") String message, @JsonProperty("data") D data) { if (!StringUtils.equals(status, "0000")) { throw new ExceptionalReturnContentException(message); } this.status = status; this.message = message; this.data = data; }
public BittrexBaseResponse( @JsonProperty("success") Boolean success, @JsonProperty("message") String message, @JsonProperty("result") T result) { if (!success) { throw new ExceptionalReturnContentException(message); } this.result = result; }
@JsonCreator public PoloniexTradeResponse( @JsonProperty("orderNumber") Long orderNumber, @JsonProperty("resultingTrades") List<PoloniexPublicTrade> resultingTrades, @JsonProperty("amountUnfilled") BigDecimal amountUnfilled) { if (orderNumber == null) { throw new ExceptionalReturnContentException("No trade data in response"); } this.orderNumber = orderNumber; this.resultingTrades = resultingTrades; this.amountUnfilled = amountUnfilled; }
@JsonCreator public PoloniexMoveResponse( @JsonProperty("success") Boolean success, @JsonProperty("orderNumber") Long orderNumber, @JsonProperty("resultingTrades") Map<String, List<PoloniexPublicTrade>> resultingTrades) { if (orderNumber == null) { throw new ExceptionalReturnContentException("No trade data in response"); } this.success = success; this.orderNumber = orderNumber; this.resultingTrades = resultingTrades; }
protected BTCMarketsBaseResponse( @JsonProperty("success") Boolean success, @JsonProperty("errorMessage") String errorMessage, @JsonProperty("errorCode") Integer errorCode) { if (!Objects.equals(success, Boolean.TRUE)) { throw new ExceptionalReturnContentException(errorMessage); } this.success = success; this.errorMessage = errorMessage; this.errorCode = errorCode; }
@JsonCreator public CryptopiaBaseResponse( @JsonProperty("Success") boolean success, @JsonProperty("Message") String message, @JsonProperty("Data") T data, @JsonProperty("Error") String error) { if (!success) { throw new ExceptionalReturnContentException("Success set to false in response"); } if (StringUtils.isNotEmpty(error)) { throw new ExceptionalReturnContentException("Error field not empty in repsonse"); } this.message = message; this.data = data; }
/** * Constructor * * @param timestamp * @param bids * @param asks */ public BitsoOrderBook( @JsonProperty("timestamp") Long timestamp, @JsonProperty("bids") List<List<BigDecimal>> bids, @JsonProperty("asks") List<List<BigDecimal>> asks) { if (asks == null) { throw new ExceptionalReturnContentException("No asks in response."); } this.bids = bids; this.asks = asks; this.timestamp = timestamp; }
/** * Constructor * * @param timestamp * @param bids * @param asks */ public QuadrigaCxOrderBook( @JsonProperty("timestamp") Long timestamp, @JsonProperty("bids") List<List<BigDecimal>> bids, @JsonProperty("asks") List<List<BigDecimal>> asks) { if (asks == null) { throw new ExceptionalReturnContentException("No asks in response."); } this.bids = bids; this.asks = asks; this.timestamp = timestamp; }
public QuadrigaCxTicker( @JsonProperty("last") BigDecimal last, @JsonProperty("high") BigDecimal high, @JsonProperty("low") BigDecimal low, @JsonProperty("vwap") BigDecimal vwap, @JsonProperty("volume") BigDecimal volume, @JsonProperty("bid") BigDecimal bid, @JsonProperty("ask") BigDecimal ask, @JsonProperty("timestamp") @JsonDeserialize(using = TimestampDeserializer.class) Date timestamp) { if (last == null) { throw new ExceptionalReturnContentException("No last in response."); } this.last = last; this.high = high; this.low = low; this.vwap = vwap; this.volume = volume; this.bid = bid; this.ask = ask; this.timestamp = timestamp; }
public BitsoTicker( @JsonProperty("last") BigDecimal last, @JsonProperty("high") BigDecimal high, @JsonProperty("low") BigDecimal low, @JsonProperty("vwap") BigDecimal vwap, @JsonProperty("volume") BigDecimal volume, @JsonProperty("bid") BigDecimal bid, @JsonProperty("ask") BigDecimal ask, @JsonProperty("timestamp") @JsonDeserialize(using = TimestampDeserializer.class) Date timestamp) { if (last == null) { throw new ExceptionalReturnContentException("No last in response."); } this.last = last; this.high = high; this.low = low; this.vwap = vwap; this.volume = volume; this.bid = bid; this.ask = ask; this.timestamp = timestamp; }
public BitstampOrder( @JsonProperty("status") String status, @JsonProperty("reason") Object reason, @JsonProperty("id") long id, @JsonProperty("datetime") String datetime, @JsonProperty("type") int type, @JsonProperty("price") BigDecimal price, @JsonProperty("amount") BigDecimal amount, @JsonProperty("error") @JsonDeserialize(using = BitstampErrorDeserializer.class) String errorMessage) { if ("error".equals(status)) { throw new ExceptionalReturnContentException(String.valueOf(reason)); } this.id = id; this.datetime = BitstampUtils.parseDate(datetime); this.type = type; this.price = price; this.amount = amount; this.errorMessage = errorMessage; }
public CryptonitOrder( @JsonProperty("status") String status, @JsonProperty("reason") Object reason, @JsonProperty("id") int id, @JsonProperty("datetime") String datetime, @JsonProperty("type") int type, @JsonProperty("price") BigDecimal price, @JsonProperty("amount") BigDecimal amount, @JsonProperty("error") @JsonDeserialize(using = CryptonitErrorDeserializer.class) String errorMessage) { if ("error".equals(status)) { throw new ExceptionalReturnContentException(String.valueOf(reason)); } this.id = id; this.datetime = CryptonitUtils.parseDate(datetime); this.type = type; this.price = price; this.amount = amount; this.errorMessage = errorMessage; }
public BTCMarketsCancelOrderResponse( @JsonProperty("success") Boolean success, @JsonProperty("errorMessage") String errorMessage, @JsonProperty("errorCode") Integer errorCode, @JsonProperty("responses") List<BTCMarketsException> responses) { super(success, errorMessage, errorCode); if (responses != null) { for (BTCMarketsException response : responses) { if (!Boolean.TRUE.equals(response.getSuccess())) { throw new ExceptionalReturnContentException( String.format( "%s: order %d: %s", errorMessage, response.getId(), response.getMessage())); } } } } }
public GatecoinResult(@JsonProperty("responseStatus") ResponseStatus responseStatus) { if (responseStatus.getErrorCode() != null || (responseStatus.getMessage() != null && !responseStatus.getMessage().equals("OK"))) { throw new ExceptionalReturnContentException(responseStatus.toString()); } this.responseStatus = responseStatus; }
protected TaurusBaseResponse(Object error) { if (error != null) { throw new ExceptionalReturnContentException("Error returned: " + error); } } }
public TransferResponse( @JsonProperty("success") int success, @JsonProperty("message") String message) { if (success != 1) { throw new ExceptionalReturnContentException("Error returned: " + success); } this.message = message; }