plivo 4.53.1 → 4.55.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/CHANGELOG.md +7 -0
- data/README.md +1 -1
- data/lib/plivo/resources/campaign.rb +2 -1
- data/lib/plivo/resources/verify_caller_id.rb +110 -0
- data/lib/plivo/resources.rb +1 -0
- data/lib/plivo/rest_client.rb +2 -0
- data/lib/plivo/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 687519bcd445f8909d8b6c66274835a0d4360255
|
|
4
|
+
data.tar.gz: 8ad5b5e0d9720a6fad71b07a6e510b6977044b23
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c7c835d0a71bac982b253c162fb0fe413cdb10a61b9346134f468fe35216adc57410679f59f2bb8c06d46e1ae6715c612f7a8a0a69dfdc45e2e8f7f7ad16c22c
|
|
7
|
+
data.tar.gz: c7e2c7d198ab2ba749e0fd419ff96ba109dc5676af7cead00694326d593bf4354407bce975661eec7f89c61d97c8daecf89977360617461d6299d8aa15b7e8c0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [4.55.0](https://github.com/plivo/plivo-ruby/tree/v4.55.0) (2023-11-20)
|
|
4
|
+
**Feature - Added New Param 'registration_status' for Campaign List**
|
|
5
|
+
- Added new query param "registration_status" for campaign list
|
|
6
|
+
|
|
7
|
+
## [4.54.0](https://github.com/plivo/plivo-ruby/tree/v4.54.0) (2023-11-17)
|
|
8
|
+
**Feature - Verify Caller Id API support**
|
|
9
|
+
- API support for verifying, updating, getting and deleting caller IDs.
|
|
3
10
|
|
|
4
11
|
## [4.53.1](https://github.com/plivo/plivo-ruby/tree/v4.53.1) (2023-11-09)
|
|
5
12
|
**Feature - Verify Service**
|
data/README.md
CHANGED
|
@@ -39,6 +39,7 @@ module Plivo
|
|
|
39
39
|
# @option options [String] :brand_id
|
|
40
40
|
# @option options [Status] :usecase
|
|
41
41
|
# @option options [String] :campaign_source
|
|
42
|
+
# @option options [String] :registration_status
|
|
42
43
|
# @option options [Status] :limit
|
|
43
44
|
# @option options [Status] :offset
|
|
44
45
|
# @return [Hash]
|
|
@@ -46,7 +47,7 @@ module Plivo
|
|
|
46
47
|
return perform_list_without_object if options.nil?
|
|
47
48
|
|
|
48
49
|
params = {}
|
|
49
|
-
%i[usecase brand_id campaign_source limit offset].each do |param|
|
|
50
|
+
%i[usecase brand_id campaign_source limit offset registration_status].each do |param|
|
|
50
51
|
if options.key?(param) && valid_param?(param, options[param],
|
|
51
52
|
[String, Integer], true)
|
|
52
53
|
params[param] = options[param]
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
module Plivo
|
|
2
|
+
module Resources
|
|
3
|
+
include Plivo::Utils
|
|
4
|
+
class Verify < Base::Resource
|
|
5
|
+
def initialize(client, options = nil)
|
|
6
|
+
@_name = 'Verify'
|
|
7
|
+
@_identifier_string = 'api_id'
|
|
8
|
+
super
|
|
9
|
+
end
|
|
10
|
+
def to_s
|
|
11
|
+
{
|
|
12
|
+
api_id: @api_id,
|
|
13
|
+
alias: @alias,
|
|
14
|
+
country: @country,
|
|
15
|
+
created_at: @created_at,
|
|
16
|
+
modified_at: @modified_at,
|
|
17
|
+
phone_number: @phone_number,
|
|
18
|
+
subaccount: @subaccount,
|
|
19
|
+
verification_uuid: @verification_uuid
|
|
20
|
+
}.to_s
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
class VerifyCallerIdInterface < Base::ResourceInterface
|
|
25
|
+
def initialize(client, resource_list_json = nil)
|
|
26
|
+
@_name = 'VerifiedCallerId'
|
|
27
|
+
@_resource_type = Verify
|
|
28
|
+
@_identifier_string = 'api_id'
|
|
29
|
+
super
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def initiate(phone_number = nil, channel = nil, alias_ = nil, subaccount = nil)
|
|
33
|
+
valid_param?(:phone_number, phone_number, [String], true)
|
|
34
|
+
valid_param?(:channel, channel, [String], false)
|
|
35
|
+
valid_param?(:alias, alias_, [String], false)
|
|
36
|
+
valid_param?(:subaccount, subaccount, [String], false)
|
|
37
|
+
|
|
38
|
+
params = {
|
|
39
|
+
phone_number: phone_number,
|
|
40
|
+
channel: channel,
|
|
41
|
+
alias: alias_,
|
|
42
|
+
subaccount: subaccount
|
|
43
|
+
}
|
|
44
|
+
perform_create(params)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def verify(verification_uuid = nil, otp = nil)
|
|
48
|
+
valid_param?(:verification_uuid, verification_uuid, [String], true)
|
|
49
|
+
valid_param?(:otp, otp, [String], true)
|
|
50
|
+
id = 'Verification/' + verification_uuid
|
|
51
|
+
params = {
|
|
52
|
+
otp: otp
|
|
53
|
+
}
|
|
54
|
+
perform_action_with_identifier(id, 'POST', params)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def update(phone_number = nil, subaccount = nil, alias_ = nil)
|
|
58
|
+
valid_param?(:phone_number, phone_number, [String], true)
|
|
59
|
+
valid_param?(:subaccount, subaccount, [String], false)
|
|
60
|
+
valid_param?(:alias, alias_, [String], false)
|
|
61
|
+
params = {
|
|
62
|
+
subaccount: subaccount,
|
|
63
|
+
alias: alias_
|
|
64
|
+
}
|
|
65
|
+
perform_action_with_identifier(phone_number, 'POST', params)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def get(phone_number = nil)
|
|
69
|
+
valid_param?(:phone_number, phone_number, [String], true)
|
|
70
|
+
perform_get(phone_number)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def list(options = nil)
|
|
74
|
+
return perform_list_without_object if options.nil?
|
|
75
|
+
valid_param?(:options, options, Hash, false)
|
|
76
|
+
|
|
77
|
+
params = {}
|
|
78
|
+
params_expected = %i[subaccount country alias]
|
|
79
|
+
|
|
80
|
+
params_expected.each do |param|
|
|
81
|
+
if options.key?(param) &&
|
|
82
|
+
valid_param?(param, options[param], [String, Symbol], false)
|
|
83
|
+
params[param] = options[param]
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
%i[offset limit].each do |param|
|
|
88
|
+
if options.key?(param) &&
|
|
89
|
+
valid_param?(param, options[param], [Integer, Integer], false)
|
|
90
|
+
params[param] = options[param]
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if options.key?(:limit) &&
|
|
95
|
+
(options[:limit] > 20 || options[:limit] <= 0)
|
|
96
|
+
raise_invalid_request('The maximum number of results that can be '\
|
|
97
|
+
"fetched is 20. limit can't be more than 20 or less than 1")
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
raise_invalid_request("Offset can't be negative") if options.key?(:offset) && options[:offset] < 0
|
|
101
|
+
|
|
102
|
+
perform_list_without_object(params)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
def delete(phone_number)
|
|
106
|
+
perform_delete(phone_number, nil)
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
data/lib/plivo/resources.rb
CHANGED
|
@@ -24,6 +24,7 @@ require_relative 'resources/regulatory_compliance'
|
|
|
24
24
|
require_relative 'resources/multipartycalls'
|
|
25
25
|
require_relative 'resources/verify_session'
|
|
26
26
|
require_relative 'resources/tollfree_verification'
|
|
27
|
+
require_relative 'resources/verify_caller_id'
|
|
27
28
|
|
|
28
29
|
module Plivo
|
|
29
30
|
module Resources
|
data/lib/plivo/rest_client.rb
CHANGED
|
@@ -20,6 +20,7 @@ module Plivo
|
|
|
20
20
|
attr_reader :compliance_document_types, :compliance_documents, :compliance_requirements, :compliance_applications
|
|
21
21
|
attr_reader :verify_session
|
|
22
22
|
attr_reader :tollfree_verifications
|
|
23
|
+
attr_reader :verify_caller_id
|
|
23
24
|
|
|
24
25
|
def initialize(auth_id = nil, auth_token = nil, proxy_options = nil, timeout = 5)
|
|
25
26
|
configure_base_uri
|
|
@@ -68,6 +69,7 @@ module Plivo
|
|
|
68
69
|
@compliance_applications = Resources::ComplianceApplicationsInterface.new(self)
|
|
69
70
|
@verify_session = Resources::SessionInterface.new(self)
|
|
70
71
|
@tollfree_verifications = Resources::TollfreeVerificationsInterface.new(self)
|
|
72
|
+
@verify_caller_id = Resources::VerifyCallerIdInterface.new(self)
|
|
71
73
|
end
|
|
72
74
|
end
|
|
73
75
|
end
|
data/lib/plivo/version.rb
CHANGED
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.
|
|
4
|
+
version: 4.55.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-11-
|
|
11
|
+
date: 2023-11-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -194,6 +194,7 @@ files:
|
|
|
194
194
|
- lib/plivo/resources/regulatory_compliance.rb
|
|
195
195
|
- lib/plivo/resources/token.rb
|
|
196
196
|
- lib/plivo/resources/tollfree_verification.rb
|
|
197
|
+
- lib/plivo/resources/verify_caller_id.rb
|
|
197
198
|
- lib/plivo/resources/verify_session.rb
|
|
198
199
|
- lib/plivo/rest_client.rb
|
|
199
200
|
- lib/plivo/template.rb
|