Last active
August 10, 2018 16:08
-
-
Save splanquart/f9307bd884f15df48588f5ff60cf2041 to your computer and use it in GitHub Desktop.
blog-API : le bon nommage des attributs-paid-vs-is_paid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# utilisation de l'attribut `paid` | |
>>> payment = payplug.get_payment(id='pay_CD9SCD') | |
>>> payment.paid # Est-ce payé ? Ou est-ce la date de paiement ? c'est pas limpide. | |
# utilisation de l'attribut `is_paid` | |
>>> payment = payplug.get_payment(id='pay_CD9SCD') | |
>>> payment.is_paid # c'est payé, on a pas de doute on sait tout de suite que l'on peux l'utiliser dans nos conditions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment