kazoo-ruby-sdk 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 9ddd42a741be3478676af431df106f209a9cc20fd38c04aacdbf74c8c3ba34d1
4
- data.tar.gz: 07d7239b07498bb8c48ea2513ffb77d6dc2ed71cd7d6540b5cc2b98ef7932bf2
2
+ SHA1:
3
+ metadata.gz: 77da7e0e28fcb5a041bd7449effb48f794e0e737
4
+ data.tar.gz: 941d7f3f5fa35e57295b00bf32727fe28f8f9f8c
5
5
  SHA512:
6
- metadata.gz: 6bd8d8278371a48769bc374d79039b3bfb87a5b6daf9993ca89bec5b49f80766083d5a5a2bd81ce66386a1eb05e94b35d2ccc21030236068d930be51b448212d
7
- data.tar.gz: 2297d0d4963346e639d77440434776a6c0fa57dce936f7d7dc6a052c3eb7547da6680639e34a4146bc521ec099f8a6e30532d202ea8bd2be2fad5abfe657d0fb
6
+ metadata.gz: 5dd6922b45564b1b2cedf91ef8a0e02c1308e66b84096a300be7a41f9c423e2c1bdd8178bc00d4d8df1879c8bc97894ed720a153469bcb9bd92947f5784bd8a7
7
+ data.tar.gz: e445b0a3ae161b43fc19128c3907cb356f54ccc53095517a170bc0905f891b6144baa7d537585296f9833773b55a568ec3914af58dffbe790c0117775a0210ed
@@ -5,9 +5,9 @@ module KazooRubySdk
5
5
  # @param phone_number [String] the phone number
6
6
  # @param data [Hash] number's data. see https://github.com/2600hz/kazoo/blob/master/applications/crossbar/doc/phone_numbers.md#schema
7
7
  # @return [Hashie::Mash] response body
8
- def create(phone_number, data = {})
8
+ def create(phone_number, custom_account_id = nil, data = {})
9
9
  pipe.put do |request|
10
- request.url "accounts/#{account_id}/phone_numbers/#{phone_number}"
10
+ request.url "accounts/#{custom_account_id || account_id}/phone_numbers/#{phone_number}"
11
11
  request.headers['X-Auth-Token'] = auth_token
12
12
  request.body = { data: data }
13
13
  end.body
@@ -16,9 +16,9 @@ module KazooRubySdk
16
16
  # Creates list of phone numbers in kazoo for specific account
17
17
  # @param phone_number [Array] list of phone numbers
18
18
  # @return [Hashie::Mash] response body
19
- def butch_create(phone_numbers)
19
+ def butch_create(phone_numbers, custom_account_id = nil)
20
20
  pipe.put do |request|
21
- request.url "accounts/#{account_id}/phone_numbers/collection"
21
+ request.url "accounts/#{custom_account_id || account_id}/phone_numbers/collection"
22
22
  request.headers['X-Auth-Token'] = auth_token
23
23
  request.body = { data: {numbers: phone_numbers} }
24
24
  end.body
@@ -28,9 +28,9 @@ module KazooRubySdk
28
28
  # Delete a specific phone number
29
29
  # @param phone_number [Array] the phone number
30
30
  # @return [Hashie::Mash] response body
31
- def destroy(phone_number)
31
+ def destroy(phone_number, custom_account_id = nil)
32
32
  pipe.delete do |request|
33
- request.url "accounts/#{account_id}/phone_numbers/#{phone_number}"
33
+ request.url "accounts/#{custom_account_id || account_id}/phone_numbers/#{phone_number}"
34
34
  request.headers['X-Auth-Token'] = auth_token
35
35
  end.body
36
36
  end
@@ -1,3 +1,3 @@
1
1
  module KazooRubySdk
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kazoo-ruby-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksey Pohodnya
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-15 00:00:00.000000000 Z
11
+ date: 2017-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  requirements: []
157
157
  rubyforge_project:
158
- rubygems_version: 2.7.1
158
+ rubygems_version: 2.6.14
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: SDK for Kazoo API