onsip 0.0.7 → 0.0.8

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
2
  SHA1:
3
- metadata.gz: 57fc35eff96714f02d15367f38f3386536080d13
4
- data.tar.gz: b524128e8d42815c7cae935b558aa3e7d3bbb402
3
+ metadata.gz: 12d9fc8dc9a886ee239ec320aa8c27adea4697a5
4
+ data.tar.gz: 08ecd59f82a4ad20f350535bd8da44775158b92b
5
5
  SHA512:
6
- metadata.gz: fafc5ff4b1dc24d2519222b04632423c49f75b5c2b2f8dcfc3dd5548f0a3da9826a6874b9fc96bba0dbeeffd84b0a82b7abbd337171582f66e407ecb977e7eef
7
- data.tar.gz: 56b799d845a98808936306bf8a52ec08d0652030d9afd9ef8d0da840f55569abc6de10555d2619abbc927a787330474c1ec6c75f799e03d9b01adb61c40d5da2
6
+ metadata.gz: 8cda2045fc2b2d029fecd28248b7f28c46fec22c90eba6bf5887faa40e81018a9d8d79f99c9714d37db90562ea535de9cb0ceb1f922c831416ee34994a819e44
7
+ data.tar.gz: 0d057b432720b144eb15f2ba11cb7c8de229debe0a3cc8f72d150f4c737db6b94372bac7abeccbaff6625ea5eb94550d9c4054408613e7fda277c6e345655e85
@@ -14,6 +14,26 @@ module OnSIP
14
14
  @attributes.OrganizationId
15
15
  end
16
16
 
17
+ def status
18
+ @attributes.Status
19
+ end
20
+
21
+ def domain
22
+ @attributes.Domain
23
+ end
24
+
25
+ def username
26
+ @attributes.Username
27
+ end
28
+
29
+ def password
30
+ @attributes.Password
31
+ end
32
+
33
+ def auth_username
34
+ @attributes.AuthUsername
35
+ end
36
+
17
37
  def account
18
38
  Account.read self.account_id
19
39
  end
@@ -30,7 +50,7 @@ module OnSIP
30
50
  @organization ||= Organization.read(self.organization_id)
31
51
  end
32
52
 
33
- def addresses
53
+ def user_addresses
34
54
  UserAddress.browse({'UserId' => self.id})
35
55
  end
36
56
 
@@ -38,6 +58,7 @@ module OnSIP
38
58
  def browse(account_id)
39
59
  params = {'Action' => 'UserBrowse', 'AccountId' => account_id, 'SessionId' => OnSIP.session.id, 'Output' => 'json'}
40
60
  response = OnSIP.connection.get('/api', params, {})
61
+ yield response if block_given?
41
62
  process_browse_user_response response
42
63
  end
43
64
 
@@ -5,7 +5,23 @@ module OnSIP
5
5
  DEFAULT_CALL_TIMEOUT = 60
6
6
 
7
7
  def id
8
- @attributes.AddressId
8
+ @attributes.Address['AddressId']
9
+ end
10
+
11
+ def username
12
+ @attributes.Address['Username']
13
+ end
14
+
15
+ def domain
16
+ @attributes.Address['Domain']
17
+ end
18
+
19
+ def auth_username
20
+ @attributes.AuthUsername
21
+ end
22
+
23
+ def auth_password
24
+ @attributes.AuthPassword
9
25
  end
10
26
 
11
27
  module ClassMethods
data/lib/onsip/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module OnSIP
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onsip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Larrimore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-27 00:00:00.000000000 Z
11
+ date: 2014-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -310,7 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
310
310
  version: '0'
311
311
  requirements: []
312
312
  rubyforge_project:
313
- rubygems_version: 2.2.0
313
+ rubygems_version: 2.2.2
314
314
  signing_key:
315
315
  specification_version: 4
316
316
  summary: OnSIP ruby client.