Closed blim8183 closed 11 years ago
@blim8183 it looks like this field is only returned on valid cards, on invalid (e.g. deleted) cards it is not returned.
Does this correspond with what you're seeing or is it not being returned on a valid card? If it's the latter please provide us with the URI of the card in question and we'll look at what's going on.
/marketplaces/MP3Qbrqi8eRZpdzVU3jtQewu/cards/CC1t74WFG31XgNbecvpDLuiW
That is a valid card that was tokenized and associated with a customer without ever including a postal code
Thanks for that, we've found the issue and will release a fix to ensure the field is consistently returned on card objects. We'll update this github issue once it's been resolved and deployed.
For whoever fixes this - the view for the address fields defaults to pez.SKIP
, adding default=None
should resolve this issue.
curl https://api.balancedpayments.com/v1/marketplaces/TEST-MPxn4pzNrkXXrrA69phWFSg/cards -u 118f07b8fdd611e2a0af026ba7cd33d0: -d "expiration_month=12" -d "security_code=123" -d "card_number=5105105105105100" -d "expiration_year=2020" | grep street
@blim8183 this should now be fixed, please reopen if it's not working as you expected
curl https://api.balancedpayments.com/v1/marketplaces/TEST-MPxn4pzNrkXXrrA69phWFSg/cards -u 118f07b8fdd611e2a0af026ba7cd33d0: -d "expiration_month=12" -d "security_code=123" -d "card_number=5105105105105100" -d "expiration_year=2020" 2>/dev/null | grep street
"street_address": null
If I load a a card with no postal code and call postal_code on it, I get the following error:
However, after loading a card that does have a postal code, the original item will return "nil" instead of blowing up.