diff --git a/Sources/SwiftTelegramSdk/Bot/Telegram/Methods/CreateInvoiceLink.swift b/Sources/SwiftTelegramSdk/Bot/Telegram/Methods/CreateInvoiceLink.swift index 8722c79..8f1b630 100644 --- a/Sources/SwiftTelegramSdk/Bot/Telegram/Methods/CreateInvoiceLink.swift +++ b/Sources/SwiftTelegramSdk/Bot/Telegram/Methods/CreateInvoiceLink.swift @@ -15,7 +15,7 @@ public struct TGCreateInvoiceLinkParams: Encodable { /// Product description, 1-255 characters public var description: String - /// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + /// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. public var payload: String /// Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. diff --git a/Sources/SwiftTelegramSdk/Bot/Telegram/Methods/SendInvoice.swift b/Sources/SwiftTelegramSdk/Bot/Telegram/Methods/SendInvoice.swift index db7daed..7c6a53b 100644 --- a/Sources/SwiftTelegramSdk/Bot/Telegram/Methods/SendInvoice.swift +++ b/Sources/SwiftTelegramSdk/Bot/Telegram/Methods/SendInvoice.swift @@ -21,7 +21,7 @@ public struct TGSendInvoiceParams: Encodable { /// Product description, 1-255 characters public var description: String - /// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + /// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. public var payload: String /// Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. diff --git a/Sources/SwiftTelegramSdk/Bot/Telegram/Methods/SendPaidMedia.swift b/Sources/SwiftTelegramSdk/Bot/Telegram/Methods/SendPaidMedia.swift index b9e0cf3..8d14c4c 100644 --- a/Sources/SwiftTelegramSdk/Bot/Telegram/Methods/SendPaidMedia.swift +++ b/Sources/SwiftTelegramSdk/Bot/Telegram/Methods/SendPaidMedia.swift @@ -15,12 +15,15 @@ public struct TGSendPaidMediaParams: Encodable { /// Unique identifier for the target chat or username of the target channel (in the format @channelusername). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance. public var chatId: TGChatId - /// The number of Telegram Stars that must be paid to buy access to the media + /// The number of Telegram Stars that must be paid to buy access to the media; 1-2500 public var starCount: Int /// A JSON-serialized array describing the media to be sent; up to 10 items public var media: [TGInputPaidMedia] + /// Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes. + public var payload: String? + /// Media caption, 0-1024 characters after entities parsing public var caption: String? @@ -51,6 +54,7 @@ public struct TGSendPaidMediaParams: Encodable { case chatId = "chat_id" case starCount = "star_count" case media = "media" + case payload = "payload" case caption = "caption" case parseMode = "parse_mode" case captionEntities = "caption_entities" @@ -61,11 +65,12 @@ public struct TGSendPaidMediaParams: Encodable { case replyMarkup = "reply_markup" } - public init(businessConnectionId: String? = nil, chatId: TGChatId, starCount: Int, media: [TGInputPaidMedia], caption: String? = nil, parseMode: TGParseMode? = nil, captionEntities: [TGMessageEntity]? = nil, showCaptionAboveMedia: Bool? = nil, disableNotification: Bool? = nil, protectContent: Bool? = nil, replyParameters: TGReplyParameters? = nil, replyMarkup: TGReplyMarkup? = nil) { + public init(businessConnectionId: String? = nil, chatId: TGChatId, starCount: Int, media: [TGInputPaidMedia], payload: String? = nil, caption: String? = nil, parseMode: TGParseMode? = nil, captionEntities: [TGMessageEntity]? = nil, showCaptionAboveMedia: Bool? = nil, disableNotification: Bool? = nil, protectContent: Bool? = nil, replyParameters: TGReplyParameters? = nil, replyMarkup: TGReplyMarkup? = nil) { self.businessConnectionId = businessConnectionId self.chatId = chatId self.starCount = starCount self.media = media + self.payload = payload self.caption = caption self.parseMode = parseMode self.captionEntities = captionEntities diff --git a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGChatBoostSourceGiveaway.swift b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGChatBoostSourceGiveaway.swift index 2040bfb..bfd752a 100644 --- a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGChatBoostSourceGiveaway.swift +++ b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGChatBoostSourceGiveaway.swift @@ -1,7 +1,7 @@ // Swift Telegram SDK - Telegram Bot Swift SDK. /** - The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription. + The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize_star_count / 500 times for one year for Telegram Star giveaways. SeeAlso Telegram Bot API Reference: [ChatBoostSourceGiveaway](https://core.telegram.org/bots/api#chatboostsourcegiveaway) @@ -13,6 +13,7 @@ public final class TGChatBoostSourceGiveaway: Codable { case source = "source" case giveawayMessageId = "giveaway_message_id" case user = "user" + case prizeStarCount = "prize_star_count" case isUnclaimed = "is_unclaimed" } @@ -22,16 +23,20 @@ public final class TGChatBoostSourceGiveaway: Codable { /// Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet. public var giveawayMessageId: Int - /// Optional. User that won the prize in the giveaway if any + /// Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only public var user: TGUser? + /// Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only + public var prizeStarCount: Int? + /// Optional. True, if the giveaway was completed, but there was no user to win the prize public var isUnclaimed: Bool? - public init (source: String, giveawayMessageId: Int, user: TGUser? = nil, isUnclaimed: Bool? = nil) { + public init (source: String, giveawayMessageId: Int, user: TGUser? = nil, prizeStarCount: Int? = nil, isUnclaimed: Bool? = nil) { self.source = source self.giveawayMessageId = giveawayMessageId self.user = user + self.prizeStarCount = prizeStarCount self.isUnclaimed = isUnclaimed } } diff --git a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGChatInviteLink.swift b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGChatInviteLink.swift index 2f8438e..0666eeb 100644 --- a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGChatInviteLink.swift +++ b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGChatInviteLink.swift @@ -19,6 +19,8 @@ public final class TGChatInviteLink: Codable { case expireDate = "expire_date" case memberLimit = "member_limit" case pendingJoinRequestCount = "pending_join_request_count" + case subscriptionPeriod = "subscription_period" + case subscriptionPrice = "subscription_price" } /// The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”. @@ -48,7 +50,13 @@ public final class TGChatInviteLink: Codable { /// Optional. Number of pending join requests created using this link public var pendingJoinRequestCount: Int? - public init (inviteLink: String, creator: TGUser, createsJoinRequest: Bool, isPrimary: Bool, isRevoked: Bool, name: String? = nil, expireDate: Int? = nil, memberLimit: Int? = nil, pendingJoinRequestCount: Int? = nil) { + /// Optional. The number of seconds the subscription will be active for before the next payment + public var subscriptionPeriod: Int? + + /// Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link + public var subscriptionPrice: Int? + + public init (inviteLink: String, creator: TGUser, createsJoinRequest: Bool, isPrimary: Bool, isRevoked: Bool, name: String? = nil, expireDate: Int? = nil, memberLimit: Int? = nil, pendingJoinRequestCount: Int? = nil, subscriptionPeriod: Int? = nil, subscriptionPrice: Int? = nil) { self.inviteLink = inviteLink self.creator = creator self.createsJoinRequest = createsJoinRequest @@ -58,5 +66,7 @@ public final class TGChatInviteLink: Codable { self.expireDate = expireDate self.memberLimit = memberLimit self.pendingJoinRequestCount = pendingJoinRequestCount + self.subscriptionPeriod = subscriptionPeriod + self.subscriptionPrice = subscriptionPrice } } diff --git a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveaway.swift b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveaway.swift index 641c0ab..3b7948f 100644 --- a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveaway.swift +++ b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveaway.swift @@ -17,6 +17,7 @@ public final class TGGiveaway: Codable { case hasPublicWinners = "has_public_winners" case prizeDescription = "prize_description" case countryCodes = "country_codes" + case prizeStarCount = "prize_star_count" case premiumSubscriptionMonthCount = "premium_subscription_month_count" } @@ -41,10 +42,13 @@ public final class TGGiveaway: Codable { /// Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways. public var countryCodes: [String]? - /// Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for + /// Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only + public var prizeStarCount: Int? + + /// Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only public var premiumSubscriptionMonthCount: Int? - public init (chats: [TGChat], winnersSelectionDate: Int, winnerCount: Int, onlyNewMembers: Bool? = nil, hasPublicWinners: Bool? = nil, prizeDescription: String? = nil, countryCodes: [String]? = nil, premiumSubscriptionMonthCount: Int? = nil) { + public init (chats: [TGChat], winnersSelectionDate: Int, winnerCount: Int, onlyNewMembers: Bool? = nil, hasPublicWinners: Bool? = nil, prizeDescription: String? = nil, countryCodes: [String]? = nil, prizeStarCount: Int? = nil, premiumSubscriptionMonthCount: Int? = nil) { self.chats = chats self.winnersSelectionDate = winnersSelectionDate self.winnerCount = winnerCount @@ -52,6 +56,7 @@ public final class TGGiveaway: Codable { self.hasPublicWinners = hasPublicWinners self.prizeDescription = prizeDescription self.countryCodes = countryCodes + self.prizeStarCount = prizeStarCount self.premiumSubscriptionMonthCount = premiumSubscriptionMonthCount } } diff --git a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveawayCompleted.swift b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveawayCompleted.swift index d3ed388..ae2f10a 100644 --- a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveawayCompleted.swift +++ b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveawayCompleted.swift @@ -13,6 +13,7 @@ public final class TGGiveawayCompleted: Codable { case winnerCount = "winner_count" case unclaimedPrizeCount = "unclaimed_prize_count" case giveawayMessage = "giveaway_message" + case isStarGiveaway = "is_star_giveaway" } /// Number of winners in the giveaway @@ -24,9 +25,13 @@ public final class TGGiveawayCompleted: Codable { /// Optional. Message with the giveaway that was completed, if it wasn't deleted public var giveawayMessage: TGMessage? - public init (winnerCount: Int, unclaimedPrizeCount: Int? = nil, giveawayMessage: TGMessage? = nil) { + /// Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway. + public var isStarGiveaway: Bool? + + public init (winnerCount: Int, unclaimedPrizeCount: Int? = nil, giveawayMessage: TGMessage? = nil, isStarGiveaway: Bool? = nil) { self.winnerCount = winnerCount self.unclaimedPrizeCount = unclaimedPrizeCount self.giveawayMessage = giveawayMessage + self.isStarGiveaway = isStarGiveaway } } diff --git a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveawayCreated.swift b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveawayCreated.swift index 2ae9667..97107fb 100644 --- a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveawayCreated.swift +++ b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveawayCreated.swift @@ -1,11 +1,22 @@ // Swift Telegram SDK - Telegram Bot Swift SDK. /** - This object represents a service message about the creation of a scheduled giveaway. Currently holds no information. + This object represents a service message about the creation of a scheduled giveaway. SeeAlso Telegram Bot API Reference: [GiveawayCreated](https://core.telegram.org/bots/api#giveawaycreated) **/ public final class TGGiveawayCreated: Codable { + /// Custom keys for coding/decoding `GiveawayCreated` struct + public enum CodingKeys: String, CodingKey { + case prizeStarCount = "prize_star_count" + } + + /// Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only + public var prizeStarCount: Int? + + public init (prizeStarCount: Int? = nil) { + self.prizeStarCount = prizeStarCount + } } diff --git a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveawayWinners.swift b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveawayWinners.swift index a7ae4a5..77db177 100644 --- a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveawayWinners.swift +++ b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGGiveawayWinners.swift @@ -16,6 +16,7 @@ public final class TGGiveawayWinners: Codable { case winnerCount = "winner_count" case winners = "winners" case additionalChatCount = "additional_chat_count" + case prizeStarCount = "prize_star_count" case premiumSubscriptionMonthCount = "premium_subscription_month_count" case unclaimedPrizeCount = "unclaimed_prize_count" case onlyNewMembers = "only_new_members" @@ -41,7 +42,10 @@ public final class TGGiveawayWinners: Codable { /// Optional. The number of other chats the user had to join in order to be eligible for the giveaway public var additionalChatCount: Int? - /// Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for + /// Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only + public var prizeStarCount: Int? + + /// Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only public var premiumSubscriptionMonthCount: Int? /// Optional. Number of undistributed prizes @@ -56,13 +60,14 @@ public final class TGGiveawayWinners: Codable { /// Optional. Description of additional giveaway prize public var prizeDescription: String? - public init (chat: TGChat, giveawayMessageId: Int, winnersSelectionDate: Int, winnerCount: Int, winners: [TGUser], additionalChatCount: Int? = nil, premiumSubscriptionMonthCount: Int? = nil, unclaimedPrizeCount: Int? = nil, onlyNewMembers: Bool? = nil, wasRefunded: Bool? = nil, prizeDescription: String? = nil) { + public init (chat: TGChat, giveawayMessageId: Int, winnersSelectionDate: Int, winnerCount: Int, winners: [TGUser], additionalChatCount: Int? = nil, prizeStarCount: Int? = nil, premiumSubscriptionMonthCount: Int? = nil, unclaimedPrizeCount: Int? = nil, onlyNewMembers: Bool? = nil, wasRefunded: Bool? = nil, prizeDescription: String? = nil) { self.chat = chat self.giveawayMessageId = giveawayMessageId self.winnersSelectionDate = winnersSelectionDate self.winnerCount = winnerCount self.winners = winners self.additionalChatCount = additionalChatCount + self.prizeStarCount = prizeStarCount self.premiumSubscriptionMonthCount = premiumSubscriptionMonthCount self.unclaimedPrizeCount = unclaimedPrizeCount self.onlyNewMembers = onlyNewMembers diff --git a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGInputInvoiceMessageContent.swift b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGInputInvoiceMessageContent.swift index d1f3b37..41256b1 100644 --- a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGInputInvoiceMessageContent.swift +++ b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGInputInvoiceMessageContent.swift @@ -38,7 +38,7 @@ public final class TGInputInvoiceMessageContent: Codable { /// Product description, 1-255 characters public var description: String - /// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + /// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. public var payload: String /// Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. diff --git a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGPaidMediaPurchased.swift b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGPaidMediaPurchased.swift new file mode 100644 index 0000000..705e5747 --- /dev/null +++ b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGPaidMediaPurchased.swift @@ -0,0 +1,27 @@ +// Swift Telegram SDK - Telegram Bot Swift SDK. + +/** + This object contains information about a paid media purchase. + + SeeAlso Telegram Bot API Reference: + [PaidMediaPurchased](https://core.telegram.org/bots/api#paidmediapurchased) + **/ +public final class TGPaidMediaPurchased: Codable { + + /// Custom keys for coding/decoding `PaidMediaPurchased` struct + public enum CodingKeys: String, CodingKey { + case from = "from" + case paidMediaPayload = "paid_media_payload" + } + + /// User who purchased the media + public var from: TGUser + + /// Bot-specified paid media payload + public var paidMediaPayload: String + + public init (from: TGUser, paidMediaPayload: String) { + self.from = from + self.paidMediaPayload = paidMediaPayload + } +} diff --git a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGTransactionPartnerUser.swift b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGTransactionPartnerUser.swift index dcf1726..049c9e7 100644 --- a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGTransactionPartnerUser.swift +++ b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGTransactionPartnerUser.swift @@ -14,6 +14,7 @@ public final class TGTransactionPartnerUser: Codable { case user = "user" case invoicePayload = "invoice_payload" case paidMedia = "paid_media" + case paidMediaPayload = "paid_media_payload" } /// Type of the transaction partner, always “user” @@ -28,10 +29,14 @@ public final class TGTransactionPartnerUser: Codable { /// Optional. Information about the paid media bought by the user public var paidMedia: [TGPaidMedia]? - public init (type: TGTransactionPartnerUserType, user: TGUser, invoicePayload: String? = nil, paidMedia: [TGPaidMedia]? = nil) { + /// Optional. Bot-specified paid media payload + public var paidMediaPayload: String? + + public init (type: TGTransactionPartnerUserType, user: TGUser, invoicePayload: String? = nil, paidMedia: [TGPaidMedia]? = nil, paidMediaPayload: String? = nil) { self.type = type self.user = user self.invoicePayload = invoicePayload self.paidMedia = paidMedia + self.paidMediaPayload = paidMediaPayload } } diff --git a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGUpdate.swift b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGUpdate.swift index cd30ffc..7381469 100644 --- a/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGUpdate.swift +++ b/Sources/SwiftTelegramSdk/Bot/Telegram/Models/TGUpdate.swift @@ -27,6 +27,7 @@ public final class TGUpdate: Codable { case callbackQuery = "callback_query" case shippingQuery = "shipping_query" case preCheckoutQuery = "pre_checkout_query" + case purchasedPaidMedia = "purchased_paid_media" case poll = "poll" case pollAnswer = "poll_answer" case myChatMember = "my_chat_member" @@ -84,6 +85,9 @@ public final class TGUpdate: Codable { /// Optional. New incoming pre-checkout query. Contains full information about checkout public var preCheckoutQuery: TGPreCheckoutQuery? + /// Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat + public var purchasedPaidMedia: TGPaidMediaPurchased? + /// Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot public var poll: TGPoll? @@ -105,7 +109,7 @@ public final class TGUpdate: Codable { /// Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates. public var removedChatBoost: TGChatBoostRemoved? - public init (updateId: Int, message: TGMessage? = nil, editedMessage: TGMessage? = nil, channelPost: TGMessage? = nil, editedChannelPost: TGMessage? = nil, businessConnection: TGBusinessConnection? = nil, businessMessage: TGMessage? = nil, editedBusinessMessage: TGMessage? = nil, deletedBusinessMessages: TGBusinessMessagesDeleted? = nil, messageReaction: TGMessageReactionUpdated? = nil, messageReactionCount: TGMessageReactionCountUpdated? = nil, inlineQuery: TGInlineQuery? = nil, chosenInlineResult: TGChosenInlineResult? = nil, callbackQuery: TGCallbackQuery? = nil, shippingQuery: TGShippingQuery? = nil, preCheckoutQuery: TGPreCheckoutQuery? = nil, poll: TGPoll? = nil, pollAnswer: TGPollAnswer? = nil, myChatMember: TGChatMemberUpdated? = nil, chatMember: TGChatMemberUpdated? = nil, chatJoinRequest: TGChatJoinRequest? = nil, chatBoost: TGChatBoostUpdated? = nil, removedChatBoost: TGChatBoostRemoved? = nil) { + public init (updateId: Int, message: TGMessage? = nil, editedMessage: TGMessage? = nil, channelPost: TGMessage? = nil, editedChannelPost: TGMessage? = nil, businessConnection: TGBusinessConnection? = nil, businessMessage: TGMessage? = nil, editedBusinessMessage: TGMessage? = nil, deletedBusinessMessages: TGBusinessMessagesDeleted? = nil, messageReaction: TGMessageReactionUpdated? = nil, messageReactionCount: TGMessageReactionCountUpdated? = nil, inlineQuery: TGInlineQuery? = nil, chosenInlineResult: TGChosenInlineResult? = nil, callbackQuery: TGCallbackQuery? = nil, shippingQuery: TGShippingQuery? = nil, preCheckoutQuery: TGPreCheckoutQuery? = nil, purchasedPaidMedia: TGPaidMediaPurchased? = nil, poll: TGPoll? = nil, pollAnswer: TGPollAnswer? = nil, myChatMember: TGChatMemberUpdated? = nil, chatMember: TGChatMemberUpdated? = nil, chatJoinRequest: TGChatJoinRequest? = nil, chatBoost: TGChatBoostUpdated? = nil, removedChatBoost: TGChatBoostRemoved? = nil) { self.updateId = updateId self.message = message self.editedMessage = editedMessage @@ -122,6 +126,7 @@ public final class TGUpdate: Codable { self.callbackQuery = callbackQuery self.shippingQuery = shippingQuery self.preCheckoutQuery = preCheckoutQuery + self.purchasedPaidMedia = purchasedPaidMedia self.poll = poll self.pollAnswer = pollAnswer self.myChatMember = myChatMember