View Javadoc
1   package org.oxerr.okcoin.rest.dto;
2   
3   import com.fasterxml.jackson.annotation.JsonProperty;
4   
5   public class OrderHistory extends ErrorResult {
6   
7   	private static final long serialVersionUID = 2015020701L;
8   
9   	/**
10  	 * 1 based.
11  	 */
12  	private final int currentPage;
13  
14  	private final int pageLength;
15  	private final int total;
16  	private final Order[] orders;
17  
18  	public OrderHistory(
19  		@JsonProperty("result") boolean result,
20  		@JsonProperty("current_page") int currentPage,
21  		@JsonProperty("page_length") int pageLength,
22  		@JsonProperty("total") int total,
23  		@JsonProperty("orders") Order[] orders) {
24  		super(result);
25  		this.currentPage = currentPage;
26  		this.pageLength = pageLength;
27  		this.total = total;
28  		this.orders = orders;
29  	}
30  
31  	/**
32  	 * Returns the current page number.
33  	 *
34  	 * @return the current page number.
35  	 */
36  	public int getCurrentPage() {
37  		return currentPage;
38  	}
39  
40  	/**
41  	 * Returns number of orders per page.
42  	 *
43  	 * @return number of orders per page.
44  	 */
45  	public int getPageLength() {
46  		return pageLength;
47  	}
48  
49  	public int getTotal() {
50  		return total;
51  	}
52  
53  	public Order[] getOrders() {
54  		return orders;
55  	}
56  
57  }