Skip to content

Commit aa8976a

Browse files
WebRtc new field (#21)
* New deploy * reverted changes except for webrtc * reverted missing files * git is hard Co-authored-by: jmulford-bw <[email protected]>
1 parent d68569d commit aa8976a

File tree

2 files changed

+45
-7
lines changed

2 files changed

+45
-7
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
/*
3+
* BandwidthLib
4+
*
5+
* This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
6+
*/
7+
8+
namespace BandwidthLib\WebRtc\Models;
9+
10+
/**
11+
* Optional field to define the device api version of this participant
12+
*/
13+
class DeviceApiVersionEnum
14+
{
15+
/**
16+
* TODO: Write general description for this element
17+
*/
18+
const V3 = "v3";
19+
20+
/**
21+
* TODO: Write general description for this element
22+
*/
23+
const V2 = "v2";
24+
}

src/WebRtc/Models/Participant.php

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,31 @@ class Participant implements \JsonSerializable
5050
*/
5151
public $tag;
5252

53+
/**
54+
* Optional field to define the device api version of this participant
55+
* @var string|null $deviceApiVersion public property
56+
*/
57+
public $deviceApiVersion;
58+
5359
/**
5460
* Constructor to set initial or default values of member properties
5561
*/
5662
public function __construct()
5763
{
58-
if (6 == func_num_args()) {
59-
$this->id = func_get_arg(0);
60-
$this->callbackUrl = func_get_arg(1);
61-
$this->publishPermissions = func_get_arg(2);
62-
$this->sessions = func_get_arg(3);
63-
$this->subscriptions = func_get_arg(4);
64-
$this->tag = func_get_arg(5);
64+
switch (func_num_args()) {
65+
case 7:
66+
$this->id = func_get_arg(0);
67+
$this->callbackUrl = func_get_arg(1);
68+
$this->publishPermissions = func_get_arg(2);
69+
$this->sessions = func_get_arg(3);
70+
$this->subscriptions = func_get_arg(4);
71+
$this->tag = func_get_arg(5);
72+
$this->deviceApiVersion = func_get_arg(6);
73+
break;
74+
75+
default:
76+
$this->deviceApiVersion = DeviceApiVersionEnum::V2;
77+
break;
6578
}
6679
}
6780

@@ -80,6 +93,7 @@ public function jsonSerialize()
8093
array_values($this->sessions) : null;
8194
$json['subscriptions'] = $this->subscriptions;
8295
$json['tag'] = $this->tag;
96+
$json['deviceApiVersion'] = $this->deviceApiVersion;
8397

8498
return array_filter($json);
8599
}

0 commit comments

Comments
 (0)