<?php

namespace App\Generated\Controllers\V1_1;

use App\Generated\V1_1\Messages\Invite\LastInviteMessage;
use App\Http\Controllers\Controller;
use App\Http\Services\V1_1\InviteService;
use DB;

class InviteController extends Controller
{
    public $handler;

    public function __construct(InviteService $handler)
    {
        $this->handler = $handler;
    }

    public function lastInvite(LastInviteMessage $message)
    {
        $message->validateInput();
        $this->handler->lastInvite($message);
        $message->validateOutput();
        return $message->getResponse();
    }

}
