diff --git a/src/WebRtc/Models/DeviceApiVersionEnum.php b/src/WebRtc/Models/DeviceApiVersionEnum.php new file mode 100644 index 0000000..3ae64f8 --- /dev/null +++ b/src/WebRtc/Models/DeviceApiVersionEnum.php @@ -0,0 +1,24 @@ +id = func_get_arg(0); - $this->callbackUrl = func_get_arg(1); - $this->publishPermissions = func_get_arg(2); - $this->sessions = func_get_arg(3); - $this->subscriptions = func_get_arg(4); - $this->tag = func_get_arg(5); + switch (func_num_args()) { + case 7: + $this->id = func_get_arg(0); + $this->callbackUrl = func_get_arg(1); + $this->publishPermissions = func_get_arg(2); + $this->sessions = func_get_arg(3); + $this->subscriptions = func_get_arg(4); + $this->tag = func_get_arg(5); + $this->deviceApiVersion = func_get_arg(6); + break; + + default: + $this->deviceApiVersion = DeviceApiVersionEnum::V2; + break; } } @@ -80,6 +93,7 @@ public function jsonSerialize() array_values($this->sessions) : null; $json['subscriptions'] = $this->subscriptions; $json['tag'] = $this->tag; + $json['deviceApiVersion'] = $this->deviceApiVersion; return array_filter($json); }