idesigning/pushka-tickets-client

dev-master 2021-11-09 15:44 UTC

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

ClassMethodHTTP requestDescription
_ApieventsEventIdTicketsBarcodeGetGET /events/{event_id}/tickets/{barcode}Получение информации о сеансе по билету
_ApieventsEventIdTicketsBarcodeVisitPutPUT /events/{event_id}/tickets/{barcode}/visitПогасить билет
_ApiticketsIdGetGET /tickets/{id}Получение информации о билете
_ApiticketsIdRefundPutPUT /tickets/{id}/refundВернуть билет
_ApiticketsIdVisitPutPUT /tickets/{id}/visitПогасить билет
_ApiticketsPostPOST /ticketsДобавление билета в реестр

Documentation For Models

Documentation For Authorization

bearerAuth

  • Type: HTTP bearer authentication

Author