Updated ResponseParameters
This commit is contained in:
parent
d10e2f7dfc
commit
e246741b5a
1 changed files with 10 additions and 18 deletions
|
@ -7,15 +7,8 @@
|
||||||
|
|
||||||
class ResponseParameters implements ObjectTypeInterface
|
class ResponseParameters implements ObjectTypeInterface
|
||||||
{
|
{
|
||||||
/**
|
private ?int $migrate_to_chat_id;
|
||||||
* @var int|null
|
private ?int $retry_after;
|
||||||
*/
|
|
||||||
private $migrate_to_chat_id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var int|null
|
|
||||||
*/
|
|
||||||
private $retry_after;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional. The group has been migrated to a supergroup with the specified identifier. This number may have
|
* Optional. The group has been migrated to a supergroup with the specified identifier. This number may have
|
||||||
|
@ -42,9 +35,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array representation of the object
|
* @inheritDoc
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function toArray(): array
|
public function toArray(): array
|
||||||
{
|
{
|
||||||
|
@ -55,15 +46,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs object from an array representation
|
* @inheritDoc
|
||||||
*
|
|
||||||
* @param array $data
|
|
||||||
* @return ResponseParameters
|
|
||||||
*/
|
*/
|
||||||
public static function fromArray(array $data): self
|
public static function fromArray(?array $data): ?ResponseParameters
|
||||||
{
|
{
|
||||||
$object = new self();
|
if($data === null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$object = new self();
|
||||||
$object->migrate_to_chat_id = $data['migrate_to_chat_id'] ?? null;
|
$object->migrate_to_chat_id = $data['migrate_to_chat_id'] ?? null;
|
||||||
$object->retry_after = $data['retry_after'] ?? null;
|
$object->retry_after = $data['retry_after'] ?? null;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue