for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Xsolve\SalesforceClient\Request;
use Xsolve\SalesforceClient\Enum\AbstractSObjectType;
use Xsolve\SalesforceClient\Enum\ContentType;
use Xsolve\SalesforceClient\Enum\RequestMethod;
class Create implements RequestInterface
{
const ENDPOINT = '/sobjects/%s/';
/**
* @var AbstractSObjectType
*/
protected $objectType;
* @var array
protected $params;
public function __construct(AbstractSObjectType $objectType, array $params = [])
$this->objectType = $objectType;
$this->params = $params;
}
* {@inheritdoc}
public function getEndpoint(): string
return sprintf(self::ENDPOINT, $this->objectType->value());
public function getMethod(): RequestMethod
return RequestMethod::POST();
public function getParams(): array
return $this->params;
public function getContentType(): ContentType
return ContentType::JSON();