All URIs are relative to https://api.vultr.com/v2
Method | HTTP request | Description |
---|---|---|
GetInvoice | GET /billing/invoices/{invoice-id} | Get Invoice |
GetInvoiceItems | GET /billing/invoices/{invoice-id}/items | Get Invoice Items |
ListBillingHistory | GET /billing/history | List Billing History |
ListInvoices | GET /billing/invoices | List Invoices |
GetInvoice200Response GetInvoice (string invoiceId)
Get Invoice
Retrieve specified invoice
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetInvoiceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
// Configure Bearer token for authorization: API Key
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new BillingApi(config);
var invoiceId = "invoiceId_example"; // string | ID of invoice
try
{
// Get Invoice
GetInvoice200Response result = apiInstance.GetInvoice(invoiceId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BillingApi.GetInvoice: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get Invoice
ApiResponse<GetInvoice200Response> response = apiInstance.GetInvoiceWithHttpInfo(invoiceId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BillingApi.GetInvoiceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
invoiceId | string | ID of invoice |
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetInvoiceItems200Response GetInvoiceItems (string invoiceId)
Get Invoice Items
Retrieve full specified invoice
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetInvoiceItemsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
// Configure Bearer token for authorization: API Key
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new BillingApi(config);
var invoiceId = "invoiceId_example"; // string | ID of invoice
try
{
// Get Invoice Items
GetInvoiceItems200Response result = apiInstance.GetInvoiceItems(invoiceId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BillingApi.GetInvoiceItems: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get Invoice Items
ApiResponse<GetInvoiceItems200Response> response = apiInstance.GetInvoiceItemsWithHttpInfo(invoiceId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BillingApi.GetInvoiceItemsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
invoiceId | string | ID of invoice |
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListBillingHistory200Response ListBillingHistory ()
List Billing History
Retrieve list of billing history
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ListBillingHistoryExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
// Configure Bearer token for authorization: API Key
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new BillingApi(config);
try
{
// List Billing History
ListBillingHistory200Response result = apiInstance.ListBillingHistory();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BillingApi.ListBillingHistory: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// List Billing History
ApiResponse<ListBillingHistory200Response> response = apiInstance.ListBillingHistoryWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BillingApi.ListBillingHistoryWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
This endpoint does not need any parameter.
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListInvoices200Response ListInvoices ()
List Invoices
Retrieve a list of invoices
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ListInvoicesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
// Configure Bearer token for authorization: API Key
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new BillingApi(config);
try
{
// List Invoices
ListInvoices200Response result = apiInstance.ListInvoices();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BillingApi.ListInvoices: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// List Invoices
ApiResponse<ListInvoices200Response> response = apiInstance.ListInvoicesWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BillingApi.ListInvoicesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
This endpoint does not need any parameter.
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]