braintree / braintree_python

Braintree Python library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
241 stars 155 forks source link

docs don't match code in braintree.transaction.Status #112

Closed tisdall closed 5 years ago

tisdall commented 5 years ago

https://github.com/braintree/braintree_python/blob/e3347b2b81ad1ff0e6fecabfee72dccdc6cd9ec6/braintree/transaction.py#L205-L235

The docs list transaction status that aren't in the code (ex. braintree.Transaction.Status.Void) and the code lists status not in the docs (ex. braintree.Transaction.Status.SettlementConfirmed). I assume the code is the one to rely on, but then why have the docs there?

Code also lists Unrecognized but isn't in the official docs: https://developers.braintreepayments.com/reference/response/transaction/python#status

crookedneighbor commented 5 years ago

Hi @tisdall, the inline docs are wrong. Void looks just like a typo for Voided. The missing statuses are likely simply that the person who added them forgot to include them in the pydocs.

As for unrecognized, don't worry about that status. It's never used and will be removed in the next major version.

If you'd like to open a PR to correct the docs, go for it. Otherwise, we'll take care of it in the next release.

crookedneighbor commented 5 years ago

We've made this change internally and it'll be resolved after the next release, so I'm going to close this issue.