LedgerEntry
Type: object
Required means required within its containing object, when that object is present. Union/conditional constraints remain defined by the JSON Schema below.
| Field | Type | Presence | Description / constraints |
|---|---|---|---|
agent | anyOf: string; null | Optional | — |
amount_micros | string | Optional | Integer USD micros as a decimal string; $1 = 1000000 micros. pattern: ^[0-9]+$ |
hash | anyOf: string; null | Optional | — |
id | string | Optional | Public led_… reference (not a UUID). pattern: ^led_[0-7][0-9A-HJKMNP-TV-Z]{25}$ |
kind | call, sms, number_rental, media, other | Optional | — |
line | anyOf: string; null | Optional | — |
object | Exactly ledger_entry | Optional | — |
occurred_at | string (date-time) | Optional | — |
quantity | integer | Optional | minimum: 0 |
resource | anyOf: string; null | Optional | — |
seq | anyOf: integer; null | Optional | — |
unit | string | Optional | — |
JSON Schema
json
{
"additionalProperties": true,
"properties": {
"agent": {
"anyOf": [
{
"description": "Public agent_… reference (not a UUID)",
"pattern": "^agent_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
"type": "string"
},
{
"type": "null"
}
]
},
"amount_micros": {
"description": "Integer USD micros as a decimal string; $1 = 1000000 micros",
"pattern": "^[0-9]+$",
"type": "string"
},
"hash": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"id": {
"description": "Public led_… reference (not a UUID)",
"pattern": "^led_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
"type": "string"
},
"kind": {
"enum": [
"call",
"sms",
"number_rental",
"media",
"other"
],
"type": "string"
},
"line": {
"anyOf": [
{
"description": "Public line_… reference (not a UUID)",
"pattern": "^line_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
"type": "string"
},
{
"type": "null"
}
]
},
"object": {
"const": "ledger_entry"
},
"occurred_at": {
"format": "date-time",
"type": "string"
},
"quantity": {
"minimum": 0,
"type": "integer"
},
"resource": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"seq": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string"
}
},
"type": "object"
}