plivo 4.63.0 → 4.63.2

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
  SHA256:
3
- metadata.gz: b7feb166ac65a790e3e4a2f867a5bc0a20b45b821542eb42c7554f23bb646a1e
4
- data.tar.gz: 5441a2c40447077ea816bfd3cb0ad759d4f78524e24a99bd663f16d028a9dd7b
3
+ metadata.gz: 53d2a335b1789eb8331f8aab78e2d84b40e0efe6d03d73f8588a36feae7ff90c
4
+ data.tar.gz: 59322ce534f480fd48ae3d3056f1c1349982a27c101818f26ace681961f32564
5
5
  SHA512:
6
- metadata.gz: 3b16eb173bdde01de8ad84060be549bb4c1d0b017bdf7b9e891e32bfa6d85977f4e8289e9b6284fb771d4f47ff9eb7437a9e8b86724890a2f8e5de4cbe30d5a6
7
- data.tar.gz: 52a2ba4dffbdd811c35d2025035dae287c52e6c3d189fced80bebf72bdf4183204fa666361a50f8004df2403e20fe3857321471bc673f5492f1f69cf2fb3fe64
6
+ metadata.gz: 16d1cd343dbb9c7dc3009a41ac5d1068129b6178deb77174e2a18bf34d8a8683330c9f8b4f92d7260a5b12d90d6c7e2edca9e2bbba5e986fa9480678cce524f7
7
+ data.tar.gz: '09295b7f0a2b821f1d72afd2e36421da7e4da19a68931c768ac20f662892b5a00f47bb278baab42942cd7db709f9d004625128346cec94426800a2541a9e8403'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Change Log
2
2
 
3
+ ## [4.63.2](https://github.com/plivo/plivo-ruby/tree/v4.63.2) (2026-05-26)
4
+ **Feature - Profile API DBA field support**
5
+ - Added Doing Business As (DBA) field support to Profile API
6
+
7
+ **Feature - Expose sub_account_name on Number resource**
8
+ - Added `sub_account_name` to `Number#to_s` output, surfacing the subaccount's name alongside the existing `sub_account` (auth_id) on rented number listing and get APIs
9
+
10
+ ## [4.63.1](https://github.com/plivo/plivo-ruby/tree/v4.63.1) (2026-04-16)
11
+ **Bug Fix - PhoneNumber Compliance API response mapping**
12
+ - Fixed GET single compliance to unwrap `compliance` wrapper key from API response, making all fields directly accessible on the resource object
13
+ - Fixed List response to remap `compliances` key to `objects` for base class compatibility, returning proper `PhoneNumberCompliance` resource instances
14
+ - Fixed update() to unwrap `compliance` wrapper key from API response, returning the compliance object directly
15
+
3
16
  ## [4.63.0](https://github.com/plivo/plivo-ruby/tree/v4.63.0) (2026-04-08)
4
17
  **Feature - PhoneNumber Compliance API support**
5
18
  - Added `phone_number_compliance_requirements` resource for discovering compliance requirements by country, number type, and user type
data/Jenkinsfile CHANGED
@@ -3,5 +3,5 @@
3
3
  @Library('plivo_standard_libs@sdks') _
4
4
 
5
5
  sdksPipeline ([
6
- buildContainer: 'plivo/jenkins-ci/plivo-rubysdk:ruby-fix'
6
+ buildContainer: 'plivo/jenkins-ci/plivo-rubysdk:master'
7
7
  ])
@@ -183,6 +183,7 @@ module Plivo
183
183
  sms_enabled: @sms_enabled,
184
184
  sms_rate: @sms_rate,
185
185
  sub_account: @sub_account,
186
+ sub_account_name: @sub_account_name,
186
187
  voice_enabled: @voice_enabled,
187
188
  voice_rate: @voice_rate,
188
189
  tendlc_campaign_id: @tendlc_campaign_id,
@@ -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
- parse_and_set(response_json)
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
- perform_get(compliance_id, params)
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
- %i[status country_iso number_type user_type alias expand].each do |param|
158
- if options.key?(param) &&
159
- valid_param?(param, options[param], [String, Symbol], false)
160
- params[param] = options[param]
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
- %i[offset limit].each do |param|
165
- if options.key?(param) && valid_param?(param, options[param],
166
- [Integer], false)
167
- params[param] = options[param]
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
- raise_invalid_request("Offset can't be negative") if options.key?(:offset) && options[:offset] < 0
189
+ response_json = @_client.send_request(@_resource_uri, 'GET', params, nil, false, is_voice_request: false)
172
190
 
173
- if options.key?(:limit) && (options[:limit] > 20 || options[:limit] <= 0)
174
- raise_invalid_request('The maximum number of results that can be '\
175
- "fetched is 20. limit can't be more than 20 or less than 1")
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
- perform_list(params)
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
  ##
@@ -83,7 +83,7 @@ module Plivo
83
83
 
84
84
  ##
85
85
  # Update a Profile
86
- # {'address': {}, 'authorized_contact': {}, 'entity_type':'', 'vertical': '', 'company_name': '', 'website':'', 'business_contact_email':''}
86
+ # {'address': {}, 'authorized_contact': {}, 'entity_type':'', 'vertical': '', 'company_name': '', 'website':'', 'business_contact_email':'', 'doing_business_as':''}
87
87
  def update(profile_uuid, options = nil)
88
88
  valid_param?(:options, options, Hash, true)
89
89
  perform_action_with_identifier(profile_uuid, "POST", options)
data/lib/plivo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plivo
2
- VERSION = "4.63.0".freeze
2
+ VERSION = "4.63.2".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.63.0
4
+ version: 4.63.2
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-15 00:00:00.000000000 Z
11
+ date: 2026-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday