<?php

namespace App\Classes\Jobs\Commands\V2;

use App\Events\ETLPurchaseOrderTransactionCompleteEvent;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\SerializesModels;

class ETLPurchaseOrderTransactionCompleteV2CommandJob implements ShouldQueue
{
    use Dispatchable, Queueable, SerializesModels;

    public $update;
    public $bookingId;

    public function __construct(bool $update, int $bookingId)
    {
        $this->update = $update;
        $this->bookingId = $bookingId;
    }

    public function handle()
    {
        event(new ETLPurchaseOrderTransactionCompleteEvent($this->update, $this->bookingId));
    }
}
