2010-11-08 07:21:31 -05:00
|
|
|
require 'fog/core/model'
|
|
|
|
|
|
|
|
module Fog
|
2011-06-16 19:28:54 -04:00
|
|
|
module Compute
|
|
|
|
class Brightbox
|
2010-11-08 07:21:31 -05:00
|
|
|
|
|
|
|
class Account < Fog::Model
|
|
|
|
|
|
|
|
identity :id
|
|
|
|
attribute :url
|
2011-08-22 12:41:18 -04:00
|
|
|
attribute :resource_type
|
|
|
|
|
2010-11-08 07:21:31 -05:00
|
|
|
attribute :name
|
|
|
|
attribute :status
|
2011-08-22 12:41:18 -04:00
|
|
|
|
2010-11-08 07:21:31 -05:00
|
|
|
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
|
2011-08-18 08:13:25 -04:00
|
|
|
attribute :verified_telephone
|
|
|
|
attribute :verified_ip
|
2010-11-08 07:21:31 -05:00
|
|
|
attribute :ram_limit
|
|
|
|
attribute :ram_used
|
2011-08-16 14:04:29 -04:00
|
|
|
attribute :cloud_ips_limit
|
2011-08-18 08:13:25 -04:00
|
|
|
attribute :cloud_ips_used
|
|
|
|
attribute :load_balancers_limit
|
|
|
|
attribute :load_balancers_used
|
2010-11-08 07:21:31 -05:00
|
|
|
attribute :library_ftp_host
|
|
|
|
attribute :library_ftp_user
|
|
|
|
# This is always returned as null/nil unless performing a reset_ftp_password request
|
|
|
|
attribute :library_ftp_password
|
|
|
|
|
2011-08-22 12:41:18 -04:00
|
|
|
# Boolean flags
|
|
|
|
attribute :valid_credit_card
|
|
|
|
attribute :telephone_verified
|
|
|
|
|
|
|
|
# Times
|
2011-08-26 11:00:24 -04:00
|
|
|
attribute :created_at, :type => :time
|
|
|
|
attribute :verified_at, :type => :time
|
2011-08-22 12:41:18 -04:00
|
|
|
|
|
|
|
# Links - to be replaced
|
2010-11-08 07:21:31 -05:00
|
|
|
attribute :owner_id, :aliases => "owner", :squash => "id"
|
|
|
|
attribute :clients
|
|
|
|
attribute :images
|
|
|
|
attribute :servers
|
|
|
|
attribute :users
|
|
|
|
attribute :zones
|
|
|
|
|
|
|
|
def reset_ftp_password
|
|
|
|
requires :identity
|
2011-10-13 05:08:06 -04:00
|
|
|
connection.reset_ftp_password_account["library_ftp_password"]
|
2010-11-08 07:21:31 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|