Class: Fog::Brightbox::Compute::ApiClient
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::Brightbox::Compute::ApiClient
show all
- Defined in:
- lib/fog/brightbox/models/compute/api_client.rb
Instance Method Summary
collapse
#collection_name, #resource_name
Instance Method Details
#destroy ⇒ Object
33
34
35
36
37
|
# File 'lib/fog/brightbox/models/compute/api_client.rb', line 33
def destroy
requires :identity
service.delete_api_client(identity)
true
end
|
#reset_secret ⇒ Object
39
40
41
42
43
|
# File 'lib/fog/brightbox/models/compute/api_client.rb', line 39
def reset_secret
requires :identity
service.reset_secret_api_client(identity)
true
end
|
#save ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/fog/brightbox/models/compute/api_client.rb', line 21
def save
raise Fog::Errors::Error, "Resaving an existing object may create a duplicate" if persisted?
options = {
name: name,
description: description,
permissions_group: permissions_group
}.delete_if { |_k, v| v.nil? || v == "" }
data = service.create_api_client(options)
merge_attributes(data)
true
end
|