@return \Bukoli\Model\Response\ResultInfo

@throws RequiredFieldException
@throws \Exception
508875
public function request()
    {
        if (is_null($this->integrationOrderSummaryInfo)) {
            throw new RequiredFieldException('IntegrationOrderSummaryInfo');
        }
        $this->response = $this->client->request('OrderSummaryInsert', $this->toArray());

        return $this->response();
    }
195566
protected function getFields()
    {
        if (is_null($this->fields)) {
            $columns = $this->getColumns();

            if (empty($columns)) {
                throw new Exception('The table ' . $this->tableName . ' was not found in the ' . $this->databaseName . ' database.');
            }

            $this->fields = $this->transfer($columns);
        }

        return $this->fields;
    }
1220640
protected function verifyFieldValuesRequirements()
    {
        if (!isset($this->requiredFieldValues)) {
            return;
        }

        $iterator = $this->requiredFieldValues->getArrayCopy();

        foreach ($iterator as $fieldName => $validator) {
            if ($validator instanceof RequestValidator) {
                $validator->run($this, $fieldName);

                continue;
            }

            if (CommonUtils::isValidArray($validator)) {
                if (!in_array($this->$fieldName, $validator)) {
                    throw new \Genesis\Exceptions\ErrorParameter(
                        sprintf(
                            'Required parameter %s is set to %s, but expected to be one of (%s)',
                            $fieldName,
                            $this->$fieldName,
                            implode(
                                ', ',
                                CommonUtils::getSortedArrayByValue($validator)
                            )
                        )
                    );
                }

                continue;
            }

            if ($this->$fieldName !== $validator) {
                throw new \Genesis\Exceptions\ErrorParameter(
                    sprintf(
                        'Required parameter %s is set to %s, but expected to be %s',
                        $fieldName,
                        $this->$fieldName,
                        $validator
                    )
                );
            }
        }
    }
409810
public function getDataFields()
    {
        $url = $this->getApiEndpoint() . self::REST_DATA_FILEDS;
        $this->setUrl($url)
            ->setVerb('GET');

        $response = $this->execute();
        if (isset($response->message)) {
            $message = 'GET ALL DATAFIELDS ' . $response->message;
            $this->helper->debug('getDataFields', [$message]);
        }

        return $response;
    }
357630
public function getAsQuestion()
    {
        $question = new Question($this->getQuestionText(), $this->default);
        $question->setMaxAttempts($this->maxAttempts);
        $question->setValidator(function ($value) {
            if ($this->isEmpty($value) && $this->isRequired()) {
                throw new MissingValueException("'{$this->name}' is required");
            }
            $this->validate($value);

            return $value;
        });
        $question->setAutocompleterValues($this->autoCompleterValues);

        return $question;
    }
849276
public function getPostFields()
    {
        $this->validate();
        $mappedFields = $this->getMappedFields();
        $this->paymentMethod->addAdditionalFields($mappedFields);
        return $mappedFields;
    }
187784
private function getUpdatedEntityResponse()
    {
        $response = $this->getEditionResponse();
        try {
            // Try to store an entity with the data in the request.
            $this->storeEntity();
            $response->addNotice(sprintf(
                _('%s correctly stored.'),
                ucfirst($this->getItemName())
            ));
        } catch (ValidatorException $exception) {
            // The entity could not be stored because of a validation error.
            // Add the error data to the response.
            $response->addErrorMessage(array(
                'validation' => $exception->getValidationStatus(),
            ));
        } catch (\Exception $exception) {
            // An unexpected error has occurred. Display the edition
            // page again.
            $response->addErrorMessage($exception->getMessage());
        }
        // Set the entity data into the response.
        $response->setData(
            $this->getItemName(),
            $this->getEntityData()
        );

        return $response;
    }
143135
public function getResults()
    {
        if (is_null($this->_resultsCache)) {
            $this->_resultsCache = call_user_func($this->getMapper());

            if ($this->prefetchRelatedLookups && !$this->_prefetchRelatedDone) {
                $this->_prefetchRelatedObjects();
            }
        }

        return $this->_resultsCache;
    }
925059
public function getResponse()
    {
        $this->execute();
        
        switch ($this->def['dataType']) {
            case 'array':
                $result = static::toArray();
                break;
            case 'object':
            case 'json':
                $result = static::toJson();
                break;
            default:
                $result = $this->getErrorString() ? : $this->responseText;
        }
        
        return $result;
    }
997447
protected function verifyConditionalFields()
    {
        if (isset($this->requiredFieldsOR)) {
            $fields = $this->requiredFieldsOR->getArrayCopy();

            $status = false;

            foreach ($fields as $fieldName) {
                if (isset($this->$fieldName) && !empty($this->$fieldName)) {
                    $status = true;
                }
            }

            if (!$status) {
                throw new \Genesis\Exceptions\ErrorParameter(implode($fields));
            }
        }
    }
966497
public function getExtraFields()
    {
        $extraFields = new FieldList();

        $token = $this->getSecurityToken();
        if ($token) {
            $tokenField = $token->updateFieldSet($this->fields);
            if ($tokenField) {
                $tokenField->setForm($this);
            }
        }
        $this->securityTokenAdded = true;

        // add the "real" HTTP method if necessary (for PUT, DELETE and HEAD)
        if (strtoupper($this->FormMethod()) != $this->FormHttpMethod()) {
            $methodField = new HiddenField('_method', '', $this->FormHttpMethod());
            $methodField->setForm($this);
            $extraFields->push($methodField);
        }

        return $extraFields;
    }
1350061
public function request()
    {
        $data = $this->prepareData();

        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $this->apiHost . '/api');
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

        $result = curl_exec($ch);
        $this->checkResult($result);

        return $result;
    }
82135
final protected function checkRequiredFields()
    {
        foreach ($this->getRequiredFields() as $requiredField) {
            $value = $this->getAttribute($requiredField);
            if (empty($value)) {
                throw new RequiredFieldException($requiredField);
            }
        }
    }
698039
public function index()
    {
        try {
            $uri = null;
            if ($this->hasRequestParameter("uri")) {
                $uri = $this->getRequestParameter("uri");
                if (!common_Utils::isUri($uri)) {
                    throw new common_exception_InvalidArgumentType();
                }
            }

            switch ($this->getRequestMethod()) {
                case "GET":
                    $response = $this->get($uri);
                    break;
                case "PUT":
                    $response = $this->put($uri);
                    break;
                case "POST":
                    $response = $this->post();
                    break;
                case "DELETE":
                    $response = $this->delete($uri);
                    break;
                default:
                    throw new common_exception_BadRequest($this->getRequestURI());
            }

            $this->returnSuccess($response);

        } catch (Exception $e) {
            if ($e instanceof \common_exception_ValidationFailed &&
                $alias = $this->reverseSearchAlias($e->getField())
            ) {
                $e = new \common_exception_ValidationFailed($alias, null, $e->getCode());
            }

            $this->returnFailure($e);
        }
    }
1258025
protected function getQueryResult()
    {
        if ($this->queryResult) {
            return $this->queryResult;
        }

        return $this->queryResult = $this->getSelector()
            ->getSelectBuilder()
            ->execute();
    }
1245887
public function getResult()
    {
        $result = $this->execute();
        $list = new ArrayCollection;

        //Loop through results
        foreach ($result as $row)
        {
            $entry = array();

            //Loop through entities attributes (or relations)
            foreach ($row as $key => $value)
            {
                $entry[$key] = $this->convertValue($value);
            }

            //Add to list
            $list->add($entry);
        }

        return $list;
    }
297565
public function getResult()
    {
        $result = parent::getResult();
        if (is_array($result) && isset($result['error'])) {
            throw new Exception($result['error']);
        }
        return $result;
    }