plivo 4.60.0 → 4.60.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42e9961c1458627e0fd5d95540f9032d9654d88d
4
- data.tar.gz: b042ca75f5dd628eddad9495d3df159a05c08cc9
3
+ metadata.gz: 6898e61d78d4bfd1055c70207a612808308161f2
4
+ data.tar.gz: 21375522df6afefed4217a9f1485a8248f586ad6
5
5
  SHA512:
6
- metadata.gz: 036a9fe1398b92ba5feda2b7d0d5c154a3b38eeaa6903cb1b64bbe91bc42e09da5efc1198a70c2bf5ac2945b0b2ea00da3c71727b5b0de7553bec4d4e635d693
7
- data.tar.gz: b286290f67510a1262d58ee71c8b779b6dd53530dc60a97cbd6cf2e5c9c23741bbdd4333e4134abfb2f42389288d0c6d2408b868076332f8d5ed008e67b8bbbc
6
+ metadata.gz: a4f4c67a6e0509e51edb4a372544324093fab1570d1f3b71cf4f0a419e67b0e9c39c369515a91c977c269155a493df4e058c36a74c41d62c176808aa60ab3a92
7
+ data.tar.gz: 27d9b7f6097a4ef551d71ca7f8215b57059c89d898b08ad8ff99ab6d2b57083bcf1a0d479bafc655e3953d6ad2133a0453f6efd4ef8620dda92c185209f2c58a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Change Log
2
2
 
3
+ ## [4.60.2](https://github.com/plivo/plivo-ruby/tree/v4.60.2) (2024-09-06)
4
+ **Feature - Adding support for brand_name and app_hash in Create,Get and List Session**
5
+ - Added new request param `brand_name`, `code_length` and `app_hash` in create Session API
6
+ - Added support for `brand_name`, `code_length` and `app_hash` param in get and list Session response
7
+
8
+ ## [4.60.1](https://github.com/plivo/plivo-ruby/tree/v4.60.1) (2024-09-03)
9
+ **Feature - Adding new element for Audio Stream XML **
10
+ - Added `keepCallAlive` element in Audio Stream XML
11
+
12
+
3
13
  ## [4.60.0](https://github.com/plivo/plivo-ruby/tree/v4.60.0) (2024-07-11)
4
14
  **Feature - Adding support for Locale param in Create, Get and List Session**
5
15
  - Added new request param `locale` in create Session API
data/README.md CHANGED
@@ -9,7 +9,7 @@ The Plivo Ruby SDK makes it simpler to integrate communications into your Ruby a
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'plivo', '>= 4.60.0'
12
+ gem 'plivo', '>= 4.60.2'
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -42,13 +42,16 @@ module Plivo
42
42
  perform_get(session_uuid)
43
43
  end
44
44
 
45
- def create(app_uuid = nil, recipient = nil,channel = nil, url = nil, method = nil, locale=nil)
45
+ def create(app_uuid = nil, recipient = nil,channel = nil, url = nil, method = nil, locale=nil, brand_name=nil, app_hash=nil, code_length=nil)
46
46
  valid_param?(:app_uuid, app_uuid, [String, Symbol], false)
47
47
  valid_param?(:recipient, recipient, [Integer, String, Symbol], true)
48
48
  valid_param?(:channel, channel, [String, Symbol], false)
49
49
  valid_param?(:url, url, [String], false)
50
50
  valid_param?(:method, method, String, false, %w[POST GET])
51
51
  valid_param?(:locale, locale, [String, Symbol], false)
52
+ valid_param?(:brand_name, brand_name, [String, Symbol], false)
53
+ valid_param?(:app_hash, app_hash, [String, Symbol], false)
54
+ valid_param?(:code_length, code_length,[Integer,Symbol], false)
52
55
 
53
56
  params = {
54
57
  app_uuid: app_uuid,
@@ -56,7 +59,10 @@ module Plivo
56
59
  channel: channel,
57
60
  url: url,
58
61
  method: method,
59
- locale: locale
62
+ locale: locale,
63
+ brand_name: brand_name,
64
+ app_hash: app_hash,
65
+ code_length: code_length
60
66
  }
61
67
  perform_create(params)
62
68
  end
@@ -67,7 +73,7 @@ module Plivo
67
73
  params = {}
68
74
  params_expected = %i[
69
75
  subaccount status session_time__gt session_time__gte
70
- session_time__lt session_time__lte session_time country alias app_uuid recipient
76
+ session_time__lt session_time__lte session_time country alias app_uuid recipient brand_name app_hash
71
77
  ]
72
78
 
73
79
  params_expected.each do |param|
data/lib/plivo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plivo
2
- VERSION = "4.60.0".freeze
2
+ VERSION = "4.60.2".freeze
3
3
  end
@@ -3,11 +3,12 @@ module Plivo
3
3
  class Stream < Element
4
4
  @nestables = []
5
5
  @valid_attributes = %w[bidirectional audioTrack streamTimeout statusCallbackUrl
6
- statusCallbackMethod contentType extraHeaders]
6
+ statusCallbackMethod contentType extraHeaders keepCallAlive]
7
7
 
8
8
  SUPPORTED_BIDIRECTIONAL=%w(true false)
9
9
  SUPPORTED_AUDIOTRACK=%w(inbound outbound both)
10
10
  SUPPORTED_CALLBACKMETHOD=%w(GET POST)
11
+ SUPPORTED_KEEPCALLALIVE=%w(true false)
11
12
 
12
13
  def initialize(body, attributes = {})
13
14
  if attributes[:bidirectional] && !SUPPORTED_BIDIRECTIONAL.include?(attributes[:bidirectional])
@@ -19,6 +20,9 @@ module Plivo
19
20
  if attributes[:statusCallbackMethod] && !SUPPORTED_CALLBACKMETHOD.include?(attributes[:statusCallbackMethod].upcase)
20
21
  raise PlivoXMLError, "<Stream> statusCallbackMethod #{attributes[:statusCallbackMethod]} is not valid."
21
22
  end
23
+ if attributes[:keepCallAlive] && !SUPPORTED_KEEPCALLALIVE.include?(attributes[:keepCallAlive])
24
+ raise PlivoXMLError, "<Stream> keepCallAlive #{attributes[:keepCallAlive]} is not valid."
25
+ end
22
26
  raise PlivoXMLError, 'No text set for Stream' unless body
23
27
  super(body, attributes)
24
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plivo
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.60.0
4
+ version: 4.60.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Plivo SDKs Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-11 00:00:00.000000000 Z
11
+ date: 2024-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday