Skip to main content

credit_balance_movements

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

Overview​

Namecredit_balance_movements
TypeResource
Idovh.me.credit_balance_movements

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
movement_idintegerMovement ID (wire: movementId)
order_idintegerOrder ID associated to this credit movement (wire: orderId)
balance_namestringBalance name (wire: balanceName)
amountobjectMovement amount
creation_datestring (date-time)Movement creation date (wire: creationDate)
destination_objectobjectObject destination of this credit movement (wire: destinationObject)
expiration_datestring (date-time)Movement expiration date (wire: expirationDate)
last_updatestring (date-time)Movement last update (wire: lastUpdate)
source_objectobjectObject source of this credit movement (wire: sourceObject)
typestringMovement type (BONUS, CANCEL, CREDIT_NOTE, EXPIRE, GIFT, MANUAL, ORDER, REFUND, UNPAID, USE, VOUCHER)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbalance_name, movement_idRetrieve a specific movement for a credit balance
listselectbalance_namex_pagination_modeRetrieve movements for a specific balance

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"}})
balance_namestringBalance name (wire: balanceName)
movement_idintegerMovement ID (wire: movementId)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Retrieve a specific movement for a credit balance

SELECT
movement_id,
order_id,
balance_name,
amount,
creation_date,
destination_object,
expiration_date,
last_update,
source_object,
type
FROM ovh.me.credit_balance_movements
WHERE balance_name = '{{ balance_name }}' -- required
AND movement_id = '{{ movement_id }}' -- required
;