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,331 @@
|
|
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 an invite link for a chat.
|
18
|
+
class ChatInviteLink
|
19
|
+
# The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with \"...\".
|
20
|
+
attr_accessor :invite_link
|
21
|
+
|
22
|
+
# Creator of the link
|
23
|
+
attr_accessor :creator
|
24
|
+
|
25
|
+
# True, if users joining the chat via the link need to be approved by chat administrators
|
26
|
+
attr_accessor :creates_join_request
|
27
|
+
|
28
|
+
# True, if the link is primary
|
29
|
+
attr_accessor :is_primary
|
30
|
+
|
31
|
+
# True, if the link is revoked
|
32
|
+
attr_accessor :is_revoked
|
33
|
+
|
34
|
+
# Optional. Invite link name
|
35
|
+
attr_accessor :name
|
36
|
+
|
37
|
+
# Optional. Point in time (Unix timestamp) when the link will expire or has been expired
|
38
|
+
attr_accessor :expire_date
|
39
|
+
|
40
|
+
# Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
|
41
|
+
attr_accessor :member_limit
|
42
|
+
|
43
|
+
# Optional. Number of pending join requests created using this link
|
44
|
+
attr_accessor :pending_join_request_count
|
45
|
+
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'invite_link' => :'invite_link',
|
50
|
+
:'creator' => :'creator',
|
51
|
+
:'creates_join_request' => :'creates_join_request',
|
52
|
+
:'is_primary' => :'is_primary',
|
53
|
+
:'is_revoked' => :'is_revoked',
|
54
|
+
:'name' => :'name',
|
55
|
+
:'expire_date' => :'expire_date',
|
56
|
+
:'member_limit' => :'member_limit',
|
57
|
+
:'pending_join_request_count' => :'pending_join_request_count'
|
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
|
+
:'invite_link' => :'String',
|
70
|
+
:'creator' => :'User',
|
71
|
+
:'creates_join_request' => :'Boolean',
|
72
|
+
:'is_primary' => :'Boolean',
|
73
|
+
:'is_revoked' => :'Boolean',
|
74
|
+
:'name' => :'String',
|
75
|
+
:'expire_date' => :'Integer',
|
76
|
+
:'member_limit' => :'Integer',
|
77
|
+
:'pending_join_request_count' => :'Integer'
|
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::ChatInviteLink` 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::ChatInviteLink`. 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?(:'invite_link')
|
103
|
+
self.invite_link = attributes[:'invite_link']
|
104
|
+
else
|
105
|
+
self.invite_link = nil
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.key?(:'creator')
|
109
|
+
self.creator = attributes[:'creator']
|
110
|
+
else
|
111
|
+
self.creator = nil
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'creates_join_request')
|
115
|
+
self.creates_join_request = attributes[:'creates_join_request']
|
116
|
+
else
|
117
|
+
self.creates_join_request = nil
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'is_primary')
|
121
|
+
self.is_primary = attributes[:'is_primary']
|
122
|
+
else
|
123
|
+
self.is_primary = nil
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.key?(:'is_revoked')
|
127
|
+
self.is_revoked = attributes[:'is_revoked']
|
128
|
+
else
|
129
|
+
self.is_revoked = nil
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'name')
|
133
|
+
self.name = attributes[:'name']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'expire_date')
|
137
|
+
self.expire_date = attributes[:'expire_date']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'member_limit')
|
141
|
+
self.member_limit = attributes[:'member_limit']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'pending_join_request_count')
|
145
|
+
self.pending_join_request_count = attributes[:'pending_join_request_count']
|
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 @invite_link.nil?
|
155
|
+
invalid_properties.push('invalid value for "invite_link", invite_link cannot be nil.')
|
156
|
+
end
|
157
|
+
|
158
|
+
if @creator.nil?
|
159
|
+
invalid_properties.push('invalid value for "creator", creator cannot be nil.')
|
160
|
+
end
|
161
|
+
|
162
|
+
if @creates_join_request.nil?
|
163
|
+
invalid_properties.push('invalid value for "creates_join_request", creates_join_request cannot be nil.')
|
164
|
+
end
|
165
|
+
|
166
|
+
if @is_primary.nil?
|
167
|
+
invalid_properties.push('invalid value for "is_primary", is_primary cannot be nil.')
|
168
|
+
end
|
169
|
+
|
170
|
+
if @is_revoked.nil?
|
171
|
+
invalid_properties.push('invalid value for "is_revoked", is_revoked cannot be nil.')
|
172
|
+
end
|
173
|
+
|
174
|
+
invalid_properties
|
175
|
+
end
|
176
|
+
|
177
|
+
# Check to see if the all the properties in the model are valid
|
178
|
+
# @return true if the model is valid
|
179
|
+
def valid?
|
180
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
181
|
+
return false if @invite_link.nil?
|
182
|
+
return false if @creator.nil?
|
183
|
+
return false if @creates_join_request.nil?
|
184
|
+
return false if @is_primary.nil?
|
185
|
+
return false if @is_revoked.nil?
|
186
|
+
true
|
187
|
+
end
|
188
|
+
|
189
|
+
# Checks equality by comparing each attribute.
|
190
|
+
# @param [Object] Object to be compared
|
191
|
+
def ==(o)
|
192
|
+
return true if self.equal?(o)
|
193
|
+
self.class == o.class &&
|
194
|
+
invite_link == o.invite_link &&
|
195
|
+
creator == o.creator &&
|
196
|
+
creates_join_request == o.creates_join_request &&
|
197
|
+
is_primary == o.is_primary &&
|
198
|
+
is_revoked == o.is_revoked &&
|
199
|
+
name == o.name &&
|
200
|
+
expire_date == o.expire_date &&
|
201
|
+
member_limit == o.member_limit &&
|
202
|
+
pending_join_request_count == o.pending_join_request_count
|
203
|
+
end
|
204
|
+
|
205
|
+
# @see the `==` method
|
206
|
+
# @param [Object] Object to be compared
|
207
|
+
def eql?(o)
|
208
|
+
self == o
|
209
|
+
end
|
210
|
+
|
211
|
+
# Calculates hash code according to all attributes.
|
212
|
+
# @return [Integer] Hash code
|
213
|
+
def hash
|
214
|
+
[invite_link, creator, creates_join_request, is_primary, is_revoked, name, expire_date, member_limit, pending_join_request_count].hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Builds the object from hash
|
218
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
219
|
+
# @return [Object] Returns the model itself
|
220
|
+
def self.build_from_hash(attributes)
|
221
|
+
return nil unless attributes.is_a?(Hash)
|
222
|
+
attributes = attributes.transform_keys(&:to_sym)
|
223
|
+
transformed_hash = {}
|
224
|
+
openapi_types.each_pair do |key, type|
|
225
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
226
|
+
transformed_hash["#{key}"] = nil
|
227
|
+
elsif type =~ /\AArray<(.*)>/i
|
228
|
+
# check to ensure the input is an array given that the attribute
|
229
|
+
# is documented as an array but the input is not
|
230
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
231
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
232
|
+
end
|
233
|
+
elsif !attributes[attribute_map[key]].nil?
|
234
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
235
|
+
end
|
236
|
+
end
|
237
|
+
new(transformed_hash)
|
238
|
+
end
|
239
|
+
|
240
|
+
# Deserializes the data based on type
|
241
|
+
# @param string type Data type
|
242
|
+
# @param string value Value to be deserialized
|
243
|
+
# @return [Object] Deserialized data
|
244
|
+
def self._deserialize(type, value)
|
245
|
+
case type.to_sym
|
246
|
+
when :Time
|
247
|
+
Time.parse(value)
|
248
|
+
when :Date
|
249
|
+
Date.parse(value)
|
250
|
+
when :String
|
251
|
+
value.to_s
|
252
|
+
when :Integer
|
253
|
+
value.to_i
|
254
|
+
when :Float
|
255
|
+
value.to_f
|
256
|
+
when :Boolean
|
257
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
258
|
+
true
|
259
|
+
else
|
260
|
+
false
|
261
|
+
end
|
262
|
+
when :Object
|
263
|
+
# generic object (usually a Hash), return directly
|
264
|
+
value
|
265
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
266
|
+
inner_type = Regexp.last_match[:inner_type]
|
267
|
+
value.map { |v| _deserialize(inner_type, v) }
|
268
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
269
|
+
k_type = Regexp.last_match[:k_type]
|
270
|
+
v_type = Regexp.last_match[:v_type]
|
271
|
+
{}.tap do |hash|
|
272
|
+
value.each do |k, v|
|
273
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
274
|
+
end
|
275
|
+
end
|
276
|
+
else # model
|
277
|
+
# models (e.g. Pet) or oneOf
|
278
|
+
klass = TelegramBot.const_get(type)
|
279
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
# Returns the string representation of the object
|
284
|
+
# @return [String] String presentation of the object
|
285
|
+
def to_s
|
286
|
+
to_hash.to_s
|
287
|
+
end
|
288
|
+
|
289
|
+
# to_body is an alias to to_hash (backward compatibility)
|
290
|
+
# @return [Hash] Returns the object in the form of hash
|
291
|
+
def to_body
|
292
|
+
to_hash
|
293
|
+
end
|
294
|
+
|
295
|
+
# Returns the object in the form of hash
|
296
|
+
# @return [Hash] Returns the object in the form of hash
|
297
|
+
def to_hash
|
298
|
+
hash = {}
|
299
|
+
self.class.attribute_map.each_pair do |attr, param|
|
300
|
+
value = self.send(attr)
|
301
|
+
if value.nil?
|
302
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
303
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
304
|
+
end
|
305
|
+
|
306
|
+
hash[param] = _to_hash(value)
|
307
|
+
end
|
308
|
+
hash
|
309
|
+
end
|
310
|
+
|
311
|
+
# Outputs non-array value in the form of hash
|
312
|
+
# For object, use to_hash. Otherwise, just return the value
|
313
|
+
# @param [Object] value Any valid value
|
314
|
+
# @return [Hash] Returns the value in the form of hash
|
315
|
+
def _to_hash(value)
|
316
|
+
if value.is_a?(Array)
|
317
|
+
value.compact.map { |v| _to_hash(v) }
|
318
|
+
elsif value.is_a?(Hash)
|
319
|
+
{}.tap do |hash|
|
320
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
321
|
+
end
|
322
|
+
elsif value.respond_to? :to_hash
|
323
|
+
value.to_hash
|
324
|
+
else
|
325
|
+
value
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
end
|
330
|
+
|
331
|
+
end
|
@@ -0,0 +1,294 @@
|
|
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 join request sent to a chat.
|
18
|
+
class ChatJoinRequest
|
19
|
+
# Chat to which the request was sent
|
20
|
+
attr_accessor :chat
|
21
|
+
|
22
|
+
# User that sent the join request
|
23
|
+
attr_accessor :from
|
24
|
+
|
25
|
+
# Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user.
|
26
|
+
attr_accessor :user_chat_id
|
27
|
+
|
28
|
+
# Date the request was sent in Unix time
|
29
|
+
attr_accessor :date
|
30
|
+
|
31
|
+
# Optional. Bio of the user.
|
32
|
+
attr_accessor :bio
|
33
|
+
|
34
|
+
# Optional. Chat invite link that was used by the user to send the join request
|
35
|
+
attr_accessor :invite_link
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'chat' => :'chat',
|
41
|
+
:'from' => :'from',
|
42
|
+
:'user_chat_id' => :'user_chat_id',
|
43
|
+
:'date' => :'date',
|
44
|
+
:'bio' => :'bio',
|
45
|
+
:'invite_link' => :'invite_link'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Returns all the JSON keys this model knows about
|
50
|
+
def self.acceptable_attributes
|
51
|
+
attribute_map.values
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.openapi_types
|
56
|
+
{
|
57
|
+
:'chat' => :'Chat',
|
58
|
+
:'from' => :'User',
|
59
|
+
:'user_chat_id' => :'Integer',
|
60
|
+
:'date' => :'Integer',
|
61
|
+
:'bio' => :'String',
|
62
|
+
:'invite_link' => :'ChatInviteLink'
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
# List of attributes with nullable: true
|
67
|
+
def self.openapi_nullable
|
68
|
+
Set.new([
|
69
|
+
])
|
70
|
+
end
|
71
|
+
|
72
|
+
# Initializes the object
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
74
|
+
def initialize(attributes = {})
|
75
|
+
if (!attributes.is_a?(Hash))
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TelegramBot::ChatJoinRequest` initialize method"
|
77
|
+
end
|
78
|
+
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
81
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TelegramBot::ChatJoinRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
83
|
+
end
|
84
|
+
h[k.to_sym] = v
|
85
|
+
}
|
86
|
+
|
87
|
+
if attributes.key?(:'chat')
|
88
|
+
self.chat = attributes[:'chat']
|
89
|
+
else
|
90
|
+
self.chat = nil
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'from')
|
94
|
+
self.from = attributes[:'from']
|
95
|
+
else
|
96
|
+
self.from = nil
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'user_chat_id')
|
100
|
+
self.user_chat_id = attributes[:'user_chat_id']
|
101
|
+
else
|
102
|
+
self.user_chat_id = nil
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'date')
|
106
|
+
self.date = attributes[:'date']
|
107
|
+
else
|
108
|
+
self.date = nil
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.key?(:'bio')
|
112
|
+
self.bio = attributes[:'bio']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes.key?(:'invite_link')
|
116
|
+
self.invite_link = attributes[:'invite_link']
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
121
|
+
# @return Array for valid properties with the reasons
|
122
|
+
def list_invalid_properties
|
123
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
124
|
+
invalid_properties = Array.new
|
125
|
+
if @chat.nil?
|
126
|
+
invalid_properties.push('invalid value for "chat", chat cannot be nil.')
|
127
|
+
end
|
128
|
+
|
129
|
+
if @from.nil?
|
130
|
+
invalid_properties.push('invalid value for "from", from cannot be nil.')
|
131
|
+
end
|
132
|
+
|
133
|
+
if @user_chat_id.nil?
|
134
|
+
invalid_properties.push('invalid value for "user_chat_id", user_chat_id cannot be nil.')
|
135
|
+
end
|
136
|
+
|
137
|
+
if @date.nil?
|
138
|
+
invalid_properties.push('invalid value for "date", date cannot be nil.')
|
139
|
+
end
|
140
|
+
|
141
|
+
invalid_properties
|
142
|
+
end
|
143
|
+
|
144
|
+
# Check to see if the all the properties in the model are valid
|
145
|
+
# @return true if the model is valid
|
146
|
+
def valid?
|
147
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
148
|
+
return false if @chat.nil?
|
149
|
+
return false if @from.nil?
|
150
|
+
return false if @user_chat_id.nil?
|
151
|
+
return false if @date.nil?
|
152
|
+
true
|
153
|
+
end
|
154
|
+
|
155
|
+
# Checks equality by comparing each attribute.
|
156
|
+
# @param [Object] Object to be compared
|
157
|
+
def ==(o)
|
158
|
+
return true if self.equal?(o)
|
159
|
+
self.class == o.class &&
|
160
|
+
chat == o.chat &&
|
161
|
+
from == o.from &&
|
162
|
+
user_chat_id == o.user_chat_id &&
|
163
|
+
date == o.date &&
|
164
|
+
bio == o.bio &&
|
165
|
+
invite_link == o.invite_link
|
166
|
+
end
|
167
|
+
|
168
|
+
# @see the `==` method
|
169
|
+
# @param [Object] Object to be compared
|
170
|
+
def eql?(o)
|
171
|
+
self == o
|
172
|
+
end
|
173
|
+
|
174
|
+
# Calculates hash code according to all attributes.
|
175
|
+
# @return [Integer] Hash code
|
176
|
+
def hash
|
177
|
+
[chat, from, user_chat_id, date, bio, invite_link].hash
|
178
|
+
end
|
179
|
+
|
180
|
+
# Builds the object from hash
|
181
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
182
|
+
# @return [Object] Returns the model itself
|
183
|
+
def self.build_from_hash(attributes)
|
184
|
+
return nil unless attributes.is_a?(Hash)
|
185
|
+
attributes = attributes.transform_keys(&:to_sym)
|
186
|
+
transformed_hash = {}
|
187
|
+
openapi_types.each_pair do |key, type|
|
188
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
189
|
+
transformed_hash["#{key}"] = nil
|
190
|
+
elsif type =~ /\AArray<(.*)>/i
|
191
|
+
# check to ensure the input is an array given that the attribute
|
192
|
+
# is documented as an array but the input is not
|
193
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
194
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
195
|
+
end
|
196
|
+
elsif !attributes[attribute_map[key]].nil?
|
197
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
198
|
+
end
|
199
|
+
end
|
200
|
+
new(transformed_hash)
|
201
|
+
end
|
202
|
+
|
203
|
+
# Deserializes the data based on type
|
204
|
+
# @param string type Data type
|
205
|
+
# @param string value Value to be deserialized
|
206
|
+
# @return [Object] Deserialized data
|
207
|
+
def self._deserialize(type, value)
|
208
|
+
case type.to_sym
|
209
|
+
when :Time
|
210
|
+
Time.parse(value)
|
211
|
+
when :Date
|
212
|
+
Date.parse(value)
|
213
|
+
when :String
|
214
|
+
value.to_s
|
215
|
+
when :Integer
|
216
|
+
value.to_i
|
217
|
+
when :Float
|
218
|
+
value.to_f
|
219
|
+
when :Boolean
|
220
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
221
|
+
true
|
222
|
+
else
|
223
|
+
false
|
224
|
+
end
|
225
|
+
when :Object
|
226
|
+
# generic object (usually a Hash), return directly
|
227
|
+
value
|
228
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
229
|
+
inner_type = Regexp.last_match[:inner_type]
|
230
|
+
value.map { |v| _deserialize(inner_type, v) }
|
231
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
232
|
+
k_type = Regexp.last_match[:k_type]
|
233
|
+
v_type = Regexp.last_match[:v_type]
|
234
|
+
{}.tap do |hash|
|
235
|
+
value.each do |k, v|
|
236
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
237
|
+
end
|
238
|
+
end
|
239
|
+
else # model
|
240
|
+
# models (e.g. Pet) or oneOf
|
241
|
+
klass = TelegramBot.const_get(type)
|
242
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
# Returns the string representation of the object
|
247
|
+
# @return [String] String presentation of the object
|
248
|
+
def to_s
|
249
|
+
to_hash.to_s
|
250
|
+
end
|
251
|
+
|
252
|
+
# to_body is an alias to to_hash (backward compatibility)
|
253
|
+
# @return [Hash] Returns the object in the form of hash
|
254
|
+
def to_body
|
255
|
+
to_hash
|
256
|
+
end
|
257
|
+
|
258
|
+
# Returns the object in the form of hash
|
259
|
+
# @return [Hash] Returns the object in the form of hash
|
260
|
+
def to_hash
|
261
|
+
hash = {}
|
262
|
+
self.class.attribute_map.each_pair do |attr, param|
|
263
|
+
value = self.send(attr)
|
264
|
+
if value.nil?
|
265
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
266
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
267
|
+
end
|
268
|
+
|
269
|
+
hash[param] = _to_hash(value)
|
270
|
+
end
|
271
|
+
hash
|
272
|
+
end
|
273
|
+
|
274
|
+
# Outputs non-array value in the form of hash
|
275
|
+
# For object, use to_hash. Otherwise, just return the value
|
276
|
+
# @param [Object] value Any valid value
|
277
|
+
# @return [Hash] Returns the value in the form of hash
|
278
|
+
def _to_hash(value)
|
279
|
+
if value.is_a?(Array)
|
280
|
+
value.compact.map { |v| _to_hash(v) }
|
281
|
+
elsif value.is_a?(Hash)
|
282
|
+
{}.tap do |hash|
|
283
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
284
|
+
end
|
285
|
+
elsif value.respond_to? :to_hash
|
286
|
+
value.to_hash
|
287
|
+
else
|
288
|
+
value
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
end
|
293
|
+
|
294
|
+
end
|