All URIs are relative to https://rest.compute.cudo.org
| Method | HTTP request | Description |
|---|---|---|
| create_billing_account | POST /v1/billing-accounts | Create a billing account |
| create_billing_account_credit_payment | POST /v1/billing-accounts/{id}/credit | Add credit to billing account |
| delete_billing_account | DELETE /v1/billing-accounts/{id} | Delete billing account |
| get_billing_account | GET /v1/billing-accounts/{id} | Get a billing account |
| get_billing_account_details | GET /v1/billing-accounts/{id}/details | Get billing account details |
| get_billing_account_payment_methods | GET /v1/billing-accounts/{id}/payment-methods | Get payment methods |
| get_billing_account_setup_intent | GET /v1/billing-accounts/{id}/setup-intent | Get setup intent |
| get_billing_account_spend_details | GET /v1/billing-accounts/{billingAccountId}/spend/details | Get spend details |
| list_billing_account_credit_balance_transactions | GET /v1/billing-accounts/{id}/credit-balance-transactions | List credit balance transactions on a billing account |
| list_billing_account_invoices | GET /v1/billing-accounts/invoices | List invoices |
| list_billing_account_transactions | GET /v1/billing-accounts/{id}/transactions | List transactions on a billing account |
| list_billing_accounts | GET /v1/billing-accounts | List billing accounts |
| list_outstanding_invoices | GET /v1/billing-accounts/invoices/outstanding | Get outstanding invoices |
| remove_billing_account_payment_method | DELETE /v1/billing-accounts/{id}/payment-methods/{paymentMethodId} | Remove payment method |
| set_billing_account_default_payment_method | POST /v1/billing-accounts/{id}/payment-methods/{paymentMethodId}/set-default | Set default payment method |
| update_billing_account | PATCH /v1/billing-accounts/{billingAccount.id} | Update billing account |
BillingAccount create_billing_account(create_billing_account_body)
Create a billing account
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
create_billing_account_body = src.cudo_compute.CreateBillingAccountRequest() # CreateBillingAccountRequest |
try:
# Create a billing account
api_response = api_instance.create_billing_account(create_billing_account_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->create_billing_account: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| create_billing_account_body | CreateBillingAccountRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateBillingAccountCreditPaymentResponse create_billing_account_credit_payment(id, payment_method, amount_value=amount_value, radar_session_id=radar_session_id)
Add credit to billing account
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
id = 'id_example' # str |
payment_method = 'payment_method_example' # str |
amount_value = 'amount_value_example' # str | The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits ['.'] [Digits] | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range. (optional)
radar_session_id = 'radar_session_id_example' # str | (optional)
try:
# Add credit to billing account
api_response = api_instance.create_billing_account_credit_payment(id, payment_method, amount_value=amount_value, radar_session_id=radar_session_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->create_billing_account_credit_payment: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| payment_method | str | ||
| amount_value | str | The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits ("the integer"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services should normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). Services may perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). Additionally, services may preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` should not be supported regardless of locale. Additionally, thousand separators should not be supported. If a service does support them, values must be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits ['.'] [Digits] |
| radar_session_id | str | [optional] |
CreateBillingAccountCreditPaymentResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object delete_billing_account(id)
Delete billing account
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
id = 'id_example' # str |
try:
# Delete billing account
api_response = api_instance.delete_billing_account(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->delete_billing_account: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str |
object
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BillingAccount get_billing_account(id)
Get a billing account
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
id = 'id_example' # str |
try:
# Get a billing account
api_response = api_instance.get_billing_account(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->get_billing_account: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetBillingAccountDetailsResponse get_billing_account_details(id)
Get billing account details
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
id = 'id_example' # str |
try:
# Get billing account details
api_response = api_instance.get_billing_account_details(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->get_billing_account_details: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str |
GetBillingAccountDetailsResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BillingAccountPaymentMethods get_billing_account_payment_methods(id)
Get payment methods
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
id = 'id_example' # str |
try:
# Get payment methods
api_response = api_instance.get_billing_account_payment_methods(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->get_billing_account_payment_methods: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BillingAccountSetupIntent get_billing_account_setup_intent(id)
Get setup intent
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
id = 'id_example' # str |
try:
# Get setup intent
api_response = api_instance.get_billing_account_setup_intent(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->get_billing_account_setup_intent: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetBillingAccountSpendDetailsResponse get_billing_account_spend_details(billing_account_id, start_time, end_time)
Get spend details
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
billing_account_id = 'billing_account_id_example' # str |
start_time = '2013-10-20T19:20:30+01:00' # datetime |
end_time = '2013-10-20T19:20:30+01:00' # datetime |
try:
# Get spend details
api_response = api_instance.get_billing_account_spend_details(billing_account_id, start_time, end_time)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->get_billing_account_spend_details: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| billing_account_id | str | ||
| start_time | datetime | ||
| end_time | datetime |
GetBillingAccountSpendDetailsResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListBillingAccountCreditBalanceTransactionsResponse list_billing_account_credit_balance_transactions(id, page_size=page_size, starting_after=starting_after)
List credit balance transactions on a billing account
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
id = 'id_example' # str |
page_size = 56 # int | (optional)
starting_after = 'starting_after_example' # str | (optional)
try:
# List credit balance transactions on a billing account
api_response = api_instance.list_billing_account_credit_balance_transactions(id, page_size=page_size, starting_after=starting_after)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->list_billing_account_credit_balance_transactions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| page_size | int | [optional] | |
| starting_after | str | [optional] |
ListBillingAccountCreditBalanceTransactionsResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListBillingAccountInvoicesResponse list_billing_account_invoices(id, page_size=page_size, starting_after=starting_after, status=status)
List invoices
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
id = 'id_example' # str |
page_size = 56 # int | (optional)
starting_after = 'starting_after_example' # str | (optional)
status = 'status_example' # str | (optional)
try:
# List invoices
api_response = api_instance.list_billing_account_invoices(id, page_size=page_size, starting_after=starting_after, status=status)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->list_billing_account_invoices: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| page_size | int | [optional] | |
| starting_after | str | [optional] | |
| status | str | [optional] |
ListBillingAccountInvoicesResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListBillingAccountTransactionsResponse list_billing_account_transactions(id, page_size=page_size, starting_after=starting_after)
List transactions on a billing account
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
id = 'id_example' # str |
page_size = 56 # int | (optional)
starting_after = 'starting_after_example' # str | (optional)
try:
# List transactions on a billing account
api_response = api_instance.list_billing_account_transactions(id, page_size=page_size, starting_after=starting_after)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->list_billing_account_transactions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| page_size | int | [optional] | |
| starting_after | str | [optional] |
ListBillingAccountTransactionsResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListBillingAccountsResponse list_billing_accounts(page_token=page_token, page_size=page_size)
List billing accounts
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
page_token = 'page_token_example' # str | (optional)
page_size = 56 # int | (optional)
try:
# List billing accounts
api_response = api_instance.list_billing_accounts(page_token=page_token, page_size=page_size)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->list_billing_accounts: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| page_token | str | [optional] | |
| page_size | int | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListOutstandingInvoicesResponse list_outstanding_invoices()
Get outstanding invoices
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
try:
# Get outstanding invoices
api_response = api_instance.list_outstanding_invoices()
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->list_outstanding_invoices: %s\n" % e)This endpoint does not need any parameter.
ListOutstandingInvoicesResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RemoveBillingAccountPaymentMethodResponse remove_billing_account_payment_method(id, payment_method_id)
Remove payment method
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
id = 'id_example' # str |
payment_method_id = 'payment_method_id_example' # str |
try:
# Remove payment method
api_response = api_instance.remove_billing_account_payment_method(id, payment_method_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->remove_billing_account_payment_method: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| payment_method_id | str |
RemoveBillingAccountPaymentMethodResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SetBillingAccountDefaultPaymentMethodResponse set_billing_account_default_payment_method(id, payment_method_id)
Set default payment method
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
id = 'id_example' # str |
payment_method_id = 'payment_method_id_example' # str |
try:
# Set default payment method
api_response = api_instance.set_billing_account_default_payment_method(id, payment_method_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->set_billing_account_default_payment_method: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| payment_method_id | str |
SetBillingAccountDefaultPaymentMethodResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BillingAccount update_billing_account(billing_account_id, update_billing_account_body)
Update billing account
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = src.cudo_compute.BillingApi()
billing_account_id = 'billing_account_id_example' # str |
update_billing_account_body = src.cudo_compute.UpdateBillingAccountBody() # UpdateBillingAccountBody |
try:
# Update billing account
api_response = api_instance.update_billing_account(billing_account_id, update_billing_account_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->update_billing_account: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| billing_account_id | str | ||
| update_billing_account_body | UpdateBillingAccountBody |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]