Sha256: c35f8be405d3d01f828a89c705f402c151179a5833479a89c322abf2f2824a83
Contents?: true
Size: 925 Bytes
Versions: 8
Compression:
Stored size: 925 Bytes
Contents
require 'fog/core/model' module Fog module Compute class Brightbox class Collaboration < Fog::Model identity :id attribute :status attribute :email attribute :role attribute :role_label attribute :account attribute :user attribute :inviter def account_id account['id'] || account[:id] end 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 = connection.create_collaboration(options) merge_attributes(data) true end def destroy requires :identity connection.destroy_collaboration(identity) true end end end end end
Version data entries
8 entries across 8 versions & 3 rubygems