Skip to content

Commit 4f816a0

Browse files
committed
Added the method setBusinessAccountBio, allowing bots to change the bio of a managed business account.
1 parent 68edc0f commit 4f816a0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.pengrad.telegrambot.request.business
2+
3+
import com.pengrad.telegrambot.request.KBaseRequest
4+
import com.pengrad.telegrambot.response.BaseResponse
5+
import com.pengrad.telegrambot.utility.kotlin.optionalRequestParameter
6+
import com.pengrad.telegrambot.utility.kotlin.requestParameter
7+
8+
@Suppress("unused")
9+
class SetBusinessAccountBio private constructor(
10+
businessConnectionId: String,
11+
bio: String?
12+
): KBaseRequest<SetBusinessAccountBio, BaseResponse>(BaseResponse::class) {
13+
14+
constructor(businessConnectionId: String) : this(
15+
businessConnectionId = businessConnectionId,
16+
bio = null
17+
)
18+
19+
val businessConnectionId: String by requestParameter(businessConnectionId, customParameterName = "business_connection_id")
20+
21+
var bio: String? by optionalRequestParameter(bio, customParameterName = "bio")
22+
fun bio(bio: String) = applySelf { this.bio = bio }
23+
24+
}

0 commit comments

Comments
 (0)