idesigning / pushka-tickets-client
dev-master
2021-11-09 15:44 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2024-05-08 03:43:01 UTC
README
API для передачи информации в реестр сведений о билетах
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 0.1.5
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "http://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Pushka\Client\Api\_Api(
// 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
);
$event_id = "event_id_example"; // string | ID мероприятия в ПРО.Культура
$barcode = "barcode_example"; // string | ШК билета
try {
$result = $apiInstance->eventsEventIdTicketsBarcodeGet($event_id, $barcode);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling _Api->eventsEventIdTicketsBarcodeGet: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Pushka\Client\Api\_Api(
// 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
);
$body = new \Pushka\Client\Model\VisitTicketRequest(); // \Pushka\Client\Model\VisitTicketRequest |
$event_id = "event_id_example"; // string | ID мероприятия в ПРО.Культура
$barcode = "barcode_example"; // string | ШК билета
try {
$result = $apiInstance->eventsEventIdTicketsBarcodeVisitPut($body, $event_id, $barcode);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling _Api->eventsEventIdTicketsBarcodeVisitPut: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Pushka\Client\Api\_Api(
// 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
);
$id = "id_example"; // string | ID билета
try {
$result = $apiInstance->ticketsIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling _Api->ticketsIdGet: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Pushka\Client\Api\_Api(
// 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
);
$body = new \Pushka\Client\Model\RefundTicketRequest(); // \Pushka\Client\Model\RefundTicketRequest |
$id = "id_example"; // string | ID билета
try {
$result = $apiInstance->ticketsIdRefundPut($body, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling _Api->ticketsIdRefundPut: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Pushka\Client\Api\_Api(
// 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
);
$body = new \Pushka\Client\Model\VisitTicketRequest(); // \Pushka\Client\Model\VisitTicketRequest |
$id = "id_example"; // string | ID билета
try {
$result = $apiInstance->ticketsIdVisitPut($body, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling _Api->ticketsIdVisitPut: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Pushka\Client\Api\_Api(
// 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
);
$body = new \Pushka\Client\Model\CreateTicketRequest(); // \Pushka\Client\Model\CreateTicketRequest |
try {
$result = $apiInstance->ticketsPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling _Api->ticketsPost: ', $e->getMessage(), PHP_EOL;
}
?>
Documentation for API Endpoints
All URIs are relative to https://pushka-uat.test.gosuslugi.ru/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
_Api | eventsEventIdTicketsBarcodeGet | GET /events/{event_id}/tickets/{barcode} | Получение информации о сеансе по билету |
_Api | eventsEventIdTicketsBarcodeVisitPut | PUT /events/{event_id}/tickets/{barcode}/visit | Погасить билет |
_Api | ticketsIdGet | GET /tickets/{id} | Получение информации о билете |
_Api | ticketsIdRefundPut | PUT /tickets/{id}/refund | Вернуть билет |
_Api | ticketsIdVisitPut | PUT /tickets/{id}/visit | Погасить билет |
_Api | ticketsPost | POST /tickets | Добавление билета в реестр |
Documentation For Models
- Buyer
- CreateTicketRequest
- ErrorResponse
- Payment
- RefundResult
- RefundTicketRequest
- Session
- Status
- Ticket
- TicketInfo
- VisitResult
- VisitTicketRequest
- Visitor
Documentation For Authorization
bearerAuth
- Type: HTTP bearer authentication