Sha256: 661de26ad045aadf6ba3d43b852e019c6da78cc89a6d3b890f3b9de735775115

Contents?: true

Size: 1.77 KB

Versions: 68

Compression:

Stored size: 1.77 KB

Contents

require 'fog/core/model'

module Fog
  module Compute
    class Brightbox

      class Account < Fog::Model

        identity :id
        attribute :url
        attribute :resource_type

        attribute :name
        attribute :status

        attribute :address_1
        attribute :address_2
        attribute :city
        attribute :county
        attribute :postcode
        attribute :country_code
        attribute :country_name
        attribute :vat_registration_number
        attribute :telephone_number
        attribute :verified_telephone
        attribute :verified_ip
        attribute :ram_limit
        attribute :ram_used
        attribute :cloud_ips_limit
        attribute :cloud_ips_used
        attribute :load_balancers_limit
        attribute :load_balancers_used
        attribute :library_ftp_host
        attribute :library_ftp_user
        # This is always returned as nil unless after a call to reset_ftp_password
        attribute :library_ftp_password

        # Boolean flags
        attribute :valid_credit_card
        attribute :telephone_verified

        # Times
        attribute :created_at, :type => :time
        attribute :verified_at, :type => :time

        # Links - to be replaced
        attribute :owner_id, :aliases => "owner", :squash => "id"
        attribute :clients
        attribute :images
        attribute :servers
        attribute :users
        attribute :zones

        # Resets the account's image library FTP password returning the new value
        #
        # @return [String] Newly issue FTP password
        #
        def reset_ftp_password
          requires :identity
          data = service.reset_ftp_password_account(identity)
          merge_attributes(data)
          library_ftp_password
        end

      end

    end
  end
end

Version data entries

68 entries across 68 versions & 7 rubygems

Version Path
fog-brightbox-0.1.0.dev2 lib/fog/brightbox/models/compute/account.rb
fog-brightbox-0.1.0.dev1 lib/fog/brightbox/models/compute/account.rb
fog-brightbox-0.0.2 lib/fog/brightbox/models/compute/account.rb
fog-1.21.0 providers/brightbox/lib/fog/brightbox/models/compute/account.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/brightbox/models/compute/account.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/brightbox/models/compute/account.rb
fog-brightbox-0.0.1 lib/fog/brightbox/models/compute/account.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/brightbox/models/compute/account.rb
fog-1.20.0 lib/fog/brightbox/models/compute/account.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/brightbox/models/compute/account.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/brightbox/models/compute/account.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/brightbox/models/compute/account.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/brightbox/models/compute/account.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/brightbox/models/compute/account.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/brightbox/models/compute/account.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/brightbox/models/compute/account.rb
fog-1.19.0 lib/fog/brightbox/models/compute/account.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/brightbox/models/compute/account.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/brightbox/models/compute/account.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/brightbox/models/compute/account.rb