Record Class SpigotSale

java.lang.Object
java.lang.Record
dev.despical.spigotsaleswebhook.model.SpigotSale

public record SpigotSale(String pluginName, String pluginUrl, String username, String previousUsername, String userProfileUrl, ZonedDateTime purchaseDate, double price, String currency) extends Record
  • Constructor Details

    • SpigotSale

      public SpigotSale(String pluginName, String pluginUrl, String username, String previousUsername, String userProfileUrl, ZonedDateTime purchaseDate, double price, String currency)
      Creates an instance of a SpigotSale record class.
      Parameters:
      pluginName - the value for the pluginName record component
      pluginUrl - the value for the pluginUrl record component
      username - the value for the username record component
      previousUsername - the value for the previousUsername record component
      userProfileUrl - the value for the userProfileUrl record component
      purchaseDate - the value for the purchaseDate record component
      price - the value for the price record component
      currency - the value for the currency record component
  • Method Details

    • buyerKey

      public String buyerKey()
    • legacyBuyerKeys

      public Set<String> legacyBuyerKeys()
    • wasSeen

      public boolean wasSeen(Set<String> seenBuyerKeys)
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • pluginName

      public String pluginName()
      Returns the value of the pluginName record component.
      Returns:
      the value of the pluginName record component
    • pluginUrl

      public String pluginUrl()
      Returns the value of the pluginUrl record component.
      Returns:
      the value of the pluginUrl record component
    • username

      public String username()
      Returns the value of the username record component.
      Returns:
      the value of the username record component
    • previousUsername

      public String previousUsername()
      Returns the value of the previousUsername record component.
      Returns:
      the value of the previousUsername record component
    • userProfileUrl

      public String userProfileUrl()
      Returns the value of the userProfileUrl record component.
      Returns:
      the value of the userProfileUrl record component
    • purchaseDate

      public ZonedDateTime purchaseDate()
      Returns the value of the purchaseDate record component.
      Returns:
      the value of the purchaseDate record component
    • price

      public double price()
      Returns the value of the price record component.
      Returns:
      the value of the price record component
    • currency

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