balanced / balanced-api

Balanced API specification.
221 stars 72 forks source link

Deleted Card resources should identify themselves as such #551

Closed jbrowning closed 10 years ago

jbrowning commented 10 years ago

API Version: 1.1

API v1.1 seems to have removed the invalidate operation in favor of DELETE/unstore.

This gist shows the API GET result for a card that was newly created vs the API GET result for the same card after it has been deleted. The only difference is the updated_at timestamp.

Deleted cards should indicate that they are no longer valid for debits.

matthewfl commented 10 years ago

We should add a can_debit field similar to what we already have on a bank account

https://github.com/balanced/balanced-api/blob/revision1/fixtures/_models/bank_account.json#L58-L65

steveklabnik commented 10 years ago

:+1:

ironcamel commented 10 years ago

:+1:

fangpenlin commented 10 years ago

Agree

matthewfl commented 10 years ago

https://github.com/balanced/balanced-api/blob/master/fixtures/_models/card.json#L177

There is now the can_debit attribute on cards, it will be false on any card which is deleted or invalidated.