diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4271fac42..bb62495eb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,11 @@
As this project is pre 1.0, breaking changes may happen for minor version bumps. A breaking change will get clearly notified in this log.
+## Unreleased
+
+* Added TransactionsRequestBuilder.forClaimableBalance(), and OperationsRequestBuilder.forClaimableBalance().
+* Added support for new `accounts`, `balances`, `claimable_balances_amount`, and `num_claimable_balances` fields on Assets.
+
## 0.24.0
### Deprecations
diff --git a/src/main/java/org/stellar/sdk/requests/OperationsRequestBuilder.java b/src/main/java/org/stellar/sdk/requests/OperationsRequestBuilder.java
index 1e5a00252..5ea8d87d2 100644
--- a/src/main/java/org/stellar/sdk/requests/OperationsRequestBuilder.java
+++ b/src/main/java/org/stellar/sdk/requests/OperationsRequestBuilder.java
@@ -63,6 +63,17 @@ public OperationsRequestBuilder forAccount(String account) {
return this;
}
+ /**
+ * Builds request to GET /claimable_balances/{claimable_balance_id}/operations
+ * @see Operations for ClaimableBalance
+ * @param claimableBalance Claimable Balance for which to get operations
+ */
+ public OperationsRequestBuilder forClaimableBalance(String claimableBalance) {
+ claimableBalance = checkNotNull(claimableBalance, "claimableBalance cannot be null");
+ this.setSegments("claimable_balances", claimableBalance, "operations");
+ return this;
+ }
+
/**
* Builds request to GET /ledgers/{ledgerSeq}/operations
* @see Operations for Ledger
diff --git a/src/main/java/org/stellar/sdk/requests/TransactionsRequestBuilder.java b/src/main/java/org/stellar/sdk/requests/TransactionsRequestBuilder.java
index 10d9613c3..81b34a7c5 100644
--- a/src/main/java/org/stellar/sdk/requests/TransactionsRequestBuilder.java
+++ b/src/main/java/org/stellar/sdk/requests/TransactionsRequestBuilder.java
@@ -57,6 +57,17 @@ public TransactionsRequestBuilder forAccount(String account) {
return this;
}
+ /**
+ * Builds request to GET /claimable_balances/{claimable_balance_id}/transactions
+ * @see Transactions for ClaimableBalance
+ * @param claimableBalance Claimable Balance for which to get transactions
+ */
+ public TransactionsRequestBuilder forClaimableBalance(String claimableBalance) {
+ claimableBalance = checkNotNull(claimableBalance, "claimableBalance cannot be null");
+ this.setSegments("claimable_balances", claimableBalance, "transactions");
+ return this;
+ }
+
/**
* Builds request to GET /ledgers/{ledgerSeq}/transactions
* @see Transactions for Ledger
diff --git a/src/main/java/org/stellar/sdk/responses/AssetResponse.java b/src/main/java/org/stellar/sdk/responses/AssetResponse.java
index 0c50a8a43..0fa669d40 100644
--- a/src/main/java/org/stellar/sdk/responses/AssetResponse.java
+++ b/src/main/java/org/stellar/sdk/responses/AssetResponse.java
@@ -12,22 +12,34 @@ public class AssetResponse extends Response implements Pageable {
private final String assetIssuer;
@SerializedName("paging_token")
private final String pagingToken;
+ @SerializedName("accounts")
+ private final AssetResponse.Accounts accounts;
+ @SerializedName("balances")
+ private final AssetResponse.Balances balances;
@SerializedName("amount")
private final String amount;
+ @SerializedName("claimable_balances_amount")
+ private final String claimableBalancesAmount;
@SerializedName("num_accounts")
private final int numAccounts;
+ @SerializedName("num_claimable_balances")
+ private final int numClaimableBalances;
@SerializedName("flags")
private final AssetResponse.Flags flags;
@SerializedName("_links")
private final AssetResponse.Links links;
- public AssetResponse(String assetType, String assetCode, String assetIssuer, String pagingToken, String amount, int numAccounts, Flags flags, Links links) {
+ public AssetResponse(String assetType, String assetCode, String assetIssuer, String pagingToken, Accounts accounts, Balances balances, String amount, String claimableBalancesAmount, int numAccounts, int numClaimableBalances, Flags flags, Links links) {
this.assetType = assetType;
this.assetCode = assetCode;
this.assetIssuer = assetIssuer;
this.pagingToken = pagingToken;
+ this.accounts = accounts;
+ this.balances = balances;
this.amount = amount;
+ this.claimableBalancesAmount = claimableBalancesAmount;
this.numAccounts = numAccounts;
+ this.numClaimableBalances = numClaimableBalances;
this.flags = flags;
this.links = links;
}
@@ -52,6 +64,22 @@ public String getPagingToken() {
return pagingToken;
}
+ public Accounts getAccounts() {
+ return accounts;
+ }
+
+ public Balances getBalances() {
+ return balances;
+ }
+
+ public String getClaimableBalancesAmount() {
+ return claimableBalancesAmount;
+ }
+
+ public int getNumClaimableBalances() {
+ return numClaimableBalances;
+ }
+
public String getAmount() {
return amount;
}
@@ -68,6 +96,66 @@ public Links getLinks() {
return links;
}
+ /**
+ * Accounts describe asset accounts.
+ */
+ public static class Accounts {
+ @SerializedName("authorized")
+ private final int authorized;
+ @SerializedName("authorized_to_maintain_liabilities")
+ private final int authorizedToMaintainLiabilities;
+ @SerializedName("unauthorized")
+ private final int unauthorized;
+
+ public Accounts(int authorized, int authorizedToMaintainLiabilities, int unauthorized) {
+ this.authorized = authorized;
+ this.authorizedToMaintainLiabilities = authorizedToMaintainLiabilities;
+ this.unauthorized = unauthorized;
+ }
+
+ public int authorized() {
+ return authorized;
+ }
+
+ public int authorizedToMaintainLiabilities() {
+ return authorizedToMaintainLiabilities;
+ }
+
+ public int unauthorized() {
+ return unauthorized;
+ }
+ }
+
+ /**
+ * Balances describe asset balances.
+ */
+ public static class Balances {
+ @SerializedName("authorized")
+ private final String authorized;
+ @SerializedName("authorized_to_maintain_liabilities")
+ private final String authorizedToMaintainLiabilities;
+ @SerializedName("unauthorized")
+ private final String unauthorized;
+
+ public Balances(String authorized, String authorizedToMaintainLiabilities, String unauthorized) {
+ this.authorized = authorized;
+ this.authorizedToMaintainLiabilities = authorizedToMaintainLiabilities;
+ this.unauthorized = unauthorized;
+ }
+
+ public String authorized() {
+ return authorized;
+ }
+
+ public String authorizedToMaintainLiabilities() {
+ return authorizedToMaintainLiabilities;
+ }
+
+ public String unauthorized() {
+ return unauthorized;
+ }
+ }
+
/**
* Flags describe asset flags.
*/
diff --git a/src/test/java/org/stellar/sdk/ServerTest.java b/src/test/java/org/stellar/sdk/ServerTest.java
index 2929bc6f0..047a8a6f4 100644
--- a/src/test/java/org/stellar/sdk/ServerTest.java
+++ b/src/test/java/org/stellar/sdk/ServerTest.java
@@ -113,52 +113,54 @@ public class ServerTest {
" \"instance\": \"d3465740-ec3a-4a0b-9d4a-c9ea734ce58a\"\n" +
"}";
- private final String operationsPageResponse = "{\n" +
- " \"_links\": {\n" +
- " \"self\": {\n" +
- " \"href\": \"http://horizon-testnet.stellar.org/operations?order=desc\\u0026limit=10\\u0026cursor=\"\n" +
- " },\n" +
- " \"next\": {\n" +
- " \"href\": \"http://horizon-testnet.stellar.org/operations?order=desc\\u0026limit=10\\u0026cursor=3695540185337857\"\n" +
- " },\n" +
- " \"prev\": {\n" +
- " \"href\": \"http://horizon-testnet.stellar.org/operations?order=asc\\u0026limit=10\\u0026cursor=3717508943056897\"\n" +
- " }\n" +
- " },\n" +
- " \"_embedded\": {\n" +
- " \"records\": [\n" +
- " {\n" +
- " \"_links\": {\n" +
- " \"self\": {\n" +
- " \"href\": \"http://horizon-testnet.stellar.org/operations/3717508943056897\"\n" +
- " },\n" +
- " \"transaction\": {\n" +
- " \"href\": \"http://horizon-testnet.stellar.org/transactions/ce81d957352501a46d9b938462cbef76283dcba8108d2649e0d79279a8f36488\"\n" +
- " },\n" +
- " \"effects\": {\n" +
- " \"href\": \"http://horizon-testnet.stellar.org/operations/3717508943056897/effects\"\n" +
- " },\n" +
- " \"succeeds\": {\n" +
- " \"href\": \"http://horizon-testnet.stellar.org/effects?order=desc\\u0026cursor=3717508943056897\"\n" +
- " },\n" +
- " \"precedes\": {\n" +
- " \"href\": \"http://horizon-testnet.stellar.org/effects?order=asc\\u0026cursor=3717508943056897\"\n" +
- " }\n" +
- " },\n" +
- " \"id\": \"3717508943056897\",\n" +
- " \"paging_token\": \"3717508943056897\",\n" +
- " \"source_account\": \"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K\",\n" +
- " \"type\": \"create_account\",\n" +
- " \"type_i\": 0,\n" +
- " \"created_at\": \"2018-01-22T21:30:53Z\",\n" +
- " \"transaction_hash\": \"dd9d10c80a344f4464df3ecaa63705a5ef4a0533ff2f2099d5ef371ab5e1c046\","+
- " \"starting_balance\": \"10000.0\",\n" +
- " \"funder\": \"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K\",\n" +
- " \"account\": \"GDFH4NIYMIIAKRVEJJZOIGWKXGQUF3XHJG6ZM6CEA64AMTVDN44LHOQE\"\n" +
- " }\n"+
- " ]\n" +
- " }\n" +
- "}";
+ private String operationsPageResponse(String baseUrl) {
+ return "{\n" +
+ " \"_links\": {\n" +
+ " \"self\": {\n" +
+ " \"href\": \""+baseUrl+"/operations?order=desc\\u0026limit=10\\u0026cursor=\"\n" +
+ " },\n" +
+ " \"next\": {\n" +
+ " \"href\": \""+baseUrl+"/operations?order=desc\\u0026limit=10\\u0026cursor=3695540185337857\"\n" +
+ " },\n" +
+ " \"prev\": {\n" +
+ " \"href\": \""+baseUrl+"/operations?order=asc\\u0026limit=10\\u0026cursor=3717508943056897\"\n" +
+ " }\n" +
+ " },\n" +
+ " \"_embedded\": {\n" +
+ " \"records\": [\n" +
+ " {\n" +
+ " \"_links\": {\n" +
+ " \"self\": {\n" +
+ " \"href\": \""+baseUrl+"/operations/3717508943056897\"\n" +
+ " },\n" +
+ " \"transaction\": {\n" +
+ " \"href\": \""+baseUrl+"/transactions/ce81d957352501a46d9b938462cbef76283dcba8108d2649e0d79279a8f36488\"\n" +
+ " },\n" +
+ " \"effects\": {\n" +
+ " \"href\": \""+baseUrl+"/operations/3717508943056897/effects\"\n" +
+ " },\n" +
+ " \"succeeds\": {\n" +
+ " \"href\": \""+baseUrl+"/effects?order=desc\\u0026cursor=3717508943056897\"\n" +
+ " },\n" +
+ " \"precedes\": {\n" +
+ " \"href\": \""+baseUrl+"/effects?order=asc\\u0026cursor=3717508943056897\"\n" +
+ " }\n" +
+ " },\n" +
+ " \"id\": \"3717508943056897\",\n" +
+ " \"paging_token\": \"3717508943056897\",\n" +
+ " \"source_account\": \"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K\",\n" +
+ " \"type\": \"create_account\",\n" +
+ " \"type_i\": 0,\n" +
+ " \"created_at\": \"2018-01-22T21:30:53Z\",\n" +
+ " \"transaction_hash\": \"dd9d10c80a344f4464df3ecaa63705a5ef4a0533ff2f2099d5ef371ab5e1c046\","+
+ " \"starting_balance\": \"10000.0\",\n" +
+ " \"funder\": \"GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K\",\n" +
+ " \"account\": \"GDFH4NIYMIIAKRVEJJZOIGWKXGQUF3XHJG6ZM6CEA64AMTVDN44LHOQE\"\n" +
+ " }\n"+
+ " ]\n" +
+ " }\n" +
+ "}";
+ }
Transaction buildTransaction() throws IOException {
return buildTransaction(Network.PUBLIC);
@@ -308,9 +310,19 @@ public void testSubmitTransactionInternalError() throws IOException {
@Test
public void testNextPage() throws IOException, URISyntaxException {
- MockWebServer mockWebServer = new MockWebServer();
- mockWebServer.enqueue(new MockResponse().setResponseCode(200).setBody(operationsPageResponse));
- mockWebServer.enqueue(new MockResponse().setResponseCode(200).setBody(operationsPageResponse));
+ final MockWebServer mockWebServer = new MockWebServer();
+ mockWebServer.setDispatcher(new Dispatcher() {
+ @Override
+ public MockResponse dispatch(RecordedRequest request) {
+ String baseUrl = request
+ .getRequestUrl()
+ .toString()
+ .replaceAll(request.getPath(), "");
+ String body = operationsPageResponse(baseUrl);
+ return new MockResponse().setResponseCode(200).setBody(body);
+ }
+ });
+
mockWebServer.start();
HttpUrl baseUrl = mockWebServer.url("");
Server server = new Server(baseUrl.toString());
@@ -319,7 +331,7 @@ public void testNextPage() throws IOException, URISyntaxException {
assertEquals(1, page.getRecords().size());
assertEquals("dd9d10c80a344f4464df3ecaa63705a5ef4a0533ff2f2099d5ef371ab5e1c046", page.getRecords().get(0).getTransactionHash());
Page nextPage = page.getNextPage(server.getHttpClient());
- assertEquals(1, page.getRecords().size());
+ assertEquals(1, nextPage.getRecords().size());
}
diff --git a/src/test/java/org/stellar/sdk/requests/OperationsRequestBuilderTest.java b/src/test/java/org/stellar/sdk/requests/OperationsRequestBuilderTest.java
index 3693eafd2..f821d17e3 100644
--- a/src/test/java/org/stellar/sdk/requests/OperationsRequestBuilderTest.java
+++ b/src/test/java/org/stellar/sdk/requests/OperationsRequestBuilderTest.java
@@ -84,6 +84,17 @@ public void testForAccount() {
assertEquals("https://horizon-testnet.stellar.org/accounts/GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H/operations?limit=200&order=desc", uri.toString());
}
+ @Test
+ public void testForClaimableBalance() {
+ Server server = new Server("https://horizon-testnet.stellar.org");
+ HttpUrl uri = server.operations()
+ .forClaimableBalance("00000000846c047755e4a46912336f56096b48ece78ddb5fbf6d90f0eb4ecae5324fbddb")
+ .limit(200)
+ .order(RequestBuilder.Order.DESC)
+ .buildUri();
+ assertEquals("https://horizon-testnet.stellar.org/claimable_balances/00000000846c047755e4a46912336f56096b48ece78ddb5fbf6d90f0eb4ecae5324fbddb/operations?limit=200&order=desc", uri.toString());
+ }
+
@Test
public void testForLedger() {
Server server = new Server("https://horizon-testnet.stellar.org");
diff --git a/src/test/java/org/stellar/sdk/requests/TransactionsRequestBuilderTest.java b/src/test/java/org/stellar/sdk/requests/TransactionsRequestBuilderTest.java
index a1e1762c5..b32487f35 100644
--- a/src/test/java/org/stellar/sdk/requests/TransactionsRequestBuilderTest.java
+++ b/src/test/java/org/stellar/sdk/requests/TransactionsRequestBuilderTest.java
@@ -30,6 +30,17 @@ public void testForAccount() {
assertEquals("https://horizon-testnet.stellar.org/accounts/GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H/transactions?limit=200&order=desc", uri.toString());
}
+ @Test
+ public void testForClaimableBalance() {
+ Server server = new Server("https://horizon-testnet.stellar.org");
+ HttpUrl uri = server.transactions()
+ .forClaimableBalance("00000000846c047755e4a46912336f56096b48ece78ddb5fbf6d90f0eb4ecae5324fbddb")
+ .limit(200)
+ .order(RequestBuilder.Order.DESC)
+ .buildUri();
+ assertEquals("https://horizon-testnet.stellar.org/claimable_balances/00000000846c047755e4a46912336f56096b48ece78ddb5fbf6d90f0eb4ecae5324fbddb/transactions?limit=200&order=desc", uri.toString());
+ }
+
@Test
public void testForLedger() {
Server server = new Server("https://horizon-testnet.stellar.org");
diff --git a/src/test/java/org/stellar/sdk/responses/AssetsPageDeserializerTest.java b/src/test/java/org/stellar/sdk/responses/AssetsPageDeserializerTest.java
index 262cede47..ac731284b 100644
--- a/src/test/java/org/stellar/sdk/responses/AssetsPageDeserializerTest.java
+++ b/src/test/java/org/stellar/sdk/responses/AssetsPageDeserializerTest.java
@@ -16,6 +16,14 @@ public void testDeserialize() {
assertEquals(page.getRecords().get(0).getAssetCode(), "6497847");
assertEquals(page.getRecords().get(0).getAssetIssuer(), "GCGNWKCJ3KHRLPM3TM6N7D3W5YKDJFL6A2YCXFXNMRTZ4Q66MEMZ6FI2");
assertEquals(page.getRecords().get(0).getPagingToken(), "6497847_GCGNWKCJ3KHRLPM3TM6N7D3W5YKDJFL6A2YCXFXNMRTZ4Q66MEMZ6FI2_credit_alphanum12");
+ assertEquals(page.getRecords().get(0).getAccounts().authorized(), 1);
+ assertEquals(page.getRecords().get(0).getAccounts().authorizedToMaintainLiabilities(), 0);
+ assertEquals(page.getRecords().get(0).getAccounts().unauthorized(), 0);
+ assertEquals(page.getRecords().get(0).getBalances().authorized(), "0.0000000");
+ assertEquals(page.getRecords().get(0).getBalances().authorizedToMaintainLiabilities(), "0.0000000");
+ assertEquals(page.getRecords().get(0).getBalances().unauthorized(), "0.0000000");
+ assertEquals(page.getRecords().get(0).getNumClaimableBalances(), 0);
+ assertEquals(page.getRecords().get(0).getClaimableBalancesAmount(), "0.0000000");
assertEquals(page.getRecords().get(0).getAmount(), "0.0000000");
assertEquals(page.getRecords().get(0).getNumAccounts(), 1);
assertEquals(page.getRecords().get(0).getLinks().getToml().getHref(), "https://www.stellar.org/.well-known/stellar.toml");
@@ -47,6 +55,18 @@ public void testDeserialize() {
" \"asset_code\": \"6497847\",\n" +
" \"asset_issuer\": \"GCGNWKCJ3KHRLPM3TM6N7D3W5YKDJFL6A2YCXFXNMRTZ4Q66MEMZ6FI2\",\n" +
" \"paging_token\": \"6497847_GCGNWKCJ3KHRLPM3TM6N7D3W5YKDJFL6A2YCXFXNMRTZ4Q66MEMZ6FI2_credit_alphanum12\",\n" +
+ " \"accounts\": {\n" +
+ " \"authorized\": 1,\n" +
+ " \"authorized_to_maintain_liabilities\": 0,\n" +
+ " \"unauthorized\": 0\n" +
+ " },\n" +
+ " \"balances\": {\n" +
+ " \"authorized\": \"0.0000000\",\n" +
+ " \"authorized_to_maintain_liabilities\": \"0.0000000\",\n" +
+ " \"unauthorized\": \"0.0000000\"\n" +
+ " },\n" +
+ " \"claimable_balances_amount\": \"0.0000000\",\n" +
+ " \"num_claimable_balances\": 0,\n" +
" \"amount\": \"0.0000000\",\n" +
" \"num_accounts\": 1,\n" +
" \"flags\": {\n" +
@@ -64,6 +84,18 @@ public void testDeserialize() {
" \"asset_code\": \"9HORIZONS\",\n" +
" \"asset_issuer\": \"GB2HXY7UEDCSHOWZ4553QFGFILNU73OFS2P4HU5IB3UUU66TWPBPVTGW\",\n" +
" \"paging_token\": \"9HORIZONS_GB2HXY7UEDCSHOWZ4553QFGFILNU73OFS2P4HU5IB3UUU66TWPBPVTGW_credit_alphanum12\",\n" +
+ " \"accounts\": {\n" +
+ " \"authorized\": 3,\n" +
+ " \"authorized_to_maintain_liabilities\": 0,\n" +
+ " \"unauthorized\": 0\n" +
+ " },\n" +
+ " \"balances\": {\n" +
+ " \"authorized\": \"1000000.0000000\",\n" +
+ " \"authorized_to_maintain_liabilities\": \"0.0000000\",\n" +
+ " \"unauthorized\": \"0.0000000\"\n" +
+ " },\n" +
+ " \"claimable_balances_amount\": \"0.0000000\",\n" +
+ " \"num_claimable_balances\": 0,\n" +
" \"amount\": \"1000000.0000000\",\n" +
" \"num_accounts\": 3,\n" +
" \"flags\": {\n" +
@@ -81,6 +113,18 @@ public void testDeserialize() {
" \"asset_code\": \"AIR\",\n" +
" \"asset_issuer\": \"GB2SQ74JCS6F4MVDU4BF4L4S4Z5Z36ABOTP6DF5JJOFGFE3ETZAUVUQK\",\n" +
" \"paging_token\": \"AIR_GB2SQ74JCS6F4MVDU4BF4L4S4Z5Z36ABOTP6DF5JJOFGFE3ETZAUVUQK_credit_alphanum4\",\n" +
+ " \"accounts\": {\n" +
+ " \"authorized\": 2,\n" +
+ " \"authorized_to_maintain_liabilities\": 0,\n" +
+ " \"unauthorized\": 0\n" +
+ " },\n" +
+ " \"balances\": {\n" +
+ " \"authorized\": \"100000000000.0000000\",\n" +
+ " \"authorized_to_maintain_liabilities\": \"0.0000000\",\n" +
+ " \"unauthorized\": \"0.0000000\"\n" +
+ " },\n" +
+ " \"claimable_balances_amount\": \"0.0000000\",\n" +
+ " \"num_claimable_balances\": 0,\n" +
" \"amount\": \"100000000000.0000000\",\n" +
" \"num_accounts\": 2,\n" +
" \"flags\": {\n" +
@@ -98,6 +142,18 @@ public void testDeserialize() {
" \"asset_code\": \"AlambLedgerS\",\n" +
" \"asset_issuer\": \"GCMXATSZBEYTNPFQXHFQXUYXOTHA4HA5L2YZEKKOVGYWTUT24KIHECG3\",\n" +
" \"paging_token\": \"AlambLedgerS_GCMXATSZBEYTNPFQXHFQXUYXOTHA4HA5L2YZEKKOVGYWTUT24KIHECG3_credit_alphanum12\",\n" +
+ " \"accounts\": {\n" +
+ " \"authorized\": 0,\n" +
+ " \"authorized_to_maintain_liabilities\": 0,\n" +
+ " \"unauthorized\": 0\n" +
+ " },\n" +
+ " \"balances\": {\n" +
+ " \"authorized\": \"0.0000000\",\n" +
+ " \"authorized_to_maintain_liabilities\": \"0.0000000\",\n" +
+ " \"unauthorized\": \"0.0000000\"\n" +
+ " },\n" +
+ " \"claimable_balances_amount\": \"0.0000000\",\n" +
+ " \"num_claimable_balances\": 0,\n" +
" \"amount\": \"0.0000000\",\n" +
" \"num_accounts\": 0,\n" +
" \"flags\": {\n" +
@@ -115,6 +171,18 @@ public void testDeserialize() {
" \"asset_code\": \"AMO\",\n" +
" \"asset_issuer\": \"GBOMFBZG5PWUXDIIW5ITVRVEL6YCIC6ZDXLNBH33BNPCX3D7AXDCDKHF\",\n" +
" \"paging_token\": \"AMO_GBOMFBZG5PWUXDIIW5ITVRVEL6YCIC6ZDXLNBH33BNPCX3D7AXDCDKHF_credit_alphanum4\",\n" +
+ " \"accounts\": {\n" +
+ " \"authorized\": 1,\n" +
+ " \"authorized_to_maintain_liabilities\": 0,\n" +
+ " \"unauthorized\": 0\n" +
+ " },\n" +
+ " \"balances\": {\n" +
+ " \"authorized\": \"10000000.0000000\",\n" +
+ " \"authorized_to_maintain_liabilities\": \"0.0000000\",\n" +
+ " \"unauthorized\": \"0.0000000\"\n" +
+ " },\n" +
+ " \"claimable_balances_amount\": \"0.0000000\",\n" +
+ " \"num_claimable_balances\": 0,\n" +
" \"amount\": \"10000000.0000000\",\n" +
" \"num_accounts\": 1,\n" +
" \"flags\": {\n" +
@@ -132,6 +200,18 @@ public void testDeserialize() {
" \"asset_code\": \"AMO\",\n" +
" \"asset_issuer\": \"GDIAIZ7S7L2OBEQBH62KE7IWXK76XA7ES7XCH7JCPXQGV7VB3V6VETOX\",\n" +
" \"paging_token\": \"AMO_GDIAIZ7S7L2OBEQBH62KE7IWXK76XA7ES7XCH7JCPXQGV7VB3V6VETOX_credit_alphanum4\",\n" +
+ " \"accounts\": {\n" +
+ " \"authorized\": 1,\n" +
+ " \"authorized_to_maintain_liabilities\": 0,\n" +
+ " \"unauthorized\": 0\n" +
+ " },\n" +
+ " \"balances\": {\n" +
+ " \"authorized\": \"0.0000000\",\n" +
+ " \"authorized_to_maintain_liabilities\": \"0.0000000\",\n" +
+ " \"unauthorized\": \"0.0000000\"\n" +
+ " },\n" +
+ " \"claimable_balances_amount\": \"0.0000000\",\n" +
+ " \"num_claimable_balances\": 0,\n" +
" \"amount\": \"0.0000000\",\n" +
" \"num_accounts\": 1,\n" +
" \"flags\": {\n" +
@@ -149,6 +229,18 @@ public void testDeserialize() {
" \"asset_code\": \"ASD\",\n" +
" \"asset_issuer\": \"GAOMRMILWSX7UXZMYC4X7B7BVJXORYV36XUK3EURVJF7DA6B77ABFVOJ\",\n" +
" \"paging_token\": \"ASD_GAOMRMILWSX7UXZMYC4X7B7BVJXORYV36XUK3EURVJF7DA6B77ABFVOJ_credit_alphanum4\",\n" +
+ " \"accounts\": {\n" +
+ " \"authorized\": 0,\n" +
+ " \"authorized_to_maintain_liabilities\": 0,\n" +
+ " \"unauthorized\": 0\n" +
+ " },\n" +
+ " \"balances\": {\n" +
+ " \"authorized\": \"0.0000000\",\n" +
+ " \"authorized_to_maintain_liabilities\": \"0.0000000\",\n" +
+ " \"unauthorized\": \"0.0000000\"\n" +
+ " },\n" +
+ " \"claimable_balances_amount\": \"0.0000000\",\n" +
+ " \"num_claimable_balances\": 0,\n" +
" \"amount\": \"0.0000000\",\n" +
" \"num_accounts\": 0,\n" +
" \"flags\": {\n" +
@@ -166,6 +258,18 @@ public void testDeserialize() {
" \"asset_code\": \"ASD\",\n" +
" \"asset_issuer\": \"GDP4SJE5Y5ODX627DO2F7ZNBAPVXRFHKKR3W4UJ6I4XMW3S3OH2XRWYD\",\n" +
" \"paging_token\": \"ASD_GDP4SJE5Y5ODX627DO2F7ZNBAPVXRFHKKR3W4UJ6I4XMW3S3OH2XRWYD_credit_alphanum4\",\n" +
+ " \"accounts\": {\n" +
+ " \"authorized\": 0,\n" +
+ " \"authorized_to_maintain_liabilities\": 0,\n" +
+ " \"unauthorized\": 0\n" +
+ " },\n" +
+ " \"balances\": {\n" +
+ " \"authorized\": \"0.0000000\",\n" +
+ " \"authorized_to_maintain_liabilities\": \"0.0000000\",\n" +
+ " \"unauthorized\": \"0.0000000\"\n" +
+ " },\n" +
+ " \"claimable_balances_amount\": \"0.0000000\",\n" +
+ " \"num_claimable_balances\": 0,\n" +
" \"amount\": \"0.0000000\",\n" +
" \"num_accounts\": 0,\n" +
" \"flags\": {\n" +
@@ -183,6 +287,18 @@ public void testDeserialize() {
" \"asset_code\": \"AsrtoDollar\",\n" +
" \"asset_issuer\": \"GBPGO557IQWSWOIKHWB7YJ5QIBWVF4QS6SPGWT5YBGDUPE6QKOD7RR7S\",\n" +
" \"paging_token\": \"AsrtoDollar_GBPGO557IQWSWOIKHWB7YJ5QIBWVF4QS6SPGWT5YBGDUPE6QKOD7RR7S_credit_alphanum12\",\n" +
+ " \"accounts\": {\n" +
+ " \"authorized\": 0,\n" +
+ " \"authorized_to_maintain_liabilities\": 0,\n" +
+ " \"unauthorized\": 0\n" +
+ " },\n" +
+ " \"balances\": {\n" +
+ " \"authorized\": \"0.0000000\",\n" +
+ " \"authorized_to_maintain_liabilities\": \"0.0000000\",\n" +
+ " \"unauthorized\": \"0.0000000\"\n" +
+ " },\n" +
+ " \"claimable_balances_amount\": \"0.0000000\",\n" +
+ " \"num_claimable_balances\": 0,\n" +
" \"amount\": \"0.0000000\",\n" +
" \"num_accounts\": 0,\n" +
" \"flags\": {\n" +
@@ -200,6 +316,18 @@ public void testDeserialize() {
" \"asset_code\": \"AsrtoDollar\",\n" +
" \"asset_issuer\": \"GDJWXY5XUASXNL4ABCONR6T5MOXJ2S4HD6WDNAJDSDKQ4VS3TVUQJEDJ\",\n" +
" \"paging_token\": \"AsrtoDollar_GDJWXY5XUASXNL4ABCONR6T5MOXJ2S4HD6WDNAJDSDKQ4VS3TVUQJEDJ_credit_alphanum12\",\n" +
+ " \"accounts\": {\n" +
+ " \"authorized\": 0,\n" +
+ " \"authorized_to_maintain_liabilities\": 0,\n" +
+ " \"unauthorized\": 0\n" +
+ " },\n" +
+ " \"balances\": {\n" +
+ " \"authorized\": \"0.0000000\",\n" +
+ " \"authorized_to_maintain_liabilities\": \"0.0000000\",\n" +
+ " \"unauthorized\": \"0.0000000\"\n" +
+ " },\n" +
+ " \"claimable_balances_amount\": \"0.0000000\",\n" +
+ " \"num_claimable_balances\": 0,\n" +
" \"amount\": \"0.0000000\",\n" +
" \"num_accounts\": 0,\n" +
" \"flags\": {\n" +