Joel Taylor 299e9ea0ab Raise an error when requests params are invalid (#874)
There are two kinds of API operations: collection and element specific.
The signature between the two is slightly different:
  - **collection**: (params, opts)
  - **element specific**: (id, params, opts)

If a user doesn't realize the difference, they may attempt to use the
collection signature when performing an element specific operation like:
```
Stripe::PaymentIntent.cancel('pi_1234', 'sk_test_key')
 # Results in an error: NoMethodError: undefined method `key?' for "sk_test"
```

The resulting error message isn't very useful for debugging.

Instead,this PR adds a message letting the user know what it's expecting:
`request params should be either a Hash or nil (was a String)`
2019-10-31 09:53:19 -07:00
..
2019-08-20 11:35:24 -07:00
2019-08-20 11:35:24 -07:00
2019-10-01 10:10:39 -07:00