<?php

namespace Database\Seeders;

use App\Domains\Integration\Models\Integration;
use Illuminate\Database\Seeder;

class TelepagosIntegrationSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        Integration::updateOrCreate(
            ['integration_code' => 'telepagos'],
            [
                'name' => 'Telepagos',
                'url' => 'https://api.telepagos.com.ar',
                'requires_client_configuration' => true,
                'integration_data_schema' => [
                    'username' => 'required|string',
                    'password' => 'required|string',
                ],
            ]
        );

        Integration::updateOrCreate(
            ['integration_code' => 'telepagos_homo'],
            [
                'name' => 'Telepagos Homologación',
                'url' => 'https://api.homo.telepagos.com.ar',
                'requires_client_configuration' => true,
                'integration_data_schema' => [
                    'username' => 'required|string',
                    'password' => 'required|string',
                ],
            ]
        );
    }
}
