Record Class TransactionPartnerUser

java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.TransactionPartnerUser
All Implemented Interfaces:
Serializable, ApiResult, TransactionPartner

public record TransactionPartnerUser(@NotNull TransactionType transactionType, @NotNull User user, @Nullable AffiliateInfo affiliate, @Nullable String invoicePayload, int subscriptionPeriod, @Nullable PaidMedia[] paidMedia, @Nullable String paidMediaPayload, @Nullable Gift gift, @Nullable Integer premiumSubscriptionDuration) extends Record implements TransactionPartner
See Also:
  • Constructor Details

    • TransactionPartnerUser

      public TransactionPartnerUser(@NotNull @NotNull TransactionType transactionType, @NotNull @NotNull User user, @Nullable @Nullable AffiliateInfo affiliate, @Nullable @Nullable String invoicePayload, int subscriptionPeriod, @Nullable @Nullable PaidMedia[] paidMedia, @Nullable @Nullable String paidMediaPayload, @Nullable @Nullable Gift gift, @Nullable @Nullable Integer premiumSubscriptionDuration)
      Creates an instance of a TransactionPartnerUser record class.
      Parameters:
      transactionType - the value for the transactionType record component
      user - the value for the user record component
      affiliate - the value for the affiliate record component
      invoicePayload - the value for the invoicePayload record component
      subscriptionPeriod - the value for the subscriptionPeriod record component
      paidMedia - the value for the paidMedia record component
      paidMediaPayload - the value for the paidMediaPayload record component
      gift - the value for the gift record component
      premiumSubscriptionDuration - the value for the premiumSubscriptionDuration record component
  • Method Details

    • type

      public String type()
      Specified by:
      type in interface TransactionPartner
    • 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.
    • transactionType

      @NotNull public @NotNull TransactionType transactionType()
      Returns the value of the transactionType record component.
      Returns:
      the value of the transactionType record component
    • user

      @NotNull public @NotNull User user()
      Returns the value of the user record component.
      Returns:
      the value of the user record component
    • affiliate

      @Nullable public @Nullable AffiliateInfo affiliate()
      Returns the value of the affiliate record component.
      Returns:
      the value of the affiliate record component
    • invoicePayload

      @Nullable public @Nullable String invoicePayload()
      Returns the value of the invoicePayload record component.
      Returns:
      the value of the invoicePayload record component
    • subscriptionPeriod

      public int subscriptionPeriod()
      Returns the value of the subscriptionPeriod record component.
      Returns:
      the value of the subscriptionPeriod record component
    • paidMedia

      @Nullable public @Nullable PaidMedia[] paidMedia()
      Returns the value of the paidMedia record component.
      Returns:
      the value of the paidMedia record component
    • paidMediaPayload

      @Nullable public @Nullable String paidMediaPayload()
      Returns the value of the paidMediaPayload record component.
      Returns:
      the value of the paidMediaPayload record component
    • gift

      @Nullable public @Nullable Gift gift()
      Returns the value of the gift record component.
      Returns:
      the value of the gift record component
    • premiumSubscriptionDuration

      @Nullable public @Nullable Integer premiumSubscriptionDuration()
      Returns the value of the premiumSubscriptionDuration record component.
      Returns:
      the value of the premiumSubscriptionDuration record component