UpdateLedgerIdCommand (v1.0.0)

Command to update the ledger ID reference for a merchant account

UpdateLedgerIdCommand

Updates the account definition IDs in an existing merchant account ledger structure.

Schema

schema.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "UpdateLedgerIdCommand",
"description": "Command to update the ledger ID reference for a merchant account",
"properties": {
"accountId": {
"type": "object",
"description": "Account identifier",
"properties": {
"value": {
"type": "string",
"format": "uuid",
"description": "The unique account UUID"
}
},
"required": ["value"]
},
"ledgerId": {
"type": "object",
"description": "Ledger identifier",
"properties": {
"value": {
"type": "string",
"format": "uuid",
"description": "The unique ledger UUID"
}
},
"required": ["value"]
}
},
"required": ["accountId", "ledgerId"],
"additionalProperties": false
}

Purpose

This command enables migration of account definitions by updating the mapping between old and new account definition IDs while preserving balances and transaction history.

Key Attributes

  • ID: Merchant account aggregate identifier
  • Old And New Account Definition Ids Map: Mapping of old account IDs to new account IDs

Business Rules

  • Map size must match the number of accounts in the ledger
  • All old account IDs must exist in the current ledger
  • Validates that all existing accounts are being migrated

Result

Produces a LedgerIdUpdatedEvent when successful.