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

Add field number_priority to powerpack api #139

Merged
merged 3 commits into from
Nov 17, 2020
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log

## [4.15.0](https://github.com/plivo/plivo-ruby/releases/tag/v4.15.0) (2020-11-17)
- Add number_priority support for Powerpack API.

## [4.14.0](https://github.com/plivo/plivo-ruby/releases/tag/v4.14.0) (2020-10-30)
- Change lookup API endpoint and response.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,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.14.0'
gem 'plivo', '>= 4.15.0'
```

And then execute:
Expand Down
12 changes: 11 additions & 1 deletion lib/plivo/resources/powerpacks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def update(options = nil)
if options.key?(:name)
params[:name] = options[:name]
end
if options.key?(:number_priority)
params[:number_priority] = options[:number_priority]
end
perform_action_apiresponse('', 'POST', params)
end

Expand Down Expand Up @@ -326,7 +329,8 @@ def to_s
local_connect: @local_connect,
uuid: @uuid,
number_pool:@number_pool,
created_on:@created_on
created_on:@created_on,
number_priority:@number_priority
}.to_s
end
end
Expand Down Expand Up @@ -662,6 +666,12 @@ def create(name, options = nil)
valid_param?(:local_connect, options[:local_connect], [TrueClass, FalseClass], true)
params[:local_connect] = options[:local_connect]
end

if options.key?(:number_priority) &&
valid_param?(:number_priority, options[:number_priority], Array, true)
params[:number_priority] = options[:number_priority]
end

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.14.0".freeze
VERSION = "4.15.0".freeze
end