Files
exchange-2.0/app/Classes/Modules/SegmentConstants/Services/UpdatesSegmentConstantBookingAmountMax.php
T
CheeSiong 1fbdc795ff - Segment Company Relationship Service Class
- Update Standard Segment Constant Logic Class
- List Standard Segment Constant Logic Class
- List Standard Segment Logic Class
2020-11-13 14:15:34 +08:00

29 lines
963 B
PHP

<?php
namespace App\Classes\Modules\SegmentConstants\Services;
use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Classes\Modules\SegmentConstants\DataTransferObjects\SegmentConstantBookingAmountMaxObject;
use App\Models\SegmentConstant;
class UpdatesSegmentConstantBookingAmountMax extends AbstractUpdateRecord
{
/**
* @param SegmentConstantBookingAmountMaxObject $object
* @return \Illuminate\Database\Eloquent\Model
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(SegmentConstant $model, SegmentConstantBookingAmountMaxObject $object)
{
$model->name = $object->getName();
$model->reference = $object->getReference();
$model->detail = json_encode([
'type' => $object->getType(),
'value' => $object->getValue(),
'currency_id' => $object->getCurrencyId(),
]);
return $this->handler($model);
}
}