plivo 4.42.0 → 4.45.0

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: 7e80e8ca16eb8c91e39dcf495ffaeaaa57d2b7de
4
- data.tar.gz: 9bc7a4286410725263d6bd12cf3ff919b36590e8
3
+ metadata.gz: b33e83271ea1b3c2e5c41896af84fb49c3c07bee
4
+ data.tar.gz: 97ba20e8311a213e6db92cc1a7d29a88b62254a1
5
5
  SHA512:
6
- metadata.gz: a2587df8a9d194c111c7586a8b030aa02f8e4a6cb33d2ebf0404b5a9245bb673a794e90f81c1acc31db4198dcd19abd3b3b517f3c69586308c466e614236fa07
7
- data.tar.gz: 0dce892a4df04db97ed1956063060071b7084ebfac5254035392cb14a31bfa23d199b275538613ab065034c9aaa2bff70602c706f6ec00fc28d37377ad3df0b9
6
+ metadata.gz: 287c22be5c57c14d03b932d3387f95872ef748809a04ba88419f38dc0f6df06d47a7e43327484da59717b1d282a46a8f4661cc4e2defdf560a76e7ca4b8f6a49
7
+ data.tar.gz: 1b49da62504fd9f7dd178db676d3402be0bfdd72aa5f0d1a904e5b560697bdeca452e052b06030403880654edc46d0ba269de69a0d9ef7fd748a1aefcd313950
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Change Log
2
2
 
3
+ ## [4.45.0](https://github.com/plivo/plivo-ruby/tree/v4.45.0) (2023-05-02)
4
+ **Feature - CNAM Lookup**
5
+ - Added New Param `cnam_lookup` in to the response of the [list all numbers API], [list single number API]
6
+ - Added `cnam_lookup` filter to AccountPhoneNumber - list all my numbers API.
7
+ - Added `cnam_lookup` parameter to buy number[Buy a Phone Number] to configure CNAM Lookup while buying a US number
8
+ - Added `cnam_lookup` parameter to update number[Update an account phone number] to configure CNAM Lookup while buying a US number
9
+
10
+
11
+ ## [4.44.0](https://github.com/plivo/plivo-ruby/tree/v4.38.2) (2023-03-16)
12
+ **Feature : Added new param in getCallDetail api**
13
+ - From now on we can see CNAM(Caller_id name) details at CDR level.
14
+
15
+ ## [4.43.0](https://github.com/plivo/plivo-ruby/tree/v4.43.0) (2023-05-29)
16
+ **Feature - Recording API changes**
17
+ - Added `monthly_recording_storage_amount`, `recording_storage_rate`, `rounded_recording_duration`, and `recording_storage_duration` parameters to the response for [get single recording API](https://www.plivo.com/docs/voice/api/recording#retrieve-a-recording) and [get all recordings API](https://www.plivo.com/docs/voice/api/recording#list-all-recordings)
18
+ - Added `recording_storage_duration` parameter as a filter option for [get all recordings API](https://www.plivo.com/docs/voice/api/recording#list-all-recordings)
19
+
3
20
  ## [4.42.0](https://github.com/plivo/plivo-ruby/tree/v4.42.0) (2023-05-04)
4
21
  **Adding new attribute - 'renewalDate' in Get Number and List Number APIs**
5
22
  - Add New Param `renewalDate` to the response of the [list all numbers API], [list single number API]
@@ -32,13 +49,10 @@
32
49
  **Feature - Enhance MDR filtering capabilities **
33
50
  - Added new fields on MDR object response
34
51
 
35
-
36
-
37
52
  ## [4.37.0](https://github.com/plivo/plivo-ruby/tree/v4.37.0) (2023-02-06)
38
53
  **Feature - Added New Param 'source_ip' in GetCall and ListCalls**
39
54
  - Add `source_ip` to the response for the [retrieve a call details API](https://www.plivo.com/docs/voice/api/call#retrieve-a-call) and the [retreive all call details API](https://www.plivo.com/docs/voice/api/call#retrieve-all-calls)
40
55
 
41
-
42
56
  ## [4.36.0](https://github.com/plivo/plivo-ruby/tree/v4.36.0) (2022-01-25)
43
57
  **Adding new attribute - 'requester_ip' in Get Message and List Mssage APIs**
44
58
  - Add `requester_ip` to the response for the [list all messages API](https://www.plivo.com/docs/sms/api/message/list-all-messages/) and the [get message details API](https://www.plivo.com/docs/sms/api/message#retrieve-a-message)
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.42.0'
12
+ gem 'plivo', '>= 4.45.0'
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -33,7 +33,7 @@ module Plivo
33
33
  raise Exceptions::PlivoRESTError, "Resource at #{response[:url]} "\
34
34
  'couldn\'t be deleted'
35
35
  end
36
- elsif !([200, 201, 202, 204, 207].include? response[:status])
36
+ elsif !([200, 201, 202, 204, 207, 206].include? response[:status])
37
37
  raise Exceptions::PlivoRESTError, "Received #{response[:status]} for #{method}"
38
38
  end
39
39
  @@voice_retry_count = 0
@@ -233,7 +233,8 @@ module Plivo
233
233
  caller_name: @caller_name,
234
234
  stir_verification: @stir_verification,
235
235
  stir_attestation: @stir_attestation,
236
- source_ip: @source_ip
236
+ source_ip: @source_ip,
237
+ cnam_lookup: @cnam_lookup
237
238
  }
238
239
  call_details = call_details.select {|k, v| !v.nil? }
239
240
  call_details.to_s
@@ -9,10 +9,11 @@ module Plivo
9
9
  super
10
10
  end
11
11
 
12
- def buy(app_id = nil, verification_info = nil)
12
+ def buy(app_id = nil, verification_info = nil, cnam_lookup = nil)
13
13
  params = {}
14
14
  params[:app_id] = app_id unless app_id.nil?
15
15
  params[:verification_info] = verification_info unless verification_info.nil?
16
+ params[:cnam_lookup] = cnam_lookup unless cnam_lookup.nil?
16
17
  perform_action(nil, 'POST', params, true)
17
18
  end
18
19
 
@@ -118,10 +119,10 @@ module Plivo
118
119
  end
119
120
  end
120
121
 
121
- def buy(number, app_id = nil, verification_info = nil)
122
+ def buy(number, app_id = nil, verification_info = nil, cnam_lookup = nil)
122
123
  valid_param?(:number, number, [Integer, String, Symbol], true)
123
124
  PhoneNumber.new(@_client,
124
- resource_id: number).buy(app_id, verification_info)
125
+ resource_id: number).buy(app_id, verification_info, cnam_lookup)
125
126
  end
126
127
  end
127
128
 
@@ -142,7 +143,7 @@ module Plivo
142
143
  params[:subaccount] = options[:subaccount]
143
144
  end
144
145
 
145
- %i[alias app_id].each do |param|
146
+ %i[alias app_id cnam_lookup].each do |param|
146
147
  if options.key?(param) &&
147
148
  valid_param?(param, options[param], [String, Symbol], true)
148
149
  params[param] = options[param]
@@ -183,7 +184,8 @@ module Plivo
183
184
  tendlc_campaign_id: @tendlc_campaign_id,
184
185
  tendlc_registration_status: @tendlc_registration_status,
185
186
  toll_free_sms_verification: @toll_free_sms_verification,
186
- renewal_date: @renewal_date
187
+ renewal_date: @renewal_date,
188
+ cnam_lookup: @cnam_lookup
187
189
  }.to_s
188
190
  end
189
191
  end
@@ -226,6 +228,9 @@ module Plivo
226
228
  # @option options [String] :renewal_date__lte Returns phone numbers that will be renewed on or before the specified date. Format: YYYY-MM-DD
227
229
  # @option options [String] :renewal_date__gt Returns phone numbers that will be renewed after the specified date. Format: YYYY-MM-DD
228
230
  # @option options [String] :renewal_date__gte Returns phone numbers that will be renewed on or after the specified date. Format: YYYY-MM-DD
231
+ # @option options [String] :cnam_lookup The Cnam Lookup Configuration associated with that number. The following values are valid:
232
+ # - enabled - Returns the list of numbers for which Cnam Lookup configuration is enabled
233
+ # - disabled - Returns the list of numbers for which Cnam Lookup configuration is disabled
229
234
  def list(options = nil)
230
235
  return perform_list if options.nil?
231
236
 
@@ -233,7 +238,7 @@ module Plivo
233
238
 
234
239
  params = {}
235
240
 
236
- %i[number_startswith subaccount alias tendlc_campaign_id tendlc_registration_status toll_free_sms_verification renewal_date renewal_date__lt renewal_date__lte renewal_date__gt renewal_date__gte].each do |param|
241
+ %i[number_startswith subaccount alias tendlc_campaign_id tendlc_registration_status toll_free_sms_verification renewal_date renewal_date__lt renewal_date__lte renewal_date__gt renewal_date__gte cnam_lookup].each do |param|
237
242
  if options.key?(param) &&
238
243
  valid_param?(param, options[param], [String, Symbol], true)
239
244
  params[param] = options[param]
@@ -324,6 +329,7 @@ module Plivo
324
329
  # @option options [String] :alias The textual name given to the number.
325
330
  # @option options [String] :app_id The application id of the application that is to be linked.
326
331
  # @option options [String] :subaccount The auth_id of the subaccount to which this number should be added. This can only be performed by a main account holder.
332
+ # @option options [String] :cnam_lookup The Cnam Lookup configuration to enable/disable Cnam Lookup
327
333
  def update(number, options = nil)
328
334
  valid_param?(:number, number, [String, Symbol], true)
329
335
  Number.new(@_client,
@@ -19,6 +19,8 @@ module Plivo
19
19
  api_id: @api_id,
20
20
  call_uuid: @call_uuid,
21
21
  conference_name: @conference_name,
22
+ monthly_recording_storage_amount: @monthly_recording_storage_amount,
23
+ recording_storage_duration: @recording_storage_duration,
22
24
  recording_duration_ms: @recording_duration_ms,
23
25
  recording_end_ms: @recording_end_ms,
24
26
  recording_format: @recording_format,
@@ -27,6 +29,8 @@ module Plivo
27
29
  recording_type: @recording_type,
28
30
  recording_url: @recording_url,
29
31
  resource_uri: @resource_uri,
32
+ rounded_recording_duration: @rounded_recording_duration,
33
+ recording_storage_rate: @recording_storage_rate,
30
34
  from_number: @from_number,
31
35
  to_number: @to_number,
32
36
  mpc_name: @mpc_name,
@@ -60,6 +64,13 @@ module Plivo
60
64
  # - add_time\__lt: lt stands for lesser than. The format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. Eg:- To get all recordings that started before 2012-03-21 11:47, use add_time\__lt=2012-03-21 11:47
61
65
  # - add_time\__gte: lte stands for lesser than or equal. The format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. Eg:- To get all recordings that started before or exactly at 2012-03-21 11:47[:30], use add_time\__lte=2012-03-21 11:47[:30]
62
66
  # - Note: The above filters can be combined to get recordings that started in a particular time range.
67
+ # @option options [Int] :recording_storage_duration - Used to filter out recordings according to the number of days they have been stored in the DB.The recording_storage_duration filter can be used in the following five forms:
68
+ # - recording_storage_duration: Takes an integer input and returns the recordings which are as old as that value.
69
+ # - recording_storage_duration\__gt: gt stands for greater than. The format expected is an integer value. Eg:- To get all recordings that are older than 100 days, use recording_storage_duration\__gt=100
70
+ # - recording_storage_duration\__gte: gte stands for greater than or equal. The format expected is an integer value. Eg:- To get all recordings that are older than or equal to 100 days old, use recording_storage_duration\__gte=100
71
+ # - recording_storage_duration\__lt: lt stands for lesser than. The format expected is an integer value. Eg:- To get all recordings that are newer than 100 days, use recording_storage_duration\__lt=100
72
+ # - recording_storage_duration\__lte: lte stands for lesser than or equal. The format expected is an integer value. Eg:- To get all recordings that are newer than or equal to 100 days old, use recording_storage_duration\__lte=100
73
+ # - Note: The above filters can be combined to get recordings that started in a particular time range.
63
74
  # @option options [Int] :limit Used to display the number of results per page. The maximum number of results that can be fetched is 20.
64
75
  # @option options [Int] :offset Denotes the number of value items by which the results should be offset. Eg:- If the result contains a 1000 values and limit is set to 10 and offset is set to 705, then values 706 through 715 are displayed in the results. This parameter is also used for pagination of the results.
65
76
  def list(options = nil)
@@ -72,10 +83,13 @@ module Plivo
72
83
  add_time__lt add_time__lte
73
84
  from_number to_number conference_uuid
74
85
  conference_name mpc_name mpc_uuid
86
+ recording_storage_duration
87
+ recording_storage_duration__gt recording_storage_duration__gte
88
+ recording_storage_duration__lt recording_storage_duration__lte
75
89
  ]
76
90
 
77
91
  params_expected.each do |param|
78
- if options.key?(param) && valid_param?(param, options[param], [String, Symbol], true)
92
+ if options.key?(param) && valid_param?(param, options[param], [String, Symbol, Integer], true)
79
93
  params[param] = options[param]
80
94
  end
81
95
  end
data/lib/plivo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plivo
2
- VERSION = "4.42.0".freeze
2
+ VERSION = "4.45.0".freeze
3
3
  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.42.0
4
+ version: 4.45.0
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: 2023-05-04 00:00:00.000000000 Z
11
+ date: 2023-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday