Sha256: c2f5e1be16778434262b913854968f7b4f7b26f9c3c1600edef6dbeb647126cc
Contents?: true
Size: 1.3 KB
Versions: 10
Compression:
Stored size: 1.3 KB
Contents
module Fog module Brightbox class Compute class Collaboration < Fog::Brightbox::Model identity :id attribute :resource_type attribute :url attribute :status attribute :email attribute :role attribute :role_label # Timestamps attribute :created_at, type: :time attribute :started_at, type: :time attribute :finished_at, type: :time # Links 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 = service.create_collaboration(options) merge_attributes(data) true end def resend requires :identity data = service.resend_collaboration(identity) merge_attributes(data) true end def destroy requires :identity data = service.delete_collaboration(identity) merge_attributes(data) true end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems