@@ -3,10 +3,12 @@ package com.pengrad.telegrambot.model.stars.partner
3
3
import com.pengrad.telegrambot.model.User
4
4
import com.pengrad.telegrambot.model.gift.Gift
5
5
import com.pengrad.telegrambot.model.paidmedia.PaidMedia
6
+ import com.pengrad.telegrambot.model.stars.affiliate.AffiliateInfo
6
7
import com.pengrad.telegrambot.model.stars.partner.TransactionPartnerType.USER
7
8
8
9
data class TransactionPartnerUser (
9
10
@get:JvmName("user") val user : User ,
11
+ @get:JvmName("affiliate") val affiliate : AffiliateInfo ,
10
12
@get:JvmName("invoicePayload") val invoicePayload : String? = null ,
11
13
@get:JvmName("paidMedia") val paidMedia : Array <PaidMedia >? = null ,
12
14
@get:JvmName("paidMediaPayload") val paidMediaPayload : String? = null ,
@@ -25,6 +27,7 @@ data class TransactionPartnerUser(
25
27
26
28
if (subscriptionPeriod != other.subscriptionPeriod) return false
27
29
if (user != other.user) return false
30
+ if (affiliate != other.affiliate) return false
28
31
if (invoicePayload != other.invoicePayload) return false
29
32
if (paidMedia != null ) {
30
33
if (other.paidMedia == null ) return false
@@ -40,6 +43,7 @@ data class TransactionPartnerUser(
40
43
override fun hashCode (): Int {
41
44
var result = subscriptionPeriod ? : 0
42
45
result = 31 * result + user.hashCode()
46
+ result = 31 * result + affiliate.hashCode()
43
47
result = 31 * result + (invoicePayload?.hashCode() ? : 0 )
44
48
result = 31 * result + (paidMedia?.contentHashCode() ? : 0 )
45
49
result = 31 * result + (paidMediaPayload?.hashCode() ? : 0 )
0 commit comments