Skip to content

Commit e972ba8

Browse files
authored
Merge pull request #16 from Bandwidth/release/2021-03-08-21-34-11
WebRtc permissions new field
2 parents f087019 + 1e70a8b commit e972ba8

File tree

5 files changed

+31
-3
lines changed

5 files changed

+31
-3
lines changed

.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
README.md
22
lib/bandwidth/voice_lib/bxml/*
33
lib/bandwidth/web_rtc_lib/utils/*
4+
test/integration/*

bandwidth.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = 'bandwidth-sdk'
3-
s.version = '6.0.0'
3+
s.version = '6.1.0'
44
s.summary = 'bandwidth'
55
s.description = 'Bandwidth\'s set of APIs'
66
s.authors = ['APIMatic SDK Generator']

lib/bandwidth/web_rtc_lib/web_rtc.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
require_relative 'web_rtc/models/subscriptions.rb'
1313
require_relative 'web_rtc/models/participant_subscription.rb'
1414
require_relative 'web_rtc/models/accounts_participants_response.rb'
15+
require_relative 'web_rtc/models/device_api_version_enum.rb'
1516
require_relative 'web_rtc/models/publish_permission_enum.rb'
1617

1718
# Exceptions
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# bandwidth
2+
#
3+
# This file was automatically generated by APIMATIC v2.0
4+
# ( https://apimatic.io ).
5+
6+
module Bandwidth
7+
# Optional field to define the device api version of this participant
8+
class DeviceApiVersionEnum
9+
DEVICE_API_VERSION_ENUM = [
10+
# TODO: Write general description for V3
11+
V3 = 'v3'.freeze,
12+
13+
# TODO: Write general description for V2
14+
V2 = 'v2'.freeze
15+
].freeze
16+
end
17+
end

lib/bandwidth/web_rtc_lib/web_rtc/models/participant.rb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ class Participant < BaseModel
3232
# @return [String]
3333
attr_accessor :tag
3434

35+
# Optional field to define the device api version of this participant
36+
# @return [DeviceApiVersionEnum]
37+
attr_accessor :device_api_version
38+
3539
# A mapping from model property names to API property names.
3640
def self.names
3741
@_hash = {} if @_hash.nil?
@@ -41,6 +45,7 @@ def self.names
4145
@_hash['sessions'] = 'sessions'
4246
@_hash['subscriptions'] = 'subscriptions'
4347
@_hash['tag'] = 'tag'
48+
@_hash['device_api_version'] = 'deviceApiVersion'
4449
@_hash
4550
end
4651

@@ -49,13 +54,15 @@ def initialize(id = nil,
4954
publish_permissions = nil,
5055
sessions = nil,
5156
subscriptions = nil,
52-
tag = nil)
57+
tag = nil,
58+
device_api_version = DeviceApiVersionEnum::V2)
5359
@id = id
5460
@callback_url = callback_url
5561
@publish_permissions = publish_permissions
5662
@sessions = sessions
5763
@subscriptions = subscriptions
5864
@tag = tag
65+
@device_api_version = device_api_version
5966
end
6067

6168
# Creates an instance of the object from a hash.
@@ -70,14 +77,16 @@ def self.from_hash(hash)
7077
subscriptions = Subscriptions.from_hash(hash['subscriptions']) if
7178
hash['subscriptions']
7279
tag = hash['tag']
80+
device_api_version = hash['deviceApiVersion'] ||= DeviceApiVersionEnum::V2
7381

7482
# Create object from extracted values.
7583
Participant.new(id,
7684
callback_url,
7785
publish_permissions,
7886
sessions,
7987
subscriptions,
80-
tag)
88+
tag,
89+
device_api_version)
8190
end
8291
end
8392
end

0 commit comments

Comments
 (0)