abbadon1334 / scloby-client-api
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-15 19:08:00 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
- AllergenSchema
- Allergens
- BookingShifts
- Bookings
- BookingtableSchema
- BookingtagSchema
- CampaignitemSchema
- CashMovements
- Categories
- CategorySchema
- ChainPrepaidMovements
- ChainsCampaigns
- ChainsFidelitiesMovements
- ChainsPrizes
- ChainsRules
- Channels
- CombinationbarcodeSchema
- ComponentSchema
- Components
- CustomerSchema
- CustomerSchema1
- Customers
- DepartmentSchema
- Departments
- InlineResponse200
- InlineResponse2001
- InlineResponse2002
- InlineResponse2003
- InlineResponse2003Shop
- InlineResponse2004
- InlineResponse2005
- InlineResponse201
- InlineResponse2011
- InlineResponse2012
- InlineResponse400
- InlineResponse400Error
- ItemSchema
- ItembarcodeSchema
- ItembomcomponentSchema
- ItemchannelSchema
- ItemcombinationSchema
- ItemimageSchema
- Items
- OrdercustomerSchema
- OrderitemSchema
- OrderitemingredientSchema
- OrderitemvariationSchema
- Orders
- PaymentMethods
- PricechangeSchema
- PrinterSchema
- Printers
- RawMaterial
- Rooms
- RuleSchema
- SalecustomerSchema
- SaledocumentSchema
- SaleeinvoiceSchema
- SaleitemSchema
- SalepaymentSchema
- Sales
- Session
- SessionShop
- Stock
- StockMovements
- Supplier
- TableSchema
- VariationSchema
- VariationvalueSchema
- Vat
- VatSchema
Documentation For Authorization
oAuth2AuthCode
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://login.scloby.com/signin.php
- Scopes:
- ****: