Sha256: 80eda903c298f6e75e0d3c8dd46be7b975319d09b8cc5a14f7279c19777fa5ea

Contents?: true

Size: 911 Bytes

Versions: 10

Compression:

Stored size: 911 Bytes

Contents

module Fog
  module Brightbox
    class Compute
      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, type: :boolean

        # Timestamps
        attribute :created_at, type: :time

        # Links
        attribute :account_id, aliases: "default_account", squash: "id"
        attribute :accounts

        # Deprecated
        attribute :messaging_pref, type: :boolean

        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-1.10.0 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-1.9.1 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-1.9.0 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-1.8.2 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-1.8.1 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-1.8.0 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-1.7.3 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-1.7.2 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-1.7.1 lib/fog/brightbox/models/compute/user.rb
fog-brightbox-1.7.0 lib/fog/brightbox/models/compute/user.rb