Package net.voidnote

Record Class CryptoOrder

java.lang.Object
java.lang.Record
net.voidnote.CryptoOrder
Record Components:
orderId - Order ID — pass to VoidNote.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.

public record CryptoOrder(String orderId, String toAddress, String chain, String token, double amountUsd, String amount, int credits, String expiresAt) extends Record
  • 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 a CryptoOrder record class.
      Parameters:
      orderId - the value for the orderId record component
      toAddress - the value for the toAddress record component
      chain - the value for the chain record component
      token - the value for the token record component
      amountUsd - the value for the amountUsd record component
      amount - the value for the amount record component
      credits - the value for the credits record component
      expiresAt - the value for the expiresAt record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • orderId

      public String orderId()
      Returns the value of the orderId record component.
      Returns:
      the value of the orderId record component
    • toAddress

      public String toAddress()
      Returns the value of the toAddress record component.
      Returns:
      the value of the toAddress record component
    • chain

      public String chain()
      Returns the value of the chain record component.
      Returns:
      the value of the chain record component
    • token

      public String token()
      Returns the value of the token record component.
      Returns:
      the value of the token record component
    • amountUsd

      public double amountUsd()
      Returns the value of the amountUsd record component.
      Returns:
      the value of the amountUsd record component
    • amount

      public String amount()
      Returns the value of the amount record component.
      Returns:
      the value of the amount record component
    • credits

      public int credits()
      Returns the value of the credits record component.
      Returns:
      the value of the credits record component
    • expiresAt

      public String expiresAt()
      Returns the value of the expiresAt record component.
      Returns:
      the value of the expiresAt record component