{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/divvy/json-schema/divvy-create-customer-bank-account-request-dto-schema.json",
  "title": "CreateCustomerBankAccountRequestDto",
  "description": "Create a customer bank account",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/divvy-customers-api-openapi.yml#/components/schemas/CreateCustomerBankAccountRequestDto",
  "required": [
    "accountNumber",
    "nameOnAccount",
    "ownerType",
    "routingNumber",
    "type"
  ],
  "type": "object",
  "properties": {
    "nameOnAccount": {
      "minLength": 1,
      "type": "string",
      "description": "Customer bank account name"
    },
    "nickname": {
      "type": "string",
      "description": "Customer bank account nickname"
    },
    "routingNumber": {
      "minLength": 1,
      "type": "string",
      "description": "Customer bank routing number"
    },
    "accountNumber": {
      "minLength": 1,
      "type": "string",
      "description": "Customer bank account number"
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/$defs/BankAccountType"
        },
        {
          "description": "Customer bank account type"
        }
      ]
    },
    "ownerType": {
      "allOf": [
        {
          "$ref": "#/$defs/BankAccountOwnerType"
        },
        {
          "description": "Customer bank account owner type"
        }
      ]
    }
  },
  "$defs": {
    "BankAccountOwnerType": {
      "type": "string",
      "description": "BankAccountOwnerType Enum.",
      "enum": [
        "BUSINESS",
        "PERSONAL"
      ]
    },
    "BankAccountType": {
      "type": "string",
      "description": "BankAccountType Enum.",
      "enum": [
        "CHECKING",
        "SAVINGS"
      ]
    }
  }
}