Class: Fog::Compute::Brightbox::Collaboration
- Defined in:
- lib/fog/brightbox/models/compute/collaboration.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Fog::Core::DeprecatedConnectionAccessors
#connection, #connection=, #prepare_service_value
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Model
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 = { :role => role, :email => email }.delete_if { |k, v| v.nil? || v == "" } data = service.create_collaboration() merge_attributes(data) true end |