{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/snabber-com-br/json-schema/snabber-com-br-account-patch-schema.json",
  "title": "AccountPatch",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snabber-com-br-openapi.json#/components/schemas/AccountPatch",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 100
    },
    "balance": {
      "type": "number",
      "description": "Só contas manuais. Cartão: dívida atual, positiva"
    },
    "statement_closing_date": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "maximum": 31
    },
    "payment_due_date": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "maximum": 31
    },
    "institution_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Banco conhecido (Nubank, Itaú, C6 Bank…) ganha o logo do app"
    },
    "account_subtype": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "CHECKING_ACCOUNT",
        "SAVINGS_ACCOUNT",
        "CREDIT_CARD",
        null
      ]
    },
    "card_logo": {
      "type": [
        "string",
        "null"
      ],
      "description": "Só CREDIT. Visa, Mastercard, American Express, Elo, Hipercard, Diners Club, Discover, JCB ou UnionPay"
    },
    "credit_limit": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "description": "Só CREDIT manual"
    },
    "payment_account_id": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Só CREDIT: conta BANK do mesmo workspace de onde sai o pagamento da fatura"
    }
  }
}