BillingCreditHoldExtendRequest billing.credit-hold-extend-request@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- billing
- Visibility
- internal
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/billing/credit-hold-extend-request.v1.json
billing.credit-hold-extend-request@1: body of POST /internal/credits/holds/:id/extend. Grows an active hold by add_nano_usd.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
add_nano_usd | https://openvibe.network/contracts/billing/credit-hold-extend-request.v1.json#/$defs/money-nano-usd | yes |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: extend
{
"add_nano_usd": "25000000"
}Valid: small
{
"add_nano_usd": "1"
}Rejected: float
{
"add_nano_usd": "1000.5"
}Rejected: missing
{}Rejected: negative
{
"add_nano_usd": "-1000"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('billing.credit-hold-extend-request@1', value); // { valid, errors: [{ path, message }] }