All URIs are relative to https://api.vultr.com/v2
Method | HTTP request | Description |
---|---|---|
get_account | GET /account | Get Account Info |
get_account
Get Account Info
Get your Vultr account, permission, and billing information.
require 'time'
require 'vultr_ruby'
# setup authorization
VultrRuby.configure do |config|
# Configure Bearer authorization: API Key
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = VultrRuby::AccountApi.new
begin
# Get Account Info
result = api_instance.get_account
p result
rescue VultrRuby::ApiError => e
puts "Error when calling AccountApi->get_account: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_account_with_http_info
begin
# Get Account Info
data, status_code, headers = api_instance.get_account_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <GetAccount200Response>
rescue VultrRuby::ApiError => e
puts "Error when calling AccountApi->get_account_with_http_info: #{e}"
end
This endpoint does not need any parameter.
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json