Skip to content

Commit

Permalink
SMS-7107: Add fraud_check param support (#251)
Browse files Browse the repository at this point in the history
* SMS-7107: Add fraud_check param support

* Update date
  • Loading branch information
mohsin-plivo authored Oct 23, 2024
1 parent 54dcbc2 commit d59b0e8
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Change Log
## [4.61.2](https://github.com/plivo/plivo-ruby/tree/v4.61.2)(2024-10-23)
**Feature - FraudCheck param in Create, Get and List Session**
- Support for the `fraud_check` parameter in sms verify session request
- Added support for `fraud_check` paramter in GET and LIST veriyf session

## [4.61.1](https://github.com/plivo/plivo-ruby/tree/v4.61.1) (2024-10-10)
**Feature - Dtmf param in Create, Get and List Session**
- Support for the `dtmf` parameter in voice verify session request
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ build:

start:
docker-compose up --build --remove-orphans --detach
docker attach $(shell docker-compose ps -q rubySDK)
# Wait for the container to be running before attaching
@while [ -z "$$(docker-compose ps -q rubySDK)" ]; do \
sleep 1; \
done
docker attach $$(docker-compose ps -q rubySDK)

test:
@[ "${CONTAINER}" ] && \
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.61.1'
gem 'plivo', '>= 4.61.2'
```

And then execute:
Expand Down
6 changes: 4 additions & 2 deletions lib/plivo/resources/verify_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get(session_uuid)
perform_get(session_uuid)
end

def create(app_uuid = nil, recipient = nil,channel = nil, url = nil, method = nil, locale=nil, brand_name=nil, app_hash=nil, code_length=nil, dtmf=nil)
def create(app_uuid = nil, recipient = nil,channel = nil, url = nil, method = nil, locale=nil, brand_name=nil, app_hash=nil, code_length=nil, dtmf=nil, fraud_check=nil)
valid_param?(:app_uuid, app_uuid, [String, Symbol], false)
valid_param?(:recipient, recipient, [Integer, String, Symbol], true)
valid_param?(:channel, channel, [String, Symbol], false)
Expand All @@ -53,6 +53,7 @@ def create(app_uuid = nil, recipient = nil,channel = nil, url = nil, method = ni
valid_param?(:app_hash, app_hash, [String, Symbol], false)
valid_param?(:code_length, code_length,[Integer,Symbol], false)
valid_param?(:dtmf, dtmf,[Integer,Symbol], false)
valid_param?(:fraud_check, fraud_check, [String, Symbol], false)

params = {
app_uuid: app_uuid,
Expand All @@ -64,7 +65,8 @@ def create(app_uuid = nil, recipient = nil,channel = nil, url = nil, method = ni
brand_name: brand_name,
app_hash: app_hash,
code_length: code_length,
dtmf:dtmf
dtmf:dtmf,
fraud_check:fraud_check
}
perform_create(params)
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.61.1".freeze
VERSION = "4.61.2".freeze
end
5 changes: 4 additions & 1 deletion spec/resource_messages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def to_json(message)
carrier_fees: message.carrier_fees,
conversation_id: message.conversation_id,
conversation_origin: message.conversation_origin,
conversation_expiration_timestamp: message.conversation_expiration_timestamp
conversation_expiration_timestamp: message.conversation_expiration_timestamp,
error_message: message.error_message,
message_sent_time: message.message_sent_time,
message_updated_time: message.message_updated_time
}.to_json
end

Expand Down
8 changes: 7 additions & 1 deletion spec/resource_verify_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,13 @@ def to_json_list(list_object)
recipient: '1234567890',
channel: nil,
url: nil,
method: nil
method: nil,
locale:nil,
brand_name:nil,
app_hash:nil,
code_length:nil,
dtmf:nil,
fraud_check:nil
})
end

Expand Down

0 comments on commit d59b0e8

Please sign in to comment.