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 $isCreateMethodthis flag indicates if static create methods of this class has been invoked.
Details
- Type
- string

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

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

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

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

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

__construct(string $realmId, \IntuitServicesType $serviceType, \RequestValidator $requestValidator = NULL) : \ServiceContextInitializes 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. |