Core/ServiceContext.php
- Package
- Default
\IntuitServicesType
Package: Default
This Enumeration specifies which Intuit service to connect to. It is Either QBO or QBD.
Constants
\ServiceContext
Package: Default






Intuit Partner Platform Service Context.
Properties


string $isCreateMethod
this flag indicates if static create methods of this class has been invoked.
Details
- Type
- string


string $messageValues
Temporary storage for serialization and compression values for request and reponse.
Details
- Type
- string


\MinorVersion $minorVersion
The Minor Version that would that returns additinoal fields from build v71
Details
- Type
- \MinorVersion
Methods


GetBaseURL() : string
Gets the base Uri for a QBO user.
Returns
Type | Description |
---|---|
string | Returns the base Uri endpoint for a user. |


UseDataServices() : void
Populates the values of the service context like realmId, service type to the Data Services being targetted


UsePlatformServices() : void
Populates the values of the service context like service type and base url to Platform Services.


__construct(string $realmId, \IntuitServicesType $serviceType, \RequestValidator $requestValidator = NULL) : \ServiceContext
Initializes a new instance of the ServiceContext class.
Parameters
Returns
Throws
Name | Type | Description |
---|---|---|
$realmId | string | The realm id. |
$serviceType | \IntuitServicesType | Service Type - QBO/QB. |
$requestValidator | \RequestValidator | The request validate. |
Type | Description |
---|---|
\ServiceContext | Returns ServiceContext object. |
Exception | Description |
---|---|
\IdsException | If arguments are null or empty. |
\InvalidRealmException | If realm id is invalid. |
\InvalidTokenException | If the token is invalid. |