Class: Fog::Compute::Brightbox::Collaboration
Instance Method Summary
collapse
#collection_name, #resource_name
Instance Method Details
#account_id ⇒ Object
16
17
18
|
# File 'lib/fog/brightbox/models/compute/collaboration.rb', line 16
def account_id
account['id'] || account[:id]
end
|
#destroy ⇒ Object
40
41
42
43
44
45
|
# File 'lib/fog/brightbox/models/compute/collaboration.rb', line 40
def destroy
requires :identity
data = service.destroy_collaboration(identity)
merge_attributes(data)
true
end
|
#resend ⇒ Object
33
34
35
36
37
38
|
# File 'lib/fog/brightbox/models/compute/collaboration.rb', line 33
def resend
requires :identity
data = service.resend_collaboration(identity)
merge_attributes(data)
true
end
|
#save ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/fog/brightbox/models/compute/collaboration.rb', line 20
def save
raise Fog::Errors::Error.new('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
|