Class PathPaymentStrictReceiveOperation.Builder

java.lang.Object
org.stellar.sdk.PathPaymentStrictReceiveOperation.Builder
Enclosing class:
PathPaymentStrictReceiveOperation

public static class PathPaymentStrictReceiveOperation.Builder extends Object
Builds PathPayment operation.
See Also:
  • 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 destination
      destAsset - 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

      public PathPaymentStrictReceiveOperation.Builder setPath(@NonNull @NonNull Asset[] path)
      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