dit3-api 0.0.5 → 0.0.6

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: a737c377c8b7f9805cd454e5a8e37055721bf863
4
- data.tar.gz: 48b773586e2d920ef7e0a21185f2143b3e4bea21
3
+ metadata.gz: 9a52523a833e0a9a52c0fa5ca0ea89dc6787db43
4
+ data.tar.gz: 2ae7182c7770da3cbcd1517e775588d12f080ca6
5
5
  SHA512:
6
- metadata.gz: fa1a71ce0c3c2df71e00e44539822c72dca9782773208f77bab303299ab9d4e52d40325f35297a594305fd1fd0cd2d7c12d91904c62105a80282c13fe7cfbd93
7
- data.tar.gz: af38d762e7875b0b3c0b6cfdc17c4eb628149f063503624929d6c11e9e8b198969f4994da937e051e06c8f0340de57673e26ba28a649c8abf86fa062e0135978
6
+ metadata.gz: ab17b22c59136f1560068a28ad987b10f9e7ebd7cc705fbdd7493548fda5f1f2ec2dda4d9df4c3e4e5619c63122a915e164ed53d7cf8f542c0cb884c1275e2e5
7
+ data.tar.gz: 6da1160663444cbfbbfd849e05ee4397828a77b6847f0a41d9becf1596fce6911e7e3ce3dc6a798fcf203c71e05cc99cb87f87645225e6f5a19e41da248292c8
@@ -0,0 +1,7 @@
1
+ module DIT3::Api::Model
2
+ class Tenant
3
+ def initialize hash
4
+ @name = hash['name']
5
+ end
6
+ end
7
+ end
@@ -1,3 +1,5 @@
1
+ require_relative '../models/tenant.rb'
2
+
1
3
  module DIT3::Api::Wrappers
2
4
  class Tenants
3
5
  def initialize client
@@ -10,7 +12,7 @@ module DIT3::Api::Wrappers
10
12
 
11
13
  def get name
12
14
  begin
13
- @client.get("/tenants/#{name}")
15
+ DIT3::Api::Model::Tenant.new(@client.get("/tenants/#{name}"))
14
16
  rescue DIT3::Api::ApiError
15
17
  nil
16
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dit3-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Maraev
@@ -33,6 +33,7 @@ files:
33
33
  - lib/dit3/api.rb
34
34
  - lib/dit3/api/api_error.rb
35
35
  - lib/dit3/api/client.rb
36
+ - lib/dit3/api/model/tenant.rb
36
37
  - lib/dit3/api/oauth_client.rb
37
38
  - lib/dit3/api/wrappers/tenants.rb
38
39
  homepage: http://rubygems.org/gems/dit3-api