Feat: Shipping functionalities redesign, elta courier integration, commenting out acs since no integration can happen, flow updates
This commit is contained in:
1 parent
f411dec1da
commit
49ec4333af
63 files changed
+3143
-347
No files matched your search
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Shipping\Jobs;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Modules\Core\Shipping\Services\CarrierVoucherSync;
|
||||
|
||||
/**
|
||||
* Daily pull of every carrier's reported vouchers for the last $days days
|
||||
* into the Carrier Vouchers screen (CarrierVoucherSync). Also run from
|
||||
* that screen's "Sync now".
|
||||
*/
|
||||
class SyncCarrierVouchersJob implements ShouldQueue
|
||||
{
|
||||
use Dispatchable;
|
||||
use InteractsWithQueue;
|
||||
use Queueable;
|
||||
use SerializesModels;
|
||||
|
||||
public int $tries = 2;
|
||||
|
||||
public int $backoff = 300;
|
||||
|
||||
public function __construct(public readonly int $days = 14) {}
|
||||
|
||||
public function handle(CarrierVoucherSync $sync): void
|
||||
{
|
||||
$sync->syncAll(now()->subDays($this->days)->startOfDay(), now());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user