diff --git a/src/TgBotLib/Objects/KeyboardButtonPollType.php b/src/TgBotLib/Objects/KeyboardButtonPollType.php new file mode 100644 index 0000000..da48a54 --- /dev/null +++ b/src/TgBotLib/Objects/KeyboardButtonPollType.php @@ -0,0 +1,50 @@ +type; + } + + /** + * Returns an array representation of the object + * + * @return null[]|string[] + */ + public function toArray(): array + { + return [ + 'type' => $this->type, + ]; + } + + /** + * Constructs the object from an array representation + * + * @param array $data + * @return ObjectTypeInterface + */ + public static function fromArray(array $data): ObjectTypeInterface + { + $object = new self(); + $object->type = @$data['type'] ?? null; + return $object; + } + } \ No newline at end of file