gisevevokoru/ezze-siftuz-orders-v4

dev-master 2021-10-26 03:54 UTC

This package is auto-updated.

Last update: 2024-05-26 12:39:18 UTC


README

This API documentation describes all endpoints for orders - version 4

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: v4
  • Package version: v1.0
  • 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/gisevevokoru/ezze-siftuz-orders-v4.git"
    }
  ],
  "require": {
    "gisevevokoru/ezze-siftuz-orders-v4": "*@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 EzzeSiftuz\OrdersV4\Api\AllApi(
    // 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()
);
$sales_order_id = "sales_order_id_example"; // string | The salesOrderId of the order
$position_item_id = array("position_item_id_example"); // string[] | The positionItemIds of the order to cancel

try {
    $apiInstance->cancelPartnerOrderPositionItems($sales_order_id, $position_item_id);
} catch (Exception $e) {
    echo 'Exception when calling AllApi->cancelPartnerOrderPositionItems: ', $e->getMessage(), PHP_EOL;
}

$apiInstance = new EzzeSiftuz\OrdersV4\Api\AllApi(
    // 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()
);
$sales_order_id = array("sales_order_id_example"); // string[] | The salesOrderIds of the orders to cancel

try {
    $apiInstance->cancelPartnerOrders($sales_order_id);
} catch (Exception $e) {
    echo 'Exception when calling AllApi->cancelPartnerOrders: ', $e->getMessage(), PHP_EOL;
}

$apiInstance = new EzzeSiftuz\OrdersV4\Api\AllApi(
    // 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()
);
$from_date = "from_date_example"; // string | Defines earliest change date (ISO 8601) the returned orders should have
$from_order_date = "from_order_date_example"; // string | Only orders newer than the date specified (ISO 8601) will be returned
$to_order_date = "to_order_date_example"; // string | Only orders older than the date specified (ISO 8601) will be returned
$fulfillment_status = "fulfillment_status_example"; // string | <br>ANNOUNCED: Orders with at least one position item in state ANNOUNCED<br>PROCESSABLE: Orders with at least one position item in state PROCESSABLE and none in ANNOUNCED<br>SENT: Orders with at least one position item in state SENT and none in either ANNOUNCED or PROCESSABLE<br>RETURNED: Orders with at least one position item in state RETURNED and none in either ANNOUNCED, PROCESSABLE, or SENT<br>CANCELLED_BY_PARTNER: Orders with at least one position item in state CANCELLED_BY_PARTNER<br>CANCELLED_BY_MARKETPLACE: Orders with at least one position item in state CANCELLED_BY_MARKETPLACE<br><br>If no state is provided, orders in all possible states are returned.<br>Several values can be passed; it will return a combination of these states without duplicates. Also see parameter 'mode'.<br><br>Example: ?fulfillmentStatus=PROCESSABLE&fulfillmentStatus=CANCELLED_BY_MARKETPLACE
$limit = 128; // int | The maximum amount of orders to return
$order_direction = "ASC"; // string | Sort result by 'orderColumnType' in ASCending or DESCending order
$order_column_type = "ORDER_LIFECYCLE_DATE"; // string | The column on which to apply 'orderDirection' parameter
$mode = "BUCKET"; // string | In search mode AT_LEAST_ONE orders with at least one  position item in given 'fulfillmentStatus' will always be returned
$nextcursor = "nextcursor_example"; // string | Cursor for paging requests. If a next cursor is provided, the only other request parameter being considered is 'limit'<br><br>Note: Only the cursor string is required - not the whole link

try {
    $result = $apiInstance->findPartnerOrders($from_date, $from_order_date, $to_order_date, $fulfillment_status, $limit, $order_direction, $order_column_type, $mode, $nextcursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AllApi->findPartnerOrders: ', $e->getMessage(), PHP_EOL;
}

$apiInstance = new EzzeSiftuz\OrdersV4\Api\AllApi(
    // 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()
);
$order_number = "order_number_example"; // string | 

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

$apiInstance = new EzzeSiftuz\OrdersV4\Api\AllApi(
    // 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()
);
$sales_order_id = "sales_order_id_example"; // string | 

try {
    $result = $apiInstance->getPartnerOrderBySalesOrderId($sales_order_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AllApi->getPartnerOrderBySalesOrderId: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

All URIs are relative to https://live.api.otto.market

Class Method HTTP request Description
AllApi cancelPartnerOrderPositionItems POST /v4/orders/{salesOrderId}/positionItems/{positionItemId}/cancellation Cancel specific position items of an order
AllApi cancelPartnerOrders POST /v4/orders/{salesOrderId}/cancellation Cancel all position items of an order
AllApi findPartnerOrders GET /v4/orders List of orders filtered by fulfillment state
AllApi getPartnerOrderByOrderNumber GET /v4/orders/{orderNumber} Get an order via order number
AllApi getPartnerOrderBySalesOrderId GET /v4/orders/{salesOrderId} Get an order via sales order id
OrdersApi cancelPartnerOrders POST /v4/orders/{salesOrderId}/cancellation Cancel all position items of an order
OrdersApi findPartnerOrders GET /v4/orders List of orders filtered by fulfillment state
OrdersApi getPartnerOrderByOrderNumber GET /v4/orders/{orderNumber} Get an order via order number
OrdersApi getPartnerOrderBySalesOrderId GET /v4/orders/{salesOrderId} Get an order via sales order id
PositionItemsApi cancelPartnerOrderPositionItems POST /v4/orders/{salesOrderId}/positionItems/{positionItemId}/cancellation Cancel specific position items of an order

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author