Package org.stellar.sdk
Class PathPaymentStrictSendOperation.Builder
java.lang.Object
org.stellar.sdk.PathPaymentStrictSendOperation.Builder
- Enclosing class:
PathPaymentStrictSendOperation
Builds PathPayment operation.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an operationSets path for this operationsetSourceAccount(@NonNull String sourceAccount) Sets the source account for this operation.
-
Constructor Details
-
Builder
public Builder(@NonNull @NonNull Asset sendAsset, @NonNull @NonNull String sendAmount, @NonNull @NonNull String destination, @NonNull @NonNull Asset destAsset, @NonNull @NonNull String destMin) Creates a new PathPaymentStrictSendOperation builder.- Parameters:
sendAsset- The asset deducted from the sender's account.sendAmount- The asset deducted from the sender's account.destination- Payment destinationdestAsset- The asset the destination account receives.destMin- The minimum amount of destination asset the destination account receives.- Throws:
ArithmeticException- when sendAmount or destMin has more than 7 decimal places.
-
-
Method Details
-
setPath
Sets path for this operation- Parameters:
path- The assets (other than send asset and destination asset) involved in the offers the path takes. For example, if you can only find a path from USD to EUR through XLM and BTC, the path would be USD -» XLM -» BTC -» EUR and the path field would contain XLM and BTC.- Returns:
- Builder object so you can chain methods.
-
setSourceAccount
public PathPaymentStrictSendOperation.Builder setSourceAccount(@NonNull @NonNull String sourceAccount) Sets the source account for this operation.- Parameters:
sourceAccount- The operation's source account.- Returns:
- Builder object so you can chain methods.
-
build
Builds an operation
-