View Javadoc
1   package org.oxerr.okcoin.rest.dto;
2   
3   import java.math.BigDecimal;
4   import java.time.Instant;
5   
6   import org.oxerr.okcoin.rest.dto.deserializer.EpochMilliDeserializer;
7   import org.oxerr.okcoin.rest.dto.deserializer.StatusDeserializer;
8   
9   import com.fasterxml.jackson.annotation.JsonProperty;
10  import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
11  
12  public class BorrowOrder extends BaseObject {
13  
14  	private static final long serialVersionUID = 2015022001L;
15  
16  	private final BigDecimal amount;
17  	private final long borrowId;
18  	private final Instant borrowDate;
19  	private final int days;
20  	private final BigDecimal dealAmount;
21  	private final BigDecimal rate;
22  	private final Status status;
23  	private final String symbol;
24  
25  	public BorrowOrder(
26  		@JsonProperty("amount") BigDecimal amount,
27  		@JsonProperty("borrow_date")
28  		@JsonDeserialize(using = EpochMilliDeserializer.class)
29  		Instant borrowDate,
30  		@JsonProperty("borrow_id") long borrowId,
31  		@JsonProperty("days") int days,
32  		@JsonProperty("deal_amount") BigDecimal dealAmount,
33  		@JsonProperty("rate") BigDecimal rate,
34  		@JsonProperty("status")
35  		@JsonDeserialize(using = StatusDeserializer.class)
36  		Status status,
37  		@JsonProperty("symbol") String symbol) {
38  		this.borrowId = borrowId;
39  		this.amount = amount;
40  		this.borrowDate = borrowDate;
41  		this.days = days;
42  		this.dealAmount = dealAmount;
43  		this.rate = rate;
44  		this.status = status;
45  		this.symbol = symbol;
46  	}
47  
48  	public BigDecimal getAmount() {
49  		return amount;
50  	}
51  
52  	public Instant getBorrowDate() {
53  		return borrowDate;
54  	}
55  
56  	public long getBorrowId() {
57  		return borrowId;
58  	}
59  
60  	public int getDays() {
61  		return days;
62  	}
63  
64  	public BigDecimal getDealAmount() {
65  		return dealAmount;
66  	}
67  
68  	public BigDecimal getRate() {
69  		return rate;
70  	}
71  
72  	public Status getStatus() {
73  		return status;
74  	}
75  
76  	public String getSymbol() {
77  		return symbol;
78  	}
79  
80  }