package com.xeiam.xchange.cexio.dto.account;

import java.text.MessageFormat;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Author: brox
 * Since: 2/7/14
 */
public class CexIOBalanceInfo {

  private final String error;
  private final long timestamp;
  private final String username;
  private final CexIOBalance balanceBTC;
  private final CexIOBalance balanceLTC;
  private final CexIOBalance balanceNMC;
  private final CexIOBalance balanceIXC;
  private final CexIOBalance balanceDVC;
  private final CexIOBalance balanceGHS;

  /**
   * Constructor
   * 
   * @param error
   * @param timestamp The server time (Unix time)
   * @param username
   * @param balanceBTC
   * @param balanceNMC
   * @param balanceIXC
   * @param balanceDVC
   * @param balanceGHS
   */
  public CexIOBalanceInfo(@JsonProperty("error") String error, @JsonProperty("timestamp") long timestamp, @JsonProperty("username") String username, @JsonProperty("BTC") CexIOBalance balanceBTC,
      @JsonProperty("LTC") CexIOBalance balanceLTC, @JsonProperty("NMC") CexIOBalance balanceNMC, @JsonProperty("IXC") CexIOBalance balanceIXC, @JsonProperty("DVC") CexIOBalance balanceDVC,
      @JsonProperty("GHS") CexIOBalance balanceGHS) {

    this.error = error;
    this.timestamp = timestamp;
    this.username = username;
    this.balanceBTC = balanceBTC;
    this.balanceLTC = balanceLTC;
    this.balanceNMC = balanceNMC;
    this.balanceIXC = balanceIXC;
    this.balanceDVC = balanceDVC;
    this.balanceGHS = balanceGHS;
  }

  public String getError() {

    return error;
  }

  public long getTimestamp() {

    return timestamp;
  }

  public String getUsername() {

    return username;
  }

  public CexIOBalance getBalanceBTC() {

    return balanceBTC;
  }

  public CexIOBalance getBalanceLTC() {

    return balanceLTC;
  }

  public CexIOBalance getBalanceNMC() {

    return balanceNMC;
  }

  public CexIOBalance getBalanceIXC() {

    return balanceIXC;
  }

  public CexIOBalance getBalanceDVC() {

    return balanceDVC;
  }

  public CexIOBalance getBalanceGHS() {

    return balanceGHS;
  }

  @Override
  public String toString() {

    return MessageFormat.format("CexIOBalanceInfo[error={0}, timestamp={1}, username={2}, BTC={3}, LTC={4}, NMC={5}, IXC={6}, DVC={7}, GHS={8}]", error, timestamp, username, balanceBTC, balanceLTC,
        balanceNMC, balanceIXC, balanceDVC, balanceGHS);
  }

}

@@ -541,16 +541,98 @@
 anceGHS;
+%0A  private final CexIOBalance balanceUSD;%0A  private final CexIOBalance balanceDRK;
 %0A%0A  /**%0A
@@ -858,16 +858,62 @@
 anceGHS%0A
+   * @param balanceUSD%0A   * @param balanceDRK%0A
    */%0A  
@@ -1345,16 +1345,108 @@
 lanceGHS
+, @JsonProperty(%22DRK%22) CexIOBalance balanceDRK, @JsonProperty(%22USD%22) CexIOBalance balanceUSD
 ) %7B%0A%0A   
@@ -1728,24 +1728,92 @@
 balanceGHS;%0A
+    this.balanceUSD = balanceUSD;%0A    this.balanceDRK = balanceDRK;%0A
   %7D%0A%0A  publi
@@ -2390,16 +2390,159 @@
 S;%0A  %7D%0A%0A
+  public CexIOBalance getBalanceUSD() %7B%0A%0A%09    return balanceUSD;%0A  %7D%0A%0A  public CexIOBalance getBalanceDRK() %7B%0A%0A%09    return balanceDRK;%0A  %7D%0A%0A  %0A
   @Overr
@@ -2717,16 +2717,35 @@
  GHS=%7B8%7D
+, USD=%7B9%7D, DRK=%7B10%7D
 %5D%22, erro
@@ -2846,16 +2846,40 @@
 lanceGHS
+, balanceUSD, balanceDRK
 );%0A  %7D%0A%0A

Add usd and drk to balance info