This repository has been archived by the owner on Mar 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Takanori Takase
committed
Apr 1, 2018
1 parent
03f2c88
commit 788f5a1
Showing
10 changed files
with
985 additions
and
144 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
src/main/java/com/after_sunrise/cryptocurrency/cryptotrader/service/zaif/ZaifBalance.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.after_sunrise.cryptocurrency.cryptotrader.service.zaif; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.*; | ||
|
||
import java.math.BigDecimal; | ||
import java.time.Instant; | ||
import java.util.Map; | ||
|
||
/** | ||
* @author takanori.takase | ||
* @version 0.0.1 | ||
*/ | ||
@Getter | ||
@Builder | ||
@ToString | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class ZaifBalance { | ||
|
||
@SerializedName("funds") | ||
private Map<String, BigDecimal> funds; | ||
|
||
@SerializedName("deposits") | ||
private Map<String, BigDecimal> deposits; | ||
|
||
@SerializedName("rights") | ||
private Map<String, BigDecimal> rights; | ||
|
||
@SerializedName("open_orders") | ||
private Integer orders; | ||
|
||
@SerializedName("server_time") | ||
private Instant timestamp; | ||
|
||
@Getter | ||
@Builder | ||
@ToString | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
public static class Container { | ||
|
||
private static final Integer SUCCESS = 1; | ||
|
||
@SerializedName("success") | ||
private Integer status; | ||
|
||
@SerializedName("return") | ||
private ZaifBalance balance; | ||
|
||
public Boolean isSuccess() { | ||
return SUCCESS.equals(status) && balance != null; | ||
} | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.