vonage 7.6.0 → 7.7.0
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.
- checksums.yaml +4 -4
- data/lib/vonage/version.rb +1 -1
- data/lib/vonage/voice.rb +17 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 242b084a9fa7d5182003af91d36beecd17e87067eb857baafea3d3b3e39c249e
|
4
|
+
data.tar.gz: 71ac8feb31afc39000b60d06e41b158effa0017dcd88c5dd799f87474c45c873
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fcd2b8066241a751dbdc7311272e1f5232c0aa740c8b1d6353d28e71295b1393035a8b27801d64503ad34d965b1794c345e3d3753bc7d11109db51222495576
|
7
|
+
data.tar.gz: 999ad595cb6efd3e8ac88cb306ffaf4b1267c356744985e107d6b7a8c488f8988b54ee57cc763cb47622587272bdbe9c8d994286b4067c270792b2743611b0e8
|
data/lib/vonage/version.rb
CHANGED
data/lib/vonage/voice.rb
CHANGED
@@ -19,8 +19,14 @@ module Vonage
|
|
19
19
|
# @option params [required, Array<Hash>] :to
|
20
20
|
# Connect to a Phone (PSTN) number, SIP Endpoint, Websocket, or VBC extension.
|
21
21
|
#
|
22
|
-
# @option params [
|
23
|
-
# Connect to a Phone (PSTN) number.
|
22
|
+
# @option params [Hash] :from
|
23
|
+
# Connect to a Phone (PSTN) number. Should not be set if **:random_from_number** is **true**
|
24
|
+
# If not set, then **:random_from_number** will automatically be set to **true**
|
25
|
+
#
|
26
|
+
# @option params [Boolean] :random_from_number
|
27
|
+
# Set to **true** to use random phone number as **from**. The number will be selected from the list
|
28
|
+
# of the numbers assigned to the current application.
|
29
|
+
# **random_from_number: true** cannot be used together with **:from**.
|
24
30
|
#
|
25
31
|
# @option params [Array<String>] :ncco
|
26
32
|
# The Vonage Call Control Object to use for this call.
|
@@ -55,6 +61,14 @@ module Vonage
|
|
55
61
|
# @see https://developer.nexmo.com/api/voice#createCall
|
56
62
|
#
|
57
63
|
def create(params)
|
64
|
+
if params.key?(:from) && params[:random_from_number] == true
|
65
|
+
raise ClientError.new("`from` should not be set if `random_from_number` is `true`")
|
66
|
+
end
|
67
|
+
|
68
|
+
if params && !params.key?(:from)
|
69
|
+
params.merge!(random_from_number: true)
|
70
|
+
end
|
71
|
+
|
58
72
|
request('/v1/calls', params: params, type: Post)
|
59
73
|
end
|
60
74
|
|
@@ -101,7 +115,7 @@ module Vonage
|
|
101
115
|
if params && !params.key?(:auto_advance)
|
102
116
|
params.merge!(auto_advance: true)
|
103
117
|
end
|
104
|
-
|
118
|
+
|
105
119
|
request('/v1/calls', params: params, response_class: ListResponse)
|
106
120
|
end
|
107
121
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vonage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vonage
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nexmo-jwt
|