Skip to content

Commit

Permalink
Merge pull request #139 from plivo/number-priority
Browse files Browse the repository at this point in the history
Add field number_priority to powerpack api
  • Loading branch information
nixonsam committed Nov 17, 2020
2 parents 24bdedc + 6c6125c commit 3015caa
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
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

0 comments on commit 3015caa

Please sign in to comment.