Skip to content

Latest commit

 

History

History
350 lines (247 loc) · 13.8 KB

OrderDraftApi.md

File metadata and controls

350 lines (247 loc) · 13.8 KB

MagDv\Cargomart\OrderDraftApi

All URIs are relative to https://cargomart.ru.

Method HTTP request Description
apiV2OrderDraftDraftIdDelete() DELETE /api/v2/order-draft/{draftId} Удаление черновика заказа
apiV2OrderDraftDraftIdGet() GET /api/v2/order-draft/{draftId} Получение информации о черновике заказа.
apiV2OrderDraftDraftIdPut() PUT /api/v2/order-draft/{draftId} Редактирование черновика заказа
apiV2OrderDraftGet() GET /api/v2/order-draft Список черновиков
apiV2OrderDraftPost() POST /api/v2/order-draft Создание черновика заказа

apiV2OrderDraftDraftIdDelete()

apiV2OrderDraftDraftIdDelete($draft_id)

Удаление черновика заказа

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: CookieTokenAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Configure API key authorization: HeaderAuthorizationAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new MagDv\Cargomart\Api\OrderDraftApi(
    // If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
    // This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
    new GuzzleHttp\Client(),
    $config
);
$draft_id = 'draft_id_example'; // string | Идентификатор черновика.

try {
    $apiInstance->apiV2OrderDraftDraftIdDelete($draft_id);
} catch (Exception $e) {
    echo 'Exception when calling OrderDraftApi->apiV2OrderDraftDraftIdDelete: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
draft_id string Идентификатор черновика.

Return type

void (empty response body)

Authorization

CookieTokenAuth, HeaderAuthorizationAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

apiV2OrderDraftDraftIdGet()

apiV2OrderDraftDraftIdGet($draft_id): \MagDv\Cargomart\Dto\OrderDraftResponse

Получение информации о черновике заказа.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: CookieTokenAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Configure API key authorization: HeaderAuthorizationAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new MagDv\Cargomart\Api\OrderDraftApi(
    // If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
    // This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
    new GuzzleHttp\Client(),
    $config
);
$draft_id = 'draft_id_example'; // string | Идентификатор черновика.

try {
    $result = $apiInstance->apiV2OrderDraftDraftIdGet($draft_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderDraftApi->apiV2OrderDraftDraftIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
draft_id string Идентификатор черновика.

Return type

\MagDv\Cargomart\Dto\OrderDraftResponse

Authorization

CookieTokenAuth, HeaderAuthorizationAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

apiV2OrderDraftDraftIdPut()

apiV2OrderDraftDraftIdPut($draft_id, $order_draft_request): \MagDv\Cargomart\Dto\OrderDraftResponse

Редактирование черновика заказа

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: CookieTokenAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Configure API key authorization: HeaderAuthorizationAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new MagDv\Cargomart\Api\OrderDraftApi(
    // If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
    // This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
    new GuzzleHttp\Client(),
    $config
);
$draft_id = 'draft_id_example'; // string | Идентификатор черновика.
$order_draft_request = new \MagDv\Cargomart\Dto\OrderDraftRequest(); // \MagDv\Cargomart\Dto\OrderDraftRequest

try {
    $result = $apiInstance->apiV2OrderDraftDraftIdPut($draft_id, $order_draft_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderDraftApi->apiV2OrderDraftDraftIdPut: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
draft_id string Идентификатор черновика.
order_draft_request \MagDv\Cargomart\Dto\OrderDraftRequest [optional]

Return type

\MagDv\Cargomart\Dto\OrderDraftResponse

Authorization

CookieTokenAuth, HeaderAuthorizationAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

apiV2OrderDraftGet()

apiV2OrderDraftGet($filter_creator_id, $filter_loading_from, $filter_loading_to, $filter_kind, $filter_tag, $page, $per_page): \MagDv\Cargomart\Dto\OrderDraftListResponse

Список черновиков

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: CookieTokenAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Configure API key authorization: HeaderAuthorizationAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new MagDv\Cargomart\Api\OrderDraftApi(
    // If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
    // This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
    new GuzzleHttp\Client(),
    $config
);
$filter_creator_id = 56; // int | Id автора черновика
$filter_loading_from = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Дата погрузки ОТ.
$filter_loading_to = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Дата погрузки ДО.
$filter_kind = array(new \MagDv\Cargomart\Dto\\MagDv\Cargomart\Dto\OrderDraftKind()); // \MagDv\Cargomart\Dto\OrderDraftKind[] | Тип черновика.
$filter_tag = array('filter_tag_example'); // string[] | Массив меток.
$page = 1; // int | Номер страницы для постраничной навигации
$per_page = 20; // int | Количество элементов на страницу

try {
    $result = $apiInstance->apiV2OrderDraftGet($filter_creator_id, $filter_loading_from, $filter_loading_to, $filter_kind, $filter_tag, $page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderDraftApi->apiV2OrderDraftGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
filter_creator_id int Id автора черновика [optional]
filter_loading_from \DateTime Дата погрузки ОТ. [optional]
filter_loading_to \DateTime Дата погрузки ДО. [optional]
filter_kind \MagDv\Cargomart\Dto\OrderDraftKind[] Тип черновика. [optional]
filter_tag string[] Массив меток. [optional]
page int Номер страницы для постраничной навигации [optional] [default to 1]
per_page int Количество элементов на страницу [optional] [default to 20]

Return type

\MagDv\Cargomart\Dto\OrderDraftListResponse

Authorization

CookieTokenAuth, HeaderAuthorizationAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

apiV2OrderDraftPost()

apiV2OrderDraftPost($order_draft_request): \MagDv\Cargomart\Dto\OrderDraftResponse

Создание черновика заказа

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: CookieTokenAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Configure API key authorization: HeaderAuthorizationAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new MagDv\Cargomart\Api\OrderDraftApi(
    // If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
    // This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
    new GuzzleHttp\Client(),
    $config
);
$order_draft_request = new \MagDv\Cargomart\Dto\OrderDraftRequest(); // \MagDv\Cargomart\Dto\OrderDraftRequest

try {
    $result = $apiInstance->apiV2OrderDraftPost($order_draft_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderDraftApi->apiV2OrderDraftPost: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
order_draft_request \MagDv\Cargomart\Dto\OrderDraftRequest [optional]

Return type

\MagDv\Cargomart\Dto\OrderDraftResponse

Authorization

CookieTokenAuth, HeaderAuthorizationAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]