David G
David G

Reputation: 183

Deleting cards from Balanced via Ruby gem

I'm marking cards as invalid by doing a PUT request with the is_valid parameter being set to false. Is is_valid ever set server side such as in the case of a card being declined by the processor? If Balanced sets is_valid to false will this be a permanent state or is it possible that it will be transient e.g. if there are low funds in the account?

Upvotes: 1

Views: 241

Answers (1)

mjallday
mjallday

Reputation: 10092

is_valid is solely a user set value.

Balanced will not mark a card as invalid if it fails payment authorization as this could be a transient state as you mention.

If you wish to filter out valid cards from invalid you can do something like this:

cards = Balanced::Card.all(is_valid: true)

Upvotes: 3

Related Questions