openapi: 3.0.3
info:
  title: 'Payment Rocketbot API Documentation'
  description: 'Documentación de la API del proyecto Payment Rocketbot'
  version: 1.0.0
servers:
  -
    url: 'https://pagos.agrocentro.site'
tags:
  -
    name: Autenticación
    description: "\nAPIs para autenticación de usuarios"
  -
    name: Bancos
    description: "\nAPIs para gestionar bancos (origen y destino)"
  -
    name: Compañías
    description: "\nAPIs para gestionar compañías"
  -
    name: Endpoints
    description: ''
  -
    name: Monedas
    description: "\nAPIs para gestionar monedas/divisas"
  -
    name: 'Pagos (Detalles)'
    description: "\nAPIs para gestionar los detalles de pagos"
  -
    name: 'Pagos (Encabezados)'
    description: "\nAPIs para gestionar encabezados de pagos"
  -
    name: 'Tipos de Transferencia'
    description: "\nAPIs para gestionar tipos de transferencia"
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'Obtén tu token de acceso mediante el endpoint <b>POST /api/auth/login</b>. Usa el token en el header Authorization como Bearer token.'
security:
  -
    default: []
paths:
  /api/auth/register:
    post:
      summary: 'Registrar usuario'
      operationId: registrarUsuario
      description: 'Crea un nuevo usuario y devuelve un token de acceso.'
      parameters: []
      responses:
        201:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Usuario creado'
                  user:
                    id: 1
                    name: 'Juan Pérez'
                    username: juan_perez
                    email: juan@ejemplo.com
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
                  token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...
                  token_type: Bearer
                properties:
                  message:
                    type: string
                    example: 'Usuario creado'
                  user:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Juan Pérez'
                      username:
                        type: string
                        example: juan_perez
                      email:
                        type: string
                        example: juan@ejemplo.com
                      created_at:
                        type: string
                        example: '2024-01-15T10:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2024-01-15T10:00:00.000000Z'
                  token:
                    type: string
                    example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...
                  token_type:
                    type: string
                    example: Bearer
        422:
          description: 'Error de validación'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Error de validación'
                  errors:
                    username:
                      - 'El campo username ya ha sido tomado.'
                properties:
                  message:
                    type: string
                    example: 'Error de validación'
                  errors:
                    type: object
                    properties:
                      username:
                        type: array
                        example:
                          - 'El campo username ya ha sido tomado.'
                        items:
                          type: string
      tags:
        - Autenticación
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Nombre completo del usuario.'
                  example: 'Juan Pérez'
                username:
                  type: string
                  description: 'Nombre de usuario único (solo letras, números, guiones).'
                  example: juan_perez
                email:
                  type: string
                  description: 'Correo electrónico (opcional pero único si se proporciona).'
                  example: juan@ejemplo.com
                  nullable: true
                password:
                  type: string
                  description: 'Contraseña (mínimo 8 caracteres).'
                  example: password123
                password_confirmation:
                  type: string
                  description: 'Confirmación de contraseña.'
                  example: password123
              required:
                - name
                - username
                - password
                - password_confirmation
      security: []
  /api/auth/login:
    post:
      summary: 'Iniciar sesión'
      operationId: iniciarSesin
      description: 'Autentica al usuario y devuelve un token de acceso.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  user:
                    id: 1
                    name: 'Juan Pérez'
                    username: juan_perez
                    email: juan@ejemplo.com
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
                  token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...
                  token_type: Bearer
                properties:
                  user:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Juan Pérez'
                      username:
                        type: string
                        example: juan_perez
                      email:
                        type: string
                        example: juan@ejemplo.com
                      created_at:
                        type: string
                        example: '2024-01-15T10:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2024-01-15T10:00:00.000000Z'
                  token:
                    type: string
                    example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...
                  token_type:
                    type: string
                    example: Bearer
        422:
          description: 'Credenciales inválidas'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    username:
                      - 'Las credenciales son incorrectas'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      username:
                        type: array
                        example:
                          - 'Las credenciales son incorrectas'
                        items:
                          type: string
      tags:
        - Autenticación
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  description: 'Nombre de usuario.'
                  example: juan_perez
                password:
                  type: string
                  description: 'Contraseña del usuario.'
                  example: password123
              required:
                - username
                - password
      security: []
  /api/auth/logout:
    post:
      summary: 'Cerrar sesión'
      operationId: cerrarSesin
      description: 'Revoca el token de acceso actual del usuario.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Sesión cerrada'
                properties:
                  message:
                    type: string
                    example: 'Sesión cerrada'
      tags:
        - Autenticación
  /api/auth/user:
    get:
      summary: 'Obtener usuario autenticado'
      operationId: obtenerUsuarioAutenticado
      description: 'Devuelve los datos del usuario actualmente autenticado.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  user:
                    id: 1
                    name: 'Juan Pérez'
                    username: juan_perez
                    email: juan@ejemplo.com
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
                properties:
                  user:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Juan Pérez'
                      username:
                        type: string
                        example: juan_perez
                      email:
                        type: string
                        example: juan@ejemplo.com
                      created_at:
                        type: string
                        example: '2024-01-15T10:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2024-01-15T10:00:00.000000Z'
      tags:
        - Autenticación
  /api/bank/all:
    get:
      summary: 'Listar todos los bancos'
      operationId: listarTodosLosBancos
      description: 'Obtiene todos los bancos sin filtrar por compañía ni estado.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    company_id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: 'Banco Nacional'
                    type:
                      type: string
                      example: origin
                    status:
                      type: string
                      example: active
                    created_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                    updated_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                example:
                  -
                    id: 1
                    company_id: 1
                    name: 'Banco Nacional'
                    type: origin
                    status: active
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
      tags:
        - Bancos
  '/api/bank/origin/{companyId}':
    get:
      summary: 'Listar bancos origen por compañía'
      operationId: listarBancosOrigenPorCompaa
      description: 'Obtiene todos los bancos de tipo origen activos de una compañía.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    company_id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: 'Banco Nacional'
                    type:
                      type: string
                      example: origin
                    status:
                      type: string
                      example: active
                    created_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                    updated_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                example:
                  -
                    id: 1
                    company_id: 1
                    name: 'Banco Nacional'
                    type: origin
                    status: active
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
      tags:
        - Bancos
    parameters:
      -
        in: path
        name: companyId
        description: 'ID de la compañía.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/bank/destination/{companyId}':
    get:
      summary: 'Listar bancos destino por compañía'
      operationId: listarBancosDestinoPorCompaa
      description: 'Obtiene todos los bancos de tipo destino activos de una compañía.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 2
                    company_id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: 'Banco Internacional'
                    type:
                      type: string
                      example: destination
                    status:
                      type: string
                      example: active
                    created_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                    updated_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                example:
                  -
                    id: 2
                    company_id: 1
                    name: 'Banco Internacional'
                    type: destination
                    status: active
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
      tags:
        - Bancos
    parameters:
      -
        in: path
        name: companyId
        description: 'ID de la compañía.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/bank/{companyId}':
    get:
      summary: 'Listar bancos activos por compañía'
      operationId: listarBancosActivosPorCompaa
      description: 'Obtiene todos los bancos activos de una compañía específica.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    company_id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: 'Banco Nacional'
                    type:
                      type: string
                      example: origin
                    status:
                      type: string
                      example: active
                    created_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                    updated_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                example:
                  -
                    id: 1
                    company_id: 1
                    name: 'Banco Nacional'
                    type: origin
                    status: active
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
      tags:
        - Bancos
    parameters:
      -
        in: path
        name: companyId
        description: 'ID de la compañía.'
        example: 1
        required: true
        schema:
          type: integer
  /api/bank:
    post:
      summary: 'Crear banco'
      operationId: crearBanco
      description: 'Crea un nuevo banco en el sistema.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  company_id: 1
                  name: 'Banco Nacional'
                  type: origin
                  status: active
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T10:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  company_id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Banco Nacional'
                  type:
                    type: string
                    example: origin
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
        422:
          description: 'Error de validación'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Error al crear el banco'
                  errors:
                    name:
                      - 'El campo name es obligatorio.'
                properties:
                  message:
                    type: string
                    example: 'Error al crear el banco'
                  errors:
                    type: object
                    properties:
                      name:
                        type: array
                        example:
                          - 'El campo name es obligatorio.'
                        items:
                          type: string
      tags:
        - Bancos
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                company_id:
                  type: integer
                  description: 'ID de la compañía a la que pertenece el banco.'
                  example: 1
                name:
                  type: string
                  description: 'Nombre del banco.'
                  example: 'Banco Nacional'
                type:
                  type: string
                  description: 'Tipo de banco. Valores permitidos: origin, destination.'
                  example: origin
                status:
                  type: string
                  description: 'Estado del banco. Valores permitidos: active, inactive.'
                  example: active
              required:
                - company_id
                - name
    put:
      summary: 'Actualizar banco'
      operationId: actualizarBanco
      description: 'Actualiza los datos de un banco existente.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  company_id: 1
                  name: 'Banco Nacional Actualizado'
                  type: origin
                  status: active
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T12:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  company_id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Banco Nacional Actualizado'
                  type:
                    type: string
                    example: origin
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T12:00:00.000000Z'
        422:
          description: 'Error de validación'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Error al actualizar el banco'
                  errors:
                    id:
                      - 'El campo id es obligatorio.'
                properties:
                  message:
                    type: string
                    example: 'Error al actualizar el banco'
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        example:
                          - 'El campo id es obligatorio.'
                        items:
                          type: string
      tags:
        - Bancos
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'ID del banco a actualizar.'
                  example: 1
                company_id:
                  type: integer
                  description: 'ID de la compañía.'
                  example: 1
                name:
                  type: string
                  description: 'Nombre del banco.'
                  example: 'Banco Nacional Actualizado'
                type:
                  type: string
                  description: 'Tipo de banco. Valores permitidos: origin, destination.'
                  example: origin
                status:
                  type: string
                  description: 'Estado del banco. Valores permitidos: active, inactive.'
                  example: active
              required:
                - id
                - company_id
                - name
                - type
                - status
  '/api/bank/{id}':
    delete:
      summary: 'Eliminar banco'
      operationId: eliminarBanco
      description: "Elimina un banco (soft delete - cambia el estado a 'deleted')."
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  company_id: 1
                  name: 'Banco Nacional'
                  type: origin
                  status: deleted
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T14:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  company_id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Banco Nacional'
                  type:
                    type: string
                    example: origin
                  status:
                    type: string
                    example: deleted
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T14:00:00.000000Z'
      tags:
        - Bancos
    parameters:
      -
        in: path
        name: id
        description: 'ID del banco a eliminar.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/bank/single/{bank}':
    get:
      summary: 'Obtener un banco'
      operationId: obtenerUnBanco
      description: 'Obtiene los datos de un banco específico por su ID.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  company_id: 1
                  name: 'Banco Nacional'
                  type: origin
                  status: active
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T10:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  company_id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Banco Nacional'
                  type:
                    type: string
                    example: origin
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
      tags:
        - Bancos
    parameters:
      -
        in: path
        name: bank
        description: 'ID del banco.'
        example: 1
        required: true
        schema:
          type: integer
  /api/company:
    get:
      summary: 'Listar compañías activas'
      operationId: listarCompaasActivas
      description: 'Obtiene todas las compañías con estado activo.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: 'Empresa ABC'
                    format_name:
                      type: string
                      example: empresa_abc
                    data_base:
                      type: string
                      example: db_abc
                    status:
                      type: string
                      example: active
                    created_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                    updated_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                example:
                  -
                    id: 1
                    name: 'Empresa ABC'
                    format_name: empresa_abc
                    data_base: db_abc
                    status: active
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
      tags:
        - Compañías
    post:
      summary: 'Crear compañía'
      operationId: crearCompaa
      description: 'Crea una nueva compañía en el sistema.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 2
                  name: 'Empresa XYZ'
                  format_name: empresa_xyz
                  data_base: db_xyz
                  status: active
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T10:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 2
                  name:
                    type: string
                    example: 'Empresa XYZ'
                  format_name:
                    type: string
                    example: empresa_xyz
                  data_base:
                    type: string
                    example: db_xyz
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
        422:
          description: 'Error de validación'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Error al crear la compañia'
                  errors:
                    name:
                      - 'El campo name es obligatorio.'
                properties:
                  message:
                    type: string
                    example: 'Error al crear la compañia'
                  errors:
                    type: object
                    properties:
                      name:
                        type: array
                        example:
                          - 'El campo name es obligatorio.'
                        items:
                          type: string
      tags:
        - Compañías
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Nombre de la compañía.'
                  example: 'Empresa XYZ'
                format_name:
                  type: string
                  description: 'Nombre formateado (sin espacios ni caracteres especiales).'
                  example: empresa_xyz
                data_base:
                  type: string
                  description: 'Nombre de la base de datos (único).'
                  example: db_xyz
                status:
                  type: string
                  description: 'Estado de la compañía. Valores permitidos: active, inactive.'
                  example: active
              required:
                - name
                - format_name
                - data_base
    put:
      summary: 'Actualizar compañía'
      operationId: actualizarCompaa
      description: 'Actualiza los datos de una compañía existente.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  name: 'Empresa ABC Actualizada'
                  format_name: empresa_abc_actualizada
                  data_base: db_abc
                  status: active
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T12:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Empresa ABC Actualizada'
                  format_name:
                    type: string
                    example: empresa_abc_actualizada
                  data_base:
                    type: string
                    example: db_abc
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T12:00:00.000000Z'
        422:
          description: 'Error de validación'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Error al actalizar la compañia'
                  errors:
                    id:
                      - 'El campo id es obligatorio.'
                properties:
                  message:
                    type: string
                    example: 'Error al actalizar la compañia'
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        example:
                          - 'El campo id es obligatorio.'
                        items:
                          type: string
      tags:
        - Compañías
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'ID de la compañía a actualizar.'
                  example: 1
                name:
                  type: string
                  description: 'Nombre de la compañía.'
                  example: 'Empresa ABC Actualizada'
                format_name:
                  type: string
                  description: 'Nombre formateado.'
                  example: empresa_abc_actualizada
                data_base:
                  type: string
                  description: 'Nombre de la base de datos.'
                  example: db_abc
                status:
                  type: string
                  description: 'Estado de la compañía. Valores permitidos: active, inactive.'
                  example: active
              required:
                - id
                - name
                - format_name
                - data_base
                - status
  /api/company/all:
    get:
      summary: 'Listar todas las compañías'
      operationId: listarTodasLasCompaas
      description: 'Obtiene todas las compañías sin filtrar por estado.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: 'Empresa ABC'
                    format_name:
                      type: string
                      example: empresa_abc
                    data_base:
                      type: string
                      example: db_abc
                    status:
                      type: string
                      example: active
                    created_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                    updated_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                example:
                  -
                    id: 1
                    name: 'Empresa ABC'
                    format_name: empresa_abc
                    data_base: db_abc
                    status: active
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
      tags:
        - Compañías
  '/api/company/{id}':
    delete:
      summary: 'Eliminar compañía'
      operationId: eliminarCompaa
      description: "Elimina una compañía (soft delete - cambia el estado a 'deleted')."
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  name: 'Empresa ABC'
                  format_name: empresa_abc
                  data_base: db_abc
                  status: deleted
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T14:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Empresa ABC'
                  format_name:
                    type: string
                    example: empresa_abc
                  data_base:
                    type: string
                    example: db_abc
                  status:
                    type: string
                    example: deleted
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T14:00:00.000000Z'
      tags:
        - Compañías
    parameters:
      -
        in: path
        name: id
        description: 'El ID de la compañía a eliminar.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/company/{company}':
    get:
      summary: 'Obtener una compañía'
      operationId: obtenerUnaCompaa
      description: 'Obtiene los datos de una compañía específica por su ID.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  name: 'Empresa ABC'
                  format_name: empresa_abc
                  data_base: db_abc
                  status: active
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T10:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Empresa ABC'
                  format_name:
                    type: string
                    example: empresa_abc
                  data_base:
                    type: string
                    example: db_abc
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
      tags:
        - Compañías
    parameters:
      -
        in: path
        name: company
        description: 'El ID de la compañía.'
        example: 1
        required: true
        schema:
          type: integer
  /api/user:
    get:
      summary: ''
      operationId: getApiUser
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
  /api/money/all:
    get:
      summary: 'Listar todas las monedas'
      operationId: listarTodasLasMonedas
      description: 'Obtiene todas las monedas sin filtrar por compañía ni estado.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    company_id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: 'Dólar Estadounidense'
                    initials:
                      type: string
                      example: USD
                    status:
                      type: string
                      example: active
                    created_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                    updated_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                example:
                  -
                    id: 1
                    company_id: 1
                    name: 'Dólar Estadounidense'
                    initials: USD
                    status: active
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
      tags:
        - Monedas
  '/api/money/single/{money}':
    get:
      summary: 'Obtener una moneda'
      operationId: obtenerUnaMoneda
      description: 'Obtiene los datos de una moneda específica por su ID.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  company_id: 1
                  name: 'Dólar Estadounidense'
                  initials: USD
                  status: active
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T10:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  company_id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Dólar Estadounidense'
                  initials:
                    type: string
                    example: USD
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
      tags:
        - Monedas
    parameters:
      -
        in: path
        name: money
        description: 'ID de la moneda.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/money/{companyId}':
    get:
      summary: 'Listar monedas activas por compañía'
      operationId: listarMonedasActivasPorCompaa
      description: 'Obtiene todas las monedas activas de una compañía específica.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    company_id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: 'Dólar Estadounidense'
                    initials:
                      type: string
                      example: USD
                    status:
                      type: string
                      example: active
                    created_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                    updated_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                example:
                  -
                    id: 1
                    company_id: 1
                    name: 'Dólar Estadounidense'
                    initials: USD
                    status: active
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
      tags:
        - Monedas
    parameters:
      -
        in: path
        name: companyId
        description: 'ID de la compañía.'
        example: 1
        required: true
        schema:
          type: integer
  /api/money:
    post:
      summary: 'Crear moneda'
      operationId: crearMoneda
      description: 'Crea una nueva moneda en el sistema.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  company_id: 1
                  name: 'Dólar Estadounidense'
                  initials: USD
                  status: active
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T10:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  company_id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Dólar Estadounidense'
                  initials:
                    type: string
                    example: USD
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
        422:
          description: 'Error de validación'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Error al crear la moneda'
                  errors:
                    name:
                      - 'El campo name es obligatorio.'
                properties:
                  message:
                    type: string
                    example: 'Error al crear la moneda'
                  errors:
                    type: object
                    properties:
                      name:
                        type: array
                        example:
                          - 'El campo name es obligatorio.'
                        items:
                          type: string
      tags:
        - Monedas
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                company_id:
                  type: integer
                  description: 'ID de la compañía a la que pertenece la moneda.'
                  example: 1
                name:
                  type: string
                  description: 'Nombre de la moneda.'
                  example: 'Dólar Estadounidense'
                initials:
                  type: string
                  description: 'Siglas/código de la moneda (máximo 10 caracteres).'
                  example: USD
                status:
                  type: string
                  description: 'Estado de la moneda. Valores permitidos: active, inactive.'
                  example: active
              required:
                - company_id
                - name
                - initials
    put:
      summary: 'Actualizar moneda'
      operationId: actualizarMoneda
      description: 'Actualiza los datos de una moneda existente.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  company_id: 1
                  name: 'Dólar Americano'
                  initials: USD
                  status: active
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T12:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  company_id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Dólar Americano'
                  initials:
                    type: string
                    example: USD
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T12:00:00.000000Z'
        422:
          description: 'Error de validación'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Error al actualizar la moneda'
                  errors:
                    id:
                      - 'El campo id es obligatorio.'
                properties:
                  message:
                    type: string
                    example: 'Error al actualizar la moneda'
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        example:
                          - 'El campo id es obligatorio.'
                        items:
                          type: string
      tags:
        - Monedas
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'ID de la moneda a actualizar.'
                  example: 1
                company_id:
                  type: integer
                  description: 'ID de la compañía.'
                  example: 1
                name:
                  type: string
                  description: 'Nombre de la moneda.'
                  example: 'Dólar Americano'
                initials:
                  type: string
                  description: 'Siglas/código de la moneda.'
                  example: USD
                status:
                  type: string
                  description: 'Estado de la moneda. Valores permitidos: active, inactive.'
                  example: active
              required:
                - id
                - company_id
                - name
                - initials
                - status
  '/api/money/{id}':
    delete:
      summary: 'Eliminar moneda'
      operationId: eliminarMoneda
      description: "Elimina una moneda (soft delete - cambia el estado a 'deleted')."
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  company_id: 1
                  name: 'Dólar Estadounidense'
                  initials: USD
                  status: deleted
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T14:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  company_id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Dólar Estadounidense'
                  initials:
                    type: string
                    example: USD
                  status:
                    type: string
                    example: deleted
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T14:00:00.000000Z'
      tags:
        - Monedas
    parameters:
      -
        in: path
        name: id
        description: 'ID de la moneda a eliminar.'
        example: 1
        required: true
        schema:
          type: integer
  /api/payment-detail/all:
    get:
      summary: 'Listar todos los detalles'
      operationId: listarTodosLosDetalles
      description: 'Obtiene todos los detalles de pago sin filtrar por encabezado ni estado.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    payment_header_id:
                      type: integer
                      example: 1
                    DocNum:
                      type: string
                      example: DOC-001
                    amount:
                      type: string
                      example: '500.00'
                    payment_type:
                      type: string
                      example: partial
                    status:
                      type: string
                      example: active
                    status_recketbot:
                      type: string
                      example: pending
                    comment:
                      type: string
                      example: 'Pago parcial'
                    comment_response:
                      type: string
                      example: null
                    created_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                    updated_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                example:
                  -
                    id: 1
                    payment_header_id: 1
                    DocNum: DOC-001
                    amount: '500.00'
                    payment_type: partial
                    status: active
                    status_recketbot: pending
                    comment: 'Pago parcial'
                    comment_response: null
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
      tags:
        - 'Pagos (Detalles)'
  '/api/payment-detail/single/{id}':
    get:
      summary: 'Obtener un detalle de pago'
      operationId: obtenerUnDetalleDePago
      description: 'Obtiene los datos de un detalle de pago específico con su encabezado relacionado.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  payment_header_id: 1
                  DocNum: DOC-001
                  amount: '500.00'
                  payment_type: partial
                  status: active
                  status_recketbot: pending
                  comment: 'Pago parcial'
                  comment_response: null
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T10:00:00.000000Z'
                  payment_header:
                    id: 1
                    company_id: 1
                    amount: '1000.00'
                properties:
                  id:
                    type: integer
                    example: 1
                  payment_header_id:
                    type: integer
                    example: 1
                  DocNum:
                    type: string
                    example: DOC-001
                  amount:
                    type: string
                    example: '500.00'
                  payment_type:
                    type: string
                    example: partial
                  status:
                    type: string
                    example: active
                  status_recketbot:
                    type: string
                    example: pending
                  comment:
                    type: string
                    example: 'Pago parcial'
                  comment_response:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  payment_header:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      company_id:
                        type: integer
                        example: 1
                      amount:
                        type: string
                        example: '1000.00'
      tags:
        - 'Pagos (Detalles)'
    parameters:
      -
        in: path
        name: id
        description: 'ID del detalle de pago.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/payment-detail/{paymentHeaderId}':
    get:
      summary: 'Listar detalles de un pago'
      operationId: listarDetallesDeUnPago
      description: 'Obtiene todos los detalles activos de un encabezado de pago específico.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    payment_header_id:
                      type: integer
                      example: 1
                    DocNum:
                      type: string
                      example: DOC-001
                    amount:
                      type: string
                      example: '500.00'
                    payment_type:
                      type: string
                      example: partial
                    status:
                      type: string
                      example: active
                    status_recketbot:
                      type: string
                      example: pending
                    comment:
                      type: string
                      example: 'Pago parcial'
                    comment_response:
                      type: string
                      example: null
                    created_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                    updated_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                example:
                  -
                    id: 1
                    payment_header_id: 1
                    DocNum: DOC-001
                    amount: '500.00'
                    payment_type: partial
                    status: active
                    status_recketbot: pending
                    comment: 'Pago parcial'
                    comment_response: null
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
      tags:
        - 'Pagos (Detalles)'
    parameters:
      -
        in: path
        name: paymentHeaderId
        description: 'ID del encabezado de pago.'
        example: 1
        required: true
        schema:
          type: integer
  /api/payment-detail:
    put:
      summary: 'Actualizar detalle de pago'
      operationId: actualizarDetalleDePago
      description: 'Actualiza los datos de un detalle de pago existente.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  payment_header_id: 1
                  DocNum: DOC-001
                  amount: '500.00'
                  payment_type: partial
                  status: active
                  status_recketbot: pending
                  comment: 'Pago parcial de factura'
                  comment_response: null
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T12:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  payment_header_id:
                    type: integer
                    example: 1
                  DocNum:
                    type: string
                    example: DOC-001
                  amount:
                    type: string
                    example: '500.00'
                  payment_type:
                    type: string
                    example: partial
                  status:
                    type: string
                    example: active
                  status_recketbot:
                    type: string
                    example: pending
                  comment:
                    type: string
                    example: 'Pago parcial de factura'
                  comment_response:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T12:00:00.000000Z'
        422:
          description: 'Error de validación'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Error al actualizar el detalle'
                  errors:
                    id:
                      - 'El campo id es obligatorio.'
                properties:
                  message:
                    type: string
                    example: 'Error al actualizar el detalle'
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        example:
                          - 'El campo id es obligatorio.'
                        items:
                          type: string
      tags:
        - 'Pagos (Detalles)'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'ID del detalle a actualizar.'
                  example: 1
                DocNum:
                  type: string
                  description: 'Número de documento.'
                  example: DOC-001
                amount:
                  type: number
                  description: 'Monto del detalle (mínimo 0.0001).'
                  example: 500.0
                payment_type:
                  type: string
                  description: 'Tipo de pago. Valores permitidos: partial, full.'
                  example: partial
                status:
                  type: string
                  description: 'Estado del detalle. Valores permitidos: active, inactive.'
                  example: active
                comment:
                  type: string
                  description: 'Comentario adicional.'
                  example: 'Pago parcial de factura'
                  nullable: true
              required:
                - id
                - DocNum
                - amount
                - payment_type
                - status
  /api/payment-detail/status:
    put:
      summary: 'Actualizar estado Rocketbot del detalle'
      operationId: actualizarEstadoRocketbotDelDetalle
      description: "Actualiza el estado de procesamiento Rocketbot de un detalle de pago.\nSi el estado es 'rejected', el campo comment_response es obligatorio."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Éxito - Insertado'
                    type: object
                    example:
                      message: 'Estado actualizado exitosamente'
                      data:
                        id: 1
                        payment_header_id: 1
                        DocNum: DOC-001
                        amount: '500.00'
                        payment_type: partial
                        status: active
                        status_recketbot: inserted
                        comment: 'Pago parcial'
                        comment_response: null
                        created_at: '2024-01-15T10:00:00.000000Z'
                        updated_at: '2024-01-15T16:00:00.000000Z'
                    properties:
                      message:
                        type: string
                        example: 'Estado actualizado exitosamente'
                      data:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          payment_header_id:
                            type: integer
                            example: 1
                          DocNum:
                            type: string
                            example: DOC-001
                          amount:
                            type: string
                            example: '500.00'
                          payment_type:
                            type: string
                            example: partial
                          status:
                            type: string
                            example: active
                          status_recketbot:
                            type: string
                            example: inserted
                          comment:
                            type: string
                            example: 'Pago parcial'
                          comment_response:
                            type: string
                            example: null
                          created_at:
                            type: string
                            example: '2024-01-15T10:00:00.000000Z'
                          updated_at:
                            type: string
                            example: '2024-01-15T16:00:00.000000Z'
                  -
                    description: 'Éxito - Rechazado'
                    type: object
                    example:
                      message: 'Estado actualizado exitosamente'
                      data:
                        id: 1
                        payment_header_id: 1
                        DocNum: DOC-001
                        amount: '500.00'
                        payment_type: partial
                        status: active
                        status_recketbot: rejected
                        comment: 'Pago parcial'
                        comment_response: 'Documento no encontrado en el sistema'
                        created_at: '2024-01-15T10:00:00.000000Z'
                        updated_at: '2024-01-15T16:00:00.000000Z'
                    properties:
                      message:
                        type: string
                        example: 'Estado actualizado exitosamente'
                      data:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          payment_header_id:
                            type: integer
                            example: 1
                          DocNum:
                            type: string
                            example: DOC-001
                          amount:
                            type: string
                            example: '500.00'
                          payment_type:
                            type: string
                            example: partial
                          status:
                            type: string
                            example: active
                          status_recketbot:
                            type: string
                            example: rejected
                          comment:
                            type: string
                            example: 'Pago parcial'
                          comment_response:
                            type: string
                            example: 'Documento no encontrado en el sistema'
                          created_at:
                            type: string
                            example: '2024-01-15T10:00:00.000000Z'
                          updated_at:
                            type: string
                            example: '2024-01-15T16:00:00.000000Z'
        422:
          description: 'Error - Rechazo sin comentario'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Error de validacion'
                  errors:
                    comment_response:
                      - 'El campo comment response es obligatorio cuando status recketbot es rejected.'
                properties:
                  message:
                    type: string
                    example: 'Error de validacion'
                  errors:
                    type: object
                    properties:
                      comment_response:
                        type: array
                        example:
                          - 'El campo comment response es obligatorio cuando status recketbot es rejected.'
                        items:
                          type: string
      tags:
        - 'Pagos (Detalles)'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'ID del detalle de pago.'
                  example: 1
                status_recketbot:
                  type: string
                  description: 'Estado del procesamiento. Valores permitidos: inserted, rejected.'
                  example: inserted
                comment_response:
                  type: string
                  description: "Comentario de respuesta (obligatorio si status_recketbot es 'rejected')."
                  example: 'Documento no encontrado en el sistema'
              required:
                - id
                - status_recketbot
  '/api/payment-detail/{id}':
    delete:
      summary: 'Eliminar detalle de pago'
      operationId: eliminarDetalleDePago
      description: "Elimina un detalle de pago (soft delete - cambia el estado a 'inactive')."
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  payment_header_id: 1
                  DocNum: DOC-001
                  amount: '500.00'
                  payment_type: partial
                  status: inactive
                  status_recketbot: pending
                  comment: 'Pago parcial'
                  comment_response: null
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T14:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  payment_header_id:
                    type: integer
                    example: 1
                  DocNum:
                    type: string
                    example: DOC-001
                  amount:
                    type: string
                    example: '500.00'
                  payment_type:
                    type: string
                    example: partial
                  status:
                    type: string
                    example: inactive
                  status_recketbot:
                    type: string
                    example: pending
                  comment:
                    type: string
                    example: 'Pago parcial'
                  comment_response:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T14:00:00.000000Z'
      tags:
        - 'Pagos (Detalles)'
    parameters:
      -
        in: path
        name: id
        description: 'ID del detalle de pago a eliminar.'
        example: 1
        required: true
        schema:
          type: integer
  /api/payment-header/all:
    get:
      summary: 'Listar todos los pagos'
      operationId: listarTodosLosPagos
      description: 'Obtiene todos los pagos sin filtrar por compañía ni estado, con sus relaciones.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    user_id:
                      type: integer
                      example: 1
                    company_id:
                      type: integer
                      example: 1
                    card_code:
                      type: string
                      example: CLI001
                    amount:
                      type: string
                      example: '1000.0000'
                    status_rocketbot:
                      type: string
                      example: pending
                    status:
                      type: string
                      example: active
                    company:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'Empresa ABC'
                    transfer_type:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: Transferencia
                    money:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: USD
                        initials:
                          type: string
                          example: USD
                    bank_origin:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'Banco Nacional'
                    bank_destination:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 2
                        name:
                          type: string
                          example: 'Banco Internacional'
                    user:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: Admin
                example:
                  -
                    id: 1
                    user_id: 1
                    company_id: 1
                    card_code: CLI001
                    amount: '1000.0000'
                    status_rocketbot: pending
                    status: active
                    company:
                      id: 1
                      name: 'Empresa ABC'
                    transfer_type:
                      id: 1
                      name: Transferencia
                    money:
                      id: 1
                      name: USD
                      initials: USD
                    bank_origin:
                      id: 1
                      name: 'Banco Nacional'
                    bank_destination:
                      id: 2
                      name: 'Banco Internacional'
                    user:
                      id: 1
                      name: Admin
      tags:
        - 'Pagos (Encabezados)'
  '/api/payment-header/pending/{companyId}':
    get:
      summary: 'Listar pagos pendientes por compañía'
      operationId: listarPagosPendientesPorCompaa
      description: "Obtiene todos los pagos con status_rocketbot = 'pending' de una compañía, incluyendo detalles y nombres de todas las relaciones."
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    user_id:
                      type: integer
                      example: 1
                    company_id:
                      type: integer
                      example: 1
                    card_code:
                      type: string
                      example: CLI001
                    transfer_type_id:
                      type: integer
                      example: 1
                    money_id:
                      type: integer
                      example: 1
                    bank_origin_id:
                      type: integer
                      example: 1
                    bank_destination_id:
                      type: integer
                      example: 2
                    reference:
                      type: string
                      example: REF-001
                    amount:
                      type: string
                      example: '1000.0000'
                    path_payment:
                      type: string
                      example: payments/1/file.pdf
                    status_rocketbot:
                      type: string
                      example: pending
                    status:
                      type: string
                      example: active
                    company:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'Empresa ABC'
                    transfer_type:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: Transferencia
                    money:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: USD
                        initials:
                          type: string
                          example: USD
                    bank_origin:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'Banco Nacional'
                    bank_destination:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 2
                        name:
                          type: string
                          example: 'Banco Internacional'
                    user:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: Admin
                    details:
                      type: array
                      example:
                        -
                          id: 1
                          payment_header_id: 1
                          DocNum: DOC001
                          amount: '1000.0000'
                          payment_type: full
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          payment_header_id:
                            type: integer
                            example: 1
                          DocNum:
                            type: string
                            example: DOC001
                          amount:
                            type: string
                            example: '1000.0000'
                          payment_type:
                            type: string
                            example: full
                example:
                  -
                    id: 1
                    user_id: 1
                    company_id: 1
                    card_code: CLI001
                    transfer_type_id: 1
                    money_id: 1
                    bank_origin_id: 1
                    bank_destination_id: 2
                    reference: REF-001
                    amount: '1000.0000'
                    path_payment: payments/1/file.pdf
                    status_rocketbot: pending
                    status: active
                    company:
                      id: 1
                      name: 'Empresa ABC'
                    transfer_type:
                      id: 1
                      name: Transferencia
                    money:
                      id: 1
                      name: USD
                      initials: USD
                    bank_origin:
                      id: 1
                      name: 'Banco Nacional'
                    bank_destination:
                      id: 2
                      name: 'Banco Internacional'
                    user:
                      id: 1
                      name: Admin
                    details:
                      -
                        id: 1
                        payment_header_id: 1
                        DocNum: DOC001
                        amount: '1000.0000'
                        payment_type: full
      tags:
        - 'Pagos (Encabezados)'
    parameters:
      -
        in: path
        name: companyId
        description: 'ID de la compañía.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/payment-header/single/{id}':
    get:
      summary: 'Obtener un pago'
      operationId: obtenerUnPago
      description: 'Obtiene los datos de un pago específico con sus relaciones y detalles.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  user_id: 1
                  company_id: 1
                  card_code: CLI001
                  transfer_type_id: 1
                  money_id: 1
                  bank_origin_id: 1
                  bank_destination_id: 2
                  reference: REF-001
                  amount: '1000.0000'
                  path_payment: payments/1/file.pdf
                  status_rocketbot: pending
                  status: active
                  company:
                    id: 1
                    name: 'Empresa ABC'
                  transfer_type:
                    id: 1
                    name: Transferencia
                  money:
                    id: 1
                    name: USD
                    initials: USD
                  bank_origin:
                    id: 1
                    name: 'Banco Nacional'
                  bank_destination:
                    id: 2
                    name: 'Banco Internacional'
                  user:
                    id: 1
                    name: Admin
                  details:
                    -
                      id: 1
                      payment_header_id: 1
                      DocNum: DOC001
                      amount: '1000.0000'
                      payment_type: full
                      status: active
                properties:
                  id:
                    type: integer
                    example: 1
                  user_id:
                    type: integer
                    example: 1
                  company_id:
                    type: integer
                    example: 1
                  card_code:
                    type: string
                    example: CLI001
                  transfer_type_id:
                    type: integer
                    example: 1
                  money_id:
                    type: integer
                    example: 1
                  bank_origin_id:
                    type: integer
                    example: 1
                  bank_destination_id:
                    type: integer
                    example: 2
                  reference:
                    type: string
                    example: REF-001
                  amount:
                    type: string
                    example: '1000.0000'
                  path_payment:
                    type: string
                    example: payments/1/file.pdf
                  status_rocketbot:
                    type: string
                    example: pending
                  status:
                    type: string
                    example: active
                  company:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Empresa ABC'
                  transfer_type:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: Transferencia
                  money:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: USD
                      initials:
                        type: string
                        example: USD
                  bank_origin:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Banco Nacional'
                  bank_destination:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                      name:
                        type: string
                        example: 'Banco Internacional'
                  user:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: Admin
                  details:
                    type: array
                    example:
                      -
                        id: 1
                        payment_header_id: 1
                        DocNum: DOC001
                        amount: '1000.0000'
                        payment_type: full
                        status: active
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        payment_header_id:
                          type: integer
                          example: 1
                        DocNum:
                          type: string
                          example: DOC001
                        amount:
                          type: string
                          example: '1000.0000'
                        payment_type:
                          type: string
                          example: full
                        status:
                          type: string
                          example: active
      tags:
        - 'Pagos (Encabezados)'
    parameters:
      -
        in: path
        name: id
        description: 'ID del pago.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/payment-header/{companyId}':
    get:
      summary: 'Listar pagos activos por compañía'
      operationId: listarPagosActivosPorCompaa
      description: 'Obtiene todos los pagos activos de una compañía con sus relaciones.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    user_id:
                      type: integer
                      example: 1
                    company_id:
                      type: integer
                      example: 1
                    card_code:
                      type: string
                      example: CLI001
                    transfer_type_id:
                      type: integer
                      example: 1
                    money_id:
                      type: integer
                      example: 1
                    bank_origin_id:
                      type: integer
                      example: 1
                    bank_destination_id:
                      type: integer
                      example: 2
                    reference:
                      type: string
                      example: REF-001
                    amount:
                      type: string
                      example: '1000.0000'
                    path_payment:
                      type: string
                      example: payments/1/file.pdf
                    reported_platform:
                      type: string
                      example: local
                    status_rocketbot:
                      type: string
                      example: pending
                    status:
                      type: string
                      example: active
                    comment:
                      type: string
                      example: null
                    comment_response:
                      type: string
                      example: null
                    created_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                    updated_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                    company:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'Empresa ABC'
                    transfer_type:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: Transferencia
                    money:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: USD
                        initials:
                          type: string
                          example: USD
                    bank_origin:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'Banco Nacional'
                    bank_destination:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 2
                        name:
                          type: string
                          example: 'Banco Internacional'
                    user:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: Admin
                example:
                  -
                    id: 1
                    user_id: 1
                    company_id: 1
                    card_code: CLI001
                    transfer_type_id: 1
                    money_id: 1
                    bank_origin_id: 1
                    bank_destination_id: 2
                    reference: REF-001
                    amount: '1000.0000'
                    path_payment: payments/1/file.pdf
                    reported_platform: local
                    status_rocketbot: pending
                    status: active
                    comment: null
                    comment_response: null
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
                    company:
                      id: 1
                      name: 'Empresa ABC'
                    transfer_type:
                      id: 1
                      name: Transferencia
                    money:
                      id: 1
                      name: USD
                      initials: USD
                    bank_origin:
                      id: 1
                      name: 'Banco Nacional'
                    bank_destination:
                      id: 2
                      name: 'Banco Internacional'
                    user:
                      id: 1
                      name: Admin
      tags:
        - 'Pagos (Encabezados)'
    parameters:
      -
        in: path
        name: companyId
        description: 'ID de la compañía.'
        example: 1
        required: true
        schema:
          type: integer
  /api/payment-header:
    post:
      summary: 'Crear pago con archivo y detalles'
      operationId: crearPagoConArchivoYDetalles
      description: 'Crea un nuevo pago con su comprobante (archivo) y detalles. La suma de los montos de los detalles debe ser igual al monto del encabezado.'
      parameters: []
      responses:
        201:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Pago creado exitosamente'
                  data:
                    id: 1
                    user_id: 1
                    company_id: 1
                    card_code: CLI001
                    amount: '1000.0000'
                    status_rocketbot: pending
                    status: active
                    details:
                      -
                        id: 1
                        DocNum: DOC001
                        amount: '1000.0000'
                properties:
                  message:
                    type: string
                    example: 'Pago creado exitosamente'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      user_id:
                        type: integer
                        example: 1
                      company_id:
                        type: integer
                        example: 1
                      card_code:
                        type: string
                        example: CLI001
                      amount:
                        type: string
                        example: '1000.0000'
                      status_rocketbot:
                        type: string
                        example: pending
                      status:
                        type: string
                        example: active
                      details:
                        type: array
                        example:
                          -
                            id: 1
                            DocNum: DOC001
                            amount: '1000.0000'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            DocNum:
                              type: string
                              example: DOC001
                            amount:
                              type: string
                              example: '1000.0000'
        422:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Montos no coinciden'
                    type: object
                    example:
                      message: 'Error de validacion'
                      errors:
                        amount:
                          - 'La suma de los montos de los detalles (500.0000) no coincide con el monto del encabezado (1000.0000)'
                    properties:
                      message:
                        type: string
                        example: 'Error de validacion'
                      errors:
                        type: object
                        properties:
                          amount:
                            type: array
                            example:
                              - 'La suma de los montos de los detalles (500.0000) no coincide con el monto del encabezado (1000.0000)'
                            items:
                              type: string
                  -
                    description: 'Error de validación'
                    type: object
                    example:
                      message: 'Error de validacion'
                      errors:
                        company_id:
                          - 'El campo company_id es obligatorio.'
                    properties:
                      message:
                        type: string
                        example: 'Error de validacion'
                      errors:
                        type: object
                        properties:
                          company_id:
                            type: array
                            example:
                              - 'El campo company_id es obligatorio.'
                            items:
                              type: string
      tags:
        - 'Pagos (Encabezados)'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                company_id:
                  type: integer
                  description: 'ID de la compañía.'
                  example: 1
                card_code:
                  type: string
                  description: 'Código del cliente/tarjeta.'
                  example: CLI001
                transfer_type_id:
                  type: integer
                  description: 'ID del tipo de transferencia.'
                  example: 1
                money_id:
                  type: integer
                  description: 'ID de la moneda.'
                  example: 1
                bank_origin_id:
                  type: integer
                  description: 'ID del banco origen.'
                  example: 1
                bank_destination_id:
                  type: integer
                  description: 'ID del banco destino.'
                  example: 2
                reference:
                  type: string
                  description: 'Referencia del pago.'
                  example: REF-001
                amount:
                  type: number
                  description: 'Monto total del pago.'
                  example: 1000.0
                file:
                  type: string
                  format: binary
                  description: 'Comprobante de pago (PDF, JPG, JPEG, PNG. Máximo 10MB).'
                reported_platform:
                  type: string
                  description: 'Plataforma desde donde se reporta.'
                  example: web
                  nullable: true
                comment:
                  type: string
                  description: 'Comentario adicional.'
                  example: 'Pago por servicios'
                  nullable: true
                details:
                  type: array
                  description: 'Lista de detalles del pago.'
                  example:
                    - architecto
                  items:
                    type: string
              required:
                - company_id
                - card_code
                - transfer_type_id
                - money_id
                - bank_origin_id
                - bank_destination_id
                - reference
                - amount
                - file
                - details
    put:
      summary: 'Actualizar pago'
      operationId: actualizarPago
      description: 'Actualiza los datos de un pago existente (sin modificar el archivo ni los detalles).'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  company_id: 1
                  card_code: CLI001
                  reference: REF-001-UPDATED
                  amount: '1500.0000'
                  status: active
                properties:
                  id:
                    type: integer
                    example: 1
                  company_id:
                    type: integer
                    example: 1
                  card_code:
                    type: string
                    example: CLI001
                  reference:
                    type: string
                    example: REF-001-UPDATED
                  amount:
                    type: string
                    example: '1500.0000'
                  status:
                    type: string
                    example: active
        422:
          description: 'Error de validación'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Error al actualizar el pago'
                  errors:
                    id:
                      - 'El campo id es obligatorio.'
                properties:
                  message:
                    type: string
                    example: 'Error al actualizar el pago'
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        example:
                          - 'El campo id es obligatorio.'
                        items:
                          type: string
      tags:
        - 'Pagos (Encabezados)'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'ID del pago a actualizar.'
                  example: 1
                company_id:
                  type: integer
                  description: 'ID de la compañía.'
                  example: 1
                card_code:
                  type: string
                  description: 'Código del cliente/tarjeta.'
                  example: CLI001
                transfer_type_id:
                  type: integer
                  description: 'ID del tipo de transferencia.'
                  example: 1
                money_id:
                  type: integer
                  description: 'ID de la moneda.'
                  example: 1
                bank_origin_id:
                  type: integer
                  description: 'ID del banco origen.'
                  example: 1
                bank_destination_id:
                  type: integer
                  description: 'ID del banco destino.'
                  example: 2
                reference:
                  type: string
                  description: 'Referencia del pago.'
                  example: REF-001-UPDATED
                amount:
                  type: number
                  description: 'Monto total del pago.'
                  example: 1500.0
                reported_platform:
                  type: string
                  description: 'Plataforma desde donde se reporta.'
                  example: web
                  nullable: true
                status:
                  type: string
                  description: 'Estado del pago. Valores: active, inactive.'
                  example: active
                comment:
                  type: string
                  description: 'Comentario adicional.'
                  example: 'Pago actualizado'
                  nullable: true
              required:
                - id
                - company_id
                - card_code
                - transfer_type_id
                - money_id
                - bank_origin_id
                - bank_destination_id
                - reference
                - amount
                - status
  /api/payment-header/status:
    put:
      summary: 'Actualizar estado de Rocketbot'
      operationId: actualizarEstadoDeRocketbot
      description: "Actualiza el estado de procesamiento de un pago (inserted o rejected). Si el estado es 'rejected', el campo comment_response es obligatorio. También actualiza el estado de todos los detalles asociados."
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Estado actualizado exitosamente'
                  data:
                    id: 1
                    status_rocketbot: inserted
                    comment_response: null
                    details:
                      -
                        id: 1
                        status_recketbot: inserted
                properties:
                  message:
                    type: string
                    example: 'Estado actualizado exitosamente'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      status_rocketbot:
                        type: string
                        example: inserted
                      comment_response:
                        type: string
                        example: null
                      details:
                        type: array
                        example:
                          -
                            id: 1
                            status_recketbot: inserted
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            status_recketbot:
                              type: string
                              example: inserted
        422:
          description: 'Falta comentario en rechazo'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Error de validacion'
                  errors:
                    comment_response:
                      - 'El campo comment_response es obligatorio cuando el estado es rejected.'
                properties:
                  message:
                    type: string
                    example: 'Error de validacion'
                  errors:
                    type: object
                    properties:
                      comment_response:
                        type: array
                        example:
                          - 'El campo comment_response es obligatorio cuando el estado es rejected.'
                        items:
                          type: string
      tags:
        - 'Pagos (Encabezados)'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'ID del pago a actualizar.'
                  example: 1
                status_rocketbot:
                  type: string
                  description: 'Nuevo estado. Valores: inserted, rejected.'
                  example: inserted
                comment_response:
                  type: string
                  description: "Comentario de respuesta (obligatorio si status_rocketbot es 'rejected')."
                  example: 'Datos incorrectos'
              required:
                - id
                - status_rocketbot
  '/api/payment-header/{id}':
    delete:
      summary: 'Eliminar pago'
      operationId: eliminarPago
      description: "Elimina un pago (soft delete - cambia el estado a 'inactive')."
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  status: inactive
                properties:
                  id:
                    type: integer
                    example: 1
                  status:
                    type: string
                    example: inactive
      tags:
        - 'Pagos (Encabezados)'
    parameters:
      -
        in: path
        name: id
        description: 'ID del pago a eliminar.'
        example: 1
        required: true
        schema:
          type: integer
  /api/transfer-type/all:
    get:
      summary: 'Listar todos los tipos de transferencia'
      operationId: listarTodosLosTiposDeTransferencia
      description: 'Obtiene todos los tipos de transferencia sin filtrar por compañía ni estado.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    company_id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: 'Transferencia Bancaria'
                    description:
                      type: string
                      example: 'Transferencia entre cuentas bancarias'
                    status:
                      type: string
                      example: active
                    created_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                    updated_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                example:
                  -
                    id: 1
                    company_id: 1
                    name: 'Transferencia Bancaria'
                    description: 'Transferencia entre cuentas bancarias'
                    status: active
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
      tags:
        - 'Tipos de Transferencia'
  '/api/transfer-type/single/{transferType}':
    get:
      summary: 'Obtener un tipo de transferencia'
      operationId: obtenerUnTipoDeTransferencia
      description: 'Obtiene los datos de un tipo de transferencia específico por su ID.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  company_id: 1
                  name: 'Transferencia Bancaria'
                  description: 'Transferencia entre cuentas bancarias'
                  status: active
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T10:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  company_id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Transferencia Bancaria'
                  description:
                    type: string
                    example: 'Transferencia entre cuentas bancarias'
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
      tags:
        - 'Tipos de Transferencia'
    parameters:
      -
        in: path
        name: transferType
        description: 'ID del tipo de transferencia.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/transfer-type/{companyId}':
    get:
      summary: 'Listar tipos de transferencia activos por compañía'
      operationId: listarTiposDeTransferenciaActivosPorCompaa
      description: 'Obtiene todos los tipos de transferencia activos de una compañía específica.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    company_id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: 'Transferencia Bancaria'
                    description:
                      type: string
                      example: 'Transferencia entre cuentas bancarias'
                    status:
                      type: string
                      example: active
                    created_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                    updated_at:
                      type: string
                      example: '2024-01-15T10:00:00.000000Z'
                example:
                  -
                    id: 1
                    company_id: 1
                    name: 'Transferencia Bancaria'
                    description: 'Transferencia entre cuentas bancarias'
                    status: active
                    created_at: '2024-01-15T10:00:00.000000Z'
                    updated_at: '2024-01-15T10:00:00.000000Z'
      tags:
        - 'Tipos de Transferencia'
    parameters:
      -
        in: path
        name: companyId
        description: 'ID de la compañía.'
        example: 1
        required: true
        schema:
          type: integer
  /api/transfer-type:
    post:
      summary: 'Crear tipo de transferencia'
      operationId: crearTipoDeTransferencia
      description: 'Crea un nuevo tipo de transferencia en el sistema.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  company_id: 1
                  name: 'Transferencia Bancaria'
                  description: 'Transferencia entre cuentas bancarias'
                  status: active
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T10:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  company_id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Transferencia Bancaria'
                  description:
                    type: string
                    example: 'Transferencia entre cuentas bancarias'
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
        422:
          description: 'Error de validación'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Error al crear el tipo de transferencia'
                  errors:
                    name:
                      - 'El campo name es obligatorio.'
                properties:
                  message:
                    type: string
                    example: 'Error al crear el tipo de transferencia'
                  errors:
                    type: object
                    properties:
                      name:
                        type: array
                        example:
                          - 'El campo name es obligatorio.'
                        items:
                          type: string
      tags:
        - 'Tipos de Transferencia'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                company_id:
                  type: integer
                  description: 'ID de la compañía a la que pertenece.'
                  example: 1
                name:
                  type: string
                  description: 'Nombre del tipo de transferencia.'
                  example: 'Transferencia Bancaria'
                description:
                  type: string
                  description: 'Descripción del tipo de transferencia.'
                  example: 'Transferencia entre cuentas bancarias'
                  nullable: true
                status:
                  type: string
                  description: 'Estado del tipo. Valores permitidos: active, inactive.'
                  example: active
              required:
                - company_id
                - name
    put:
      summary: 'Actualizar tipo de transferencia'
      operationId: actualizarTipoDeTransferencia
      description: 'Actualiza los datos de un tipo de transferencia existente.'
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  company_id: 1
                  name: 'Transferencia ACH'
                  description: 'Transferencia automatizada'
                  status: active
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T12:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  company_id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Transferencia ACH'
                  description:
                    type: string
                    example: 'Transferencia automatizada'
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T12:00:00.000000Z'
        422:
          description: 'Error de validación'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Error al actualizar el tipo de transferencia'
                  errors:
                    id:
                      - 'El campo id es obligatorio.'
                properties:
                  message:
                    type: string
                    example: 'Error al actualizar el tipo de transferencia'
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        example:
                          - 'El campo id es obligatorio.'
                        items:
                          type: string
      tags:
        - 'Tipos de Transferencia'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'ID del tipo de transferencia a actualizar.'
                  example: 1
                company_id:
                  type: integer
                  description: 'ID de la compañía.'
                  example: 1
                name:
                  type: string
                  description: 'Nombre del tipo de transferencia.'
                  example: 'Transferencia ACH'
                description:
                  type: string
                  description: 'Descripción del tipo de transferencia.'
                  example: 'Transferencia automatizada'
                  nullable: true
                status:
                  type: string
                  description: 'Estado del tipo. Valores permitidos: active, inactive.'
                  example: active
              required:
                - id
                - company_id
                - name
                - status
  '/api/transfer-type/{id}':
    delete:
      summary: 'Eliminar tipo de transferencia'
      operationId: eliminarTipoDeTransferencia
      description: "Elimina un tipo de transferencia (soft delete - cambia el estado a 'deleted')."
      parameters: []
      responses:
        200:
          description: Éxito
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  company_id: 1
                  name: 'Transferencia Bancaria'
                  description: 'Transferencia entre cuentas bancarias'
                  status: deleted
                  created_at: '2024-01-15T10:00:00.000000Z'
                  updated_at: '2024-01-15T14:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  company_id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Transferencia Bancaria'
                  description:
                    type: string
                    example: 'Transferencia entre cuentas bancarias'
                  status:
                    type: string
                    example: deleted
                  created_at:
                    type: string
                    example: '2024-01-15T10:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2024-01-15T14:00:00.000000Z'
      tags:
        - 'Tipos de Transferencia'
    parameters:
      -
        in: path
        name: id
        description: 'ID del tipo de transferencia a eliminar.'
        example: 1
        required: true
        schema:
          type: integer
