forked from Qortal/qortal
* Created PaymentData transfer objects for (recipient, assetId, amount) tuples * Created corresponding Payment class for validating, processing and orphaning payment(s) * Modified OrderData to support isClosed for when an Order is cancelled so no more trades can occur * Migrated CancelOrderTransactions and MultiPaymentTransactions * Converted MessageTransactions, PaymentTransactions and TransferAssetTransactions to use new Payment class Can't use PaymentTransformer in PaymentTransformer or TransferAssetTransformer due to serialization differences.
35 lines
546 B
Java
35 lines
546 B
Java
package data;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
public class PaymentData {
|
|
|
|
// Properties
|
|
protected String recipient;
|
|
protected long assetId;
|
|
protected BigDecimal amount;
|
|
|
|
// Constructors
|
|
|
|
public PaymentData(String recipient, long assetId, BigDecimal amount) {
|
|
this.recipient = recipient;
|
|
this.assetId = assetId;
|
|
this.amount = amount;
|
|
}
|
|
|
|
// Getters/setters
|
|
|
|
public String getRecipient() {
|
|
return this.recipient;
|
|
}
|
|
|
|
public long getAssetId() {
|
|
return this.assetId;
|
|
}
|
|
|
|
public BigDecimal getAmount() {
|
|
return this.amount;
|
|
}
|
|
|
|
}
|