File tree Expand file tree Collapse file tree 5 files changed +44
-2
lines changed
Expand file tree Collapse file tree 5 files changed +44
-2
lines changed Original file line number Diff line number Diff line change @@ -15,4 +15,5 @@ spec/reports
1515test /tmp
1616test /version_tmp
1717tmp
18+ vendor
1819/docker /ruby- * /
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ module Api
55 class Account < Resource
66 belongs_to :stack
77
8+ has_many :ai_tokens
89 has_many :apps
910 has_many :backups
1011 has_many :certificates
Original file line number Diff line number Diff line change 1+ module Aptible
2+ module Api
3+ class AiToken < Resource
4+ belongs_to :account
5+
6+ field :id
7+ field :name
8+ field :created_at
9+ field :updated_at
10+ field :expires_at
11+ field :last_used_at
12+ field :revoked_at
13+ field :gateway_url
14+ # User (on whose behalf) details
15+ field :created_by_user_id
16+ field :created_by_user_name
17+ field :created_by_user_email
18+ # Actor (who performed) details
19+ field :created_by_actor_id
20+ field :created_by_actor_name
21+ field :created_by_actor_email
22+ # Revoked by user details
23+ field :revoked_by_user_id
24+ field :revoked_by_user_name
25+ field :revoked_by_user_email
26+ # Revoked by actor details
27+ field :revoked_by_actor_id
28+ field :revoked_by_actor_name
29+ field :revoked_by_actor_email
30+
31+ # Note: The 'token' field from API response is accessible via
32+ # attributes['token'] to avoid conflict with aptible-resource's
33+ # internal token handling (used for auth bearer token)
34+ def api_key
35+ attributes [ 'token' ]
36+ end
37+ end
38+ end
39+ end
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ def root_url
1515end
1616
1717require 'aptible/api/account'
18+ require 'aptible/api/ai_token'
1819require 'aptible/api/ami'
1920require 'aptible/api/ami_release'
2021require 'aptible/api/app'
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ class Setting < Resource
44 belongs_to :resource
55
66 field :id
7- field :keys
8- field :sensitive_keys
7+ field :settings
8+ field :sensitive_settings
99 field :created_at , type : Time
1010 end
1111 end
You can’t perform that action at this time.
0 commit comments