Skip to content

Commit

Permalink
Implement Bot API 7.11
Browse files Browse the repository at this point in the history
  • Loading branch information
seorgiy committed Nov 16, 2024
1 parent a3aa859 commit 191bb95
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/telegram/bot/types/copy_text_button.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

module Telegram
module Bot
module Types
class CopyTextButton < Base
attribute :text, Types::String.constrained(min_size: 1, max_size: 256)
end
end
end
end
1 change: 1 addition & 0 deletions lib/telegram/bot/types/inline_keyboard_button.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class InlineKeyboardButton < Base
attribute? :switch_inline_query, Types::String
attribute? :switch_inline_query_current_chat, Types::String
attribute? :switch_inline_query_chosen_chat, SwitchInlineQueryChosenChat
attribute? :copy_text, CopyTextButton
attribute? :callback_game, CallbackGame
attribute? :pay, Types::Bool
end
Expand Down
12 changes: 12 additions & 0 deletions lib/telegram/bot/types/transaction_partner_telegram_api.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

module Telegram
module Bot
module Types
class TransactionPartnerTelegramApi < Base
attribute :type, Types::String.constrained(eql: 'telegram_api').default('telegram_api')
attribute :request_count, Types::Integer
end
end
end
end
20 changes: 20 additions & 0 deletions spec/support/openapi_type_attributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1864,6 +1864,9 @@
"switch_inline_query_chosen_chat": {
"type": "SwitchInlineQueryChosenChat"
},
"copy_text": {
"type": "CopyTextButton"
},
"callback_game": {
"type": null
},
Expand Down Expand Up @@ -1903,6 +1906,12 @@
"type": "boolean"
}
},
"CopyTextButton": {
"text": {
"type": "string",
"required": true
}
},
"CallbackQuery": {
"id": {
"type": "string",
Expand Down Expand Up @@ -4464,6 +4473,17 @@
"default": "telegram_ads"
}
},
"TransactionPartnerTelegramApi": {
"type": {
"type": "string",
"required": true,
"default": "telegram_api"
},
"request_count": {
"type": "integer",
"required": true
}
},
"TransactionPartnerOther": {
"type": {
"type": "string",
Expand Down

0 comments on commit 191bb95

Please sign in to comment.