{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/MoneyWithConversion",
  "definitions": {
    "MoneyWithConversion": {
      "type": "object",
      "properties": {
        "original": {
          "$ref": "#/definitions/Money",
          "description": "Amount in the transaction (original) currency"
        },
        "converted": {
          "$ref": "#/definitions/Money",
          "description": "Amount converted to the reporting currency"
        },
        "exchangeRate": {
          "type": "number",
          "description": "Exchange rate: 1 unit of original = rate units of converted"
        },
        "exchangeRateDate": {
          "type": "string",
          "description": "Date the exchange rate was effective.",
          "format": "date"
        },
        "rateSource": {
          "type": "string",
          "description": "Source of the exchange rate (e.g., \"ECB\", \"Reuters\", \"Bloomberg\")"
        }
      },
      "required": [
        "original",
        "converted",
        "exchangeRate"
      ],
      "additionalProperties": false,
      "description": "A monetary amount with currency conversion details. Inspired by ISO 20022 for multi-currency insurance transactions (e.g., London market, international programs).",
      "examples": [
        {
          "original": {
            "value": 100000,
            "currency": "GBP"
          },
          "converted": {
            "value": 127500,
            "currency": "USD"
          },
          "exchangeRate": 1.275,
          "exchangeRateDate": "2025-06-15",
          "rateSource": "ECB"
        }
      ]
    },
    "Money": {
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "description": "Numeric amount. Represented as a number; precision should be maintained by the consuming system."
        },
        "currency": {
          "type": "string",
          "description": "ISO 4217 currency code.",
          "default": "USD"
        }
      },
      "required": [
        "value"
      ],
      "additionalProperties": false,
      "description": "A monetary amount with currency.",
      "examples": [
        {
          "value": 1000000,
          "currency": "USD"
        }
      ]
    }
  },
  "$id": "https://bind-standard.org/schema/MoneyWithConversion",
  "title": "MoneyWithConversion"
}
