credit_balances
Creates, updates, deletes, gets or lists a credit_balances resource.
Overview​
| Name | credit_balances |
| Type | Resource |
| Id | ovh.me.credit_balances |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
balance_name | string | Balance name (wire: balanceName) |
amount | object | Balance amount |
balance_details | array | Balance details, amounts by serviceID (wire: balanceDetails) |
booked | array | Movement already booked on orders |
creation_date | string (date-time) | Balance creation date (wire: creationDate) |
expiring | array | Movement expiring soon |
last_update | string (date-time) | Balance last update (wire: lastUpdate) |
type | string | Balance type (BONUS, DEPOSIT, PREPAID_ACCOUNT, VOUCHER) |
usable | boolean | Balance usable |
Missing description
| Name | Datatype | Description |
|---|---|---|
balance_name | string | Balance name (wire: balanceName) |
amount | object | Balance amount |
balance_details | array | Balance details, amounts by serviceID (wire: balanceDetails) |
booked | array | Movement already booked on orders |
creation_date | string (date-time) | Balance creation date (wire: creationDate) |
expiring | array | Movement expiring soon |
last_update | string (date-time) | Balance last update (wire: lastUpdate) |
type | string | Balance type (BONUS, DEPOSIT, PREPAID_ACCOUNT, VOUCHER) |
usable | boolean | Balance usable |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | balance_name | Retrieve a credit balance | |
list | select | type, x_pagination_mode | Retrieve all credit balances |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
balance_name | string | Balance name (wire: balanceName) |
type | string | Filter by balance type |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Retrieve a credit balance
SELECT
balance_name,
amount,
balance_details,
booked,
creation_date,
expiring,
last_update,
type,
usable
FROM ovh.me.credit_balances
WHERE balance_name = '{{ balance_name }}' -- required
;
Retrieve all credit balances
SELECT
balance_name,
amount,
balance_details,
booked,
creation_date,
expiring,
last_update,
type,
usable
FROM ovh.me.credit_balances
WHERE type = '{{ type }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;