{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/fis/main/json-schema/fis-push-deposit-v1-dto-schema.json",
  "title": "PushDepositV1Dto",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fis-deposit-api-openapi.yml#/components/schemas/PushDepositV1Dto",
  "type": "object",
  "properties": {
    "connection": {
      "$ref": "#/$defs/PushDepositConnection"
    },
    "data": {
      "$ref": "#/$defs/PushDepositV1"
    }
  },
  "required": [
    "connection",
    "data"
  ],
  "$defs": {
    "PushDepositConnection": {
      "type": "object",
      "properties": {
        "businessName": {
          "type": "string",
          "description": "Unique business name identifier."
        },
        "serviceName": {
          "type": "string",
          "description": "Name of accounting platform service.",
          "enum": [
            "quickbooks",
            "xero"
          ]
        }
      },
      "required": [
        "businessName",
        "serviceName"
      ]
    },
    "PushDepositLineV1": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "maxLength": 4000
        },
        "quantity": {
          "type": "number",
          "format": "float"
        },
        "unitAmount": {
          "type": "number",
          "format": "float"
        },
        "memo": {
          "type": "string",
          "maxLength": 4000,
          "deprecated": true
        },
        "accountRef": {
          "type": "string"
        },
        "taxRef": {
          "type": "string"
        },
        "subTotal": {
          "type": "number",
          "format": "float",
          "deprecated": true
        },
        "totalAmount": {
          "type": "number",
          "format": "float",
          "deprecated": true
        },
        "taxAmount": {
          "type": "number",
          "format": "float"
        }
      },
      "required": [
        "quantity",
        "unitAmount",
        "accountRef"
      ]
    },
    "PushDepositV1": {
      "type": "object",
      "properties": {
        "currencyRate": {
          "type": "number"
        },
        "memo": {
          "type": "string",
          "maxLength": 4000
        },
        "currency": {
          "type": "string"
        },
        "customerRef": {
          "type": "string"
        },
        "postedDate": {
          "type": "string",
          "format": "date"
        },
        "bankAccountRef": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PushDepositLineV1"
          }
        }
      },
      "required": [
        "postedDate",
        "bankAccountRef",
        "lines"
      ]
    }
  }
}