Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | public function create(BuilderFactory $build): EndpointBuilder |
||
22 | { |
||
23 | return $build->endpoint(self::class) |
||
24 | ->exportTo(Tenant::ALL) |
||
25 | ->take($build->many(SaleCreateCommand::class)) |
||
26 | // XXX anybody can purchase? ->checkPermission('object.buy') |
||
27 | ->middlewares( |
||
28 | $build->repeat(CustomerLoader::class), |
||
29 | $build->repeat(PlanLoader::class), |
||
30 | $build->repeat(TargetLoader::class), |
||
31 | $build->repeat(SaleCreateAction::class) |
||
32 | ) |
||
33 | ->return($build->many(Sale::class)) |
||
34 | ; |
||
37 |