mehr-it/otto-returns-api-client

使用Swagger生成的PHP客户端,用于Otto返回API

2.0.1 2020-12-14 10:39 UTC

This package is auto-updated.

Last update: 2024-09-14 19:20:25 UTC


README

返回接口

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

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

要求

PHP 5.5及以后版本

安装与使用

Composer

要通过Composer安装绑定,请在composer.json中添加以下内容

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/mehr-it/otto-returns-api-client.git"
    }
  ],
  "require": {
    "mehr-it/otto-returns-api-client": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

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

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

请按照安装过程进行操作,然后运行以下命令

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

$apiInstance = new MehrIt\OttoReturnsApiClient\Api\ReturnsStatusApi(
    // 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()
);
$status = "status_example"; // string | Return status for which items are being queried for
$limit = 10; // int | Page size to limit the number of items returned in the response. Maximum value for limit can 10
$page = 1; // int | Page number to fetch. This parameter is required to fetch data for specific page number

try {
    $result = $apiInstance->getPositionItemsForUsingGET($status, $limit, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReturnsStatusApi->getPositionItemsForUsingGET: ', $e->getMessage(), PHP_EOL;
}

$apiInstance = new MehrIt\OttoReturnsApiClient\Api\ReturnsStatusApi(
    // 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()
);
$body = new \MehrIt\OttoReturnsApiClient\Model\AcceptedPartnerReturnV2(); // \MehrIt\OttoReturnsApiClient\Model\AcceptedPartnerReturnV2 | acceptedPartnerReturn

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

$apiInstance = new MehrIt\OttoReturnsApiClient\Api\ReturnsStatusApi(
    // 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()
);
$body = new \MehrIt\OttoReturnsApiClient\Model\RejectedPartnerReturnV2(); // \MehrIt\OttoReturnsApiClient\Model\RejectedPartnerReturnV2 | rejectedPartnerReturn

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

API端点文档

所有URI相对于https://partner-acl.develop.returns.platform.otto.de/

模型文档

授权文档

所有端点都不需要授权。

作者