dit3-api 0.0.10 → 0.0.11
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 +4 -4
- data/lib/dit3/api/client.rb +1 -1
- data/lib/dit3/api/model/account.rb +9 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea5e5abdb6811c9a6b7a067b4c853a2de6ef00f3
|
|
4
|
+
data.tar.gz: 6933bf411feed9df5d0b769119b6b027e2c2d905
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7825763c76254523c6b340636ab9de5ccdb4466fb200315a80b090be9fafc1294789791825983a37fb84a7a5ae5ad49c8d6ca62b60633d131a0d2aa9c3bda28
|
|
7
|
+
data.tar.gz: 9bbae10dea6cc65b46cbb00691c1ee1adf7d08e53b3a2e980b0cf6ebb6900195c0d215a9855fc5563edc763f624c6f306c4e0f13dee88e397228ee55e71a4bae
|
data/lib/dit3/api/client.rb
CHANGED
|
@@ -72,7 +72,7 @@ module DIT3::Api
|
|
|
72
72
|
private
|
|
73
73
|
|
|
74
74
|
def get_token oauth_client
|
|
75
|
-
opts = { :params => { :scope => oauth_client.normalize_scope(['platform.tenants.read', 'platform.tenants.write', 'platform.tenants.delete']) }}
|
|
75
|
+
opts = { :params => { :scope => oauth_client.normalize_scope(['platform.tenants.read', 'platform.tenants.write', 'platform.tenants.delete', 'platform.accounts.read', 'platform.accounts.write']) }}
|
|
76
76
|
response = oauth_client.client_credentials.get_token(opts)
|
|
77
77
|
if (!response.kind_of? Net::HTTPSuccess)
|
|
78
78
|
raise ApiError, "Failed to get access token: #{response.body}"
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
module DIT3::Api::Model
|
|
2
|
-
class
|
|
2
|
+
class Account
|
|
3
|
+
attr_reader :id
|
|
3
4
|
attr_reader :name
|
|
5
|
+
attr_reader :email
|
|
6
|
+
attr_reader :locale
|
|
7
|
+
attr_reader :tenant
|
|
4
8
|
|
|
5
9
|
def initialize hash
|
|
10
|
+
@id = hash['id']
|
|
6
11
|
@name = hash['name']
|
|
12
|
+
@email = hash['email']
|
|
13
|
+
@locale = hash['locale']
|
|
14
|
+
@tenant = hash['tenant']
|
|
7
15
|
end
|
|
8
16
|
end
|
|
9
17
|
end
|