package com.chain.api;

import com.chain.exception.ChainException;
import com.chain.http.Context;
import com.google.gson.annotations.SerializedName;

import java.util.List;

public class Balance {
    @SerializedName("group_by")
    public List<String> groupBy;
    public Integer amount;

    public static class Items extends PagedItems<Balance> {
        public Items getPage() throws ChainException {
            Items items = this.context.request("list-balances", this.query, Items.class);
            items.setContext(this.context);
            return items;
        }
    }

    public static class QueryBuilder extends BaseQueryBuilder<QueryBuilder> {
        public Items execute(Context ctx) throws ChainException {
            Items items = new Items();
            items.setContext(ctx);
            items.setQuery(this.query);
            return items.getPage();
        }

        public QueryBuilder setTimestamp(long time) {
            this.query.timestamp = time;
            return this;
        }
    }
}
@@ -143,16 +143,45 @@
 dName;%0A%0A
+import java.math.BigInteger;%0A
 import j
@@ -295,16 +295,19 @@
  public 
+Big
 Integer 

use BigInteger for balance amount field