gisevevokoru/ezze-siftuz-orders-v2

dev-master 2020-01-24 01:13 UTC

This package is auto-updated.

Last update: 2024-09-24 12:36:18 UTC


README

此API文档描述了所有订单端点

此PHP包由Swagger Codegen项目自动生成

  • API版本:v2
  • 包版本:v1.0
  • 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen

要求

PHP 5.5及更高版本

安装与使用

Composer

要使用Composer安装绑定,请将以下内容添加到composer.json

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/gisevevokoru/ezze-siftuz-orders-v2.git"
    }
  ],
  "require": {
    "gisevevokoru/ezze-siftuz-orders-v2": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门

请遵循安装过程,然后运行以下命令

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

$apiInstance = new EzzeSiftuz\OrdersV2\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 | 
$position_item_id = array("position_item_id_example"); // string[] | 

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\OrdersV2\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[] | 

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

$apiInstance = new EzzeSiftuz\OrdersV2\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 | 
$position_item_id = array("position_item_id_example"); // string[] | 

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

$apiInstance = new EzzeSiftuz\OrdersV2\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[] | 

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

$apiInstance = new EzzeSiftuz\OrdersV2\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 = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Defines, which minimum lifecycle change date the returned order should have
$fulfillment_status = array("fulfillment_status_example"); // string[] | Defines, which minimum state the returned orders should have.<br>If ANNOUNCED is given, all orders, which have at least one position in ANNOUNCED state are returned.<br>If PROCESSABLE is given, all orders, which have at least one position in PROCESSABLE state and none in ANNOUNCED state are returned.<br>If CONFIRMED is given, all orders, which have at least one position in CONFIRMED state and none in either ANNOUNCED or PROCESSABLE state are returned.<br>If SENT is given, all orders, which have at least one position in SENT state and none in either ANNOUNCED or PROCESSABLE or CONFIRMED state are returned.<br>If RETURNED is given, all orders, which have at least one position in RETURNED state and none in either ANNOUNCED or PROCESSABLE or CONFIRMED or SENT state are returned.<br>If CANCELLED_BY_PARTNER is given, all orders, which have at least one position in CANCELLED_BY_PARTNER state are returned.<br>If CANCELLED_BY_MARKETPLACE is given, all orders, which have at least one position in CANCELLED_BY_MARKETPLACE state are returned.<br>If none is provided, all status will be returned.<br>Several values can be passed via request param array, when multiple values passed, search result will be combination of multiple fulfillmentStatuses - no duplicates will appear.<br>Example: ?fulfillmentStatus=PROCESSABLE,CONFIRMED&fulfillmentStatus=CANCELLED_BY_MARKETPLACE - will return orders in these 3 fulfillmentStatuses.<br>Alternatively, mode can be passed for a different search type. BUCKET/AT_LEAST_ONE, where BUCKET is default behaviour explained above and AT_LEAST_ONE checks if there is at least 1 position item with passed fulfillmentStatus/fulfillmentStatuses.
$limit = 56; // int | limit
$order_direction = "order_direction_example"; // string | Ordering direction ASC/DESC
$order_column_type = "order_column_type_example"; // string | Column by which to order partnerOrders
$mode = "mode_example"; // string | Mode for type of search, default mode is bucket
$nextcursor = "nextcursor_example"; // string | For paging request this cursor is required. If a next cursor is provided, the only other request parameter being considered is 'limit'.
$search_term = "search_term_example"; // string | Partial Text Search

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

$apiInstance = new EzzeSiftuz\OrdersV2\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;
}
?>

API端点文档

所有URI相对于https://live.api.otto.market/v2

模型文档

授权文档

所有端点均不需要授权。

作者