Package org.stellar.sdk.xdr
Class PaymentOp
java.lang.Object
org.stellar.sdk.xdr.PaymentOp
- All Implemented Interfaces:
XdrElement
PaymentOp's original definition in the XDR file is:
struct PaymentOp
{
MuxedAccount destination; // recipient of the payment
Asset asset; // what they end up with
int64 amount; // amount they end up with
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionPaymentOp(MuxedAccount destination, Asset asset, Int64 amount) Creates a newPaymentOpinstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic PaymentOp.PaymentOpBuilderbuilder()static PaymentOpdecode(XdrDataInputStream stream) static PaymentOpdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic PaymentOpstatic PaymentOpfromXdrBase64(String xdr) static PaymentOpfromXdrByteArray(byte[] xdr) Value of theamountfield.getAsset()Value of theassetfield.Value of thedestinationfield.inthashCode()voidValue of theamountfield.voidValue of theassetfield.voidsetDestination(MuxedAccount destination) Value of thedestinationfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
PaymentOp
public PaymentOp() -
PaymentOp
Creates a newPaymentOpinstance.- Parameters:
destination- thedestinationfield valueasset- theassetfield valueamount- theamountfield value
-
-
Method Details
-
encode
Description copied from interface:XdrElementEncodes this value to XDR and writes it to the provided stream.- Specified by:
encodein interfaceXdrElement- Parameters:
stream- the destination XDR output stream- Throws:
IOException- if an I/O error occurs while writing the value
-
decode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
-
builder
-
toBuilder
-
getDestination
Value of thedestinationfield.- Returns:
- the
destinationfield value
-
getAsset
Value of theassetfield.- Returns:
- the
assetfield value
-
getAmount
Value of theamountfield.- Returns:
- the
amountfield value
-
setDestination
Value of thedestinationfield.- Parameters:
destination- thedestinationfield value
-
setAsset
Value of theassetfield.- Parameters:
asset- theassetfield value
-
setAmount
Value of theamountfield.- Parameters:
amount- theamountfield value
-
equals
-
hashCode
public int hashCode() -
toString
-