paymill/paymill-ruby

Simplified way of updating and deleting

Closed this issue · 3 comments

Currently to do update or delete you have to first find the resource. This API call is redundant and not needed at all. Do you think it would be possible to provide some way to avoid this request?

Hi @morgoth,
to update or delete a resource you need to have a reference to it (find it).

Can you be more clear about this. The only thing I can do is to provide class methods for update and delete, which work with String (the resource id).

I found workaround by: Paymill::Client.new(id: "client_id").delete and the same with update:

client = Paymill::Client.new(id: "client_id")
client.description = "something"
client.update

BTW, sending attributes to update method client.update(description: "something") doesn't work, but I can open separate issue for this.

yes, pls ;)