{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "schema:BankAccount",
  "title": "BankAccount",
  "description": "A product or service offered by a bank whereby one may deposit, withdraw or transfer money and in some cases be paid interest.",
  "type": "object",
  "allOf": [
    {
      "description": "A product provided to consumers and businesses by financial institutions such as banks, insurance companies, brokerage firms, consumer finance companies, and investment companies which comprise the financial services industry.",
      "$ref": "schema:FinancialProduct"
    }
  ],
  "properties": {
    "accountMinimumInflow": {
      "description": "A minimum amount that has to be paid in every month.",
      "oneOf": [
        { "$ref": "schema:MonetaryAmount" },
        { "type": "array", "items": { "$ref": "schema:MonetaryAmount" } }
      ]
    },
    "accountOverdraftLimit": {
      "description": "An overdraft is an extension of credit from a lending institution when an account reaches zero. An overdraft allows the individual to continue withdrawing money even if the account has no funds in it. Basically the bank allows people to borrow a set amount of money.",
      "oneOf": [
        { "$ref": "schema:MonetaryAmount" },
        { "type": "array", "items": { "$ref": "schema:MonetaryAmount" } }
      ]
    },
    "bankAccountType": {
      "description": "The type of a bank account.",
      "anyOf": [{ "type": "string", "format": "uri" }, { "type": "string" }]
    }
  }
}
