onsip 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onsip/models/user.rb +22 -1
- data/lib/onsip/models/user_address.rb +17 -1
- data/lib/onsip/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12d9fc8dc9a886ee239ec320aa8c27adea4697a5
|
4
|
+
data.tar.gz: 08ecd59f82a4ad20f350535bd8da44775158b92b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cda2045fc2b2d029fecd28248b7f28c46fec22c90eba6bf5887faa40e81018a9d8d79f99c9714d37db90562ea535de9cb0ceb1f922c831416ee34994a819e44
|
7
|
+
data.tar.gz: 0d057b432720b144eb15f2ba11cb7c8de229debe0a3cc8f72d150f4c737db6b94372bac7abeccbaff6625ea5eb94550d9c4054408613e7fda277c6e345655e85
|
data/lib/onsip/models/user.rb
CHANGED
@@ -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
|
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
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.
|
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
|
+
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.
|
313
|
+
rubygems_version: 2.2.2
|
314
314
|
signing_key:
|
315
315
|
specification_version: 4
|
316
316
|
summary: OnSIP ruby client.
|