diff --git a/lib/telegram/bot/types/copy_text_button.rb b/lib/telegram/bot/types/copy_text_button.rb new file mode 100644 index 0000000..39c2ac7 --- /dev/null +++ b/lib/telegram/bot/types/copy_text_button.rb @@ -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 diff --git a/lib/telegram/bot/types/inline_keyboard_button.rb b/lib/telegram/bot/types/inline_keyboard_button.rb index 9879a7f..f9e0d08 100644 --- a/lib/telegram/bot/types/inline_keyboard_button.rb +++ b/lib/telegram/bot/types/inline_keyboard_button.rb @@ -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 diff --git a/lib/telegram/bot/types/transaction_partner_telegram_api.rb b/lib/telegram/bot/types/transaction_partner_telegram_api.rb new file mode 100644 index 0000000..0ca38e1 --- /dev/null +++ b/lib/telegram/bot/types/transaction_partner_telegram_api.rb @@ -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 diff --git a/spec/support/openapi_type_attributes.json b/spec/support/openapi_type_attributes.json index c90bf10..74d4f87 100644 --- a/spec/support/openapi_type_attributes.json +++ b/spec/support/openapi_type_attributes.json @@ -1864,6 +1864,9 @@ "switch_inline_query_chosen_chat": { "type": "SwitchInlineQueryChosenChat" }, + "copy_text": { + "type": "CopyTextButton" + }, "callback_game": { "type": null }, @@ -1903,6 +1906,12 @@ "type": "boolean" } }, + "CopyTextButton": { + "text": { + "type": "string", + "required": true + } + }, "CallbackQuery": { "id": { "type": "string", @@ -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",