(accounting->balanceSheet)
- get - Get BalanceSheet
Get BalanceSheet
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Components;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->build();
$request = new Operations\AccountingBalanceSheetOneRequest(
serviceId: 'salesforce',
passThrough: [
'search' => 'San Francisco',
],
filter: new Components\BalanceSheetFilter(
startDate: '2021-01-01',
endDate: '2021-12-31',
periodCount: 3,
periodType: Components\PeriodType::Month,
),
);
$response = $sdk->accounting->balanceSheet->get(
request: $request
);
if ($response->getBalanceSheetResponse !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\AccountingBalanceSheetOneRequest | ✔️ | The request object to use for the request. |
?Operations\AccountingBalanceSheetOneResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\BadRequestResponse | 400 | application/json |
Errors\UnauthorizedResponse | 401 | application/json |
Errors\PaymentRequiredResponse | 402 | application/json |
Errors\NotFoundResponse | 404 | application/json |
Errors\UnprocessableResponse | 422 | application/json |
Errors\APIException | 4XX, 5XX | */* |