accounts_client 0.1.0 → 0.2.0

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.
@@ -5,7 +5,6 @@ class PadmaAccount < LogicalModel
5
5
  set_resource_host Accounts::HOST
6
6
  set_resource_path "/v0/accounts"
7
7
 
8
- attribute :id
9
8
  attribute :name
10
9
  attribute :enabled
11
10
  attribute :timezone
@@ -43,4 +42,14 @@ class PadmaAccount < LogicalModel
43
42
  PadmaContact.paginate(:account_name => self.name)
44
43
  end
45
44
 
45
+ def json_root
46
+ :account
47
+ end
48
+
49
+ private
50
+
51
+ # Accounts-ws uses account name of identification
52
+ def id
53
+ name
54
+ end
46
55
  end
@@ -56,4 +56,10 @@ class PadmaUser < LogicalModel
56
56
  def verbose_help?
57
57
  !!self.verbose_help
58
58
  end
59
+
60
+ # Attributes will be sent to server under this key.
61
+ # json_root => { ... attributes }
62
+ def json_root
63
+ :user
64
+ end
59
65
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: accounts_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-23 00:00:00.000000000 Z
12
+ date: 2014-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties