<?php

namespace App\Classes\Modules\PerfexCRM\Processors;

// use App\Classes\Modules\PerfexCRM\DataTransferObjects\ContactObject;
use App\Classes\Modules\PerfexCRM\Services\CreatesPerfexCRMLead;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\CreateLeadPerfexCRMObject;

class CreatePerfexCRMLeadProcessor
{

    /** @var CreatesPerfexCRMLead */
    private $createsPerfexCRMLead;

    /**
     * CreatePerfexCRMLeadProcessor constructor.
     * @param CreatesPerfexCRMLead $createsPerfexCRMLead
     */
    public function __construct(CreatesPerfexCRMLead $createsPerfexCRMLead)
    {
        $this->createsPerfexCRMLead = $createsPerfexCRMLead;
    }

    /**
     * @param CreateLeadPerfexCRMObject $createLeadPerfexCRMObject
     * @return null|object
     * @throws \App\Classes\Exceptions\MalformedRequestException
     */
    public function execute(CreateLeadPerfexCRMObject $createLeadPerfexCRMObject) {
        return $this->createsPerfexCRMLead->execute($createLeadPerfexCRMObject);
    }

}
