@StartableByRPC @InitiatingFlow public class CashPaymentFlow extends AbstractCashFlow
Initiates a flow that sends cash to a recipient.
public CashPaymentFlow(@NotNull Amount<java.util.Currency> amount, @NotNull Party recipient, boolean anonymous, @NotNull ProgressTracker progressTracker, @NotNull java.util.Set<net.corda.core.identity.Party> issuerConstraint, @Nullable Party notary)
Initiates a flow that sends cash to a recipient.
amount
- the amount of a currency to pay to the recipient.recipient
- the party to pay the currency to.anonymous
- whether to anonymous the recipient party. Should be true for normal usage, but may be falseissuerConstraint
- if specified, the payment will be made using only cash issued by the given parties.notary
- if not specified, the first notary of the network map is selectedfor testing purposes.public CashPaymentFlow(@NotNull Amount<java.util.Currency> amount, @NotNull Party recipient)
A straightforward constructor that constructs spends using cash states of any issuer.
public CashPaymentFlow(@NotNull Amount<java.util.Currency> amount, @NotNull Party recipient, boolean anonymous)
A straightforward constructor that constructs spends using cash states of any issuer.
public CashPaymentFlow(@NotNull Amount<java.util.Currency> amount, @NotNull Party recipient, boolean anonymous, @NotNull Party notary)
public CashPaymentFlow(@NotNull net.corda.finance.flows.CashPaymentFlow.PaymentRequest request)
@Suspendable @NotNull public net.corda.finance.flows.AbstractCashFlow.Result call()
This is where you fill out your business logic.
@NotNull public Amount<java.util.Currency> getAmount()
the amount of a currency to pay to the recipient.
@NotNull public Party getRecipient()
the party to pay the currency to.
public boolean getAnonymous()
whether to anonymous the recipient party.
Should be true for normal usage, but may be false
@NotNull public java.util.Set<net.corda.core.identity.Party> getIssuerConstraint()
if specified,
the payment will be made using only cash issued by the given parties.
@Nullable public Party getNotary()
if not specified,
the first notary of the network map is selectedfor testing purposes.