Class: Fog::Brightbox::Compute::Collaboration
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::Brightbox::Compute::Collaboration
show all
- Defined in:
- lib/fog/brightbox/models/compute/collaboration.rb
Instance Method Summary
collapse
#collection_name, #resource_name
Instance Method Details
#account_id ⇒ Object
25
26
27
|
# File 'lib/fog/brightbox/models/compute/collaboration.rb', line 25
def account_id
account["id"] || account[:id]
end
|
#destroy ⇒ Object
49
50
51
52
53
54
|
# File 'lib/fog/brightbox/models/compute/collaboration.rb', line 49
def destroy
requires :identity
data = service.delete_collaboration(identity)
merge_attributes(data)
true
end
|
#resend ⇒ Object
42
43
44
45
46
47
|
# File 'lib/fog/brightbox/models/compute/collaboration.rb', line 42
def resend
requires :identity
data = service.resend_collaboration(identity)
merge_attributes(data)
true
end
|
#save ⇒ Object
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/fog/brightbox/models/compute/collaboration.rb', line 29
def save
raise Fog::Errors::Error, "Resaving an existing object may create a duplicate" if identity
options = {
role: role,
email: email
}.delete_if { |_k, v| v.nil? || v == "" }
data = service.create_collaboration(options)
merge_attributes(data)
true
end
|