debt_account_debts
Creates, updates, deletes, gets or lists a debt_account_debts resource.
Overview​
| Name | debt_account_debts |
| Type | Resource |
| Id | ovh.me.debt_account_debts |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
debt_id | integer | (wire: debtId) |
order_id | integer | The order the debt relates to (wire: orderId) |
amount | object | Original amount of the debt |
date | string (date-time) | Date the debt was created on |
due_amount | object | Amount you still owe for that debt (wire: dueAmount) |
due_date | string (date-time) | If specified, the debt will not be recovered before that date (wire: dueDate) |
pending_amount | object | Amount currently being processed (wire: pendingAmount) |
status | string | Status of a debt (PAID, REFUNDED, TO_BE_PAID, UNMATURED, UNPAID, WRITE_OFF) |
todo_amount | object | Reserved amount awaiting payment (wire: todoAmount) |
unmatured_amount | object | Unmatured amount for deferred payment term (wire: unmaturedAmount) |
State of a debt
| Name | Datatype | Description |
|---|---|---|
debt_id | integer | (wire: debtId) |
order_id | integer | The order the debt relates to (wire: orderId) |
amount | object | Original amount of the debt |
date | string (date-time) | Date the debt was created on |
due_amount | object | Amount you still owe for that debt (wire: dueAmount) |
due_date | string (date-time) | If specified, the debt will not be recovered before that date (wire: dueDate) |
pending_amount | object | Amount currently being processed (wire: pendingAmount) |
status | string | Status of a debt (PAID, REFUNDED, TO_BE_PAID, UNMATURED, UNPAID, WRITE_OFF) |
todo_amount | object | Reserved amount awaiting payment (wire: todoAmount) |
unmatured_amount | object | Unmatured amount for deferred payment term (wire: unmaturedAmount) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | debt_id | Get this object properties | |
list | select | x_pagination_mode | All debts related to your account | |
pay | exec | debtId | Create an order in order to pay this order's debt |
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"}}) |
debtId | integer | |
debt_id | integer | (wire: debtId) |
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
Get this object properties
SELECT
debt_id,
order_id,
amount,
date,
due_amount,
due_date,
pending_amount,
status,
todo_amount,
unmatured_amount
FROM ovh.me.debt_account_debts
WHERE debt_id = '{{ debt_id }}' -- required
;
All debts related to your account
SELECT
debt_id,
order_id,
amount,
date,
due_amount,
due_date,
pending_amount,
status,
todo_amount,
unmatured_amount
FROM ovh.me.debt_account_debts
WHERE x_pagination_mode = '{{ x_pagination_mode }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- pay
Create an order in order to pay this order's debt
EXEC ovh.me.debt_account_debts.pay
@debtId='{{ debtId }}' --required
;