yogarine / boxture-sdk-php
Boxture API v2 的 SDK
0.1.0
2019-06-04 13:13 UTC
Requires
- php: >=7.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-05 00:29:18 UTC
README
Boxture API v2 的详细文档和测试工具
此 PHP 包由 OpenAPI Generator 项目自动生成
- API 版本:0.0.1
- 包版本:0.1.0
- 构建包:org.openapitools.codegen.languages.PhpClientCodegen
要求
PHP 5.5 及以上版本
安装 & 使用
Composer
要通过 Composer 安装绑定,请将以下内容添加到 composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/yogarine/boxture-v2-sdk-php.git" } ], "require": { "yogarine/boxture-v2-sdk-php": "*@dev" } }
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/boxture-v2-sdk-php/vendor/autoload.php');
测试
要运行单元测试
composer install ./vendor/bin/phpunit
入门
请遵循 安装过程,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: api_key $config = Boxture\V2\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Boxture\V2\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Boxture\V2\Api\HandlingUnitsApi( // 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 ); $search = 'search_example'; // string | $orderField = 'orderField_example'; // string | Exact field name you want to sort the output by $orderDirection = 'asc'; // string | Sort direction $page = 1; // int | Page number $pageSize = 25; // int | Max number of results per page try { $result = $apiInstance->getHandlingUnits($search, $orderField, $orderDirection, $page, $pageSize); print_r($result); } catch (Exception $e) { echo 'Exception when calling HandlingUnitsApi->getHandlingUnits: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都相对于 http://staging.localexpress.nl/api/v2
模型文档
- CompanyResponseMinimal
- ErrorResponse
- HandlingUnitResponse
- LocationRequest
- LocationResponse
- PatchShipments
- PostShipments
- PostShipmentsIdAccept
- PostShipmentsIdAssign
- PostShipmentsIdCancel
- PostShipmentsIdDropoff
- PostShipmentsIdPickup
- PostShipmentsIdPurchase
- PostShipmentsIdReplan
- RetailerResponseMinimal
- ServiceTypeDropoffOfferResponse
- ServiceTypeResponse
- ShipmentAcceptRequest
- ShipmentAssignRequest
- ShipmentCancelRequest
- ShipmentDropoffLineRequest
- ShipmentDropoffRequest
- ShipmentLineRequest
- ShipmentLineResponse
- ShipmentPickupLineRequest
- ShipmentPickupRequest
- ShipmentPurchaseRequest
- ShipmentQuoteRequest
- ShipmentReplanRequest
- ShipmentResponse
- ShipmentResponseServiceTypes
- ShipmentStateTransitionResponse
- ShipmentUpdateLineRequest
- ShipmentUpdateRequest
- TimeWindowRequest
- TimeWindowResponse
- UserResponseMinimal
授权文档
api_key
- 类型:API 密钥
- API 密钥参数名称:Authorization
- 位置:HTTP 头部