telegram-bot-openapi 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +419 -0
- data/Rakefile +10 -0
- data/docs/Animation.md +34 -0
- data/docs/AnswerWebAppQuery200Response.md +20 -0
- data/docs/Audio.md +34 -0
- data/docs/Birthdate.md +22 -0
- data/docs/BotCommand.md +20 -0
- data/docs/BotCommandScopeAllChatAdministrators.md +18 -0
- data/docs/BotCommandScopeAllGroupChats.md +18 -0
- data/docs/BotCommandScopeAllPrivateChats.md +18 -0
- data/docs/BotCommandScopeChat.md +20 -0
- data/docs/BotCommandScopeChatAdministrators.md +20 -0
- data/docs/BotCommandScopeChatMember.md +22 -0
- data/docs/BotCommandScopeDefault.md +18 -0
- data/docs/BotDescription.md +18 -0
- data/docs/BotName.md +18 -0
- data/docs/BotShortDescription.md +18 -0
- data/docs/BusinessConnection.md +28 -0
- data/docs/BusinessIntro.md +22 -0
- data/docs/BusinessLocation.md +20 -0
- data/docs/BusinessMessagesDeleted.md +22 -0
- data/docs/BusinessOpeningHours.md +20 -0
- data/docs/BusinessOpeningHoursInterval.md +20 -0
- data/docs/CallbackQuery.md +30 -0
- data/docs/Chat.md +100 -0
- data/docs/ChatAdministratorRights.md +46 -0
- data/docs/ChatBoost.md +24 -0
- data/docs/ChatBoostAdded.md +18 -0
- data/docs/ChatBoostRemoved.md +24 -0
- data/docs/ChatBoostSourceGiftCode.md +20 -0
- data/docs/ChatBoostSourceGiveaway.md +24 -0
- data/docs/ChatBoostSourcePremium.md +20 -0
- data/docs/ChatBoostUpdated.md +20 -0
- data/docs/ChatInviteLink.md +34 -0
- data/docs/ChatJoinRequest.md +28 -0
- data/docs/ChatLocation.md +20 -0
- data/docs/ChatMemberAdministrator.md +54 -0
- data/docs/ChatMemberBanned.md +22 -0
- data/docs/ChatMemberLeft.md +20 -0
- data/docs/ChatMemberMember.md +20 -0
- data/docs/ChatMemberOwner.md +24 -0
- data/docs/ChatMemberRestricted.md +52 -0
- data/docs/ChatMemberUpdated.md +30 -0
- data/docs/ChatPermissions.md +44 -0
- data/docs/ChatPhoto.md +24 -0
- data/docs/ChatShared.md +26 -0
- data/docs/ChosenInlineResult.md +26 -0
- data/docs/Contact.md +26 -0
- data/docs/CopyMessage200Response.md +20 -0
- data/docs/CreateChatInviteLink200Response.md +20 -0
- data/docs/CreateForumTopic200Response.md +20 -0
- data/docs/DefaultApi.md +8843 -0
- data/docs/Dice.md +20 -0
- data/docs/Document.md +28 -0
- data/docs/EditMessageText200Response.md +20 -0
- data/docs/EditMessageText200ResponseResultValue.md +49 -0
- data/docs/EncryptedCredentials.md +22 -0
- data/docs/EncryptedPassportElement.md +36 -0
- data/docs/ExportChatInviteLink200Response.md +20 -0
- data/docs/ExternalReplyInfo.md +62 -0
- data/docs/File.md +24 -0
- data/docs/ForceReply.md +22 -0
- data/docs/ForumTopic.md +24 -0
- data/docs/ForumTopicCreated.md +22 -0
- data/docs/ForumTopicEdited.md +20 -0
- data/docs/ForwardMessages200Response.md +20 -0
- data/docs/Game.md +28 -0
- data/docs/GameHighScore.md +22 -0
- data/docs/GetBusinessConnection200Response.md +20 -0
- data/docs/GetChat200Response.md +20 -0
- data/docs/GetChatAdministrators200Response.md +20 -0
- data/docs/GetChatMember200Response.md +20 -0
- data/docs/GetChatMemberCount200Response.md +20 -0
- data/docs/GetChatMenuButton200Response.md +20 -0
- data/docs/GetFile200Response.md +20 -0
- data/docs/GetForumTopicIconStickers200Response.md +20 -0
- data/docs/GetGameHighScores200Response.md +20 -0
- data/docs/GetMe200Response.md +20 -0
- data/docs/GetMyCommands200Response.md +20 -0
- data/docs/GetMyDefaultAdministratorRights200Response.md +20 -0
- data/docs/GetMyDescription200Response.md +20 -0
- data/docs/GetMyName200Response.md +20 -0
- data/docs/GetMyShortDescription200Response.md +20 -0
- data/docs/GetStickerSet200Response.md +20 -0
- data/docs/GetUpdates200Response.md +20 -0
- data/docs/GetUpdates4XXResponse.md +22 -0
- data/docs/GetUserChatBoosts200Response.md +20 -0
- data/docs/GetUserProfilePhotos200Response.md +20 -0
- data/docs/GetWebhookInfo200Response.md +20 -0
- data/docs/Giveaway.md +32 -0
- data/docs/GiveawayCompleted.md +22 -0
- data/docs/GiveawayWinners.md +38 -0
- data/docs/InaccessibleMessage.md +22 -0
- data/docs/InlineKeyboardButton.md +36 -0
- data/docs/InlineKeyboardMarkup.md +18 -0
- data/docs/InlineQuery.md +28 -0
- data/docs/InlineQueryResultArticle.md +38 -0
- data/docs/InlineQueryResultAudio.md +38 -0
- data/docs/InlineQueryResultCachedAudio.md +32 -0
- data/docs/InlineQueryResultCachedDocument.md +36 -0
- data/docs/InlineQueryResultCachedGif.md +34 -0
- data/docs/InlineQueryResultCachedMpeg4Gif.md +34 -0
- data/docs/InlineQueryResultCachedPhoto.md +36 -0
- data/docs/InlineQueryResultCachedSticker.md +26 -0
- data/docs/InlineQueryResultCachedVideo.md +36 -0
- data/docs/InlineQueryResultCachedVoice.md +34 -0
- data/docs/InlineQueryResultContact.md +38 -0
- data/docs/InlineQueryResultDocument.md +44 -0
- data/docs/InlineQueryResultGame.md +24 -0
- data/docs/InlineQueryResultGif.md +44 -0
- data/docs/InlineQueryResultLocation.md +44 -0
- data/docs/InlineQueryResultMpeg4Gif.md +44 -0
- data/docs/InlineQueryResultPhoto.md +42 -0
- data/docs/InlineQueryResultVenue.md +46 -0
- data/docs/InlineQueryResultVideo.md +46 -0
- data/docs/InlineQueryResultVoice.md +36 -0
- data/docs/InlineQueryResultsButton.md +22 -0
- data/docs/InputContactMessageContent.md +24 -0
- data/docs/InputInvoiceMessageContent.md +56 -0
- data/docs/InputLocationMessageContent.md +28 -0
- data/docs/InputMediaAnimation.md +36 -0
- data/docs/InputMediaAudio.md +34 -0
- data/docs/InputMediaDocument.md +30 -0
- data/docs/InputMediaPhoto.md +28 -0
- data/docs/InputMediaVideo.md +38 -0
- data/docs/InputSticker.md +26 -0
- data/docs/InputTextMessageContent.md +24 -0
- data/docs/InputVenueMessageContent.md +32 -0
- data/docs/Invoice.md +26 -0
- data/docs/KeyboardButton.md +30 -0
- data/docs/KeyboardButtonPollType.md +18 -0
- data/docs/KeyboardButtonRequestChat.md +38 -0
- data/docs/KeyboardButtonRequestUsers.md +30 -0
- data/docs/LabeledPrice.md +20 -0
- data/docs/LinkPreviewOptions.md +26 -0
- data/docs/Location.md +28 -0
- data/docs/LoginUrl.md +24 -0
- data/docs/MaskPosition.md +24 -0
- data/docs/MenuButtonCommands.md +18 -0
- data/docs/MenuButtonDefault.md +18 -0
- data/docs/MenuButtonWebApp.md +22 -0
- data/docs/Message.md +176 -0
- data/docs/MessageAutoDeleteTimerChanged.md +18 -0
- data/docs/MessageEntity.md +30 -0
- data/docs/MessageId.md +18 -0
- data/docs/MessageOriginChannel.md +26 -0
- data/docs/MessageOriginChat.md +24 -0
- data/docs/MessageOriginHiddenUser.md +22 -0
- data/docs/MessageOriginUser.md +22 -0
- data/docs/MessageReactionCountUpdated.md +24 -0
- data/docs/MessageReactionUpdated.md +30 -0
- data/docs/OrderInfo.md +24 -0
- data/docs/PassportData.md +20 -0
- data/docs/PassportElementErrorDataField.md +26 -0
- data/docs/PassportElementErrorFile.md +24 -0
- data/docs/PassportElementErrorFiles.md +24 -0
- data/docs/PassportElementErrorFrontSide.md +24 -0
- data/docs/PassportElementErrorReverseSide.md +24 -0
- data/docs/PassportElementErrorSelfie.md +24 -0
- data/docs/PassportElementErrorTranslationFile.md +24 -0
- data/docs/PassportElementErrorTranslationFiles.md +24 -0
- data/docs/PassportElementErrorUnspecified.md +24 -0
- data/docs/PassportFile.md +24 -0
- data/docs/PhotoSize.md +26 -0
- data/docs/Poll.md +42 -0
- data/docs/PollAnswer.md +24 -0
- data/docs/PollOption.md +20 -0
- data/docs/PreCheckoutQuery.md +30 -0
- data/docs/ProximityAlertTriggered.md +22 -0
- data/docs/ReactionCount.md +20 -0
- data/docs/ReactionTypeCustomEmoji.md +20 -0
- data/docs/ReactionTypeEmoji.md +20 -0
- data/docs/ReplyKeyboardMarkup.md +28 -0
- data/docs/ReplyKeyboardRemove.md +20 -0
- data/docs/ReplyParameters.md +30 -0
- data/docs/ResponseParameters.md +20 -0
- data/docs/SendMediaGroup200Response.md +20 -0
- data/docs/SendMediaGroupMediaParameterValue.md +53 -0
- data/docs/SendMessage200Response.md +20 -0
- data/docs/SendMessageChatIdParameterValue.md +49 -0
- data/docs/SendMessageReplyMarkupParameterValue.md +53 -0
- data/docs/SendPhotoPhotoParameterValue.md +49 -0
- data/docs/SentWebAppMessage.md +18 -0
- data/docs/SetWebhook200Response.md +20 -0
- data/docs/SharedUser.md +26 -0
- data/docs/ShippingAddress.md +28 -0
- data/docs/ShippingOption.md +22 -0
- data/docs/ShippingQuery.md +24 -0
- data/docs/Sticker.md +46 -0
- data/docs/StickerSet.md +26 -0
- data/docs/StopPoll200Response.md +20 -0
- data/docs/Story.md +20 -0
- data/docs/SuccessfulPayment.md +30 -0
- data/docs/SwitchInlineQueryChosenChat.md +26 -0
- data/docs/TextQuote.md +24 -0
- data/docs/Update.md +62 -0
- data/docs/User.md +40 -0
- data/docs/UserChatBoosts.md +18 -0
- data/docs/UserProfilePhotos.md +20 -0
- data/docs/UsersShared.md +20 -0
- data/docs/Venue.md +30 -0
- data/docs/Video.md +34 -0
- data/docs/VideoChatEnded.md +18 -0
- data/docs/VideoChatParticipantsInvited.md +18 -0
- data/docs/VideoChatScheduled.md +18 -0
- data/docs/VideoNote.md +28 -0
- data/docs/Voice.md +26 -0
- data/docs/WebAppData.md +20 -0
- data/docs/WebAppInfo.md +18 -0
- data/docs/WebhookInfo.md +34 -0
- data/docs/WriteAccessAllowed.md +22 -0
- data/git_push.sh +57 -0
- data/lib/telegram-bot/api/default_api.rb +9305 -0
- data/lib/telegram-bot/api_client.rb +393 -0
- data/lib/telegram-bot/api_error.rb +58 -0
- data/lib/telegram-bot/configuration.rb +307 -0
- data/lib/telegram-bot/models/animation.rb +331 -0
- data/lib/telegram-bot/models/answer_web_app_query200_response.rb +223 -0
- data/lib/telegram-bot/models/audio.rb +317 -0
- data/lib/telegram-bot/models/birthdate.rb +250 -0
- data/lib/telegram-bot/models/bot_command.rb +240 -0
- data/lib/telegram-bot/models/bot_command_scope_all_chat_administrators.rb +223 -0
- data/lib/telegram-bot/models/bot_command_scope_all_group_chats.rb +223 -0
- data/lib/telegram-bot/models/bot_command_scope_all_private_chats.rb +223 -0
- data/lib/telegram-bot/models/bot_command_scope_chat.rb +242 -0
- data/lib/telegram-bot/models/bot_command_scope_chat_administrators.rb +242 -0
- data/lib/telegram-bot/models/bot_command_scope_chat_member.rb +259 -0
- data/lib/telegram-bot/models/bot_command_scope_default.rb +223 -0
- data/lib/telegram-bot/models/bot_description.rb +223 -0
- data/lib/telegram-bot/models/bot_name.rb +223 -0
- data/lib/telegram-bot/models/bot_short_description.rb +223 -0
- data/lib/telegram-bot/models/business_connection.rb +308 -0
- data/lib/telegram-bot/models/business_intro.rb +236 -0
- data/lib/telegram-bot/models/business_location.rb +233 -0
- data/lib/telegram-bot/models/business_messages_deleted.rb +259 -0
- data/lib/telegram-bot/models/business_opening_hours.rb +242 -0
- data/lib/telegram-bot/models/business_opening_hours_interval.rb +240 -0
- data/lib/telegram-bot/models/callback_query.rb +297 -0
- data/lib/telegram-bot/models/chat.rb +644 -0
- data/lib/telegram-bot/models/chat_administrator_rights.rb +433 -0
- data/lib/telegram-bot/models/chat_boost.rb +274 -0
- data/lib/telegram-bot/models/chat_boost_added.rb +223 -0
- data/lib/telegram-bot/models/chat_boost_removed.rb +274 -0
- data/lib/telegram-bot/models/chat_boost_source_gift_code.rb +240 -0
- data/lib/telegram-bot/models/chat_boost_source_giveaway.rb +260 -0
- data/lib/telegram-bot/models/chat_boost_source_premium.rb +240 -0
- data/lib/telegram-bot/models/chat_boost_updated.rb +240 -0
- data/lib/telegram-bot/models/chat_invite_link.rb +331 -0
- data/lib/telegram-bot/models/chat_join_request.rb +294 -0
- data/lib/telegram-bot/models/chat_location.rb +240 -0
- data/lib/telegram-bot/models/chat_member_administrator.rb +494 -0
- data/lib/telegram-bot/models/chat_member_banned.rb +257 -0
- data/lib/telegram-bot/models/chat_member_left.rb +240 -0
- data/lib/telegram-bot/models/chat_member_member.rb +240 -0
- data/lib/telegram-bot/models/chat_member_owner.rb +267 -0
- data/lib/telegram-bot/models/chat_member_restricted.rb +512 -0
- data/lib/telegram-bot/models/chat_member_updated.rb +311 -0
- data/lib/telegram-bot/models/chat_permissions.rb +346 -0
- data/lib/telegram-bot/models/chat_photo.rb +274 -0
- data/lib/telegram-bot/models/chat_shared.rb +272 -0
- data/lib/telegram-bot/models/chosen_inline_result.rb +277 -0
- data/lib/telegram-bot/models/contact.rb +270 -0
- data/lib/telegram-bot/models/copy_message200_response.rb +223 -0
- data/lib/telegram-bot/models/create_chat_invite_link200_response.rb +223 -0
- data/lib/telegram-bot/models/create_forum_topic200_response.rb +223 -0
- data/lib/telegram-bot/models/dice.rb +240 -0
- data/lib/telegram-bot/models/document.rb +280 -0
- data/lib/telegram-bot/models/edit_message_text200_response.rb +225 -0
- data/lib/telegram-bot/models/edit_message_text200_response_result_value.rb +105 -0
- data/lib/telegram-bot/models/encrypted_credentials.rb +257 -0
- data/lib/telegram-bot/models/encrypted_passport_element.rb +324 -0
- data/lib/telegram-bot/models/export_chat_invite_link200_response.rb +223 -0
- data/lib/telegram-bot/models/external_reply_info.rb +445 -0
- data/lib/telegram-bot/models/file.rb +260 -0
- data/lib/telegram-bot/models/force_reply.rb +243 -0
- data/lib/telegram-bot/models/forum_topic.rb +267 -0
- data/lib/telegram-bot/models/forum_topic_created.rb +250 -0
- data/lib/telegram-bot/models/forum_topic_edited.rb +226 -0
- data/lib/telegram-bot/models/forward_messages200_response.rb +225 -0
- data/lib/telegram-bot/models/game.rb +291 -0
- data/lib/telegram-bot/models/game_high_score.rb +257 -0
- data/lib/telegram-bot/models/get_business_connection200_response.rb +223 -0
- data/lib/telegram-bot/models/get_chat200_response.rb +223 -0
- data/lib/telegram-bot/models/get_chat_administrators200_response.rb +225 -0
- data/lib/telegram-bot/models/get_chat_member200_response.rb +224 -0
- data/lib/telegram-bot/models/get_chat_member_count200_response.rb +223 -0
- data/lib/telegram-bot/models/get_chat_menu_button200_response.rb +224 -0
- data/lib/telegram-bot/models/get_file200_response.rb +223 -0
- data/lib/telegram-bot/models/get_forum_topic_icon_stickers200_response.rb +225 -0
- data/lib/telegram-bot/models/get_game_high_scores200_response.rb +225 -0
- data/lib/telegram-bot/models/get_me200_response.rb +223 -0
- data/lib/telegram-bot/models/get_my_commands200_response.rb +225 -0
- data/lib/telegram-bot/models/get_my_default_administrator_rights200_response.rb +223 -0
- data/lib/telegram-bot/models/get_my_description200_response.rb +223 -0
- data/lib/telegram-bot/models/get_my_name200_response.rb +223 -0
- data/lib/telegram-bot/models/get_my_short_description200_response.rb +223 -0
- data/lib/telegram-bot/models/get_sticker_set200_response.rb +223 -0
- data/lib/telegram-bot/models/get_updates200_response.rb +225 -0
- data/lib/telegram-bot/models/get_updates4_xx_response.rb +232 -0
- data/lib/telegram-bot/models/get_user_chat_boosts200_response.rb +223 -0
- data/lib/telegram-bot/models/get_user_profile_photos200_response.rb +223 -0
- data/lib/telegram-bot/models/get_webhook_info200_response.rb +223 -0
- data/lib/telegram-bot/models/giveaway.rb +311 -0
- data/lib/telegram-bot/models/giveaway_completed.rb +243 -0
- data/lib/telegram-bot/models/giveaway_winners.rb +353 -0
- data/lib/telegram-bot/models/inaccessible_message.rb +257 -0
- data/lib/telegram-bot/models/inline_keyboard_button.rb +313 -0
- data/lib/telegram-bot/models/inline_keyboard_markup.rb +225 -0
- data/lib/telegram-bot/models/inline_query.rb +294 -0
- data/lib/telegram-bot/models/inline_query_result_article.rb +344 -0
- data/lib/telegram-bot/models/inline_query_result_audio.rb +346 -0
- data/lib/telegram-bot/models/inline_query_result_cached_audio.rb +309 -0
- data/lib/telegram-bot/models/inline_query_result_cached_document.rb +336 -0
- data/lib/telegram-bot/models/inline_query_result_cached_gif.rb +319 -0
- data/lib/telegram-bot/models/inline_query_result_cached_mpeg4_gif.rb +319 -0
- data/lib/telegram-bot/models/inline_query_result_cached_photo.rb +329 -0
- data/lib/telegram-bot/models/inline_query_result_cached_sticker.rb +277 -0
- data/lib/telegram-bot/models/inline_query_result_cached_video.rb +336 -0
- data/lib/telegram-bot/models/inline_query_result_cached_voice.rb +326 -0
- data/lib/telegram-bot/models/inline_query_result_contact.rb +344 -0
- data/lib/telegram-bot/models/inline_query_result_document.rb +383 -0
- data/lib/telegram-bot/models/inline_query_result_game.rb +267 -0
- data/lib/telegram-bot/models/inline_query_result_gif.rb +376 -0
- data/lib/telegram-bot/models/inline_query_result_location.rb +381 -0
- data/lib/telegram-bot/models/inline_query_result_mpeg4_gif.rb +376 -0
- data/lib/telegram-bot/models/inline_query_result_photo.rb +366 -0
- data/lib/telegram-bot/models/inline_query_result_venue.rb +398 -0
- data/lib/telegram-bot/models/inline_query_result_video.rb +400 -0
- data/lib/telegram-bot/models/inline_query_result_voice.rb +336 -0
- data/lib/telegram-bot/models/inline_query_results_button.rb +243 -0
- data/lib/telegram-bot/models/input_contact_message_content.rb +260 -0
- data/lib/telegram-bot/models/input_invoice_message_content.rb +452 -0
- data/lib/telegram-bot/models/input_location_message_content.rb +280 -0
- data/lib/telegram-bot/models/input_media_animation.rb +324 -0
- data/lib/telegram-bot/models/input_media_audio.rb +314 -0
- data/lib/telegram-bot/models/input_media_document.rb +294 -0
- data/lib/telegram-bot/models/input_media_photo.rb +282 -0
- data/lib/telegram-bot/models/input_media_video.rb +334 -0
- data/lib/telegram-bot/models/input_sticker.rb +283 -0
- data/lib/telegram-bot/models/input_text_message_content.rb +255 -0
- data/lib/telegram-bot/models/input_venue_message_content.rb +314 -0
- data/lib/telegram-bot/models/invoice.rb +291 -0
- data/lib/telegram-bot/models/keyboard_button.rb +283 -0
- data/lib/telegram-bot/models/keyboard_button_poll_type.rb +216 -0
- data/lib/telegram-bot/models/keyboard_button_request_chat.rb +330 -0
- data/lib/telegram-bot/models/keyboard_button_request_users.rb +283 -0
- data/lib/telegram-bot/models/labeled_price.rb +240 -0
- data/lib/telegram-bot/models/link_preview_options.rb +256 -0
- data/lib/telegram-bot/models/location.rb +280 -0
- data/lib/telegram-bot/models/login_url.rb +253 -0
- data/lib/telegram-bot/models/mask_position.rb +274 -0
- data/lib/telegram-bot/models/menu_button_commands.rb +223 -0
- data/lib/telegram-bot/models/menu_button_default.rb +223 -0
- data/lib/telegram-bot/models/menu_button_web_app.rb +257 -0
- data/lib/telegram-bot/models/message.rb +1037 -0
- data/lib/telegram-bot/models/message_auto_delete_timer_changed.rb +223 -0
- data/lib/telegram-bot/models/message_entity.rb +297 -0
- data/lib/telegram-bot/models/message_id.rb +223 -0
- data/lib/telegram-bot/models/message_origin_channel.rb +284 -0
- data/lib/telegram-bot/models/message_origin_chat.rb +267 -0
- data/lib/telegram-bot/models/message_origin_hidden_user.rb +257 -0
- data/lib/telegram-bot/models/message_origin_user.rb +257 -0
- data/lib/telegram-bot/models/message_reaction_count_updated.rb +276 -0
- data/lib/telegram-bot/models/message_reaction_updated.rb +315 -0
- data/lib/telegram-bot/models/order_info.rb +246 -0
- data/lib/telegram-bot/models/passport_data.rb +242 -0
- data/lib/telegram-bot/models/passport_element_error_data_field.rb +291 -0
- data/lib/telegram-bot/models/passport_element_error_file.rb +274 -0
- data/lib/telegram-bot/models/passport_element_error_files.rb +276 -0
- data/lib/telegram-bot/models/passport_element_error_front_side.rb +274 -0
- data/lib/telegram-bot/models/passport_element_error_reverse_side.rb +274 -0
- data/lib/telegram-bot/models/passport_element_error_selfie.rb +274 -0
- data/lib/telegram-bot/models/passport_element_error_translation_file.rb +274 -0
- data/lib/telegram-bot/models/passport_element_error_translation_files.rb +276 -0
- data/lib/telegram-bot/models/passport_element_error_unspecified.rb +274 -0
- data/lib/telegram-bot/models/passport_file.rb +274 -0
- data/lib/telegram-bot/models/photo_size.rb +284 -0
- data/lib/telegram-bot/models/poll.rb +396 -0
- data/lib/telegram-bot/models/poll_answer.rb +262 -0
- data/lib/telegram-bot/models/poll_option.rb +240 -0
- data/lib/telegram-bot/models/pre_checkout_query.rb +311 -0
- data/lib/telegram-bot/models/proximity_alert_triggered.rb +257 -0
- data/lib/telegram-bot/models/reaction_count.rb +240 -0
- data/lib/telegram-bot/models/reaction_type_custom_emoji.rb +240 -0
- data/lib/telegram-bot/models/reaction_type_emoji.rb +240 -0
- data/lib/telegram-bot/models/reply_keyboard_markup.rb +275 -0
- data/lib/telegram-bot/models/reply_keyboard_remove.rb +233 -0
- data/lib/telegram-bot/models/reply_parameters.rb +287 -0
- data/lib/telegram-bot/models/response_parameters.rb +226 -0
- data/lib/telegram-bot/models/send_media_group200_response.rb +225 -0
- data/lib/telegram-bot/models/send_media_group_media_parameter_value.rb +107 -0
- data/lib/telegram-bot/models/send_message200_response.rb +223 -0
- data/lib/telegram-bot/models/send_message_chat_id_parameter_value.rb +105 -0
- data/lib/telegram-bot/models/send_message_reply_markup_parameter_value.rb +107 -0
- data/lib/telegram-bot/models/send_photo_photo_parameter_value.rb +105 -0
- data/lib/telegram-bot/models/sent_web_app_message.rb +216 -0
- data/lib/telegram-bot/models/set_webhook200_response.rb +223 -0
- data/lib/telegram-bot/models/shared_user.rb +265 -0
- data/lib/telegram-bot/models/shipping_address.rb +308 -0
- data/lib/telegram-bot/models/shipping_option.rb +259 -0
- data/lib/telegram-bot/models/shipping_query.rb +274 -0
- data/lib/telegram-bot/models/sticker.rb +405 -0
- data/lib/telegram-bot/models/sticker_set.rb +286 -0
- data/lib/telegram-bot/models/stop_poll200_response.rb +223 -0
- data/lib/telegram-bot/models/story.rb +240 -0
- data/lib/telegram-bot/models/successful_payment.rb +311 -0
- data/lib/telegram-bot/models/switch_inline_query_chosen_chat.rb +256 -0
- data/lib/telegram-bot/models/text_quote.rb +262 -0
- data/lib/telegram-bot/models/update.rb +443 -0
- data/lib/telegram-bot/models/user.rb +347 -0
- data/lib/telegram-bot/models/user_chat_boosts.rb +225 -0
- data/lib/telegram-bot/models/user_profile_photos.rb +242 -0
- data/lib/telegram-bot/models/users_shared.rb +242 -0
- data/lib/telegram-bot/models/venue.rb +297 -0
- data/lib/telegram-bot/models/video.rb +331 -0
- data/lib/telegram-bot/models/video_chat_ended.rb +223 -0
- data/lib/telegram-bot/models/video_chat_participants_invited.rb +225 -0
- data/lib/telegram-bot/models/video_chat_scheduled.rb +223 -0
- data/lib/telegram-bot/models/video_note.rb +294 -0
- data/lib/telegram-bot/models/voice.rb +277 -0
- data/lib/telegram-bot/models/web_app_data.rb +240 -0
- data/lib/telegram-bot/models/web_app_info.rb +223 -0
- data/lib/telegram-bot/models/webhook_info.rb +319 -0
- data/lib/telegram-bot/models/write_access_allowed.rb +236 -0
- data/lib/telegram-bot/version.rb +15 -0
- data/lib/telegram-bot.rb +248 -0
- data/spec/api/default_api_spec.rb +1904 -0
- data/spec/models/animation_spec.rb +84 -0
- data/spec/models/answer_web_app_query200_response_spec.rb +42 -0
- data/spec/models/audio_spec.rb +84 -0
- data/spec/models/birthdate_spec.rb +48 -0
- data/spec/models/bot_command_scope_all_chat_administrators_spec.rb +36 -0
- data/spec/models/bot_command_scope_all_group_chats_spec.rb +36 -0
- data/spec/models/bot_command_scope_all_private_chats_spec.rb +36 -0
- data/spec/models/bot_command_scope_chat_administrators_spec.rb +42 -0
- data/spec/models/bot_command_scope_chat_member_spec.rb +48 -0
- data/spec/models/bot_command_scope_chat_spec.rb +42 -0
- data/spec/models/bot_command_scope_default_spec.rb +36 -0
- data/spec/models/bot_command_spec.rb +42 -0
- data/spec/models/bot_description_spec.rb +36 -0
- data/spec/models/bot_name_spec.rb +36 -0
- data/spec/models/bot_short_description_spec.rb +36 -0
- data/spec/models/business_connection_spec.rb +66 -0
- data/spec/models/business_intro_spec.rb +48 -0
- data/spec/models/business_location_spec.rb +42 -0
- data/spec/models/business_messages_deleted_spec.rb +48 -0
- data/spec/models/business_opening_hours_interval_spec.rb +42 -0
- data/spec/models/business_opening_hours_spec.rb +42 -0
- data/spec/models/callback_query_spec.rb +72 -0
- data/spec/models/chat_administrator_rights_spec.rb +120 -0
- data/spec/models/chat_boost_added_spec.rb +36 -0
- data/spec/models/chat_boost_removed_spec.rb +54 -0
- data/spec/models/chat_boost_source_gift_code_spec.rb +42 -0
- data/spec/models/chat_boost_source_giveaway_spec.rb +54 -0
- data/spec/models/chat_boost_source_premium_spec.rb +42 -0
- data/spec/models/chat_boost_spec.rb +54 -0
- data/spec/models/chat_boost_updated_spec.rb +42 -0
- data/spec/models/chat_invite_link_spec.rb +84 -0
- data/spec/models/chat_join_request_spec.rb +66 -0
- data/spec/models/chat_location_spec.rb +42 -0
- data/spec/models/chat_member_administrator_spec.rb +144 -0
- data/spec/models/chat_member_banned_spec.rb +48 -0
- data/spec/models/chat_member_left_spec.rb +42 -0
- data/spec/models/chat_member_member_spec.rb +42 -0
- data/spec/models/chat_member_owner_spec.rb +54 -0
- data/spec/models/chat_member_restricted_spec.rb +138 -0
- data/spec/models/chat_member_updated_spec.rb +72 -0
- data/spec/models/chat_permissions_spec.rb +114 -0
- data/spec/models/chat_photo_spec.rb +54 -0
- data/spec/models/chat_shared_spec.rb +60 -0
- data/spec/models/chat_spec.rb +282 -0
- data/spec/models/chosen_inline_result_spec.rb +60 -0
- data/spec/models/contact_spec.rb +60 -0
- data/spec/models/copy_message200_response_spec.rb +42 -0
- data/spec/models/create_chat_invite_link200_response_spec.rb +42 -0
- data/spec/models/create_forum_topic200_response_spec.rb +42 -0
- data/spec/models/dice_spec.rb +42 -0
- data/spec/models/document_spec.rb +66 -0
- data/spec/models/edit_message_text200_response_result_value_spec.rb +32 -0
- data/spec/models/edit_message_text200_response_spec.rb +42 -0
- data/spec/models/encrypted_credentials_spec.rb +48 -0
- data/spec/models/encrypted_passport_element_spec.rb +90 -0
- data/spec/models/export_chat_invite_link200_response_spec.rb +42 -0
- data/spec/models/external_reply_info_spec.rb +168 -0
- data/spec/models/file_spec.rb +54 -0
- data/spec/models/force_reply_spec.rb +48 -0
- data/spec/models/forum_topic_created_spec.rb +48 -0
- data/spec/models/forum_topic_edited_spec.rb +42 -0
- data/spec/models/forum_topic_spec.rb +54 -0
- data/spec/models/forward_messages200_response_spec.rb +42 -0
- data/spec/models/game_high_score_spec.rb +48 -0
- data/spec/models/game_spec.rb +66 -0
- data/spec/models/get_business_connection200_response_spec.rb +42 -0
- data/spec/models/get_chat200_response_spec.rb +42 -0
- data/spec/models/get_chat_administrators200_response_spec.rb +42 -0
- data/spec/models/get_chat_member200_response_spec.rb +42 -0
- data/spec/models/get_chat_member_count200_response_spec.rb +42 -0
- data/spec/models/get_chat_menu_button200_response_spec.rb +42 -0
- data/spec/models/get_file200_response_spec.rb +42 -0
- data/spec/models/get_forum_topic_icon_stickers200_response_spec.rb +42 -0
- data/spec/models/get_game_high_scores200_response_spec.rb +42 -0
- data/spec/models/get_me200_response_spec.rb +42 -0
- data/spec/models/get_my_commands200_response_spec.rb +42 -0
- data/spec/models/get_my_default_administrator_rights200_response_spec.rb +42 -0
- data/spec/models/get_my_description200_response_spec.rb +42 -0
- data/spec/models/get_my_name200_response_spec.rb +42 -0
- data/spec/models/get_my_short_description200_response_spec.rb +42 -0
- data/spec/models/get_sticker_set200_response_spec.rb +42 -0
- data/spec/models/get_updates200_response_spec.rb +42 -0
- data/spec/models/get_updates4_xx_response_spec.rb +48 -0
- data/spec/models/get_user_chat_boosts200_response_spec.rb +42 -0
- data/spec/models/get_user_profile_photos200_response_spec.rb +42 -0
- data/spec/models/get_webhook_info200_response_spec.rb +42 -0
- data/spec/models/giveaway_completed_spec.rb +48 -0
- data/spec/models/giveaway_spec.rb +78 -0
- data/spec/models/giveaway_winners_spec.rb +96 -0
- data/spec/models/inaccessible_message_spec.rb +48 -0
- data/spec/models/inline_keyboard_button_spec.rb +90 -0
- data/spec/models/inline_keyboard_markup_spec.rb +36 -0
- data/spec/models/inline_query_result_article_spec.rb +96 -0
- data/spec/models/inline_query_result_audio_spec.rb +96 -0
- data/spec/models/inline_query_result_cached_audio_spec.rb +78 -0
- data/spec/models/inline_query_result_cached_document_spec.rb +90 -0
- data/spec/models/inline_query_result_cached_gif_spec.rb +84 -0
- data/spec/models/inline_query_result_cached_mpeg4_gif_spec.rb +84 -0
- data/spec/models/inline_query_result_cached_photo_spec.rb +90 -0
- data/spec/models/inline_query_result_cached_sticker_spec.rb +60 -0
- data/spec/models/inline_query_result_cached_video_spec.rb +90 -0
- data/spec/models/inline_query_result_cached_voice_spec.rb +84 -0
- data/spec/models/inline_query_result_contact_spec.rb +96 -0
- data/spec/models/inline_query_result_document_spec.rb +114 -0
- data/spec/models/inline_query_result_game_spec.rb +54 -0
- data/spec/models/inline_query_result_gif_spec.rb +114 -0
- data/spec/models/inline_query_result_location_spec.rb +114 -0
- data/spec/models/inline_query_result_mpeg4_gif_spec.rb +114 -0
- data/spec/models/inline_query_result_photo_spec.rb +108 -0
- data/spec/models/inline_query_result_venue_spec.rb +120 -0
- data/spec/models/inline_query_result_video_spec.rb +120 -0
- data/spec/models/inline_query_result_voice_spec.rb +90 -0
- data/spec/models/inline_query_results_button_spec.rb +48 -0
- data/spec/models/inline_query_spec.rb +66 -0
- data/spec/models/input_contact_message_content_spec.rb +54 -0
- data/spec/models/input_invoice_message_content_spec.rb +150 -0
- data/spec/models/input_location_message_content_spec.rb +66 -0
- data/spec/models/input_media_animation_spec.rb +90 -0
- data/spec/models/input_media_audio_spec.rb +84 -0
- data/spec/models/input_media_document_spec.rb +72 -0
- data/spec/models/input_media_photo_spec.rb +66 -0
- data/spec/models/input_media_video_spec.rb +96 -0
- data/spec/models/input_sticker_spec.rb +60 -0
- data/spec/models/input_text_message_content_spec.rb +54 -0
- data/spec/models/input_venue_message_content_spec.rb +78 -0
- data/spec/models/invoice_spec.rb +60 -0
- data/spec/models/keyboard_button_poll_type_spec.rb +36 -0
- data/spec/models/keyboard_button_request_chat_spec.rb +96 -0
- data/spec/models/keyboard_button_request_users_spec.rb +72 -0
- data/spec/models/keyboard_button_spec.rb +72 -0
- data/spec/models/labeled_price_spec.rb +42 -0
- data/spec/models/link_preview_options_spec.rb +60 -0
- data/spec/models/location_spec.rb +66 -0
- data/spec/models/login_url_spec.rb +54 -0
- data/spec/models/mask_position_spec.rb +54 -0
- data/spec/models/menu_button_commands_spec.rb +36 -0
- data/spec/models/menu_button_default_spec.rb +36 -0
- data/spec/models/menu_button_web_app_spec.rb +48 -0
- data/spec/models/message_auto_delete_timer_changed_spec.rb +36 -0
- data/spec/models/message_entity_spec.rb +72 -0
- data/spec/models/message_id_spec.rb +36 -0
- data/spec/models/message_origin_channel_spec.rb +60 -0
- data/spec/models/message_origin_chat_spec.rb +54 -0
- data/spec/models/message_origin_hidden_user_spec.rb +48 -0
- data/spec/models/message_origin_user_spec.rb +48 -0
- data/spec/models/message_reaction_count_updated_spec.rb +54 -0
- data/spec/models/message_reaction_updated_spec.rb +72 -0
- data/spec/models/message_spec.rb +510 -0
- data/spec/models/order_info_spec.rb +54 -0
- data/spec/models/passport_data_spec.rb +42 -0
- data/spec/models/passport_element_error_data_field_spec.rb +60 -0
- data/spec/models/passport_element_error_file_spec.rb +54 -0
- data/spec/models/passport_element_error_files_spec.rb +54 -0
- data/spec/models/passport_element_error_front_side_spec.rb +54 -0
- data/spec/models/passport_element_error_reverse_side_spec.rb +54 -0
- data/spec/models/passport_element_error_selfie_spec.rb +54 -0
- data/spec/models/passport_element_error_translation_file_spec.rb +54 -0
- data/spec/models/passport_element_error_translation_files_spec.rb +54 -0
- data/spec/models/passport_element_error_unspecified_spec.rb +54 -0
- data/spec/models/passport_file_spec.rb +54 -0
- data/spec/models/photo_size_spec.rb +60 -0
- data/spec/models/poll_answer_spec.rb +54 -0
- data/spec/models/poll_option_spec.rb +42 -0
- data/spec/models/poll_spec.rb +108 -0
- data/spec/models/pre_checkout_query_spec.rb +72 -0
- data/spec/models/proximity_alert_triggered_spec.rb +48 -0
- data/spec/models/reaction_count_spec.rb +42 -0
- data/spec/models/reaction_type_custom_emoji_spec.rb +42 -0
- data/spec/models/reaction_type_emoji_spec.rb +42 -0
- data/spec/models/reply_keyboard_markup_spec.rb +66 -0
- data/spec/models/reply_keyboard_remove_spec.rb +42 -0
- data/spec/models/reply_parameters_spec.rb +72 -0
- data/spec/models/response_parameters_spec.rb +42 -0
- data/spec/models/send_media_group200_response_spec.rb +42 -0
- data/spec/models/send_media_group_media_parameter_value_spec.rb +32 -0
- data/spec/models/send_message200_response_spec.rb +42 -0
- data/spec/models/send_message_chat_id_parameter_value_spec.rb +32 -0
- data/spec/models/send_message_reply_markup_parameter_value_spec.rb +32 -0
- data/spec/models/send_photo_photo_parameter_value_spec.rb +32 -0
- data/spec/models/sent_web_app_message_spec.rb +36 -0
- data/spec/models/set_webhook200_response_spec.rb +42 -0
- data/spec/models/shared_user_spec.rb +60 -0
- data/spec/models/shipping_address_spec.rb +66 -0
- data/spec/models/shipping_option_spec.rb +48 -0
- data/spec/models/shipping_query_spec.rb +54 -0
- data/spec/models/sticker_set_spec.rb +60 -0
- data/spec/models/sticker_spec.rb +120 -0
- data/spec/models/stop_poll200_response_spec.rb +42 -0
- data/spec/models/story_spec.rb +42 -0
- data/spec/models/successful_payment_spec.rb +72 -0
- data/spec/models/switch_inline_query_chosen_chat_spec.rb +60 -0
- data/spec/models/text_quote_spec.rb +54 -0
- data/spec/models/update_spec.rb +168 -0
- data/spec/models/user_chat_boosts_spec.rb +36 -0
- data/spec/models/user_profile_photos_spec.rb +42 -0
- data/spec/models/user_spec.rb +102 -0
- data/spec/models/users_shared_spec.rb +42 -0
- data/spec/models/venue_spec.rb +72 -0
- data/spec/models/video_chat_ended_spec.rb +36 -0
- data/spec/models/video_chat_participants_invited_spec.rb +36 -0
- data/spec/models/video_chat_scheduled_spec.rb +36 -0
- data/spec/models/video_note_spec.rb +66 -0
- data/spec/models/video_spec.rb +84 -0
- data/spec/models/voice_spec.rb +60 -0
- data/spec/models/web_app_data_spec.rb +42 -0
- data/spec/models/web_app_info_spec.rb +36 -0
- data/spec/models/webhook_info_spec.rb +84 -0
- data/spec/models/write_access_allowed_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- data/telegram-bot-7.2.0.gem +0 -0
- data/telegram-bot-openapi-7.2.0.gem +0 -0
- data/telegram-bot.gemspec +40 -0
- metadata +934 -0
@@ -0,0 +1,326 @@
|
|
1
|
+
=begin
|
2
|
+
#telegram-bot-api
|
3
|
+
|
4
|
+
#Unofficial telegram-bot-api OpenAPI spec. Generated from the Bot API docs at https://core.telegram.org/bots/api
|
5
|
+
|
6
|
+
The version of the OpenAPI document: Bot API 7.2
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.7.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module TelegramBot
|
17
|
+
# Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message.
|
18
|
+
class InlineQueryResultCachedVoice
|
19
|
+
# Type of the result, must be voice
|
20
|
+
attr_accessor :type
|
21
|
+
|
22
|
+
# Unique identifier for this result, 1-64 bytes
|
23
|
+
attr_accessor :id
|
24
|
+
|
25
|
+
# A valid file identifier for the voice message
|
26
|
+
attr_accessor :voice_file_id
|
27
|
+
|
28
|
+
# Voice message title
|
29
|
+
attr_accessor :title
|
30
|
+
|
31
|
+
# Optional. Caption, 0-1024 characters after entities parsing
|
32
|
+
attr_accessor :caption
|
33
|
+
|
34
|
+
# Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
|
35
|
+
attr_accessor :parse_mode
|
36
|
+
|
37
|
+
# Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
|
38
|
+
attr_accessor :caption_entities
|
39
|
+
|
40
|
+
# Optional. Inline keyboard attached to the message
|
41
|
+
attr_accessor :reply_markup
|
42
|
+
|
43
|
+
# Optional. Content of the message to be sent instead of the voice message
|
44
|
+
attr_accessor :input_message_content
|
45
|
+
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'type' => :'type',
|
50
|
+
:'id' => :'id',
|
51
|
+
:'voice_file_id' => :'voice_file_id',
|
52
|
+
:'title' => :'title',
|
53
|
+
:'caption' => :'caption',
|
54
|
+
:'parse_mode' => :'parse_mode',
|
55
|
+
:'caption_entities' => :'caption_entities',
|
56
|
+
:'reply_markup' => :'reply_markup',
|
57
|
+
:'input_message_content' => :'input_message_content'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Returns all the JSON keys this model knows about
|
62
|
+
def self.acceptable_attributes
|
63
|
+
attribute_map.values
|
64
|
+
end
|
65
|
+
|
66
|
+
# Attribute type mapping.
|
67
|
+
def self.openapi_types
|
68
|
+
{
|
69
|
+
:'type' => :'String',
|
70
|
+
:'id' => :'String',
|
71
|
+
:'voice_file_id' => :'String',
|
72
|
+
:'title' => :'String',
|
73
|
+
:'caption' => :'String',
|
74
|
+
:'parse_mode' => :'String',
|
75
|
+
:'caption_entities' => :'Array<MessageEntity>',
|
76
|
+
:'reply_markup' => :'InlineKeyboardMarkup',
|
77
|
+
:'input_message_content' => :'Object'
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
81
|
+
# List of attributes with nullable: true
|
82
|
+
def self.openapi_nullable
|
83
|
+
Set.new([
|
84
|
+
])
|
85
|
+
end
|
86
|
+
|
87
|
+
# Initializes the object
|
88
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
89
|
+
def initialize(attributes = {})
|
90
|
+
if (!attributes.is_a?(Hash))
|
91
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TelegramBot::InlineQueryResultCachedVoice` initialize method"
|
92
|
+
end
|
93
|
+
|
94
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
95
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
96
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
97
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TelegramBot::InlineQueryResultCachedVoice`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
98
|
+
end
|
99
|
+
h[k.to_sym] = v
|
100
|
+
}
|
101
|
+
|
102
|
+
if attributes.key?(:'type')
|
103
|
+
self.type = attributes[:'type']
|
104
|
+
else
|
105
|
+
self.type = nil
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.key?(:'id')
|
109
|
+
self.id = attributes[:'id']
|
110
|
+
else
|
111
|
+
self.id = nil
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'voice_file_id')
|
115
|
+
self.voice_file_id = attributes[:'voice_file_id']
|
116
|
+
else
|
117
|
+
self.voice_file_id = nil
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'title')
|
121
|
+
self.title = attributes[:'title']
|
122
|
+
else
|
123
|
+
self.title = nil
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.key?(:'caption')
|
127
|
+
self.caption = attributes[:'caption']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.key?(:'parse_mode')
|
131
|
+
self.parse_mode = attributes[:'parse_mode']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.key?(:'caption_entities')
|
135
|
+
if (value = attributes[:'caption_entities']).is_a?(Array)
|
136
|
+
self.caption_entities = value
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'reply_markup')
|
141
|
+
self.reply_markup = attributes[:'reply_markup']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'input_message_content')
|
145
|
+
self.input_message_content = attributes[:'input_message_content']
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
150
|
+
# @return Array for valid properties with the reasons
|
151
|
+
def list_invalid_properties
|
152
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
153
|
+
invalid_properties = Array.new
|
154
|
+
if @type.nil?
|
155
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
156
|
+
end
|
157
|
+
|
158
|
+
if @id.nil?
|
159
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
160
|
+
end
|
161
|
+
|
162
|
+
if @voice_file_id.nil?
|
163
|
+
invalid_properties.push('invalid value for "voice_file_id", voice_file_id cannot be nil.')
|
164
|
+
end
|
165
|
+
|
166
|
+
if @title.nil?
|
167
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
168
|
+
end
|
169
|
+
|
170
|
+
invalid_properties
|
171
|
+
end
|
172
|
+
|
173
|
+
# Check to see if the all the properties in the model are valid
|
174
|
+
# @return true if the model is valid
|
175
|
+
def valid?
|
176
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
177
|
+
return false if @type.nil?
|
178
|
+
return false if @id.nil?
|
179
|
+
return false if @voice_file_id.nil?
|
180
|
+
return false if @title.nil?
|
181
|
+
true
|
182
|
+
end
|
183
|
+
|
184
|
+
# Checks equality by comparing each attribute.
|
185
|
+
# @param [Object] Object to be compared
|
186
|
+
def ==(o)
|
187
|
+
return true if self.equal?(o)
|
188
|
+
self.class == o.class &&
|
189
|
+
type == o.type &&
|
190
|
+
id == o.id &&
|
191
|
+
voice_file_id == o.voice_file_id &&
|
192
|
+
title == o.title &&
|
193
|
+
caption == o.caption &&
|
194
|
+
parse_mode == o.parse_mode &&
|
195
|
+
caption_entities == o.caption_entities &&
|
196
|
+
reply_markup == o.reply_markup &&
|
197
|
+
input_message_content == o.input_message_content
|
198
|
+
end
|
199
|
+
|
200
|
+
# @see the `==` method
|
201
|
+
# @param [Object] Object to be compared
|
202
|
+
def eql?(o)
|
203
|
+
self == o
|
204
|
+
end
|
205
|
+
|
206
|
+
# Calculates hash code according to all attributes.
|
207
|
+
# @return [Integer] Hash code
|
208
|
+
def hash
|
209
|
+
[type, id, voice_file_id, title, caption, parse_mode, caption_entities, reply_markup, input_message_content].hash
|
210
|
+
end
|
211
|
+
|
212
|
+
# Builds the object from hash
|
213
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
214
|
+
# @return [Object] Returns the model itself
|
215
|
+
def self.build_from_hash(attributes)
|
216
|
+
return nil unless attributes.is_a?(Hash)
|
217
|
+
attributes = attributes.transform_keys(&:to_sym)
|
218
|
+
transformed_hash = {}
|
219
|
+
openapi_types.each_pair do |key, type|
|
220
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
221
|
+
transformed_hash["#{key}"] = nil
|
222
|
+
elsif type =~ /\AArray<(.*)>/i
|
223
|
+
# check to ensure the input is an array given that the attribute
|
224
|
+
# is documented as an array but the input is not
|
225
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
226
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
227
|
+
end
|
228
|
+
elsif !attributes[attribute_map[key]].nil?
|
229
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
230
|
+
end
|
231
|
+
end
|
232
|
+
new(transformed_hash)
|
233
|
+
end
|
234
|
+
|
235
|
+
# Deserializes the data based on type
|
236
|
+
# @param string type Data type
|
237
|
+
# @param string value Value to be deserialized
|
238
|
+
# @return [Object] Deserialized data
|
239
|
+
def self._deserialize(type, value)
|
240
|
+
case type.to_sym
|
241
|
+
when :Time
|
242
|
+
Time.parse(value)
|
243
|
+
when :Date
|
244
|
+
Date.parse(value)
|
245
|
+
when :String
|
246
|
+
value.to_s
|
247
|
+
when :Integer
|
248
|
+
value.to_i
|
249
|
+
when :Float
|
250
|
+
value.to_f
|
251
|
+
when :Boolean
|
252
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
253
|
+
true
|
254
|
+
else
|
255
|
+
false
|
256
|
+
end
|
257
|
+
when :Object
|
258
|
+
# generic object (usually a Hash), return directly
|
259
|
+
value
|
260
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
261
|
+
inner_type = Regexp.last_match[:inner_type]
|
262
|
+
value.map { |v| _deserialize(inner_type, v) }
|
263
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
264
|
+
k_type = Regexp.last_match[:k_type]
|
265
|
+
v_type = Regexp.last_match[:v_type]
|
266
|
+
{}.tap do |hash|
|
267
|
+
value.each do |k, v|
|
268
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
269
|
+
end
|
270
|
+
end
|
271
|
+
else # model
|
272
|
+
# models (e.g. Pet) or oneOf
|
273
|
+
klass = TelegramBot.const_get(type)
|
274
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
# Returns the string representation of the object
|
279
|
+
# @return [String] String presentation of the object
|
280
|
+
def to_s
|
281
|
+
to_hash.to_s
|
282
|
+
end
|
283
|
+
|
284
|
+
# to_body is an alias to to_hash (backward compatibility)
|
285
|
+
# @return [Hash] Returns the object in the form of hash
|
286
|
+
def to_body
|
287
|
+
to_hash
|
288
|
+
end
|
289
|
+
|
290
|
+
# Returns the object in the form of hash
|
291
|
+
# @return [Hash] Returns the object in the form of hash
|
292
|
+
def to_hash
|
293
|
+
hash = {}
|
294
|
+
self.class.attribute_map.each_pair do |attr, param|
|
295
|
+
value = self.send(attr)
|
296
|
+
if value.nil?
|
297
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
298
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
299
|
+
end
|
300
|
+
|
301
|
+
hash[param] = _to_hash(value)
|
302
|
+
end
|
303
|
+
hash
|
304
|
+
end
|
305
|
+
|
306
|
+
# Outputs non-array value in the form of hash
|
307
|
+
# For object, use to_hash. Otherwise, just return the value
|
308
|
+
# @param [Object] value Any valid value
|
309
|
+
# @return [Hash] Returns the value in the form of hash
|
310
|
+
def _to_hash(value)
|
311
|
+
if value.is_a?(Array)
|
312
|
+
value.compact.map { |v| _to_hash(v) }
|
313
|
+
elsif value.is_a?(Hash)
|
314
|
+
{}.tap do |hash|
|
315
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
316
|
+
end
|
317
|
+
elsif value.respond_to? :to_hash
|
318
|
+
value.to_hash
|
319
|
+
else
|
320
|
+
value
|
321
|
+
end
|
322
|
+
end
|
323
|
+
|
324
|
+
end
|
325
|
+
|
326
|
+
end
|
@@ -0,0 +1,344 @@
|
|
1
|
+
=begin
|
2
|
+
#telegram-bot-api
|
3
|
+
|
4
|
+
#Unofficial telegram-bot-api OpenAPI spec. Generated from the Bot API docs at https://core.telegram.org/bots/api
|
5
|
+
|
6
|
+
The version of the OpenAPI document: Bot API 7.2
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.7.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module TelegramBot
|
17
|
+
# Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.
|
18
|
+
class InlineQueryResultContact
|
19
|
+
# Type of the result, must be contact
|
20
|
+
attr_accessor :type
|
21
|
+
|
22
|
+
# Unique identifier for this result, 1-64 Bytes
|
23
|
+
attr_accessor :id
|
24
|
+
|
25
|
+
# Contact's phone number
|
26
|
+
attr_accessor :phone_number
|
27
|
+
|
28
|
+
# Contact's first name
|
29
|
+
attr_accessor :first_name
|
30
|
+
|
31
|
+
# Optional. Contact's last name
|
32
|
+
attr_accessor :last_name
|
33
|
+
|
34
|
+
# Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
|
35
|
+
attr_accessor :vcard
|
36
|
+
|
37
|
+
# Optional. Inline keyboard attached to the message
|
38
|
+
attr_accessor :reply_markup
|
39
|
+
|
40
|
+
# Optional. Content of the message to be sent instead of the contact
|
41
|
+
attr_accessor :input_message_content
|
42
|
+
|
43
|
+
# Optional. Url of the thumbnail for the result
|
44
|
+
attr_accessor :thumbnail_url
|
45
|
+
|
46
|
+
# Optional. Thumbnail width
|
47
|
+
attr_accessor :thumbnail_width
|
48
|
+
|
49
|
+
# Optional. Thumbnail height
|
50
|
+
attr_accessor :thumbnail_height
|
51
|
+
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
53
|
+
def self.attribute_map
|
54
|
+
{
|
55
|
+
:'type' => :'type',
|
56
|
+
:'id' => :'id',
|
57
|
+
:'phone_number' => :'phone_number',
|
58
|
+
:'first_name' => :'first_name',
|
59
|
+
:'last_name' => :'last_name',
|
60
|
+
:'vcard' => :'vcard',
|
61
|
+
:'reply_markup' => :'reply_markup',
|
62
|
+
:'input_message_content' => :'input_message_content',
|
63
|
+
:'thumbnail_url' => :'thumbnail_url',
|
64
|
+
:'thumbnail_width' => :'thumbnail_width',
|
65
|
+
:'thumbnail_height' => :'thumbnail_height'
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# Returns all the JSON keys this model knows about
|
70
|
+
def self.acceptable_attributes
|
71
|
+
attribute_map.values
|
72
|
+
end
|
73
|
+
|
74
|
+
# Attribute type mapping.
|
75
|
+
def self.openapi_types
|
76
|
+
{
|
77
|
+
:'type' => :'String',
|
78
|
+
:'id' => :'String',
|
79
|
+
:'phone_number' => :'String',
|
80
|
+
:'first_name' => :'String',
|
81
|
+
:'last_name' => :'String',
|
82
|
+
:'vcard' => :'String',
|
83
|
+
:'reply_markup' => :'InlineKeyboardMarkup',
|
84
|
+
:'input_message_content' => :'Object',
|
85
|
+
:'thumbnail_url' => :'String',
|
86
|
+
:'thumbnail_width' => :'Integer',
|
87
|
+
:'thumbnail_height' => :'Integer'
|
88
|
+
}
|
89
|
+
end
|
90
|
+
|
91
|
+
# List of attributes with nullable: true
|
92
|
+
def self.openapi_nullable
|
93
|
+
Set.new([
|
94
|
+
])
|
95
|
+
end
|
96
|
+
|
97
|
+
# Initializes the object
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
def initialize(attributes = {})
|
100
|
+
if (!attributes.is_a?(Hash))
|
101
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TelegramBot::InlineQueryResultContact` initialize method"
|
102
|
+
end
|
103
|
+
|
104
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
105
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
106
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
107
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TelegramBot::InlineQueryResultContact`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
108
|
+
end
|
109
|
+
h[k.to_sym] = v
|
110
|
+
}
|
111
|
+
|
112
|
+
if attributes.key?(:'type')
|
113
|
+
self.type = attributes[:'type']
|
114
|
+
else
|
115
|
+
self.type = nil
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'id')
|
119
|
+
self.id = attributes[:'id']
|
120
|
+
else
|
121
|
+
self.id = nil
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'phone_number')
|
125
|
+
self.phone_number = attributes[:'phone_number']
|
126
|
+
else
|
127
|
+
self.phone_number = nil
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.key?(:'first_name')
|
131
|
+
self.first_name = attributes[:'first_name']
|
132
|
+
else
|
133
|
+
self.first_name = nil
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'last_name')
|
137
|
+
self.last_name = attributes[:'last_name']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'vcard')
|
141
|
+
self.vcard = attributes[:'vcard']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'reply_markup')
|
145
|
+
self.reply_markup = attributes[:'reply_markup']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'input_message_content')
|
149
|
+
self.input_message_content = attributes[:'input_message_content']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.key?(:'thumbnail_url')
|
153
|
+
self.thumbnail_url = attributes[:'thumbnail_url']
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.key?(:'thumbnail_width')
|
157
|
+
self.thumbnail_width = attributes[:'thumbnail_width']
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.key?(:'thumbnail_height')
|
161
|
+
self.thumbnail_height = attributes[:'thumbnail_height']
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
166
|
+
# @return Array for valid properties with the reasons
|
167
|
+
def list_invalid_properties
|
168
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
169
|
+
invalid_properties = Array.new
|
170
|
+
if @type.nil?
|
171
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
172
|
+
end
|
173
|
+
|
174
|
+
if @id.nil?
|
175
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
176
|
+
end
|
177
|
+
|
178
|
+
if @phone_number.nil?
|
179
|
+
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
180
|
+
end
|
181
|
+
|
182
|
+
if @first_name.nil?
|
183
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
184
|
+
end
|
185
|
+
|
186
|
+
invalid_properties
|
187
|
+
end
|
188
|
+
|
189
|
+
# Check to see if the all the properties in the model are valid
|
190
|
+
# @return true if the model is valid
|
191
|
+
def valid?
|
192
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
193
|
+
return false if @type.nil?
|
194
|
+
return false if @id.nil?
|
195
|
+
return false if @phone_number.nil?
|
196
|
+
return false if @first_name.nil?
|
197
|
+
true
|
198
|
+
end
|
199
|
+
|
200
|
+
# Checks equality by comparing each attribute.
|
201
|
+
# @param [Object] Object to be compared
|
202
|
+
def ==(o)
|
203
|
+
return true if self.equal?(o)
|
204
|
+
self.class == o.class &&
|
205
|
+
type == o.type &&
|
206
|
+
id == o.id &&
|
207
|
+
phone_number == o.phone_number &&
|
208
|
+
first_name == o.first_name &&
|
209
|
+
last_name == o.last_name &&
|
210
|
+
vcard == o.vcard &&
|
211
|
+
reply_markup == o.reply_markup &&
|
212
|
+
input_message_content == o.input_message_content &&
|
213
|
+
thumbnail_url == o.thumbnail_url &&
|
214
|
+
thumbnail_width == o.thumbnail_width &&
|
215
|
+
thumbnail_height == o.thumbnail_height
|
216
|
+
end
|
217
|
+
|
218
|
+
# @see the `==` method
|
219
|
+
# @param [Object] Object to be compared
|
220
|
+
def eql?(o)
|
221
|
+
self == o
|
222
|
+
end
|
223
|
+
|
224
|
+
# Calculates hash code according to all attributes.
|
225
|
+
# @return [Integer] Hash code
|
226
|
+
def hash
|
227
|
+
[type, id, phone_number, first_name, last_name, vcard, reply_markup, input_message_content, thumbnail_url, thumbnail_width, thumbnail_height].hash
|
228
|
+
end
|
229
|
+
|
230
|
+
# Builds the object from hash
|
231
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
232
|
+
# @return [Object] Returns the model itself
|
233
|
+
def self.build_from_hash(attributes)
|
234
|
+
return nil unless attributes.is_a?(Hash)
|
235
|
+
attributes = attributes.transform_keys(&:to_sym)
|
236
|
+
transformed_hash = {}
|
237
|
+
openapi_types.each_pair do |key, type|
|
238
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
239
|
+
transformed_hash["#{key}"] = nil
|
240
|
+
elsif type =~ /\AArray<(.*)>/i
|
241
|
+
# check to ensure the input is an array given that the attribute
|
242
|
+
# is documented as an array but the input is not
|
243
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
244
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
245
|
+
end
|
246
|
+
elsif !attributes[attribute_map[key]].nil?
|
247
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
248
|
+
end
|
249
|
+
end
|
250
|
+
new(transformed_hash)
|
251
|
+
end
|
252
|
+
|
253
|
+
# Deserializes the data based on type
|
254
|
+
# @param string type Data type
|
255
|
+
# @param string value Value to be deserialized
|
256
|
+
# @return [Object] Deserialized data
|
257
|
+
def self._deserialize(type, value)
|
258
|
+
case type.to_sym
|
259
|
+
when :Time
|
260
|
+
Time.parse(value)
|
261
|
+
when :Date
|
262
|
+
Date.parse(value)
|
263
|
+
when :String
|
264
|
+
value.to_s
|
265
|
+
when :Integer
|
266
|
+
value.to_i
|
267
|
+
when :Float
|
268
|
+
value.to_f
|
269
|
+
when :Boolean
|
270
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
271
|
+
true
|
272
|
+
else
|
273
|
+
false
|
274
|
+
end
|
275
|
+
when :Object
|
276
|
+
# generic object (usually a Hash), return directly
|
277
|
+
value
|
278
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
279
|
+
inner_type = Regexp.last_match[:inner_type]
|
280
|
+
value.map { |v| _deserialize(inner_type, v) }
|
281
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
282
|
+
k_type = Regexp.last_match[:k_type]
|
283
|
+
v_type = Regexp.last_match[:v_type]
|
284
|
+
{}.tap do |hash|
|
285
|
+
value.each do |k, v|
|
286
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
287
|
+
end
|
288
|
+
end
|
289
|
+
else # model
|
290
|
+
# models (e.g. Pet) or oneOf
|
291
|
+
klass = TelegramBot.const_get(type)
|
292
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
# Returns the string representation of the object
|
297
|
+
# @return [String] String presentation of the object
|
298
|
+
def to_s
|
299
|
+
to_hash.to_s
|
300
|
+
end
|
301
|
+
|
302
|
+
# to_body is an alias to to_hash (backward compatibility)
|
303
|
+
# @return [Hash] Returns the object in the form of hash
|
304
|
+
def to_body
|
305
|
+
to_hash
|
306
|
+
end
|
307
|
+
|
308
|
+
# Returns the object in the form of hash
|
309
|
+
# @return [Hash] Returns the object in the form of hash
|
310
|
+
def to_hash
|
311
|
+
hash = {}
|
312
|
+
self.class.attribute_map.each_pair do |attr, param|
|
313
|
+
value = self.send(attr)
|
314
|
+
if value.nil?
|
315
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
316
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
317
|
+
end
|
318
|
+
|
319
|
+
hash[param] = _to_hash(value)
|
320
|
+
end
|
321
|
+
hash
|
322
|
+
end
|
323
|
+
|
324
|
+
# Outputs non-array value in the form of hash
|
325
|
+
# For object, use to_hash. Otherwise, just return the value
|
326
|
+
# @param [Object] value Any valid value
|
327
|
+
# @return [Hash] Returns the value in the form of hash
|
328
|
+
def _to_hash(value)
|
329
|
+
if value.is_a?(Array)
|
330
|
+
value.compact.map { |v| _to_hash(v) }
|
331
|
+
elsif value.is_a?(Hash)
|
332
|
+
{}.tap do |hash|
|
333
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
334
|
+
end
|
335
|
+
elsif value.respond_to? :to_hash
|
336
|
+
value.to_hash
|
337
|
+
else
|
338
|
+
value
|
339
|
+
end
|
340
|
+
end
|
341
|
+
|
342
|
+
end
|
343
|
+
|
344
|
+
end
|