public static class PathPaymentStrictSendOperation.Builder
extends java.lang.Object
PathPaymentStrictSendOperation
Constructor and Description |
---|
Builder(Asset sendAsset,
java.lang.String sendAmount,
java.lang.String destination,
Asset destAsset,
java.lang.String destMin)
Creates a new PathPaymentStrictSendOperation builder.
|
Modifier and Type | Method and Description |
---|---|
PathPaymentStrictSendOperation |
build()
Builds an operation
|
PathPaymentStrictSendOperation.Builder |
setPath(Asset[] path)
Sets path for this operation
|
PathPaymentStrictSendOperation.Builder |
setSourceAccount(java.lang.String sourceAccount)
Sets the source account for this operation.
|
public Builder(Asset sendAsset, java.lang.String sendAmount, java.lang.String destination, Asset destAsset, java.lang.String destMin)
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.java.lang.ArithmeticException
- when sendAmount or destMin has more than 7 decimal places.public PathPaymentStrictSendOperation.Builder setPath(Asset[] path)
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.public PathPaymentStrictSendOperation.Builder setSourceAccount(java.lang.String sourceAccount)
sourceAccount
- The operation's source account.public PathPaymentStrictSendOperation build()