```ruby
expected_params = params.slice(:subscription_id, :quantity)
fail HttpErrors::BadRequest, _("Please provide pool and quantity") if !expected_params[:subscription_id]
```

this can be  reduced to one line with strong_params

```ruby
expected_params = params.require(:pool, :quantity)
# throws error if both are not included