Skip to content

Latest commit

 

History

History
357 lines (269 loc) · 16.3 KB

README.md

File metadata and controls

357 lines (269 loc) · 16.3 KB

Folders

(fileStorage->folders)

Overview

Available Operations

create

Create Folder

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Apideck\Unify;
use Apideck\Unify\Models\Components;
use Apideck\Unify\Models\Operations;

$security = '<YOUR_BEARER_TOKEN_HERE>';

$sdk = Unify\Apideck::builder()
    ->setConsumerId('test-consumer')
    ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
    ->setSecurity($security)->build();

$request = new Operations\FileStorageFoldersAddRequest(
    createFolderRequest: new Components\CreateFolderRequest(
        name: 'Documents',
        parentFolderId: '1234',
        description: 'My Personal Documents',
        driveId: '1234',
        passThrough: [
            new Components\PassThroughBody(
                serviceId: '<id>',
                extendPaths: [
                    new Components\ExtendPaths(
                        path: '$.nested.property',
                        value: [
                            'TaxClassificationRef' => [
                                'value' => 'EUC-99990201-V1-00020000',
                            ],
                        ],
                    ),
                ],
            ),
        ],
    ),
    serviceId: 'salesforce',
    fields: 'id,updated_at',
);

$response = $sdk->fileStorage->folders->create(
    request: $request
);

if ($response->createFolderResponse !== null) {
    // handle response
}

Parameters

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

Response

?Operations\FileStorageFoldersAddResponse

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

copy

Copy Folder

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Apideck\Unify;
use Apideck\Unify\Models\Components;
use Apideck\Unify\Models\Operations;

$security = '<YOUR_BEARER_TOKEN_HERE>';

$sdk = Unify\Apideck::builder()
    ->setConsumerId('test-consumer')
    ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
    ->setSecurity($security)->build();

$request = new Operations\FileStorageFoldersCopyRequest(
    id: '<id>',
    copyFolderRequest: new Components\CopyFolderRequest(
        parentFolderId: '1234',
        name: 'Documents',
        passThrough: [
            new Components\PassThroughBody(
                serviceId: '<id>',
                extendPaths: [
                    new Components\ExtendPaths(
                        path: '$.nested.property',
                        value: [
                            'TaxClassificationRef' => [
                                'value' => 'EUC-99990201-V1-00020000',
                            ],
                        ],
                    ),
                ],
            ),
        ],
    ),
    serviceId: 'salesforce',
    fields: 'id,updated_at',
);

$response = $sdk->fileStorage->folders->copy(
    request: $request
);

if ($response->updateFolderResponse !== null) {
    // handle response
}

Parameters

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

Response

?Operations\FileStorageFoldersCopyResponse

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

delete

Delete Folder

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Apideck\Unify;
use Apideck\Unify\Models\Operations;

$security = '<YOUR_BEARER_TOKEN_HERE>';

$sdk = Unify\Apideck::builder()
    ->setConsumerId('test-consumer')
    ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
    ->setSecurity($security)->build();

$request = new Operations\FileStorageFoldersDeleteRequest(
    id: '<id>',
    serviceId: 'salesforce',
);

$response = $sdk->fileStorage->folders->delete(
    request: $request
);

if ($response->deleteFolderResponse !== null) {
    // handle response
}

Parameters

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

Response

?Operations\FileStorageFoldersDeleteResponse

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

get

Get Folder

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Apideck\Unify;
use Apideck\Unify\Models\Operations;

$security = '<YOUR_BEARER_TOKEN_HERE>';

$sdk = Unify\Apideck::builder()
    ->setConsumerId('test-consumer')
    ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
    ->setSecurity($security)->build();

$request = new Operations\FileStorageFoldersOneRequest(
    id: '<id>',
    serviceId: 'salesforce',
    fields: 'id,updated_at',
);

$response = $sdk->fileStorage->folders->get(
    request: $request
);

if ($response->getFolderResponse !== null) {
    // handle response
}

Parameters

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

Response

?Operations\FileStorageFoldersOneResponse

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

update

Rename or move Folder

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Apideck\Unify;
use Apideck\Unify\Models\Components;
use Apideck\Unify\Models\Operations;

$security = '<YOUR_BEARER_TOKEN_HERE>';

$sdk = Unify\Apideck::builder()
    ->setConsumerId('test-consumer')
    ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
    ->setSecurity($security)->build();

$request = new Operations\FileStorageFoldersUpdateRequest(
    id: '<id>',
    updateFolderRequest: new Components\UpdateFolderRequest(
        name: 'Documents',
        description: 'My Personal Documents',
        parentFolderId: '1234',
        passThrough: [
            new Components\PassThroughBody(
                serviceId: '<id>',
                extendPaths: [
                    new Components\ExtendPaths(
                        path: '$.nested.property',
                        value: [
                            'TaxClassificationRef' => [
                                'value' => 'EUC-99990201-V1-00020000',
                            ],
                        ],
                    ),
                ],
            ),
        ],
    ),
    serviceId: 'salesforce',
);

$response = $sdk->fileStorage->folders->update(
    request: $request
);

if ($response->updateFolderResponse !== null) {
    // handle response
}

Parameters

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

Response

?Operations\FileStorageFoldersUpdateResponse

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