id = $id; $this->returnUrl = $returnUrl; $this->events = $events; } /** * Generates an instance from serialized data * * @since 2.9.0 * * @param array $data * * @return WebhookConfig */ public static function fromArray(array $data) { return new self($data['id'], $data['returnUrl'], $data['events']); } /** * Generates an array for serialization * * @since 2.9.0 * * @return array */ public function toArray() { return [ 'id' => $this->id, 'returnUrl' => $this->returnUrl, 'events' => $this->events, ]; } }