| 1 |
<?php |
| 2 |
|
| 3 |
namespace App\Billingo\Validation\Document; |
| 4 |
|
| 5 |
use App\Billingo\Enums\Document\TypeEnum; |
| 6 |
use App\Billingo\Enums\DontSendToNavReasonEnum; |
| 7 |
use App\Billingo\Enums\OnlinePaymentEnum; |
| 8 |
use App\Billingo\Enums\RoundEnum; |
| 9 |
use App\Billingo\Models\Document\DocumentInstantPaymentRequest; |
| 10 |
use App\Billingo\Validation\Validator; |
| 11 |
|
| 12 |
class DocumentSettingsValidator extends Validator |
| 13 |
{ |
| 14 |
|
| 15 |
protected function rules(): array |
| 16 |
{ |
| 17 |
return [ |
| 18 |
'mediated_service' => ['optional', 'boolean'], |
| 19 |
'without_financial_fulfillment' => ['optional', 'boolean'], |
| 20 |
'online_payment' => ['optional', ['in', getEnumValues(OnlinePaymentEnum::class)]], |
| 21 |
'should_send_email' => ['optional', 'boolean'], |
| 22 |
'round' => ['optional', ['in', getEnumValues(RoundEnum::class)]], |
| 23 |
'dont_send_to_nav_reason' => ['optional', ['in', getEnumValues(DontSendToNavReasonEnum::class)]], |
| 24 |
'order_number' => ['optional', 'string'], |
| 25 |
'place_id' => ['optional', 'integer'], |
| 26 |
'instant_payment' => ['optional', 'boolean'], |
| 27 |
'selected_type' => ['optional', ['in', getEnumValues(TypeEnum::class)]], |
| 28 |
'instant_payment_request' => ['optional', ['instanceOf', DocumentInstantPaymentRequest::class]] |
| 29 |
]; |
| 30 |
} |
| 31 |
} |
| 32 |
|