gisevevokoru/ezze-siftuz-quantities-v2

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

This package is auto-updated.

Last update: 2024-05-26 09:17:30 UTC


README

Quantities interface

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

  • API version: 2.0.0
  • 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-quantities-v2.git"
    }
  ],
  "require": {
    "gisevevokoru/ezze-siftuz-quantities-v2": "*@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\QuantitiesV2\Api\AvailableQuantityApi(
    // 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()
);
$limit = 200; // int | The maximum number of available quantities to be returned in each response.
$page = 0; // int | Page number (0..N)

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

$apiInstance = new EzzeSiftuz\QuantitiesV2\Api\AvailableQuantityApi(
    // 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()
);
$sku = "sku_example"; // string | The sku for the available quantity

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

$apiInstance = new EzzeSiftuz\QuantitiesV2\Api\AvailableQuantityApi(
    // 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 = array(new \EzzeSiftuz\QuantitiesV2\Model\AvailableQuantityRequestDTOV2()); // \EzzeSiftuz\QuantitiesV2\Model\AvailableQuantityRequestDTOV2[] | availableQuantityRequestDTO

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

Documentation for API Endpoints

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

Class Method HTTP request Description
AvailableQuantityApi getAvailableQuantities GET /v2/quantities Get available quantities for a specific Partner (Upto 200 per request). The partner needs to update the quantities for all his products once or limit the products being returned in the response by setting the limit value to number of products they have updated
AvailableQuantityApi getAvailableQuantityBySku GET /v2/quantities/{sku} Get available quantity for a specific Sku
AvailableQuantityApi storeAvailableQuantitiesUsingPOST POST /v2/quantities Update the available quantity for a specific SKU (up to 200 SKUs per request)

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author