1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/brightbox/requests/compute/update_scoped_account.rb
Paul Thornthwaite 1272fc1b1b [Brightbox] Deprecates old account update request
This moves #update_account in line with the other update requests since
we are moving towards management of multiple accounts.
2012-11-02 19:20:59 +00:00

37 lines
1.2 KiB
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module Fog
module Compute
class Brightbox
class Real
# Requests an update to the currently scoped account
#
# === Parameters:
#
# <tt>options</tt>:: Hash of options for update
#
# === Options:
#
# <tt>name</tt>:: Account name
# <tt>address_1</tt>:: First line of address
# <tt>address_2</tt>:: Second line of address
# <tt>city</tt>:: City part of address
# <tt>county</tt>:: County part of address
# <tt>postcode</tt>:: Postal code
# <tt>country_code</tt>:: ISO 3166-1 two letter code (example: +GB+)
# <tt>vat_registration_number</tt>:: Valid EU VAT Number or +nil+
# <tt>telephone_number</tt>:: Valid International telephone number in E.164 format prefixed with +
#
# === Returns:
#
# <tt>Hash</tt>:: The JSON response parsed to a Hash
# <tt>nil</tt>:: If no options were passed to update
#
def update_scoped_account(options)
return nil if options.empty? || options.nil?
request("put", "/1.0/account", [200], options)
end
end
end
end
end