warehouse-x / misc-sdk
API client generated from OpenAPI definition from Warehouse-X.com
Requires
- allansun/openapi-runtime: ^3.0.0
Requires (Dev)
- allansun/openapi-code-generator: ^1.0.0
This package is auto-updated.
Last update: 2024-11-14 18:44:51 UTC
README
Code generated from Warehouse-X.com's OpenAPI file using allansun/openapi-code-generator.
Generated code is well self-documented with proper PHPDoc annotations.
Please refer to Warehouse-X.com's documentation for detailed API behaviour explanation.
Installation
composer require warehouse-x/misc-sdk
You will also need a PSR-18 compatible client see https://docs.php-http.org/en/latest/clients.html
So either use Guzzle (or any other PSR-18 compatible clients)
composer require php-http/guzzle7-adapter
Versioning
This project matches Warehouse-X's API versioning.
Should you found a matching version not being available. Please contact the author to generate against correct version.
Usage
First you need to create a PSR-18 Then in your business logic you can call API operations directly
<?php
use WarehouseX\ClOrder\Api\Inboundorder;
$httpClient = new \GuzzleHttp\Client([
'base_uri' => 'https://www.warehouse-x.com/',
'headers'=>[
'Authorization'=> 'Bearer <accessToken>'
]
]);
$api = new Inboundorder($httpClient);
$orders = $api->getInboundOrderCollection();
Author
- Allan Sun - Initial work