Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DataService.php #372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/DataService/DataService.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class DataService
private $restHandler;

/**
* Serializer needs to be used fore responce object
* Serializer needs to be used fore response object
* @var IEntitySerializer
*/
private $responseSerializer;
Expand Down Expand Up @@ -139,13 +139,13 @@ class DataService
private $OAuth2LoginHelper;

/**
* A boolean value to decide if excetion will be thrown on non-200 request
* A boolean value to decide if exception will be thrown on non-200 request
* @var Boolean
*/
private $throwExceptionOnError = false;

/**
* The client to be used for HTTP request. You can choose either defaukt(cURL) or GuzzleHttpClient if that is available
* The client to be used for HTTP request. You can choose either default(cURL) or GuzzleHttpClient if that is available
* @var String
*/
private $clientName = CoreConstants::CLIENT_CURL;
Expand Down Expand Up @@ -347,7 +347,7 @@ public function isThrownExceptionOnError(){
}

/**
* Return the client Name used by this DataSerivce
* Return the client Name used by this DataService
* @return String the Client Name. It can be curl or GuzzleHttpClient
* @deprecated since version 5.0.4
* @see $this->getClientName()
Expand Down Expand Up @@ -487,7 +487,7 @@ public function getLastError()
}

/**
* Setups serializers objects for responces and requests based on service context
* Setups serializers objects for responses and requests based on service context
*/
public function setupSerializers()
{
Expand Down Expand Up @@ -522,7 +522,7 @@ public function forceJsonSerializers()
}

/**
* Returns serializer for responce objects
* Returns serializer for response objects
* @return IEntitySerializer
*/
protected function getResponseSerializer()
Expand Down Expand Up @@ -802,13 +802,13 @@ public function Add($entity)
$this->verifyOperationAccess($entity, __FUNCTION__);
if ($this->isJsonOnly($entity)) {
$this->forceJsonSerializers();
}
}

$httpsPostBody = $this->executeObjectSerializer($entity, $urlResource);
// Builds resource Uri
$resourceURI = implode(CoreConstants::SLASH_CHAR, array('company', $this->serviceContext->realmId, $urlResource));

$uri = $this->handleTaxService($entity, $resourceURI);
$uri = $this->handleTaxService($entity, $resourceURI);
// Send request
return $this->sendRequestParseResponseBodyAndHandleHttpError($entity, $uri, $httpsPostBody, DataService::ADD);
}
Expand Down Expand Up @@ -1005,7 +1005,7 @@ public function Query($query, $startPosition = null, $maxResults = null, $includ

$httpsUri = implode(CoreConstants::SLASH_CHAR, array('company', $this->serviceContext->realmId, 'query'));
$httpsPostBody = $this->appendPaginationInfo($query, $startPosition, $maxResults);

if(!is_null($includes)) {
$httpsUri .= "?include=$includes";
}
Expand Down Expand Up @@ -1038,7 +1038,7 @@ public function Query($query, $startPosition = null, $maxResults = null, $includ

/**
* Append the Pagination Data to the Query string if it is not appended
* @param Integer StartPostion
* @param Integer StartPosition
* @param Integer MaxResults
* @return String The query string
*/
Expand Down Expand Up @@ -1427,7 +1427,7 @@ public function Retrieve($entity)
}

/**
* Serializes oblect into specified format
* Serializes object into specified format
* @param IPPIntuitEntity $entity
* @param String $urlResource
* @return object
Expand Down