Skip to content

omnibus/db-schenker API reference

Floor
Provider · Omnibus
Version
2.x
Conformance suite
runs, no CI read
Verified for real
Not verified for real
Licence
MIT
composer require omnibus/db-schenker:2.x-dev

Read from the package's own PHP files at the commit 0f62a3e02b78: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.

Omnibus\DbSchenker

  • Api class

    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).

    3 methods · 2 properties · 2 constants

  • DbSchenkerGatewayFactory class

    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

    5 options

Omnibus\DbSchenker\Action

  • ShippingAction class

    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.

    3 methods

  • TrackingAction class

    eSchenker'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 $apiKey
public 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): array

Api::call()

public function call(string $method, string $path, ?array $body = null): array

DbSchenkerGatewayFactory 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

OptionDefault
api_keynull
account_numbernull
omnibus.apifunction (Config $c) { $http = $this->http ?? HttpClient::create(); return new Api($http, $c['api_key'] ?: null, $c['account_number'] ?: null); }
omnibus.action.trackingnew TrackingAction()
omnibus.action.shippingstatic 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): bool

ShippingAction::execute()

public function execute(Request $request): void

TrackingAction 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): bool

TrackingAction::execute()

public function execute(Request $request): void