Skip to main content

corrective_invoice_debts

Creates, updates, deletes, gets or lists a corrective_invoice_debts resource.

Overview​

Namecorrective_invoice_debts
TypeResource
Idovh.me.corrective_invoice_debts

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
debt_idinteger (wire: debtId)
order_idintegerThe order the debt relates to (wire: orderId)
amountobjectOriginal amount of the debt
datestring (date-time)Date the debt was created on
due_amountobjectAmount you still owe for that debt (wire: dueAmount)
due_datestring (date-time)If specified, the debt will not be recovered before that date (wire: dueDate)
pending_amountobjectAmount currently being processed (wire: pendingAmount)
statusstringStatus of a debt (PAID, REFUNDED, TO_BE_PAID, UNMATURED, UNPAID, WRITE_OFF)
todo_amountobjectReserved amount awaiting payment (wire: todoAmount)
unmatured_amountobjectUnmatured amount for deferred payment term (wire: unmaturedAmount)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcorrective_invoice_idGet this object properties
payexeccorrectiveInvoiceIdCreate 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.

NameDatatypeDescription
api_hoststringThe 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"}})
correctiveInvoiceIdstring
corrective_invoice_idstring (wire: correctiveInvoiceId)

SELECT examples​

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.corrective_invoice_debts
WHERE corrective_invoice_id = '{{ corrective_invoice_id }}' -- required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Create an order in order to pay this order's debt

EXEC ovh.me.corrective_invoice_debts.pay
@correctiveInvoiceId='{{ correctiveInvoiceId }}' --required
;