Class PaymentLimited
- java.lang.Object
-
- com.casper.sdk.model.transaction.pricing.PaymentLimited
-
- All Implemented Interfaces:
CasperSerializableObject,Tag,PricingMode,SerializableObject
public class PaymentLimited extends java.lang.Object implements PricingMode
The original payment model, where the creator of the transaction specifies how much they will pay, at what gas price.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPaymentLimited.PaymentLimitedBuilder
-
Field Summary
-
Fields inherited from interface com.casper.sdk.model.transaction.pricing.PricingMode
FIXED_TAG, PAYMENT_LIMITED_TAG, PREPAID_TAG, TAG_FIELD_INDEX
-
-
Constructor Summary
Constructors Constructor Description PaymentLimited()PaymentLimited(java.math.BigInteger paymentAmount, int gasPriceTolerance, boolean standardPayment)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PaymentLimited.PaymentLimitedBuilderbuilder()bytegetByteTag()intgetGasPriceTolerance()User-specified gas_price tolerance (minimum 1).java.math.BigIntegergetPaymentAmount()User-specified payment amount.booleanisStandardPayment()Standard payment.voidserialize(SerializerBuffer ser, Target target)Called when the object's values must be serializedvoidsetGasPriceTolerance(int gasPriceTolerance)User-specified gas_price tolerance (minimum 1).voidsetPaymentAmount(java.math.BigInteger paymentAmount)User-specified payment amount.voidsetStandardPayment(boolean standardPayment)Standard payment.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.casper.sdk.model.clvalue.serde.CasperSerializableObject
serialize
-
-
-
-
Method Detail
-
serialize
public void serialize(SerializerBuffer ser, Target target) throws ValueSerializationException, NoSuchTypeException
Description copied from interface:CasperSerializableObjectCalled when the object's values must be serialized- Specified by:
serializein interfaceCasperSerializableObject- Parameters:
ser- the serializer to be usedtarget- target serialization standard- Throws:
ValueSerializationException- exception holding information of failure to serialize a valueNoSuchTypeException
-
getByteTag
public byte getByteTag()
- Specified by:
getByteTagin interfaceTag
-
builder
public static PaymentLimited.PaymentLimitedBuilder builder()
-
getPaymentAmount
public java.math.BigInteger getPaymentAmount()
User-specified payment amount.
-
getGasPriceTolerance
public int getGasPriceTolerance()
User-specified gas_price tolerance (minimum 1). This is interpreted to mean "do not include this transaction in a block if the current gas price is greater than this number"
-
isStandardPayment
public boolean isStandardPayment()
Standard payment.
-
setPaymentAmount
public void setPaymentAmount(java.math.BigInteger paymentAmount)
User-specified payment amount.
-
setGasPriceTolerance
public void setGasPriceTolerance(int gasPriceTolerance)
User-specified gas_price tolerance (minimum 1). This is interpreted to mean "do not include this transaction in a block if the current gas price is greater than this number"
-
setStandardPayment
public void setStandardPayment(boolean standardPayment)
Standard payment.
-
-