diff --git a/src/main/java/org/stellar/sdk/Memo.java b/src/main/java/org/stellar/sdk/Memo.java
index f89b48f44..9a757de60 100644
--- a/src/main/java/org/stellar/sdk/Memo.java
+++ b/src/main/java/org/stellar/sdk/Memo.java
@@ -1,7 +1,6 @@
package org.stellar.sdk;
import org.apache.commons.codec.DecoderException;
-import org.stellar.sdk.responses.Transaction;
/**
*
The memo contains optional extra information. It is the responsibility of the client to interpret this value. Memos can be one of the following types:
diff --git a/src/main/java/org/stellar/sdk/requests/AccountsRequestBuilder.java b/src/main/java/org/stellar/sdk/requests/AccountsRequestBuilder.java
index e0b9a2444..b5d95613b 100644
--- a/src/main/java/org/stellar/sdk/requests/AccountsRequestBuilder.java
+++ b/src/main/java/org/stellar/sdk/requests/AccountsRequestBuilder.java
@@ -7,7 +7,7 @@
import org.glassfish.jersey.media.sse.InboundEvent;
import org.glassfish.jersey.media.sse.SseFeature;
import org.stellar.sdk.KeyPair;
-import org.stellar.sdk.responses.Account;
+import org.stellar.sdk.responses.AccountResponse;
import org.stellar.sdk.responses.GsonSingleton;
import org.stellar.sdk.responses.Page;
@@ -27,14 +27,14 @@ public AccountsRequestBuilder(URI serverURI) {
}
/**
- * Requests specific uri
and returns {@link Account}.
+ * Requests specific uri
and returns {@link AccountResponse}.
* This method is helpful for getting the links.
* @throws IOException
*/
- public Account account(URI uri) throws IOException {
- TypeToken type = new TypeToken() {};
- ResponseHandler responseHandler = new ResponseHandler(type);
- return (Account) Request.Get(uri).execute().handleResponse(responseHandler);
+ public AccountResponse account(URI uri) throws IOException {
+ TypeToken type = new TypeToken() {};
+ ResponseHandler responseHandler = new ResponseHandler(type);
+ return (AccountResponse) Request.Get(uri).execute().handleResponse(responseHandler);
}
/**
@@ -43,21 +43,21 @@ public Account account(URI uri) throws IOException {
* @param account Account to fetch
* @throws IOException
*/
- public Account account(KeyPair account) throws IOException {
+ public AccountResponse account(KeyPair account) throws IOException {
this.setSegments("accounts", account.getAddress());
return this.account(this.buildUri());
}
/**
- * Requests specific uri
and returns {@link Page} of {@link Account}.
+ * Requests specific uri
and returns {@link Page} of {@link AccountResponse}.
* This method is helpful for getting the next set of results.
- * @return {@link Page} of {@link Account}
+ * @return {@link Page} of {@link AccountResponse}
* @throws IOException
*/
- public static Page execute(URI uri) throws IOException {
- TypeToken type = new TypeToken>() {};
- ResponseHandler> responseHandler = new ResponseHandler>(type);
- return (Page) Request.Get(uri).execute().handleResponse(responseHandler);
+ public static Page execute(URI uri) throws IOException {
+ TypeToken type = new TypeToken>() {};
+ ResponseHandler> responseHandler = new ResponseHandler>(type);
+ return (Page) Request.Get(uri).execute().handleResponse(responseHandler);
}
/**
@@ -67,10 +67,10 @@ public static Page execute(URI uri) throws IOException {
* responses as ledgers close.
* @see Server-Sent Events
* @see Response Format documentation
- * @param listener {@link EventListener} implementation with {@link Account} type
+ * @param listener {@link EventListener} implementation with {@link AccountResponse} type
* @return EventSource object, so you can close()
connection when not needed anymore
*/
- public EventSource stream(final EventListener listener) {
+ public EventSource stream(final EventListener listener) {
Client client = ClientBuilder.newBuilder().register(SseFeature.class).build();
WebTarget target = client.target(this.buildUri());
EventSource eventSource = new EventSource(target) {
@@ -80,7 +80,7 @@ public void onEvent(InboundEvent inboundEvent) {
if (data.equals("\"hello\"")) {
return;
}
- Account account = GsonSingleton.getInstance().fromJson(data, Account.class);
+ AccountResponse account = GsonSingleton.getInstance().fromJson(data, AccountResponse.class);
listener.onEvent(account);
}
};
@@ -88,11 +88,11 @@ public void onEvent(InboundEvent inboundEvent) {
}
/**
- * Build and execute request. Warning! {@link Account}s in {@link Page} will contain only keypair
field.
- * @return {@link Page} of {@link Account}
+ * Build and execute request. Warning! {@link AccountResponse}s in {@link Page} will contain only keypair
field.
+ * @return {@link Page} of {@link AccountResponse}
* @throws IOException
*/
- public Page execute() throws IOException {
+ public Page execute() throws IOException {
return this.execute(this.buildUri());
}
diff --git a/src/main/java/org/stellar/sdk/requests/EffectsRequestBuilder.java b/src/main/java/org/stellar/sdk/requests/EffectsRequestBuilder.java
index 4889b6d5c..d772b966a 100644
--- a/src/main/java/org/stellar/sdk/requests/EffectsRequestBuilder.java
+++ b/src/main/java/org/stellar/sdk/requests/EffectsRequestBuilder.java
@@ -9,7 +9,7 @@
import org.stellar.sdk.KeyPair;
import org.stellar.sdk.responses.GsonSingleton;
import org.stellar.sdk.responses.Page;
-import org.stellar.sdk.responses.effects.Effect;
+import org.stellar.sdk.responses.effects.EffectResponse;
import java.io.IOException;
import java.net.URI;
@@ -71,15 +71,15 @@ public EffectsRequestBuilder forOperation(long operationId) {
}
/**
- * Requests specific uri
and returns {@link Page} of {@link Effect}.
+ * Requests specific uri
and returns {@link Page} of {@link EffectResponse}.
* This method is helpful for getting the next set of results.
- * @return {@link Page} of {@link Effect}
+ * @return {@link Page} of {@link EffectResponse}
* @throws IOException
*/
- public static Page execute(URI uri) throws IOException {
- TypeToken type = new TypeToken>() {};
- ResponseHandler> responseHandler = new ResponseHandler>(type);
- return (Page) Request.Get(uri).execute().handleResponse(responseHandler);
+ public static Page execute(URI uri) throws IOException {
+ TypeToken type = new TypeToken>() {};
+ ResponseHandler> responseHandler = new ResponseHandler>(type);
+ return (Page) Request.Get(uri).execute().handleResponse(responseHandler);
}
/**
@@ -89,10 +89,10 @@ public static Page execute(URI uri) throws IOException {
* responses as ledgers close.
* @see Server-Sent Events
* @see Response Format documentation
- * @param listener {@link EventListener} implementation with {@link Effect} type
+ * @param listener {@link EventListener} implementation with {@link EffectResponse} type
* @return EventSource object, so you can close()
connection when not needed anymore
*/
- public EventSource stream(final EventListener listener) {
+ public EventSource stream(final EventListener listener) {
Client client = ClientBuilder.newBuilder().register(SseFeature.class).build();
WebTarget target = client.target(this.buildUri());
EventSource eventSource = new EventSource(target) {
@@ -102,7 +102,7 @@ public void onEvent(InboundEvent inboundEvent) {
if (data.equals("\"hello\"")) {
return;
}
- Effect effect = GsonSingleton.getInstance().fromJson(data, Effect.class);
+ EffectResponse effect = GsonSingleton.getInstance().fromJson(data, EffectResponse.class);
listener.onEvent(effect);
}
};
@@ -111,10 +111,10 @@ public void onEvent(InboundEvent inboundEvent) {
/**
* Build and execute request.
- * @return {@link Page} of {@link Effect}
+ * @return {@link Page} of {@link EffectResponse}
* @throws IOException
*/
- public Page execute() throws IOException {
+ public Page execute() throws IOException {
return this.execute(this.buildUri());
}
diff --git a/src/main/java/org/stellar/sdk/requests/LedgersRequestBuilder.java b/src/main/java/org/stellar/sdk/requests/LedgersRequestBuilder.java
index b155f6ace..7c2e09e10 100644
--- a/src/main/java/org/stellar/sdk/requests/LedgersRequestBuilder.java
+++ b/src/main/java/org/stellar/sdk/requests/LedgersRequestBuilder.java
@@ -7,7 +7,7 @@
import org.glassfish.jersey.media.sse.InboundEvent;
import org.glassfish.jersey.media.sse.SseFeature;
import org.stellar.sdk.responses.GsonSingleton;
-import org.stellar.sdk.responses.Ledger;
+import org.stellar.sdk.responses.LedgerResponse;
import org.stellar.sdk.responses.Page;
import java.io.IOException;
@@ -26,14 +26,14 @@ public LedgersRequestBuilder(URI serverURI) {
}
/**
- * Requests specific uri
and returns {@link Ledger}.
+ * Requests specific uri
and returns {@link LedgerResponse}.
* This method is helpful for getting the links.
* @throws IOException
*/
- public Ledger ledger(URI uri) throws IOException {
- TypeToken type = new TypeToken() {};
- ResponseHandler responseHandler = new ResponseHandler(type);
- return (Ledger) Request.Get(uri).execute().handleResponse(responseHandler);
+ public LedgerResponse ledger(URI uri) throws IOException {
+ TypeToken type = new TypeToken() {};
+ ResponseHandler responseHandler = new ResponseHandler(type);
+ return (LedgerResponse) Request.Get(uri).execute().handleResponse(responseHandler);
}
/**
@@ -42,21 +42,21 @@ public Ledger ledger(URI uri) throws IOException {
* @param ledgerSeq Ledger to fetch
* @throws IOException
*/
- public Ledger ledger(long ledgerSeq) throws IOException {
+ public LedgerResponse ledger(long ledgerSeq) throws IOException {
this.setSegments("ledgers", String.valueOf(ledgerSeq));
return this.ledger(this.buildUri());
}
/**
- * Requests specific uri
and returns {@link Page} of {@link Ledger}.
+ * Requests specific uri
and returns {@link Page} of {@link LedgerResponse}.
* This method is helpful for getting the next set of results.
- * @return {@link Page} of {@link Ledger}
+ * @return {@link Page} of {@link LedgerResponse}
* @throws IOException
*/
- public static Page execute(URI uri) throws IOException {
- TypeToken type = new TypeToken>() {};
- ResponseHandler> responseHandler = new ResponseHandler>(type);
- return (Page) Request.Get(uri).execute().handleResponse(responseHandler);
+ public static Page execute(URI uri) throws IOException {
+ TypeToken type = new TypeToken>() {};
+ ResponseHandler> responseHandler = new ResponseHandler>(type);
+ return (Page) Request.Get(uri).execute().handleResponse(responseHandler);
}
/**
@@ -66,10 +66,10 @@ public static Page execute(URI uri) throws IOException {
* responses as ledgers close.
* @see Server-Sent Events
* @see Response Format documentation
- * @param listener {@link EventListener} implementation with {@link Ledger} type
+ * @param listener {@link EventListener} implementation with {@link LedgerResponse} type
* @return EventSource object, so you can close()
connection when not needed anymore
*/
- public EventSource stream(final EventListener listener) {
+ public EventSource stream(final EventListener listener) {
Client client = ClientBuilder.newBuilder().register(SseFeature.class).build();
WebTarget target = client.target(this.buildUri());
EventSource eventSource = new EventSource(target) {
@@ -79,7 +79,7 @@ public void onEvent(InboundEvent inboundEvent) {
if (data.equals("\"hello\"")) {
return;
}
- Ledger ledger = GsonSingleton.getInstance().fromJson(data, Ledger.class);
+ LedgerResponse ledger = GsonSingleton.getInstance().fromJson(data, LedgerResponse.class);
listener.onEvent(ledger);
}
};
@@ -88,10 +88,10 @@ public void onEvent(InboundEvent inboundEvent) {
/**
* Build and execute request.
- * @return {@link Page} of {@link Ledger}
+ * @return {@link Page} of {@link LedgerResponse}
* @throws IOException
*/
- public Page execute() throws IOException {
+ public Page execute() throws IOException {
return this.execute(this.buildUri());
}
diff --git a/src/main/java/org/stellar/sdk/requests/OperationsRequestBuilder.java b/src/main/java/org/stellar/sdk/requests/OperationsRequestBuilder.java
index db08fbe68..a8f05ba18 100644
--- a/src/main/java/org/stellar/sdk/requests/OperationsRequestBuilder.java
+++ b/src/main/java/org/stellar/sdk/requests/OperationsRequestBuilder.java
@@ -5,7 +5,7 @@
import org.apache.http.client.fluent.Request;
import org.stellar.sdk.KeyPair;
import org.stellar.sdk.responses.Page;
-import org.stellar.sdk.responses.operations.Operation;
+import org.stellar.sdk.responses.operations.OperationResponse;
import java.io.IOException;
import java.net.URI;
@@ -21,14 +21,14 @@ public OperationsRequestBuilder(URI serverURI) {
}
/**
- * Requests specific uri
and returns {@link Operation}.
+ * Requests specific uri
and returns {@link OperationResponse}.
* This method is helpful for getting the links.
* @throws IOException
*/
- public Operation operation(URI uri) throws IOException {
- TypeToken type = new TypeToken() {};
- ResponseHandler responseHandler = new ResponseHandler(type);
- return (Operation) Request.Get(uri).execute().handleResponse(responseHandler);
+ public OperationResponse operation(URI uri) throws IOException {
+ TypeToken type = new TypeToken() {};
+ ResponseHandler responseHandler = new ResponseHandler(type);
+ return (OperationResponse) Request.Get(uri).execute().handleResponse(responseHandler);
}
/**
@@ -37,7 +37,7 @@ public Operation operation(URI uri) throws IOException {
* @param operationId Operation to fetch
* @throws IOException
*/
- public Operation operation(long operationId) throws IOException {
+ public OperationResponse operation(long operationId) throws IOException {
this.setSegments("operation", String.valueOf(operationId));
return this.operation(this.buildUri());
}
@@ -75,23 +75,23 @@ public OperationsRequestBuilder forTransaction(String transactionId) {
}
/**
- * Requests specific uri
and returns {@link Page} of {@link Operation}.
+ * Requests specific uri
and returns {@link Page} of {@link OperationResponse}.
* This method is helpful for getting the next set of results.
- * @return {@link Page} of {@link Operation}
+ * @return {@link Page} of {@link OperationResponse}
* @throws IOException
*/
- public static Page execute(URI uri) throws IOException {
- TypeToken type = new TypeToken>() {};
- ResponseHandler> responseHandler = new ResponseHandler>(type);
- return (Page) Request.Get(uri).execute().handleResponse(responseHandler);
+ public static Page execute(URI uri) throws IOException {
+ TypeToken type = new TypeToken>() {};
+ ResponseHandler> responseHandler = new ResponseHandler>(type);
+ return (Page) Request.Get(uri).execute().handleResponse(responseHandler);
}
/**
* Build and execute request.
- * @return {@link Page} of {@link Operation}
+ * @return {@link Page} of {@link OperationResponse}
* @throws IOException
*/
- public Page execute() throws IOException {
+ public Page execute() throws IOException {
return this.execute(this.buildUri());
}
diff --git a/src/main/java/org/stellar/sdk/requests/PathsRequestBuilder.java b/src/main/java/org/stellar/sdk/requests/PathsRequestBuilder.java
index 9ad730a9a..1407c297a 100644
--- a/src/main/java/org/stellar/sdk/requests/PathsRequestBuilder.java
+++ b/src/main/java/org/stellar/sdk/requests/PathsRequestBuilder.java
@@ -7,7 +7,7 @@
import org.stellar.sdk.AssetTypeCreditAlphaNum;
import org.stellar.sdk.KeyPair;
import org.stellar.sdk.responses.Page;
-import org.stellar.sdk.responses.Path;
+import org.stellar.sdk.responses.PathResponse;
import java.io.IOException;
import java.net.URI;
@@ -45,13 +45,13 @@ public PathsRequestBuilder destinationAsset(Asset asset) {
return this;
}
- public static Page execute(URI uri) throws IOException {
- TypeToken type = new TypeToken>() {};
- ResponseHandler> responseHandler = new ResponseHandler>(type);
- return (Page) Request.Get(uri).execute().handleResponse(responseHandler);
+ public static Page execute(URI uri) throws IOException {
+ TypeToken type = new TypeToken>() {};
+ ResponseHandler> responseHandler = new ResponseHandler>(type);
+ return (Page) Request.Get(uri).execute().handleResponse(responseHandler);
}
- public Page execute() throws IOException {
+ public Page execute() throws IOException {
return this.execute(this.buildUri());
}
}
diff --git a/src/main/java/org/stellar/sdk/requests/PaymentsRequestBuilder.java b/src/main/java/org/stellar/sdk/requests/PaymentsRequestBuilder.java
index adcf77c97..7b658327e 100644
--- a/src/main/java/org/stellar/sdk/requests/PaymentsRequestBuilder.java
+++ b/src/main/java/org/stellar/sdk/requests/PaymentsRequestBuilder.java
@@ -9,7 +9,7 @@
import org.stellar.sdk.KeyPair;
import org.stellar.sdk.responses.GsonSingleton;
import org.stellar.sdk.responses.Page;
-import org.stellar.sdk.responses.operations.Operation;
+import org.stellar.sdk.responses.operations.OperationResponse;
import java.io.IOException;
import java.net.URI;
@@ -61,15 +61,15 @@ public PaymentsRequestBuilder forTransaction(String transactionId) {
}
/**
- * Requests specific uri
and returns {@link Page} of {@link Operation}.
+ * Requests specific uri
and returns {@link Page} of {@link OperationResponse}.
* This method is helpful for getting the next set of results.
- * @return {@link Page} of {@link Operation}
+ * @return {@link Page} of {@link OperationResponse}
* @throws IOException
*/
- public static Page execute(URI uri) throws IOException {
- TypeToken type = new TypeToken>() {};
- ResponseHandler> responseHandler = new ResponseHandler>(type);
- return (Page) Request.Get(uri).execute().handleResponse(responseHandler);
+ public static Page execute(URI uri) throws IOException {
+ TypeToken type = new TypeToken>() {};
+ ResponseHandler> responseHandler = new ResponseHandler>(type);
+ return (Page) Request.Get(uri).execute().handleResponse(responseHandler);
}
/**
@@ -79,10 +79,10 @@ public static Page execute(URI uri) throws IOException {
* responses as ledgers close.
* @see Server-Sent Events
* @see Response Format documentation
- * @param listener {@link EventListener} implementation with {@link Operation} type
+ * @param listener {@link EventListener} implementation with {@link OperationResponse} type
* @return EventSource object, so you can close()
connection when not needed anymore
*/
- public EventSource stream(final EventListener listener) {
+ public EventSource stream(final EventListener listener) {
Client client = ClientBuilder.newBuilder().register(SseFeature.class).build();
WebTarget target = client.target(this.buildUri());
EventSource eventSource = new EventSource(target) {
@@ -92,7 +92,7 @@ public void onEvent(InboundEvent inboundEvent) {
if (data.equals("\"hello\"")) {
return;
}
- Operation payment = GsonSingleton.getInstance().fromJson(data, Operation.class);
+ OperationResponse payment = GsonSingleton.getInstance().fromJson(data, OperationResponse.class);
listener.onEvent(payment);
}
};
@@ -101,10 +101,10 @@ public void onEvent(InboundEvent inboundEvent) {
/**
* Build and execute request.
- * @return {@link Page} of {@link Operation}
+ * @return {@link Page} of {@link OperationResponse}
* @throws IOException
*/
- public Page execute() throws IOException {
+ public Page execute() throws IOException {
return this.execute(this.buildUri());
}
diff --git a/src/main/java/org/stellar/sdk/requests/TransactionsRequestBuilder.java b/src/main/java/org/stellar/sdk/requests/TransactionsRequestBuilder.java
index 627842122..345de308e 100644
--- a/src/main/java/org/stellar/sdk/requests/TransactionsRequestBuilder.java
+++ b/src/main/java/org/stellar/sdk/requests/TransactionsRequestBuilder.java
@@ -9,7 +9,7 @@
import org.stellar.sdk.KeyPair;
import org.stellar.sdk.responses.GsonSingleton;
import org.stellar.sdk.responses.Page;
-import org.stellar.sdk.responses.Transaction;
+import org.stellar.sdk.responses.TransactionResponse;
import java.io.IOException;
import java.net.URI;
@@ -29,14 +29,14 @@ public TransactionsRequestBuilder(URI serverURI) {
}
/**
- * Requests specific uri
and returns {@link Transaction}.
+ * Requests specific uri
and returns {@link TransactionResponse}.
* This method is helpful for getting the links.
* @throws IOException
*/
- public Transaction transaction(URI uri) throws IOException {
- TypeToken type = new TypeToken() {};
- ResponseHandler responseHandler = new ResponseHandler(type);
- return (Transaction) Request.Get(uri).execute().handleResponse(responseHandler);
+ public TransactionResponse transaction(URI uri) throws IOException {
+ TypeToken type = new TypeToken() {};
+ ResponseHandler responseHandler = new ResponseHandler(type);
+ return (TransactionResponse) Request.Get(uri).execute().handleResponse(responseHandler);
}
/**
@@ -45,7 +45,7 @@ public Transaction transaction(URI uri) throws IOException {
* @param transactionId Transaction to fetch
* @throws IOException
*/
- public Transaction transaction(String transactionId) throws IOException {
+ public TransactionResponse transaction(String transactionId) throws IOException {
this.setSegments("transaction", transactionId);
return this.transaction(this.buildUri());
}
@@ -72,15 +72,15 @@ public TransactionsRequestBuilder forLedger(long ledgerSeq) {
}
/**
- * Requests specific uri
and returns {@link Page} of {@link Transaction}.
+ * Requests specific uri
and returns {@link Page} of {@link TransactionResponse}.
* This method is helpful for getting the next set of results.
- * @return {@link Page} of {@link Transaction}
+ * @return {@link Page} of {@link TransactionResponse}
* @throws IOException
*/
- public static Page execute(URI uri) throws IOException {
- TypeToken type = new TypeToken>() {};
- ResponseHandler> responseHandler = new ResponseHandler>(type);
- return (Page) Request.Get(uri).execute().handleResponse(responseHandler);
+ public static Page execute(URI uri) throws IOException {
+ TypeToken type = new TypeToken>() {};
+ ResponseHandler> responseHandler = new ResponseHandler>(type);
+ return (Page) Request.Get(uri).execute().handleResponse(responseHandler);
}
/**
@@ -90,10 +90,10 @@ public static Page execute(URI uri) throws IOException {
* responses as ledgers close.
* @see Server-Sent Events
* @see Response Format documentation
- * @param listener {@link EventListener} implementation with {@link Transaction} type
+ * @param listener {@link EventListener} implementation with {@link TransactionResponse} type
* @return EventSource object, so you can close()
connection when not needed anymore
*/
- public EventSource stream(final EventListener listener) {
+ public EventSource stream(final EventListener listener) {
Client client = ClientBuilder.newBuilder().register(SseFeature.class).build();
WebTarget target = client.target(this.buildUri());
EventSource eventSource = new EventSource(target) {
@@ -103,7 +103,7 @@ public void onEvent(InboundEvent inboundEvent) {
if (data.equals("\"hello\"")) {
return;
}
- Transaction transaction = GsonSingleton.getInstance().fromJson(data, Transaction.class);
+ TransactionResponse transaction = GsonSingleton.getInstance().fromJson(data, TransactionResponse.class);
listener.onEvent(transaction);
}
};
@@ -112,10 +112,10 @@ public void onEvent(InboundEvent inboundEvent) {
/**
* Build and execute request.
- * @return {@link Page} of {@link Transaction}
+ * @return {@link Page} of {@link TransactionResponse}
* @throws IOException
*/
- public Page execute() throws IOException {
+ public Page execute() throws IOException {
return this.execute(this.buildUri());
}
diff --git a/src/main/java/org/stellar/sdk/responses/Account.java b/src/main/java/org/stellar/sdk/responses/AccountResponse.java
similarity index 96%
rename from src/main/java/org/stellar/sdk/responses/Account.java
rename to src/main/java/org/stellar/sdk/responses/AccountResponse.java
index f3fab5286..08dc1058d 100644
--- a/src/main/java/org/stellar/sdk/responses/Account.java
+++ b/src/main/java/org/stellar/sdk/responses/AccountResponse.java
@@ -12,7 +12,7 @@
* @see org.stellar.sdk.requests.AccountsRequestBuilder
* @see org.stellar.sdk.Server#accounts()
*/
-public class Account implements org.stellar.sdk.TransactionBuilderAccount {
+public class AccountResponse implements org.stellar.sdk.TransactionBuilderAccount {
@SerializedName("account_id") /* KeyPairTypeAdapter used */
private KeyPair keypair;
@SerializedName("sequence")
@@ -36,11 +36,11 @@ public class Account implements org.stellar.sdk.TransactionBuilderAccount {
@SerializedName("_links")
private Links links;
- Account(KeyPair keypair) {
+ AccountResponse(KeyPair keypair) {
this.keypair = keypair;
}
- public Account(KeyPair keypair, Long sequenceNumber) {
+ public AccountResponse(KeyPair keypair, Long sequenceNumber) {
this.keypair = keypair;
this.sequenceNumber = sequenceNumber;
}
diff --git a/src/main/java/org/stellar/sdk/responses/EffectDeserializer.java b/src/main/java/org/stellar/sdk/responses/EffectDeserializer.java
index ff6273a7c..aa8c72933 100644
--- a/src/main/java/org/stellar/sdk/responses/EffectDeserializer.java
+++ b/src/main/java/org/stellar/sdk/responses/EffectDeserializer.java
@@ -12,9 +12,9 @@
import java.lang.reflect.Type;
-class EffectDeserializer implements JsonDeserializer {
+class EffectDeserializer implements JsonDeserializer {
@Override
- public Effect deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
+ public EffectResponse deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
// Create new Gson object with adapters needed in Operation
Gson gson = new GsonBuilder()
.registerTypeAdapter(KeyPair.class, new KeyPairTypeAdapter().nullSafe())
@@ -24,46 +24,46 @@ public Effect deserialize(JsonElement json, Type typeOfT, JsonDeserializationCon
switch (type) {
// Account effects
case 0:
- return gson.fromJson(json, AccountCreatedEffect.class);
+ return gson.fromJson(json, AccountCreatedEffectResponse.class);
case 1:
- return gson.fromJson(json, AccountRemovedEffect.class);
+ return gson.fromJson(json, AccountRemovedEffectResponse.class);
case 2:
- return gson.fromJson(json, AccountCreditedEffect.class);
+ return gson.fromJson(json, AccountCreditedEffectResponse.class);
case 3:
- return gson.fromJson(json, AccountDebitedEffect.class);
+ return gson.fromJson(json, AccountDebitedEffectResponse.class);
case 4:
- return gson.fromJson(json, AccountThresholdsUpdatedEffect.class);
+ return gson.fromJson(json, AccountThresholdsUpdatedEffectResponse.class);
case 5:
- return gson.fromJson(json, AccountHomeDomainUpdatedEffect.class);
+ return gson.fromJson(json, AccountHomeDomainUpdatedEffectResponse.class);
case 6:
- return gson.fromJson(json, AccountFlagsUpdatedEffect.class);
+ return gson.fromJson(json, AccountFlagsUpdatedEffectResponse.class);
// Signer effects
case 10:
- return gson.fromJson(json, SignerCreatedEffect.class);
+ return gson.fromJson(json, SignerCreatedEffectResponse.class);
case 11:
- return gson.fromJson(json, SignerRemovedEffect.class);
+ return gson.fromJson(json, SignerRemovedEffectResponse.class);
case 12:
- return gson.fromJson(json, SignerUpdatedEffect.class);
+ return gson.fromJson(json, SignerUpdatedEffectResponse.class);
// Trustline effects
case 20:
- return gson.fromJson(json, TrustlineCreatedEffect.class);
+ return gson.fromJson(json, TrustlineCreatedEffectResponse.class);
case 21:
- return gson.fromJson(json, TrustlineRemovedEffect.class);
+ return gson.fromJson(json, TrustlineRemovedEffectResponse.class);
case 22:
- return gson.fromJson(json, TrustlineUpdatedEffect.class);
+ return gson.fromJson(json, TrustlineUpdatedEffectResponse.class);
case 23:
- return gson.fromJson(json, TrustlineAuthorizedEffect.class);
+ return gson.fromJson(json, TrustlineAuthorizedEffectResponse.class);
case 24:
- return gson.fromJson(json, TrustlineDeauthorizedEffect.class);
+ return gson.fromJson(json, TrustlineDeauthorizedEffectResponse.class);
// Trading effects
case 30:
- return gson.fromJson(json, OfferCreatedEffect.class);
+ return gson.fromJson(json, OfferCreatedEffectResponse.class);
case 31:
- return gson.fromJson(json, OfferRemovedEffect.class);
+ return gson.fromJson(json, OfferRemovedEffectResponse.class);
case 32:
- return gson.fromJson(json, OfferUpdatedEffect.class);
+ return gson.fromJson(json, OfferUpdatedEffectResponse.class);
case 33:
- return gson.fromJson(json, TradeEffect.class);
+ return gson.fromJson(json, TradeEffectResponse.class);
default:
throw new RuntimeException("Invalid operation type");
}
diff --git a/src/main/java/org/stellar/sdk/responses/GsonSingleton.java b/src/main/java/org/stellar/sdk/responses/GsonSingleton.java
index c848400b4..6f3c0a3e8 100644
--- a/src/main/java/org/stellar/sdk/responses/GsonSingleton.java
+++ b/src/main/java/org/stellar/sdk/responses/GsonSingleton.java
@@ -6,8 +6,8 @@
import org.stellar.sdk.Asset;
import org.stellar.sdk.KeyPair;
-import org.stellar.sdk.responses.effects.Effect;
-import org.stellar.sdk.responses.operations.Operation;
+import org.stellar.sdk.responses.effects.EffectResponse;
+import org.stellar.sdk.responses.operations.OperationResponse;
public class GsonSingleton {
private static Gson instance = null;
@@ -16,25 +16,25 @@ protected GsonSingleton() {}
public static Gson getInstance() {
if (instance == null) {
- TypeToken accountPageType = new TypeToken>() {};
- TypeToken effectPageType = new TypeToken>() {};
- TypeToken ledgerPageType = new TypeToken>() {};
- TypeToken operationPageType = new TypeToken>() {};
- TypeToken pathPageType = new TypeToken>() {};
- TypeToken transactionPageType = new TypeToken>() {};
+ TypeToken accountPageType = new TypeToken>() {};
+ TypeToken effectPageType = new TypeToken>() {};
+ TypeToken ledgerPageType = new TypeToken>() {};
+ TypeToken operationPageType = new TypeToken>() {};
+ TypeToken pathPageType = new TypeToken>() {};
+ TypeToken transactionPageType = new TypeToken>() {};
instance = new GsonBuilder()
.registerTypeAdapter(Asset.class, new AssetDeserializer())
.registerTypeAdapter(KeyPair.class, new KeyPairTypeAdapter().nullSafe())
- .registerTypeAdapter(Operation.class, new OperationDeserializer())
- .registerTypeAdapter(Effect.class, new EffectDeserializer())
- .registerTypeAdapter(Transaction.class, new TransactionDeserializer())
- .registerTypeAdapter(accountPageType.getType(), new PageDeserializer(accountPageType))
- .registerTypeAdapter(effectPageType.getType(), new PageDeserializer(effectPageType))
- .registerTypeAdapter(ledgerPageType.getType(), new PageDeserializer(ledgerPageType))
- .registerTypeAdapter(operationPageType.getType(), new PageDeserializer(operationPageType))
- .registerTypeAdapter(pathPageType.getType(), new PageDeserializer(pathPageType))
- .registerTypeAdapter(transactionPageType.getType(), new PageDeserializer(transactionPageType))
+ .registerTypeAdapter(OperationResponse.class, new OperationDeserializer())
+ .registerTypeAdapter(EffectResponse.class, new EffectDeserializer())
+ .registerTypeAdapter(TransactionResponse.class, new TransactionDeserializer())
+ .registerTypeAdapter(accountPageType.getType(), new PageDeserializer(accountPageType))
+ .registerTypeAdapter(effectPageType.getType(), new PageDeserializer(effectPageType))
+ .registerTypeAdapter(ledgerPageType.getType(), new PageDeserializer(ledgerPageType))
+ .registerTypeAdapter(operationPageType.getType(), new PageDeserializer(operationPageType))
+ .registerTypeAdapter(pathPageType.getType(), new PageDeserializer(pathPageType))
+ .registerTypeAdapter(transactionPageType.getType(), new PageDeserializer(transactionPageType))
.create();
}
return instance;
diff --git a/src/main/java/org/stellar/sdk/responses/Ledger.java b/src/main/java/org/stellar/sdk/responses/LedgerResponse.java
similarity index 91%
rename from src/main/java/org/stellar/sdk/responses/Ledger.java
rename to src/main/java/org/stellar/sdk/responses/LedgerResponse.java
index b72538a38..f0f4b4d63 100644
--- a/src/main/java/org/stellar/sdk/responses/Ledger.java
+++ b/src/main/java/org/stellar/sdk/responses/LedgerResponse.java
@@ -8,7 +8,7 @@
* @see org.stellar.sdk.requests.LedgersRequestBuilder
* @see org.stellar.sdk.Server#ledgers()
*/
-public class Ledger {
+public class LedgerResponse {
@SerializedName("sequence")
private final Long sequence;
@SerializedName("hash")
@@ -36,7 +36,7 @@ public class Ledger {
@SerializedName("_links")
private final Links links;
- Ledger(Long sequence, String hash, String pagingToken, String prevHash, Integer transactionCount, Integer operationCount, String closedAt, String totalCoins, String feePool, Long baseFee, String baseReserve, Integer maxTxSetSize, Links links) {
+ LedgerResponse(Long sequence, String hash, String pagingToken, String prevHash, Integer transactionCount, Integer operationCount, String closedAt, String totalCoins, String feePool, Long baseFee, String baseReserve, Integer maxTxSetSize, Links links) {
this.sequence = sequence;
this.hash = hash;
this.pagingToken = pagingToken;
diff --git a/src/main/java/org/stellar/sdk/responses/OperationDeserializer.java b/src/main/java/org/stellar/sdk/responses/OperationDeserializer.java
index 18e2bd3f1..142eaef3e 100644
--- a/src/main/java/org/stellar/sdk/responses/OperationDeserializer.java
+++ b/src/main/java/org/stellar/sdk/responses/OperationDeserializer.java
@@ -8,23 +8,23 @@
import com.google.gson.JsonParseException;
import org.stellar.sdk.KeyPair;
-import org.stellar.sdk.responses.operations.Operation;
-import org.stellar.sdk.responses.operations.CreateAccountOperation;
-import org.stellar.sdk.responses.operations.PaymentOperation;
-import org.stellar.sdk.responses.operations.PathPaymentOperation;
-import org.stellar.sdk.responses.operations.ManageOfferOperation;
-import org.stellar.sdk.responses.operations.CreatePassiveOfferOperation;
-import org.stellar.sdk.responses.operations.SetOptionsOperation;
-import org.stellar.sdk.responses.operations.ChangeTrustOperation;
-import org.stellar.sdk.responses.operations.AllowTrustOperation;
-import org.stellar.sdk.responses.operations.AccountMergeOperation;
-import org.stellar.sdk.responses.operations.InflationOperation;
+import org.stellar.sdk.responses.operations.OperationResponse;
+import org.stellar.sdk.responses.operations.CreateAccountOperationResponse;
+import org.stellar.sdk.responses.operations.PaymentOperationResponse;
+import org.stellar.sdk.responses.operations.PathPaymentOperationResponse;
+import org.stellar.sdk.responses.operations.ManageOfferOperationResponse;
+import org.stellar.sdk.responses.operations.CreatePassiveOfferOperationResponse;
+import org.stellar.sdk.responses.operations.SetOptionsOperationResponse;
+import org.stellar.sdk.responses.operations.ChangeTrustOperationResponse;
+import org.stellar.sdk.responses.operations.AllowTrustOperationResponse;
+import org.stellar.sdk.responses.operations.AccountMergeOperationResponse;
+import org.stellar.sdk.responses.operations.InflationOperationResponse;
import java.lang.reflect.Type;
-class OperationDeserializer implements JsonDeserializer {
+class OperationDeserializer implements JsonDeserializer {
@Override
- public Operation deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
+ public OperationResponse deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
// Create new Gson object with adapters needed in Operation
Gson gson = new GsonBuilder()
.registerTypeAdapter(KeyPair.class, new KeyPairTypeAdapter().nullSafe())
@@ -33,25 +33,25 @@ public Operation deserialize(JsonElement json, Type typeOfT, JsonDeserialization
int type = json.getAsJsonObject().get("type_i").getAsInt();
switch (type) {
case 0:
- return gson.fromJson(json, CreateAccountOperation.class);
+ return gson.fromJson(json, CreateAccountOperationResponse.class);
case 1:
- return gson.fromJson(json, PaymentOperation.class);
+ return gson.fromJson(json, PaymentOperationResponse.class);
case 2:
- return gson.fromJson(json, PathPaymentOperation.class);
+ return gson.fromJson(json, PathPaymentOperationResponse.class);
case 3:
- return gson.fromJson(json, ManageOfferOperation.class);
+ return gson.fromJson(json, ManageOfferOperationResponse.class);
case 4:
- return gson.fromJson(json, CreatePassiveOfferOperation.class);
+ return gson.fromJson(json, CreatePassiveOfferOperationResponse.class);
case 5:
- return gson.fromJson(json, SetOptionsOperation.class);
+ return gson.fromJson(json, SetOptionsOperationResponse.class);
case 6:
- return gson.fromJson(json, ChangeTrustOperation.class);
+ return gson.fromJson(json, ChangeTrustOperationResponse.class);
case 7:
- return gson.fromJson(json, AllowTrustOperation.class);
+ return gson.fromJson(json, AllowTrustOperationResponse.class);
case 8:
- return gson.fromJson(json, AccountMergeOperation.class);
+ return gson.fromJson(json, AccountMergeOperationResponse.class);
case 9:
- return gson.fromJson(json, InflationOperation.class);
+ return gson.fromJson(json, InflationOperationResponse.class);
default:
throw new RuntimeException("Invalid operation type");
}
diff --git a/src/main/java/org/stellar/sdk/responses/PageDeserializer.java b/src/main/java/org/stellar/sdk/responses/PageDeserializer.java
index 2f5dce12f..0637983f8 100644
--- a/src/main/java/org/stellar/sdk/responses/PageDeserializer.java
+++ b/src/main/java/org/stellar/sdk/responses/PageDeserializer.java
@@ -11,8 +11,8 @@
import org.stellar.sdk.Asset;
import org.stellar.sdk.KeyPair;
-import org.stellar.sdk.responses.effects.Effect;
-import org.stellar.sdk.responses.operations.Operation;
+import org.stellar.sdk.responses.effects.EffectResponse;
+import org.stellar.sdk.responses.operations.OperationResponse;
import java.lang.reflect.Type;
@@ -41,8 +41,8 @@ public Page deserialize(JsonElement json, Type typeOfT, JsonDeserializationCo
Gson gson = new GsonBuilder()
.registerTypeAdapter(Asset.class, new AssetDeserializer())
.registerTypeAdapter(KeyPair.class, new KeyPairTypeAdapter().nullSafe())
- .registerTypeAdapter(Operation.class, new OperationDeserializer())
- .registerTypeAdapter(Effect.class, new EffectDeserializer())
+ .registerTypeAdapter(OperationResponse.class, new OperationDeserializer())
+ .registerTypeAdapter(EffectResponse.class, new EffectDeserializer())
.create();
return gson.fromJson(newJson, pageType.getType());
diff --git a/src/main/java/org/stellar/sdk/responses/Path.java b/src/main/java/org/stellar/sdk/responses/PathResponse.java
similarity index 90%
rename from src/main/java/org/stellar/sdk/responses/Path.java
rename to src/main/java/org/stellar/sdk/responses/PathResponse.java
index 73d78ecd2..1032796a1 100644
--- a/src/main/java/org/stellar/sdk/responses/Path.java
+++ b/src/main/java/org/stellar/sdk/responses/PathResponse.java
@@ -14,7 +14,7 @@
* @see org.stellar.sdk.requests.PathsRequestBuilder
* @see org.stellar.sdk.Server#paths()
*/
-public class Path {
+public class PathResponse {
@SerializedName("destination_amount")
private final String destinationAmount;
@SerializedName("destination_asset_type")
@@ -39,7 +39,7 @@ public class Path {
@SerializedName("_links")
private final Links links;
- Path(String destinationAmount, String destinationAssetType, String destinationAssetCode, String destinationAssetIssuer, String sourceAmount, String sourceAssetType, String sourceAssetCode, String sourceAssetIssuer, ArrayList path, Links links) {
+ PathResponse(String destinationAmount, String destinationAssetType, String destinationAssetCode, String destinationAssetIssuer, String sourceAmount, String sourceAssetType, String sourceAssetCode, String sourceAssetIssuer, ArrayList path, Links links) {
this.destinationAmount = destinationAmount;
this.destinationAssetType = destinationAssetType;
this.destinationAssetCode = destinationAssetCode;
diff --git a/src/main/java/org/stellar/sdk/responses/TransactionDeserializer.java b/src/main/java/org/stellar/sdk/responses/TransactionDeserializer.java
index 4c086c5c2..6d1ba8fe6 100644
--- a/src/main/java/org/stellar/sdk/responses/TransactionDeserializer.java
+++ b/src/main/java/org/stellar/sdk/responses/TransactionDeserializer.java
@@ -13,15 +13,15 @@
import java.lang.reflect.Type;
-public class TransactionDeserializer implements JsonDeserializer {
+public class TransactionDeserializer implements JsonDeserializer {
@Override
- public Transaction deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
+ public TransactionResponse deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
// Create new Gson object with adapters needed in Transaction
Gson gson = new GsonBuilder()
.registerTypeAdapter(KeyPair.class, new KeyPairTypeAdapter().nullSafe())
.create();
- Transaction transaction = gson.fromJson(json, Transaction.class);
+ TransactionResponse transaction = gson.fromJson(json, TransactionResponse.class);
String memoType = json.getAsJsonObject().get("memo_type").getAsString();
Memo memo;
diff --git a/src/main/java/org/stellar/sdk/responses/Transaction.java b/src/main/java/org/stellar/sdk/responses/TransactionResponse.java
similarity index 93%
rename from src/main/java/org/stellar/sdk/responses/Transaction.java
rename to src/main/java/org/stellar/sdk/responses/TransactionResponse.java
index db122c61e..453839463 100644
--- a/src/main/java/org/stellar/sdk/responses/Transaction.java
+++ b/src/main/java/org/stellar/sdk/responses/TransactionResponse.java
@@ -13,7 +13,7 @@
* @see org.stellar.sdk.requests.TransactionsRequestBuilder
* @see org.stellar.sdk.Server#transactions()
*/
-public class Transaction {
+public class TransactionResponse {
@SerializedName("hash")
private final String hash;
@SerializedName("ledger")
@@ -43,7 +43,7 @@ public class Transaction {
// because Memo is an abstract class and GSON tries to instantiate it.
private transient Memo memo;
- Transaction(String hash, Long ledger, String createdAt, KeyPair sourceAccount, String pagingToken, Long sourceAccountSequence, Long feePaid, Integer operationCount, String envelopeXdr, String resultXdr, String resultMetaXdr, Memo memo, Links links) {
+ TransactionResponse(String hash, Long ledger, String createdAt, KeyPair sourceAccount, String pagingToken, Long sourceAccountSequence, Long feePaid, Integer operationCount, String envelopeXdr, String resultXdr, String resultMetaXdr, Memo memo, Links links) {
this.hash = hash;
this.ledger = ledger;
this.createdAt = createdAt;
diff --git a/src/main/java/org/stellar/sdk/responses/effects/AccountCreatedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/AccountCreatedEffectResponse.java
similarity index 82%
rename from src/main/java/org/stellar/sdk/responses/effects/AccountCreatedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/AccountCreatedEffectResponse.java
index 25de47547..7e5f08960 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/AccountCreatedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/AccountCreatedEffectResponse.java
@@ -8,11 +8,11 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class AccountCreatedEffect extends Effect {
+public class AccountCreatedEffectResponse extends EffectResponse {
@SerializedName("starting_balance")
protected final String startingBalance;
- AccountCreatedEffect(String startingBalance) {
+ AccountCreatedEffectResponse(String startingBalance) {
this.startingBalance = startingBalance;
}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/AccountCreditedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/AccountCreditedEffectResponse.java
similarity index 87%
rename from src/main/java/org/stellar/sdk/responses/effects/AccountCreditedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/AccountCreditedEffectResponse.java
index 35ef002c8..952da6512 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/AccountCreditedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/AccountCreditedEffectResponse.java
@@ -13,7 +13,7 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class AccountCreditedEffect extends Effect {
+public class AccountCreditedEffectResponse extends EffectResponse {
@SerializedName("amount")
protected final String amount;
@SerializedName("asset_type")
@@ -23,7 +23,7 @@ public class AccountCreditedEffect extends Effect {
@SerializedName("asset_issuer")
protected final String assetIssuer;
- AccountCreditedEffect(String amount, String assetType, String assetCode, String assetIssuer) {
+ AccountCreditedEffectResponse(String amount, String assetType, String assetCode, String assetIssuer) {
this.amount = amount;
this.assetType = assetType;
this.assetCode = assetCode;
diff --git a/src/main/java/org/stellar/sdk/responses/effects/AccountDebitedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/AccountDebitedEffectResponse.java
similarity index 87%
rename from src/main/java/org/stellar/sdk/responses/effects/AccountDebitedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/AccountDebitedEffectResponse.java
index c20ddaf9d..d51f9b3e1 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/AccountDebitedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/AccountDebitedEffectResponse.java
@@ -12,7 +12,7 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class AccountDebitedEffect extends Effect {
+public class AccountDebitedEffectResponse extends EffectResponse {
@SerializedName("amount")
protected final String amount;
@SerializedName("asset_type")
@@ -22,7 +22,7 @@ public class AccountDebitedEffect extends Effect {
@SerializedName("asset_issuer")
protected final String assetIssuer;
- AccountDebitedEffect(String amount, String assetType, String assetCode, String assetIssuer) {
+ AccountDebitedEffectResponse(String amount, String assetType, String assetCode, String assetIssuer) {
this.amount = amount;
this.assetType = assetType;
this.assetCode = assetCode;
diff --git a/src/main/java/org/stellar/sdk/responses/effects/AccountFlagsUpdatedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/AccountFlagsUpdatedEffectResponse.java
similarity index 83%
rename from src/main/java/org/stellar/sdk/responses/effects/AccountFlagsUpdatedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/AccountFlagsUpdatedEffectResponse.java
index 06545ccd5..5585d71c4 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/AccountFlagsUpdatedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/AccountFlagsUpdatedEffectResponse.java
@@ -8,13 +8,13 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class AccountFlagsUpdatedEffect extends Effect {
+public class AccountFlagsUpdatedEffectResponse extends EffectResponse {
@SerializedName("auth_required_flag")
protected final Boolean authRequiredFlag;
@SerializedName("auth_revokable_flag")
protected final Boolean authRevokableFlag;
- AccountFlagsUpdatedEffect(Boolean authRequiredFlag, Boolean authRevokableFlag) {
+ AccountFlagsUpdatedEffectResponse(Boolean authRequiredFlag, Boolean authRevokableFlag) {
this.authRequiredFlag = authRequiredFlag;
this.authRevokableFlag = authRevokableFlag;
}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/AccountHomeDomainUpdatedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/AccountHomeDomainUpdatedEffectResponse.java
similarity index 80%
rename from src/main/java/org/stellar/sdk/responses/effects/AccountHomeDomainUpdatedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/AccountHomeDomainUpdatedEffectResponse.java
index 65db29e4c..7e4e687e0 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/AccountHomeDomainUpdatedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/AccountHomeDomainUpdatedEffectResponse.java
@@ -8,11 +8,11 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class AccountHomeDomainUpdatedEffect extends Effect {
+public class AccountHomeDomainUpdatedEffectResponse extends EffectResponse {
@SerializedName("home_domain")
protected final String homeDomain;
- AccountHomeDomainUpdatedEffect(String homeDomain) {
+ AccountHomeDomainUpdatedEffectResponse(String homeDomain) {
this.homeDomain = homeDomain;
}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/AccountRemovedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/AccountRemovedEffectResponse.java
similarity index 82%
rename from src/main/java/org/stellar/sdk/responses/effects/AccountRemovedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/AccountRemovedEffectResponse.java
index 61f8b4f5a..44ce78765 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/AccountRemovedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/AccountRemovedEffectResponse.java
@@ -6,4 +6,4 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class AccountRemovedEffect extends Effect {}
+public class AccountRemovedEffectResponse extends EffectResponse {}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/AccountThresholdsUpdatedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/AccountThresholdsUpdatedEffectResponse.java
similarity index 83%
rename from src/main/java/org/stellar/sdk/responses/effects/AccountThresholdsUpdatedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/AccountThresholdsUpdatedEffectResponse.java
index 8439eff33..b675efb9e 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/AccountThresholdsUpdatedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/AccountThresholdsUpdatedEffectResponse.java
@@ -8,7 +8,7 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class AccountThresholdsUpdatedEffect extends Effect {
+public class AccountThresholdsUpdatedEffectResponse extends EffectResponse {
@SerializedName("low_threshold")
protected final Integer lowThreshold;
@SerializedName("med_threshold")
@@ -16,7 +16,7 @@ public class AccountThresholdsUpdatedEffect extends Effect {
@SerializedName("high_threshold")
protected final Integer highThreshold;
- AccountThresholdsUpdatedEffect(Integer lowThreshold, Integer medThreshold, Integer highThreshold) {
+ AccountThresholdsUpdatedEffectResponse(Integer lowThreshold, Integer medThreshold, Integer highThreshold) {
this.lowThreshold = lowThreshold;
this.medThreshold = medThreshold;
this.highThreshold = highThreshold;
diff --git a/src/main/java/org/stellar/sdk/responses/effects/Effect.java b/src/main/java/org/stellar/sdk/responses/effects/EffectResponse.java
similarity index 98%
rename from src/main/java/org/stellar/sdk/responses/effects/Effect.java
rename to src/main/java/org/stellar/sdk/responses/effects/EffectResponse.java
index f6136d197..69b02b4c1 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/Effect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/EffectResponse.java
@@ -11,7 +11,7 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public abstract class Effect {
+public abstract class EffectResponse {
@SerializedName("id")
protected String id;
@SerializedName("account")
diff --git a/src/main/java/org/stellar/sdk/responses/effects/OfferCreatedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/OfferCreatedEffectResponse.java
similarity index 83%
rename from src/main/java/org/stellar/sdk/responses/effects/OfferCreatedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/OfferCreatedEffectResponse.java
index 3f06adfc9..aaf2c96ed 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/OfferCreatedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/OfferCreatedEffectResponse.java
@@ -6,6 +6,6 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class OfferCreatedEffect extends Effect {
+public class OfferCreatedEffectResponse extends EffectResponse {
//
}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/OfferRemovedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/OfferRemovedEffectResponse.java
similarity index 83%
rename from src/main/java/org/stellar/sdk/responses/effects/OfferRemovedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/OfferRemovedEffectResponse.java
index 73e5cb641..2bf136758 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/OfferRemovedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/OfferRemovedEffectResponse.java
@@ -6,6 +6,6 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class OfferRemovedEffect extends Effect {
+public class OfferRemovedEffectResponse extends EffectResponse {
//
}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/OfferUpdatedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/OfferUpdatedEffectResponse.java
similarity index 83%
rename from src/main/java/org/stellar/sdk/responses/effects/OfferUpdatedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/OfferUpdatedEffectResponse.java
index 4b87f5038..fe9e6128c 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/OfferUpdatedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/OfferUpdatedEffectResponse.java
@@ -6,6 +6,6 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class OfferUpdatedEffect extends Effect {
+public class OfferUpdatedEffectResponse extends EffectResponse {
//
}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/SignerCreatedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/SignerCreatedEffectResponse.java
similarity index 72%
rename from src/main/java/org/stellar/sdk/responses/effects/SignerCreatedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/SignerCreatedEffectResponse.java
index 13ee30679..9b9bb02f4 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/SignerCreatedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/SignerCreatedEffectResponse.java
@@ -6,8 +6,8 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class SignerCreatedEffect extends SignerEffect {
- SignerCreatedEffect(Integer weight, String publicKey) {
+public class SignerCreatedEffectResponse extends SignerEffectResponse {
+ SignerCreatedEffectResponse(Integer weight, String publicKey) {
super(weight, publicKey);
}
}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/SignerEffect.java b/src/main/java/org/stellar/sdk/responses/effects/SignerEffectResponse.java
similarity index 76%
rename from src/main/java/org/stellar/sdk/responses/effects/SignerEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/SignerEffectResponse.java
index fa24941d2..d02dc4725 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/SignerEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/SignerEffectResponse.java
@@ -2,13 +2,13 @@
import com.google.gson.annotations.SerializedName;
-abstract class SignerEffect extends Effect {
+abstract class SignerEffectResponse extends EffectResponse {
@SerializedName("weight")
protected final Integer weight;
@SerializedName("public_key")
protected final String publicKey;
- public SignerEffect(Integer weight, String publicKey) {
+ public SignerEffectResponse(Integer weight, String publicKey) {
this.weight = weight;
this.publicKey = publicKey;
}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/SignerRemovedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/SignerRemovedEffect.java
deleted file mode 100644
index 776b8f73c..000000000
--- a/src/main/java/org/stellar/sdk/responses/effects/SignerRemovedEffect.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.stellar.sdk.responses.effects;
-
-/**
- * Represents signer_removed effect response.
- */
-public class SignerRemovedEffect extends SignerEffect {
- SignerRemovedEffect(Integer weight, String publicKey) {
- super(weight, publicKey);
- }
-}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/SignerRemovedEffectResponse.java b/src/main/java/org/stellar/sdk/responses/effects/SignerRemovedEffectResponse.java
new file mode 100644
index 000000000..69ec1886a
--- /dev/null
+++ b/src/main/java/org/stellar/sdk/responses/effects/SignerRemovedEffectResponse.java
@@ -0,0 +1,10 @@
+package org.stellar.sdk.responses.effects;
+
+/**
+ * Represents signer_removed effect response.
+ */
+public class SignerRemovedEffectResponse extends SignerEffectResponse {
+ SignerRemovedEffectResponse(Integer weight, String publicKey) {
+ super(weight, publicKey);
+ }
+}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/SignerUpdatedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/SignerUpdatedEffectResponse.java
similarity index 72%
rename from src/main/java/org/stellar/sdk/responses/effects/SignerUpdatedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/SignerUpdatedEffectResponse.java
index a08e4c146..12865740c 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/SignerUpdatedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/SignerUpdatedEffectResponse.java
@@ -6,8 +6,8 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class SignerUpdatedEffect extends SignerEffect {
- SignerUpdatedEffect(Integer weight, String publicKey) {
+public class SignerUpdatedEffectResponse extends SignerEffectResponse {
+ SignerUpdatedEffectResponse(Integer weight, String publicKey) {
super(weight, publicKey);
}
}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/TradeEffect.java b/src/main/java/org/stellar/sdk/responses/effects/TradeEffectResponse.java
similarity index 89%
rename from src/main/java/org/stellar/sdk/responses/effects/TradeEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/TradeEffectResponse.java
index a2b9fed9b..cf7acf007 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/TradeEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/TradeEffectResponse.java
@@ -12,7 +12,7 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class TradeEffect extends Effect {
+public class TradeEffectResponse extends EffectResponse {
@SerializedName("seller")
protected final KeyPair seller;
@SerializedName("offer_id")
@@ -36,7 +36,7 @@ public class TradeEffect extends Effect {
@SerializedName("bought_asset_issuer")
protected final String boughtAssetIssuer;
- TradeEffect(KeyPair seller, Long offerId, String soldAmount, String soldAssetType, String soldAssetCode, String soldAssetIssuer, String boughtAmount, String boughtAssetType, String boughtAssetCode, String boughtAssetIssuer) {
+ TradeEffectResponse(KeyPair seller, Long offerId, String soldAmount, String soldAssetType, String soldAssetCode, String soldAssetIssuer, String boughtAmount, String boughtAssetType, String boughtAssetCode, String boughtAssetIssuer) {
this.seller = seller;
this.offerId = offerId;
this.soldAmount = soldAmount;
diff --git a/src/main/java/org/stellar/sdk/responses/effects/TrustlineAuthorization.java b/src/main/java/org/stellar/sdk/responses/effects/TrustlineAuthorizationResponse.java
similarity index 79%
rename from src/main/java/org/stellar/sdk/responses/effects/TrustlineAuthorization.java
rename to src/main/java/org/stellar/sdk/responses/effects/TrustlineAuthorizationResponse.java
index bc4986459..92d3e1d0a 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/TrustlineAuthorization.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/TrustlineAuthorizationResponse.java
@@ -4,7 +4,7 @@
import org.stellar.sdk.KeyPair;
-abstract class TrustlineAuthorization extends Effect {
+abstract class TrustlineAuthorizationResponse extends EffectResponse {
@SerializedName("trustor")
protected final KeyPair trustor;
@SerializedName("asset_type")
@@ -12,7 +12,7 @@ abstract class TrustlineAuthorization extends Effect {
@SerializedName("asset_code")
protected final String assetCode;
- TrustlineAuthorization(KeyPair trustor, String assetType, String assetCode) {
+ TrustlineAuthorizationResponse(KeyPair trustor, String assetType, String assetCode) {
this.trustor = trustor;
this.assetType = assetType;
this.assetCode = assetCode;
diff --git a/src/main/java/org/stellar/sdk/responses/effects/TrustlineAuthorizedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/TrustlineAuthorizedEffectResponse.java
similarity index 69%
rename from src/main/java/org/stellar/sdk/responses/effects/TrustlineAuthorizedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/TrustlineAuthorizedEffectResponse.java
index e687668ea..6d258d848 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/TrustlineAuthorizedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/TrustlineAuthorizedEffectResponse.java
@@ -8,8 +8,8 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class TrustlineAuthorizedEffect extends TrustlineAuthorization {
- TrustlineAuthorizedEffect(KeyPair trustor, String assetType, String assetCode) {
+public class TrustlineAuthorizedEffectResponse extends TrustlineAuthorizationResponse {
+ TrustlineAuthorizedEffectResponse(KeyPair trustor, String assetType, String assetCode) {
super(trustor, assetType, assetCode);
}
}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/TrustlineCUD.java b/src/main/java/org/stellar/sdk/responses/effects/TrustlineCUDResponse.java
similarity index 84%
rename from src/main/java/org/stellar/sdk/responses/effects/TrustlineCUD.java
rename to src/main/java/org/stellar/sdk/responses/effects/TrustlineCUDResponse.java
index e36480e78..65d2ff618 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/TrustlineCUD.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/TrustlineCUDResponse.java
@@ -6,7 +6,7 @@
import org.stellar.sdk.AssetTypeNative;
import org.stellar.sdk.KeyPair;
-abstract class TrustlineCUD extends Effect {
+abstract class TrustlineCUDResponse extends EffectResponse {
@SerializedName("limit")
protected final String limit;
@SerializedName("asset_type")
@@ -16,7 +16,7 @@ abstract class TrustlineCUD extends Effect {
@SerializedName("asset_issuer")
protected final String assetIssuer;
- public TrustlineCUD(String limit, String assetType, String assetCode, String assetIssuer) {
+ public TrustlineCUDResponse(String limit, String assetType, String assetCode, String assetIssuer) {
this.limit = limit;
this.assetType = assetType;
this.assetCode = assetCode;
diff --git a/src/main/java/org/stellar/sdk/responses/effects/TrustlineCreatedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/TrustlineCreatedEffectResponse.java
similarity index 68%
rename from src/main/java/org/stellar/sdk/responses/effects/TrustlineCreatedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/TrustlineCreatedEffectResponse.java
index c632002bc..e600b5464 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/TrustlineCreatedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/TrustlineCreatedEffectResponse.java
@@ -6,8 +6,8 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class TrustlineCreatedEffect extends TrustlineCUD {
- TrustlineCreatedEffect(String limit, String assetType, String assetCode, String assetIssuer) {
+public class TrustlineCreatedEffectResponse extends TrustlineCUDResponse {
+ TrustlineCreatedEffectResponse(String limit, String assetType, String assetCode, String assetIssuer) {
super(limit, assetType, assetCode, assetIssuer);
}
}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/TrustlineDeauthorizedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/TrustlineDeauthorizedEffectResponse.java
similarity index 69%
rename from src/main/java/org/stellar/sdk/responses/effects/TrustlineDeauthorizedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/TrustlineDeauthorizedEffectResponse.java
index 7741082d9..84cf1712c 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/TrustlineDeauthorizedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/TrustlineDeauthorizedEffectResponse.java
@@ -8,8 +8,8 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class TrustlineDeauthorizedEffect extends TrustlineAuthorization {
- TrustlineDeauthorizedEffect(KeyPair trustor, String assetType, String assetCode) {
+public class TrustlineDeauthorizedEffectResponse extends TrustlineAuthorizationResponse {
+ TrustlineDeauthorizedEffectResponse(KeyPair trustor, String assetType, String assetCode) {
super(trustor, assetType, assetCode);
}
}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/TrustlineRemovedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/TrustlineRemovedEffectResponse.java
similarity index 68%
rename from src/main/java/org/stellar/sdk/responses/effects/TrustlineRemovedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/TrustlineRemovedEffectResponse.java
index af3e6a052..0936d620d 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/TrustlineRemovedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/TrustlineRemovedEffectResponse.java
@@ -6,8 +6,8 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class TrustlineRemovedEffect extends TrustlineCUD {
- TrustlineRemovedEffect(String limit, String assetType, String assetCode, String assetIssuer) {
+public class TrustlineRemovedEffectResponse extends TrustlineCUDResponse {
+ TrustlineRemovedEffectResponse(String limit, String assetType, String assetCode, String assetIssuer) {
super(limit, assetType, assetCode, assetIssuer);
}
}
diff --git a/src/main/java/org/stellar/sdk/responses/effects/TrustlineUpdatedEffect.java b/src/main/java/org/stellar/sdk/responses/effects/TrustlineUpdatedEffectResponse.java
similarity index 68%
rename from src/main/java/org/stellar/sdk/responses/effects/TrustlineUpdatedEffect.java
rename to src/main/java/org/stellar/sdk/responses/effects/TrustlineUpdatedEffectResponse.java
index e2d53ada8..a1c085f0d 100644
--- a/src/main/java/org/stellar/sdk/responses/effects/TrustlineUpdatedEffect.java
+++ b/src/main/java/org/stellar/sdk/responses/effects/TrustlineUpdatedEffectResponse.java
@@ -6,8 +6,8 @@
* @see org.stellar.sdk.requests.EffectsRequestBuilder
* @see org.stellar.sdk.Server#effects()
*/
-public class TrustlineUpdatedEffect extends TrustlineCUD {
- TrustlineUpdatedEffect(String limit, String assetType, String assetCode, String assetIssuer) {
+public class TrustlineUpdatedEffectResponse extends TrustlineCUDResponse {
+ TrustlineUpdatedEffectResponse(String limit, String assetType, String assetCode, String assetIssuer) {
super(limit, assetType, assetCode, assetIssuer);
}
}
diff --git a/src/main/java/org/stellar/sdk/responses/operations/AccountMergeOperation.java b/src/main/java/org/stellar/sdk/responses/operations/AccountMergeOperationResponse.java
similarity index 84%
rename from src/main/java/org/stellar/sdk/responses/operations/AccountMergeOperation.java
rename to src/main/java/org/stellar/sdk/responses/operations/AccountMergeOperationResponse.java
index c6480981c..6856a7a98 100644
--- a/src/main/java/org/stellar/sdk/responses/operations/AccountMergeOperation.java
+++ b/src/main/java/org/stellar/sdk/responses/operations/AccountMergeOperationResponse.java
@@ -10,13 +10,13 @@
* @see org.stellar.sdk.requests.OperationsRequestBuilder
* @see org.stellar.sdk.Server#operations()
*/
-public class AccountMergeOperation extends Operation {
+public class AccountMergeOperationResponse extends OperationResponse {
@SerializedName("account")
protected final KeyPair account;
@SerializedName("into")
protected final KeyPair into;
- AccountMergeOperation(KeyPair account, KeyPair into) {
+ AccountMergeOperationResponse(KeyPair account, KeyPair into) {
this.account = account;
this.into = into;
}
diff --git a/src/main/java/org/stellar/sdk/responses/operations/AllowTrustOperation.java b/src/main/java/org/stellar/sdk/responses/operations/AllowTrustOperationResponse.java
similarity index 87%
rename from src/main/java/org/stellar/sdk/responses/operations/AllowTrustOperation.java
rename to src/main/java/org/stellar/sdk/responses/operations/AllowTrustOperationResponse.java
index 99eccd988..b394a6b3b 100644
--- a/src/main/java/org/stellar/sdk/responses/operations/AllowTrustOperation.java
+++ b/src/main/java/org/stellar/sdk/responses/operations/AllowTrustOperationResponse.java
@@ -12,7 +12,7 @@
* @see org.stellar.sdk.requests.OperationsRequestBuilder
* @see org.stellar.sdk.Server#operations()
*/
-public class AllowTrustOperation extends Operation {
+public class AllowTrustOperationResponse extends OperationResponse {
@SerializedName("trustor")
protected final KeyPair trustor;
@SerializedName("trustee")
@@ -26,7 +26,7 @@ public class AllowTrustOperation extends Operation {
@SerializedName("authorize")
protected final boolean authorize;
- AllowTrustOperation(boolean authorize, String assetIssuer, String assetCode, String assetType, KeyPair trustee, KeyPair trustor) {
+ AllowTrustOperationResponse(boolean authorize, String assetIssuer, String assetCode, String assetType, KeyPair trustee, KeyPair trustor) {
this.authorize = authorize;
this.assetIssuer = assetIssuer;
this.assetCode = assetCode;
diff --git a/src/main/java/org/stellar/sdk/responses/operations/ChangeTrustOperation.java b/src/main/java/org/stellar/sdk/responses/operations/ChangeTrustOperationResponse.java
similarity index 87%
rename from src/main/java/org/stellar/sdk/responses/operations/ChangeTrustOperation.java
rename to src/main/java/org/stellar/sdk/responses/operations/ChangeTrustOperationResponse.java
index 97b646ea4..33e167eb3 100644
--- a/src/main/java/org/stellar/sdk/responses/operations/ChangeTrustOperation.java
+++ b/src/main/java/org/stellar/sdk/responses/operations/ChangeTrustOperationResponse.java
@@ -12,7 +12,7 @@
* @see org.stellar.sdk.requests.OperationsRequestBuilder
* @see org.stellar.sdk.Server#operations()
*/
-public class ChangeTrustOperation extends Operation {
+public class ChangeTrustOperationResponse extends OperationResponse {
@SerializedName("trustor")
protected final KeyPair trustor;
@SerializedName("trustee")
@@ -26,7 +26,7 @@ public class ChangeTrustOperation extends Operation {
@SerializedName("limit")
protected final String limit;
- ChangeTrustOperation(KeyPair trustor, KeyPair trustee, String assetType, String assetCode, String assetIssuer, String limit) {
+ ChangeTrustOperationResponse(KeyPair trustor, KeyPair trustee, String assetType, String assetCode, String assetIssuer, String limit) {
this.trustor = trustor;
this.trustee = trustee;
this.assetType = assetType;
diff --git a/src/main/java/org/stellar/sdk/responses/operations/CreateAccountOperation.java b/src/main/java/org/stellar/sdk/responses/operations/CreateAccountOperationResponse.java
similarity index 84%
rename from src/main/java/org/stellar/sdk/responses/operations/CreateAccountOperation.java
rename to src/main/java/org/stellar/sdk/responses/operations/CreateAccountOperationResponse.java
index 60b83d533..c7764b04a 100644
--- a/src/main/java/org/stellar/sdk/responses/operations/CreateAccountOperation.java
+++ b/src/main/java/org/stellar/sdk/responses/operations/CreateAccountOperationResponse.java
@@ -10,7 +10,7 @@
* @see org.stellar.sdk.requests.OperationsRequestBuilder
* @see org.stellar.sdk.Server#operations()
*/
-public class CreateAccountOperation extends Operation {
+public class CreateAccountOperationResponse extends OperationResponse {
@SerializedName("account")
protected final KeyPair account;
@SerializedName("funder")
@@ -18,7 +18,7 @@ public class CreateAccountOperation extends Operation {
@SerializedName("starting_balance")
protected final String startingBalance;
- CreateAccountOperation(KeyPair funder, String startingBalance, KeyPair account) {
+ CreateAccountOperationResponse(KeyPair funder, String startingBalance, KeyPair account) {
this.funder = funder;
this.startingBalance = startingBalance;
this.account = account;
diff --git a/src/main/java/org/stellar/sdk/responses/operations/CreatePassiveOfferOperation.java b/src/main/java/org/stellar/sdk/responses/operations/CreatePassiveOfferOperationResponse.java
similarity index 88%
rename from src/main/java/org/stellar/sdk/responses/operations/CreatePassiveOfferOperation.java
rename to src/main/java/org/stellar/sdk/responses/operations/CreatePassiveOfferOperationResponse.java
index 1506b1381..74b2b6ce9 100644
--- a/src/main/java/org/stellar/sdk/responses/operations/CreatePassiveOfferOperation.java
+++ b/src/main/java/org/stellar/sdk/responses/operations/CreatePassiveOfferOperationResponse.java
@@ -12,7 +12,7 @@
* @see org.stellar.sdk.requests.OperationsRequestBuilder
* @see org.stellar.sdk.Server#operations()
*/
-public class CreatePassiveOfferOperation extends Operation {
+public class CreatePassiveOfferOperationResponse extends OperationResponse {
@SerializedName("offer_id")
protected final Integer offerId;
@SerializedName("amount")
@@ -36,7 +36,7 @@ public class CreatePassiveOfferOperation extends Operation {
@SerializedName("selling_asset_issuer")
protected final String sellingAssetIssuer;
- CreatePassiveOfferOperation(Integer offerId, String amount, String price, String buyingAssetType, String buyingAssetCode, String buyingAssetIssuer, String sellingAssetType, String sellingAssetCode, String sellingAssetIssuer) {
+ CreatePassiveOfferOperationResponse(Integer offerId, String amount, String price, String buyingAssetType, String buyingAssetCode, String buyingAssetIssuer, String sellingAssetType, String sellingAssetCode, String sellingAssetIssuer) {
this.offerId = offerId;
this.amount = amount;
this.price = price;
diff --git a/src/main/java/org/stellar/sdk/responses/operations/InflationOperation.java b/src/main/java/org/stellar/sdk/responses/operations/InflationOperationResponse.java
similarity index 83%
rename from src/main/java/org/stellar/sdk/responses/operations/InflationOperation.java
rename to src/main/java/org/stellar/sdk/responses/operations/InflationOperationResponse.java
index eff6c9135..c0054d224 100644
--- a/src/main/java/org/stellar/sdk/responses/operations/InflationOperation.java
+++ b/src/main/java/org/stellar/sdk/responses/operations/InflationOperationResponse.java
@@ -6,5 +6,5 @@
* @see org.stellar.sdk.requests.OperationsRequestBuilder
* @see org.stellar.sdk.Server#operations()
*/
-public class InflationOperation extends Operation {
+public class InflationOperationResponse extends OperationResponse {
}
diff --git a/src/main/java/org/stellar/sdk/responses/operations/ManageOfferOperation.java b/src/main/java/org/stellar/sdk/responses/operations/ManageOfferOperationResponse.java
similarity index 88%
rename from src/main/java/org/stellar/sdk/responses/operations/ManageOfferOperation.java
rename to src/main/java/org/stellar/sdk/responses/operations/ManageOfferOperationResponse.java
index ed27417ef..e0da51b15 100644
--- a/src/main/java/org/stellar/sdk/responses/operations/ManageOfferOperation.java
+++ b/src/main/java/org/stellar/sdk/responses/operations/ManageOfferOperationResponse.java
@@ -12,7 +12,7 @@
* @see org.stellar.sdk.requests.OperationsRequestBuilder
* @see org.stellar.sdk.Server#operations()
*/
-public class ManageOfferOperation extends Operation {
+public class ManageOfferOperationResponse extends OperationResponse {
@SerializedName("offer_id")
protected final Integer offerId;
@SerializedName("amount")
@@ -36,7 +36,7 @@ public class ManageOfferOperation extends Operation {
@SerializedName("selling_asset_issuer")
protected final String sellingAssetIssuer;
- ManageOfferOperation(Integer offerId, String amount, String price, String buyingAssetType, String buyingAssetCode, String buyingAssetIssuer, String sellingAssetType, String sellingAssetCode, String sellingAssetIssuer) {
+ ManageOfferOperationResponse(Integer offerId, String amount, String price, String buyingAssetType, String buyingAssetCode, String buyingAssetIssuer, String sellingAssetType, String sellingAssetCode, String sellingAssetIssuer) {
this.offerId = offerId;
this.amount = amount;
this.price = price;
diff --git a/src/main/java/org/stellar/sdk/responses/operations/Operation.java b/src/main/java/org/stellar/sdk/responses/operations/OperationResponse.java
similarity index 98%
rename from src/main/java/org/stellar/sdk/responses/operations/Operation.java
rename to src/main/java/org/stellar/sdk/responses/operations/OperationResponse.java
index 3d51f1458..b701e983f 100644
--- a/src/main/java/org/stellar/sdk/responses/operations/Operation.java
+++ b/src/main/java/org/stellar/sdk/responses/operations/OperationResponse.java
@@ -11,7 +11,7 @@
* @see org.stellar.sdk.requests.OperationsRequestBuilder
* @see org.stellar.sdk.Server#operations()
*/
-public abstract class Operation {
+public abstract class OperationResponse {
@SerializedName("id")
protected Long id;
@SerializedName("source_account")
diff --git a/src/main/java/org/stellar/sdk/responses/operations/PathPaymentOperation.java b/src/main/java/org/stellar/sdk/responses/operations/PathPaymentOperationResponse.java
similarity index 88%
rename from src/main/java/org/stellar/sdk/responses/operations/PathPaymentOperation.java
rename to src/main/java/org/stellar/sdk/responses/operations/PathPaymentOperationResponse.java
index 8a16bed93..8750f2ff8 100644
--- a/src/main/java/org/stellar/sdk/responses/operations/PathPaymentOperation.java
+++ b/src/main/java/org/stellar/sdk/responses/operations/PathPaymentOperationResponse.java
@@ -12,7 +12,7 @@
* @see org.stellar.sdk.requests.OperationsRequestBuilder
* @see org.stellar.sdk.Server#operations()
*/
-public class PathPaymentOperation extends Operation {
+public class PathPaymentOperationResponse extends OperationResponse {
@SerializedName("amount")
protected final String amount;
@SerializedName("source_amount")
@@ -36,7 +36,7 @@ public class PathPaymentOperation extends Operation {
@SerializedName("send_asset_issuer")
protected final String sendAssetIssuer;
- PathPaymentOperation(String amount, String sourceAmount, KeyPair from, KeyPair to, String assetType, String assetCode, String assetIssuer, String sendAssetType, String sendAssetCode, String sendAssetIssuer) {
+ PathPaymentOperationResponse(String amount, String sourceAmount, KeyPair from, KeyPair to, String assetType, String assetCode, String assetIssuer, String sendAssetType, String sendAssetCode, String sendAssetIssuer) {
this.amount = amount;
this.sourceAmount = sourceAmount;
this.from = from;
diff --git a/src/main/java/org/stellar/sdk/responses/operations/PaymentOperation.java b/src/main/java/org/stellar/sdk/responses/operations/PaymentOperationResponse.java
similarity index 88%
rename from src/main/java/org/stellar/sdk/responses/operations/PaymentOperation.java
rename to src/main/java/org/stellar/sdk/responses/operations/PaymentOperationResponse.java
index 1c455a58f..623d5257e 100644
--- a/src/main/java/org/stellar/sdk/responses/operations/PaymentOperation.java
+++ b/src/main/java/org/stellar/sdk/responses/operations/PaymentOperationResponse.java
@@ -12,7 +12,7 @@
* @see org.stellar.sdk.requests.OperationsRequestBuilder
* @see org.stellar.sdk.Server#operations()
*/
-public class PaymentOperation extends Operation {
+public class PaymentOperationResponse extends OperationResponse {
@SerializedName("amount")
protected final String amount;
@SerializedName("asset_type")
@@ -26,7 +26,7 @@ public class PaymentOperation extends Operation {
@SerializedName("to")
protected final KeyPair to;
- PaymentOperation(String amount, String assetType, String assetCode, String assetIssuer, KeyPair from, KeyPair to) {
+ PaymentOperationResponse(String amount, String assetType, String assetCode, String assetIssuer, KeyPair from, KeyPair to) {
this.amount = amount;
this.assetType = assetType;
this.assetCode = assetCode;
diff --git a/src/main/java/org/stellar/sdk/responses/operations/SetOptionsOperation.java b/src/main/java/org/stellar/sdk/responses/operations/SetOptionsOperationResponse.java
similarity index 87%
rename from src/main/java/org/stellar/sdk/responses/operations/SetOptionsOperation.java
rename to src/main/java/org/stellar/sdk/responses/operations/SetOptionsOperationResponse.java
index ae7c4524a..02cf45044 100644
--- a/src/main/java/org/stellar/sdk/responses/operations/SetOptionsOperation.java
+++ b/src/main/java/org/stellar/sdk/responses/operations/SetOptionsOperationResponse.java
@@ -10,7 +10,7 @@
* @see org.stellar.sdk.requests.OperationsRequestBuilder
* @see org.stellar.sdk.Server#operations()
*/
-public class SetOptionsOperation extends Operation {
+public class SetOptionsOperationResponse extends OperationResponse {
@SerializedName("low_threshold")
protected final Integer lowThreshold;
@SerializedName("med_threshold")
@@ -32,7 +32,7 @@ public class SetOptionsOperation extends Operation {
@SerializedName("set_flags_s")
protected final String[] setFlags;
- SetOptionsOperation(Integer lowThreshold, Integer medThreshold, Integer highThreshold, KeyPair inflationDestination, String homeDomain, KeyPair signerKey, Integer signerWeight, Integer masterKeyWeight, String[] clearFlags, String[] setFlags) {
+ SetOptionsOperationResponse(Integer lowThreshold, Integer medThreshold, Integer highThreshold, KeyPair inflationDestination, String homeDomain, KeyPair signerKey, Integer signerWeight, Integer masterKeyWeight, String[] clearFlags, String[] setFlags) {
this.lowThreshold = lowThreshold;
this.medThreshold = medThreshold;
this.highThreshold = highThreshold;
diff --git a/src/test/java/org/stellar/sdk/responses/AccountDeserializerTest.java b/src/test/java/org/stellar/sdk/responses/AccountDeserializerTest.java
index e6e717a9c..912218d4c 100644
--- a/src/test/java/org/stellar/sdk/responses/AccountDeserializerTest.java
+++ b/src/test/java/org/stellar/sdk/responses/AccountDeserializerTest.java
@@ -7,7 +7,7 @@
public class AccountDeserializerTest extends TestCase {
@Test
public void testDeserialize() {
- Account account = GsonSingleton.getInstance().fromJson(json, Account.class);
+ AccountResponse account = GsonSingleton.getInstance().fromJson(json, AccountResponse.class);
assertEquals(account.getKeypair().getAccountId(), "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7");
assertEquals(account.getPagingToken(), "1");
assertEquals(account.getSequenceNumber(), new Long(2319149195853854L));
diff --git a/src/test/java/org/stellar/sdk/responses/AccountsPageDeserializerTest.java b/src/test/java/org/stellar/sdk/responses/AccountsPageDeserializerTest.java
index 6cf0e956d..bf59055cd 100644
--- a/src/test/java/org/stellar/sdk/responses/AccountsPageDeserializerTest.java
+++ b/src/test/java/org/stellar/sdk/responses/AccountsPageDeserializerTest.java
@@ -9,7 +9,7 @@
public class AccountsPageDeserializerTest extends TestCase {
@Test
public void testDeserialize() {
- Page accountsPage = GsonSingleton.getInstance().fromJson(json, new TypeToken>() {}.getType());
+ Page accountsPage = GsonSingleton.getInstance().fromJson(json, new TypeToken>() {}.getType());
assertEquals(accountsPage.getRecords().get(0).getKeypair().getAccountId(), "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7");
assertEquals(accountsPage.getRecords().get(0).getPagingToken(), "1");
diff --git a/src/test/java/org/stellar/sdk/responses/EffectDeserializerTest.java b/src/test/java/org/stellar/sdk/responses/EffectDeserializerTest.java
index 654bde5be..232a7d790 100644
--- a/src/test/java/org/stellar/sdk/responses/EffectDeserializerTest.java
+++ b/src/test/java/org/stellar/sdk/responses/EffectDeserializerTest.java
@@ -31,7 +31,7 @@ public void testDeserializeAccountCreatedEffect() {
" \"starting_balance\": \"30.0\"\n" +
" }";
- AccountCreatedEffect effect = (AccountCreatedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ AccountCreatedEffectResponse effect = (AccountCreatedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GCBQ6JRBPF3SXQBQ6SO5MRBE7WVV4UCHYOSHQGXSZNPZLFRYVYOWBZRQ");
assertEquals(effect.getStartingBalance(), "30.0");
@@ -63,7 +63,7 @@ public void testDeserializeAccountRemovedEffect() {
" \"type_i\": 1\n"+
" }";
- AccountRemovedEffect effect = (AccountRemovedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ AccountRemovedEffectResponse effect = (AccountRemovedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GCBQ6JRBPF3SXQBQ6SO5MRBE7WVV4UCHYOSHQGXSZNPZLFRYVYOWBZRQ");
@@ -95,7 +95,7 @@ public void testDeserializeAccountCreditedEffect() {
" \"amount\": \"1000.0\"\n" +
" }";
- AccountCreditedEffect effect = (AccountCreditedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ AccountCreditedEffectResponse effect = (AccountCreditedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GDLGTRIBFH24364GPWPUS45GUFC2GU4ARPGWTXVCPLGTUHX3IOS3ON47");
TestCase.assertEquals(effect.getAsset(), new AssetTypeNative());
@@ -129,7 +129,7 @@ public void testDeserializeAccountDebitedEffect() {
" \"amount\": \"30.0\"\n" +
" }";
- AccountDebitedEffect effect = (AccountDebitedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ AccountDebitedEffectResponse effect = (AccountDebitedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GBRPYHIL2CI3FNQ4BXLFMNDLFJUNPU2HY3ZMFSHONUCEOASW7QC7OX2H");
assertEquals(effect.getAsset(), new AssetTypeNative());
@@ -164,7 +164,7 @@ public void testDeserializeAccountThresholdsUpdatedEffect() {
" \"type_i\": 4\n" +
" }";
- AccountThresholdsUpdatedEffect effect = (AccountThresholdsUpdatedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ AccountThresholdsUpdatedEffectResponse effect = (AccountThresholdsUpdatedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GA6U5X6WOPNKKDKQULBR7IDHDBAQKOWPHYEC7WSXHZBFEYFD3XVZAKOO");
assertEquals(effect.getLowThreshold(), new Integer(2));
@@ -198,7 +198,7 @@ public void testDeserializeAccountHomeDomainUpdatedEffect() {
" \"home_domain\": \"stellar.org\"\n" +
" }";
- AccountHomeDomainUpdatedEffect effect = (AccountHomeDomainUpdatedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ AccountHomeDomainUpdatedEffectResponse effect = (AccountHomeDomainUpdatedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GA6U5X6WOPNKKDKQULBR7IDHDBAQKOWPHYEC7WSXHZBFEYFD3XVZAKOO");
assertEquals(effect.getHomeDomain(), "stellar.org");
@@ -231,7 +231,7 @@ public void testDeserializeAccountFlagsUpdatedEffect() {
" \"auth_revokable_flag\": true\n" +
" }";
- AccountFlagsUpdatedEffect effect = (AccountFlagsUpdatedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ AccountFlagsUpdatedEffectResponse effect = (AccountFlagsUpdatedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GA6U5X6WOPNKKDKQULBR7IDHDBAQKOWPHYEC7WSXHZBFEYFD3XVZAKOO");
assertEquals(effect.getAuthRequiredFlag(), new Boolean(false));
@@ -265,7 +265,7 @@ public void testDeserializeSignerCreatedEffect() {
" \"public_key\": \"GB24LPGAHYTWRYOXIDKXLI55SBRWW42T3TZKDAAW3BOJX4ADVIATFTLU\"\n" +
" }";
- SignerCreatedEffect effect = (SignerCreatedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ SignerCreatedEffectResponse effect = (SignerCreatedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GB24LPGAHYTWRYOXIDKXLI55SBRWW42T3TZKDAAW3BOJX4ADVIATFTLU");
assertEquals(effect.getWeight(), new Integer(1));
@@ -299,7 +299,7 @@ public void testDeserializeSignerRemovedEffect() {
" \"public_key\": \"GCFKT6BN2FEASCEVDNHEC4LLFT2KLUUPEMKM4OJPEJ65H2AEZ7IH4RV6\"\n" +
" }";
- SignerRemovedEffect effect = (SignerRemovedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ SignerRemovedEffectResponse effect = (SignerRemovedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GCFKT6BN2FEASCEVDNHEC4LLFT2KLUUPEMKM4OJPEJ65H2AEZ7IH4RV6");
assertEquals(effect.getWeight(), new Integer(0));
@@ -333,7 +333,7 @@ public void testDeserializeSignerUpdatedEffect() {
" \"public_key\": \"GA6U5X6WOPNKKDKQULBR7IDHDBAQKOWPHYEC7WSXHZBFEYFD3XVZAKOO\"\n" +
" }";
- SignerUpdatedEffect effect = (SignerUpdatedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ SignerUpdatedEffectResponse effect = (SignerUpdatedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GA6U5X6WOPNKKDKQULBR7IDHDBAQKOWPHYEC7WSXHZBFEYFD3XVZAKOO");
assertEquals(effect.getWeight(), new Integer(2));
@@ -369,7 +369,7 @@ public void testDeserializeTrustlineCreatedEffect() {
" \"limit\": \"1000.0\"\n" +
" }";
- TrustlineCreatedEffect effect = (TrustlineCreatedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ TrustlineCreatedEffectResponse effect = (TrustlineCreatedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GA6U5X6WOPNKKDKQULBR7IDHDBAQKOWPHYEC7WSXHZBFEYFD3XVZAKOO");
TestCase.assertEquals(effect.getAsset(), Asset.createNonNativeAsset("EUR", KeyPair.fromAccountId("GAZN3PPIDQCSP5JD4ETQQQ2IU2RMFYQTAL4NNQZUGLLO2XJJJ3RDSDGA")));
@@ -405,7 +405,7 @@ public void testDeserializeTrustlineRemovedEffect() {
" \"limit\": \"0.0\"\n" +
" }";
- TrustlineRemovedEffect effect = (TrustlineRemovedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ TrustlineRemovedEffectResponse effect = (TrustlineRemovedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GA6U5X6WOPNKKDKQULBR7IDHDBAQKOWPHYEC7WSXHZBFEYFD3XVZAKOO");
assertEquals(effect.getAsset(), Asset.createNonNativeAsset("EUR", KeyPair.fromAccountId("GAZN3PPIDQCSP5JD4ETQQQ2IU2RMFYQTAL4NNQZUGLLO2XJJJ3RDSDGA")));
@@ -441,7 +441,7 @@ public void testDeserializeTrustlineUpdatedEffect() {
" \"limit\": \"100.0\"\n" +
" }";
- TrustlineUpdatedEffect effect = (TrustlineUpdatedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ TrustlineUpdatedEffectResponse effect = (TrustlineUpdatedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GA6U5X6WOPNKKDKQULBR7IDHDBAQKOWPHYEC7WSXHZBFEYFD3XVZAKOO");
assertEquals(effect.getAsset(), Asset.createNonNativeAsset("TESTTEST", KeyPair.fromAccountId("GAZN3PPIDQCSP5JD4ETQQQ2IU2RMFYQTAL4NNQZUGLLO2XJJJ3RDSDGA")));
@@ -476,7 +476,7 @@ public void testDeserializeTrustlineAuthorizedEffect() {
" \"trustor\": \"GB3E4AB4VWXJDUVN4Z3CPBU5HTMWVEQXONZYVDFMHQD6333KHCOL3UBR\"\n" +
" }";
- TrustlineAuthorizedEffect effect = (TrustlineAuthorizedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ TrustlineAuthorizedEffectResponse effect = (TrustlineAuthorizedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GA6U5X6WOPNKKDKQULBR7IDHDBAQKOWPHYEC7WSXHZBFEYFD3XVZAKOO");
assertEquals(effect.getAssetType(), "credit_alphanum12");
@@ -512,7 +512,7 @@ public void testDeserializeTrustlineDeauthorizedEffect() {
" \"trustor\": \"GB3E4AB4VWXJDUVN4Z3CPBU5HTMWVEQXONZYVDFMHQD6333KHCOL3UBR\"\n" +
" }";
- TrustlineDeauthorizedEffect effect = (TrustlineDeauthorizedEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ TrustlineDeauthorizedEffectResponse effect = (TrustlineDeauthorizedEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GA6U5X6WOPNKKDKQULBR7IDHDBAQKOWPHYEC7WSXHZBFEYFD3XVZAKOO");
assertEquals(effect.getAssetType(), "credit_alphanum4");
@@ -555,7 +555,7 @@ public void testDeserializeTradeEffect() {
" \"bought_asset_issuer\": \"GAHXPUDP3AK6F2QQM4FIRBGPNGKLRDDSTQCVKEXXKKRHJZUUQ23D5BU7\"\n" +
" }";
- TradeEffect effect = (TradeEffect) GsonSingleton.getInstance().fromJson(json, Effect.class);
+ TradeEffectResponse effect = (TradeEffectResponse) GsonSingleton.getInstance().fromJson(json, EffectResponse.class);
assertEquals(effect.getAccount().getAccountId(), "GA6U5X6WOPNKKDKQULBR7IDHDBAQKOWPHYEC7WSXHZBFEYFD3XVZAKOO");
assertEquals(effect.getSeller().getAccountId(), "GCVHDLN6EHZBYW2M3BQIY32C23E4GPIRZZDBNF2Q73DAZ5VJDRGSMYRB");
diff --git a/src/test/java/org/stellar/sdk/responses/EffectsPageDeserializerTest.java b/src/test/java/org/stellar/sdk/responses/EffectsPageDeserializerTest.java
index d1643c3d5..da650407b 100644
--- a/src/test/java/org/stellar/sdk/responses/EffectsPageDeserializerTest.java
+++ b/src/test/java/org/stellar/sdk/responses/EffectsPageDeserializerTest.java
@@ -5,20 +5,20 @@
import junit.framework.TestCase;
import org.junit.Test;
-import org.stellar.sdk.responses.effects.AccountCreatedEffect;
-import org.stellar.sdk.responses.effects.Effect;
-import org.stellar.sdk.responses.effects.SignerCreatedEffect;
+import org.stellar.sdk.responses.effects.AccountCreatedEffectResponse;
+import org.stellar.sdk.responses.effects.EffectResponse;
+import org.stellar.sdk.responses.effects.SignerCreatedEffectResponse;
public class EffectsPageDeserializerTest extends TestCase {
@Test
public void testDeserialize() {
- Page effectsPage = GsonSingleton.getInstance().fromJson(json, new TypeToken>() {}.getType());
+ Page effectsPage = GsonSingleton.getInstance().fromJson(json, new TypeToken>() {}.getType());
- SignerCreatedEffect signerCreatedEffect = (SignerCreatedEffect) effectsPage.getRecords().get(0);
+ SignerCreatedEffectResponse signerCreatedEffect = (SignerCreatedEffectResponse) effectsPage.getRecords().get(0);
assertEquals(signerCreatedEffect.getPublicKey(), "GAZHVTAM3NRJ6W643LOVA76T2W3TUKPF34ED5VNE4ZKJ2B5T2EUQHIQI");
assertEquals(signerCreatedEffect.getPagingToken(), "3964757325385729-3");
- AccountCreatedEffect accountCreatedEffect = (AccountCreatedEffect) effectsPage.getRecords().get(8);
+ AccountCreatedEffectResponse accountCreatedEffect = (AccountCreatedEffectResponse) effectsPage.getRecords().get(8);
assertEquals(accountCreatedEffect.getStartingBalance(), "10000.0");
assertEquals(accountCreatedEffect.getAccount().getAccountId(), "GDIQJ6G5AWSBRMHIZYWVWCFN64Q4BZ4TYEAQRO5GVR4EWR23RKBJ2A4R");
diff --git a/src/test/java/org/stellar/sdk/responses/LedgerDeserializerTest.java b/src/test/java/org/stellar/sdk/responses/LedgerDeserializerTest.java
index 63462c192..c7538ce0d 100644
--- a/src/test/java/org/stellar/sdk/responses/LedgerDeserializerTest.java
+++ b/src/test/java/org/stellar/sdk/responses/LedgerDeserializerTest.java
@@ -40,7 +40,7 @@ public void testDeserialize() {
" \"max_tx_set_size\": 50\n" +
"}";
- Ledger ledger = GsonSingleton.getInstance().fromJson(json, Ledger.class);
+ LedgerResponse ledger = GsonSingleton.getInstance().fromJson(json, LedgerResponse.class);
assertEquals(ledger.getHash(), "686bb246db89b099cd3963a4633eb5e4315d89dfd3c00594c80b41a483847bfa");
assertEquals(ledger.getPagingToken(), "3860428274794496");
assertEquals(ledger.getPrevHash(), "50c8695eb32171a19858413e397cc50b504ceacc819010bdf8ff873aff7858d7");
diff --git a/src/test/java/org/stellar/sdk/responses/LedgerPageDeserializerTest.java b/src/test/java/org/stellar/sdk/responses/LedgerPageDeserializerTest.java
index 3e32065f5..5eecc0e93 100644
--- a/src/test/java/org/stellar/sdk/responses/LedgerPageDeserializerTest.java
+++ b/src/test/java/org/stellar/sdk/responses/LedgerPageDeserializerTest.java
@@ -9,7 +9,7 @@
public class LedgerPageDeserializerTest extends TestCase {
@Test
public void testDeserialize() {
- Page ledgersPage = GsonSingleton.getInstance().fromJson(json, new TypeToken>() {}.getType());
+ Page ledgersPage = GsonSingleton.getInstance().fromJson(json, new TypeToken>() {}.getType());
assertEquals(ledgersPage.getRecords().get(0).getHash(), "f6fc9a29b5ecec90348e17a10a60e019c5cb8ea24f66a1063e92c13391b09b8d");
assertEquals(ledgersPage.getRecords().get(0).getPagingToken(), "3862202096287744");
assertEquals(ledgersPage.getRecords().get(9).getHash(), "8552b7d130e602ed068bcfec729b3056d0c8b94d77f06d91cd1ec8323c2d6177");
diff --git a/src/test/java/org/stellar/sdk/responses/OperationDeserializerTest.java b/src/test/java/org/stellar/sdk/responses/OperationDeserializerTest.java
index 020d27419..28d7317bd 100644
--- a/src/test/java/org/stellar/sdk/responses/OperationDeserializerTest.java
+++ b/src/test/java/org/stellar/sdk/responses/OperationDeserializerTest.java
@@ -7,17 +7,17 @@
import org.stellar.sdk.KeyPair;
import org.junit.Test;
-import org.stellar.sdk.responses.operations.AccountMergeOperation;
-import org.stellar.sdk.responses.operations.AllowTrustOperation;
-import org.stellar.sdk.responses.operations.ChangeTrustOperation;
-import org.stellar.sdk.responses.operations.CreateAccountOperation;
-import org.stellar.sdk.responses.operations.CreatePassiveOfferOperation;
-import org.stellar.sdk.responses.operations.InflationOperation;
-import org.stellar.sdk.responses.operations.ManageOfferOperation;
-import org.stellar.sdk.responses.operations.Operation;
-import org.stellar.sdk.responses.operations.PathPaymentOperation;
-import org.stellar.sdk.responses.operations.PaymentOperation;
-import org.stellar.sdk.responses.operations.SetOptionsOperation;
+import org.stellar.sdk.responses.operations.AccountMergeOperationResponse;
+import org.stellar.sdk.responses.operations.AllowTrustOperationResponse;
+import org.stellar.sdk.responses.operations.ChangeTrustOperationResponse;
+import org.stellar.sdk.responses.operations.CreateAccountOperationResponse;
+import org.stellar.sdk.responses.operations.CreatePassiveOfferOperationResponse;
+import org.stellar.sdk.responses.operations.InflationOperationResponse;
+import org.stellar.sdk.responses.operations.ManageOfferOperationResponse;
+import org.stellar.sdk.responses.operations.OperationResponse;
+import org.stellar.sdk.responses.operations.PathPaymentOperationResponse;
+import org.stellar.sdk.responses.operations.PaymentOperationResponse;
+import org.stellar.sdk.responses.operations.SetOptionsOperationResponse;
public class OperationDeserializerTest extends TestCase {
@Test
@@ -50,7 +50,7 @@ public void testDeserializeCreateAccountOperation() {
" \"type\": \"create_account\",\n" +
" \"type_i\": 0\n" +
"}";
- CreateAccountOperation operation = (CreateAccountOperation) GsonSingleton.getInstance().fromJson(json, Operation.class);
+ CreateAccountOperationResponse operation = (CreateAccountOperationResponse) GsonSingleton.getInstance().fromJson(json, OperationResponse.class);
assertEquals(operation.getSourceAccount().getAccountId(), "GD6WU64OEP5C4LRBH6NK3MHYIA2ADN6K6II6EXPNVUR3ERBXT4AN4ACD");
assertEquals(operation.getPagingToken(), "3936840037961729");
@@ -98,7 +98,7 @@ public void testDeserializePaymentOperation() {
" \"type\": \"payment\",\n" +
" \"type_i\": 1\n" +
" }";
- PaymentOperation operation = (PaymentOperation) GsonSingleton.getInstance().fromJson(json, Operation.class);
+ PaymentOperationResponse operation = (PaymentOperationResponse) GsonSingleton.getInstance().fromJson(json, OperationResponse.class);
assertEquals(operation.getSourceAccount().getAccountId(), "GB6NVEN5HSUBKMYCE5ZOWSK5K23TBWRUQLZY3KNMXUZ3AQ2ESC4MY4AQ");
assertEquals(operation.getId(), new Long(3940808587743233L));
@@ -142,7 +142,7 @@ public void testDeserializeNonNativePaymentOperation() {
" \"amount\": \"1000000000.0\"\n" +
" }";
- PaymentOperation operation = (PaymentOperation) GsonSingleton.getInstance().fromJson(json, Operation.class);
+ PaymentOperationResponse operation = (PaymentOperationResponse) GsonSingleton.getInstance().fromJson(json, OperationResponse.class);
assertEquals(operation.getFrom().getAccountId(), "GAZN3PPIDQCSP5JD4ETQQQ2IU2RMFYQTAL4NNQZUGLLO2XJJJ3RDSDGA");
assertEquals(operation.getTo().getAccountId(), "GBHUSIZZ7FS2OMLZVZ4HLWJMXQ336NFSXHYERD7GG54NRITDTEWWBBI6");
@@ -183,7 +183,7 @@ public void testDeserializeAllowTrustOperation() {
" \"authorize\": true\n" +
" }";
- AllowTrustOperation operation = (AllowTrustOperation) GsonSingleton.getInstance().fromJson(json, Operation.class);
+ AllowTrustOperationResponse operation = (AllowTrustOperationResponse) GsonSingleton.getInstance().fromJson(json, OperationResponse.class);
assertEquals(operation.getTrustee().getAccountId(), "GDIROJW2YHMSFZJJ4R5XWWNUVND5I45YEWS5DSFKXCHMADZ5V374U2LM");
assertEquals(operation.getTrustor().getAccountId(), "GDZ55LVXECRTW4G36EZPTHI4XIYS5JUC33TUS22UOETVFVOQ77JXWY4F");
@@ -224,7 +224,7 @@ public void testDeserializeChangeTrustOperation() {
" \"trustor\": \"GDZ55LVXECRTW4G36EZPTHI4XIYS5JUC33TUS22UOETVFVOQ77JXWY4F\"\n" +
" }";
- ChangeTrustOperation operation = (ChangeTrustOperation) GsonSingleton.getInstance().fromJson(json, Operation.class);
+ ChangeTrustOperationResponse operation = (ChangeTrustOperationResponse) GsonSingleton.getInstance().fromJson(json, OperationResponse.class);
assertEquals(operation.getTrustee().getAccountId(), "GDIROJW2YHMSFZJJ4R5XWWNUVND5I45YEWS5DSFKXCHMADZ5V374U2LM");
assertEquals(operation.getTrustor().getAccountId(), "GDZ55LVXECRTW4G36EZPTHI4XIYS5JUC33TUS22UOETVFVOQ77JXWY4F");
@@ -273,7 +273,7 @@ public void testDeserializeSetOptionsOperation() {
" ]"+
" }";
- SetOptionsOperation operation = (SetOptionsOperation) GsonSingleton.getInstance().fromJson(json, Operation.class);
+ SetOptionsOperationResponse operation = (SetOptionsOperationResponse) GsonSingleton.getInstance().fromJson(json, OperationResponse.class);
assertEquals(operation.getSigner().getAccountId(), "GD3ZYXVC7C3ECD5I4E5NGPBFJJSULJ6HJI2FBHGKYFV34DSIWB4YEKJZ");
assertEquals(operation.getSignerWeight(), new Integer(1));
@@ -316,7 +316,7 @@ public void testDeserializeAccountMergeOperation() {
" \"into\": \"GAZWSWPDQTBHFIPBY4FEDFW2J6E2LE7SZHJWGDZO6Q63W7DBSRICO2KN\"\n" +
" }";
- AccountMergeOperation operation = (AccountMergeOperation) GsonSingleton.getInstance().fromJson(json, Operation.class);
+ AccountMergeOperationResponse operation = (AccountMergeOperationResponse) GsonSingleton.getInstance().fromJson(json, OperationResponse.class);
assertEquals(operation.getAccount().getAccountId(), "GD6GKRABNDVYDETEZJQEPS7IBQMERCN44R5RCI4LJNX6BMYQM2KPGGZ2");
assertEquals(operation.getInto().getAccountId(), "GAZWSWPDQTBHFIPBY4FEDFW2J6E2LE7SZHJWGDZO6Q63W7DBSRICO2KN");
@@ -355,7 +355,7 @@ public void testDeserializeManageOfferOperation() {
" \"selling_asset_type\": \"native\"\n" +
" }";
- ManageOfferOperation operation = (ManageOfferOperation) GsonSingleton.getInstance().fromJson(json, Operation.class);
+ ManageOfferOperationResponse operation = (ManageOfferOperationResponse) GsonSingleton.getInstance().fromJson(json, OperationResponse.class);
assertEquals(operation.getOfferId(), new Integer(0));
assertEquals(operation.getAmount(), "100.0");
@@ -400,7 +400,7 @@ public void testDeserializePathPaymentOperation() {
" \"type\": \"path_payment\"\n" +
"}";
- PathPaymentOperation operation = (PathPaymentOperation) GsonSingleton.getInstance().fromJson(json, Operation.class);
+ PathPaymentOperationResponse operation = (PathPaymentOperationResponse) GsonSingleton.getInstance().fromJson(json, OperationResponse.class);
assertEquals(operation.getFrom().getAccountId(), "GCXKG6RN4ONIEPCMNFB732A436Z5PNDSRLGWK7GBLCMQLIFO4S7EYWVU");
assertEquals(operation.getTo().getAccountId(), "GA5WBPYA5Y4WAEHXWR2UKO2UO4BUGHUQ74EUPKON2QHV4WRHOIRNKKH2");
@@ -448,7 +448,7 @@ public void testDeserializeCreatePassiveOfferOperation() {
" \"type\": \"create_passive_offer\"\n" +
"}";
- CreatePassiveOfferOperation operation = (CreatePassiveOfferOperation) GsonSingleton.getInstance().fromJson(json, Operation.class);
+ CreatePassiveOfferOperationResponse operation = (CreatePassiveOfferOperationResponse) GsonSingleton.getInstance().fromJson(json, OperationResponse.class);
assertEquals(operation.getAmount(), "11.27827");
assertEquals(operation.getBuyingAsset(), Asset.createNonNativeAsset("USD", KeyPair.fromAccountId("GDS5JW5E6DRSSN5XK4LW7E6VUMFKKE2HU5WCOVFTO7P2RP7OXVCBLJ3Y")));
@@ -482,7 +482,7 @@ public void testDeserializeInflationOperation() {
" \"type\": \"inflation\"\n" +
"}";
- InflationOperation operation = (InflationOperation) GsonSingleton.getInstance().fromJson(json, Operation.class);
+ InflationOperationResponse operation = (InflationOperationResponse) GsonSingleton.getInstance().fromJson(json, OperationResponse.class);
assertEquals(operation.getId(), new Long(12884914177L));
}
diff --git a/src/test/java/org/stellar/sdk/responses/OperationsPageDeserializerTest.java b/src/test/java/org/stellar/sdk/responses/OperationsPageDeserializerTest.java
index 189e49189..fb1f5c415 100644
--- a/src/test/java/org/stellar/sdk/responses/OperationsPageDeserializerTest.java
+++ b/src/test/java/org/stellar/sdk/responses/OperationsPageDeserializerTest.java
@@ -6,22 +6,22 @@
import org.junit.Test;
import org.stellar.sdk.AssetTypeNative;
-import org.stellar.sdk.responses.operations.CreateAccountOperation;
-import org.stellar.sdk.responses.operations.Operation;
-import org.stellar.sdk.responses.operations.PaymentOperation;
+import org.stellar.sdk.responses.operations.CreateAccountOperationResponse;
+import org.stellar.sdk.responses.operations.OperationResponse;
+import org.stellar.sdk.responses.operations.PaymentOperationResponse;
public class OperationsPageDeserializerTest extends TestCase {
@Test
public void testDeserialize() {
- Page operationsPage = GsonSingleton.getInstance().fromJson(json, new TypeToken>() {}.getType());
+ Page operationsPage = GsonSingleton.getInstance().fromJson(json, new TypeToken>() {}.getType());
- CreateAccountOperation createAccountOperation = (CreateAccountOperation) operationsPage.getRecords().get(0);
+ CreateAccountOperationResponse createAccountOperation = (CreateAccountOperationResponse) operationsPage.getRecords().get(0);
assertEquals(createAccountOperation.getStartingBalance(), "10000.0");
assertEquals(createAccountOperation.getPagingToken(), "3717508943056897");
assertEquals(createAccountOperation.getAccount().getAccountId(), "GDFH4NIYMIIAKRVEJJZOIGWKXGQUF3XHJG6ZM6CEA64AMTVDN44LHOQE");
assertEquals(createAccountOperation.getFunder().getAccountId(), "GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K");
- PaymentOperation paymentOperation = (PaymentOperation) operationsPage.getRecords().get(4);
+ PaymentOperationResponse paymentOperation = (PaymentOperationResponse) operationsPage.getRecords().get(4);
assertEquals(paymentOperation.getAmount(), "10.123");
TestCase.assertEquals(paymentOperation.getAsset(), new AssetTypeNative());
assertEquals(paymentOperation.getFrom().getAccountId(), "GCYK67DDGBOANS6UODJ62QWGLEB2A7JQ3XUV25HCMLT7CI23PMMK3W6R");
diff --git a/src/test/java/org/stellar/sdk/responses/PathsPageDeserializerTest.java b/src/test/java/org/stellar/sdk/responses/PathsPageDeserializerTest.java
index 83ba2764f..5646d990d 100644
--- a/src/test/java/org/stellar/sdk/responses/PathsPageDeserializerTest.java
+++ b/src/test/java/org/stellar/sdk/responses/PathsPageDeserializerTest.java
@@ -13,7 +13,7 @@ public class PathsPageDeserializerTest {
@Test
public void testDeserialize() {
- Page pathsPage = GsonSingleton.getInstance().fromJson(json, new TypeToken>() {}.getType());
+ Page pathsPage = GsonSingleton.getInstance().fromJson(json, new TypeToken>() {}.getType());
assertEquals(pathsPage.getRecords().get(0).getDestinationAmount(), "20.0000000");
Assert.assertEquals(pathsPage.getRecords().get(0).getDestinationAsset(), Asset.createNonNativeAsset("EUR", KeyPair.fromAccountId("GDSBCQO34HWPGUGQSP3QBFEXVTSR2PW46UIGTHVWGWJGQKH3AFNHXHXN")));
diff --git a/src/test/java/org/stellar/sdk/responses/TransactionDeserializerTest.java b/src/test/java/org/stellar/sdk/responses/TransactionDeserializerTest.java
index 322faec9a..0307d7608 100644
--- a/src/test/java/org/stellar/sdk/responses/TransactionDeserializerTest.java
+++ b/src/test/java/org/stellar/sdk/responses/TransactionDeserializerTest.java
@@ -9,7 +9,7 @@
public class TransactionDeserializerTest extends TestCase {
@Test
public void testDeserialize() {
- Transaction transaction = GsonSingleton.getInstance().fromJson(json, Transaction.class);
+ TransactionResponse transaction = GsonSingleton.getInstance().fromJson(json, TransactionResponse.class);
assertEquals(transaction.getHash(), "5c2e4dad596941ef944d72741c8f8f1a4282f8f2f141e81d827f44bf365d626b");
assertEquals(transaction.getLedger(), new Long(915744));
assertEquals(transaction.getCreatedAt(), "2015-11-20T17:01:28Z");
@@ -37,7 +37,7 @@ public void testDeserialize() {
@Test
public void testDeserializeWithoutMemo() {
- Transaction transaction = GsonSingleton.getInstance().fromJson(jsonMemoNone, Transaction.class);
+ TransactionResponse transaction = GsonSingleton.getInstance().fromJson(jsonMemoNone, TransactionResponse.class);
assertTrue(transaction.getMemo() instanceof MemoNone);
}
diff --git a/src/test/java/org/stellar/sdk/responses/TransactionPageDeserializerTest.java b/src/test/java/org/stellar/sdk/responses/TransactionPageDeserializerTest.java
index 5a02a80d2..13d6cf6f5 100644
--- a/src/test/java/org/stellar/sdk/responses/TransactionPageDeserializerTest.java
+++ b/src/test/java/org/stellar/sdk/responses/TransactionPageDeserializerTest.java
@@ -9,7 +9,7 @@
public class TransactionPageDeserializerTest extends TestCase {
@Test
public void testDeserialize() {
- Page transactionsPage = GsonSingleton.getInstance().fromJson(json, new TypeToken>() {}.getType());
+ Page transactionsPage = GsonSingleton.getInstance().fromJson(json, new TypeToken>() {}.getType());
assertEquals(transactionsPage.getRecords().get(0).getSourceAccount().getAccountId(), "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7");
assertEquals(transactionsPage.getRecords().get(0).getPagingToken(), "12884905984");