Makes a POST request to the API and creates a new object.

@param $data
@return \Billogram\Api\Objects\SimpleObject
495966
public function create($data)
    {
        $response = $this->api->post($this->url(), $data);
        $className = $this->objectClass;

        return new $className($this->api, $this, $response->data);
    }
845427
public function create(array $data) : Model
    {
        $model_class = $this->getModelName();
        return $this->postCreate($data, $model_class::create($this->preCreate($this->parseData($data))));
    }
1097545
public function sendData($data)
    {
        $response = $this->braintree->transaction()->void($data['transactionReference']);

        return $this->createResponse($response);
    }
230911
public function sendData($data)
    {
        $response = $this->braintree->merchantAccount()->create($data);

        return $this->response = new Response($this, $response);
    }
203619
protected function create($data = null)
    {
        if ($this->hasMethod('__create') && is_callable([$this, '__create'])) {
            return $this->__create($data);
        }

        // notify observers about new data
        $this->notify();
    }
940715
public function sendData($data)
    {
        $response = $this->gocardless->mandates()->update($data['mandateId'], $data['mandateData']);

        return $this->response = new MandateResponse($this, $response);
    }
271072
public function create($data)
	{
		// @todo: Implement processing
		$processPayload = new Payload($data, Payload::STATUS_VALID); // @todo: Super temporary WIP

		// // Process data given.
		// $processPayload = $this->process(__FUNCTION__, $data);

		// if( ! $processPayload->isStatus(Payload::STATUS_VALID))
		// {
		// 	return $processPayload;
		// }

		// Create the entity with the given data.
		$aggregatePayload = $this->aggregate[self::getEntityType()]->create($processPayload->getData());

		// No need to procede if dynamic content was not created.
		if( ! $aggregatePayload->isStatus(Payload::STATUS_CREATED))
		{
			return $aggregatePayload;
		}

		// Create the newly created entity's EntityIdentifier.
		$identifierPayload = $this->createIdentifier($aggregatePayload->getData());

		if( ! $identifierPayload->isStatus(Payload::STATUS_CREATED))
		{
			return $identifierPayload;
		}

		// @todo: The following currently adds an additional query just for the ease of getting the full entity to return.
		$createdEntityPayload = $this->getOneByUuid($aggregatePayload->getData()->getUuid());

		if( ! $createdEntityPayload->isStatus(Payload::STATUS_FOUND))
		{
			return $createdEntityPayload;
		}

		return new Payload($createdEntityPayload->getData(), $aggregatePayload->getStatus());
	}
1289152
public function make($data)
    {
        if (is_object($data) && $data instanceof Request) {
            return new RequestTransformer();
        }

        if (is_array($data)) {
            return new ArrayTransformer();
        }

        throw new InvalidArgumentException('An array, or an instance of Illuminate\Http\Request was expected.');
    }
1288111
public function sendData($data)
    {
        $response = $this->braintree->paymentMethod()->delete($data);

        return $this->createResponse($response);
    }
1325663
public function create($data)
    {
        $dateTime = new \DateTime();

        $result = [
                'responseTime' => $dateTime->getTimestamp(),
                'requestTime' => (float) $data['requestTime']
        ];

        return new ApiJsonModel($result);
    }
45161
public function sendData($data)
    {
        $response = $this->gocardless->payments()->cancel($this->getPaymentId());

        return $this->response = new PaymentResponse($this, $response);
    }
248034
public function sendData($data)
    {
        $response = $this->braintree->customer()->find($this->getCustomerId());

        return $this->response = new CustomerResponse($this, $response);
    }
348303
public function create($data)
    {
        $methodDescriptor = new MethodDescriptor();
        $this->mapReflectorToDescriptor($data, $methodDescriptor);

        $this->assembleDocBlock($data->getDocBlock(), $methodDescriptor);
        $this->addArguments($data, $methodDescriptor);
        $this->addVariadicArgument($data, $methodDescriptor);

        return $methodDescriptor;
    }
364108
public static function CreateFromResponse(array $data)
    {
        if (array_key_exists("data", $data) && is_array($data["data"]))
        {
            $data = $data["data"];
        }

        $object_field = new self($data["alias"], $data["type"], $data["options"], $data["required"], $data["unique"]);
        if ($data["field"])
        {
            $object_field->setField($data["field"]);
        }
        if ($data["id"])
        {
            $object_field->setId($data["id"]);
        }
        return $object_field;
    }
650973
protected function getOrCreateObject(?array $data = null)
    {
        if ($data === null) {
            return null;
        }

        return $this->objectManager->getOrCreateObject(
            $this->getClassName(),
            $data
        );
    }
1219144
public function sendData($data)
    {
        $response = $this->gocardless->customers()->create($data);

        return $this->response = new CustomerResponse($this, $response);
    }
888479
public function create($data = [])
	{
		$created = $this->model->create($data);

		if( ! $created)
		{
			return new Payload(null, 'not_created');
		}

		return new Payload($created, 'created');
	}