plivo 4.43.0 → 4.45.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd620cb568e9aa01c45cbd076312392590407957
4
- data.tar.gz: 522faeb8afa9ee5a898258055cae038c6eb01dcd
3
+ metadata.gz: b33e83271ea1b3c2e5c41896af84fb49c3c07bee
4
+ data.tar.gz: 97ba20e8311a213e6db92cc1a7d29a88b62254a1
5
5
  SHA512:
6
- metadata.gz: 8425ccce22185e160996a10571905c5ce6f9cd1a483b6db72c4ddd2054e7d0de60e10a4bd6ac270deace0baf480054001b084b74b06b1a6ba471e8da6d4cd90b
7
- data.tar.gz: 37cc88e459b987be4b26aa2131f62671c76d74c4c3073f47c7ed4a231dd5e00d82b72bf5c1ec2806810645d39419002983183a1a3d160a52e08472bd9d2bce22
6
+ metadata.gz: 287c22be5c57c14d03b932d3387f95872ef748809a04ba88419f38dc0f6df06d47a7e43327484da59717b1d282a46a8f4661cc4e2defdf560a76e7ca4b8f6a49
7
+ data.tar.gz: 1b49da62504fd9f7dd178db676d3402be0bfdd72aa5f0d1a904e5b560697bdeca452e052b06030403880654edc46d0ba269de69a0d9ef7fd748a1aefcd313950
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
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
+
3
15
  ## [4.43.0](https://github.com/plivo/plivo-ruby/tree/v4.43.0) (2023-05-29)
4
16
  **Feature - Recording API changes**
5
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)
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.43.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,
data/lib/plivo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plivo
2
- VERSION = "4.43.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.43.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-31 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