From af7473aa05f296e3ec7d8fd97c68eb7115e3bb73 Mon Sep 17 00:00:00 2001 From: netkas Date: Thu, 7 Nov 2024 01:02:43 -0500 Subject: [PATCH] Add GetBusinessConnection method --- src/TgBotLib/Enums/Methods.php | 3 ++ .../Methods/GetBusinessConnection.php | 40 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/TgBotLib/Methods/GetBusinessConnection.php diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index 2c75825..0c47aa1 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -29,6 +29,7 @@ use TgBotLib\Methods\ExportChatInviteLink; use TgBotLib\Methods\ForwardMessage; use TgBotLib\Methods\ForwardMessages; + use TgBotLib\Methods\GetBusinessConnection; use TgBotLib\Methods\GetChat; use TgBotLib\Methods\GetChatAdministrators; use TgBotLib\Methods\GetChatMember; @@ -158,6 +159,7 @@ case UNPIN_ALL_GENERAL_FORUM_TOPIC_MESSAGES = 'unpinAllGeneralForumTopicMessages'; case ANSWER_CALLBACK_QUERY = 'answerCallbackQuery'; case GET_USER_CHAT_BOOSTS = 'getUserChatBoosts'; + case GET_BUSINESS_CONNECTION = 'getBusinessConnection'; /** * Executes a command on the provided bot with the given parameters. @@ -246,6 +248,7 @@ self::UNPIN_ALL_GENERAL_FORUM_TOPIC_MESSAGES => UnpinAllGeneralForumTopicMessages::execute($bot, $parameters), self::ANSWER_CALLBACK_QUERY => AnswerCallbackQuery::execute($bot, $parameters), self::GET_USER_CHAT_BOOSTS => GetUserChatBoosts::execute($bot, $parameters), + self::GET_BUSINESS_CONNECTION => GetBusinessConnection::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/GetBusinessConnection.php b/src/TgBotLib/Methods/GetBusinessConnection.php new file mode 100644 index 0000000..75d8a31 --- /dev/null +++ b/src/TgBotLib/Methods/GetBusinessConnection.php @@ -0,0 +1,40 @@ +value, $parameters)) + ); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'business_connection_id' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return null; + } + } \ No newline at end of file