-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for parsing ContractCreditedEffect and ContractDebitedEff…
…ect. (#535)
- Loading branch information
Showing
5 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/org/stellar/sdk/responses/effects/ContractCreditedEffectResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.stellar.sdk.responses.effects; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
/** | ||
* Represents contract_credited effect response. | ||
* | ||
* @see <a | ||
* href="https://github.com/stellar/go/blob/d41faf8cd619718b9801a62254a513591f6cbc0a/protocols/horizon/effects/main.go#L316-L321" | ||
* target="_blank">Effect definition</a> | ||
* @see org.stellar.sdk.requests.EffectsRequestBuilder | ||
* @see org.stellar.sdk.Server#effects() | ||
*/ | ||
@AllArgsConstructor | ||
@Getter | ||
public class ContractCreditedEffectResponse extends EffectResponse { | ||
@SerializedName("asset_type") | ||
private final String assetType; | ||
|
||
@SerializedName("asset_code") | ||
private final String assetCode; | ||
|
||
@SerializedName("asset_issuer") | ||
private final String assetIssuer; | ||
|
||
private final String contract; | ||
|
||
private final String amount; | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/org/stellar/sdk/responses/effects/ContractDebitedEffectResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.stellar.sdk.responses.effects; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
/** | ||
* Represents contract_debited effect response. | ||
* | ||
* @see <a | ||
* href="https://github.com/stellar/go/blob/d41faf8cd619718b9801a62254a513591f6cbc0a/protocols/horizon/effects/main.go#L323-L328" | ||
* target="_blank">Effect definition</a> | ||
* @see org.stellar.sdk.requests.EffectsRequestBuilder | ||
* @see org.stellar.sdk.Server#effects() | ||
*/ | ||
@AllArgsConstructor | ||
@Getter | ||
public class ContractDebitedEffectResponse extends EffectResponse { | ||
@SerializedName("asset_type") | ||
private final String assetType; | ||
|
||
@SerializedName("asset_code") | ||
private final String assetCode; | ||
|
||
@SerializedName("asset_issuer") | ||
private final String assetIssuer; | ||
|
||
private final String contract; | ||
|
||
private final String amount; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters