feat: Implement Allegro Order Sync and Status Management
- Added AllegroOrderSyncStateRepository for managing sync state with Allegro orders. - Introduced AllegroOrdersSyncService to handle the synchronization of orders from Allegro. - Created AllegroStatusDiscoveryService to discover and store order statuses from Allegro. - Developed AllegroStatusMappingRepository for managing status mappings between Allegro and OrderPro. - Implemented AllegroStatusSyncService to facilitate status synchronization. - Added CronSettingsController for managing cron job settings related to Allegro integration.
This commit is contained in:
26
src/Modules/Cron/AllegroOrdersImportHandler.php
Normal file
26
src/Modules/Cron/AllegroOrdersImportHandler.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\Cron;
|
||||
|
||||
use App\Modules\Settings\AllegroOrdersSyncService;
|
||||
|
||||
final class AllegroOrdersImportHandler
|
||||
{
|
||||
public function __construct(private readonly AllegroOrdersSyncService $syncService)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $payload
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function handle(array $payload): array
|
||||
{
|
||||
return $this->syncService->sync([
|
||||
'max_pages' => (int) ($payload['max_pages'] ?? 5),
|
||||
'page_limit' => (int) ($payload['page_limit'] ?? 50),
|
||||
'max_orders' => (int) ($payload['max_orders'] ?? 200),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user