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:
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.objects.TransactionPartner
TYPE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionTransactionPartnerUser(@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) Creates an instance of aTransactionPartnerUserrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable AffiliateInfoReturns the value of theaffiliaterecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable Giftgift()Returns the value of thegiftrecord component.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of theinvoicePayloadrecord component.@Nullable PaidMedia[]Returns the value of thepaidMediarecord component.@Nullable StringReturns the value of thepaidMediaPayloadrecord component.@Nullable IntegerReturns the value of thepremiumSubscriptionDurationrecord component.intReturns the value of thesubscriptionPeriodrecord component.final StringtoString()Returns a string representation of this record class.@NotNull TransactionTypeReturns the value of thetransactionTyperecord component.type()@NotNull Useruser()Returns the value of theuserrecord component.
-
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 aTransactionPartnerUserrecord class.- Parameters:
transactionType- the value for thetransactionTyperecord componentuser- the value for theuserrecord componentaffiliate- the value for theaffiliaterecord componentinvoicePayload- the value for theinvoicePayloadrecord componentsubscriptionPeriod- the value for thesubscriptionPeriodrecord componentpaidMedia- the value for thepaidMediarecord componentpaidMediaPayload- the value for thepaidMediaPayloadrecord componentgift- the value for thegiftrecord componentpremiumSubscriptionDuration- the value for thepremiumSubscriptionDurationrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceTransactionPartner
-
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 '=='. -
transactionType
Returns the value of thetransactionTyperecord component.- Returns:
- the value of the
transactionTyperecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
affiliate
Returns the value of theaffiliaterecord component.- Returns:
- the value of the
affiliaterecord component
-
invoicePayload
Returns the value of theinvoicePayloadrecord component.- Returns:
- the value of the
invoicePayloadrecord component
-
subscriptionPeriod
public int subscriptionPeriod()Returns the value of thesubscriptionPeriodrecord component.- Returns:
- the value of the
subscriptionPeriodrecord component
-
paidMedia
Returns the value of thepaidMediarecord component.- Returns:
- the value of the
paidMediarecord component
-
paidMediaPayload
Returns the value of thepaidMediaPayloadrecord component.- Returns:
- the value of the
paidMediaPayloadrecord component
-
gift
Returns the value of thegiftrecord component.- Returns:
- the value of the
giftrecord component
-