Files
core/src/Shipping/Contracts/CreatesStandaloneVouchers.php
T

24 lines
821 B
PHP

<?php
namespace Modules\Core\Shipping\Contracts;
use Modules\Core\Shipping\DTOs\ShipmentRequest;
use Modules\Core\Shipping\DTOs\VoucherRecipient;
use Modules\Core\Shipping\Models\Shipment;
/**
* A carrier whose vouchers can be created without an order — from the
* Carrier Vouchers screen's "Create voucher", for a parcel that isn't a
* shop order. The voucher is an ordinary created shipment with no
* order_id: it prints, cancels and tracks like any other, and can be
* linked to an order later.
*/
interface CreatesStandaloneVouchers
{
/**
* @param string $reference sent to the carrier as our reference
* (it comes back in its lists and tracking).
*/
public function createStandaloneVoucher(VoucherRecipient $recipient, string $reference, ShipmentRequest $request): Shipment;
}