Open
Description
If I delete a card from a Customer:
customer.cards[0].delete()
and the customer only has 1 card, any further operation on the customer object will issue a PUT
on the actual customer object, however, the source_uri
which might reference the deleted card will throw a 409 since that card will have been deleted.
Here's an executable snippet:
card = balanced.Card.find('/v1/marketplaces/:marketplace_id/cards/:card_id')
customer = balanced.Customer().save()
customer.add_card(card.uri)
assert len(customer.cards) == 1
assert customer.cards[0].uri == card.uri
assert customer.source_uri == card.uri
customer.cards[0].delete()
assert len(customer.cards) == 0
customer.source_uri # this still exists, it should be None!