Skip to content

Latest commit

 

History

History
74 lines (55 loc) · 3.23 KB

README.md

File metadata and controls

74 lines (55 loc) · 3.23 KB

BalanceSheet

(accounting->balanceSheet)

Overview

Available Operations

  • get - Get BalanceSheet

get

Get BalanceSheet

Example Usage

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
}

Parameters

Parameter Type Required Description
$request Operations\AccountingBalanceSheetOneRequest ✔️ The request object to use for the request.

Response

?Operations\AccountingBalanceSheetOneResponse

Errors

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 */*