Skip to content

Latest commit

 

History

History
74 lines (50 loc) · 1.56 KB

AccountApi.md

File metadata and controls

74 lines (50 loc) · 1.56 KB

VultrRuby::AccountApi

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

Get Account Info

Get your Vultr account, permission, and billing information.

Examples

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

Using the get_account_with_http_info variant

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

Parameters

This endpoint does not need any parameter.

Return type

GetAccount200Response

Authorization

[API Key](../README.md#API Key)

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json