platon-net / cp-php-sdk
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
dev-main
2026-04-27 12:16 UTC
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2026-04-27 12:17:08 UTC
README
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Installation & Usage
Requirements
PHP 8.1 and later.
Composer
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/platon-net/cp-php-sdk.git"
}
],
"require": {
"platon-net/cp-php-sdk": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php:
<?php require_once('/path/to/ControlPanelSDK/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure Bearer authorization: bearerAuth $config = Platon\\ControlPanel\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Platon\\ControlPanel\\Sdk\Api\CartApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $check_cart_coupon_request = new \Platon\\ControlPanel\\Sdk\Model\CheckCartCouponRequest(); // \Platon\\ControlPanel\\Sdk\Model\CheckCartCouponRequest | Cart coupon check payload try { $result = $apiInstance->checkCartCoupon($check_cart_coupon_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling CartApi->checkCartCoupon: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://setup.platon.sk/api
| Class | Method | HTTP request | Description |
|---|---|---|---|
| CartApi | checkCartCoupon | POST /cart/coupons/check | Check and apply cart coupon |
| CartApi | createCartItem | POST /cart/items | Add item to cart |
| CartApi | deleteCartItem | DELETE /cart/items/{cartItemId} | Remove item from cart |
| CartApi | getCartBillingAddress | GET /cart/billing-address | Get cart billing address |
| CartApi | getCartCoupon | GET /cart/coupons/current | Get current cart coupon |
| CartApi | getCartTotal | GET /cart/total | Get cart total |
| CartApi | listCartItems | GET /cart/items | List cart items |
| CartApi | updateCartItem | PATCH /cart/items/{cartItemId} | Update cart item data |
| CartApi | updateCartItemCount | PATCH /cart/items/by-product/count | Update cart item count by product and domain |
| DNSApi | createDnsRecord | POST /dns/{domain}/records | Create DNS record |
| DNSApi | deleteDnsRecord | DELETE /dns/{domain}/records/{recordId} | Delete DNS record |
| DNSApi | getDnsRecords | GET /dns/{domain}/records | Get DNS records by domain |
| DNSApi | updateDnsRecord | PATCH /dns/{domain}/records/{recordId} | Update DNS record |
| DomainApi | changeDomainNameservers | PATCH /domains/{domain}/nameservers | Change domain nameservers |
| DomainApi | closeDomain | DELETE /domains/{domain} | Close external customer domain product |
| DomainApi | getDomainInfo | GET /domains/{domain} | Get domain information and availability |
| DomainApi | listDomains | GET /domains | List customer domains |
| DomainApi | registerDomain | POST /domains/{domain}/register | Register domain |
| DomainApi | renewDomain | POST /domains/{domain}/renew | Renew domain |
| EmailApi | changeMailboxPassword | PATCH /email/{domain}/mailboxes/{username}/password | Change mailbox password |
| EmailApi | createMailbox | POST /email/{domain}/mailboxes | Create mailbox |
| OAuthApi | createOauthRequest | POST /oauth/requests | Create OAuth request |
| OAuthApi | deleteOauthToken | DELETE /oauth/tokens | Delete OAuth token |
| OAuthApi | getOauthScopes | GET /oauth/scopes | List available OAuth scopes |
| OAuthApi | refreshOauthToken | POST /oauth/tokens/refresh | Refresh OAuth token |
| OAuthApi | verifyOauthRequest | GET /oauth/requests/verify | Verify OAuth request |
| SystemApi | hello | GET /system/hello | Returns greeting message |
| SystemApi | revision | GET /system/revision | Returns revision number of system |
| SystemApi | time | GET /system/time | Returns current date and time of system |
| VehicleApi | createVehicleEvent | POST /vehicle/events | Create vehicle event without receipt image |
| VehicleApi | deleteVehicleEvent | DELETE /vehicle/events/{eventId} | Delete vehicle event |
| VehicleApi | finalizeVehicleEvent | POST /vehicle/events/{eventId}/finalize | Finalize vehicle event draft |
| VehicleApi | getVehicleEvent | GET /vehicle/events/{eventId} | Get vehicle event detail |
| VehicleApi | getVehicleEventImage | GET /vehicle/events/{eventId}/image | Get event image or thumbnail |
| VehicleApi | listVehicleCurrencies | GET /vehicle/currencies | List currencies for vehicle events |
| VehicleApi | listVehicleEvents | GET /vehicle/events | List vehicle events for the authenticated driver |
| VehicleApi | listVehicleVehicles | GET /vehicle/vehicles | List vehicles available to the authenticated driver |
| VehicleApi | rescanVehicleEventImage | POST /vehicle/events/{eventId}/image | Replace event image and rescan event data |
| VehicleApi | setPreferredVehicle | PATCH /vehicle/preferred-vehicle | Set or clear preferred vehicle |
| VehicleApi | uploadVehicleReceiptImage | POST /vehicle/events/receipt-image | Upload receipt image and create processing event draft |
Models
- ChangeDomainNameserversRequest
- ChangeMailboxPasswordRequest
- CheckCartCouponRequest
- CreateCartItemRequest
- CreateDnsRecord200Response
- CreateDnsRecordRequest
- CreateMailboxRequest
- CreateOauthRequest200Response
- CreateOauthRequest200ResponseData
- CreateOauthRequestRequest
- CreateVehicleEventRequest
- DeleteOauthToken200Response
- DeleteOauthToken200ResponseData
- FinalizeVehicleEventRequest
- FinalizeVehicleEventRequestFueling
- FinalizeVehicleEventRequestLocation
- FinalizeVehicleEventRequestMoney
- GetDnsRecords200Response
- GetDnsRecords200ResponseData
- GetDnsRecords200ResponseDataRecordsInner
- GetOauthScopes200Response
- GetOauthScopes200ResponseDataInner
- Hello200Response
- Hello200ResponseData
- ListDomains200Response
- ListDomains200ResponseData
- RefreshOauthTokenRequest
- RegisterDomainRequest
- RenewDomainRequest
- Revision200Response
- Revision200ResponseData
- SetPreferredVehicleRequest
- Time200Response
- Time200ResponseData
- UpdateCartItemCountRequest
- UpdateCartItemRequest
- UpdateCartItemRequestData
- UpdateDnsRecordRequest
- VerifyOauthRequest200Response
- VerifyOauthRequest200ResponseData
Authorization
Authentication schemes defined for the API:
bearerAuth
- Type: Bearer authentication
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.0.0- Package version:
1.0.0 - Generator version:
7.21.0
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen