Lue dans les fichiers PHP du paquet au commit 0f62a3e02b78 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.
ApiclassDB Schenker's public tracking (eschenker.dbschenker.com, no credentials) and the Schenker Open API for bookings (an API key from the partner portal, which is where the account's booking profile lives).
3 methods · 2 properties · 2 constants
DbSchenkerGatewayFactoryclassoptions: api_key: null # the Schenker Open API key, for bookings account_number: null # the booking account rates: [...] # prices from configuration: Schenker quotes by contract
5 options
ShippingActionclassA land-transport booking through the Open API (service: a product code, SYSTEM by default); the booking's number is the tracking number. Unverified: built on the published shape.
3 methods
TrackingActionclasseSchenker's public tracking: the shipment's events, oldest first.
3 methods
Omnibus\DbSchenker
Api class
final class Api Api.php:15
DB Schenker's public tracking (eschenker.dbschenker.com, no credentials) and the Schenker Open API for bookings (an API key from the partner portal, which is where the account's booking profile lives).
const TRACKING = 'https://eschenker.dbschenker.com/nges-portal/api/public/tracking'const BOOKING = 'https://api.dbschenker.com/booking/v1'public readonly ?string $apiKeypublic readonly ?string $accountNumber
Api::__construct()
public function __construct(readonly HttpClientInterface $http, public readonly ?string $apiKey = null, public readonly ?string $accountNumber = null, readonly int $timeout = 20)Api::track()
public function track(string $number): arrayApi::call()
public function call(string $method, string $path, ?array $body = null): arrayDbSchenkerGatewayFactory class
final class DbSchenkerGatewayFactory extends GatewayFactory DbSchenkerGatewayFactory.php:21
options: api_key: null # the Schenker Open API key, for bookings account_number: null # the booking account rates: [...] # prices from configuration: Schenker quotes by contract
Tracking needs no credentials. Bookings go through the Open API (land transport), unverified until an account's key is at hand: the booking action is built on its published shape and marked so.
Options
| Option | Default | |
|---|---|---|
api_key | null | |
account_number | null | |
omnibus.api | function (Config $c) {
$http = $this->http ?? HttpClient::create();
return new Api($http, $c['api_key'] ?: null, $c['account_number'] ?: null);
} | |
omnibus.action.tracking | new TrackingAction() | |
omnibus.action.shipping | static fn(Config $c) => $c['api_key'] && $c['account_number'] ? new ShippingAction() : null |
Omnibus\DbSchenker\Action
ShippingAction class
final class ShippingAction implements ActionInterface, ApiAwareInterface ShippingAction.php:16
A land-transport booking through the Open API (service: a product code, SYSTEM by default); the booking's number is the tracking number. Unverified: built on the published shape.
ShippingAction::__construct()
public function __construct()ShippingAction::supports()
public function supports(Request $request): boolShippingAction::execute()
public function execute(Request $request): voidTrackingAction class
final class TrackingAction implements ActionInterface, ApiAwareInterface TrackingAction.php:16
eSchenker's public tracking: the shipment's events, oldest first.
TrackingAction::__construct()
public function __construct()TrackingAction::supports()
public function supports(Request $request): boolTrackingAction::execute()
public function execute(Request $request): void