gando / partner
Requires
- php: >=8.2
- brick/date-time: >=0.7.0
- brick/math: >=0.12.1
- galbar/jsonpath: >=3.0
- guzzlehttp/guzzle: ^7.0
- phpdocumentor/type-resolver: >=1.8
- speakeasy/serializer: ^4.0.3
Requires (Dev)
- laravel/pint: 1.29.0
- phpstan/phpstan: 2.1.44
- phpunit/phpunit: ^11.5.50 || ^12.5.8 || >=13.0.0
- roave/security-advisories: dev-latest
This package is not auto-updated.
Last update: 2026-05-23 02:48:27 UTC
README
Developer-friendly & type-safe Php SDK specifically catered to leverage gando/partner API.
Important
This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your workspace. Delete this section before > publishing to a package manager.
Summary
Gando Partner API: API for rental management software and multi–rental-operator platforms integrating Gando on behalf of linked rental operators. Use gando_pk_ keys (x-api-key or Authorization: Bearer) on /api/partner/*.
Table of Contents
SDK Installation
Tip
To finish publishing your SDK you must run your first generation action.
The SDK relies on Composer to manage its dependencies.
To install the SDK first add the below to your composer.json file:
{
"repositories": [
{
"type": "github",
"url": "<UNSET>.git"
}
],
"require": {
"gando/partner": "*"
}
}
Then run the following command:
composer update
SDK Example Usage
Example
declare(strict_types=1); require 'vendor/autoload.php'; use Gando\Partner; use Gando\Partner\Models\Components; $sdk = Partner\Gando::builder() ->setSecurity( new Components\Security( partnerApiKeyAuth: '<YOUR_API_KEY_HERE>', ) ) ->build(); $response = $sdk->partnerAPI->accountsList( ); if ($response->object !== null) { // handle response }
Authentication
Per-Client Security Schemes
This SDK supports the following security schemes globally:
| Name | Type | Scheme |
|---|---|---|
partnerApiKeyAuth |
apiKey | API key |
partnerBearerAuth |
http | HTTP Bearer |
You can set the security parameters through the setSecurity function on the SDKBuilder when initializing the SDK. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
declare(strict_types=1); require 'vendor/autoload.php'; use Gando\Partner; use Gando\Partner\Models\Components; $sdk = Partner\Gando::builder() ->setSecurity( new Components\Security( partnerApiKeyAuth: '<YOUR_API_KEY_HERE>', ) ) ->build(); $response = $sdk->partnerAPI->accountsList( ); if ($response->object !== null) { // handle response }
Available Resources and Operations
Available methods
PartnerAPI
- accountsList - List linked rental operator accounts
- accountsRevoke - Revoke partner ↔ rental operator link
- clientsList - List clients across linked rental operator accounts
- clientsCreate - Create a client for a linked rental operator account
- clientsUpdate - Update a partner-accessible client
- depositsList - List deposits
- depositsCreate - Create a deposit for a linked rental operator
- depositsRetrieve - Get deposit by id
- depositsDelete - Delete or archive a deposit
- depositsUpdate - Update deposit (change client or cancel pending payment)
- depositsGetCapture - Get latest capture for a deposit
- depositsCapture - Create a capture (encaissement)
- depositsSendEmails - Send deposit link to multiple emails
- depositsSendDepositMail - Send deposit link to one email
- depositsCancel - Close deposit (status close + optional email)
- depositsGetPaymentMethod - Masked card info for the deposit
- depositsGetPdf - Download deposit summary PDF
PartnerWebhooks
- webhooksList - List partner webhook endpoints
- webhooksCreate - Create partner webhook endpoint
- webhooksDelete - Delete partner webhook endpoint
- webhooksUpdate - Update partner webhook endpoint
- webhooksRotateSecret - Rotate partner webhook secret
- webhooksGetSecret - Get partner webhook secret
- webhooksTest - Send test partner webhook delivery
- webhooksGetDeliveries - List partner webhook deliveries
Error Handling
Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.
By default an API error will raise a Errors\APIException exception, which has the following properties:
| Property | Type | Description |
|---|---|---|
$message |
string | The error message |
$statusCode |
int | The HTTP status code |
$rawResponse |
?\Psr\Http\Message\ResponseInterface | The raw HTTP response |
$body |
string | The response content |
When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective Errors tables in SDK docs for more details on possible exception types for each operation. For example, the accountsList method throws the following exceptions:
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\ErrorEnvelope | 400, 401, 403, 404, 409, 422, 429 | application/json |
| Errors\ErrorEnvelope | 500 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Example
declare(strict_types=1); require 'vendor/autoload.php'; use Gando\Partner; use Gando\Partner\Models\Components; use Gando\Partner\Models\Errors; $sdk = Partner\Gando::builder() ->setSecurity( new Components\Security( partnerApiKeyAuth: '<YOUR_API_KEY_HERE>', ) ) ->build(); try { $response = $sdk->partnerAPI->accountsList( ); if ($response->object !== null) { // handle response } } catch (Errors\ErrorEnvelopeThrowable $e) { // handle $e->$container data throw $e; } catch (Errors\ErrorEnvelopeThrowable $e) { // handle $e->$container data throw $e; } catch (Errors\APIException $e) { // handle default exception throw $e; }
Server Selection
Override Server URL Per-Client
The default server can be overridden globally using the setServerUrl(string $serverUrl) builder method when initializing the SDK client instance. For example:
declare(strict_types=1); require 'vendor/autoload.php'; use Gando\Partner; use Gando\Partner\Models\Components; $sdk = Partner\Gando::builder() ->setServerURL('http://localhost:3000') ->setSecurity( new Components\Security( partnerApiKeyAuth: '<YOUR_API_KEY_HERE>', ) ) ->build(); $response = $sdk->partnerAPI->accountsList( ); if ($response->object !== null) { // handle response }
Development
Maturity
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
Contributions
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.