Package org.stellar.sdk
Class PathPaymentStrictReceiveOperation.Builder
java.lang.Object
org.stellar.sdk.PathPaymentStrictReceiveOperation.Builder
- Enclosing class:
PathPaymentStrictReceiveOperation
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 sendMax, @NonNull @NonNull String destination, @NonNull @NonNull Asset destAsset, @NonNull @NonNull String destAmount) Creates a new PathPaymentStrictReceiveOperation builder.- Parameters:
sendAsset- The asset deducted from the sender's account.sendMax- The asset deducted from the sender's account.destination- Payment destinationdestAsset- The asset the destination account receives.destAmount- The amount of destination asset the destination account receives.- Throws:
ArithmeticException- when sendMax or destAmount 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 PathPaymentStrictReceiveOperation.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
-