Sha256: fd7c448e6ae304b09915d1564391f4965e1bc9025df320aec872e931eb950b3f

Contents?: true

Size: 847 Bytes

Versions: 10

Compression:

Stored size: 847 Bytes

Contents

require "fog/brightbox/model"

module Fog
  module Compute
    class Brightbox
      class User < Fog::Brightbox::Model

        identity :id
        attribute :resource_type
        attribute :url

        attribute :name
        attribute :email_address
        attribute :ssh_key

        # Boolean flags
        attribute :email_verified
        attribute :messaging_pref

        # Links - to be replaced
        attribute :account_id, :aliases => "default_account", :squash => "id"
        attribute :accounts

        def save
          requires :identity

          options = {
            :email_address => email_address,
            :ssh_key => ssh_key,
            :name => name
          }

          data = service.update_user(identity, options)
          merge_attributes(data)
          true
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fog-brightbox-0.6.1 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-0.6.0 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-0.5.1 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-0.5.0 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-0.4.1 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-0.4.0 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-0.3.0 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-0.2.0 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-0.1.1 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-0.1.0 lib/fog/brightbox/models/compute/user.rb