Skip to content

222evgeniy/uapay

Repository files navigation

SwaggerServer

Escrow box from UAPAY

This Symfony bundle is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Build package: io.swagger.codegen.languages.SymfonyServerCodegen

Requirements

PHP 5.4.0 and later

Installation & Usage

To install the dependencies via Composer, add the following repository to composer.json of your Symfony project:

{
    "repositories": [{
        "type": "path",
        "url": "//Path to your generated swagger bundle"
    }],
}

Then run:

composer require swagger/server-bundle:dev-master

to add the generated swagger bundle as a dependency.

Tests

To run the unit tests for the generated bundle, first navigate to the directory containing the code, then run the following commands:

composer install
./vendor/bin/phpunit

Getting Started

Step 1: Please follow the installation procedure first.

Step 2: Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Swagger\Server\SwaggerServerBundle(),
        // ...
    );
}

Step 3: Register the routes:

# app/config/routing.yml
swagger_server:
    resource: "@SwaggerServerBundle/Resources/config/routing.yml"

Step 4: Implement the API calls:

<?php
// src/Acme/MyBundle/Api/AdsApiInterface.php

namespace Acme\MyBundle\Api;

use Swagger\Server\Api\AdsApiInterface;

class AdsApi implements AdsApiInterface // An interface is autogenerated
{

    /**
     * Implementation of AdsApiInterface#adsIdConfirmationsPost
     */
    public function adsIdConfirmationsPost($id)
    {
        // Implement the operation ...
    }

    // Other operation methods ...
}

Step 5: Tag your API implementation:

# src/Acme/MyBundle/Resources/services.yml
services:
    # ...
    acme.my_bundle.api.ads:
        class: Acme\MyBundle\Api\AdsApi
        tags:
            - { name: "swagger_server.api", api: "ads" }
    # ...

Now you can start using the bundle!

Documentation for API Endpoints

All URIs are relative to https://api.escrowbox.uapay.ua/api

Class Method HTTP request Description
AdsApiInterface adsIdConfirmationsPost POST /ads/{id}/confirmations Confirm ad
AdsApiInterface adsIdGet GET /ads/{id} Show ad details
AdsApiInterface adsIdPatch PATCH /ads/{id} Update ad details
AdsApiInterface adsPost POST /ads Create a new ad
CartsApiInterface cartsIdGet GET /carts/{id} Show cart and its deals
CartsApiInterface cartsPost POST /carts Create a cart
DealsApiInterface dealsIdConfirmationsPost POST /deals/{id}/confirmations Confirm deal
DealsApiInterface dealsIdGet GET /deals/{id} Show deal details
DealsApiInterface dealsIdPatch PATCH /deals/{id} Update a deal
DealsApiInterface dealsIdPaymentsPost POST /deals/{id}/payments Start payment on deal
DealsApiInterface dealsIdRejectionsPost POST /deals/{id}/rejections Reject deal
DealsApiInterface dealsPost POST /deals Create a new deal
HelpersApiInterface handlersHandlerTypeCitiesCityIdOfficesGet GET /handlers/{handlerType}/cities/{cityId}/offices List offices from handler by cityId
HelpersApiInterface handlersHandlerTypeCitiesGet GET /handlers/{handlerType}/cities List cities from handler
HelpersApiInterface handlersHandlerTypeCostsGet GET /handlers/{handlerType}/costs Calculate delivery cost
HelpersApiInterface payersPayerTypeCommissionAmountGet GET /payers/{payerType}/commissionAmount Calculate commission amount from income amount for payer
HelpersApiInterface payersPayerTypeGet GET /payers/{payerType} Get commission object of payer
PaymentsApiInterface payersPayerTypeCommissionAmountGet GET /payers/{payerType}/commissionAmount Calculate commission amount from income amount for payer
PaymentsApiInterface payersPayerTypeGet GET /payers/{payerType} Get commission object of payer
PaymentsApiInterface paymentsIdConfirmationsPost POST /payments/{id}/confirmations Confirm payment with code or PaRes

Documentation For Models

Documentation For Authorization

basicAuth

  • Type: HTTP basic authentication

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published