Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMS-6589: Log Redaction #236

Merged
merged 4 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## [4.55.2](https://github.com/plivo/plivo-ruby/tree/v4.55.2) (2024-01-29)
**Feature - Log Redaction Enhancement**
- Added log attribute in GET and List MDR response
- Change log field from bool to string in send SMS

## [4.55.1](https://github.com/plivo/plivo-ruby/tree/v4.55.1) (2024-01-08)
**Feature - Added New Param 'type' for Speak Api**
- Added new param "type" for speak api
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Plivo Ruby SDK makes it simpler to integrate communications into your Ruby a
Add this line to your application's Gemfile:

```ruby
gem 'plivo', '>= 4.55.1'
gem 'plivo', '>= 4.55.2'
```

And then execute:
Expand Down
7 changes: 4 additions & 3 deletions lib/plivo/resources/messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def to_s
carrier_fees: @carrier_fees,
conversation_id: @conversation_id,
conversation_origin: @conversation_origin,
conversation_expiration_timestamp: @conversation_expiration_timestamp
conversation_expiration_timestamp: @conversation_expiration_timestamp,
log: @log
}.to_s
end
end
Expand Down Expand Up @@ -147,7 +148,7 @@ def create(src = nil, dst = nil, text = nil, options = nil, powerpack_uuid = nil
end

if value.key?(:log) &&
valid_param?(:log, value[:log], [TrueClass, FalseClass], true)
valid_param?(:log, value[:log], String, true)
params[:log] = value[:log]
end

Expand Down Expand Up @@ -286,7 +287,7 @@ def create(src = nil, dst = nil, text = nil, options = nil, powerpack_uuid = nil
end

if options.key?(:log) &&
valid_param?(:log, options[:log], [TrueClass, FalseClass], true)
valid_param?(:log, options[:log], String, true)
params[:log] = options[:log]
end

Expand Down
2 changes: 1 addition & 1 deletion lib/plivo/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Plivo
VERSION = "4.55.1".freeze
VERSION = "4.55.2".freeze
end
10 changes: 5 additions & 5 deletions spec/resource_messages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def to_json_list(list_object)
type: 'sms',
url: 'http://url.com',
method: 'POST',
log: true
log: "true"
))))
.to eql(JSON.parse(contents))
compare_requests(uri: '/v1/Account/MAXXXXXXXXXXXXXXXXXX/Message/',
Expand All @@ -178,7 +178,7 @@ def to_json_list(list_object)
type: 'sms',
url: 'http://url.com',
method: 'POST',
log: true
log: "true"
})
end

Expand All @@ -194,7 +194,7 @@ def to_json_list(list_object)
type: 'sms',
url: 'http://url.com',
method: 'POST',
log: true
log: "true"
))))
.to eql(JSON.parse(contents))
compare_requests(uri: '/v1/Account/MAXXXXXXXXXXXXXXXXXX/Message/',
Expand All @@ -207,7 +207,7 @@ def to_json_list(list_object)
type: 'sms',
url: 'http://url.com',
method: 'POST',
log: true
log: "true"
})
end

Expand All @@ -223,7 +223,7 @@ def to_json_list(list_object)
type: 'sms',
url: 'http://url.com',
method: 'POST',
log: true
log: "true"
)
end
.to raise_error(
Expand Down
Loading