Record Class InvoiceService.Invoice

java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.server.economy.capability.InvoiceService.Invoice
Enclosing interface:
InvoiceService

public static record InvoiceService.Invoice(UUID id, Account sender, Account recipient, Currency currency, BigDecimal amount, BigDecimal amountPaid, Instant createdAt, Instant dueDate, EconomyContext context, net.kyori.adventure.text.Component description, InvoiceService.InvoiceState state) extends Record
  • Constructor Details

    • Invoice

      public Invoice(UUID id, Account sender, Account recipient, Currency currency, BigDecimal amount, BigDecimal amountPaid, Instant createdAt, Instant dueDate, EconomyContext context, net.kyori.adventure.text.Component description, InvoiceService.InvoiceState state)
      Creates an instance of a Invoice record class.
      Parameters:
      id - the value for the id record component
      sender - the value for the sender record component
      recipient - the value for the recipient record component
      currency - the value for the currency record component
      amount - the value for the amount record component
      amountPaid - the value for the amountPaid record component
      createdAt - the value for the createdAt record component
      dueDate - the value for the dueDate record component
      context - the value for the context record component
      description - the value for the description record component
      state - the value for the state 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • id

      public UUID id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • sender

      public Account sender()
      Returns the value of the sender record component.
      Returns:
      the value of the sender record component
    • recipient

      public Account recipient()
      Returns the value of the recipient record component.
      Returns:
      the value of the recipient record component
    • currency

      public Currency currency()
      Returns the value of the currency record component.
      Returns:
      the value of the currency record component
    • amount

      public BigDecimal amount()
      Returns the value of the amount record component.
      Returns:
      the value of the amount record component
    • amountPaid

      public BigDecimal amountPaid()
      Returns the value of the amountPaid record component.
      Returns:
      the value of the amountPaid record component
    • createdAt

      public Instant createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • dueDate

      public Instant dueDate()
      Returns the value of the dueDate record component.
      Returns:
      the value of the dueDate record component
    • context

      public EconomyContext context()
      Returns the value of the context record component.
      Returns:
      the value of the context record component
    • description

      public net.kyori.adventure.text.Component description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • state

      Returns the value of the state record component.
      Returns:
      the value of the state record component