diff --git a/src/TgBotLib/Objects/ResponseParameters.php b/src/TgBotLib/Objects/ResponseParameters.php new file mode 100644 index 0000000..5193b35 --- /dev/null +++ b/src/TgBotLib/Objects/ResponseParameters.php @@ -0,0 +1,73 @@ +migrate_to_chat_id; + } + + /** + * Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be + * repeated + * + * @return int|null + */ + public function getRetryAfter(): ?int + { + return $this->retry_after; + } + + /** + * Returns an array representation of the object + * + * @return array + */ + public function toArray(): array + { + return [ + 'migrate_to_chat_id' => $this->migrate_to_chat_id, + 'retry_after' => $this->retry_after + ]; + } + + /** + * Constructs object from an array representation + * + * @param array $data + * @return ObjectTypeInterface + */ + public static function fromArray(array $data): ObjectTypeInterface + { + $object = new self(); + + $object->migrate_to_chat_id = $data['migrate_to_chat_id'] ?? null; + $object->retry_after = $data['retry_after'] ?? null; + + return $object; + } + } \ No newline at end of file