Open mjallday opened 12 years ago
This is a fair request - it should be expected that the find
class method of a Resource
child only apply to its class types. The only coercion should happen if you use the super class, in this case Resource
, find
method, which coerce it into the appropriate type.
This can also happen in this scenario:
balanced_params = {'name' => params[:name], 'email_address' => params[:email_address], 'uri' => params[:balanced_card_uri]}
balanced_customer = Balanced::Account.new(balanced_params).save
Note that card_uri
was accidentally input as uri
which produces the confusing error message "Not permitted to perform update on marketplace_cards"
When I ask for a Debit I should get a Debit, if it's another type of object I should get an error