<?php

namespace Modules\Bms\Services\Contracts;

/**
 * Payments boundary — reuses ERP payment recording (cash/transfer/
 * installments). Recording only; no card processing. Implemented against the
 * ERP core in Milestone 7.
 */
interface PaymentServiceContract
{
    /**
     * Record a payment against a booking's ERP invoice.
     *
     * @return int|null  ERP payment id
     */
    public function recordPayment(int $businessId, int $bookingId, array $payment): ?int;

    /**
     * Payment schedule + collected amounts for a booking.
     */
    public function scheduleForBooking(int $businessId, int $bookingId): array;

    /**
     * Record a refund (is_return) against a booking's ERP invoice.
     *
     * @return int|null  ERP refund payment id (null when amount <= 0)
     */
    public function refund(int $businessId, int $bookingId, float $amount, ?string $note = null): ?int;
}
