PluginProbe
Billingo Official for WooCommerce / 4.2.9
Billingo Official for WooCommerce v4.2.9
4.3.3 4.3.2 trunk 0.0.2 1.0.0 2.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 All 82 releases
billingo / src / Validation / Document / DocumentQueryValidator.php

DocumentQueryValidator.php in Billingo Official for WooCommerce 4.2.9, at src/Validation/Document/DocumentQueryValidator.php

37 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace App\Billingo\Validation\Document;
4
5 use App\Billingo\Enums\PaymentMethodEnum;
6 use App\Billingo\Enums\PaymentStatusEnum;
7 use App\Billingo\Validation\Validator;
8
9 class DocumentQueryValidator extends Validator
10 {
11
12 protected function rules(): array
13 {
14 return [
15 'page' => ['integer'],
16 'per_page' => ['integer'],
17 'block_id' => ['integer'],
18 'partner_id' => ['integer'],
19 'payment_method' => [['in', getEnumValues(PaymentMethodEnum::class)]],
20 'payment_status' => [['in', getEnumValues(PaymentStatusEnum::class)]],
21 'start_date' => [['dateFormat', 'Y-m-d']],
22 'end_date' => [['dateFormat', 'Y-m-d']],
23 'start_number' => ['integer'],
24 'end_number' => ['integer'],
25 'start_year' => ['integer'],
26 'end_year' => ['integer'],
27 'type' => ['string'],
28 'query' => ['string'],
29 'paid_start_date' => [['dateFormat', 'Y-m-d']],
30 'paid_end_date' => [['dateFormat', 'Y-m-d']],
31 'fulfillment_start_date' => [['dateFormat', 'Y-m-d']],
32 'fulfillment_end_date' => [['dateFormat', 'Y-m-d']],
33 'last_modified_date' => [['dateFormat', 'Y-m-d']],
34 ];
35 }
36 }
37