<?php

namespace App\Classes\Jobs;

use App\Classes\Modules\PackingLists\Processors\FetchContainersFromYdPortalProcessor;
use App\Classes\Modules\PackingLists\Processors\FetchContainersUpdatesFromYdPortalProcessor;
use App\Classes\Modules\PackingLists\Processors\FetchDeliveryUpdatesFromYdPortalProcessor;
use App\Classes\Modules\PackingLists\Processors\FetchOrderListsFromYdPortalProcessor;

use App\Classes\Modules\PackingLists\Processors\FetchPackingListsFromYdPortalProcessor;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class FetchOrdersFromYDPortalJob implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;


    public $timeout = 900;

    /**
     * Execute the job.
     *
     * @return void
     * @throws \Illuminate\Contracts\Container\BindingResolutionException
     */
    public function handle()
    {
        (App()->make(FetchPackingListsFromYdPortalProcessor::class))->execute();
        (App()->make(FetchContainersFromYdPortalProcessor::class))->execute();
        (App()->make(FetchContainersUpdatesFromYdPortalProcessor::class))->execute();
        (App()->make(FetchDeliveryUpdatesFromYdPortalProcessor::class))->execute();

//        (App()->make(FetchOrderListsFromYdPortalProcessor::class))->execute();
    }

}
