Create a new EntityContract given parameters.

@param Bag|array $parameters

@return ResultContract
547830
public function create($parameters)
    {
        return $this->update($this->repository->newEntity(), $parameters, Tokens::PERMISSION_CREATE);
    }
432115
protected function createParameters($parameters)
    {
        if (is_string($parameters)) {
            $parameters = Parameters::parse($parameters);
        } else {
            $parameters = $parameters ?: array();
        }

        if ($this->defaults) {
            $parameters += $this->defaults;
        }

        return new Parameters($parameters);
    }
417861
public function createBatch(array $parameters)
    {
        $supported = $this->isSupported('createBatch');

        return (true === $supported) ? $this->makeRequest($this->endpoint.'/batch/new', $parameters, 'POST') : $supported;
    }
164941
public function completePurchase(array $parameters = [])
    {
        if ($this->isOldApi()) {
            $requestClass = OldCompletePurchaseRequest::class;
        } else {
            $requestClass = CompletePurchaseRequest::class;
        }

        return $this->createRequest($requestClass, $parameters);
    }
935312
protected function createSendmailTransport(array $parameters) {
        $transport = Swift_SendmailTransport::newInstance();
        $command = array_get($parameters, 'command');

        if ($command !== null) {
            $transport->setCommand($command);
        }

        return $transport;
    }
864176
public function validate(EntityContract $entity, Bag $parameters)
    {
        $errors = new Collection();

        $value = $parameters->get($this->getRelationName());

        if ($this->required && !$entity->exists && !$parameters->exists($this->getRelationName())) {
            $errors->push($this->newException(Tokens::NOT_DEFINED, $parameters->get($this->getName())));
        }

        if ($this->unique && $parameters->exists($this->getRelationName()) && $this->isUnique($entity, $value)) {
            $errors->push($this->newException(Tokens::NOT_UNIQUE, $parameters->get($this->getName())));
        }

        if ($parameters->exists($this->getRelationName()) && ($value !== null || $this->required) && !$this->valid($entity, $value)) {
            $errors->push($this->newException(Tokens::NOT_VALID, $parameters->get($this->getName())));
        }

        return $errors;
    }
525785
public function createCustomer($parameters = [])
    {
        $response = $this->client->post('customers', [
            'json' => $parameters,
        ]);
        return json_decode($response->getBody())->customer;
    }
250669
public function create(array $parameters)
    {
        $supported = $this->isSupported('create');

        return (true === $supported) ? $this->makeRequest($this->endpoint.'/new', $parameters, 'POST') : $supported;
    }
406226
public function loadCollection(array $parameters = [], array $headers = [])
    {
        return $this->createCollection(
            $this->getApi()->getGenres($parameters, $headers)
        );
    }
1264493
public function static_create(array $values=[], $groups=[]) {
		return $this->getDataMapper()->create($this->entityClass, $values, $groups);
	}
1143415
public function messages(): MessageBagContract
    {
        if ($this->validator === null) {
            $this->validate();
        }

        if ( ! $this->validator->fails()) {

            return new MessageBag;
        }

        return $this->validator->messages();
    }
631461
public function validate(EntityContract $entity, Bag $parameters)
    {
        $errors = new Collection();

        $this->callMethods('validate', [$entity, $parameters], function ($return) use (&$errors) {
            $errors = $errors->merge($return);
        });

        return $errors;
    }
1121937
public function makeCreatePaymentProfileRequest($parameters)
    {
        $obj = new CIMCreatePaymentProfileRequest($this->httpClient, $this->httpRequest);
        $obj->initialize(array_replace($this->getParameters(), $parameters));
        return $obj->send();
    }
1344782
public function createBatch(CreateBatchParameters $parameters)
    {
        $requestData = $this->getDefaultRequestData('json', $parameters->exportToArray());

        return $this->sendRequest('batches', $requestData, self::HTTP_METHOD_POST);
    }
304095
public function instantiateEntity($params)
    {

        // Modify params so the class builder knows what was included via with()
        $params->_with = $this->with;

        $params->_fields = $this->fields;

        // Instantiate new entity class
        return new $this->class($params);

    }
198253
public function backup(array $parameters)
	{
		foreach ($parameters as $name)
		{
			$this->_backup[$name] = $this->group_for_name($name)->get($name);
		}
		return $this;
	}
210284
protected function createFilterTuple(array $parameters)
    {
        $method = array_shift($parameters);

        if (!$this->isCarbonPredicateMethod($method)) {
            return [$method, array_shift($parameters)];
        }

        return [function ($date) use ($method, $parameters) {
            return call_user_func_array([$date, $method], $parameters);
        }, $method];
    }