Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identity map is not properly mapped in the Python client #55

Open
mahmoudimus opened this issue Jul 12, 2013 · 0 comments
Open

Identity map is not properly mapped in the Python client #55

mahmoudimus opened this issue Jul 12, 2013 · 0 comments
Labels

Comments

@mahmoudimus
Copy link
Contributor

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!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant