<?php

namespace App\Classes\Modules\Orders\Services;


use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\SegmentConstants;
use App\Models\Order;
use Carbon\Carbon;

class CalculatesSegmentRate
{

    public function execute(Order $order, int $segmentRates){
        return ($segmentRates == SegmentConstants::STANDARD_SEGMENT) ? 300 : (
            (($segmentRates == SegmentConstants::CUSTOM_SEGMENT) ? -20 : 0)
        );
    }

}
