PHP Classes

File: docs/Api/WarehouseStockApi.md

Recommend this page to a friend!
  Classes of Francesco Danti   Scloby Client API   docs/Api/WarehouseStockApi.md   Download  
File: docs/Api/WarehouseStockApi.md
Role: Example script
Content type: text/markdown
Description: Example script
Class: Scloby Client API
Client to call Scloby cloud POS API
Author: By
Last change:
Date: 11 days ago
Size: 3,695 bytes
 

Contents

Class file image Download

Swagger\Client\WarehouseStockApi

All URIs are relative to https://api.scloby.com/v2

Method | HTTP request | Description ------------- | ------------- | ------------- stockIdGet | GET /stock/{id} | Get existing Stock stockSummaryGet | GET /stock_summary | GET All stock summaries

stockIdGet

> \Swagger\Client\Model\Stock stockIdGet($id)

Get existing Stock

In this case you must specify the id in the URL

Example

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

// Configure OAuth2 access token for authorization: oAuth2AuthCode
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\WarehouseStockApi(
    // 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(),
    $config
);
$id = "id_example"; // string | id of the stock

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

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- id | string| id of the stock |

Return type

\Swagger\Client\Model\Stock

Authorization

oAuth2AuthCode

HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

stockSummaryGet

> \Swagger\Client\Model\Stock stockSummaryGet($pagination, $per_page, $page)

GET All stock summaries

Returns a Json with data about all stock summaries.

Example

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

// Configure OAuth2 access token for authorization: oAuth2AuthCode
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\WarehouseStockApi(
    // 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(),
    $config
);
$pagination = true; // bool | Pagination parameter
$per_page = 56; // int | Results_per_page
$page = 56; // int | PAGE_NUMBER(starting from 0 to TOTAL_PAGE-1)

try {
    $result = $apiInstance->stockSummaryGet($pagination, $per_page, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WarehouseStockApi->stockSummaryGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- pagination | bool| Pagination parameter | [optional] per_page | int| Results_per_page | [optional] page | int| PAGE_NUMBER(starting from 0 to TOTAL_PAGE-1) | [optional]

Return type

\Swagger\Client\Model\Stock

Authorization

oAuth2AuthCode

HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)