View Javadoc
1   package org.oxerr.okcoin.rest.dto;
2   
3   import com.fasterxml.jackson.annotation.JsonProperty;
4   
5   public class BatchTradeResult extends ErrorResult {
6   
7   	private static final long serialVersionUID = 2015020501L;
8   
9   	private final OrderInfo[] orderInfo;
10  
11  	/**
12  	 * @param result true indicates order successfully placed.
13  	 * Return true if any one order is placed successfully.
14  	 * @param orderInfo order info.
15  	 */
16  	public BatchTradeResult(
17  		@JsonProperty("result") boolean result,
18  		@JsonProperty("order_info") OrderInfo[] orderInfo
19  	) {
20  		super(result);
21  		this.orderInfo = orderInfo;
22  	}
23  
24  	public OrderInfo[] getOrderInfo() {
25  		return orderInfo;
26  	}
27  
28  	public static class OrderInfo extends BaseObject {
29  		private static final long serialVersionUID = 2015020501L;
30  
31  		private final Integer errorCode;
32  
33  		private final long orderId;
34  
35  		/**
36  		 * @param errorCode error code.
37  		 * @param orderId order ID
38  		 */
39  		public OrderInfo(
40  			@JsonProperty("error_code") Integer errorCode,
41  			@JsonProperty("order_id") long orderId) {
42  			this.errorCode = errorCode;
43  			this.orderId = orderId;
44  		}
45  
46  		public Integer getErrorCode() {
47  			return errorCode;
48  		}
49  
50  		public long getOrderId() {
51  			return orderId;
52  		}
53  
54  	}
55  
56  }