@@ -3,10 +3,12 @@ package com.pengrad.telegrambot.model.stars.partner
33import com.pengrad.telegrambot.model.User
44import com.pengrad.telegrambot.model.gift.Gift
55import com.pengrad.telegrambot.model.paidmedia.PaidMedia
6+ import com.pengrad.telegrambot.model.stars.affiliate.AffiliateInfo
67import com.pengrad.telegrambot.model.stars.partner.TransactionPartnerType.USER
78
89data class TransactionPartnerUser (
910 @get:JvmName("user") val user : User ,
11+ @get:JvmName("affiliate") val affiliate : AffiliateInfo ,
1012 @get:JvmName("invoicePayload") val invoicePayload : String? = null ,
1113 @get:JvmName("paidMedia") val paidMedia : Array <PaidMedia >? = null ,
1214 @get:JvmName("paidMediaPayload") val paidMediaPayload : String? = null ,
@@ -25,6 +27,7 @@ data class TransactionPartnerUser(
2527
2628 if (subscriptionPeriod != other.subscriptionPeriod) return false
2729 if (user != other.user) return false
30+ if (affiliate != other.affiliate) return false
2831 if (invoicePayload != other.invoicePayload) return false
2932 if (paidMedia != null ) {
3033 if (other.paidMedia == null ) return false
@@ -40,6 +43,7 @@ data class TransactionPartnerUser(
4043 override fun hashCode (): Int {
4144 var result = subscriptionPeriod ? : 0
4245 result = 31 * result + user.hashCode()
46+ result = 31 * result + affiliate.hashCode()
4347 result = 31 * result + (invoicePayload?.hashCode() ? : 0 )
4448 result = 31 * result + (paidMedia?.contentHashCode() ? : 0 )
4549 result = 31 * result + (paidMediaPayload?.hashCode() ? : 0 )
0 commit comments