abbadon1334/scloby-client-api

dev-master 2021-02-28 16:59 UTC

This package is auto-updated.

Last update: 2024-07-15 18:47:29 UTC


README

https://developer.scloby.com/apidoc/assets/documentation.json Introduction The authentication token is issued via Oauth2 standard ( https://oauth.net) You can apply for a Scloby test account on our developer portal https://developer.scloby.com Here is your ClientId and ClientSecret for tests: client_id: SclobyApiDocs client_secret: DdyPNPvfPOGa0Izjct0C All data is JSON format, and the Content-Type header of POST/PUT request must be set to application/json. Search Parameters You can perform a search in a collection using all first level properties in combination with some parameter, or specifying a value: property = VALUE if you are searching for all items with a specific property value property_since = MIN_VALUE if you are searching for all items with property value greater (or equal) than MIN_VALUE property_max = MAX_VALUE if you are searching for all items with property value smaller (or equal)than MAX_VALUE property_like = LIKE_VALUE if you are searching for a substring content. You can use property_since and property_max in order to simulate between operator If you are using equal operator, all other operators for that parameter will be ingnored If you are using _max or _since operator in strings, the alphabetical ordering will be used

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

  • API version: 2.0.0
  • Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen For more information, please visit https://developer.scloby.com

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": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@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');

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

$apiInstance = new Swagger\Client\Api\AccountingDepartmentsApi(
    // 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->departmentsGet($pagination, $per_page, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountingDepartmentsApi->departmentsGet: ', $e->getMessage(), PHP_EOL;
}

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

$apiInstance = new Swagger\Client\Api\AccountingDepartmentsApi(
    // 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 Department that need to be deleted

try {
    $apiInstance->departmentsIdDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling AccountingDepartmentsApi->departmentsIdDelete: ', $e->getMessage(), PHP_EOL;
}

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

$apiInstance = new Swagger\Client\Api\AccountingDepartmentsApi(
    // 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 department

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

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

$apiInstance = new Swagger\Client\Api\AccountingDepartmentsApi(
    // 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
);
$body = new \Swagger\Client\Model\StockMovements(); // \Swagger\Client\Model\StockMovements | Object data that need to be updated
$id = "id_example"; // string | id of the department that need to be updated

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

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

$apiInstance = new Swagger\Client\Api\AccountingDepartmentsApi(
    // 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
);
$body = new \Swagger\Client\Model\Departments(); // \Swagger\Client\Model\Departments | Department object that needs to be added.

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

Documentation for API Endpoints

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

Documentation For Models

Documentation For Authorization

oAuth2AuthCode

Author

dev@scloby.com