plivo 4.63.0 → 4.63.1
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 +6 -0
- data/Jenkinsfile +1 -1
- data/lib/plivo/resources/phone_number_compliance.rb +42 -19
- data/lib/plivo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b904e37c728e7361a0e4ad43f9302fc39f09dea88d3ce0c7c7c763b29282f5f
|
|
4
|
+
data.tar.gz: 3df71c5a41b9d3396398046c926cb324013aa8a7046976b6c44b6f4c9bfd1431
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8878f8bf2f322bbb1640ca403c917864970c9a014675a84a2492f652a855697ab98da486c7b85e70886f075b1a604e143decf8f67e04eb356db42a85ed9b1054
|
|
7
|
+
data.tar.gz: 42f4fe995b8c9d4a054cca33330bdc214e4ba4e2c5b2e91cf4a40e990c8cd50aeb46c3a9ad07201b8125f637d8306e44cab570a05682c5bf58f62294c89f25d2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [4.63.1](https://github.com/plivo/plivo-ruby/tree/v4.63.1) (2026-04-16)
|
|
4
|
+
**Bug Fix - PhoneNumber Compliance API response mapping**
|
|
5
|
+
- Fixed GET single compliance to unwrap `compliance` wrapper key from API response, making all fields directly accessible on the resource object
|
|
6
|
+
- Fixed List response to remap `compliances` key to `objects` for base class compatibility, returning proper `PhoneNumberCompliance` resource instances
|
|
7
|
+
- Fixed update() to unwrap `compliance` wrapper key from API response, returning the compliance object directly
|
|
8
|
+
|
|
3
9
|
## [4.63.0](https://github.com/plivo/plivo-ruby/tree/v4.63.0) (2026-04-08)
|
|
4
10
|
**Feature - PhoneNumber Compliance API support**
|
|
5
11
|
- Added `phone_number_compliance_requirements` resource for discovering compliance requirements by country, number type, and user type
|
data/Jenkinsfile
CHANGED
|
@@ -65,7 +65,13 @@ module Plivo
|
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
response_json = @_client.send_request(@_resource_uri, 'PATCH', params, nil, true, is_voice_request: false)
|
|
68
|
-
|
|
68
|
+
|
|
69
|
+
# Unwrap compliance wrapper if present (API returns {api_id, message, compliance: {...}})
|
|
70
|
+
compliance_data = response_json['compliance'] || response_json
|
|
71
|
+
compliance_data['api_id'] = response_json['api_id'] if response_json['api_id']
|
|
72
|
+
# Include message from response so callers can access update status via resp.message
|
|
73
|
+
compliance_data['message'] = response_json['message'] if response_json['message']
|
|
74
|
+
parse_and_set(compliance_data)
|
|
69
75
|
self
|
|
70
76
|
end
|
|
71
77
|
|
|
@@ -134,7 +140,11 @@ module Plivo
|
|
|
134
140
|
params[:expand] = options[:expand]
|
|
135
141
|
end
|
|
136
142
|
end
|
|
137
|
-
|
|
143
|
+
response_json = @_client.send_request(@_resource_uri + compliance_id.to_s + '/', 'GET', params, nil, false, is_voice_request: false)
|
|
144
|
+
# Extract the compliance wrapper returned by the API
|
|
145
|
+
compliance_data = response_json['compliance'] || response_json
|
|
146
|
+
compliance_data['api_id'] = response_json['api_id'] if response_json['api_id']
|
|
147
|
+
@_resource_type.new(@_client, resource_json: compliance_data)
|
|
138
148
|
end
|
|
139
149
|
|
|
140
150
|
##
|
|
@@ -150,32 +160,45 @@ module Plivo
|
|
|
150
160
|
# @option options [String] :expand
|
|
151
161
|
# @return [Hash]
|
|
152
162
|
def list(options = nil)
|
|
153
|
-
return perform_list if options.nil?
|
|
154
|
-
valid_param?(:options, options, Hash, true)
|
|
155
|
-
|
|
156
163
|
params = {}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
164
|
+
if options
|
|
165
|
+
valid_param?(:options, options, Hash, true)
|
|
166
|
+
|
|
167
|
+
%i[status country_iso number_type user_type alias expand].each do |param|
|
|
168
|
+
if options.key?(param) &&
|
|
169
|
+
valid_param?(param, options[param], [String, Symbol], false)
|
|
170
|
+
params[param] = options[param]
|
|
171
|
+
end
|
|
161
172
|
end
|
|
162
|
-
end
|
|
163
173
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
174
|
+
%i[offset limit].each do |param|
|
|
175
|
+
if options.key?(param) && valid_param?(param, options[param],
|
|
176
|
+
[Integer], false)
|
|
177
|
+
params[param] = options[param]
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
raise_invalid_request("Offset can't be negative") if options.key?(:offset) && options[:offset] < 0
|
|
182
|
+
|
|
183
|
+
if options.key?(:limit) && (options[:limit] > 20 || options[:limit] <= 0)
|
|
184
|
+
raise_invalid_request('The maximum number of results that can be '\
|
|
185
|
+
"fetched is 20. limit can't be more than 20 or less than 1")
|
|
168
186
|
end
|
|
169
187
|
end
|
|
170
188
|
|
|
171
|
-
|
|
189
|
+
response_json = @_client.send_request(@_resource_uri, 'GET', params, nil, false, is_voice_request: false)
|
|
172
190
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
191
|
+
# Remap 'compliances' to 'objects' for base class compatibility
|
|
192
|
+
if response_json.key?('compliances')
|
|
193
|
+
response_json['objects'] = response_json.delete('compliances')
|
|
176
194
|
end
|
|
177
195
|
|
|
178
|
-
|
|
196
|
+
parse_and_set(response_json)
|
|
197
|
+
{
|
|
198
|
+
api_id: @api_id,
|
|
199
|
+
meta: @_meta,
|
|
200
|
+
objects: @_resource_list
|
|
201
|
+
}
|
|
179
202
|
end
|
|
180
203
|
|
|
181
204
|
##
|
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.63.
|
|
4
|
+
version: 4.63.1
|
|
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: 2026-04-
|
|
11
|
+
date: 2026-04-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|