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

extending message object filter option #203

Merged
merged 3 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all 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,4 +1,8 @@
# Change Log
## [4.37.0](https://github.com/plivo/plivo-ruby/tree/v4.37.0) (2023-02-23)
**Feature - Enhance MDR filtering capabilities **
- Added new fields on MDR object response


## [4.36.0](https://github.com/plivo/plivo-ruby/tree/v4.36.0) (2022-01-25)
**Adding new attribute - 'requester_ip' in Get Message and List Mssage APIs**
Expand All @@ -8,6 +12,7 @@
**Adding new attribute - 'message_expiry' in Send Message API**
- Added new attribute - message_expiry in Send Message API


## [4.34.0](https://github.com/plivo/plivo-ruby/tree/v4.34.0) (2022-12-16)
**10DLC: Update Campaign API**
- Added Update Campaign 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.36.0'
gem 'plivo', '>= 4.37.0'
```

And then execute:
Expand Down
8 changes: 7 additions & 1 deletion lib/plivo/resources/messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ def to_s
total_rate: @total_rate,
powerpack_id: @powerpack_id,
units: @units,
tendlc_campaign_id: @tendlc_campaign_id,
destination_country_iso2: @destination_country_iso2,
tendlc_registration_status: @tendlc_registration_status
requester_ip: @requester_ip
}.to_s
end
Expand Down Expand Up @@ -256,14 +259,17 @@ def create(src = nil, dst = nil, text = nil, options = nil, powerpack_uuid = nil
# @option options[List]: media_urls Minimum one media url should be present in Media urls list to send mms. Maximum allowd 10 media urls inside the list (e.g, media_urls : ['https//example.com/test.jpg', 'https://example.com/abcd.gif'])
# @option options[List]: media_ids Minimum one media ids should be present in Media ids list to send mms. Maximum allowd 10 media ids inside the list (e.g, media_ids : ['1fs211ba-355b-11ea-bbc9-02121c1190q7'])
# @option options [String] :powerpack_id Filter the results by powerpack id
# @option options [string]: tendlc_campaign_id - exact tendlc campaign id search
# @option options [string]:destination_country_iso2 - valid 2 character country_iso2
# @option options [string] : tendlc_registration_status - registered or unregistered enum allowed
def list(options = nil)
return perform_list if options.nil?
valid_param?(:options, options, Hash, true)

params = {}
params_expected = %i[
subaccount message_time message_time__gt message_time__gte
message_time__lt message_time__lte error_code powerpack_id
message_time__lt message_time__lte error_code powerpack_id tendlc_campaign_id tendlc_registration_status destination_country_iso2
]
params_expected.each do |param|
if options.key?(param) &&
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.36.0".freeze
VERSION = "4.37.0".freeze
end