Aller au contenu

omnibus/offline Référence de l’API

Étage
Fournisseur · Omnibus
Version
2.x
Suite de conformité
branchée, CI non lue
Vérifié en réel
Son README ne le dit pas
Licence
MIT
composer require omnibus/offline:2.x-dev

Lue dans les fichiers PHP du paquet au commit be3a619754fa : 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é.

Omnibus\Offline

  • OfflineGatewayFactory class

    No carrier API: the shop hands the parcel over itself (its own courier, a counter at the post office) or keeps it for collection.

    5 options

Omnibus\Offline\Action

  • PickupAction class

    The shop's own counters (click & collect), as configured - wherever the customer is.

    3 methods

  • ShippingAction class

    Nothing to book: the tracking number is the one the shop typed (option "tracking_number", from the post office's receipt), else the shipment's reference. No document - the shop writes the address itself.

    3 methods

  • TrackingAction class

    No carrier to ask: the status is unknown - the shop says it in person, or follows the tracking link.

    2 methods

Omnibus\Offline

OfflineGatewayFactory class

final class OfflineGatewayFactory extends GatewayFactory OfflineGatewayFactory.php:22

No carrier API: the shop hands the parcel over itself (its own courier, a counter at the post office) or keeps it for collection.

options: rates: [...] # Omnibus\Action\ConfiguredRatingAction tracking_url: 'https://www.laposte.fr/outils/suivre-vos-envois?code={number}' pickup_points: # click & collect - { id: shop, name: 'La boutique', street: ['1 rue ...'], postcode: '75001', city: Paris, country: FR, opening_hours: { 1: [['10:00', '19:00']] } }

Options

OptionDefault
tracking_urlnull
pickup_points[]
omnibus.action.shippingstatic fn(Config $c) => new ShippingAction($c['tracking_url'])
omnibus.action.trackingnew TrackingAction()
omnibus.action.pickupstatic fn(Config $c) => new PickupAction($c['pickup_points'])

Omnibus\Offline\Action

PickupAction class

final class PickupAction implements ActionInterface PickupAction.php:12

The shop's own counters (click & collect), as configured - wherever the customer is.

PickupAction::__construct()

public function __construct(readonly array $points)

PickupAction::supports()

public function supports(Request $request): bool

PickupAction::execute()

public function execute(Request $request): void

ShippingAction class

final class ShippingAction implements ActionInterface ShippingAction.php:15

Nothing to book: the tracking number is the one the shop typed (option "tracking_number", from the post office's receipt), else the shipment's reference. No document - the shop writes the address itself.

ShippingAction::__construct()

public function __construct(readonly ?string $trackingUrl = null)

ShippingAction::supports()

public function supports(Request $request): bool

ShippingAction::execute()

public function execute(Request $request): void

TrackingAction class

final class TrackingAction implements ActionInterface TrackingAction.php:12

No carrier to ask: the status is unknown - the shop says it in person, or follows the tracking link.

TrackingAction::supports()

public function supports(Request $request): bool

TrackingAction::execute()

public function execute(Request $request): void