plivo 4.53.0 → 4.54.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 -4
- data/README.md +1 -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: c4227810a52b4ad11bb906d274417891b0c66b88
|
|
4
|
+
data.tar.gz: be57e3f596d9a31b373c017c0e120ea835e42ddb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f1fe674158b03ff9d113fc7f0cf04a23f541d262172c98bb88273ca34f69c0807663c3500d5cccaf93d40bec83861f078924281f301b0a068ac42491014881e
|
|
7
|
+
data.tar.gz: 831f8d9e725de4beab911ac4cbca3aa5f16262ae31aa0bccb2d087307b18088915a94ffe2cad41d9c99e93e676447b406c46a69f648b2f855c8c6281424f8a14
|
data/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [4.54.0](https://github.com/plivo/plivo-ruby/tree/v4.54.0) (2023-11-17)
|
|
4
|
+
**Feature - Verify Caller Id API support**
|
|
5
|
+
- API support for verifying, updating, getting and deleting caller IDs.
|
|
3
6
|
|
|
4
|
-
## [4.53.
|
|
7
|
+
## [4.53.1](https://github.com/plivo/plivo-ruby/tree/v4.53.1) (2023-11-09)
|
|
5
8
|
**Feature - Verify Service**
|
|
6
|
-
-Added Support for Verify Service Public API
|
|
7
|
-
-Create Session API
|
|
8
|
-
-Get Session API
|
|
9
|
+
-Added Support for Verify Service Public API
|
|
10
|
+
-Create Session API : To create a verify session. Allowed params recipient, method, channel, callback_url, app_uuid
|
|
11
|
+
-Get Session API: To retrieve a particular session
|
|
9
12
|
-List Sessions : To retrieve all the sessions
|
|
10
13
|
-Validate Session : To validate OTP for a particular session
|
|
11
14
|
|
data/README.md
CHANGED
|
@@ -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.54.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-22 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
|