38 lines
1.1 KiB
PHP
38 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Temporal\OrderFulfillment;
|
|
|
|
use Temporal\Activity\ActivityInterface;
|
|
use Temporal\Activity\ActivityMethod;
|
|
|
|
#[ActivityInterface]
|
|
interface OrderActivityInterface
|
|
{
|
|
#[ActivityMethod]
|
|
public function validateOrder(int $orderId, array $simulationConfig = []): bool;
|
|
|
|
#[ActivityMethod]
|
|
public function checkInventory(int $orderId, array $simulationConfig = []): bool;
|
|
|
|
#[ActivityMethod]
|
|
public function processPayment(int $orderId, array $simulationConfig = []): string;
|
|
|
|
#[ActivityMethod]
|
|
public function refundPayment(int $orderId, string $paymentId): bool;
|
|
|
|
#[ActivityMethod]
|
|
public function updateInventory(int $orderId, array $simulationConfig = []): bool;
|
|
|
|
#[ActivityMethod]
|
|
public function restoreInventory(int $orderId): bool;
|
|
|
|
#[ActivityMethod]
|
|
public function notifyWarehouse(int $orderId, array $simulationConfig = []): bool;
|
|
|
|
#[ActivityMethod]
|
|
public function cancelWarehouseNotification(int $orderId): bool;
|
|
|
|
#[ActivityMethod]
|
|
public function sendTrackingInfo(int $orderId, string $trackingNumber, array $simulationConfig = []): bool;
|
|
}
|