vonage 7.23.0 → 8.0.0.beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +87 -387
  3. data/lib/vonage/applications.rb +4 -12
  4. data/lib/vonage/client.rb +0 -51
  5. data/lib/vonage/client_error.rb +1 -1
  6. data/lib/vonage/config.rb +1 -9
  7. data/lib/vonage/conversations/events.rb +0 -12
  8. data/lib/vonage/conversations/legs.rb +0 -6
  9. data/lib/vonage/conversations/members.rb +0 -15
  10. data/lib/vonage/conversations/users.rb +0 -15
  11. data/lib/vonage/conversations.rb +0 -30
  12. data/lib/vonage/errors.rb +20 -37
  13. data/lib/vonage/gsm7.rb +1 -1
  14. data/lib/vonage/jwt.rb +0 -17
  15. data/lib/vonage/keys.rb +0 -2
  16. data/lib/vonage/logger.rb +3 -5
  17. data/lib/vonage/messaging/channels/viber.rb +1 -8
  18. data/lib/vonage/messaging/channels/whats_app.rb +1 -3
  19. data/lib/vonage/messaging.rb +0 -11
  20. data/lib/vonage/namespace.rb +60 -132
  21. data/lib/vonage/numbers.rb +6 -29
  22. data/lib/vonage/server_error.rb +1 -1
  23. data/lib/vonage/signature.rb +5 -5
  24. data/lib/vonage/sms.rb +20 -20
  25. data/lib/vonage/version.rb +1 -1
  26. data/lib/vonage/video/archives.rb +53 -18
  27. data/lib/vonage/video/list_response.rb +11 -0
  28. data/lib/vonage/video/moderation.rb +22 -7
  29. data/lib/vonage/video/signals.rb +9 -4
  30. data/lib/vonage/video/streams.rb +12 -6
  31. data/lib/vonage/video.rb +13 -31
  32. data/lib/vonage/voice/actions/connect.rb +3 -27
  33. data/lib/vonage/voice/actions/conversation.rb +2 -2
  34. data/lib/vonage/voice/actions/pay.rb +107 -0
  35. data/lib/vonage/voice/actions/talk.rb +2 -11
  36. data/lib/vonage/voice/talk.rb +1 -11
  37. data/lib/vonage/voice.rb +0 -22
  38. data/lib/vonage.rb +0 -2
  39. data/vonage.gemspec +1 -3
  40. metadata +9 -94
  41. data/lib/vonage/api_error.rb +0 -33
  42. data/lib/vonage/conversation/event/list_response.rb +0 -11
  43. data/lib/vonage/conversation/event.rb +0 -108
  44. data/lib/vonage/conversation/list_response.rb +0 -11
  45. data/lib/vonage/conversation/member/list_response.rb +0 -11
  46. data/lib/vonage/conversation/member.rb +0 -134
  47. data/lib/vonage/conversation/user/conversations_list_response.rb +0 -11
  48. data/lib/vonage/conversation/user/sessions_list_response.rb +0 -11
  49. data/lib/vonage/conversation/user.rb +0 -67
  50. data/lib/vonage/conversation.rb +0 -164
  51. data/lib/vonage/meetings/applications.rb +0 -25
  52. data/lib/vonage/meetings/dial_in_numbers/list_response.rb +0 -11
  53. data/lib/vonage/meetings/dial_in_numbers.rb +0 -23
  54. data/lib/vonage/meetings/recordings.rb +0 -36
  55. data/lib/vonage/meetings/rooms/list_response.rb +0 -11
  56. data/lib/vonage/meetings/rooms.rb +0 -155
  57. data/lib/vonage/meetings/sessions/list_response.rb +0 -11
  58. data/lib/vonage/meetings/sessions.rb +0 -28
  59. data/lib/vonage/meetings/themes/list_response.rb +0 -11
  60. data/lib/vonage/meetings/themes.rb +0 -218
  61. data/lib/vonage/meetings.rb +0 -38
  62. data/lib/vonage/number_insight_2.rb +0 -36
  63. data/lib/vonage/proactive_connect/events/list_response.rb +0 -11
  64. data/lib/vonage/proactive_connect/events.rb +0 -68
  65. data/lib/vonage/proactive_connect/item.rb +0 -104
  66. data/lib/vonage/proactive_connect/items/file_response.rb +0 -32
  67. data/lib/vonage/proactive_connect/items/list_response.rb +0 -11
  68. data/lib/vonage/proactive_connect/items.rb +0 -107
  69. data/lib/vonage/proactive_connect/list.rb +0 -168
  70. data/lib/vonage/proactive_connect/lists/list_response.rb +0 -11
  71. data/lib/vonage/proactive_connect/lists.rb +0 -35
  72. data/lib/vonage/proactive_connect.rb +0 -33
  73. data/lib/vonage/subaccounts/balance_transfers/list_response.rb +0 -11
  74. data/lib/vonage/subaccounts/credit_transfers/list_response.rb +0 -11
  75. data/lib/vonage/subaccounts/list_response.rb +0 -15
  76. data/lib/vonage/subaccounts.rb +0 -203
  77. data/lib/vonage/users/list_response.rb +0 -11
  78. data/lib/vonage/users.rb +0 -156
  79. data/lib/vonage/verify2/channels/email.rb +0 -36
  80. data/lib/vonage/verify2/channels/silent_auth.rb +0 -45
  81. data/lib/vonage/verify2/channels/sms.rb +0 -53
  82. data/lib/vonage/verify2/channels/voice.rb +0 -32
  83. data/lib/vonage/verify2/channels/whats_app.rb +0 -38
  84. data/lib/vonage/verify2/channels/whats_app_interactive.rb +0 -32
  85. data/lib/vonage/verify2/start_verification_options.rb +0 -62
  86. data/lib/vonage/verify2/workflow.rb +0 -39
  87. data/lib/vonage/verify2/workflow_builder.rb +0 -25
  88. data/lib/vonage/verify2.rb +0 -97
  89. data/lib/vonage/video/archives/list_response.rb +0 -11
  90. data/lib/vonage/video/broadcasts/list_response.rb +0 -11
  91. data/lib/vonage/video/broadcasts.rb +0 -75
  92. data/lib/vonage/video/sip.rb +0 -48
  93. data/lib/vonage/video/streams/list_response.rb +0 -11
@@ -1,36 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
- require 'phonelib'
4
-
5
- module Vonage
6
- class Verify2::Channels::Email
7
-
8
- attr_reader :channel, :to, :from
9
-
10
- def initialize(to:, from: nil)
11
- self.channel = 'email'
12
- self.to = to
13
- self.from = from unless from.nil?
14
- end
15
-
16
- def to=(to)
17
- @to = to
18
- end
19
-
20
- def from=(from)
21
- @from = from
22
- end
23
-
24
- def to_h
25
- hash = Hash.new
26
- self.instance_variables.each do |ivar|
27
- hash[ivar.to_s.delete("@").to_sym] = self.instance_variable_get(ivar)
28
- end
29
- hash
30
- end
31
-
32
- private
33
-
34
- attr_writer :channel
35
- end
36
- end
@@ -1,45 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
- require 'phonelib'
4
- require 'uri'
5
-
6
- module Vonage
7
- class Verify2::Channels::SilentAuth
8
-
9
- attr_reader :channel, :to, :sandbox, :redirect_url
10
-
11
- def initialize(to:, redirect_url: nil, sandbox: nil)
12
- self.channel = 'silent_auth'
13
- self.to = to
14
- self.redirect_url = redirect_url unless redirect_url.nil?
15
- self.sandbox = sandbox unless sandbox.nil?
16
- end
17
-
18
- def to=(to)
19
- raise ArgumentError, "Invalid 'to' value #{to}. Expected to be in E.164 format" unless Phonelib.parse(to.to_i).valid?
20
- @to = to
21
- end
22
-
23
- def redirect_url=(redirect_url)
24
- raise ArgumentError, "Invalid 'to' value #{redirect_url}. Expected to be a valid URL" unless URI.parse(redirect_url).is_a?(URI::HTTP)
25
- @redirect_url = redirect_url
26
- end
27
-
28
- def sandbox=(sandbox)
29
- raise ArgumentError, "Invalid 'sandbox' value #{sandbox}. Expected to be boolean value" unless [true, false].include? sandbox
30
- @sandbox = sandbox
31
- end
32
-
33
- def to_h
34
- hash = Hash.new
35
- self.instance_variables.each do |ivar|
36
- hash[ivar.to_s.delete("@").to_sym] = self.instance_variable_get(ivar)
37
- end
38
- hash
39
- end
40
-
41
- private
42
-
43
- attr_writer :channel
44
- end
45
- end
@@ -1,53 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
- require 'phonelib'
4
-
5
- module Vonage
6
- class Verify2::Channels::SMS
7
- APP_HASH_LENGTH = 11
8
-
9
- attr_reader :channel, :to, :from, :entity_id, :content_id, :app_hash
10
-
11
- def initialize(to:, app_hash: nil)
12
- self.channel = 'sms'
13
- self.to = to
14
- self.app_hash = app_hash unless app_hash.nil?
15
- end
16
-
17
- def to=(to)
18
- raise ArgumentError, "Invalid 'to' value #{to}. Expected to be in E.164 format" unless Phonelib.parse(to).valid?
19
- @to = to
20
- end
21
-
22
- def from=(from)
23
- @from = from
24
- end
25
-
26
- def entity_id=(entity_id)
27
- raise ArgumentError, "Invalid 'entity_id' value #{entity_id}. Length must be between 1 and 20 characters." unless entity_id.length.between?(1, 20)
28
- @entity_id = entity_id
29
- end
30
-
31
- def content_id=(content_id)
32
- raise ArgumentError, "Invalid 'content_id' value #{content_id}. Length must be between 1 and 20 characters ." unless content_id.length.between?(1, 20)
33
- @content_id = content_id
34
- end
35
-
36
- def app_hash=(app_hash)
37
- raise ArgumentError, "Invalid 'app_hash' value #{app_hash}. Length must be #{APP_HASH_LENGTH}" unless app_hash.length == APP_HASH_LENGTH
38
- @app_hash = app_hash
39
- end
40
-
41
- def to_h
42
- hash = Hash.new
43
- self.instance_variables.each do |ivar|
44
- hash[ivar.to_s.delete("@").to_sym] = self.instance_variable_get(ivar)
45
- end
46
- hash
47
- end
48
-
49
- private
50
-
51
- attr_writer :channel
52
- end
53
- end
@@ -1,32 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
- require 'phonelib'
4
-
5
- module Vonage
6
- class Verify2::Channels::Voice
7
-
8
- attr_reader :channel, :to
9
-
10
- def initialize(to:)
11
- self.channel = 'voice'
12
- self.to = to
13
- end
14
-
15
- def to=(to)
16
- raise ArgumentError, "Invalid 'to' value #{to}. Expected to be in E.164 format" unless Phonelib.parse(to.to_i).valid?
17
- @to = to
18
- end
19
-
20
- def to_h
21
- hash = Hash.new
22
- self.instance_variables.each do |ivar|
23
- hash[ivar.to_s.delete("@").to_sym] = self.instance_variable_get(ivar)
24
- end
25
- hash
26
- end
27
-
28
- private
29
-
30
- attr_writer :channel
31
- end
32
- end
@@ -1,38 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
- require 'phonelib'
4
-
5
- module Vonage
6
- class Verify2::Channels::WhatsApp
7
-
8
- attr_reader :channel, :to, :from
9
-
10
- def initialize(to:, from:)
11
- self.channel = 'whatsapp'
12
- self.to = to
13
- self.from = from
14
- end
15
-
16
- def to=(to)
17
- raise ArgumentError, "Invalid 'to' value #{to}. Expected to be in E.164 format" unless Phonelib.parse(to.to_i).valid?
18
- @to = to
19
- end
20
-
21
- def from=(from)
22
- raise ArgumentError, "Invalid 'from' value #{from}. Expected to be in E.164 format" unless Phonelib.parse(from.to_i).valid?
23
- @from = from
24
- end
25
-
26
- def to_h
27
- hash = Hash.new
28
- self.instance_variables.each do |ivar|
29
- hash[ivar.to_s.delete("@").to_sym] = self.instance_variable_get(ivar)
30
- end
31
- hash
32
- end
33
-
34
- private
35
-
36
- attr_writer :channel
37
- end
38
- end
@@ -1,32 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
- require 'phonelib'
4
-
5
- module Vonage
6
- class Verify2::Channels::WhatsAppInteractive
7
-
8
- attr_reader :channel, :to
9
-
10
- def initialize(to:)
11
- self.channel = 'whatsapp_interactive'
12
- self.to = to
13
- end
14
-
15
- def to=(to)
16
- raise ArgumentError, "Invalid 'to' value #{to}. Expected to be in E.164 format" unless Phonelib.parse(to.to_i).valid?
17
- @to = to
18
- end
19
-
20
- def to_h
21
- hash = Hash.new
22
- self.instance_variables.each do |ivar|
23
- hash[ivar.to_s.delete("@").to_sym] = self.instance_variable_get(ivar)
24
- end
25
- hash
26
- end
27
-
28
- private
29
-
30
- attr_writer :channel
31
- end
32
- end
@@ -1,62 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
-
4
- module Vonage
5
- class Verify2::StartVerificationOptions
6
- VALID_OPTS = [:locale, :channel_timeout, :client_ref, :code_length, :code, :fraud_check].freeze
7
-
8
- MIN_CHANNEL_TIMEOUT, MAX_CHANNEL_TIMEOUT = [60, 900]
9
-
10
- MIN_CODE_LENGTH, MAX_CODE_LENGTH = [4, 10]
11
-
12
- attr_reader(*VALID_OPTS)
13
-
14
- def initialize(**opts)
15
- VALID_OPTS.each do |opt|
16
- send("#{opt}=", opts[opt]) unless opts[opt].nil?
17
- end
18
- end
19
-
20
- def locale=(locale)
21
- @locale = locale
22
- end
23
-
24
- def channel_timeout=(channel_timeout)
25
- unless channel_timeout.between?(MIN_CHANNEL_TIMEOUT, MAX_CHANNEL_TIMEOUT)
26
- raise ArgumentError, "Invalid 'channel_timeout' #{channel_timeout}. Must be between #{MIN_CHANNEL_TIMEOUT} and #{MAX_CHANNEL_TIMEOUT} (inclusive)"
27
- end
28
-
29
- @channel_timeout = channel_timeout
30
- end
31
-
32
- def client_ref=(client_ref)
33
- @client_ref = client_ref
34
- end
35
-
36
- def code_length=(code_length)
37
- unless code_length.between?(MIN_CODE_LENGTH, MAX_CODE_LENGTH)
38
- raise ArgumentError, "Invalid 'code_length' #{code_length}. Must be between #{MIN_CODE_LENGTH} and #{MAX_CODE_LENGTH} (inclusive)"
39
- end
40
-
41
- @code_length = code_length
42
- end
43
-
44
- def code=(code)
45
- @code = code
46
- end
47
-
48
- def fraud_check=(fraud_check)
49
- raise ArgumentError, "Invalid 'fraud_check' #{fraud_check}. Must be `false`" unless fraud_check == false
50
-
51
- @fraud_check = fraud_check
52
- end
53
-
54
- def to_h
55
- hash = Hash.new
56
- self.instance_variables.each do |ivar|
57
- hash[ivar.to_s.delete("@").to_sym] = self.instance_variable_get(ivar)
58
- end
59
- hash
60
- end
61
- end
62
- end
@@ -1,39 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
-
4
- module Vonage
5
- class Verify2::Workflow
6
- CHANNELS = {
7
- sms: Verify2::Channels::SMS,
8
- whatsapp: Verify2::Channels::WhatsApp,
9
- whatsapp_interactive: Verify2::Channels::WhatsAppInteractive,
10
- voice: Verify2::Channels::Voice,
11
- email: Verify2::Channels::Email,
12
- silent_auth: Verify2::Channels::SilentAuth
13
- }
14
-
15
- CHANNELS.keys.each do |method|
16
- define_method method do |attributes|
17
- CHANNELS[method].new(**attributes)
18
- end
19
- end
20
-
21
- def self.method_missing(method)
22
- raise ClientError.new("Workflow channel must be one of the valid options. Please refer to https://developer.vonage.com/en/api/verify.v2#newRequest for a complete list.")
23
- end
24
-
25
- attr_reader :list
26
-
27
- def initialize
28
- @list = []
29
- end
30
-
31
- def <<(workflow)
32
- list << workflow
33
- end
34
-
35
- def hashified_list
36
- list.map(&:to_h)
37
- end
38
- end
39
- end
@@ -1,25 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
-
4
- module Vonage
5
- class Verify2::WorkflowBuilder
6
-
7
- def self.build
8
- builder = self.new
9
- yield builder if block_given?
10
- builder.workflow
11
- end
12
-
13
- attr_reader :workflow
14
-
15
- def initialize
16
- @workflow = Vonage::Verify2::Workflow.new
17
- end
18
-
19
- Vonage::Verify2::Workflow::CHANNELS.keys.each do |channel|
20
- define_method "add_#{channel.to_s}" do |args|
21
- workflow << workflow.send(channel, **args)
22
- end
23
- end
24
- end
25
- end
@@ -1,97 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
-
4
- module Vonage
5
- class Verify2 < Namespace
6
- self.authentication = BearerToken
7
-
8
- self.request_body = JSON
9
-
10
- # Request a verification be sent to a user.
11
- #
12
- # @example
13
- # verification_request = client.verify2.start_verification(
14
- # brand: 'Acme',
15
- # workflow: [{channel: 'sms', to: '447000000000'}],
16
- # code_length: 6
17
- # )
18
- #
19
- # @param [required, String] :brand The brand that is sending the verification request
20
- #
21
- # @param [required, Array<Hash>] :workflow An array of hashes for channels in the workflow
22
- #
23
- # @param [optional, Hash] opts the options for the verification request.
24
- # @option opts [Integer] :code_length The length of the one-time code provided to the end-user
25
- # @option opts [String] :code An optional alphanumeric custom code to use instead of an auto-generated code
26
- # @option opts [String] :locale The language to use for the verification message (where applicable)
27
- # @option opts [Integer] :channel_timeout Wait time in seconds before trying the next channel in the workflow
28
- # @option opts [String] :client_ref Reference to be included in callbacks
29
- # @option opts [Boolean] If used, must be set to `false`. Will bypass a network block for a single Verify V2 request
30
- #
31
- # @return Vonage::Response
32
- # @see https://developer.vonage.com/en/api/verify.v2#newRequest
33
- #
34
- def start_verification(brand:, workflow:, **opts)
35
- raise ArgumentError, ':workflow must be an Array' unless workflow.is_a?(Array)
36
- raise ArgumentError, ':workflow must not be empty' if workflow.empty?
37
-
38
- request('/v2/verify/', params: opts.merge(brand: brand, workflow: workflow), type: Post)
39
- end
40
-
41
- # Check a supplied code against a request to see if it is valid.
42
- #
43
- # @example
44
- # code_check = client.verify2.check_code(request_id: '7e8c5965-0a3f-44df-8a14-f1486209d8a2', code: '1234')
45
- #
46
- # @param [required, String] :request_id The request_id of the verification request being checked
47
- #
48
- # @param [required, String] :code The code supplied to the end-user by the verification request
49
- #
50
- # @see https://developer.vonage.com/en/api/verify.v2#checkCode
51
- #
52
- def check_code(request_id:, code:)
53
- request('/v2/verify/' + request_id, params: {code: code}, type: Post)
54
- end
55
-
56
- # Cancel a verifiction. If a verification request is still active, calling this method aborts the workflow.
57
- #
58
- # @example
59
- # client.verify2.cancel_verification_request(request_id: '7e8c5965-0a3f-44df-8a14-f1486209d8a2')
60
- #
61
- # @param [required, String] :request_id The request_id of the verification request to be cancelled
62
- #
63
- # @see https://developer.vonage.com/en/api/verify.v2#cancelRequest
64
- #
65
- def cancel_verification_request(request_id:)
66
- request('/v2/verify/' + request_id, type: Delete)
67
- end
68
-
69
- def next_workflow(request_id:)
70
- request('/v2/verify/' + request_id + '/next-workflow', type: Post)
71
- end
72
-
73
- # Instantiate a new Vonage::Verify2::StartVerificationOptions object
74
- #
75
- # @param [optional, Hash] opts the options for the verification request.
76
- # @option opts [Integer] :code_length The length of the one-time code provided to the end-user
77
- # @option opts [String] :code An optional alphanumeric custom code to use instead of an auto-generated code
78
- # @option opts [String] :locale The language to use for the verification message (where applicable)
79
- # @option opts [Integer] :channel_timeout Wait time in seconds before trying the next channel in the workflow
80
- # @option opts [String] :client_ref Reference to be included in callbacks
81
- # @option opts [Boolean] If used, must be set to `false`. Will bypass a network block for a single Verify V2 request
82
- #
83
- def start_verification_options(**opts)
84
- StartVerificationOptions.new(**opts)
85
- end
86
-
87
- # Instantiate a new Vonage::Verify2::Workflow object
88
- def workflow
89
- Workflow.new
90
- end
91
-
92
- # Return the Vonage::Verify2::WorkflowBuilder class
93
- def workflow_builder
94
- WorkflowBuilder.itself
95
- end
96
- end
97
- end
@@ -1,11 +0,0 @@
1
- # typed: true
2
-
3
- class Vonage::Video::Archives::ListResponse < Vonage::Response
4
- include Enumerable
5
-
6
- def each
7
- return enum_for(:each) unless block_given?
8
-
9
- @entity.items.each { |item| yield item }
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- # typed: true
2
-
3
- class Vonage::Video::Broadcasts::ListResponse < Vonage::Response
4
- include Enumerable
5
-
6
- def each
7
- return enum_for(:each) unless block_given?
8
-
9
- @entity.items.each { |item| yield item }
10
- end
11
- end
@@ -1,75 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
-
4
- module Vonage
5
- class Video::Broadcasts < Namespace
6
- include Keys
7
-
8
- self.authentication = BearerToken
9
-
10
- self.request_body = JSON
11
-
12
- self.host = :video_host
13
-
14
- # Get a list of live streaming broadcasts for a specified Vonage application.
15
- #
16
- def list(**params)
17
- path = '/v2/project/' + @config.application_id + '/broadcast'
18
- path += "?#{Params.encode(camelcase(params))}" unless params.empty?
19
-
20
- request(path, response_class: ListResponse)
21
- end
22
-
23
- # Return information for specified broadcast.
24
- #
25
- def info(broadcast_id:)
26
- request('/v2/project/' + @config.application_id + '/broadcast/' + broadcast_id)
27
- end
28
-
29
- # Start a new live streaming broadcast.
30
- #
31
- def start(session_id:, **params)
32
- request(
33
- '/v2/project/' + @config.application_id + '/broadcast',
34
- params: camelcase(params.merge(session_id: session_id)),
35
- type: Post
36
- )
37
- end
38
-
39
- # Stop a specified broadcast.
40
- #
41
- def stop(broadcast_id:)
42
- request('/v2/project/' + @config.application_id + '/broadcast/' + broadcast_id + '/stop', type: Post)
43
- end
44
-
45
- # Add a stream to a live streaming broadcast.
46
- #
47
-
48
- def add_stream(broadcast_id:, stream_id:, **params)
49
- request(
50
- '/v2/project/' + @config.application_id + '/broadcast/' + broadcast_id + '/streams',
51
- params: camelcase(params.merge(addStream: stream_id)),
52
- type: Patch
53
- )
54
- end
55
-
56
- # Remove a stream from a live streaming broadcast.
57
- #
58
- def remove_stream(broadcast_id:, stream_id:)
59
- request(
60
- '/v2/project/' + @config.application_id + '/broadcast/' + broadcast_id + '/streams',
61
- params: {removeStream: stream_id},
62
- type: Patch
63
- )
64
- end
65
-
66
- # Dynamically change layout of a broadcast.
67
- #
68
- def change_layout(broadcast_id:, **params)
69
- request(
70
- '/v2/project/' + @config.application_id + '/broadcast/' + broadcast_id + '/layout',
71
- params: camelcase(params),
72
- type: Put)
73
- end
74
- end
75
- end
@@ -1,48 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
-
4
- module Vonage
5
- class Video::SIP < Namespace
6
- include Keys
7
-
8
- self.authentication = BearerToken
9
-
10
- self.request_body = JSON
11
-
12
- self.host = :video_host
13
-
14
- # Initiate an outbound SIP call.
15
- #
16
- def dial(session_id:, token:, sip_uri:, **params)
17
- request(
18
- '/v2/project/' + @config.application_id + '/dial',
19
- params: camelcase({
20
- session_id: session_id,
21
- token: token,
22
- sip: params.merge({uri: sip_uri})
23
- }),
24
- type: Post
25
- )
26
- end
27
-
28
- # Play DTMF tones into a SIP call.
29
- #
30
- def play_dtmf_to_session(session_id:, dtmf_digits:)
31
- request(
32
- '/v2/project/' + @config.application_id + '/session/' + session_id + '/play-dtmf',
33
- params: {digits: dtmf_digits},
34
- type: Post
35
- )
36
- end
37
-
38
- # Play DMTF tones into a specific connection.
39
- #
40
- def play_dtmf_to_connection(session_id:, connection_id:, dtmf_digits:)
41
- request(
42
- '/v2/project/' + @config.application_id + '/session/' + session_id + '/connection/' + connection_id + '/play-dtmf',
43
- params: {digits: dtmf_digits},
44
- type: Post
45
- )
46
- end
47
- end
48
- end
@@ -1,11 +0,0 @@
1
- # typed: true
2
-
3
- class Vonage::Video::Streams::ListResponse < Vonage::Response
4
- include Enumerable
5
-
6
- def each
7
- return enum_for(:each) unless block_given?
8
-
9
- @entity.items.each { |item| yield item }
10
- end
11
- end