for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace flipbox\hubspot\queue\jobs;
use Craft;
use craft\db\Query;
use craft\elements\db\ElementQuery;
use craft\queue\BaseJob;
use flipbox\hubspot\connections\IntegrationConnectionInterface;
use flipbox\hubspot\HubSpot;
class UpsertTimelineEvent extends BaseJob
{
/**
* @var string
*/
public $id;
public $typeId;
* @var array
public $payload = [];
* @var IntegrationConnectionInterface
public $connection;
* @param \craft\queue\QueueInterface|\yii\queue\Queue $queue
* @return bool|false|string
* @throws \yii\base\InvalidConfigException
public function execute($queue)
HubSpot::getInstance()->getResources()->getTimelineEvents()->upsert(
$this->id,
$this->typeId,
$this->payload,
$this->connection
);
}
* @inheritdoc
protected function defaultDescription(): string
return Craft::t('hubspot', 'Create/Update HubSpot timeline event.');