mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
1fbdc795ff
- Update Standard Segment Constant Logic Class - List Standard Segment Constant Logic Class - List Standard Segment Logic Class
28 lines
883 B
PHP
28 lines
883 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\SegmentConstants\Services;
|
|
|
|
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
|
use App\Classes\Modules\SegmentConstants\DataTransferObjects\SegmentConstantBillingFeeObject;
|
|
use App\Models\SegmentConstant;
|
|
|
|
class UpdatesSegmentConstantBillingFee extends AbstractUpdateRecord
|
|
{
|
|
|
|
/**
|
|
* @param SegmentConstantBillingFeeObject $object
|
|
* @return \Illuminate\Database\Eloquent\Model
|
|
* @throws \App\Classes\Exceptions\MalformedRequestException
|
|
*/
|
|
public function execute(SegmentConstant $model, SegmentConstantBillingFeeObject $object)
|
|
{
|
|
$model->name = $object->getName();
|
|
$model->reference = $object->getReference();
|
|
$model->detail = json_encode([
|
|
'type' => $object->getType(),
|
|
'value' => $object->getValue()
|
|
]);
|
|
|
|
return $this->handler($model);
|
|
}
|
|
} |