PluginProbe
Billingo Official for WooCommerce / trunk
Billingo Official for WooCommerce vtrunk
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 / Factories / DocumentProductDataFactory.php

DocumentProductDataFactory.php in Billingo Official for WooCommerce trunk, at src/Factories/DocumentProductDataFactory.php

28 lines 1003 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace App\Billingo\Factories;
4
5 use App\Billingo\Enums\EntitlementEnum;
6 use App\Billingo\Enums\UnitPriceTypeEnum;
7 use App\Billingo\Enums\VatEnum;
8
9 class DocumentProductDataFactory extends BaseFactory
10 {
11
12 public function definition(): array
13 {
14 return [
15 'name' => $this->faker->word(),
16 'unit_price' => $this->faker->randomFloat(2, 1, 1000),
17 'unit_price_type' => $this->faker->randomElement(getEnumValues(UnitPriceTypeEnum::class)),
18 'quantity' => $this->faker->randomFloat(2, 1, 100),
19 'unit' => $this->faker->word(),
20 'vat' => $this->faker->randomElement(getEnumValues(VatEnum::class)),
21 'comment' => $this->faker->optional()->sentence(),
22 'entitlement' => $this->faker->optional()->randomElement(getEnumValues(EntitlementEnum::class)),
23 'sku' => $this->faker->optional()->bothify('SKU-####'),
24 'is_generate_erase_code' => $this->faker->boolean(),
25 ];
26 }
27 }
28