Closed morgoth closed 9 years ago
Hi @morgoth update don't get inline parameters during its execution for its instance. You should do:
client = Paymill::Client.find("client_id")
client.description = "description"
client.update
You can pass parameters to update and delete only when there are some cascading functionality, which is not relevant to the instance. like:
offer = Offer.find( 'offer_b54ff8b3811e06c02e14' )
offer.amount = 1000
offer.update( update_subscriptions: true )
or
offer = Offer.find( 'offer_b54ff8b3811e06c02e14' )
offer.delete( remove_with_subscriptions: true )
I would expect that this way is working. Anyway, do you think it could raise an error on unsupported attributes passed in, to avoid such confusion?
This should be tested with CURL, but my guess is that it will raise an error, because the API don't support it.
Do you have suggestions how we can build the interface for cascading parameters, which are not part of the model, but can be passed to update or delete method?
@morgoth I have tested this, and the API throws an error when unknown argument is given.
Update and delete are getting only cascading arguments. The instance attributes are set with accessors. So if you are ok I would like to close this issue.
sure
Having:
doesn't work