<?php

namespace Modules\Bms\Services\Contracts;

/**
 * BMS ↔ ERP contacts boundary. The BMS never touches the App\Contact model
 * directly; it goes through this contract so contact creation/lookup stays a
 * single, swappable integration point.
 */
interface ContactServiceContract
{
    /**
     * Find an existing customer contact by phone/email within the business,
     * or create a new one from the given attributes.
     *
     * @param  array  $attrs  name, phone, email, (optional) source
     * @return \App\Contact
     */
    public function findOrCreateCustomer(int $businessId, array $attrs);

    /**
     * Resolve a contact by id within a business.
     *
     * @return \App\Contact|null
     */
    public function find(int $businessId, int $contactId);
}
