1+ package com.pengrad.telegrambot.request
2+
3+ import com.pengrad.telegrambot.model.MessageEntity
4+ import com.pengrad.telegrambot.request.business.TransferGift
5+ import com.pengrad.telegrambot.response.BaseResponse
6+ import com.pengrad.telegrambot.utility.kotlin.optionalRequestParameter
7+ import com.pengrad.telegrambot.utility.kotlin.requestParameter
8+
9+ @Suppress(" unused" )
10+ class GiftTelegramSubscription private constructor(
11+ userId : Long ,
12+ monthCount : Int ,
13+ starCount : Int ,
14+ text : String? ,
15+ textParseMode : String? ,
16+ textEntities : Array <MessageEntity >?
17+ ): KBaseRequest<GiftTelegramSubscription, BaseResponse>(BaseResponse : :class) {
18+
19+ constructor (userId: Long , monthCount: Int , starCount: Int ) : this (
20+ userId = userId,
21+ monthCount = monthCount,
22+ starCount = starCount,
23+ text = null ,
24+ textParseMode = null ,
25+ textEntities = null
26+ )
27+
28+ val userId: Long by requestParameter(userId, customParameterName = " user_id" )
29+ val monthCount: Int by requestParameter(monthCount, customParameterName = " month_count" )
30+ val starCount: Int by requestParameter(starCount, customParameterName = " star_count" )
31+
32+ var text: String? by optionalRequestParameter(text, customParameterName = " text" )
33+ fun text (text : String ) = applySelf { this .text = text }
34+
35+ var textParseMode: String? by optionalRequestParameter(textParseMode, customParameterName = " text_parse_mode" )
36+ fun textParseMode (textParseMode : String ) = applySelf { this .textParseMode = textParseMode }
37+
38+ var textEntities: Array <MessageEntity >? by optionalRequestParameter(textEntities, customParameterName = " text_entities" )
39+ fun textEntities (textEntities : Array <MessageEntity >) = applySelf { this .textEntities = textEntities }
40+
41+ }
0 commit comments