Package net.voidnote
Record Class CryptoOrder
java.lang.Object
java.lang.Record
net.voidnote.CryptoOrder
- Record Components:
orderId- Order ID — pass toVoidNote.submitCryptoPayment(java.lang.String, java.lang.String, java.lang.String)after the transfer.toAddress- On-chain recipient address.chain- Chain name (e.g."polygon","bitcoin","tron").token- Token symbol (e.g."USDT","ETH","BTC").amountUsd- USD value of the order.amount- Exact amount to send (formatted string for display, e.g."20.000000").credits- Credits to be added on confirmation.expiresAt- ISO 8601 timestamp — order expires if not paid by this time.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionamount()Returns the value of theamountrecord component.doubleReturns the value of theamountUsdrecord component.chain()Returns the value of thechainrecord component.intcredits()Returns the value of thecreditsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiresAtrecord component.final inthashCode()Returns a hash code value for this object.orderId()Returns the value of theorderIdrecord component.Returns the value of thetoAddressrecord component.token()Returns the value of thetokenrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CryptoOrder
public CryptoOrder(String orderId, String toAddress, String chain, String token, double amountUsd, String amount, int credits, String expiresAt) Creates an instance of aCryptoOrderrecord class.- Parameters:
orderId- the value for theorderIdrecord componenttoAddress- the value for thetoAddressrecord componentchain- the value for thechainrecord componenttoken- the value for thetokenrecord componentamountUsd- the value for theamountUsdrecord componentamount- the value for theamountrecord componentcredits- the value for thecreditsrecord componentexpiresAt- the value for theexpiresAtrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
orderId
Returns the value of theorderIdrecord component.- Returns:
- the value of the
orderIdrecord component
-
toAddress
Returns the value of thetoAddressrecord component.- Returns:
- the value of the
toAddressrecord component
-
chain
Returns the value of thechainrecord component.- Returns:
- the value of the
chainrecord component
-
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-
amountUsd
public double amountUsd()Returns the value of theamountUsdrecord component.- Returns:
- the value of the
amountUsdrecord component
-
amount
Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
credits
public int credits()Returns the value of thecreditsrecord component.- Returns:
- the value of the
creditsrecord component
-
expiresAt
Returns the value of theexpiresAtrecord component.- Returns:
- the value of the
expiresAtrecord component
-