<?php

namespace Modules\Payment\Http\Controllers;

use Illuminate\Contracts\Support\Renderable;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Modules\Payment\Services\PaymentService;

class PaymentController extends Controller
{
   protected $service;
   public function __construct(PaymentService $paymentService)
   {
       $this->service=$paymentService;
       $this->middleware('auth:sanctum');
   }

    public function paymentsList()
    {
        return $this->service->list();
   }

    public function addPayment(Request $request)
    {
        return $this->service->add($request);
   }

    public function showPayment($id)
    {
        return $this->service->show($id);
   }

   public function deletePayment($id)
    {
        return $this->service->delete($id);
   }
}
