<?php

namespace App\Modules\Wallet\Interfaces;

use App\Models\Wallet;

interface WalletServiceInterface
{
    public function getOrCreateWallet(string $userId): Wallet;

    public function getBalance(string $userId): float;

    public function fundWallet(string $userId, float $amount, string $providerRef, array $metadata = []): void;

    public function debitWallet(string $userId, float $amount, string $description, string $reference, ?string $relatedType = null, ?string $relatedId = null): void;

    public function refundWallet(string $userId, float $amount, string $description, string $reference, ?string $relatedType = null, ?string $relatedId = null): void;

    public function canDebit(string $userId, float $amount): bool;

    public function getTransactions(string $userId, int $perPage = 15, ?string $type = null, ?string $fromDate = null, ?string $toDate = null);

    public function getStatement(string $userId, ?string $fromDate = null, ?string $toDate = null);
}
